Skip to content

CLDSRV-1120: Speed up the CI - #6417

Open
nicolas2bert wants to merge 4 commits into
development/9.4from
improvement/CLDSRV-1120-ci-time
Open

nicolas2bert wants to merge 4 commits into
development/9.4from
improvement/CLDSRV-1120-ci-time

Conversation

@nicolas2bert

@nicolas2bert nicolas2bert commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Issue: CLDSRV-1120

What changed

CI only: .github/workflows/tests.yaml, test scripts in package.json, a new .github/scripts/retry.bash. The server code and the Dockerfile don't change.

  • The 4 longest functional jobs (file, mongo-v0, mongo-v1, s3c) run in 2 shards, on 2 runners.
  • docker compose up is retried up to 3 times, because the shards pull twice as many images.
  • fail-fast: false on the split jobs, so we rerun only the failed shard.

Numbers

development/9.4 This PR
Total (warm Docker cache) ~23 min ~14 min

Each shard runs half of the functional suites on its own runner, so the
mongo, file and s3c jobs end in about 7 minutes instead of 12.

The split doubles the jobs that pull images, so we retry docker compose up
when ghcr.io drops a pull. We also set fail-fast to false, so a failed shard
doesn't cancel the others and we can rerun only that shard.
@bert-e

bert-e commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Hello nicolas2bert,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval ⭐
/bypass_build_status Bypass the build and test status ⭐
/bypass_commit_size Bypass the check on the size of the changeset TBA ⭐
/bypass_incompatible_branch Bypass the check on the source branch prefix ⭐
/bypass_jira_check Bypass the Jira issue check ⭐
/bypass_peer_approval Bypass the pull request peers' approval ⭐
/bypass_leader_approval Bypass the pull request leaders' approval ⭐
/bypass_source_branch_lineage Bypass the cross-branch contamination check ⭐
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request.
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e

bert-e commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Incorrect fix version

The Fix Version/s in issue CLDSRV-1120 contains:

  • None

Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:

  • 9.4.24

  • 9.5.14

  • 9.6.4

  • 9.7.0

Please check the Fix Version/s of CLDSRV-1120, or the target
branch of this pull request.

@codecov

codecov Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.85%. Comparing base (86e2495) to head (70d43cb).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph
see 1 file with indirect coverage changes

@@                 Coverage Diff                 @@
##           development/9.4    #6417      +/-   ##
===================================================
- Coverage            86.90%   86.85%   -0.05%     
===================================================
  Files                  214      214              
  Lines                14764    14764              
===================================================
- Hits                 12830    12823       -7     
- Misses                1934     1941       +7     
Flag Coverage Δ
checksums-disabled-tests 35.23% <ø> (ø)
file-ft-tests 69.70% <ø> (ø)
file-ft-tests-null-compat 70.19% <ø> (ø)
kmip-ft-tests 28.00% <ø> (ø)
mongo-v0-ft-tests 70.83% <ø> (+0.01%) ⬆️
mongo-v1-ft-tests 70.82% <ø> (-0.06%) ⬇️
multiple-backend 35.95% <ø> (ø)
s3c-ft-tests-v0 64.78% <ø> (-0.02%) ⬇️
s3c-ft-tests-v0-null-compat 64.84% <ø> (-0.02%) ⬇️
s3c-ft-tests-v0-replication-compat 64.65% <ø> (ø)
s3c-ft-tests-v1 64.76% <ø> (ø)
sur-tests 36.43% <ø> (-0.88%) ⬇️
sur-tests-inflights 39.21% <ø> (-0.03%) ⬇️
unit 75.30% <ø> (ø)
utapi-v2-tests 35.19% <ø> (ø)

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nicolas2bert nicolas2bert changed the title CLDSRV-1120: Cut the tests workflow from about 23 to about 13 minutes CLDSRV-1120: Speed up the CI Dec 3, 2026
Comment thread .github/workflows/tests.yaml Resolved
@bert-e

bert-e commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Request integration branches

Waiting for integration branch creation to be requested by the user.

