Skip to content

Commit 2d23d5c

Browse files
committed
Test adding a new transport version
1 parent f653a8a commit 2d23d5c

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
3+
if [[ -z "${BUILDKITE_PULL_REQUEST:-}" ]]; then
4+
echo "Not a pull request, skipping transport version update"
5+
exit 0
6+
fi
7+
8+
if ! git diff --exit-code; then
9+
echo "Changes are present before updating transport versions, not running"
10+
git status
11+
exit 0
12+
fi
13+
14+
NEW_COMMIT_MESSAGE="[CI] Update transport versions"
15+
16+
echo "--- Generating updated transport version definitions"
17+
.ci/scripts/run-gradle.sh generateTransportVersionDefinition
18+
19+
if git diff --exit-code; then
20+
echo "No changes found after updating transport versions. Don't need to auto commit."
21+
exit 0
22+
fi
23+
24+
git config --global user.name elasticsearchmachine
25+
git config --global user.email '[email protected]'
26+
27+
gh pr checkout "${BUILDKITE_PULL_REQUEST}"
28+
git add -u .
29+
git commit -m "$NEW_COMMIT_MESSAGE"
30+
git push
31+
32+
# After the git push, the new commit will trigger a new build within a few seconds and this build should get cancelled
33+
# So, let's just sleep to give the build time to cancel itself without an error
34+
# If it doesn't get cancelled for some reason, then exit with an error, because we don't want this build to be green (we just don't want it to generate an error either)
35+
sleep 300
36+
exit 1

x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/CCRInfoTransportAction.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public class CCRInfoTransportAction extends XPackInfoFeatureTransportAction {
2929

3030
private final boolean enabled;
3131
private final XPackLicenseState licenseState;
32+
private final TransportVersion transportVersion = TransportVersion.fromName("my-transport-version");
3233

3334
@Inject
3435
public CCRInfoTransportAction(

0 commit comments

Comments
 (0)