Skip to content

ci: use gh cli in ci-router to dispatch worker/api/shared jobs #234

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

matt-codecov
Copy link
Collaborator

two things:

  • as-is, we are limited to 20 nested workflow calls shared between ci-router.yml, worker-ci.yml, api-ci.yml, and shared-ci.yml. i think by using the gh cli to invoke worker/api/shared CI, we sidestep that limit and api/shared/worker each get their own limit of 20 to work with.
  • push-stage.yml is also moved back inside worker-ci.yml and api-ci.yml. any push to staging should now result in a deploy of that commit for both worker and api.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Copy link

seer-by-sentry bot commented Jun 13, 2025

Sentry detected 1 potential issue in your recent changes

Suspicion of a critical bug: The new `gh workflow run` commands lack error handling, causing the CI pipeline to fail unexpectedly on transient issues like API errors, potentially blocking deployments.
  • Description: The analysis indicates that the gh workflow run commands used to dispatch sub-workflows lack explicit error handling. Due to the default set -e behavior in GitHub Actions bash shells, any non-zero exit code from these commands will immediately fail the step and the entire job. This means that transient issues, such as GitHub API rate limits, network problems, or GitHub CLI panics, which are realistic operational concerns, will cause the CI router workflow to fail unexpectedly. This failure blocks the entire CI pipeline, preventing subsequent steps like PR merges and deployments, effectively crashing the build process for that commit. The specific code paths affected are the steps executing gh workflow run for api-ci.yml, worker-ci.yml, and shared-ci.yml. For instance, if the GitHub API returns a rate limit error (resulting in a non-zero exit code) when attempting to dispatch api-ci.yml, the dispatch-api-ci job will fail immediately. This represents a reduction in robustness compared to the previous workflow_call approach, which had built-in retry/error handling mechanisms.
  • Code location: .github/workflows/ci-router.yml:86~93
  • Suggested fix: Add error handling to the gh workflow run commands, such as using || true or implementing retry logic, to prevent transient failures from crashing the entire CI workflow.

Did you find this useful? React with a 👍 or 👎

@matt-codecov matt-codecov force-pushed the matt/ci-refactor branch 4 times, most recently from 2072345 to 9844438 Compare June 13, 2025 20:11
@codecov-notifications
Copy link

codecov-notifications bot commented Jun 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Copy link

codecov bot commented Jun 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.20%. Comparing base (f700797) to head (52adf08).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #234   +/-   ##
=======================================
  Coverage   94.20%   94.20%           
=======================================
  Files        1214     1214           
  Lines       45036    45036           
  Branches     1434     1434           
=======================================
  Hits        42424    42424           
  Misses       2309     2309           
  Partials      303      303           
Flag Coverage Δ
apiunit 96.46% <ø> (ø)
sharedintegration 39.73% <ø> (ø)
sharedunit 88.11% <ø> (ø)
workerintegration 61.61% <ø> (ø)
workerunit 90.62% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

codspeed-hq bot commented Jun 13, 2025

CodSpeed Performance Report

Merging #234 will not alter performance

Comparing matt/ci-refactor (52adf08) with main (ea75610)

Summary

✅ 9 untouched benchmarks

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.

1 participant