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

Add landing page and upload vrt/aat reports to GitHub Pages #5499

Merged
merged 58 commits into from
Jan 10, 2025

Conversation

hussam-i-am
Copy link
Contributor

@hussam-i-am hussam-i-am commented Jan 6, 2025

Changelog

New

Changed

  • Moved VRT/AAT workflow jobs into their own files and out of ci.yml
  • Converted VRT/AAT workflow jobs into reusable workflows that get run as part of the deploy_preview.yml
  • Downloads VRT/AAT reports to reside next to storybook
  • Adds deployments for each report

Deployments

  • Adds index page that links storybook and reports

Preview Page

Removed

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Workflow updates, nothing to roll out

Testing & Reviewing

Merge checklist

@hussam-i-am hussam-i-am self-assigned this Jan 6, 2025
Copy link

changeset-bot bot commented Jan 6, 2025

⚠️ No Changeset found

Latest commit: cc826c1

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

@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Jan 6, 2025
Copy link
Contributor

github-actions bot commented Jan 6, 2025

👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks!

Copy link
Contributor

github-actions bot commented Jan 6, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 104.18 KB (0%)
packages/react/dist/browser.umd.js 104.52 KB (0%)

@github-actions github-actions bot temporarily deployed to storybook-preview-5499 January 6, 2025 21:34 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-5499 January 6, 2025 21:37 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-5499 January 6, 2025 21:51 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-5499 January 6, 2025 22:15 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-5499 January 6, 2025 23:23 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-5499 January 7, 2025 17:33 Inactive
@github-actions github-actions bot temporarily deployed to vrt-all-flags-5499 January 9, 2025 19:51 Inactive
@github-actions github-actions bot temporarily deployed to aat-all-flags-5499 January 9, 2025 19:51 Inactive
@hussam-i-am hussam-i-am marked this pull request as ready for review January 9, 2025 20:01
@hussam-i-am hussam-i-am requested a review from a team as a code owner January 9, 2025 20:01
@hussam-i-am hussam-i-am requested a review from joshblack January 9, 2025 20:01
@hussam-i-am hussam-i-am changed the title Add preview page Add preview page and upload vrt/aat reports to GitHub Pages Jan 9, 2025
@hussam-i-am hussam-i-am changed the title Add preview page and upload vrt/aat reports to GitHub Pages Add landing page and upload vrt/aat reports to GitHub Pages Jan 9, 2025
Copy link
Contributor

@langermank langermank left a comment

Choose a reason for hiding this comment

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

This makes me so happy I could cry 😂 the days of downloading VRT reports are over!

I would wait to merge until someone from eng reviews, but from a user perspective I APPROVE

Copy link
Member

@joshblack joshblack left a comment

Choose a reason for hiding this comment

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

Thanks so much for doing this! 🥳 Just left a question to get your take on it, curious to hear what you say 👀

Copy link
Member

Choose a reason for hiding this comment

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

Just thinking out loud, would it be possible for the required jobs to stay in the ci workflow and then have deploy_preview's trigger be workflow_run? Then we could use that deploy_preview workflow to download artifacts from the CI workflow that we would like to host/deploy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can give that a try. I think I was initially trying to avoid deploy_preview from waiting for ci and parallelize the reports running to run but it probably won't have a significant impact of time. Also it would minimize the changes being made at this point.

@joshblack
Copy link
Member

Also, super random, but do you happen to know what permissions we need to clean up old environments/deployments? 👀 I remember trying to look into this in the past but couldn't figure it out and was curious if you knew. This is starting to come up more once we started having two deployments per-PR and since we're not removing any of them our list of environments is getting very long 😅

@hussam-i-am
Copy link
Contributor Author

Also, super random, but do you happen to know what permissions we need to clean up old environments/deployments? 👀 I remember trying to look into this in the past but couldn't figure it out and was curious if you knew. This is starting to come up more once we started having two deployments per-PR and since we're not removing any of them our list of environments is getting very long 😅

I looked at it briefly and came across https://github.com/strumwolf/delete-deployment-environment. I was thinking we could potentially run a workflow when I PR is closed/merged to delete the envs for that PR.

@hussam-i-am
Copy link
Contributor Author

@joshblack It doesnt look like deploy_preview is being triggered after CI finishes running. Am I missing something?

@joshblack
Copy link
Member

@hussam-i-am oh you're totally right, the event right now is pull_request but was just asking about workflow_run as the trigger, e.g.

name: Deploy Preview
on:
  workflow_run:
    workflows: [ci]
    types:
      - completed

@hussam-i-am
Copy link
Contributor Author

Yeah I updated deploy_preview to use workflw_run instead of pull_request but movie thhings back into ci.yml. ci runs but deploy_preview is not being run when it completes.

@joshblack
Copy link
Member

Ohhh, sorry @hussam-i-am! Totally misunderstood you, my bad 👍

I think workflow_* events will only run off of the workflow in main so we would need to merge it to see.

Comment on lines +31 to +50
- name: Download VRT reports (All flags enabled)
uses: actions/download-artifact@v4
with:
name: vrt-all-flags
path: docs/public/vrt-all-flags
- name: Download VRT reports (No flags enabled)
uses: actions/download-artifact@v4
with:
name: vrt-no-flag
path: docs/public/vrt-no-flag
- name: Download AAT reports (All flags enabled)
uses: actions/download-artifact@v4
with:
name: axe-all-flags
path: docs/public/aat-all-flags
- name: Download AAT reports (No flags enabled)
uses: actions/download-artifact@v4
with:
name: axe
path: docs/public/aat-no-flag
Copy link
Member

Choose a reason for hiding this comment

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

For actions/download-artifact, would we need to pass along run-id to these in order to download from the CI workflow? My assumption is that these try to download from the current workflow but let me know if that's incorrect

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That was also my assumption and they seem to be updating correctly on each run

@hussam-i-am hussam-i-am added this pull request to the merge queue Jan 10, 2025
Merged via the queue into main with commit 5a6d7bb Jan 10, 2025
38 of 39 checks passed
@hussam-i-am hussam-i-am deleted the hussam-i-am/preview-page branch January 10, 2025 19:26
@hussam-i-am hussam-i-am mentioned this pull request Jan 10, 2025
13 tasks
joshblack added a commit that referenced this pull request Jan 13, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jan 13, 2025
* Revert "Fix Prod Storybook deployment (#5535)"

This reverts commit 8b96591.

* Revert "fix: deploy_preview workflow (#5529)"

This reverts commit be42cc6.

* Revert "Fixing deploy_preview workflow (#5526)"

This reverts commit 62353f2.

* Revert "Remove branch from preview_deploy.yml (#5523)"

This reverts commit e2075bd.

* Revert "Add landing page and upload vrt/aat reports to GitHub Pages (#5499)"

This reverts commit 5a6d7bb.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants