-
Notifications
You must be signed in to change notification settings - Fork 75
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
[1.7.0] CircleCI API 404 response kills the job #79
Comments
I have the same problem 👆 |
Same problem here... |
If you're looking for a workaround, you can pull the script directly into your CircleCI For example:
|
@davet1985 thanks for report and PR. I'm not clear though why a workflow declared by a running job would not exist when queried. And if it doesn't, it indicates faulty data to make a decision on. Do you have any insight on the underlying cause? |
Hey @eddiewebb
This is what I've been trying to figure out since two days ago. From my side, that problem started on 04/26, when CircleCI apparently released a new update: https://circleci.com/changelog/#updated-cli-commands-for-private-orbs Don't know if it can help. |
Hi @eddiewebb, I totally agree, it's very strange behaviour from CircleCI and no I don't have any insight on why it's happening, but it certainly seems to be affecting multiple people. Possibly a bug in a new release of CircleCI's API?! I am seeing the same issue when I call the API manually. The change to the code makes it slightly more defensive when a 404 response is found. |
…ures (#24843) See: eddiewebb/circleci-queue#79. (cherry picked from commit 8cb02be)
We've also experienced this issue, and in my research I found a very old job from 2019 stuck in the Anyway, I was able to cancel this old job by calling the API directly and unblock our deployment pipeline. First, find out if there're some old jobs stuck in running state on your deploy branch and make note of their
and cancel those builds via Cancel a build API:
|
@nebolsin same here, had a stuck job from November 2019, appreciate the command |
@nebolsin thanks very much for sharing this, I found two workflows stuck which I have been able to cancel. |
@nebolsin thank you! I was just about tp point out the missing workflow seems to be much older -- was AT LEAST older than 1 week
And so I suspect we must have a retention period issue on the workflow side. I will raise this internally but it seems like the right "fix" is to address hanging builds. Would it make sense to still allow the orb to be tolerant of 404, I think only for workflow and perhaps even a trivial date check... @davet1985 - is your org using the new retention policy controls? |
@nebolsin , @asselinpaul , @davet1985 - did any of you happen to know for those stuck jobs if the workflow was in fact missing? I would love a JOB id to debug. |
@eddiewebb those all seem to be set to the defaults. |
@eddiewebb I agree that the root cause here is CircleCI still reporting running jobs, even though their workflows are no longer accessible. Unfortunately, in my case it's a private project, so I cannot help with a job id. I checked our last successful deploy before this issue manifested itself was on
And the first problematic deploy was on
You can see that the API call for the exact same workflow now results in an error, and I checked it manually via curl — it definitely was 404 (in fact, I can still get this old job details both via API v1: Single job and API v2: Get job details endpoints, and I still get 404 when trying to access it's workflow). |
Ok, got some results that bring clarity.
I'm not on the team that control's those decisions, so I am happy to convey feedback but encourage anyone impacted to raise a support ticket or vote on ideas.circleci.com related to it. |
I believe changes recently went live restricting data in the recent-builds API that will prevent this specific scenario from occurring. I am going to close this issue currently unless anybody does see it still, or @nebolsin 's fix (#79 (comment)) does not address the stale data from hung jobs. Thank you all for the contribution and discussion. |
In my case I still had to cancel a workflow that was "stuck in running state" from 2019. After that, all seems fine (for now) |
Orb version
1.7.0
What happened
The job exited unexpectedly upon receiving a 404 from the CircleCI API when making a call to get a workflow.
Full job logs
Expected behavior
If the workflow is not found, it should be ignored and the process should continue onto the next workflow to check.
The text was updated successfully, but these errors were encountered: