Skip to content
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

Bump com.google.protobuf:protobuf-java from 3.22.2 to 3.23.4 in /test/fixtures/hdfs-fixture #106

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c54aea3
diff changes instead of making pull requests
peternied May 4, 2023
dbb61fa
Remove token references
peternied May 4, 2023
a74cac1
Allow the increment to come from main-ish branch
peternied May 4, 2023
1fe52e1
Move env to correct location
peternied May 4, 2023
0ae05dc
fix other reference too
peternied May 4, 2023
0cc57b5
remove env value
peternied May 4, 2023
fed09db
Fix bad leading slash
peternied May 4, 2023
ec0f00c
parameterize dispatch
peternied May 4, 2023
70b5cf7
fix versions?
peternied May 4, 2023
b34f85b
Switch to GHA
peternied May 4, 2023
a902bc4
Change how vars are accessed
peternied May 4, 2023
7a12e5f
Change yet again how vars are provided
peternied May 4, 2023
3253e48
Change yet again vars
peternied May 4, 2023
585ccd3
Change yet again vars, more
peternied May 4, 2023
12fdf8f
Add continue on failure
peternied May 5, 2023
5ac3a94
patch bump
peternied May 5, 2023
beb017e
better logging
peternied May 5, 2023
cf4bbeb
Commit changes
peternied May 5, 2023
5a83d99
Add commits
peternied May 5, 2023
3eb7182
Add write permissions
peternied May 5, 2023
dff1b0b
Add patch version 2.7.2
peternied May 5, 2023
07b5e2d
Add an issue for tracking
peternied May 5, 2023
5e7017f
Merge remote-tracking branch 'peternied/main' into fix-increment-work…
peternied May 5, 2023
64e3333
Fix issue
peternied May 5, 2023
62ced9e
Fix missing braket
peternied May 5, 2023
9a7efea
Extract property name
peternied May 5, 2023
ade50de
stop being fancy
peternied May 5, 2023
a2af5ef
change to issue id
peternied May 5, 2023
3547ec8
change
peternied May 5, 2023
3ee4661
debugging
peternied May 5, 2023
93ac6bf
debugging
peternied May 5, 2023
23c9e97
debugging
peternied May 5, 2023
6dfe225
debugging
peternied May 5, 2023
61efed7
Add patch version 2.7.3 #66
peternied May 5, 2023
8ca4663
Bump com.google.protobuf:protobuf-java in /test/fixtures/hdfs-fixture
dependabot[bot] Jul 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .ci/bwcVersions
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ BWC_VERSION:
- "2.7.0"
- "2.7.1"
- "2.8.0"
- "2.7.2"
162 changes: 77 additions & 85 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
@@ -1,123 +1,115 @@
name: Increment Version

on:
workflow_dispatch:
inputs:
tag:
description: 'the tag'
required: true
type: string
push:
tags:
- '*.*.*'

permissions: {}
permissions:
contents: write
issues: write
jobs:
build:
version-update:
runs-on: ubuntu-latest
steps:
- name: GitHub App token
id: github_app_token
uses: tibdex/[email protected]
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
installation_id: 22958780

- uses: actions/checkout@v2
- name: Fetch Tag and Version Information
run: |
TAG=$(echo "${GITHUB_REF#refs/*/}")
TAG=${{ github.event.inputs.tag }}
CURRENT_VERSION_ARRAY=($(echo "$TAG" | tr . '\n'))
BASE=$(IFS=. ; echo "${CURRENT_VERSION_ARRAY[*]:0:2}")
BASE_X=$(IFS=. ; echo "${CURRENT_VERSION_ARRAY[*]:0:1}.x")
CURRENT_VERSION=$(IFS=. ; echo "${CURRENT_VERSION_ARRAY[*]:0:3}")
CURRENT_VERSION_UNDERSCORE=$(IFS=_ ; echo "V_${CURRENT_VERSION_ARRAY[*]:0:3}")
CURRENT_VERSION_ARRAY[2]=$((CURRENT_VERSION_ARRAY[2]+1))
NEXT_VERSION=$(IFS=. ; echo "${CURRENT_VERSION_ARRAY[*]:0:3}")
NEXT_VERSION_UNDERSCORE=$(IFS=_ ; echo "V_${CURRENT_VERSION_ARRAY[*]:0:3}")
NEXT_VERSION_ID=$(IFS=0 ; echo "${CURRENT_VERSION_ARRAY[*]:0:3}99")
echo "TAG=$TAG" >> $GITHUB_ENV
echo "BASE=$BASE" >> $GITHUB_ENV
echo "BASE_X=$BASE_X" >> $GITHUB_ENV
echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV
echo "CURRENT_VERSION_UNDERSCORE=$CURRENT_VERSION_UNDERSCORE" >> $GITHUB_ENV
echo "NEXT_VERSION=$NEXT_VERSION" >> $GITHUB_ENV
echo "NEXT_VERSION_UNDERSCORE=$NEXT_VERSION_UNDERSCORE" >> $GITHUB_ENV
echo "NEXT_VERSION_ID=$NEXT_VERSION_ID" >> $GITHUB_ENV
- uses: actions/checkout@v2

