Skip to content

ci: deploy vrts on main branch correctly #5569

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
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

TarunAdobe
Copy link
Contributor

@TarunAdobe TarunAdobe commented Jun 25, 2025

Description

Updated CircleCI configuration to ensure Visual Regression Test (VRT) results are properly deployed to Azure blob storage when running on the main branch, not just on pull requests.

Motivation and context

Previously, VRT results were only being deployed for pull requests, but main branch VRT runs were not being deployed to the preview site. This made it difficult to access and review VRT results from main branch builds, which are important for baseline comparisons and debugging.

Related issue(s)

  • Internal CI/CD improvement for VRT workflow

Screenshots (if appropriate)

N/A


Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices
  • I have added automated tests to cover my changes.
  • I have included a well-written changeset if my change needs to be published.
  • I have included updated documentation if my change required it.

Reviewer's checklist

  • Includes a Github Issue with appropriate flag or Jira ticket number without a link
  • Includes thoughtfully written changeset if changes suggested include patch, minor, or major features
  • Automated tests cover all use cases and follow best practices for writing
  • Validated on all supported browsers
  • All VRTs are approved before the author can update Golden Hash

Manual review test cases

  • VRT deployment should work on main branch

    1. Pushed a test commit to this branch to send vrts to /main path if the branch name matches. check this.
    2. vrts are then deployed against /main path suggesting checking for branch name worked. verify the output of this job.
    3. Verify VRT results are deployed to https://swcpreviews.z13.web.core.windows.net/main/express-dark-large-rtl/review/

Device review

  • Did it pass in Desktop?
  • Did it pass in (emulated) Mobile?
  • Did it pass in (emulated) iPad?

@TarunAdobe TarunAdobe requested a review from a team as a code owner June 25, 2025 15:28
Copy link

changeset-bot bot commented Jun 25, 2025

⚠️ No Changeset found

Latest commit: 34210b0

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

Copy link

github-actions bot commented Jun 25, 2025

📚 Branch Preview

🔍 Visual Regression Test Results

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

Deployed to Azure Blob Storage: pr-5569

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

Copy link

Tachometer results

Currently, no packages are changed by this PR...

@Rajdeepc
Copy link
Contributor

@TarunAdobe How can i verify this? can you create a section on what was the issue and what is the fix for the context?

@TarunAdobe
Copy link
Contributor Author

@TarunAdobe How can i verify this? can you create a section on what was the issue and what is the fix for the context?

Yusss!! will do

# Get PR number from CircleCI environment
PR_NUMBER=""
if [ -n "$CIRCLE_PULL_REQUEST" ]; then
PR_NUMBER=$(echo $CIRCLE_PULL_REQUEST | sed 's/.*\/pull\///')
Copy link
Contributor

@Rajdeepc Rajdeepc Jun 26, 2025

Choose a reason for hiding this comment

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

Suggested change
PR_NUMBER=$(echo $CIRCLE_PULL_REQUEST | sed 's/.*\/pull\///')
PR_NUMBER=$(echo "$CIRCLE_PULL_REQUEST" | sed 's/.*\/pull\///')

Unquoted variables can break if they contain spaces or special characters

@TarunAdobe
Copy link
Contributor Author

@TarunAdobe How can i verify this? can you create a section on what was the issue and what is the fix for the context?

Added a test commit to verify that checking for branch name works.
Read the testing description now and it should work

@TarunAdobe TarunAdobe requested a review from Rajdeepc June 27, 2025 06:19
@rubencarvalho
Copy link
Contributor

Maybe a bit outside the initial scope of this task, but I just noticed https://swcpreviews.z13.web.core.windows.net/beta/docs/ does not load correctly. Is it something we could take a look at in this PR?

if [ -n "$PR_NUMBER" ]; then
echo "Deploying VRT for PR #$PR_NUMBER (via GitHub API)"
# Set deployment path based on branch
if [ "$CIRCLE_BRANCH" = "ttomar/vrts-main" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Forgive my intruding if this is still in testing but is this meant to be committed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not meant to be committed at all. would remove when somebody will approve the pr

Copy link
Contributor

@Rajdeepc Rajdeepc left a comment

Choose a reason for hiding this comment

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

nit: As @rubencarvalho suggested if you want to have the beta/docs rectified here its nice to have or else let's create a follow up PR and add an effort. Looks good. Thanks for doing it.

@TarunAdobe
Copy link
Contributor Author

nit: As @rubencarvalho suggested if you want to have the beta/docs rectified here its nice to have or else let's create a follow up PR and add an effort. Looks good. Thanks for doing it.

already done heehhe

@Rajdeepc Rajdeepc added ready-for-merge Will auto-update until merged ready-for-review and removed ready-for-merge Will auto-update until merged labels Jul 7, 2025
Copy link
Contributor

@rubencarvalho rubencarvalho left a comment

Choose a reason for hiding this comment

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

🚢

@caseyisonit
Copy link
Contributor

Can you share what the skipped check is doing? or why its skipped?

@TarunAdobe
Copy link
Contributor Author

Can you share what the skipped check is doing? or why its skipped?

skipped check is to clean up PR deployments from azure blob storage. it only runs once the pr is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants