Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/actions/install-relay/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Install Relay
description: "Installs Relay's Go module using normal Go tooling."
inputs:
go-version:
description: 'Go version to use for installation.'
description: "Go version to use for installation."
required: true
relay-major:
description: "Relay major version to install, e.g. 'v8'."
description: "Relay major version to install, e.g. 'v9'."
required: false
relay-version:
description: "Relay semver to install e.g. 'latest'."
Expand All @@ -26,7 +26,7 @@ runs:
MAJOR: ${{ inputs.relay-major }}
SEMVER: ${{ inputs.relay-version }}
run: |
echo "major=${MAJOR:-v8}" >> $GITHUB_OUTPUT
echo "major=${MAJOR:-v9}" >> $GITHUB_OUTPUT
echo "semver=${SEMVER:-latest}" >> $GITHUB_OUTPUT

- name: Install Relay ${{ steps.rv.outputs.major }}/${{ steps.rv.outputs.semver }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/check-alpine-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: v8
ref: v9

- name: Get current Alpine version
id: alpine-current
Expand Down Expand Up @@ -47,17 +47,17 @@ jobs:
commit-message: "Bumps from ${{ steps.alpine-current.outputs.version }} -> alpine:${{ steps.alpine-latest.outputs.version }}"
body: |
It's time to update Relay's Docker image Alpine versions. Alpine updates should generally be consumed
as soon as possible since they contain patches for CVEs.
as soon as possible since they contain patches for CVEs.


| | Current repo configuration | Desired repo configuration |
|-------------|------------------------------------|---------------------------------------------------------------------------------------------------------------------|
| Alpine Version | ${{ steps.alpine-current.outputs.version }} | [alpine:${{ steps.alpine-latest.outputs.version }}](https://hub.docker.com/_/alpine/tags) |


This PR's change was generated by running:
```bash
./scripts/update-alpine-version.sh ${{ steps.alpine-latest.outputs.version }}
```

- [ ] I have triggered CI on this PR (either close & reopen this PR in Github UI, or `git commit -m "run ci" --allow-empty && git push`)
21 changes: 10 additions & 11 deletions .github/workflows/check-go-versions.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: Check Supported Go Versions
on:
schedule:
- cron: "0 17 * * *"
- cron: "0 17 * * *"
workflow_dispatch:

jobs:
check-go-eol:
runs-on: ubuntu-latest
outputs:
latest: ${{ steps.parse.outputs.latest }}
penultimate: ${{ steps.parse.outputs.penultimate }}
latest: ${{ steps.parse.outputs.latest }}
penultimate: ${{ steps.parse.outputs.penultimate }}
timeout-minutes: 2
steps:
- uses: actions/checkout@v4
Expand All @@ -28,7 +28,6 @@ jobs:
echo "latest=${{ fromJSON(env.fetch-api-data)[0].latest }}" >> $GITHUB_OUTPUT
echo "penultimate=${{ fromJSON(env.fetch-api-data)[1].latest }}" >> $GITHUB_OUTPUT


create-prs:
permissions:
contents: write
Expand All @@ -41,11 +40,11 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: v8
ref: v9

- name: Get current Go versions
id: go-versions
run: cat ./.github/variables/go-versions.env > $GITHUB_OUTPUT
run: cat ./.github/variables/go-versions.env > $GITHUB_OUTPUT

- name: Run update script
if: steps.go-versions.outputs.latest != env.officialLatestVersion
Expand All @@ -69,10 +68,10 @@ jobs:
body: |
It's time to update Relay's supported Go versions, due to a recent upstream Go release.

The Go major release cadence is ~every 6 months; the two most recent major versions are supported.
Note that between major releases, the Go team often ships multiple minor versions.
The Go major release cadence is ~every 6 months; the two most recent major versions are supported.
Note that between major releases, the Go team often ships multiple minor versions.


| | Current repo configuration | Desired repo configuration |
|-------------|------------------------------------|---------------------------------------------------------------------------------------------------------------------|
| Latest | ${{ steps.go-versions.outputs.latest }} | [${{ env.officialLatestVersion }}](https://go.dev/doc/devel/release#go${{ env.officialLatestVersion }}) |
Expand All @@ -83,5 +82,5 @@ jobs:
```bash
./scripts/update-go-release-version.sh ${{ env.officialLatestVersion }} ${{ env.officialPenultimateVersion }}
```

- [ ] I have triggered CI on this PR (either close & reopen this PR in Github UI, or `git commit -m "run ci" --allow-empty && git push`)
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: CI
on:
push:
branches: ["v8"]
branches: ["v9"]
paths-ignore:
- "**.md" # Don't run CI on markdown changes.
pull_request:
branches: ["v8", "feat/**"]
branches: ["v9", "feat/**"]
paths-ignore:
- "**.md"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/daily-installation-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
go-version: ${{ fromJson(needs.go-versions.outputs.matrix) }}
relay-major: ['v7', 'v8']
relay-major: ['v7', 'v8', 'v9']
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/daily-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fail-fast: false
matrix:
environment: ['staging', 'production']
branch: ['v8']
branch: ['v9']

uses: ./.github/workflows/integration-test.yml
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/daily-security-scan-alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
scan-relay:
strategy:
matrix:
tag: ['latest', 'latest-alpine', 'v8', 'v8-alpine']
tag: ["latest", "latest-alpine", "v9", "v9-alpine"]
fail-fast: false
runs-on: ubuntu-latest
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/daily-security-scan-distroless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
scan-relay:
strategy:
matrix:
tag: ['latest-static-debian12-nonroot', 'v8-static-debian12-debug-nonroot']
tag: ['latest-static-debian12-nonroot', 'v9-static-debian12-debug-nonroot']
fail-fast: false
runs-on: ubuntu-latest
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Run Release Please
on:
push:
branches:
- v8
- v9

jobs:
go-versions:
Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"time"

ct "github.com/launchdarkly/go-configtypes"
"github.com/launchdarkly/ld-relay/v8/internal/logging"
"github.com/launchdarkly/ld-relay/v9/internal/logging"
)

const (
Expand Down
8 changes: 4 additions & 4 deletions docs/in-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Here is an example of how you might run the Relay Proxy endpoints inside your we
```go
import (
"github.com/gorilla/mux"
"github.com/launchdarkly/ld-relay/v8/config"
"github.com/launchdarkly/ld-relay/v8/relay"
"github.com/launchdarkly/ld-relay/v9/config"
"github.com/launchdarkly/ld-relay/v9/relay"
"github.com/launchdarkly/go-sdk-common/v3/ldlog"
)

Expand All @@ -37,7 +37,7 @@ The above example uses a configuration file. You can also pass in a `config.Conf

```go
import (
"github.com/launchdarkly/ld-relay/v8/config"
"github.com/launchdarkly/ld-relay/v9/config"
configtypes "github.com/launchdarkly/go-configtypes"
)

Expand All @@ -57,7 +57,7 @@ Alternatively, you can parse the configuration from a string that is in the same

```go
import (
"github.com/launchdarkly/ld-relay/v8/config"
"github.com/launchdarkly/ld-relay/v9/config"
"gopkg.in/gcfg.v1"
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/launchdarkly/ld-relay/v8
module github.com/launchdarkly/ld-relay/v9

go 1.25.0

Expand Down
8 changes: 4 additions & 4 deletions integrationtests/api_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strings"
"time"

"github.com/launchdarkly/ld-relay/v8/config"
"github.com/launchdarkly/ld-relay/v9/config"

ldapi "github.com/launchdarkly/api-client-go/v13"
"github.com/launchdarkly/go-sdk-common/v3/ldlog"
Expand Down Expand Up @@ -130,7 +130,6 @@ func (a *apiHelper) createProject(numEnvironments int) (projectInfo, []environme
PostProject(a.apiContext).
ProjectPost(projectBody).
Execute()

if err != nil {
return projectInfo{}, nil, a.logResult("Create project", err)
}
Expand Down Expand Up @@ -178,6 +177,7 @@ func (f filterRules) ToOpaqueRep() []map[string]interface{} {
}
return opaqueRules
}

func (a *apiHelper) createSpecificFilter(projKey string, filterKey string, rules filterRules) (string, error) {
filterRep, _, err := a.apiClient.PayloadFiltersApi.PostPayloadFilters(a.apiContext, projKey).PostFilterRep(ldapi.PostFilterRep{
Key: filterKey,
Expand Down Expand Up @@ -236,7 +236,6 @@ func (a *apiHelper) addEnvironment(project projectInfo) (environmentInfo, error)
PostEnvironment(a.apiContext, project.key).
EnvironmentPost(envBody).
Execute()

if err != nil {
return environmentInfo{}, a.logResult("Create environment", err)
}
Expand All @@ -256,7 +255,8 @@ func (a *apiHelper) deleteEnvironment(project projectInfo, env environmentInfo)
}

func (a *apiHelper) rotateSDKKey(project projectInfo, env environmentInfo, expirationTime time.Time) (
config.SDKKey, error) {
config.SDKKey, error,
) {
req := a.apiClient.EnvironmentsApi.ResetEnvironmentSDKKey(a.apiContext, project.key, env.key)
if !expirationTime.IsZero() {
req = req.Expiry(int64(ldtime.UnixMillisFromTime(expirationTime)))
Expand Down
4 changes: 2 additions & 2 deletions integrationtests/autoconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"testing"
"time"

"github.com/launchdarkly/ld-relay/v8/config"
"github.com/launchdarkly/ld-relay/v8/internal/api"
"github.com/launchdarkly/ld-relay/v9/config"
"github.com/launchdarkly/ld-relay/v9/internal/api"

"github.com/stretchr/testify/require"
)
Expand Down
4 changes: 2 additions & 2 deletions integrationtests/big_segments_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"testing"
"time"

"github.com/launchdarkly/ld-relay/v8/integrationtests/docker"
"github.com/launchdarkly/ld-relay/v8/internal/api"
"github.com/launchdarkly/ld-relay/v9/integrationtests/docker"
"github.com/launchdarkly/ld-relay/v9/internal/api"

"github.com/launchdarkly/go-sdk-common/v3/ldvalue"

Expand Down
4 changes: 2 additions & 2 deletions integrationtests/build_relay_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"strings"

"github.com/launchdarkly/go-sdk-common/v3/ldlog"
"github.com/launchdarkly/ld-relay/v8/integrationtests/docker"
"github.com/launchdarkly/ld-relay/v8/integrationtests/oshelpers"
"github.com/launchdarkly/ld-relay/v9/integrationtests/docker"
"github.com/launchdarkly/ld-relay/v9/integrationtests/oshelpers"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions integrationtests/database_params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"reflect"
"testing"

"github.com/launchdarkly/ld-relay/v8/integrationtests/docker"
"github.com/launchdarkly/ld-relay/v8/internal/api"
"github.com/launchdarkly/ld-relay/v9/integrationtests/docker"
"github.com/launchdarkly/ld-relay/v9/internal/api"

"github.com/stretchr/testify/require"
)
Expand Down
4 changes: 2 additions & 2 deletions integrationtests/database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ package integrationtests
import (
"testing"

"github.com/launchdarkly/ld-relay/v8/integrationtests/docker"
"github.com/launchdarkly/ld-relay/v8/internal/api"
"github.com/launchdarkly/ld-relay/v9/integrationtests/docker"
"github.com/launchdarkly/ld-relay/v9/internal/api"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
6 changes: 2 additions & 4 deletions integrationtests/docker/docker_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"strings"

"github.com/launchdarkly/ld-relay/v8/integrationtests/oshelpers"
"github.com/launchdarkly/ld-relay/v9/integrationtests/oshelpers"

"github.com/launchdarkly/go-sdk-common/v3/ldvalue"

Expand Down Expand Up @@ -45,9 +45,7 @@ type Network struct {
host string
}

var (
defaultWriter = oshelpers.NewLogWriter(os.Stdout, "Docker") //nolint:gochecknoglobals
)
var defaultWriter = oshelpers.NewLogWriter(os.Stdout, "Docker") //nolint:gochecknoglobals

func command(cmd string, args ...string) *oshelpers.CommandWrapper { //nolint:unparam
return oshelpers.Command(cmd, args...).OutputWriter(defaultWriter)
Expand Down
2 changes: 1 addition & 1 deletion integrationtests/offline_mode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"testing"
"time"

"github.com/launchdarkly/ld-relay/v8/config"
"github.com/launchdarkly/ld-relay/v9/config"

helpers "github.com/launchdarkly/go-test-helpers/v3"

Expand Down
2 changes: 1 addition & 1 deletion integrationtests/projects_and_environments_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package integrationtests
import (
"strings"

"github.com/launchdarkly/ld-relay/v8/config"
"github.com/launchdarkly/ld-relay/v9/config"
)

type projectInfo struct {
Expand Down
15 changes: 8 additions & 7 deletions integrationtests/test_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ import (
"testing"
"time"

"github.com/launchdarkly/ld-relay/v8/internal/credential"
"github.com/launchdarkly/ld-relay/v9/internal/credential"

"github.com/launchdarkly/ld-relay/v8/config"
"github.com/launchdarkly/ld-relay/v8/integrationtests/docker"
"github.com/launchdarkly/ld-relay/v8/integrationtests/oshelpers"
"github.com/launchdarkly/ld-relay/v8/internal/api"
"github.com/launchdarkly/ld-relay/v9/config"
"github.com/launchdarkly/ld-relay/v9/integrationtests/docker"
"github.com/launchdarkly/ld-relay/v9/integrationtests/oshelpers"
"github.com/launchdarkly/ld-relay/v9/internal/api"

ldapi "github.com/launchdarkly/api-client-go/v13"
ct "github.com/launchdarkly/go-configtypes"
Expand Down Expand Up @@ -143,7 +143,7 @@ func newIntegrationTestManager() (*integrationTestManager, error) {
if err != nil {
return nil, err
}
if err := os.Chmod(relaySharedDir, 0755); err != nil {
if err := os.Chmod(relaySharedDir, 0o755); err != nil {
return nil, err
}

Expand Down Expand Up @@ -457,7 +457,8 @@ func (m *integrationTestManager) getFlagValues(t *testing.T, proj projectInfo, e
// getFlagPrerequisites fetches a payload from the given URL, which is expected to be a Relay polling evaluation
// endpoint, and returns the "prerequisites" field of the flags in the payload.
func (m *integrationTestManager) getFlagPrerequisites(t *testing.T, envKey string,
url *url.URL, auth credential.SDKCredential) ldvalue.Value {
url *url.URL, auth credential.SDKCredential,
) ldvalue.Value {
req, err := http.NewRequest("GET", url.String(), nil)
require.NoError(t, err)
req.Header.Add("Authorization", auth.GetAuthorizationHeaderValue())
Expand Down
Loading
Loading