Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into build/add_editorconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
aepfli committed Oct 7, 2024
2 parents 4bc8e86 + 0c0c5f4 commit b3aba9f
Show file tree
Hide file tree
Showing 45 changed files with 1,652 additions and 678 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc
- uses: actions/checkout@6b42224f41ee5dfe5395e27c8b2746f1f9955030
- name: Set up JDK 8
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88
uses: actions/setup-java@292cc14be88d32cccdd768342b8aa1296a4d8d46
with:
java-version: '8'
distribution: 'temurin'
Expand All @@ -32,7 +32,7 @@ jobs:
server-password: ${{ secrets.OSSRH_PASSWORD }}

- name: Cache local Maven repository
uses: actions/cache@81382a721fc89d96eca335d0c3ba33144b2baa9d
uses: actions/cache@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
Expand All @@ -49,7 +49,7 @@ jobs:
run: mvn --batch-mode --update-snapshots verify

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
flags: unittests # optional
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc
uses: actions/checkout@6b42224f41ee5dfe5395e27c8b2746f1f9955030

- name: Set up JDK 8
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88
uses: actions/setup-java@292cc14be88d32cccdd768342b8aa1296a4d8d46
with:
java-version: '8'
distribution: 'temurin'
cache: maven

- name: Initialize CodeQL
uses: github/codeql-action/init@8fd294e26a0e458834582b0fe4988d79966c7c0a
uses: github/codeql-action/init@7cf65a5b2e089b7207c678633bc4a42884847231
with:
languages: java

- name: Cache local Maven repository
uses: actions/cache@81382a721fc89d96eca335d0c3ba33144b2baa9d
uses: actions/cache@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
Expand All @@ -36,7 +36,7 @@ jobs:
run: mvn --batch-mode --update-snapshots --activate-profiles e2e verify

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
flags: unittests # optional
Expand All @@ -45,4 +45,4 @@ jobs:
verbose: true # optional (default = false)

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@8fd294e26a0e458834582b0fe4988d79966c7c0a
uses: github/codeql-action/analyze@7cf65a5b2e089b7207c678633bc4a42884847231
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
# These steps are only run if this was a merged release-please PR
- name: checkout
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc
uses: actions/checkout@6b42224f41ee5dfe5395e27c8b2746f1f9955030
- name: Set up JDK 8
if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88
uses: actions/setup-java@292cc14be88d32cccdd768342b8aa1296a4d8d46
with:
java-version: '8'
distribution: 'temurin'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/static-code-scanning.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc
uses: actions/checkout@6b42224f41ee5dfe5395e27c8b2746f1f9955030

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@8fd294e26a0e458834582b0fe4988d79966c7c0a
uses: github/codeql-action/init@7cf65a5b2e089b7207c678633bc4a42884847231
with:
languages: java

- name: Autobuild
uses: github/codeql-action/autobuild@8fd294e26a0e458834582b0fe4988d79966c7c0a
uses: github/codeql-action/autobuild@7cf65a5b2e089b7207c678633bc4a42884847231

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@8fd294e26a0e458834582b0fe4988d79966c7c0a
uses: github/codeql-action/analyze@7cf65a5b2e089b7207c678633bc4a42884847231
19 changes: 19 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{".":"1.10.0"}
{".":"1.12.0"}
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,52 @@
# Changelog

## [1.12.0](https://github.com/open-feature/java-sdk/compare/v1.11.0...v1.12.0) (2024-09-23)


### ✨ New Features

* make provider interface "stateless"; SDK maintains provider state ([#1096](https://github.com/open-feature/java-sdk/issues/1096)) ([1b1e527](https://github.com/open-feature/java-sdk/commit/1b1e527e780128c9aa3c0686427a8fe8856800b4))


### 🧹 Chore

* **deps:** update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.8.6.4 ([#1113](https://github.com/open-feature/java-sdk/issues/1113)) ([dd8ba81](https://github.com/open-feature/java-sdk/commit/dd8ba81f1286a622aec2611f023d03a56a155e89))
* **deps:** update github/codeql-action digest to 323f5ef ([#1111](https://github.com/open-feature/java-sdk/issues/1111)) ([52e6d2b](https://github.com/open-feature/java-sdk/commit/52e6d2b0ee17124ef2a742fc872a939fde977a27))

## [1.11.0](https://github.com/open-feature/java-sdk/compare/v1.10.0...v1.11.0) (2024-09-20)


### 🐛 Bug Fixes

* **deps:** update dependency io.cucumber:cucumber-bom to v7.19.0 ([#1110](https://github.com/open-feature/java-sdk/issues/1110)) ([2412f29](https://github.com/open-feature/java-sdk/commit/2412f296b5db43c07dc807390070379e7781dbb3))


### ✨ New Features

* error resolution flow control without exceptions ([#1095](https://github.com/open-feature/java-sdk/issues/1095)) ([6fc0b90](https://github.com/open-feature/java-sdk/commit/6fc0b9061079e50cbab52c951149cf600a922671))


### 🧹 Chore

* **deps:** update actions/checkout digest to 6d193bf ([#1091](https://github.com/open-feature/java-sdk/issues/1091)) ([9f6a40e](https://github.com/open-feature/java-sdk/commit/9f6a40ec9ba490edf13adc5501a8cb2b93c32447))
* **deps:** update actions/checkout digest to b684943 ([#1088](https://github.com/open-feature/java-sdk/issues/1088)) ([7e0c70f](https://github.com/open-feature/java-sdk/commit/7e0c70f7c547b6eb14f30ba4e77657a317161c1f))
* **deps:** update actions/setup-java digest to 0a40ce6 ([#1107](https://github.com/open-feature/java-sdk/issues/1107)) ([37b56ac](https://github.com/open-feature/java-sdk/commit/37b56ac2dad3c24ac1d898a253e936aa2e3d49eb))
* **deps:** update actions/setup-java digest to 2dfa201 ([#1094](https://github.com/open-feature/java-sdk/issues/1094)) ([082f574](https://github.com/open-feature/java-sdk/commit/082f5746c84f1bb4ff54cae4f525949f29e7b9c4))
* **deps:** update actions/setup-java digest to 40b9536 ([#1109](https://github.com/open-feature/java-sdk/issues/1109)) ([244f216](https://github.com/open-feature/java-sdk/commit/244f216582eae071885a950712115ce8b1ad0c19))
* **deps:** update actions/setup-java digest to 7467385 ([#1092](https://github.com/open-feature/java-sdk/issues/1092)) ([58ead7f](https://github.com/open-feature/java-sdk/commit/58ead7fa9153a53ec530e349f16f9e5e183aa0fb))
* **deps:** update actions/setup-java digest to bcfbca5 ([#1100](https://github.com/open-feature/java-sdk/issues/1100)) ([c68f78e](https://github.com/open-feature/java-sdk/commit/c68f78e17b6125d74644a5735f9d58348edcc383))
* **deps:** update dependency org.apache.maven.plugins:maven-gpg-plugin to v3.2.6 ([#1103](https://github.com/open-feature/java-sdk/issues/1103)) ([29901b8](https://github.com/open-feature/java-sdk/commit/29901b87ea93757abe5f5d7a8afc6fc4555aef5c))
* **deps:** update github/codeql-action digest to 4a01ec7 ([#1101](https://github.com/open-feature/java-sdk/issues/1101)) ([b80fd6d](https://github.com/open-feature/java-sdk/commit/b80fd6d307dee87d8b8f148c954c33b8ff6efae2))
* **deps:** update github/codeql-action digest to 5618c9f ([#1102](https://github.com/open-feature/java-sdk/issues/1102)) ([d1478c0](https://github.com/open-feature/java-sdk/commit/d1478c001a8e88c358d6743ac3d7c9b5523a893e))
* **deps:** update github/codeql-action digest to 64431c6 ([#1106](https://github.com/open-feature/java-sdk/issues/1106)) ([ce19ac9](https://github.com/open-feature/java-sdk/commit/ce19ac91f62689a0e0e02e53538e1035bf95387f))
* **deps:** update github/codeql-action digest to 782de45 ([#1104](https://github.com/open-feature/java-sdk/issues/1104)) ([7cb8908](https://github.com/open-feature/java-sdk/commit/7cb89087daa2809d3fd8447388e58e4f73c975b3))
* **deps:** update github/codeql-action digest to 799e477 ([#1108](https://github.com/open-feature/java-sdk/issues/1108)) ([17a58ef](https://github.com/open-feature/java-sdk/commit/17a58efc7e0244c0db77e77a78f6d0daf948028f))
* **deps:** update github/codeql-action digest to 8fd294e ([#1097](https://github.com/open-feature/java-sdk/issues/1097)) ([6408261](https://github.com/open-feature/java-sdk/commit/64082617fade3fa7d647302cc0c5b698f7038d81))
* **deps:** update github/codeql-action digest to 9b41ced ([#1089](https://github.com/open-feature/java-sdk/issues/1089)) ([870fc27](https://github.com/open-feature/java-sdk/commit/870fc27ed7a30cb011080127f7d040c1a3bb209b))
* **deps:** update github/codeql-action digest to cb28816 ([#1105](https://github.com/open-feature/java-sdk/issues/1105)) ([9d69ebd](https://github.com/open-feature/java-sdk/commit/9d69ebd94a161e6477f2b4f1f5edd0b79f178852))
* **deps:** update github/codeql-action digest to d8b1697 ([#1093](https://github.com/open-feature/java-sdk/issues/1093)) ([d60593f](https://github.com/open-feature/java-sdk/commit/d60593fa11f39c6587e280633cf6e15965c0960f))
* **deps:** update github/codeql-action digest to e817992 ([#1099](https://github.com/open-feature/java-sdk/issues/1099)) ([caec6e3](https://github.com/open-feature/java-sdk/commit/caec6e35e9da3ad88a8de105ca170137f42b907c))

## [1.10.0](https://github.com/open-feature/java-sdk/compare/v1.9.1...v1.10.0) (2024-09-05)


Expand Down
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ Any contributions you make are expected to be tested with unit tests. You can va
Further, it is recommended to verify code styling and static code analysis with `mvn verify -P !deploy`.
Regardless, the automation itself will run them for you when you open a PR.

> [!TIP]
> For easier usage maven wrapper is available. Example usage: `./mvnw verify`
Your code is supposed to work with Java 8+.

If you think we might be out of date with the spec, you can check that by invoking `python spec_finder.py` in the root of the repository. This will validate we have tests defined for all of the specification entries we know about.
Expand Down
25 changes: 11 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
</a>
<!-- x-release-please-start-version -->

<a href="https://github.com/open-feature/java-sdk/releases/tag/v1.10.0">
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.10.0&color=blue&style=for-the-badge" />
<a href="https://github.com/open-feature/java-sdk/releases/tag/v1.12.0">
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.12.0&color=blue&style=for-the-badge" />
</a>

<!-- x-release-please-end -->
Expand Down Expand Up @@ -59,7 +59,7 @@ Note that this library is intended to be used in server-side contexts and has no
<dependency>
<groupId>dev.openfeature</groupId>
<artifactId>sdk</artifactId>
<version>1.10.0</version>
<version>1.12.0</version>
</dependency>
```
<!-- x-release-please-end-version -->
Expand All @@ -84,7 +84,7 @@ If you would like snapshot builds, this is the relevant repository information:
<!-- x-release-please-start-version -->
```groovy
dependencies {
implementation 'dev.openfeature:sdk:1.10.0'
implementation 'dev.openfeature:sdk:1.12.0'
}
```
<!-- x-release-please-end-version -->
Expand Down Expand Up @@ -317,11 +317,6 @@ public class MyProvider implements FeatureProvider {
return () -> "My Provider";
}

@Override
public ProviderState getState() {
// optionally indicate your provider's state (assumed to be READY if not implemented)
}

@Override
public void initialize(EvaluationContext evaluationContext) throws Exception {
// start up your provider
Expand Down Expand Up @@ -368,11 +363,6 @@ class MyEventProvider extends EventProvider {
return () -> "My Event Provider";
}

@Override
public ProviderState getState() {
// indicate your provider's state (required for EventProviders)
}

@Override
public void initialize(EvaluationContext evaluationContext) throws Exception {
// emit events when flags are changed in a hypothetical REST API
Expand All @@ -391,6 +381,13 @@ class MyEventProvider extends EventProvider {
}
```

Providers no longer need to manage their own state, this is done by the SDK itself. If desired, the state of a provider
can be queried through the client that uses the provider.

```java
OpenFeatureAPI.getInstance().getClient().getProviderState();
```

> Built a new provider? [Let us know](https://github.com/open-feature/openfeature.dev/issues/new?assignees=&labels=provider&projects=&template=document-provider.yaml&title=%5BProvider%5D%3A+) so we can add it to the docs!
### Develop a hook
Expand Down
Loading

0 comments on commit b3aba9f

Please sign in to comment.