- id: create-issue
uses: actions/[email protected]
with:
script: |
const { data: issue }= await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: "Increment version for ${{ env.NEXT_VERSION }}",
body: "Issue for tracking the changes associated with a version increment."
});
console.error(JSON.stringify(issue));
return issue.number;
result-encoding: string

- uses: actions/checkout@v3
with:
ref: ${{ env.BASE }}
token: ${{ steps.github_app_token.outputs.token }}

- name: Increment Patch Version
run: |
echo Incrementing $CURRENT_VERSION to $NEXT_VERSION
echo " - \"$CURRENT_VERSION\"" >> .ci/bwcVersions
sed -i "s/opensearch = $CURRENT_VERSION/opensearch = $NEXT_VERSION/g" buildSrc/version.properties
echo Adding $NEXT_VERSION_UNDERSCORE after $CURRENT_VERSION_UNDERSCORE
sed -i "s/public static final Version $CURRENT_VERSION_UNDERSCORE = new Version(\([[:digit:]]\+\)\(.*\));/\0\n public static final Version $NEXT_VERSION_UNDERSCORE = new Version($NEXT_VERSION_ID\2);/g" server/src/main/java/org/opensearch/Version.java
sed -i "s/CURRENT = $CURRENT_VERSION_UNDERSCORE;/CURRENT = $NEXT_VERSION_UNDERSCORE;/g" server/src/main/java/org/opensearch/Version.java

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
- name: Increment Patch Version on Major.Minor branch
uses: peternied/opensearch-core-version-updater@main
with:
token: ${{ steps.github_app_token.outputs.token }}
base: ${{ env.BASE }}
branch: 'create-pull-request/patch-${{ env.BASE }}'
commit-message: Increment version to ${{ env.NEXT_VERSION }}
signoff: true
delete-branch: true
labels: |
autocut
title: '[AUTO] Increment version to ${{ env.NEXT_VERSION }}.'
body: |
I've noticed that a new tag ${{ env.TAG }} was pushed, and incremented the version from ${{ env.CURRENT_VERSION }} to ${{ env.NEXT_VERSION }}.
previous-version: ${{ env.CURRENT_VERSION }}
new-version: ${{ env.NEXT_VERSION }}
update-current: true

- run: git diff
- run: |
git config --global user.name 'Peter Nied'
git config --global user.email '[email protected]'
git add .
git commit -s -m "Increment version to $NEXT_VERSION #${{steps.create-issue.outputs.result}}"
git push

- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ env.BASE_X }}
token: ${{ steps.github_app_token.outputs.token }}

- name: Add bwc version to .X branch
run: |
echo Adding bwc version $NEXT_VERSION after $CURRENT_VERSION
sed -i "s/- \"$CURRENT_VERSION\"/\0\n - \"$NEXT_VERSION\"/g" .ci/bwcVersions
echo Adding $NEXT_VERSION_UNDERSCORE after $CURRENT_VERSION_UNDERSCORE
sed -i "s/public static final Version $CURRENT_VERSION_UNDERSCORE = new Version(\([[:digit:]]\+\)\(.*\));/\0\n public static final Version $NEXT_VERSION_UNDERSCORE = new Version($NEXT_VERSION_ID\2);/g" server/src/main/java/org/opensearch/Version.java

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
- name: Add Patch Version on Major.X branch
uses: peternied/opensearch-core-version-updater@main
with:
token: ${{ steps.github_app_token.outputs.token }}
base: ${{ env.BASE_X }}
branch: 'create-pull-request/patch-${{ env.BASE_X }}'
commit-message: Add bwc version ${{ env.NEXT_VERSION }}
signoff: true
delete-branch: true
labels: |
autocut
title: '[AUTO] [${{ env.BASE_X }}] Add bwc version ${{ env.NEXT_VERSION }}.'
body: |
I've noticed that a new tag ${{ env.TAG }} was pushed, and added a bwc version ${{ env.NEXT_VERSION }}.
previous-version: ${{ env.CURRENT_VERSION }}
new-version: ${{ env.NEXT_VERSION }}
update-current: false

