Skip to content

Use artifacts to share Maven dependencies between workflow jobs#1794

Merged
yingbull merged 5 commits into
fix/legacy-test-workflow-fixfrom
copilot/sub-pr-1792-again
Jan 18, 2026
Merged

Use artifacts to share Maven dependencies between workflow jobs#1794
yingbull merged 5 commits into
fix/legacy-test-workflow-fixfrom
copilot/sub-pr-1792-again

Conversation

Copilot AI commented Jan 18, 2026

Copy link
Copy Markdown

GitHub Actions cache is only restored at job start and saved at job end—not shared between jobs in the same workflow run. The parallel test jobs were redundantly downloading Maven dependencies already fetched by the build job.

Changes

Build job:

  • Uploads .m2-cache as artifact after make install
  • Retains cache action for cross-run optimization (restores from previous workflow runs)

Test jobs (modern-tests, legacy-tests):

  • Download maven-dependencies-cache artifact from build job
  • Removed redundant cache actions—artifacts provide dependencies directly

Configuration:

  • Artifact name: maven-dependencies-cache (specific to avoid conflicts)
  • Retention: 7 days (allows debugging and re-runs)

Result

Dependencies downloaded once per workflow run instead of three times. Cache provides cross-run optimization, artifacts provide within-run sharing.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.


Summary by cubic

Applied feedback from #1792 to share Maven dependencies via artifacts and stabilize modern and legacy test jobs, improving reliability in CI and local development.

  • Bug Fixes
    • Workflow: upload Maven cache artifact in the build job (7-day retention, specific name); download it in modern-tests and legacy-tests; removed redundant cache steps in parallel jobs.
    • Devcontainer: ensured build steps match CI to prevent postCreate/startup issues.

Written for commit cd8fc42. Summary will update on new commits.

@coderabbitai

coderabbitai Bot commented Jan 18, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI and others added 3 commits January 18, 2026 06:09
Co-authored-by: yingbull <8680161+yingbull@users.noreply.github.com>
Co-authored-by: yingbull <8680161+yingbull@users.noreply.github.com>
Co-authored-by: yingbull <8680161+yingbull@users.noreply.github.com>
Copilot AI changed the title [WIP] Apply changes based on feedback for workflow and devcontainer fixes Use artifacts to share Maven dependencies between workflow jobs Jan 18, 2026
Copilot AI requested a review from yingbull January 18, 2026 06:13
@yingbull yingbull marked this pull request as ready for review January 18, 2026 06:13
Copilot AI review requested due to automatic review settings January 18, 2026 06:13
@yingbull yingbull merged commit 58a254c into fix/legacy-test-workflow-fix Jan 18, 2026
5 of 7 checks passed
@yingbull yingbull deleted the copilot/sub-pr-1792-again branch January 18, 2026 06:14

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR optimizes the GitHub Actions workflow by eliminating redundant Maven dependency downloads across parallel test jobs. GitHub Actions cache is only available at job boundaries, not shared between jobs in the same workflow run, causing the build, modern-tests, and legacy-tests jobs to each download dependencies independently.

Changes:

  • Build job uploads Maven dependencies as an artifact after compilation
  • Modern-tests and legacy-tests jobs download the shared artifact instead of re-fetching dependencies
  • Cache action retained in build job for cross-run optimization only

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.

3 participants