Skip to content

Gracefully handle failure from suite API calls#10

Open
malclocke wants to merge 1 commit into
mainfrom
te-6046-gracefully-handle-failure-from-tests-buildkite-plugin
Open

Gracefully handle failure from suite API calls#10
malclocke wants to merge 1 commit into
mainfrom
te-6046-gracefully-handle-failure-from-tests-buildkite-plugin

Conversation

@malclocke
Copy link
Copy Markdown
Contributor

Summary

Fixes TE-6046.

  • When GET /suites/:id returns an unexpected status (not 200/401/404), emit a warning and continue rather than exiting with 1
  • When POST /suites/create_from_pipeline fails (not 200/201), emit a warning and continue rather than exiting with 1
  • Both cases still log the HTTP status and response message (existing behaviour in get_suite/create_suite), then add a warning that the job is proceeding

Test plan

  • Two new bats tests cover each failure path — both assert success and check for the Warning: string
  • All 10 tests pass locally (make test)

🤖 Generated with Claude Code

When GET /suites/:id or POST /suites/create_from_pipeline return an
unexpected status, emit a warning and let the job proceed rather than
exiting with 1. Tests and env vars are still configured; only result
upload may be affected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@malclocke malclocke marked this pull request as ready for review June 4, 2026 21:56
@malclocke malclocke requested a review from a team as a code owner June 4, 2026 21:56
Copy link
Copy Markdown
Contributor

@nprizal nprizal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thid looks good! However, if the suite creation fails, the OIDC token won’t authenticate because the suite doesn’t exist and bktec doesn’t handle that exception gracefully. We might need to update the bktec / test plan API to manage this situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants