From 9d0106432cf467806b17aa035309e5f72973adb5 Mon Sep 17 00:00:00 2001 From: Julio Guerra Date: Wed, 17 Feb 2021 13:14:42 +0100 Subject: [PATCH 1/6] agent/config: use the proxy entry as an http proxy too --- internal/backend/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/backend/client.go b/internal/backend/client.go index 06b4a24..680f352 100644 --- a/internal/backend/client.go +++ b/internal/backend/client.go @@ -50,9 +50,10 @@ func NewClient(baseURL string, proxy string, logger plog.DebugLevelLogger) (*Cli transport = (http.DefaultTransport).(*http.Transport) } else { // Use the settings. - logger.Infof("client: using configured https proxy `%s`", proxy) + logger.Infof("client: using configured https and http proxy `%s`", proxy) proxyCfg := httpproxy.Config{ HTTPSProxy: proxy, + HTTPProxy: proxy, } proxyURL := proxyCfg.ProxyFunc() proxy := func(req *http.Request) (*url.URL, error) { From 02418051f000b1bcd77adeff034a61d6e5337a29 Mon Sep 17 00:00:00 2001 From: Julio Guerra Date: Wed, 17 Feb 2021 13:20:48 +0100 Subject: [PATCH 2/6] ci: add go1.16 to the test matrix --- .github/workflows/agent-tests.yaml | 4 ++-- .github/workflows/example-apps.yaml | 2 +- CHANGELOG.md | 6 ++++++ internal/version/version.go | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/agent-tests.yaml b/.github/workflows/agent-tests.yaml index 9735133..f38b8a6 100644 --- a/.github/workflows/agent-tests.yaml +++ b/.github/workflows/agent-tests.yaml @@ -8,7 +8,7 @@ jobs: strategy: matrix: runs-on: [ macos-latest, ubuntu-latest, windows-latest ] - go-version: [ 1, 1.15, 1.14, 1.13, 1.12 ] + go-version: [ 1, 1.16, 1.15, 1.14, 1.13, 1.12 ] go-test-options: - "" - "-tags sqassert -race" @@ -27,7 +27,7 @@ jobs: golang-linux-container: strategy: matrix: - go-version: [ 1, 1.15, 1.14, 1.13, 1.12 ] + go-version: [ 1, 1.16, 1.15, 1.14, 1.13, 1.12 ] distribution: [ alpine, buster ] fail-fast: false runs-on: ubuntu-latest diff --git a/.github/workflows/example-apps.yaml b/.github/workflows/example-apps.yaml index 6a3f57c..f38992b 100644 --- a/.github/workflows/example-apps.yaml +++ b/.github/workflows/example-apps.yaml @@ -9,7 +9,7 @@ jobs: strategy: matrix: example: [ alpine, debian, scratch ] - go-version: [ rc, 1.14, 1.13, 1.12 ] + go-version: [ rc, 1.16, 1.15, 1.14, 1.13, 1.12 ] do-vendoring: [ true, false ] runs-on: ubuntu-latest steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index ef04157..45f126a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v1.0.2 - 17 February 2021 + +## Fix + +- Use the configuration key `proxy` both as an HTTP and HTTPS proxy setting. + # v1.0.1 - 16 February 2021 ## Fix diff --git a/internal/version/version.go b/internal/version/version.go index 10749c0..7521485 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -4,6 +4,6 @@ package version -const version = "1.0.1" +const version = "1.0.2" func Version() string { return version } From db0bf977e0bde1219fcafa4b1dde2cceaa2a1afb Mon Sep 17 00:00:00 2001 From: Julio Guerra Date: Wed, 17 Feb 2021 21:07:36 +0100 Subject: [PATCH 3/6] sdk/sqreen-instrumentation-tool: log the hook list file path --- sdk/sqreen-instrumentation-tool/instrumentation.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/sqreen-instrumentation-tool/instrumentation.go b/sdk/sqreen-instrumentation-tool/instrumentation.go index 48e5108..cdcae60 100644 --- a/sdk/sqreen-instrumentation-tool/instrumentation.go +++ b/sdk/sqreen-instrumentation-tool/instrumentation.go @@ -364,7 +364,7 @@ func (m *mainPackageInstrumentation) writeHookTable() (string, error) { return "", err } defer hookTableFile.Close() - log.Printf("creating the hook table for %d hooks into `%s`", len(hooks), hookTableFile.Name()) + log.Printf("creating the hook table for %d hooks from `%s` into `%s`", m.hookListFilepath, len(hooks), hookTableFile.Name()) if err := writeHookTable(hookTableFile, hooks); err != nil { return "", err } From fe526dc6696b735912af585d2565de45035dc96c Mon Sep 17 00:00:00 2001 From: Julio Guerra Date: Wed, 17 Feb 2021 23:41:42 +0100 Subject: [PATCH 4/6] sdk/sqreen-instrumentation-tool: log the hook list file path --- sdk/sqreen-instrumentation-tool/instrumentation.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/sqreen-instrumentation-tool/instrumentation.go b/sdk/sqreen-instrumentation-tool/instrumentation.go index cdcae60..c31b605 100644 --- a/sdk/sqreen-instrumentation-tool/instrumentation.go +++ b/sdk/sqreen-instrumentation-tool/instrumentation.go @@ -364,7 +364,7 @@ func (m *mainPackageInstrumentation) writeHookTable() (string, error) { return "", err } defer hookTableFile.Close() - log.Printf("creating the hook table for %d hooks from `%s` into `%s`", m.hookListFilepath, len(hooks), hookTableFile.Name()) + log.Printf("creating the hook table for %d hooks from `%s` into `%s`", len(hooks), m.hookListFilepath, hookTableFile.Name()) if err := writeHookTable(hookTableFile, hooks); err != nil { return "", err } From 3d75b470c13504f86ba7b906b011239d8a7892e6 Mon Sep 17 00:00:00 2001 From: Julio Guerra Date: Thu, 18 Feb 2021 00:03:36 +0100 Subject: [PATCH 5/6] sdk/sqreen-instrumentation-tool: use filepath.Join rather than path.Join for proper windows filepaths --- sdk/sqreen-instrumentation-tool/instrumentation.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sdk/sqreen-instrumentation-tool/instrumentation.go b/sdk/sqreen-instrumentation-tool/instrumentation.go index c31b605..4cb20ba 100644 --- a/sdk/sqreen-instrumentation-tool/instrumentation.go +++ b/sdk/sqreen-instrumentation-tool/instrumentation.go @@ -12,7 +12,6 @@ import ( "io/ioutil" "log" "os" - "path" "path/filepath" "strings" @@ -157,7 +156,7 @@ type defaultPackageInstrumentation struct { } func newDefaultPackageInstrumentation(pkgPath string, fullInstrumentation bool, packageBuildDir string) *defaultPackageInstrumentation { - projectBuildDir := path.Join(packageBuildDir, "..") + projectBuildDir := filepath.Join(packageBuildDir, "..") hookListFilepath := getHookListFilepath(projectBuildDir) return &defaultPackageInstrumentation{ From 621877c8a5ab8ce21bd1224e2285ff2b01d032a1 Mon Sep 17 00:00:00 2001 From: Julio Guerra Date: Thu, 18 Feb 2021 00:08:24 +0100 Subject: [PATCH 6/6] doc: changelog update --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45f126a..f1645ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,11 @@ ## Fix -- Use the configuration key `proxy` both as an HTTP and HTTPS proxy setting. +- Configuration: + Use the configuration key `proxy` both as an HTTP and HTTPS proxy setting. + +- `sdk/sqreen-instrumentation-tool`: + Fix filepath generation on Windows. # v1.0.1 - 16 February 2021