Skip to content

Commit

Permalink
Dmaddu pipeline fix (#8569)
Browse files Browse the repository at this point in the history
* GOlang update to version 1.22.0

Signed-off-by: daveaugustus <[email protected]>

* golang v1.22.5

Signed-off-by: daveaugustus <[email protected]>

* Modified Go version in all the files

Signed-off-by: daveaugustus <[email protected]>

* Pipeline check

Signed-off-by: daveaugustus <[email protected]>

* Pipeline check

Signed-off-by: daveaugustus <[email protected]>

* Pipeline check

Signed-off-by: daveaugustus <[email protected]>

* Pipeline check

Signed-off-by: daveaugustus <[email protected]>

* proto check

Signed-off-by: daveaugustus <[email protected]>

* exported GOPROXY in license_scout

Signed-off-by: daveaugustus <[email protected]>

* Compiled protobuf with upgraded Golang v1.22.5

Signed-off-by: daveaugustus <[email protected]>

* Downgraded packages

Signed-off-by: daveaugustus <[email protected]>

* Protobuf compiles newly added messages and services

Signed-off-by: daveaugustus <[email protected]>

* Modified go mod downgrading some dependency for authz errors

Signed-off-by: daveaugustus <[email protected]>

* Added GOPROXY

Signed-off-by: daveaugustus <[email protected]>

* GOPROXY

Signed-off-by: daveaugustus <[email protected]>

* GOPROXY

Signed-off-by: daveaugustus <[email protected]>

* Downgraded linter

Signed-off-by: daveaugustus <[email protected]>

* Go linter modification

Signed-off-by: daveaugustus <[email protected]>

* Removed enable unused

Signed-off-by: daveaugustus <[email protected]>

* Added buf ignore

Signed-off-by: daveaugustus <[email protected]>

* Downgraded protoc-gen-validate

Signed-off-by: daveaugustus <[email protected]>

* package update

Signed-off-by: daveaugustus <[email protected]>

* Downgraded grpc gateway

Signed-off-by: daveaugustus <[email protected]>

* added google apis indirect dependency

Signed-off-by: daveaugustus <[email protected]>

* Regenerated code

Signed-off-by: daveaugustus <[email protected]>

* Modified unit test cases

Signed-off-by: daveaugustus <[email protected]>

* Added golangci

Signed-off-by: daveaugustus <[email protected]>

* Pipeline fix (#8563)

* removing unnecessary changes

Signed-off-by: Durga Sarat Chandra Maddu <[email protected]>

* fixing cert error message

Signed-off-by: Durga Sarat Chandra Maddu <[email protected]>

* updating the code

Signed-off-by: Durga Sarat Chandra Maddu <[email protected]>

---------

Signed-off-by: Durga Sarat Chandra Maddu <[email protected]>

* Yashvi/pipeline fix (#8565)

* Adding authn-service test cases fix

Signed-off-by: Yashvi Jain <[email protected]>

* Fixing unit test cases for infra proxy, function call  not needed

Signed-off-by: Yashvi Jain <[email protected]>

* Remving fault lines

Signed-off-by: Yashvi Jain <[email protected]>

* Adding changes for require statements

Signed-off-by: Yashvi Jain <[email protected]>

* Fix

Signed-off-by: Yashvi Jain <[email protected]>

* Adding string in conatins

Signed-off-by: Yashvi Jain <[email protected]>

* Adding test cases fix

Signed-off-by: Yashvi Jain <[email protected]>

* Changing equal from object to string

Signed-off-by: Yashvi Jain <[email protected]>

* Changing equal from object to string

Signed-off-by: Yashvi Jain <[email protected]>

* Changing equal from object to string

Signed-off-by: Yashvi Jain <[email protected]>

---------

Signed-off-by: Yashvi Jain <[email protected]>
Co-authored-by: Yashvi Jain <[email protected]>

* Downgrading the spinner package for correct result

Signed-off-by: Yashvi Jain <[email protected]>

* Dave/pipeline fix (#8564)

* downgraded packages

Signed-off-by: daveaugustus <[email protected]>

* upgraded linter

Signed-off-by: daveaugustus <[email protected]>

* downgraded elastic search package

Signed-off-by: daveaugustus <[email protected]>

* downgraded elastic search package

Signed-off-by: daveaugustus <[email protected]>

* increased timeout

Signed-off-by: daveaugustus <[email protected]>

* Added timeout for channels

Signed-off-by: daveaugustus <[email protected]>

* modified the test case

Signed-off-by: daveaugustus <[email protected]>

* Added timeout for channels

Signed-off-by: daveaugustus <[email protected]>

* Fixed pipeline closing issue ingest service

Signed-off-by: daveaugustus <[email protected]>

* fixed testcases ingest service

Signed-off-by: daveaugustus <[email protected]>

* Changes in for range

Signed-off-by: daveaugustus <[email protected]>

* Changes in for range

Signed-off-by: daveaugustus <[email protected]>

* Modified for loops

Signed-off-by: daveaugustus <[email protected]>

* error corrections

Signed-off-by: daveaugustus <[email protected]>

* reverted timeout

Signed-off-by: daveaugustus <[email protected]>

---------

Signed-off-by: daveaugustus <[email protected]>
Co-authored-by: daveaugustus <[email protected]>

* Compliance fix (#8566)

* defer channel close

Signed-off-by: daveaugustus <[email protected]>

* defer channel close

Signed-off-by: daveaugustus <[email protected]>

---------

Signed-off-by: daveaugustus <[email protected]>
Co-authored-by: daveaugustus <[email protected]>

* Yashvi/pipeline new (#8570)

* testing build

Signed-off-by: Yashvi Jain <[email protected]>

* testing build

Signed-off-by: Yashvi Jain <[email protected]>

* testing build

Signed-off-by: Yashvi Jain <[email protected]>

* testing build

Signed-off-by: Yashvi Jain <[email protected]>

* modified background context to todo in mock

Signed-off-by: Yashvi Jain <[email protected]>

---------

Signed-off-by: Yashvi Jain <[email protected]>
Co-authored-by: Yashvi Jain <[email protected]>

* test pipeline fix

Signed-off-by: Durga Sarat Chandra Maddu <[email protected]>

* proto difference helper code fix (#8571)

Signed-off-by: iamazzeez <[email protected]>

---------

Signed-off-by: daveaugustus <[email protected]>
Signed-off-by: Durga Sarat Chandra Maddu <[email protected]>
Signed-off-by: Yashvi Jain <[email protected]>
Signed-off-by: iamazzeez <[email protected]>
Co-authored-by: daveaugustus <[email protected]>
Co-authored-by: Yashvi Jain <[email protected]>
Co-authored-by: Yashvi Jain <[email protected]>
Co-authored-by: Augusutus <[email protected]>
Co-authored-by: Abdul Azeez <[email protected]>
  • Loading branch information
6 people authored Sep 5, 2024
1 parent 8c022fa commit 0972d45
Show file tree
Hide file tree
Showing 72 changed files with 2,772 additions and 2,138 deletions.
4 changes: 2 additions & 2 deletions .expeditor/generate-automate-cli-docs.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash
set -eou pipefail

# bumping expeditor to go 1.19
hab pkg install --binlink core/go19 --force
# bumping expeditor to go 1.22
hab pkg install --binlink core/go22 --force

pushd components/automate-cli
make docs
Expand Down
8 changes: 5 additions & 3 deletions .expeditor/license_scout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ log() {
echo "[$(date -u)] $*"
}

export GOPROXY="https://proxy.golang.org,direct "

# license_scout uses licensee internally. licensee reads OCTOKIT_ACCESS_TOKEN
# from the environment to make authenticated requests to github. This increases
# the API rate limits that github enforces. Our license checks now read so many
Expand Down Expand Up @@ -40,10 +42,10 @@ log_section_start "Installing License Scout"
gem install license_scout -v 2.5.1
log "Finished Installing License Scout"

log_section_start "Installing Go 1.19.3"
hab pkg install --force --binlink core/go19/1.19.3 && rm -rf /hab/cache && mkdir -p "$GOPATH/src" "$GOPATH/bin"
log_section_start "Installing Go 1.22.5"
hab pkg install --force --binlink core/go22/1.22.5 && rm -rf /hab/cache && mkdir -p "$GOPATH/src" "$GOPATH/bin"
go version
log "Finished Installing Go 1.19.3"
log "Finished Installing Go 1.22.5"

log_section_start "Installing Chef UI Library dependencies"
pushd components/chef-ui-library
Expand Down
6 changes: 5 additions & 1 deletion .expeditor/verify.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ env:
DOCKER_CONFIG: /var/lib/buildkite-agent/.docker
HAB_BLDR_CHANNEL: "stable"
HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL: "stable"

# Use the Go module mirror and checksum database by default.
# See https://proxy.golang.org for details.
GOPROXY: "https://proxy.golang.org,direct"
GOSUMDB: "sum.golang.org"

expeditor:
defaults:
executor:
Expand Down
6 changes: 5 additions & 1 deletion .expeditor/verify_private.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ env:
DOCKER_CONFIG: /var/lib/buildkite-agent/.docker
HAB_BLDR_CHANNEL: "stable"
HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL: "stable"

# Use the Go module mirror and checksum database by default.
# See https://proxy.golang.org for details.
GOPROXY: "https://proxy.golang.org,direct"
GOSUMDB: "sum.golang.org"

expeditor:
defaults:
executor:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.19.3'
go-version: '1.22.5'
- name: Test and coverage
run: tools/go_coverage_report.sh
- name: SonarQube Scan
Expand Down
7 changes: 7 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,10 @@ linters:
- nilerr
- nonamedreturns
- predeclared
- protogetter
- tagalign
- depguard
- govet
- inamedparam
- mnd
- perfsprint
2 changes: 1 addition & 1 deletion .studio/common
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function link_component_bin() {
}

function desired_golang_ident() {
echo "core/go19/$(cat /src/GOLANG_VERSION)"
echo "core/go22/$(cat /src/GOLANG_VERSION)"
}

function verify_components_have_platform_config() {
Expand Down
2 changes: 1 addition & 1 deletion .studio/compliance-service
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ function load_scan_jobs() {
# shellcheck disable=SC1091
source dev/secrets-env.sh
pushd dev-docs/adding-data &> /dev/null
install_if_missing core/go19 go
iinstall_if_missing core/go22 go
go run add_scanjobs.go
popd &> /dev/null
fi
Expand Down
2 changes: 2 additions & 0 deletions .studio/protobuf
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ function compile_all_protobuf_components_nolint() {
local components

install_if_missing core/git git
export GOPROXY="https://proxy.golang.org,direct"
export GOSUMDB="sum.golang.org"
components=()
read -d "\n" -ra components <<< "$(git ls-files '*/scripts/grpc.sh' | awk -F/ '!/api/{print $2}')"
# Note 2019/02/05 (sr): "api" doesn't fit in the folder structure, so it's
Expand Down
6 changes: 4 additions & 2 deletions .studiorc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export HAB_ORIGIN=${HAB_ORIGIN:-chef}
# Bring studio-common to life
RECOMMENDED_HAB_VERSION="1.6.521"

GOLANGCILINTVERSION=1.50.1
GOLANGCILINTVERSION=1.60.1

# TODO(ssd) 2019-11-19: https://github.com/habitat-sh/habitat/issues/7219
unset SSL_CERT_FILE
Expand All @@ -30,6 +30,8 @@ export GATEWAY_PORT=2000
# Compiling with cgo require gcc to be in our path. We don't typically
# use cgo so we set CGO_ENABLED=0 by default in the studio.
export CGO_ENABLED=0
export GOPROXY="https://proxy.golang.org,direct"
export GOSUMDB="sum.golang.org"

# Go >= 1.13 will assume this but we have tools like protoc extensions that
# look for it.
Expand Down Expand Up @@ -290,4 +292,4 @@ cleanup() {
}

# When exiting the studio save the bash history to a file
trap cleanup EXIT
trap cleanup EXIT
2 changes: 1 addition & 1 deletion GOLANG_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.19.3
1.22.5
4 changes: 2 additions & 2 deletions Makefile.common_go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ endif
ifeq ($(UNAME_S),Darwin)
PLATFORM:=darwin-amd64
endif
GOLANGCILINTVERSION?=1.50.1
GOLANGCILINTVERSION?=1.60.1
GOLANGCILINTTARBALL:=golangci-lint-$(GOLANGCILINTVERSION)-$(PLATFORM).tar.gz

LINTERARGS?=./...
Expand Down Expand Up @@ -63,4 +63,4 @@ semgrep-and-fix:
# semgrep --config $(REPOROOT)/.semgrep $(SEMGREP_IGNORE) --autofix
semgrep --config $(SEMGREP_CONFIG) $(SEMGREP_IGNORE) --autofix

.PHONY: lint fmt fmt-check golang_version_check semgrep semgrep-and-fix
.PHONY: lint fmt fmt-check golang_version_check semgrep semgrep-and-fix
4 changes: 2 additions & 2 deletions api/config/elasticsearch/config_request.pb.a2svc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions api/config/opensearch/config_request.pb.a2svc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 14 additions & 11 deletions api/external/go.mod
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
module github.com/chef/automate/api/external

go 1.19
go 1.22.5

replace google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884

require (
github.com/golang/mock v1.4.4
github.com/golang/protobuf v1.4.3
github.com/golang/mock v1.1.1
github.com/golang/protobuf v1.5.0
github.com/grpc-ecosystem/grpc-gateway v1.14.6
github.com/lib/pq v1.10.7
github.com/lib/pq v1.10.9
github.com/olivere/elastic/v7 v7.0.28
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.6.0
github.com/stretchr/testify v1.7.0
google.golang.org/genproto v0.0.0-20200901141002-b3bf27a9dbd1
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.9.0
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013
google.golang.org/grpc v1.33.2
google.golang.org/protobuf v1.25.0
google.golang.org/protobuf v1.28.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/net v0.0.0-20210614182718-04defd469f4e // indirect
golang.org/x/sys v0.0.0-20210423082822-04245dca01da // indirect
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
golang.org/x/text v0.3.6 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace google.golang.org/protobuf => google.golang.org/protobuf v1.28.0
Loading

0 comments on commit 0972d45

Please sign in to comment.