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

Restructure upgrade provider process #1108

Closed
danielrbradley opened this issue Oct 24, 2024 · 0 comments · Fixed by #1110
Closed

Restructure upgrade provider process #1108

danielrbradley opened this issue Oct 24, 2024 · 0 comments · Fixed by #1110
Assignees
Labels
kind/enhancement Improvements or new features resolution/fixed This issue was fixed

Comments

@danielrbradley
Copy link
Member

Aim

Remove triggering of upgrade PR creation on the issue creation.

Problem

Triggering of the PR creation off the issue creation requires limiting to issues created by a known user to avoid accidental triggering. This has to be a real GitHub user and not a workflow user which is then not easy to set up for third parties.

Solution

  1. Have a single workflow which is triggered on a schedule.
  2. If a new version exists, ensure an issue exists for that version.
  3. Attempt to automatically open a PR.
@pulumi-bot pulumi-bot added the needs-triage Needs attention from the triage team label Oct 24, 2024
@danielrbradley danielrbradley added kind/enhancement Improvements or new features and removed needs-triage Needs attention from the triage team labels Oct 25, 2024
github-merge-queue bot pushed a commit that referenced this issue Nov 1, 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

---------

Co-authored-by: Ian Wahbe <[email protected]>
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants