Skip to content

ci: capture pytest exit codes and build test-status.json per label - #536

Merged
CagriYonca merged 2 commits into
masterfrom
currency-update
Oct 23, 2026
Merged

CagriYonca merged 2 commits into
masterfrom
currency-update

Conversation

@CagriYonca

@CagriYonca CagriYonca commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Why

The update-currency-versions job could start before the sibling test workflows and their auto-reruns had finished. It also stopped on the first failing library (set -e). As a result, rupy-currency-reporter could get incomplete dependency and test-status data.

How

  • New .circleci/wait_for_workflows.sh waits for all sibling workflows (including auto-reruns) to finish before versions are collected. It skips the wait with a warning if CIRCLE_TOKEN is not set.
  • run_bundle_list_and_test no longer stops the job on a failure. A failed bundle install or rake test writes FAIL to the library's status file and the job moves on to the next library.
  • Tests run with APPRAISAL_INITIALIZED=1, so only the selected gemfile's tests run.
  • update-currency-versions combines the per-library results into bundle-list/test-status.json ({"<library>": "fail"}; libraries that aren't listed passed). The file is published next to installed_*.txt.
  • The core workflow now uses requires: <job>: terminal, so the job runs whether the upstream jobs pass or fail.
  • The job now runs on Ruby 3.4 instead of 4.0 and installs jq and curl.

Verification

  • Checked that installed_*.txt, per-library status files and test-status.json are saved on both passing and failing runs.
  • Checked that the generated test-status.json works with rupy-currency-reporter (instana/rupy-currency-reporter#9).

@CagriYonca
CagriYonca requested a review from a team October 12, 2026 12:27
@CagriYonca CagriYonca self-assigned this Oct 12, 2026
@instana instana deleted a comment from github-actions Bot Oct 12, 2026
@instana instana deleted a comment from github-actions Bot Oct 12, 2026
@CagriYonca
CagriYonca force-pushed the currency-update branch 3 times, most recently from 30adaea to b56dac5 Compare October 13, 2026 08:27
@instana instana deleted a comment from github-actions Bot Oct 13, 2026
@instana instana deleted a comment from github-actions Bot Oct 13, 2026
@instana instana deleted a comment from github-actions Bot Oct 13, 2026
@instana instana deleted a comment from github-actions Bot Oct 13, 2026
@instana instana deleted a comment from github-actions Bot Oct 13, 2026
@instana instana deleted a comment from github-actions Bot Oct 13, 2026
@CagriYonca
CagriYonca marked this pull request as ready for review October 13, 2026 08:45
@CagriYonca CagriYonca added the ci label Oct 13, 2026
…ence

Signed-off-by: Cagri Yonca <cagri@ibm.com>
Comment thread .circleci/config.yml Outdated
executor:
name: base
ruby_version: "4.0"
ruby_version: "3.4"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a specific reason to change the ruby_version here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Grpc installation was failing in Ruby 4.0

-- C level backtrace information -------------------------------------------
/usr/local/lib/libruby.so.4.0(rb_print_backtrace+0x14) [0x7503990738ef] /usr/src/ruby/vm_dump.c:1108
/usr/local/lib/libruby.so.4.0(rb_vm_bugreport) /usr/src/ruby/vm_dump.c:1453
/usr/local/lib/libruby.so.4.0(rb_bug_for_fatal_signal+0x106) [0x750398e26846] /usr/src/ruby/error.c:1131
/usr/local/lib/libruby.so.4.0(sigabrt+0x42) [0x750398fa0fe2] /usr/src/ruby/signal.c:962
/lib/x86_64-linux-gnu/libc.so.6(0x750398933d70) [0x750398933d70]
/lib/x86_64-linux-gnu/libc.so.6(0x75039898869c) [0x75039898869c]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x12) [0x750398933c42]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x22) [0x75039891c4ac]
/root/project/gemfiles/vendor/bundle/ruby/4.0.0/gems/grpc-1.84.0-x86_64-linux-gnu/src/ruby/lib/grpc/4.0/grpc_c.so(0x75037b90cc28) [0x75037b90cc28]
/root/project/gemfiles/vendor/bundle/ruby/4.0.0/gems/grpc-1.84.0-x86_64-linux-gnu/src/ruby/lib/grpc/4.0/grpc_c.so(0x75037b90cff5) [0x75037b90cff5]
/root/project/gemfiles/vendor/bundle/ruby/4.0.0/gems/grpc-1.84.0-x86_64-linux-gnu/src/ruby/lib/grpc/4.0/grpc_c.so(0x75037b6c3ee1) [0x75037b6c3ee1]
/root/project/gemfiles/vendor/bundle/ruby/4.0.0/gems/grpc-1.84.0-x86_64-linux-gnu/src/ruby/lib/grpc/4.0/grpc_c.so(0x75037b7bcdc5) [0x75037b7bcdc5]
/root/project/gemfiles/vendor/bundle/ruby/4.0.0/gems/grpc-1.84.0-x86_64-linux-gnu/src/ruby/lib/grpc/4.0/grpc_c.so(0x75037b7be4dd) [0x75037b7be4dd]
/root/project/gemfiles/vendor/bundle/ruby/4.0.0/gems/grpc-1.84.0-x86_64-linux-gnu/src/ruby/lib/grpc/4.0/grpc_c.so(0x75037b732590) [0x75037b732590]
/root/project/gemfiles/vendor/bundle/ruby/4.0.0/gems/grpc-1.84.0-x86_64-linux-gnu/src/ruby/lib/grpc/4.0/grpc_c.so(0x75037b73489b) [0x75037b73489b]
/root/project/gemfiles/vendor/bundle/ruby/4.0.0/gems/grpc-1.84.0-x86_64-linux-gnu/src/ruby/lib/grpc/4.0/grpc_c.so(0x75037b73490d) [0x75037b73490d]
/usr/local/lib/libruby.so.4.0(RB_FL_TEST_RAW+0x0) [0x750398e453eb] gc/default/default.c:2874
/usr/local/lib/libruby.so.4.0(run_final) gc/default/default.c:2878
/usr/local/lib/libruby.so.4.0(finalize_list) gc/default/default.c:2908
/usr/local/lib/libruby.so.4.0(finalize_deferred_heap_pages) gc/default/default.c:2932
/usr/local/lib/libruby.so.4.0(rb_gc_impl_shutdown_call_finalizer+0x263) [0x750398e55446] gc/default/default.c:3097
/usr/local/lib/libruby.so.4.0(rb_objspace_call_finalizer) /usr/src/ruby/gc.c:1739
/usr/local/lib/libruby.so.4.0(rb_ec_finalize+0x19) [0x750398e348c9] /usr/src/ruby/eval.c:177
/usr/local/lib/libruby.so.4.0(rb_ec_cleanup) /usr/src/ruby/eval.c:268
/usr/local/lib/libruby.so.4.0(ruby_run_node+0x95) [0x750398e34bb5] /usr/src/ruby/eval.c:332
/usr/local/bin/ruby(rb_main+0x21) [0x5bb6c5cc5110] ./main.c:42
/usr/local/bin/ruby(main) ./main.c:62
/lib/x86_64-linux-gnu/libc.so.6(0x75039891dca8) [0x75039891dca8]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85) [0x75039891dd65]
[0x5bb6c5cc5151]

It works after switching to Ruby 3.4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we use some what like this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In libraries_ruby_34_40, excluding grpc for Ruby 4.0 still allows it to run on other Ruby versions because it's a matrix job.

However, update-currency-versions runs in a single environment to generate version artifacts for all 18 gems. If we run it on Ruby 4.0 and skip grpc, installed_grpc.txt won't be generated and grpc will be missing from the currency report entirely.

Since Ruby 3.4 is the latest stable release, running this job on 3.4 allows all 18 gems (including grpc) to be installed, tested, and tracked for currency without skipping anything.

@arjun-rajappa arjun-rajappa Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I have updated the PR with these changes. We can go ahead and proceed with Ruby 4.0 now since pre-built binaries are available and the tests are passing.

Just keeping in mind that whenever a new Ruby version drops (like 4.1 in the future), pre-compiled binaries for gems with native extensions like grpc might take some time to be released. If we run into native compilation hitting CircleCI memory/killed limits again down the road, we can always re-add this exclusion until binaries are published.

Update the update-currency-versions job to Ruby 4.0 and comment out
the gRPC matrix exclusion on Ruby 4.0, adding guidance to re-enable
the exclusion if killed/memory limits recur with future Ruby releases.

Signed-off-by: Arjun Rajappa <arjun.rajappa@ibm.com>

@arjun-rajappa arjun-rajappa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@sonarqubecloud

Copy link
Copy Markdown

@CagriYonca
CagriYonca merged commit 49803d3 into master Oct 23, 2026
232 checks passed
@CagriYonca
CagriYonca deleted the currency-update branch October 23, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants