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

DGS-8323 Always populate version metadata prop for tags API #2758

Merged
merged 2 commits into from Sep 13, 2023

Conversation

rayokota
Copy link
Member

@rayokota rayokota commented Sep 12, 2023

When using the new tags API, always set the confluent:version metadata property even if not passed

@rayokota rayokota requested a review from a team as a code owner September 12, 2023 21:50
@rayokota rayokota changed the title Always populate newVersion for tags API DGS-8323 Always populate newVersion for tags API Sep 12, 2023
@rayokota rayokota changed the title DGS-8323 Always populate newVersion for tags API DGS-8323 Always populate version metadata prop for tags API Sep 13, 2023
Collections.emptySet());
mergedMetadata = Metadata.mergeMetadata(mergedMetadata, newMetadata);
}
Metadata newMetadata = new Metadata(
Copy link
Member Author

Choose a reason for hiding this comment

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

This will set a confluent:version of 0 if the version was not passed

if (mergedMetadata != null && mergedMetadata.getProperties() != null) {
Map<String, String> props = mergedMetadata.getProperties();
String versionStr = props.get(CONFLUENT_VERSION);
if ("0".equals(versionStr)) {
Copy link
Member Author

Choose a reason for hiding this comment

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

If the confluent:version is 0, replace it with the actual version

@rayokota rayokota merged commit 17462b6 into confluentinc:7.4.x Sep 13, 2023
4 checks passed
@rayokota rayokota deleted the populate-new-version branch September 13, 2023 22:38
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.

None yet

2 participants