-
Notifications
You must be signed in to change notification settings - Fork 4
update EAP sample triggers #148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds EAP publish constant, fetches latest EAP Ktor version into env.KTOR_VERSION, wires that into EAP version resolution and sample/composite build flows, enables reuse of successful upstream EAP builds, adds finish-build triggers, and expands use of teamcity.build.skipDependencyBuilds and USE_LATEST_KTOR_GRADLE_PLUGIN flags across TeamCity EAP sample/validation/composite build configurations. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests
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. 🧪 Early access (Sonnet 4.5): enabledWe are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience. Note:
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
.teamcity/src/subprojects/train/TriggerProjectSamplesOnEAP.kt (2)
42-79: Add curl timeout and consider XML parsing robustness.The script correctly fetches and parses the Maven metadata, but consider these improvements:
- Add a timeout to the curl command to prevent indefinite hangs
- The grep/sed parsing is fragile if the XML structure changes
- Consider validating the extracted version format
Apply this diff to add timeout and improve robustness:
- if ! curl -s "${'$'}METADATA_URL" -o "${'$'}TEMP_FILE"; then + if ! curl -s --max-time 30 --connect-timeout 10 "${'$'}METADATA_URL" -o "${'$'}TEMP_FILE"; then echo "Failed to download metadata from ${'$'}METADATA_URL" rm -f "${'$'}TEMP_FILE" exit 1 fi # Extract the latest version using grep and sed # This pattern looks for a <latest>version</latest> tag LATEST_VERSION=$(grep -o '<latest>[^<]*</latest>' "${'$'}TEMP_FILE" | sed 's/<latest>\(.*\)<\/latest>/\1/') # Clean up temp file rm -f "${'$'}TEMP_FILE" if [ -z "${'$'}LATEST_VERSION" ]; then echo "Failed to extract latest version from metadata" exit 1 fi + + # Validate version format (basic sanity check) + if ! echo "${'$'}LATEST_VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+'; then + echo "Warning: Version format doesn't match expected pattern: ${'$'}LATEST_VERSION" + fi
164-165: Remove extra blank line.The parameter is correctly configured, but there's an unnecessary blank line at line 165.
Apply this diff:
param("env.USE_LATEST_KTOR_GRADLE_PLUGIN", "true") - }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.teamcity/src/subprojects/train/TriggerProjectSamplesOnEAP.kt(6 hunks)
🔇 Additional comments (7)
.teamcity/src/subprojects/train/TriggerProjectSamplesOnEAP.kt (7)
15-15: LGTM!The new constant follows the established pattern and is used consistently in the finishBuildTrigger configuration.
39-39: LGTM!The
teamcity.runAsFirstBuildparameter is appropriate for the version resolver build type, ensuring it runs before dependent builds.
114-120: LGTM!Adding
reuseBuilds = ReuseBuilds.SUCCESSFULis appropriate here, as it prevents unnecessary re-runs of the version resolver when a successful build already exists.
108-111: LGTM!Adding
teamcity.build.skipDependencyBuildshere is consistent with the pattern used elsewhere in the file and appropriate for sample validation builds.
172-178: Verify that the branch filter should include all branches.The finishBuildTrigger configuration looks correct, but the
branchFilter = "+:*"will trigger validation for all branches. Ensure this is intentional, as you may want to restrict EAP validation to specific branches (e.g., master, main, or release branches).If you want to restrict to specific branches, consider:
- branchFilter = "+:*" + branchFilter = "+:master"or for multiple branches:
- branchFilter = "+:*" + branchFilter = """ + +:master + +:main + """.trimIndent()
213-219: Verify that the branch filter should include all branches.Similar to the build plugin trigger, this
branchFilter = "+:*"will trigger validation for all branches. Confirm this aligns with your EAP validation strategy.
250-250: LGTM!Properly configured to skip dependency builds in the composite build, consistent with the pattern used throughout this configuration.
No description provided.