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

vault: preventNotFound in files endpoint #576

Merged
merged 2 commits into from
Apr 10, 2024
Merged

vault: preventNotFound in files endpoint #576

merged 2 commits into from
Apr 10, 2024

Conversation

pdowler
Copy link
Member

@pdowler pdowler commented Apr 10, 2024

No description provided.

contentLastModified = NodeWriter.getDateFormat().parse(clm);
}
if (ret.artifact != null) {
// preventNotFound
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This potentially overrides the values set in the previous lines which might not be very obvious. Maybe re-org so that it's more clear where the specific value originates from (artifact first then node). Just a comment.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basically, if preventNotFound logic was triggered above and an artifact was found, it's always right to report that metadata as it's the definitive file metadata

the "else" is potentially getting metadata for an old version of the file, which can't practically be detected

I tried several sequences and this was the most clear to me

@pdowler pdowler merged commit 01b6866 into opencadc:master Apr 10, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants