Skip to content

Commit 0292929

Browse files
committed
Merge remote-tracking branch 'origin/main' into delta-xds-non-breaking-slonka-hash-bytes and resolve conflicts
Signed-off-by: radoslaw.chrzanowski <[email protected]>
2 parents 5239443 + c7e27d4 commit 0292929

File tree

555 files changed

+4066
-3316
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

555 files changed

+4066
-3316
lines changed

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
version: 2
22
jobs:
33
build:
4-
machine: true
4+
machine:
5+
image: ubuntu-2004:202201-02
56

67
working_directory: ~/repo
78

@@ -40,7 +41,7 @@ jobs:
4041
command: |
4142
if [ "${CIRCLE_BRANCH}" == "main" ]; then
4243
echo $GPG_KEY | base64 --decode > signing-key
43-
gpg --passphrase $GPG_PASSPHRASE --import signing-key
44+
gpg --batch --passphrase $GPG_PASSPHRASE --import signing-key
4445
shred signing-key
4546
4647
if [[ -n "${RELEASE}" && -n "${NEXT}" ]]; then
@@ -52,10 +53,9 @@ jobs:
5253
fi
5354
elif [[ -n "${DEPLOY_BRANCH}" ]]; then
5455
echo $GPG_KEY | base64 --decode > signing-key
55-
gpg --passphrase $GPG_PASSPHRASE --import signing-key
56+
gpg --batch --passphrase $GPG_PASSPHRASE --import signing-key
5657
shred signing-key
5758
5859
mvn -B -s .circleci/settings-snapshots.xml deploy
5960
fi
60-
6161
- run: bash <(curl -s https://codecov.io/bash)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: compare-envoy-versions
2+
on:
3+
workflow_call:
4+
outputs:
5+
target-version:
6+
description: "Envoy version we need to update to"
7+
value: ${{ jobs.compare-envoy-versions.outputs.target-version }}
8+
9+
jobs:
10+
compare-envoy-versions:
11+
runs-on: ubuntu-latest
12+
outputs:
13+
target-version: ${{ steps.compare-latest-to-current-version.outputs.target-version }}
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Fetch latest Envoy version
17+
id: latest-envoy-version
18+
run: |
19+
echo 'ENVOY_LATEST<<EOF' >> $GITHUB_ENV
20+
curl -s https://api.github.com/repos/envoyproxy/envoy/releases/latest | jq -r '.tag_name' >> $GITHUB_ENV
21+
echo 'EOF' >> $GITHUB_ENV
22+
- name: Read current Envoy version
23+
id: current-envoy-version
24+
run: |
25+
echo 'ENVOY_CURRENT<<EOF' >> $GITHUB_ENV
26+
cat ./tools/envoy_release >> $GITHUB_ENV
27+
echo 'EOF' >> $GITHUB_ENV
28+
- name: Compare latest to current
29+
id: compare-latest-to-current-version
30+
run: |
31+
if [[ "${{ env.ENVOY_LATEST }}" > "${{ env.ENVOY_CURRENT }}" ]]
32+
then
33+
echo "::set-output name=target-version::${{ env.ENVOY_LATEST }}"
34+
else
35+
echo "::set-output name=target-version::noop"
36+
fi

.github/workflows/scheduled.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: scheduled
2+
on:
3+
schedule:
4+
# every day at 10
5+
- cron: '0 10 * * *'
6+
7+
jobs:
8+
call-compare-envoy-versions-workflow:
9+
uses: ./.github/workflows/compare-envoy-versions.yml
10+
11+
call-update-protobuf:
12+
needs: call-compare-envoy-versions-workflow
13+
if: ${{ needs.call-compare-envoy-versions-workflow.outputs.target-version != 'noop' }}
14+
uses: ./.github/workflows/update-protobuf.yml
15+
with:
16+
envoy_version: ${{ needs.call-compare-envoy-versions-workflow.outputs.target-version }}

.github/workflows/update-protobuf.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
name: update-protobuf
22
on:
3-
workflow_dispatch:
3+
workflow_call:
44
inputs:
55
envoy_version:
66
description: 'Envoy version to update to'
77
required: true
8+
type: string
89

910
jobs:
1011
update-protobuf:
@@ -14,14 +15,19 @@ jobs:
1415
- name: Run scripts
1516
working-directory: ./tools/
1617
run: |
17-
./update-sha.sh ${{ github.event.inputs.envoy_version }} | tee API_SHAS
18+
./update-sha.sh ${{ inputs.envoy_version }} | tee API_SHAS
1819
./update-api.sh
1920
- name: Create Pull Request
2021
uses: peter-evans/create-pull-request@v3
2122
with:
22-
branch: update-protobuf-to-${{ github.event.inputs.envoy_version }}
23+
branch: update-protobuf-to-${{ inputs.envoy_version }}
24+
base: main
25+
author: envoy-bot <[email protected]>
26+
committer: envoy-bot <[email protected]>
2327
signoff: true
24-
title: '[protobuf] Update protobuf definitions to ${{ github.event.inputs.envoy_version }}'
28+
title: '[protobuf] Update protobuf definitions to ${{ inputs.envoy_version }}'
29+
commit-message: |
30+
[protobuf] Update protobuf definitions to ${{ inputs.envoy_version }}
2531
body: |
2632
This is an automatic PR created by github action workflow:
2733
- Updated protobuf files

OWNERS.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
* Rama Chavali ([ramaraochavali](https://github.com/ramaraochavali)) ([email protected])
99
* Ben Hoyt ([b-hoyt](https://github.com/b-hoyt)) ([email protected])
1010
* Snow Pettersen ([snowp](https://github.com/snowp)) ([email protected])
11-
* Garrett Bourg ([baojr](https://github.com/baojr)) ([email protected])
1211
* Michael Puncel ([mpuncel](https://github.com/mpuncel)) ([email protected])
1312
* Dariusz Jędrzejczyk ([chemicL](https://github.com/chemicL)) ([email protected])
1413
* Krzysztof Słonka ([slonka](https://github.com/slonka)) ([email protected])

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ in [data-plane-api](https://github.com/envoyproxy/data-plane-api). It started li
77
[go-control-plane](https://github.com/envoyproxy/go-control-plane), but building an idiomatic Java implementation is
88
prioritized over exact interface parity with the Go implementation.
99

10-
Both v2 and v3 resources as well as transport versions are supported. Migrating
11-
to v3 is recommended as Envoy will drop v2 support at EOY 2020 (see
10+
Only v3 resources as well as transport versions are now supported. Migrating
11+
to v3 is necessary as Envoy dropped v2 support at EOY 2020 (see
1212
[API_VERSIONING.md](https://github.com/envoyproxy/envoy/blob/4c6206865061591155d18b55972b4d626e1703dd/api/API_VERSIONING.md))
1313

14-
See the (v2-to-v3 migration guide)[V2_TO_V3_GUIDE.md] for an exmplanation of migration paths.
14+
See the [v2-to-v3 migration guide](https://github.com/envoyproxy/java-control-plane/blob/main/V2_TO_V3_GUIDE.md) for an explanation of migration paths.
1515

1616
### Requirements
1717

@@ -27,26 +27,26 @@ mvn clean package
2727
More thorough usage examples are still TODO, but there is a basic test implementation in
2828
[TestMain](server/src/test/java/io/envoyproxy/controlplane/server/TestMain.java).
2929

30-
#### Bring api up-to-date with data-plane-api
31-
To bring this repository's protobuf files up-to-date with the source
32-
of truth protobuf files in in envoyproxy/data-plane-api, do the
33-
following:
30+
### Envoy API
31+
There is automation built into this repo to keep the Envoy API (i.e. protobuf files)
32+
up to date with the latest available Envoy release.
3433

35-
1. update [tools/API_SHAS](tools/API_SHAS) (instructions are in the
36-
file) and then
37-
2. run [tools/update-api.sh](tools/update-api.sh) from the `tools`
38-
directory.
39-
3. update envoy-alpine-dev docker image version [EnvoyContainer.java] according to envoy SHA in first point.
34+
This automation uses Github Workflows and works as follows: a scheduled workflow runs with
35+
weekly cadence, and calls a reusable workflow that fetches the latest available Envoy release
36+
and compares it with the version currently used in the repo.
4037

41-
#### Releasing a new version
38+
If the latest available Envoy release doesn't match the version currently used, another
39+
reusable workflow is called which creates a PR that upgrades the Envoy API to the latest
40+
available release.
41+
42+
### Releasing a new version
4243
To release and publish a new version, do the following:
4344
1. create a personal API token in CircleCI by following the instructions listed [here](https://circleci.com/docs/2.0/managing-api-tokens/#creating-a-personal-api-token)
4445
2. from terminal, curl the CircleCI API as follows
4546

4647
```
47-
curl --request POST \
48-
--url https://circleci.com/api/v2/project/github/envoyproxy/java-control-plane/pipeline \
49-
--header 'Circle-Token: <API token>' \
50-
--header 'content-type: application/json' \
51-
--data '{"branch":"main","parameters":{"RELEASE":"<e.g. 0.1.29>","NEXT":"<e.g. 0.1.30-SNAPSHOT>"}}'
48+
curl -X POST \
49+
-H "Content-Type: application/json" \
50+
-d '{ "build_parameters": { "RELEASE": "<e.g. 0.1.29>", "NEXT": "<e.g. 0.1.30-SNAPSHOT>" } }' \
51+
"https://circleci.com/api/v1.1/project/github/envoyproxy/java-control-plane/tree/main?circle-token=<API token>"
5252
```

api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>java-control-plane</artifactId>
77
<groupId>io.envoyproxy.controlplane</groupId>
8-
<version>0.1.31-SNAPSHOT</version>
8+
<version>0.1.33-SNAPSHOT</version>
99
</parent>
1010

1111
<artifactId>api</artifactId>

api/src/main/proto/envoy/admin/v2alpha/certs.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import "udpa/annotations/status.proto";
99
option java_package = "io.envoyproxy.envoy.admin.v2alpha";
1010
option java_outer_classname = "CertsProto";
1111
option java_multiple_files = true;
12+
option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v2alpha";
1213
option (udpa.annotations.file_status).package_version_status = FROZEN;
1314

1415
// [#protodoc-title: Certificates]

api/src/main/proto/envoy/admin/v2alpha/clusters.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import "udpa/annotations/status.proto";
1313
option java_package = "io.envoyproxy.envoy.admin.v2alpha";
1414
option java_outer_classname = "ClustersProto";
1515
option java_multiple_files = true;
16+
option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v2alpha";
1617
option (udpa.annotations.file_status).package_version_status = FROZEN;
1718

1819
// [#protodoc-title: Clusters]

api/src/main/proto/envoy/admin/v2alpha/config_dump.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import "udpa/annotations/status.proto";
1212
option java_package = "io.envoyproxy.envoy.admin.v2alpha";
1313
option java_outer_classname = "ConfigDumpProto";
1414
option java_multiple_files = true;
15+
option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v2alpha";
1516
option (udpa.annotations.file_status).package_version_status = FROZEN;
1617

1718
// [#protodoc-title: ConfigDump]

0 commit comments

Comments
 (0)