Skip to content

Commit

Permalink
WHFHRI-765 Update requirements, support 2.x (#69)
Browse files Browse the repository at this point in the history
* Update requirements
* Updates to Golang and packages
* Update Ruby Gems
Signed-off-by: Alisa Kotliarova <[email protected]>

Co-authored-by: Alisa Kotliarova <[email protected]>
  • Loading branch information
alisakotliarova and Alisa Kotliarova authored Mar 2, 2022
1 parent b3d76f9 commit 0c701a8
Show file tree
Hide file tree
Showing 27 changed files with 462 additions and 98 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ jobs:
- name: Set Branch Name
uses: nelonoel/[email protected]

- name: Install Go 1.15
- name: Install Go 1.17
uses: actions/setup-go@v2
with:
go-version: ^1.15
go-version: ^1.17

- name: Check out code into the Go module directory
uses: actions/checkout@v2
Expand Down Expand Up @@ -119,10 +119,10 @@ jobs:
echo IMAGE_ID=$IMAGE_ID:$VERSION
echo "IMAGE_ID=$IMAGE_ID:$VERSION" >> $GITHUB_ENV
- name: Install Go 1.15
- name: Install Go 1.17
uses: actions/setup-go@v2
with:
go-version: ^1.15
go-version: ^1.17

- name: Build HRI Executable and Run Unit Tests
run: make bins
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code-scans.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ^1.15
go-version: ^1.17

- name: Unit Tests and Coverage
run: make test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ^1.15
go-version: ^1.17

- name: Check Dependencies
# override default -eo pipefail
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
echo IMAGE_ID=$IMAGE_ID:$VERSION
echo "IMAGE_ID=$IMAGE_ID:$VERSION" >> $GITHUB_ENV
- name: Install Go 1.15
- name: Install Go 1.17
uses: actions/setup-go@v2
with:
go-version: ^1.15
go-version: ^1.17

- name: Build HRI Executable and Run Unit Tests
run: make bins
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# This creates an IBM Function's zipped actionloop executable for every *.go file in the base src/ directory.
# Each of these files should have a 'main' method and use common/actionloopmin to implement the actionloop protocol.
# Also '// +build !tests' must be at the beginning of the file, so it is excluded from tests.
# Also '//go:build !tests' must be at the beginning of the file, so it is excluded from tests.
MAINS:= $(wildcard src/*.go)
BUILD:=build
BIN:=$(MAINS:src/%.go=$(BUILD)/%-bin.zip)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This version is compatible with HRI `v2.1`.

### Prerequisites

* Golang 1.15 - you can use an official [distribution](https://golang.org/dl/) or a package manager like `homebrew` for mac
* Golang 1.17 - you can use an official [distribution](https://golang.org/dl/) or a package manager like `homebrew` for mac
* Make - should come pre-installed on MacOS and Linux
* [GoMock latest](https://github.com/golang/mock) released version. Installation:
run `$ GO111MODULE=on go get github.com/golang/mock/mockgen@latest`. See [GoMock docs](https://github.com/golang/mock).
Expand Down
30 changes: 15 additions & 15 deletions mgmt-api-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,91 +8,91 @@ packages:
actions:
create_batch:
function: build/batches_create-bin.zip
runtime: go:1.15
runtime: go:1.17
web-export: true
annotations:
require-whisk-auth: $FN_WEB_SECURE_KEY
get_batches:
function: build/batches_get-bin.zip
runtime: go:1.15
runtime: go:1.17
web-export: true
annotations:
require-whisk-auth: $FN_WEB_SECURE_KEY
get_batch_by_id:
function: build/batches_get_by_id-bin.zip
runtime: go:1.15
runtime: go:1.17
web-export: true
annotations:
require-whisk-auth: $FN_WEB_SECURE_KEY
healthcheck:
function: build/healthcheck_get-bin.zip
runtime: go:1.15
runtime: go:1.17
web-export: true
annotations:
require-whisk-auth: $FN_WEB_SECURE_KEY
send_complete:
function: build/batches_sendcomplete-bin.zip
runtime: go:1.15
runtime: go:1.17
web-export: true
annotations:
require-whisk-auth: $FN_WEB_SECURE_KEY
processing_complete:
function: build/batches_processingcomplete-bin.zip
runtime: go:1.15
runtime: go:1.17
web-export: true
annotations:
require-whisk-auth: $FN_WEB_SECURE_KEY
terminate_batch:
function: build/batches_terminate-bin.zip
runtime: go:1.15
runtime: go:1.17
web-export: true
annotations:
require-whisk-auth: $FN_WEB_SECURE_KEY
fail_batch:
function: build/batches_fail-bin.zip
runtime: go:1.15
runtime: go:1.17
web-export: true
annotations:
require-whisk-auth: $FN_WEB_SECURE_KEY
create_tenant:
function: build/tenants_create-bin.zip
runtime: go:1.15
runtime: go:1.17
web-export: true
annotations:
require-whisk-auth: $FN_WEB_SECURE_KEY
get_tenants:
function: build/tenants_get-bin.zip
runtime: go:1.15
runtime: go:1.17
web-export: true
annotations:
require-whisk-auth: $FN_WEB_SECURE_KEY
get_tenant_by_id:
function: build/tenants_get_by_id-bin.zip
runtime: go:1.15
runtime: go:1.17
web-export: true
annotations:
require-whisk-auth: $FN_WEB_SECURE_KEY
delete_tenant:
function: build/tenants_delete-bin.zip
runtime: go:1.15
runtime: go:1.17
web-export: true
annotations:
require-whisk-auth: $FN_WEB_SECURE_KEY
get_streams:
function: build/streams_get-bin.zip
runtime: go:1.15
runtime: go:1.17
web-export: true
annotations:
require-whisk-auth: $FN_WEB_SECURE_KEY
create_stream:
function: build/streams_create-bin.zip
runtime: go:1.15
runtime: go:1.17
web-export: true
annotations:
require-whisk-auth: $FN_WEB_SECURE_KEY
delete_stream:
function: build/streams_delete-bin.zip
runtime: go:1.15
runtime: go:1.17
web-export: true
annotations:
require-whisk-auth: $FN_WEB_SECURE_KEY
Expand Down
2 changes: 1 addition & 1 deletion src/batches_create.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !tests
//go:build !tests

/**
* (C) Copyright IBM Corp. 2020
Expand Down
2 changes: 1 addition & 1 deletion src/batches_fail.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !tests
//go:build !tests

/*
* (C) Copyright IBM Corp. 2020
Expand Down
2 changes: 1 addition & 1 deletion src/batches_get.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !tests
//go:build !tests

/**
* (C) Copyright IBM Corp. 2020
Expand Down
2 changes: 1 addition & 1 deletion src/batches_get_by_id.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !tests
//go:build !tests

/**
* (C) Copyright IBM Corp. 2020
Expand Down
2 changes: 1 addition & 1 deletion src/batches_processingcomplete.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !tests
//go:build !tests

/*
* (C) Copyright IBM Corp. 2020
Expand Down
2 changes: 1 addition & 1 deletion src/batches_sendcomplete.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !tests
//go:build !tests

/**
* (C) Copyright IBM Corp. 2020
Expand Down
2 changes: 1 addition & 1 deletion src/batches_terminate.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !tests
//go:build !tests

/**
* (C) Copyright IBM Corp. 2020
Expand Down
2 changes: 1 addition & 1 deletion src/common/kafka/read_partitions_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !tests
//go:build !tests

/**
* (C) Copyright IBM Corp. 2020
Expand Down
2 changes: 1 addition & 1 deletion src/exec.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
openwhisk/action-golang-v1.15
openwhisk/action-golang-v1.17
29 changes: 21 additions & 8 deletions src/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,27 @@ require (
github.com/IBM/resource-controller-go-sdk-generator v1.0.1
github.com/coreos/go-oidc v2.2.1+incompatible
github.com/elastic/go-elasticsearch/v7 v7.11.0
github.com/golang/mock v1.5.0
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect
github.com/segmentio/kafka-go v0.3.5
github.com/stretchr/testify v1.6.1
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a // indirect
golang.org/x/net v0.0.0-20210614182718-04defd469f4e //indirect
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
github.com/golang/mock v1.6.0
github.com/pquerna/cachecontrol v0.1.0 // indirect
github.com/segmentio/kafka-go v0.4.28
github.com/stretchr/testify v1.7.0
golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
gopkg.in/square/go-jose.v2 v2.4.1 // indirect
)

go 1.15
require (
github.com/antihax/optional v1.0.0 // indirect
github.com/davecgh/go-spew v1.1.0 // indirect
github.com/golang/protobuf v1.4.2 // indirect
github.com/golang/snappy v0.0.1 // indirect
github.com/klauspost/compress v1.9.8 // indirect
github.com/pierrec/lz4 v2.6.0+incompatible // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/protobuf v1.25.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
)

go 1.17
Loading

0 comments on commit 0c701a8

Please sign in to comment.