- run: git diff
- run: |
git config --global user.name 'Peter Nied'
git config --global user.email '[email protected]'
git add .
git commit -s -m "Add patch version $NEXT_VERSION #${{steps.create-issue.outputs.result}}"
git push

- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: main
token: ${{ steps.github_app_token.outputs.token }}

- name: Add bwc version to main branch
run: |
echo Adding bwc version $NEXT_VERSION after $CURRENT_VERSION
sed -i "s/- \"$CURRENT_VERSION\"/\0\n - \"$NEXT_VERSION\"/g" .ci/bwcVersions
echo Adding $NEXT_VERSION_UNDERSCORE after $CURRENT_VERSION_UNDERSCORE
sed -i "s/public static final Version $CURRENT_VERSION_UNDERSCORE = new Version(\([[:digit:]]\+\)\(.*\));/\0\n public static final Version $NEXT_VERSION_UNDERSCORE = new Version($NEXT_VERSION_ID\2);/g" libs/core/src/main/java/org/opensearch/Version.java
- name: Add Patch Version on Main branch
uses: peternied/opensearch-core-version-updater@main
with:
previous-version: ${{ env.CURRENT_VERSION }}
new-version: ${{ env.NEXT_VERSION }}
update-current: false

- run: git diff
- run: |
git config --global user.name 'Peter Nied'
git config --global user.email '[email protected]'
git add .
git commit -s -m "Add patch version $NEXT_VERSION #${{steps.create-issue.outputs.result}}"
git push

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
- uses: actions/[email protected]
with:
token: ${{ steps.github_app_token.outputs.token }}
base: main
branch: 'create-pull-request/patch-main'
commit-message: Add bwc version ${{ env.NEXT_VERSION }}
signoff: true
delete-branch: true
labels: |
autocut
title: '[AUTO] [main] Add bwc version ${{ env.NEXT_VERSION }}.'
body: |
I've noticed that a new tag ${{ env.TAG }} was pushed, and added a bwc version ${{ env.NEXT_VERSION }}.
script: |
github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: "${{steps.create-issue.outputs.result}}",
state: "closed"
});
2 changes: 2 additions & 0 deletions libs/core/src/main/java/org/opensearch/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ public class Version implements Comparable<Version>, ToXContentFragment {
public static final Version V_2_6_1 = new Version(2060199, org.apache.lucene.util.Version.LUCENE_9_5_0);
public static final Version V_2_7_0 = new Version(2070099, org.apache.lucene.util.Version.LUCENE_9_5_0);
public static final Version V_2_7_1 = new Version(2070199, org.apache.lucene.util.Version.LUCENE_9_5_0);
public static final Version V_2_7_2 = new Version(2070299, org.apache.lucene.util.Version.LUCENE_9_5_0);
public static final Version V_2_7_3 = new Version(2070399, org.apache.lucene.util.Version.LUCENE_9_5_0);
public static final Version V_2_8_0 = new Version(2080099, org.apache.lucene.util.Version.LUCENE_9_5_0);
public static final Version V_3_0_0 = new Version(3000099, org.apache.lucene.util.Version.LUCENE_9_6_0);
public static final Version CURRENT = V_3_0_0;
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/hdfs-fixture/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ dependencies {
api "com.fasterxml.woodstox:woodstox-core:${versions.woodstox}"
api 'net.minidev:json-smart:2.4.10'
api "org.mockito:mockito-core:${versions.mockito}"
api "com.google.protobuf:protobuf-java:3.22.2"
api "com.google.protobuf:protobuf-java:3.23.4"
api "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}"
api 'org.eclipse.jetty:jetty-server:9.4.49.v20220914'
api 'org.apache.zookeeper:zookeeper:3.8.1'
Expand Down
Loading