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

Introduce demo cleanup action #3025

Merged
merged 1 commit into from
Aug 23, 2024
Merged

Introduce demo cleanup action #3025

merged 1 commit into from
Aug 23, 2024

Conversation

camertron
Copy link
Contributor

@camertron camertron commented Aug 22, 2024

Authors: Please fill out this form carefully and completely.

Reviewers: By approving this Pull Request you are approving the code change, as well as its deployment and mitigation plans.
Please read this description carefully. If you feel there is anything unclear or missing, please ask for updates.

What are you trying to accomplish?

This PR introduces an Actions workflow that cleans up old preview environments. We delete preview envs automatically when PRs are closed or merged, but we still had a number of old ones hanging around, ostensibly from before we implemented the auto-delete Action. These old preview envs were getting flagged by our automated security tooling. I tried to delete them manually via the Azure console but didn't have permission (what a surprise), so I decided to put in the effort to create this cleanup Action. It runs at 12 noon every day (5am PT).

Integration

No changes necessary in production.

Risk Assessment

  • Low risk the change is small, highly observable, and easily rolled back.
  • Medium risk changes that are isolated, reduced in scope or could impact few users. The change will not impact library availability.
  • High risk changes are those that could impact customers and SLOs, low or no test coverage, low observability, or slow to rollback.

Accessibility

  • No new axe scan violation - This change does not introduce any new axe scan violations.

Copy link

changeset-bot bot commented Aug 22, 2024

⚠️ No Changeset found

Latest commit: e298262

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@camertron camertron added the skip changeset Pull requests that don't change the library output label Aug 22, 2024
@camertron camertron marked this pull request as ready for review August 22, 2024 18:40
@camertron camertron requested a review from a team as a code owner August 22, 2024 18:40
Copy link

@francinelucca francinelucca left a comment

Choose a reason for hiding this comment

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

LGTM! deferring final approval to @jonrohan

@jonrohan
Copy link
Member

There's another workflow that's trying failing at doing this, can you delete that one also https://github.com/primer/view_components/blob/8a16336d254321f43969c9ed5b72861dc4c53c2e/.github/workflows/demo-preview-destroy.yml

@camertron
Copy link
Contributor Author

@jonrohan I think it makes sense to keep both workflows. From what I've been able to tell, the demo-preview-destroy workflow is working as expected - we would have had a lot more old preview environments lying around if it had been failing. Almost all the ones I saw in the Azure console were quite old, probably created before we wrote that destroy Action.

This cleanup Action is really just a safeguard in case the destroy Action fails occasionally.

@camertron camertron merged commit d39b4c1 into main Aug 23, 2024
40 of 41 checks passed
@camertron camertron deleted the demo_preview_cleanup branch August 23, 2024 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changeset Pull requests that don't change the library output
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants