Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking β€œSign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As a developer, I want to know what version of Harvest was used to load a product #119

Closed
jordanpadams opened this issue Apr 10, 2023 Β· 5 comments Β· Fixed by #126 or NASA-PDS/registry-common#38

Comments

@jordanpadams
Copy link
Member

Checked for duplicates

Yes - I've already checked

πŸ§‘β€πŸ”¬ User Persona(s)

EN Developer

πŸ’ͺ Motivation

...so that I can more easily debug issues with metadata.

πŸ“– Additional Details

No response

Acceptance Criteria

Given a harvested product
When I perform a query of the product from either the registry or registry API
Then I expect to see the Harvest version returned in the ops:Harvest_Info/ops:software_version value.

βš™οΈ Engineering Details

  • create new ops:Harvest_Info/ops:software_version field
  • add current harvest version to that value
@al-niessner
Copy link
Contributor

al-niessner commented Aug 3, 2023 β€’

@alexdunnjpl @jordanpadams

It looks like the current harvest information is added to documents prior to harvesting. I think @alexdunnjpl knows harvest way better than I do, but the documentation in registry, I mean why would it be co-located with harvest, states that the node name must, as in mandatory, be in a document before harvesting. I did not see any reference to the date-time however. Still, searched harvest for "ops:Harvest_Info" which it would have to know if programatically adding it. Nothing shows up.

If harvest was injecting its own information already, then I would have been happy to add another item. However, this does not appear to be the case. I can do one of two things:

  1. Keep wading further into the weeds
  2. Wait for a suggestion that points me in the right direction (hint to @alexdunnjpl if he knows it off hand

Obviously I will keep strolling through the weeds until better direction comes along.

@al-niessner
Copy link
Contributor

@alexdunnjpl @jordanpadams

Aha! It seems to be in registry-common. Now which version of the many repo/maven versions would you like to be used?

@alexdunnjpl
Copy link
Contributor

@al-niessner if that's a legitimate question rather than a comment on the absolute state of things, 1.4.0, as far as I know.

Re the other stuff, I haven't touched harvest in ages - are you good now or do I need to dig in a little?

@jordanpadams
Copy link
Member Author

@al-niessner @alexdunnjpl I think what is returned from harvest --version would be ideal?

@tloubrieu-jpl ☝️

@al-niessner
Copy link
Contributor

@alexdunnjpl @jordanpadams @tloubrieu-jpl

if that's a legitimate question rather than a comment on the absolute state of things, 1.4.0, as far as I know.

Well, it is both actually. So harvest depends upon registry-common. I just confirmed that because the version for harvest --version comes from HarvestCli.class.getPackage().getImplementationVersion(). However, there is nothing to prevent one from updating the registry-common without updating the harvest POM version which is at 3.8.0. registry-common is 1.4.0. Or the other way round which would probably more likely. However if both change the behavior that you want to track, then it makes it kind of hard. Maybe if you pinky promise not to deliver a new harvest version X with an updated version of registry-common then you could just run off the harvest version. Problem with pinky swears is that people forget they made them or why then ignore them. So, yes, the state also plays a role.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment