We are making use of CIRCLE_COMPARE_URL to only run tests/build and deploy artifacts incrementally based on what changes. We use that on PRs but also when they get merged to master. What we have noticed now, it works fine when the build on master runs the first time, but if it fails due to some reason (network connectivity issue, wrong env variable, etc) and then we hit the button “rerun workflow” then CIRCLE_COMPARE_URL is empty and our pipeline passes without having built anything. It would be great if this variable can still be set on rerun so we can consistently test the same things in the same rerun build.
Any update/comment on this? This popping up every so often and a bit annoying whenever it happens.
This is also impacting our team.
Our use case is using it as a link to a diff of changes to include in a centralised log of deploys. This enables us to have a link to quickly see what changed with each deploy.
CIRCLE_PULL_REQUESTS cannot be used for this purpose since we are running workflows on all commits, not just PRs.