Skip to content

Commit 1e062c7

Browse files
authored
Release/v0.8.7 (#124)
* Bump up GO version to 1.22.12 * Fix cpu extra load issue
1 parent d23711d commit 1e062c7

File tree

14 files changed

+22
-27
lines changed

14 files changed

+22
-27
lines changed

.github/workflows/binaries.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
needs:
5252
- draft-release
5353
env:
54-
X_GO_DISTRIBUTION: "https://go.dev/dl/go1.22.10.linux-amd64.tar.gz"
54+
X_GO_DISTRIBUTION: "https://go.dev/dl/go1.22.12.linux-amd64.tar.gz"
5555
APIFIREWALL_NAMESPACE: "github.com/wallarm/api-firewall"
5656
strategy:
5757
matrix:
@@ -162,7 +162,7 @@ jobs:
162162
needs:
163163
- draft-release
164164
env:
165-
X_GO_VERSION: "1.22.10"
165+
X_GO_VERSION: "1.22.12"
166166
APIFIREWALL_NAMESPACE: "github.com/wallarm/api-firewall"
167167
strategy:
168168
matrix:
@@ -272,19 +272,19 @@ jobs:
272272
include:
273273
- arch: armv6
274274
distro: bullseye
275-
go_distribution: https://go.dev/dl/go1.22.10.linux-armv6l.tar.gz
275+
go_distribution: https://go.dev/dl/go1.22.12.linux-armv6l.tar.gz
276276
artifact: armv6-libc
277277
- arch: aarch64
278278
distro: bullseye
279-
go_distribution: https://go.dev/dl/go1.22.10.linux-arm64.tar.gz
279+
go_distribution: https://go.dev/dl/go1.22.12.linux-arm64.tar.gz
280280
artifact: arm64-libc
281281
- arch: armv6
282282
distro: alpine_latest
283-
go_distribution: https://go.dev/dl/go1.22.10.linux-armv6l.tar.gz
283+
go_distribution: https://go.dev/dl/go1.22.12.linux-armv6l.tar.gz
284284
artifact: armv6-musl
285285
- arch: aarch64
286286
distro: alpine_latest
287-
go_distribution: https://go.dev/dl/go1.22.10.linux-arm64.tar.gz
287+
go_distribution: https://go.dev/dl/go1.22.12.linux-arm64.tar.gz
288288
artifact: arm64-musl
289289
steps:
290290
- uses: actions/[email protected]

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION := 0.8.6
1+
VERSION := 0.8.7
22
NAMESPACE := github.com/wallarm/api-firewall
33

44
.DEFAULT_GOAL := build

cmd/api-firewall/internal/handlers/api/updater.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"github.com/corazawaf/coraza/v3"
1010
"github.com/sirupsen/logrus"
1111
"github.com/valyala/fasthttp"
12+
1213
"github.com/wallarm/api-firewall/internal/config"
1314
"github.com/wallarm/api-firewall/internal/platform/allowiplist"
1415
"github.com/wallarm/api-firewall/internal/platform/router"

cmd/api-firewall/tests/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2864,7 +2864,7 @@ func (s *ServiceTests) testCustomHostHeader(t *testing.T) {
28642864
ipAddrs := []net.IPAddr{}
28652865
ipAddrs = append(ipAddrs, net.IPAddr{IP: net.IPv4(127, 0, 0, 1), Zone: ""})
28662866

2867-
s.dnsCache.EXPECT().LookupIPAddr(gomock.Any(), gomock.Any()).Return(ipAddrs, nil).Times(3)
2867+
s.dnsCache.EXPECT().LookupIPAddr(gomock.Any(), gomock.Any()).Return(ipAddrs, nil).Times(2)
28682868

28692869
options := proxy.Options{
28702870
InitialPoolCapacity: 1,

cmd/api-firewall/tests/updater_v2_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ type EntryV2 struct {
6262
Status string `db:"status"`
6363
}
6464

65-
func insertSpecV2(dbFilePath, newSpec string) (*EntryV2, error) {
65+
func insertSpecV2(dbFilePath, newSpec, state string) (*EntryV2, error) {
6666

6767
db, err := sql.Open("sqlite3", dbFilePath)
6868
if err != nil {
6969
return nil, err
7070
}
7171
defer db.Close()
7272

73-
q := fmt.Sprintf("INSERT INTO openapi_schemas(schema_version,schema_format,schema_content,status) VALUES ('1', 'yaml', '%s', 'new')", newSpec)
73+
q := fmt.Sprintf("INSERT INTO openapi_schemas(schema_version,schema_format,schema_content,status) VALUES ('1', 'yaml', '%s', '%s')", newSpec, state)
7474
_, err = db.Exec(q)
7575
if err != nil {
7676
return nil, err
@@ -141,7 +141,7 @@ func TestLoadBasicV2(t *testing.T) {
141141
var lock sync.RWMutex
142142

143143
// create DB entry with spec and status = 'new'
144-
entry, err := insertSpecV2(currentDBPath, testYamlSpecification)
144+
entry, err := insertSpecV2(currentDBPath, testYamlSpecification, "new")
145145
if err != nil {
146146
t.Fatal(err)
147147
}
@@ -250,7 +250,7 @@ func TestUpdaterBasicV2(t *testing.T) {
250250
}
251251

252252
// create DB entry with spec and status = 'new'
253-
entry, err := insertSpecV2(currentDBPath, testYamlSpecification)
253+
entry, err := insertSpecV2(currentDBPath, testYamlSpecification, "new")
254254
if err != nil {
255255
t.Fatal(err)
256256
}
@@ -1096,7 +1096,7 @@ func TestUpdaterFromV1DBToV2(t *testing.T) {
10961096

10971097
// prepare spec with status = 'new'
10981098
// create DB entry with spec and status = 'new'
1099-
entry, err := insertSpecV2(currentDBPath, testYamlSpecification)
1099+
entry, err := insertSpecV2(currentDBPath, testYamlSpecification, "new")
11001100
if err != nil {
11011101
t.Fatal(err)
11021102
}
0 Bytes
Binary file not shown.

demo/docker-compose/OWASP_CoreRuleSet/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: "3.8"
22
services:
33
api-firewall:
44
container_name: api-firewall
5-
image: wallarm/api-firewall:v0.8.6
5+
image: wallarm/api-firewall:v0.8.7
66
restart: on-failure
77
environment:
88
APIFW_URL: "http://0.0.0.0:8080"

demo/docker-compose/docker-compose-api-mode.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '3.8'
22
services:
33
api-firewall:
44
container_name: api-firewall
5-
image: wallarm/api-firewall:v0.8.6
5+
image: wallarm/api-firewall:v0.8.7
66
restart: on-failure
77
environment:
88
APIFW_MODE: "api"

demo/docker-compose/docker-compose-graphql-mode.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '3.8'
22
services:
33
api-firewall:
44
container_name: api-firewall
5-
image: wallarm/api-firewall:v0.8.6
5+
image: wallarm/api-firewall:v0.8.7
66
restart: on-failure
77
environment:
88
APIFW_MODE: "graphql"

demo/docker-compose/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: "3.8"
22
services:
33
api-firewall:
44
container_name: api-firewall
5-
image: wallarm/api-firewall:v0.8.6
5+
image: wallarm/api-firewall:v0.8.7
66
restart: on-failure
77
environment:
88
APIFW_URL: "http://0.0.0.0:8080"

0 commit comments

Comments
 (0)