fix: add fallback to master for test-controller action#109
fix: add fallback to master for test-controller action#109probelabs[bot] wants to merge 2 commits intomainfrom
Conversation
|
This PR enhances the Additionally, the script's error handling has been improved. It now captures the HTTP status code and response body separately, ensuring that only valid configurations are written to the action's output and preventing server error pages from corrupting the CI process. Files Changed Analysis
Architecture & Impact Assessment
graph TD
A[Start Action] --> B{"Fetch config for current branch ($BASE_REF)"};
B -->|Success (HTTP 200)| C[Use branch config];
B -->|Not Found (HTTP 404)| D{"Fallback: Fetch config for 'master' branch"};
D -->|Success (HTTP 200)| E["Use 'master' config"];
D -->|Failure (HTTP >= 400)| F[Fail pipeline];
C --> G[End];
E --> G[End];
F --> G[End];
Scope Discovery & Context Expansion
Metadata
Powered by Visor from Probelabs Last updated: 2026-04-09T08:57:24.487Z | Triggered by: pr_updated | Commit: ae368f6 💡 TIP: You can chat with Visor using |
Security Issues (3)
Performance Issues (1)
Powered by Visor from Probelabs Last updated: 2026-04-09T08:56:23.512Z | Triggered by: pr_updated | Commit: ae368f6 💡 TIP: You can chat with Visor using |
…sed on HTTP 404 status
Problem / Task
When fetching test configuration from TUI, if the branch is not explicitly defined, it returns a 404 and the pipeline fails. We need to implement a client-side fallback to retry fetching the configuration using
masteras the base branch.Changes
.github/actions/tests/test-controller/action.yamlto implement a fallback mechanism based on HTTP 404 status code.curlrequest for$BASE_REFreturns a 404, it retries withmasteras the base branch.curloutput correctly to prevent appending a 404 HTML body to$GITHUB_OUTPUT.Testing
masterwhen the current branch is not found.