Skip to content

chore(ci): gh action to run a daily check for upstream required upgrade#106

Merged
ocobles merged 4 commits into
mainfrom
check-upstream-upgrade
Jul 17, 2024
Merged

chore(ci): gh action to run a daily check for upstream required upgrade#106
ocobles merged 4 commits into
mainfrom
check-upstream-upgrade

Conversation

@ocobles

@ocobles ocobles commented Jul 16, 2024

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Oscar Cobles <oscar.cobles@eu.equinix.com>
@github-actions

Copy link
Copy Markdown

Does the PR have any schema changes?

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Maintainer note: consult the runbook for dealing with any breaking changes.

Signed-off-by: Oscar Cobles <oscar.cobles@eu.equinix.com>
Comment thread .github/workflows/check-upstream-upgrade.yml Outdated
Signed-off-by: Oscar Cobles <oscar.cobles@eu.equinix.com>
@ctreatma

ctreatma commented Jul 16, 2024

Copy link
Copy Markdown
Contributor

It would be nice to have a more event-driven upgrade approach here. We have a workflow in the Terraform provider repo to open an issue on this repo when a release happens: https://github.com/equinix/terraform-provider-equinix/blob/main/.github/workflows/pulumi.yml

I see that that's failing due to SAML issues but there may be a way to resolve that since this repo is public and I can list issues in the UI without even logging in. That said, it's possible that GitHub protections around automated token access (GitHub Actions that run with the automated token can't trigger other GitHub Actions) would still be a problem.

If we stick with the scheduled check we should remove the Pulumi workflow from the Terraform provider repo. IMO we could also do more frequent checks since this workflow should be fairly lightweight.

Another option to consider is if we could somehow make Renovate aware of this dependency and have it open the upgrade PR for us the way it does for other dependencies.

@ocobles

ocobles commented Jul 16, 2024

Copy link
Copy Markdown
Contributor Author

@ctreatma yes, the idea is to remove the action from the Terraform repository because I actually see that even fixing it can bring more authentication problems in the future. The tool https://github.com/pulumi/upgrade-provider integrates well with the make tfgen / make build_sdks processes as well as the upstream provider patching, so it cannot be replaced with renovate

Signed-off-by: Oscar Cobles <oscar.cobles@eu.equinix.com>
@ocobles

ocobles commented Jul 16, 2024

Copy link
Copy Markdown
Contributor Author

@ctreatma I have updated the cron to run every 8 hours Monday through Friday. Let's see how it works this way and if we need to update it in the future

@ctreatma

Copy link
Copy Markdown
Contributor

Renovate can be configured to run additional commands after updating a dependency version number, so it could theoretically run those make tasks, but a scheduled job works too and requires less configuration. Checking every 8 hours sounds like a good compromise.

- name: Run upgrade-provider upstream check
id: upstream_version
run: |
upgrade-provider "$REPO" --kind=check-upstream-version

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just to confirm: the upgrade-provider command runs all necessary make tasks & patches and then opens a GitHub PR with the resulting changes?

@ocobles ocobles Jul 16, 2024

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

exactly. This action executes it with kind=check-upstream-version, If a change is detected, it will create a new issue with the title "Upgrade terraform-provider-equinix to vX.Y.Z". That will trigger the upgrade-provider action

if: ${{ contains(github.event.issue.title, 'Upgrade terraform-provider-') || github.event_name == 'workflow_dispatch' }}
which internally also uses the upgrade-provider command but with the kind=all, this updates both the terraform provider, the bridge plugin and its dependencies

ctreatma pushed a commit to equinix/terraform-provider-equinix that referenced this pull request Jul 16, 2024
Replaced with in-repo gh action
equinix/pulumi-equinix#106

Signed-off-by: Oscar Cobles <oscar.cobles@eu.equinix.com>
@ocobles ocobles merged commit 3683639 into main Jul 17, 2024
@ocobles ocobles deleted the check-upstream-upgrade branch July 17, 2024 10:27
kpdhulipala pushed a commit to kpdhulipala/terraform-provider-equinix that referenced this pull request Mar 24, 2025
…#729)

Replaced with in-repo gh action
equinix/pulumi-equinix#106

Signed-off-by: Oscar Cobles <oscar.cobles@eu.equinix.com>
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