Skip to content

Commit d341ae5

Browse files
authoredAug 7, 2024··
fix: upgrade cloudevents to latest if on go1.18 or later (#248)
go1.11-go1.17 are deprecated cloud functions runtimes (https://cloud.google.com/functions/docs/runtime-support#go), and will be decomissioned in January 2025. Additionally, cloudevents hasn't supported go earlier than 1.18 for a while. Upgrading cloudevents fixes a vulnerability in jackson. So, upgrade everything. Fixes #247
1 parent b8c2a57 commit d341ae5

File tree

7 files changed

+28
-2856
lines changed

7 files changed

+28
-2856
lines changed
 

‎.github/workflows/buildpack-integration-test.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
cloudevent-builder-source: 'testdata/conformance/function'
2424
cloudevent-builder-target: 'declarativeCloudEvent'
2525
prerun: ${{format('testdata/conformance/prerun.sh {0} testdata/conformance/function', github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha )}}
26-
builder-runtime: 'go113'
27-
builder-runtime-version: '1.13'
26+
builder-runtime: 'go118'
27+
builder-runtime-version: '1.18'
2828
builder-url: gcr.io/gae-runtimes/buildpacks/google-gae-22/go/builder:latest
2929
go116-buildpack-test:
3030
if: github.event.pull_request.head.repo.full_name == github.repository
@@ -35,8 +35,8 @@ jobs:
3535
cloudevent-builder-source: 'testdata/conformance/function'
3636
cloudevent-builder-target: 'declarativeCloudEvent'
3737
prerun: ${{format('testdata/conformance/prerun.sh {0} testdata/conformance/function', github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha )}}
38-
builder-runtime: 'go116'
39-
builder-runtime-version: '1.16'
38+
builder-runtime: 'go120'
39+
builder-runtime-version: '1.20'
4040
builder-url: gcr.io/gae-runtimes/buildpacks/google-gae-22/go/builder:latest
4141
non-declarative-buildpack-test:
4242
if: github.event.pull_request.head.repo.full_name == github.repository
@@ -47,6 +47,6 @@ jobs:
4747
cloudevent-builder-source: 'testdata/conformance/nondeclarative'
4848
cloudevent-builder-target: 'CloudEvent'
4949
prerun: ${{format('testdata/conformance/prerun.sh {0} testdata/conformance/nondeclarative', github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha )}}
50-
builder-runtime: 'go116'
51-
builder-runtime-version: '1.16'
52-
builder-url: gcr.io/gae-runtimes/buildpacks/google-gae-22/go/builder:latest
50+
builder-runtime: 'go118'
51+
builder-runtime-version: '1.18'
52+
builder-url: gcr.io/gae-runtimes/buildpacks/google-gae-22/go/builder:latest

‎.github/workflows/conformance.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
runs-on: ubuntu-latest
5151
strategy:
5252
matrix:
53-
go-version: [1.13, 1.16, 1.18]
53+
go-version: ['1.18', '1.20']
5454
steps:
5555
- name: Harden Runner
5656
uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0
@@ -120,4 +120,4 @@ jobs:
120120
-buildpacks=false \
121121
-start-delay=5 \
122122
-cmd="go run testdata/conformance/cmd/declarative/main.go" \
123-
-validate-concurrency=true
123+
-validate-concurrency=true

‎.github/workflows/lint.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,8 @@ jobs:
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
matrix:
15-
go: ['1.13', '1.16', '1.18']
15+
go: ['1.18', '1.20', '1.20']
1616
os: [ubuntu-latest, macos-latest] # windows-latest doesn't support find -wholename
17-
exclude:
18-
- os: macos-latest
19-
go: 1.13
2017
steps:
2118
- name: Harden Runner
2219
uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0

‎.github/workflows/unit.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,8 @@ jobs:
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
matrix:
15-
go: ['1.13' ,'1.16', '1.18', '1.19', '1.20', '1.21']
15+
go: ['1.18', '1.19', '1.20', '1.21']
1616
os: [ubuntu-latest, macos-latest, windows-latest]
17-
exclude:
18-
- os: macos-latest
19-
go: 1.13
2017
steps:
2118
- name: Harden Runner
2219
uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0

‎README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Functions Framework for Go
22

3-
[![GoDoc](https://godoc.org/github.com/GoogleCloudPlatform/functions-framework-go?status.svg)](http://godoc.org/github.com/GoogleCloudPlatform/functions-framework-go) [![Go version](https://img.shields.io/badge/go-v1.11+-blue)](https://golang.org/dl/#stable)
3+
[![GoDoc](https://godoc.org/github.com/GoogleCloudPlatform/functions-framework-go?status.svg)](http://godoc.org/github.com/GoogleCloudPlatform/functions-framework-go) [![Go version](https://img.shields.io/badge/go-v1.18+-blue)](https://golang.org/dl/#stable)
44

55
[![Go unit CI][ff_go_unit_img]][ff_go_unit_link] [![Go lint CI][ff_go_lint_img]][ff_go_lint_link] [![Go conformace CI][ff_go_conformance_img]][ff_go_conformance_link] ![Security Scorecard](https://api.securityscorecards.dev/projects/github.com/GoogleCloudPlatform/functions-framework-go/badge)
66

@@ -44,7 +44,7 @@ handling logic.
4444

4545
## Quickstart: Hello, World on your local machine
4646

47-
1. Install Go 1.11+.
47+
1. Install Go 1.18+.
4848

4949
1. Create a Go module:
5050
```sh

‎go.mod

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
module github.com/GoogleCloudPlatform/functions-framework-go
22

3-
go 1.11
3+
go 1.18
44

55
require (
66
cloud.google.com/go/functions v1.16.2
7-
cloud.google.com/go/logging v1.10.0 // indirect
8-
github.com/cloudevents/sdk-go/v2 v2.14.0
7+
github.com/cloudevents/sdk-go/v2 v2.15.2
98
github.com/google/go-cmp v0.6.0
109
)
10+
11+
require (
12+
github.com/google/uuid v1.6.0 // indirect
13+
github.com/json-iterator/go v1.1.10 // indirect
14+
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
15+
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 // indirect
16+
go.uber.org/atomic v1.4.0 // indirect
17+
go.uber.org/multierr v1.1.0 // indirect
18+
go.uber.org/zap v1.10.0 // indirect
19+
)

‎go.sum

+3-2,834
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.