-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Summary
The Java SDK version-to-platform-branch mappings are now duplicated in two places:
xtest/sdk/scripts/resolve-version.py(Python, lines ~122-145)xtest/sdk/scripts/post-checkout-java.sh(Bash,get_platform_branch()function)
This creates a maintenance burden - when a new Java SDK version is released, both files must be updated.
Suggested Approaches
Option A: Shared config file
Extract mappings to a JSON/YAML file that both scripts read:
// xtest/sdk/scripts/java-platform-versions.json
{
"0.7.8": "protocol/go/v0.2.29",
"0.7.7": "protocol/go/v0.2.29",
"0.7.6": "protocol/go/v0.2.25",
"0.7.5": "protocol/go/v0.2.18",
...
}Option B: Call resolve-version.py from bash
Have post-checkout-java.sh call resolve-version.py to get the mapping:
PLATFORM_BRANCH=$(python3 "$SCRIPT_DIR/resolve-version.py" --platform-branch-for-java "$VERSION")Option C: Pass platform.branch during checkout
Have the workflow/checkout script pass the correct platform.branch as a parameter, eliminating the need for post-checkout detection.
Recommendation
Option A (shared config) is cleanest - single source of truth, easy to read from both Python and Bash.
Related
- PR chore(ci): Improve X-Test workflow performance #378: Added the duplicate mapping in post-checkout-java.sh
- Issue bug(xtest): post-checkout-java.sh fails silently when pom.xml lacks <properties> section #379: Original bug that required version-specific mappings
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels