Skip to content

Conversation

@mernst
Copy link
Member

@mernst mernst commented Dec 21, 2025

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Dec 21, 2025

📝 Walkthrough

Walkthrough

This PR refactors the CI/CD pipeline typecheck job infrastructure by splitting monolithic typecheck jobs into multi-part variants. Specifically, it replaces single typecheck jobs (for JDK 17, 21, and 25 across both bundled and latest CF configurations) with three-part decompositions (part1, part2, part3) across both Azure Pipelines and CircleCI. The timeout per job is reduced from 80 to 40 minutes. New parameterized macros are introduced to support this multi-part structure, and test scripts are updated to accept an optional part argument that selects which partition of the typecheck job to execute.

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
.azure/defs.m4 (1)

102-124: Remove the unused typecheck_job macro.

The typecheck_job macro (lines 103–124) is dead code—no invocations exist anywhere in the codebase. Only typecheck_job_parts (which calls typecheck_job_part) is invoked. Additionally, this macro has inconsistent argument handling: it references $4 in the job name (line 104) but the dependency references at lines 107 and 109 omit $4, unlike the corresponding lines in typecheck_job_part (lines 134–137) which correctly include it.

If this macro is intentionally kept for future use, fix the dependency references to include the part argument ($4).

.circleci/config.yml (1)

1083-1090: Canary-jobs references non-existent job typecheck-bundled-ubuntu-jdk25.

The canary-jobs depends on typecheck-bundled-ubuntu-jdk25, but this job has been renamed to part-based variants (typecheck-bundled-part1-ubuntu-jdk25, etc.). This will cause the workflow to fail.

🔎 Proposed fix
   - canary-jobs:
       requires:
         - quick-txt-diff-ubuntu-jdk25
         - nonquick-txt-diff-ubuntu-jdk25
         - non-txt-diff-ubuntu-jdk25
         - misc-ubuntu-jdk25
         - kvasir-ubuntu-jdk25
-        - typecheck-bundled-ubuntu-jdk25
+        - typecheck-bundled-part1-ubuntu-jdk25
+        - typecheck-bundled-part2-ubuntu-jdk25
+        - typecheck-bundled-part3-ubuntu-jdk25
.azure/azure-pipelines.yml (1)

24-32: Canary_jobs references non-existent jobs typecheck_latest_ubuntu_jdk25 and typecheck_bundled_ubuntu_jdk25.

The canary_jobs depends on jobs that have been renamed to part-based variants. This will cause the pipeline to fail with "Job not found" errors.

🔎 Proposed fix
   - job: canary_jobs
     dependsOn:
       - quick_ubuntu_jdk25
       - nonquick_ubuntu_jdk25
       - nontxt_ubuntu_jdk25
       - misc_ubuntu_jdk25
       - kvasir_ubuntu_jdk25
-      - typecheck_latest_ubuntu_jdk25
-      - typecheck_bundled_ubuntu_jdk25
+      - typecheck_latest_part1_ubuntu_jdk25
+      - typecheck_latest_part2_ubuntu_jdk25
+      - typecheck_latest_part3_ubuntu_jdk25
+      - typecheck_bundled_part1_ubuntu_jdk25
+      - typecheck_bundled_part2_ubuntu_jdk25
+      - typecheck_bundled_part3_ubuntu_jdk25
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 18158fd and 27426d9.

📒 Files selected for processing (9)
  • .azure/azure-pipelines.yml (1 hunks)
  • .azure/defs.m4 (3 hunks)
  • .azure/jobs.m4 (1 hunks)
  • .circleci/config.yml (7 hunks)
  • .circleci/config.yml.m4 (1 hunks)
  • .circleci/defs.m4 (2 hunks)
  • .circleci/jobs.m4 (1 hunks)
  • scripts/test-typecheck-with-bundled-cf.sh (2 hunks)
  • scripts/test-typecheck-with-latest-cf.sh (2 hunks)
🔇 Additional comments (14)
.azure/jobs.m4 (1)

31-39: LGTM!

The migration from individual typecheck_bundled_job/typecheck_latest_job macros to the parameterized typecheck_job_parts macro is clean and consistent. The comments correctly document the JDK version constraints for the Checker Framework.

.azure/defs.m4 (1)

125-151: LGTM!

The multi-part job structure is well-designed:

  • typecheck_job_parts cleanly generates three sub-jobs
  • typecheck_job_part correctly includes the part identifier in job names and dependencies
  • The 40-minute timeout per part (vs 80 for the original monolithic job) is reasonable for parallel execution
  • Script invocation correctly passes the part argument
.circleci/jobs.m4 (1)

1-1: LGTM!

Clean reuse of Azure job definitions in CircleCI via m4 include. This avoids duplication and ensures consistency between CI systems.

.circleci/config.yml.m4 (2)

34-34: Verify canary-jobs dependency reference.

Line 34 references typecheck-bundled-ubuntu-jdk[]canary_version, but with the new multi-part structure, job names are now typecheck-bundled-part1-ubuntu-jdk25, typecheck-bundled-part2-ubuntu-jdk25, etc. This reference may not match any actual job name.

Should this require all three parts, or one specific part (e.g., typecheck-bundled-part3-ubuntu-jdk[]canary_version to ensure all parts complete)?

#!/bin/bash
# Check what job names are generated in the Azure config
fd -e yml -e yaml azure-pipelines --exec cat {} 2>/dev/null | grep -E 'typecheck.*ubuntu.*jdk25' | head -20
# Also check the generated CircleCI config if available
fd -e yml config . -p '.circleci' --exec cat {} 2>/dev/null | grep -E 'typecheck.*ubuntu.*jdk25' | head -20

64-78: The job_dependences_part macro is properly defined in .circleci/defs.m4 and all usages at lines 64-78 are correct. No issues found.

Likely an incorrect or invalid review comment.

scripts/test-typecheck-with-bundled-cf.sh (1)

41-45: Potential bug: duplicated "part" prefix in make target construction requires verification.

The review identifies a logical concern about target name construction at line 44: if the script receives arguments like part1, part2, part3 (as documented in CI macro definitions), constructing the target as typecheck-part$1 would produce typecheck-partpart1 with a doubled "part" prefix.

However, this bug claim cannot be verified without access to the actual Makefile to confirm:

  • The exact make target names defined in java/Makefile
  • The actual arguments passed to the script from .azure/defs.m4

The proposed fix should only be applied after confirming the actual target naming convention in the repository.

scripts/test-typecheck-with-latest-cf.sh (1)

35-39: LGTM!

The CI detection and job count logic is correct. Using .plume-scripts/is-ci.sh is consistent with expected script locations.

.circleci/config.yml (3)

538-603: LGTM!

The three-part typecheck-bundled jobs for JDK17 are correctly structured with consistent environment, caching, and script invocations.


670-735: LGTM!

The typecheck-latest-part{1,2,3}-ubuntu-jdk21 jobs are correctly defined with appropriate script invocations.


1200-1250: LGTM!

The workflow dependencies are correctly updated to use per-part job names, with proper dependency chains from JDK17/21 parts to their corresponding JDK25 parts.

.circleci/defs.m4 (2)

72-96: LGTM!

The new macros are well-structured:

  • typecheck_job for full typecheck runs without parts
  • typecheck_job_parts to generate all three part jobs
  • typecheck_job_part for individual part definitions

The script invocation correctly passes the part argument (line 95).


111-123: LGTM!

The job_dependences_part macro correctly mirrors the existing job_dependences macro structure while adding the fourth argument for part handling in dependency chains.

.azure/azure-pipelines.yml (2)

343-393: LGTM!

The three-part typecheck_bundled jobs for JDK17 are correctly structured with:

  • Proper dependencies on canary_jobs and corresponding JDK25 parts
  • 40-minute timeout (reduced from 80, appropriate for split jobs)
  • Correct script invocations with part arguments

496-579: LGTM!

The JDK25 typecheck jobs (both bundled and latest, all three parts) are correctly defined as canary jobs without dependencies, with proper 40-minute timeouts.

Comment on lines +41 to +50
if [ "$#" -ge 2 ]; then
echo "$0: expected 0 or 1 arguments."
exit 2
fi

if [ "$#" -eq 0 ]; then
make -C java --jobs="$num_jobs" typecheck
else
make -C java --jobs="$num_jobs" "typecheck-part$1"
fi
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider validating the part argument value.

The script accepts any string as argument and will pass it to make as typecheck-part$1. If an invalid value like "foo" is passed, the error will come from make (target not found) rather than a clear usage message.

🔎 Proposed validation
 if [ "$#" -ge 2 ]; then
     echo "$0: expected 0 or 1 arguments."
     exit 2
 fi
 
+if [ "$#" -eq 1 ] && [ "$1" != "part1" ] && [ "$1" != "part2" ] && [ "$1" != "part3" ]; then
+    echo "$0: argument must be part1, part2, or part3, not '$1'."
+    exit 2
+fi
+
 if [ "$#" -eq 0 ]; then
   make -C java --jobs="$num_jobs" typecheck
 else
   make -C java --jobs="$num_jobs" "typecheck-part$1"
 fi
🤖 Prompt for AI Agents
In scripts/test-typecheck-with-latest-cf.sh around lines 41 to 50, the script
currently accepts any string as the part argument and forwards it to make as
"typecheck-part$1", which yields unclear make errors for invalid values;
validate the argument before calling make by checking that when an argument is
provided it matches the expected pattern (e.g. a positive integer with a regex
like '^[1-9][0-9]*$') and optionally verify it is within the known parts range
if that value is available; if validation fails, print a clear usage message
(showing valid values or format) and exit with a non-zero status instead of
invoking make.

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