getsentry / action-visual-snapshot

Save and compare your visual snapshots
MIT License
38 stars 7 forks source link

feat: Support running diffs against prior commits of the same branch #67

Closed armenzg closed 2 years ago

armenzg commented 2 years ago

This is in order to support running Visual Snapshots on the commits on Sentry's master branch rather than on PRs in order to reduce load.

This project will also require running VS on-demand for PRs but it's separate work from this PR.

armenzg commented 2 years ago

This shows a PR run that did not regress with this change: https://github.com/getsentry/sentry/runs/6835937666?check_suite_focus=true#step:3:80

Run getsentry/action-visual-snapshot@run-on-branches

armenzg commented 2 years ago

I have been able to get visual diffs for per-commit runs on this branch.

I forced a VS regression and I managed to approve it. See url.

You can see that it picked up the execute-vs-on-a-branch branch rather than master.

getArtifactsForBranchAndWorkflow - workflow:"acceptance.yml", branch:"execute-vs-on-a-branch"

https://github.com/getsentry/sentry/runs/6820293972?check_suite_focus=true#step:3:308

billyvg commented 2 years ago

I would say if we are going to turn this off for PRs then we should remove it completely. It won't have much purpose running only on master

armenzg commented 2 years ago

The idea is that we will still be able to run it on PRs on request.

The execution on master would help us know where a regression is introduced.

armenzg commented 2 years ago

Regardless if we end up changing the scheduling approach, this help me deal with changes that would require me to have another branch that pretends to be master.