Skip to content

Conversation

@nastra
Copy link
Contributor

@nastra nastra commented Nov 30, 2022

No description provided.

@github-actions github-actions bot added the core label Nov 30, 2022
@nastra nastra closed this Nov 30, 2022
@nastra nastra reopened this Nov 30, 2022
@nastra nastra force-pushed the metadata-update-parser-fixes branch from 68eeecd to b81623b Compare November 30, 2022 15:50
Copy link
Contributor

@singhpk234 singhpk234 left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks @nastra !

@nastra nastra force-pushed the metadata-update-parser-fixes branch from b81623b to 35c375e Compare November 30, 2022 16:49
return new MetadataUpdate.SetProperties(updated);
Map<String, String> updates;
// first read UPDATED for backward compatibility
if (node.has(UPDATED)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I think you should always check the correct property first, so we don't prioritize the obsolete one. This is pretty minor because you likely wouldn't have both.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've slightly adjusted the code so that in the unlikely event that both fields are defined, we take the new one

@nastra nastra force-pushed the metadata-update-parser-fixes branch from 35c375e to 75ff1d1 Compare December 1, 2022 07:37
…r than updated/removed

According to the REST API Spec the parser needs to write
updates/removals rather than updated/removed. However, we indefinitely
need to support reading both versions for backward compatibility.
@nastra nastra force-pushed the metadata-update-parser-fixes branch from 75ff1d1 to b972e14 Compare December 1, 2022 07:44
@danielcweeks danielcweeks merged commit 4ebd44a into apache:master Dec 1, 2022
@nastra nastra deleted the metadata-update-parser-fixes branch December 1, 2022 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants