Skip to content

Conversation

@Valkyrie00
Copy link
Contributor

Problem

The datetime.strptime() call was outside the try/except block, meaning that annotation lines with valid separators but malformed timestamps would crash the script instead of being skipped gracefully.

Example of problematic input:
15-01-2024 10:30:00,123 | PLAY [Deploy]

This line would pass the split(" | ") but fail strptime() with an unhandled ValueError.

Solution

  • Move datetime.strptime() inside the existing try/except block
  • Add TypeError to handled exceptions for additional robustness

Testing

Verified exception behavior with various malformed inputs locally

Move datetime.strptime() call inside try/except block to properly
catch parsing errors. Also add TypeError to handled exceptions for
robustness against unexpected input types.

Signed-off-by: Vito Castellano <[email protected]>
@Valkyrie00 Valkyrie00 self-assigned this Jan 7, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 7, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from valkyrie00. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@amartyasinha amartyasinha enabled auto-merge (rebase) January 7, 2026 09:49
@softwarefactory-project-zuul
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/3ffd2b4cb0d94b839731b903ace420fe

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 21m 45s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 25m 06s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 34m 15s
cifmw-crc-podified-edpm-baremetal-minor-update FAILURE in 2h 06m 23s
✔️ cifmw-pod-zuul-files SUCCESS in 4m 38s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 50s
✔️ cifmw-pod-pre-commit SUCCESS in 8m 01s
✔️ cifmw-molecule-pcp_metrics SUCCESS in 2m 09s

@Valkyrie00
Copy link
Contributor Author

recheck

@amartyasinha amartyasinha merged commit 2faf781 into openstack-k8s-operators:main Jan 7, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants