Skip to content

Commit c563262

Browse files
authored
[FSSDK-8823] chore: prepare for release 4.0.0 (#411)
* use go-sdk v2 * update changelog * update readme * update readme * update changelog & Makefile * use go-sdk v2.0.0
1 parent 4c4dbd6 commit c563262

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+155
-100
lines changed

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,53 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [4.0.0] - January 22, 2023
8+
9+
### New Features
10+
11+
The 4.0.0 release introduces a new primary feature, [Advanced Audience Targeting](https://docs.developers.optimizely.com/feature-experimentation/docs/optimizely-data-platform-advanced-audience-targeting) enabled through integration with [Optimizely Data Platform (ODP)](https://docs.developers.optimizely.com/optimizely-data-platform/docs) ([#356](https://github.com/optimizely/agent/pull/356), [#364](https://github.com/optimizely/agent/pull/364), [#365](https://github.com/optimizely/agent/pull/365), [#366](https://github.com/optimizely/agent/pull/366)).
12+
13+
You can use ODP, a high-performance [Customer Data Platform (CDP)](https://www.optimizely.com/optimization-glossary/customer-data-platform/), to easily create complex real-time segments (RTS) using first-party and 50+ third-party data sources out of the box. You can create custom schemas that support the user attributes important for your business, and stitch together user behavior done on different devices to better understand and target your customers for personalized user experiences. ODP can be used as a single source of truth for these segments in any Optimizely or 3rd party tool.
14+
15+
With ODP accounts integrated into Optimizely projects, you can build audiences using segments pre-defined in ODP. The SDK will fetch the segments for given users and make decisions using the segments. For access to ODP audience targeting in your Feature Experimentation account, please contact your Optimizely Customer Success Manager.
16+
17+
This version includes the following changes:
18+
19+
- `FetchQualifiedSegments()` API has been added to the `/decide` endpoint. This API will retrieve user segments from the ODP server. The fetched segments will be used for audience evaluation. Fetched data will be stored in the local cache to avoid repeated network delays.
20+
21+
- `SendOdpEvent()` API has been added with the `/send-opd-event` endpoint. Customers can build/send arbitrary ODP events that will bind user identifiers and data to user profiles in ODP.
22+
23+
For details, refer to our documentation pages:
24+
25+
* [Advanced Audience Targeting](https://docs.developers.optimizely.com/feature-experimentation/docs/optimizely-data-platform-advanced-audience-targeting)
26+
27+
* [Server SDK Support](https://docs.developers.optimizely.com/feature-experimentation/docs/advanced-audience-targeting-for-server-side-sdks)
28+
29+
* [Use Optimizely Agent](https://docs.developers.optimizely.com/feature-experimentation/docs/use-optimizely-agent)
30+
31+
* [Configure Optimizely Agent](https://docs.developers.optimizely.com/feature-experimentation/docs/configure-optimizely-agent)
32+
33+
This release also introduces a fundamental enhancement to the agent with the addition of a datafile syncer. This feature is designed to facilitate seamless synchronization of datafiles across agent nodes, ensuring consistency and accuracy in the operation of the webhook API.
34+
The datafile syncer uses a PubSub system (Default: Redis) to send updated datafile webhook notification to Agent nodes (in HA system) so that nodes can immediately fetch the latest datafile. ([#405](https://github.com/optimizely/agent/pull/405))
35+
36+
### Breaking Changes
37+
38+
- ODPManager in the SDK is enabled by default. Unless an ODP account is integrated into the Optimizely projects, most ODPManager functions will be ignored. If needed, ODPManager can be disabled when OptimizelyClient is instantiated. From Agent, it can be switched off from config.yaml or env variables.
39+
- Updated go-sdk version to v2.0.0 with module path github.com/optimizely/go-sdk/v2
40+
41+
### Functionality Enhancement
42+
43+
* Updated openapi schema to 3.1.0. ([#392](https://github.com/optimizely/agent/pull/392))
44+
* Added support for prometheus metrics. ([#348](https://github.com/optimizely/agent/pull/348))
45+
* Github Issue template is udpated. ([#396](https://github.com/optimizely/agent/pull/396))
46+
* Updated go version to 1.21. ([#398](https://github.com/optimizely/agent/pull/398))
47+
* Added OpenTelemetry Tracing Support. ([#400](https://github.com/optimizely/agent/pull/400))
48+
* Added traceID & spanID to logs. ([#407](https://github.com/optimizely/agent/pull/407))
49+
50+
### Bug fixes
51+
52+
In previous versions, there was an issue where the Notification API would miss notification events when the Agent was operating in HA mode. It only got notification events from one Agent node. The bug has been addressed in this release with the implementation of a comprehensive solution. A PubSub system (Default: Redis) is used to ensure consistent retrieval of notification events across all nodes in an HA setup. ([#399](https://github.com/optimizely/agent/pull/399))
53+
754
## [3.2.0] - December 13, 2023
855

956
### New Features

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ MAKEFLAGS += --silent
2323
# Use linker flags to strip debugging info from the binary.
2424
# -s Omit the symbol table and debug information.
2525
# -w Omit the DWARF symbol table.
26-
LDFLAGS=-ldflags "-s -w -X main.Version=${APP_VERSION} -X github.com/optimizely/go-sdk/pkg/event.ClientName=Agent -X github.com/optimizely/go-sdk/pkg/event.Version=${APP_VERSION}"
26+
LDFLAGS=-ldflags "-s -w -X main.Version=${APP_VERSION} -X github.com/optimizely/go-sdk/v2/pkg/event.ClientName=Agent -X github.com/optimizely/go-sdk/v2/pkg/event.Version=${APP_VERSION}"
2727
.PHONY: all lint clean
2828

2929
all: test lint build ## runs the test, lint and build targets

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,14 @@ sys
433433
(c) 2009 The Go Authors
434434
License (BSD 3-Clause): https://github.com/golang/sys
435435

436+
opentelemetry-go
437+
Copyright The OpenTelemetry Authors
438+
License (Apache-2.0): https://github.com/open-telemetry/opentelemetry-go
439+
440+
prometheus client_golang
441+
Copyright 2015 The Prometheus Authors
442+
License (Apache-2.0): https://github.com/prometheus/client_golang
443+
436444
## Apache Copyright Notice
437445

438446
Copyright 2019-present, Optimizely, Inc. and contributors

cmd/optimizely/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ import (
5050
_ "github.com/optimizely/agent/plugins/interceptors/all" // Initiate the loading of the userprofileservice plugins
5151
_ "github.com/optimizely/agent/plugins/odpcache/all" // Initiate the loading of the odpCache plugins
5252
_ "github.com/optimizely/agent/plugins/userprofileservice/all" // Initiate the loading of the interceptor plugins
53-
"github.com/optimizely/go-sdk/pkg/logging"
53+
"github.com/optimizely/go-sdk/v2/pkg/logging"
5454
)
5555

5656
// Version holds the admin version

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/golang-jwt/jwt/v4 v4.5.0
1313
github.com/google/uuid v1.3.1
1414
github.com/lestrrat-go/jwx v0.9.0
15-
github.com/optimizely/go-sdk v1.8.4-0.20240118173841-4adb1affdb93
15+
github.com/optimizely/go-sdk/v2 v2.0.0
1616
github.com/orcaman/concurrent-map v1.0.0
1717
github.com/prometheus/client_golang v1.11.0
1818
github.com/rakyll/statik v0.1.7

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
244244
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
245245
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
246246
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
247-
github.com/optimizely/go-sdk v1.8.4-0.20240118173841-4adb1affdb93 h1:aySLExk0xgvlquiBwTnmir49OIAoP8tjYTCaYgm9JqY=
248-
github.com/optimizely/go-sdk v1.8.4-0.20240118173841-4adb1affdb93/go.mod h1:v1+k17OkqjhWuvTGiFhvaq6KDYRiVFsWrpqr0PnlKAU=
247+
github.com/optimizely/go-sdk/v2 v2.0.0 h1:GUwblFAgWc6FbRujtNZ4cz6+VlfaVqWXkq8PGs7Hgrw=
248+
github.com/optimizely/go-sdk/v2 v2.0.0/go.mod h1:MusRCFsU7+XzJCoCTgheLoENJSf1iiFYm4KbJqz6BYA=
249249
github.com/orcaman/concurrent-map v1.0.0 h1:I/2A2XPCb4IuQWcQhBhSwGfiuybl/J0ev9HDbW65HOY=
250250
github.com/orcaman/concurrent-map v1.0.0/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI=
251251
github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU=

pkg/handlers/activate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ import (
2626

2727
"github.com/optimizely/agent/pkg/middleware"
2828
"github.com/optimizely/agent/pkg/optimizely"
29-
"github.com/optimizely/go-sdk/pkg/config"
30-
"github.com/optimizely/go-sdk/pkg/entities"
29+
"github.com/optimizely/go-sdk/v2/pkg/config"
30+
"github.com/optimizely/go-sdk/v2/pkg/entities"
3131
)
3232

3333
type keyMap map[string]string

pkg/handlers/activate_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"testing"
2727

2828
"github.com/go-chi/chi/v5"
29-
"github.com/optimizely/go-sdk/pkg/entities"
29+
"github.com/optimizely/go-sdk/v2/pkg/entities"
3030
"github.com/stretchr/testify/assert"
3131
"github.com/stretchr/testify/suite"
3232

pkg/handlers/decide.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ import (
2424
"github.com/go-chi/render"
2525

2626
"github.com/optimizely/agent/pkg/middleware"
27-
"github.com/optimizely/go-sdk/pkg/client"
28-
"github.com/optimizely/go-sdk/pkg/decide"
29-
"github.com/optimizely/go-sdk/pkg/decision"
30-
"github.com/optimizely/go-sdk/pkg/odp/segment"
27+
"github.com/optimizely/go-sdk/v2/pkg/client"
28+
"github.com/optimizely/go-sdk/v2/pkg/decide"
29+
"github.com/optimizely/go-sdk/v2/pkg/decision"
30+
"github.com/optimizely/go-sdk/v2/pkg/odp/segment"
3131
)
3232

3333
// DecideBody defines the request body for decide API

pkg/handlers/decide_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ import (
3333
"github.com/optimizely/agent/pkg/middleware"
3434
"github.com/optimizely/agent/pkg/optimizely"
3535
"github.com/optimizely/agent/pkg/optimizely/optimizelytest"
36-
"github.com/optimizely/go-sdk/pkg/client"
37-
"github.com/optimizely/go-sdk/pkg/decide"
38-
"github.com/optimizely/go-sdk/pkg/entities"
39-
"github.com/optimizely/go-sdk/pkg/odp/segment"
36+
"github.com/optimizely/go-sdk/v2/pkg/client"
37+
"github.com/optimizely/go-sdk/v2/pkg/decide"
38+
"github.com/optimizely/go-sdk/v2/pkg/entities"
39+
"github.com/optimizely/go-sdk/v2/pkg/odp/segment"
4040
)
4141

4242
type DecideTestSuite struct {

0 commit comments

Comments
 (0)