-
Notifications
You must be signed in to change notification settings - Fork 642
fix(circleci): CircleCI Workflow nil check for CreatedDate #8310
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
Conversation
Adds a nil check during `convertWorkflows` task when CircleCI workflows API returns a weird malformed pipeline data with no created_date. Previously, the entire task fails and panics when trying to get convert a nil in ToTime util. Fixes Issue apache#8309
| 1,89054eb2-8e85-4f5c-9a93-66d753a0e970,github/coldgust/coldgust.github.io,625ca634-68fe-4515-91f0-7ba8af51dc99,,say-hello-workflow,,,success,1c762fc2-b0fb-4fe2-97d2-5e54ddd1eba7,3,2023-03-25T17:39:23.000+00:00,2023-03-25T17:39:28.000+00:00,5 | ||
| 1,8971a56b-5547-4824-94dd-07bb467524c5,github/coldgust/coldgust.github.io,87aad008-1ad5-486a-8174-fdeed846561a,,say-hello-workflow,,,success,1c762fc2-b0fb-4fe2-97d2-5e54ddd1eba7,2,2023-03-25T17:12:18.000+00:00,2023-03-25T17:12:23.000+00:00,5 | ||
| 1,8fe60291-68f7-40e2-acec-d99bff4da713,github/coldgust/coldgust.github.io,afef32b3-5ffe-48d2-8d9e-46dcedd82554,,say-hello-workflow,,,success,1c762fc2-b0fb-4fe2-97d2-5e54ddd1eba7,1,2023-03-25T17:12:18.000+00:00,2023-03-25T17:12:22.000+00:00,4 | ||
| 1,b3b77371-e27a-4e93-a554-c728f757cd24,github/coldgust/coldgust.github.io,f5a2a6e8-4430-4935-8bec-77ca2b26c61d,,workflow,,,failed,,16,,,0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not clear to me if it's going to be OK or not for there to be NULL created_date columns in the _tool_circleci_workflows table later in the pipeline for processing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Local testing, so far, doesn't show any obvious issues with the NULL values in the database in the _tool tables.
|
LGTM, would you like to cherrypick it back to v1.0 by putting up another PR to the |
* fix(circleci): Add CircleCI workflow nil check for CreatedDate Adds a nil check during `convertWorkflows` task when CircleCI workflows API returns a weird malformed pipeline data with no created_date. Previously, the entire task fails and panics when trying to get convert a nil in ToTime util. Fixes Issue apache#8309 * Update to fix compile problems * Tweak the _tool csv to allow for the NULL value entries --------- Co-authored-by: John Ibsen <[email protected]>
|
Thanks for the merge! Cherry-pick ready now #8314 |
… check for CreatedDate (#8310) (#8314) * fix(circleci): CircleCI Workflow nil check for CreatedDate (#8310) * fix(circleci): Add CircleCI workflow nil check for CreatedDate Adds a nil check during `convertWorkflows` task when CircleCI workflows API returns a weird malformed pipeline data with no created_date. Previously, the entire task fails and panics when trying to get convert a nil in ToTime util. Fixes Issue #8309 * Update to fix compile problems * Tweak the _tool csv to allow for the NULL value entries --------- Co-authored-by: John Ibsen <[email protected]> * Update with latest updates in circleci plugin for createdAt --------- Co-authored-by: John Ibsen <[email protected]> Co-authored-by: Klesh Wong <[email protected]>
I have added relevant documentation.N/Apr-type/bug-fix,pr-type/feature-development, etc.Summary
Add a nil check on CreatedDate during convertWorkflows task for edge case malformed CircleCI workflow objects.
Does this close any open issues?
Closes #8309
Screenshots
N/A - See #8309 for JSON snippets from CircleCI API responses
Other Information
I need to run the test suite to get a failing test first, I'm not sure that this extra raw data will be enough to hit this workflow bug.