To request integration branches, please comment on this pull request with the following command:

/create_integration_branches

Alternatively, the /approve and /create_pull_requests commands will automatically
create the integration branches.

Comment thread .github/scripts/retry.bash Outdated
Comment on lines +9 to +12
echo "Attempt ${attempt} failed: $*" >&2
[ "${attempt}" -lt 3 ] && sleep 15
done
exit 1

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.

Suggested change
echo "Attempt ${attempt} failed: $*" >&2
[ "${attempt}" -lt 3 ] && sleep 15
done
exit 1
rc=$?
echo "Attempt ${attempt} failed (exit ${rc}): $*" >&2
[ "${attempt}" -lt 3 ] && sleep 15
done
exit ${rc}

You could print and return the command's exit code

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.

Good idea, done. A failure now shows the real exit code instead of always 1.

Comment thread package.json
Comment on lines +141 to +142
"ft_test_shard1": "npm-run-all -s ft_awssdk_object ft_node",
"ft_test_shard2": "npm-run-all -s ft_awssdk_no_object ft_s3cmd ft_s3curl ft_healthchecks ft_management ft_util ft_backbeat",

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'd rename shard 1 and 2 with more descriptive names like shardObject shardOther and carry them over through the CI so we know more easily what's running in each.

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.

I thought about it, but I'd keep the numbers. The split is by time, not by topic. For example, ft_node is in shard 1 only to balance the two halves, it has nothing to do with objects. If we move a suite one day to rebalance, a name like "object" becomes wrong. The comment above the jobs already says what each shard runs. Does that work for you?

@francoisferrand
francoisferrand dismissed their stale review December 3, 2026 16:47

my bad, missed the need:build

@francoisferrand francoisferrand 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.

image build is more advanced in more recent branches, will need some work in the waterflow branch

Keep the 9.5 build job as it is and drop build-federation. A separate PR will handle 9.5.

I suggest doing it the other way : first a PR in 9.5, then this PR can resolve the conflicts once.

  • Reverting in waterflow means the change is not available in future branches, and relies on developers to make the change again later (which is exactly what waterflow aims to avoid in the first place)
  • As far as git conflicts resolution, it means that when you are done with both PRs, the federation job first added here will conflict with the federation job that you will reintroduce in the second PR. Fine as far as you are concerned, but will bite the next person modifying the job in 9.4 branch

Comment thread .github/workflows/tests.yaml Outdated
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4

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.

checkout v4 is outdated (currently at v7)

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.

same for other actions setup-buildx-action@v4, docker/login-action@v4, docker/build-push-action@v7

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.

Fair point, but the whole file uses these versions, on 9.4 and even on 9.7. I only copied them for the new job. Bumping all the actions should be its own change, I'd rather not mix it in here. Anyway this job goes away, see my last comment.

Comment thread .github/workflows/tests.yaml Outdated

# The federation image starts from the cloudserver image, so we build it
# after the build job. No test uses it, so the tests don't wait for it.
build-federation:

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.

this does not only "build-federation", it also build Oras "dashboard" images.
either move these back to "build", their own job, or rename this job

(I'd prefer the first one, so build generate the complete docker image + dashboard package; but not sure what the impact on build time is)

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.

Good catch.
Nothing to change anymore though: I removed the federation job, so the dashboards stay in build like today.

Comment thread .github/workflows/tests.yaml Outdated
sudo touch /logs/server-access.log && sudo chmod 0666 /logs/server-access.log
- name: Setup CI services
run: docker compose --profile mongo up -d
run: bash ../scripts/retry.bash docker compose --profile mongo up -d

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.

bash should not be needed as long as the script is executable, as it is in the shbang already

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.

Right, the script is already executable. I removed the bash prefix everywhere.

@nicolas2bert

Copy link
Copy Markdown
Contributor Author

I'll remove the federation commit

The federation split only saved about 1 minute, and it conflicts with the
build job on 9.5 and later. It will come as its own change, starting from 9.5.
The script is executable, so the workflow calls it without bash.

This branch has not been deployed

No deployments
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.

4 participants