CIRCLE_COMPARE_URL empty on workflow rerun

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.

We try to run jobs conditionally based on changes on push. Empty compare url on workflow rerun makes this approach completely unreliable. Can you please give us some information about the status of this issue?

I believe that CircleCI are happy to receive bug reports by email now. Ping them on - I expect that would create a ticket.

If someone in this thread does create a ticket, please add updates here for the benefit of other users.

@mpadourek Does it work at all for workflows (not single builds)?

Another thread is suggesting (I have the same issue) that CIRCLE_COMPARE_URL is always empty in a workflow execution.

CIRCLE_COMPARE_URL is empty when running a workflow job

This is a known limitation with the way we handle Workflows.

We are looking to resolve it, but the Orb provides a usable workaround in most cases. Please let us know if this doesn’t help in your case.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.