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

Open Update PRs prevent newer PRs from being opened #5958

Open
iwahbe opened this issue Nov 12, 2024 · 1 comment
Open

Open Update PRs prevent newer PRs from being opened #5958

iwahbe opened this issue Nov 12, 2024 · 1 comment
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@iwahbe
Copy link
Member

iwahbe commented Nov 12, 2024

Description

The workflow to detect existing PRs only checks if there is an update PR for the provider. It does not check that the upstream PR corresponds to the latest upstream version of the provider.

That means that if an update PR fails and isn't closed, it will block future updates to that provider, even ones that would succeed. Examples of that blocking include:

Work-around

The work-around is to close upgrade PRs as soon as they fail. This is annoying as genuine failures (an invalid release) will be re-opened every day (and must be closed every day). The alternative is to let providers get stale once they get stuck once, so we should close failed PRs.

Solution

Our tooling should be robust to bad versions, closing outdated PRs and opening new ones as necessary. I propose the following algorithm for updating metadata:

  1. Get the latest version of a provider (published upstream)
  2. Get the version of a provider (published in our registry)
  3. If these match, return
  4. If they don't match, scan for PRs (by @pulumi-bot) of the form "^Publish Package Metadata <provider>@.*$".
  5. If no PR exists of the form "^Publish Package Metadata <provider>@<target-version>$", open it.
  6. Close all other PRs for that provider, marking them as closed in favor of the current PR.

This algorithm has the following properties, all of which I believe are necessary:

  • A PR is raised for each new upstream release, regardless of prior state.
  • Only one PR is raised per upstream release, unless the prior PR was closed.
  • All providers that are not up to date will have an outstanding PR, regardless of prior state.
  • When a provider is up to date, there will be no outstanding PRs.
@iwahbe iwahbe added the kind/bug Some behavior is incorrect or out of spec label Nov 12, 2024
@pulumi-bot pulumi-bot added the needs-triage Needs attention from the triage team label Nov 12, 2024
@github-project-automation github-project-automation bot moved this to 🤔 Triage in Docs 📚 Nov 12, 2024
@iwahbe
Copy link
Member Author

iwahbe commented Nov 12, 2024

Implementing the solution described here will also fix the problem described in #4025.

@mjeffryes mjeffryes removed the needs-triage Needs attention from the triage team label Nov 13, 2024
@thoward thoward removed this from Docs 📚 Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

3 participants