Skip to content

Added automatic updates for version fields in plugin metadata files#116

Open
rostalan wants to merge 1 commit intoredhat-developer:mainfrom
rostalan:version-bump
Open

Added automatic updates for version fields in plugin metadata files#116
rostalan wants to merge 1 commit intoredhat-developer:mainfrom
rostalan:version-bump

Conversation

@rostalan
Copy link
Contributor

@rostalan rostalan commented Mar 9, 2026

Automated the updating for spec.version and spec.dynamicArtifact (only for ghcr.io).
It updates the known values and commits back to the branch.
This should reduce the need to do it manually (e.g. when using the update workflow in overlays).

@rostalan rostalan requested review from davidfestal and jonkoops March 9, 2026 12:31
Copy link
Contributor

@jonkoops jonkoops left a comment

Choose a reason for hiding this comment

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

Rather than having the validation action be responsible for correcting the information. We should instead be modifying the update-overlay action, which creates the PR, and should be able to determine the package versions.

This information should probably be passed into the action itself by the main workflow that triggers it, which should already have collected detailed information about the plugins.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 9, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
3 Security Hotspots

See analysis details on SonarQube Cloud

@nickboldt
Copy link
Member

nickboldt commented Mar 9, 2026

Added to https://issues.redhat.com/browse/RHIDP-12565 because there was no associated JIRA.

Later discovered https://issues.redhat.com/browse/RHIDP-12378

Comment on lines +575 to +579
const pluginVersions = {};
for (const plugin of workspace.plugins) {
pluginVersions[plugin.name] = plugin.version;
}
core.setOutput('plugin-versions', JSON.stringify(pluginVersions));
Copy link
Contributor

Choose a reason for hiding this comment

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

Considering we are likely to use other workspace metadata, we might consider simply passing in the entire workspace JSON.

@davidfestal @rostalan wdyt?

}

/** @type {{ repository: { metadataTree: { entries: Array<{name: string, object: {text: string} | null}> } | null } }} */
const metadataResponse = await github.graphql(`
Copy link
Contributor

Choose a reason for hiding this comment

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

We already run into problems with rate limiting at the moment, so it would be best to roll this up into the existing query, and then pass it along to the updateMetadataFiles() function as an argument. Let's also use a re-usable type for this.

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.

3 participants