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

Combine upstream check & upgrade workflows #1110

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

danielrbradley
Copy link
Member

@danielrbradley danielrbradley commented Oct 28, 2024

Remove the chain of dependencies where we create issues then trigger the actual upgrade from the issue creation. We previously had to filter the triggered issue opening to a specific bot user to stop other issues created by external users from triggering the workflow.

Instead, we'll check for new versions then attempt the upgrade in a single run, as well as allowing the execution of a specific version upgrade via workflow_dispatch.

Scenarios:

  • If the cron triggers or a user runs the workflow without a version, it'll ensure an issue exists for the latest pending version and return the latest pending version in the latest_version output.
  • If latest_version is unset then we don't need to run the upgrade as there's no pending version.
  • If latest_version is set then we'll specifically attempt an upgrade to that version.
  • If a user runs the workflow with a version input, we'll skip creating issues and just attempt the upgrade.

This builds on the work in pulumi/upgrade-provider#282

Fixes #1108

Example run with no new changes: https://github.com/pulumi/pulumi-azure/actions/runs/11608904415/job/32325098437

@danielrbradley
Copy link
Member Author

Attempting to test this on the xyz provider: https://github.com/pulumi/pulumi-xyz/actions/runs/11556612896/job/32164701827

This fails due to the upstream provider having no published stable versions.

Remove the chain of dependencies where we create issues then trigger the actual upgrade from the issue creation. We previously had to filter the triggered issue opening to a specific bot user to stop other issues created by external users from triggering the workflow.

Instead, we'll check for new versions then attempt the upgrade in a single run, as well as allowing the execution of a specific version upgrade via workflow_dispatch.

Scenarios:

- If the cron triggers or a user runs the workflow without a version, it'll ensure an issue exists for the latest pending version and return the latest pending version in the `latest_version` output.
- If `latest_version` is unset then we don't need to run the upgrade as there's no pending version.
- If `latest_version` is set then we'll specifically attempt an upgrade to that version.
- If a user runs the workflow with a version input, we'll skip creating issues and just attempt the upgrade.

This builds on the work in pulumi/upgrade-provider#282
@danielrbradley danielrbradley force-pushed the combine-upstream-workflows branch from 983fec9 to 52deb35 Compare October 30, 2024 18:02
@danielrbradley danielrbradley marked this pull request as ready for review October 30, 2024 18:03
@danielrbradley danielrbradley requested a review from a team October 30, 2024 21:29
@ringods ringods self-requested a review October 31, 2024 07:47
Copy link
Contributor

@VenelinMartinov VenelinMartinov left a comment

Choose a reason for hiding this comment

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

Looks sensible. Can we test the workflow where there is an upstream provider upgrade available somewhere? Ideally we should make sure not to miss any of the upgrade issues as they are essential for visibility, reporting etc.

To make sure i understand the change - the upstream upgrade no longer depend on the upgrade issue, is that correct? Instead the upgrade issue is now purely informational but is still opened if the workflow is run via a cron job, right?

@danielrbradley
Copy link
Member Author

Looks sensible. Can we test the workflow where there is an upstream provider upgrade available somewhere? Ideally we should make sure not to miss any of the upgrade issues as they are essential for visibility, reporting etc.

Was testing this on OCI but Ian was too speedy getting the release done. It was looking mostly fine though having fixed up one bug in upgrade-provider.

To make sure i understand the change - the upstream upgrade no longer depend on the upgrade issue, is that correct? Instead the upgrade issue is now purely informational but is still opened if the workflow is run via a cron job, right?

Yup - any time the workflow is run without an explicit version input (including when run on a cron) it will open any required issues, then attempt to upgrade to the latest version.

@danielrbradley danielrbradley added this pull request to the merge queue Oct 31, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 31, 2024
Co-authored-by: Ian Wahbe <[email protected]>
@danielrbradley danielrbradley added this pull request to the merge queue Nov 1, 2024
Merged via the queue into master with commit 0125ed1 Nov 1, 2024
6 checks passed
@danielrbradley danielrbradley deleted the combine-upstream-workflows branch November 1, 2024 11:13
guineveresaenger added a commit that referenced this pull request Nov 4, 2024
This flag controls whether we generate the upgrade-provider Workflow. Some providers cannot currently be upgraded automatically, either because they are archived upstream, or because their licensing conflicts with ours.

Followup for some logic that was lost in #1110.
github-merge-queue bot pushed a commit that referenced this pull request Nov 4, 2024
This flag controls whether we generate the upgrade-provider Workflow.
Some providers cannot currently be upgraded automatically, either
because they are archived upstream, or because their licensing conflicts
with ours.

Followup for some logic that was lost in
#1110.
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.

Restructure upgrade provider process
5 participants