Skip to content

Commit

Permalink
Merge branch 'main' into tauhid621/exported_services_api_grpc
Browse files Browse the repository at this point in the history
  • Loading branch information
tauhid621 committed Jan 19, 2024
2 parents 45b8059 + 98c9702 commit ef4f130
Show file tree
Hide file tree
Showing 377 changed files with 23,756 additions and 11,766 deletions.
3 changes: 3 additions & 0 deletions .changelog/20062.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
Upgrade to use Go 1.21.6.
```
3 changes: 3 additions & 0 deletions .changelog/20111.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
UI: fix autofocus on search box when page refreshes on typing in it due to url change.
```
3 changes: 3 additions & 0 deletions .changelog/20112.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:security
Update RSA key generation to use a key size of at least 2048 bits.
```
7 changes: 7 additions & 0 deletions .changelog/20168.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```release-note:enhancement
ProxyCfg: avoid setting a watch on `Internal.ServiceDump` when mesh gateway is not used.
```

```release-note:enhancement
ProxyCfg: only return the nodes list when querying the `Internal.ServiceDump` watch from proxycfg
```
20 changes: 0 additions & 20 deletions .github/scripts/license_checker.sh

This file was deleted.

8 changes: 5 additions & 3 deletions .github/scripts/set_test_package_matrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
set -euo pipefail
export RUNNER_COUNT=$1

if ((RUNNER_COUNT < 1 ))
if ((RUNNER_COUNT < 2 ))
then
echo ERROR: RUNNER_COUNT must be greater than zero.
echo ERROR: RUNNER_COUNT must be greater than 1. Otherwise use the non-split unit test cod in .github/workflows/reusable-unit.yml.
exit 1 # terminate and indicate error
else
EFFECTIVE_RUNNER_COUNT=$((RUNNER_COUNT-1))
fi

# set matrix var to list of unique packages containing tests
matrix="$(go list -json="ImportPath,TestGoFiles" ./... | jq --compact-output '. | select(.TestGoFiles != null) | .ImportPath' | shuf | jq --slurp --compact-output '.' | jq --argjson runnercount $RUNNER_COUNT -cM '[_nwise(length / $runnercount | ceil)]'))"
matrix="$(go list -json="ImportPath,TestGoFiles" ./... | jq --compact-output '. | select(.TestGoFiles != null) | select(.ImportPath != "github.com/hashicorp/consul/agent") | .ImportPath' | shuf | jq --slurp --compact-output '.' | jq --argjson runnercount $EFFECTIVE_RUNNER_COUNT -cM '[_nwise(length / $runnercount | ceil)]' | jq --compact-output '. += [["github.com/hashicorp/consul/agent"]]'))"

echo "matrix=${matrix}" >> "${GITHUB_OUTPUT}"
9 changes: 7 additions & 2 deletions .github/workflows/build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,13 @@ jobs:
name: Setup outputs
run: ./.github/scripts/get_runner_classes.sh

get-go-version:
uses: ./.github/workflows/reusable-get-go-version.yml

dev-build-push:
needs: setup
needs:
- setup
- get-go-version
runs-on: ${{ fromJSON(needs.setup.outputs.compute-large) }}
permissions:
id-token: write # NOTE: this permission is explicitly required for Vault auth.
Expand Down Expand Up @@ -65,7 +70,7 @@ jobs:

- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version-file: 'go.mod'
go-version: ${{ needs.get-go-version.outputs.go-version }}

- run: go env

Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/build-distros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,25 @@ jobs:
name: Setup outputs
run: ./.github/scripts/get_runner_classes.sh

get-go-version:
uses: ./.github/workflows/reusable-get-go-version.yml

check-go-mod:
needs:
- setup
- get-go-version
uses: ./.github/workflows/reusable-check-go-mod.yml
with:
runs-on: ${{ needs.setup.outputs.compute-medium }}
repository-name: ${{ github.repository }}
go-version: ${{ needs.get-go-version.outputs.go-version }}
secrets:
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}

build-386:
needs:
- setup
- get-go-version
- check-go-mod
env:
XC_OS: "freebsd linux windows"
Expand All @@ -63,7 +69,7 @@ jobs:

- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version-file: 'go.mod'
go-version: ${{ needs.get-go-version.outputs.go-version }}
- name: Build
run: |
for os in $XC_OS; do
Expand All @@ -73,6 +79,7 @@ jobs:
build-amd64:
needs:
- setup
- get-go-version
- check-go-mod
env:
XC_OS: "darwin freebsd linux solaris windows"
Expand All @@ -87,7 +94,7 @@ jobs:

- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version-file: 'go.mod'
go-version: ${{ needs.get-go-version.outputs.go-version }}
- name: Build
run: |
for os in $XC_OS; do
Expand All @@ -97,6 +104,7 @@ jobs:
build-arm:
needs:
- setup
- get-go-version
- check-go-mod
runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }}
env:
Expand All @@ -113,7 +121,7 @@ jobs:

- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version-file: 'go.mod'
go-version: ${{ needs.get-go-version.outputs.go-version }}
- run: |
sudo apt-get update --allow-releaseinfo-change-suite --allow-releaseinfo-change-version && sudo apt-get install -y gcc-arm-linux-gnueabi gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu
Expand All @@ -126,6 +134,7 @@ jobs:
if: ${{ endsWith(github.repository, '-enterprise') }}
needs:
- setup
- get-go-version
- check-go-mod
runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }}
steps:
Expand All @@ -137,7 +146,7 @@ jobs:

- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version-file: 'go.mod'
go-version: ${{ needs.get-go-version.outputs.go-version }}
- name: Build
run: GOOS=linux GOARCH=s390x CGO_ENABLED=0 go build -tags "${{ env.GOTAGS }}"

Expand Down
58 changes: 28 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ env:
GOPRIVATE: github.com/hashicorp # Required for enterprise deps

jobs:
get-go-version:
uses: ./.github/workflows/reusable-get-go-version.yml

set-product-version:
runs-on: ubuntu-latest
outputs:
Expand Down Expand Up @@ -81,32 +84,25 @@ jobs:
path: ${{ steps.generate-metadata-file.outputs.filepath }}

build:
needs: set-product-version
needs:
- set-product-version
- get-go-version
runs-on: ubuntu-latest
strategy:
matrix:
include:
- {go: "1.20.12",
goos: "linux", goarch: "386"}
- {go: "1.20.12",
goos: "linux", goarch: "amd64"}
- {go: "1.20.12",
goos: "linux", goarch: "arm"}
- {go: "1.20.12",
goos: "linux", goarch: "arm64"}
- {go: "1.20.12",
goos: "freebsd", goarch: "386"}
- {go: "1.20.12",
goos: "freebsd", goarch: "amd64"}
- {go: "1.20.12",
goos: "windows", goarch: "386"}
- {go: "1.20.12",
goos: "windows", goarch: "amd64"}
- {go: "1.20.12",
goos: "solaris", goarch: "amd64"}
- {goos: "linux", goarch: "386"}
- {goos: "linux", goarch: "amd64"}
- {goos: "linux", goarch: "arm"}
- {goos: "linux", goarch: "arm64"}
- {goos: "freebsd", goarch: "386"}
- {goos: "freebsd", goarch: "amd64"}
- {goos: "windows", goarch: "386"}
- {goos: "windows", goarch: "amd64"}
- {goos: "solaris", goarch: "amd64"}
fail-fast: true

name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build
name: Go ${{ needs.get-go-version.outputs.go-version }} ${{ matrix.goos }} ${{ matrix.goarch }} build
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

Expand Down Expand Up @@ -140,7 +136,7 @@ jobs:
with:
product_name: ${{ env.PKG_NAME }}
product_version: ${{ needs.set-product-version.outputs.product-version }}
go_version: ${{ matrix.go }}
go_version: ${{ needs.get-go-version.outputs.go-version }}
os: ${{ matrix.goos }}
arch: ${{ matrix.goarch }}
reproducible: report
Expand Down Expand Up @@ -186,17 +182,18 @@ jobs:
path: out/${{ env.DEB_PACKAGE }}

build-s390x:
needs: set-product-version
needs:
- set-product-version
- get-go-version
if: ${{ endsWith(github.repository, '-enterprise') }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- {go: "1.20.12",
goos: "linux", goarch: "s390x"}
- {goos: "linux", goarch: "s390x"}
fail-fast: true

name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build
name: Go ${{ needs.get-go-version.outputs.go-version }} ${{ matrix.goos }} ${{ matrix.goarch }} build
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

Expand Down Expand Up @@ -230,24 +227,25 @@ jobs:
with:
product_name: ${{ env.PKG_NAME }}
product_version: ${{ needs.set-product-version.outputs.product-version }}
go_version: ${{ matrix.go }}
go_version: ${{ needs.get-go-version.outputs.go-version }}
os: ${{ matrix.goos }}
arch: ${{ matrix.goarch }}
reproducible: report
instructions: |-
go build -ldflags="$GOLDFLAGS" -o "$BIN_PATH" -trimpath -buildvcs=false
build-darwin:
needs: set-product-version
needs:
- set-product-version
- get-go-version
runs-on: macos-latest
strategy:
matrix:
goos: [ darwin ]
goarch: [ "amd64", "arm64" ]
go: [ "1.20.12" ]
fail-fast: true

name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build
name: Go ${{ needs.get-go-version.outputs.go-version }} ${{ matrix.goos }} ${{ matrix.goarch }} build
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

Expand Down Expand Up @@ -279,7 +277,7 @@ jobs:
with:
product_name: ${{ env.PKG_NAME }}
product_version: ${{ needs.set-product-version.outputs.product-version }}
go_version: ${{ matrix.go }}
go_version: ${{ needs.get-go-version.outputs.go-version }}
os: ${{ matrix.goos }}
arch: ${{ matrix.goarch }}
reproducible: report
Expand Down
Loading

0 comments on commit ef4f130

Please sign in to comment.