Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/nuget/openfeature/provider_tests/…
Browse files Browse the repository at this point in the history
…dotnet-integration-tests/OpenFeature-1.5.0
  • Loading branch information
kodiakhq[bot] authored Apr 8, 2024
2 parents 15b25d2 + 63a5571 commit 0b8e194
Show file tree
Hide file tree
Showing 267 changed files with 14,872 additions and 950 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

- name: Get changed files in the docs folder
id: changed-files-specific
uses: tj-actions/changed-files@v43
uses: tj-actions/changed-files@v44
with:
files: ./cmd/relayproxy/helm-charts/**

Expand Down
32 changes: 17 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
fetch-depth: 1
- name: Setup go
uses: actions/setup-go@v5
with:
Expand All @@ -28,8 +27,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
fetch-depth: 1
- name: Setup go
uses: actions/setup-go@v5
with:
Expand All @@ -43,8 +41,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
fetch-depth: 1
- name: Setup go
uses: actions/setup-go@v5
with:
Expand All @@ -58,26 +55,28 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
fetch-depth: 1
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- run: make coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

swagger-change:
name: Swagger Change
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup go
uses: actions/setup-go@v5
with:
Expand All @@ -92,7 +91,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 1

- name: Setup go
uses: actions/setup-go@v5
Expand All @@ -113,6 +112,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup go
uses: actions/setup-go@v5
with:
Expand All @@ -137,8 +138,7 @@ jobs:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
fetch-depth: 1
- name: Setup go
uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -166,9 +166,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Get changed files in the docs folder
id: changed-files-specific
uses: tj-actions/changed-files@v43
uses: tj-actions/changed-files@v44
with:
files: ./openfeature/providers/python-provider/**
- uses: actions/setup-python@v5
Expand All @@ -188,4 +190,4 @@ jobs:
- name: Pytest
if: steps.changed-files-specific.outputs.any_changed == 'true'
working-directory: ./openfeature/providers/python-provider
run: poetry run pytest
run: poetry run pytest
2 changes: 1 addition & 1 deletion .github/workflows/doc-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/setup-node@v4
- name: Get changed files in the docs folder
id: changed-files-specific
uses: tj-actions/changed-files@v43
uses: tj-actions/changed-files@v44
with:
files: ./website/
- name: Test Build website
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- name: Get changed files in the docs folder
id: changed-files-specific
uses: tj-actions/changed-files@v43
uses: tj-actions/changed-files@v44
with:
files: ./cmd/relayproxy/helm-charts/**

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ jobs:
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}

- name: yq - portable yaml processor
uses: mikefarah/yq@v4.42.1
uses: mikefarah/yq@v4.43.1

- name: Bump chart appVersion
working-directory: ./release/
Expand Down
7 changes: 3 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
run:
skip-dirs:
- (^|/)bin($|/)
- (^|/)examples($|/)
linters:
enable:
- asciicheck
Expand Down Expand Up @@ -43,6 +39,9 @@ linters-settings:
module-path: github.com/thomaspoignant/go-feature-flag
lang-version: "1.17"
issues:
exclude-dirs:
- (^|/)bin($|/)
- (^|/)examples($|/)
exclude-rules:
- path: _test.go
linters:
Expand Down
12 changes: 12 additions & 0 deletions ADOPTERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Adopters

Thank you for trusting the `go-feature-flag` and using it in your organization.

| **Organizartion** | **Website / Contact** | **Description of use** |
|-------------------|-------------------------------------------------------|----------------------------------------|
| Cast.ai | https://cast.ai/ | |
| Chapati systems | https://chapati.systems/ | |
| Lyft | https://github.com/lyft/atlantis | Inside the Atlantis fork used by Lyft. |
| Tencent | https://github.com/TencentBlueKing/bkmonitor-datalink | Used inside BKMONITOR-DATALINK. |


2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ bench: ## Launch the benchmark test
lint: ## Use golintci-lint on your project
mkdir -p ./bin
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s latest # Install linters
./bin/golangci-lint run --deadline=5m --timeout=5m ./... # Run linters
./bin/golangci-lint run --timeout=5m --timeout=5m ./... # Run linters

## Help:
help: ## Show this help.
Expand Down
64 changes: 44 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,54 @@
<a href="https://codecov.io/gh/thomaspoignant/go-feature-flag"><img src="https://codecov.io/gh/thomaspoignant/go-feature-flag/branch/main/graph/badge.svg?token=T59ACQWW1H"/></a>
<a href="https://sonarcloud.io/dashboard?id=thomaspoignant_go-feature-flag"><img src="https://sonarcloud.io/api/project_badges/measure?project=thomaspoignant_go-feature-flag&metric=alert_status" alt="Sonarcloud Status" /></a>
<a href="https://github.com/thomaspoignant/go-feature-flag/actions/workflows/codeql-analysis.yml"><img src="https://github.com/thomaspoignant/go-feature-flag/workflows/CodeQL/badge.svg" alt="Build Status" /></a>
<a href="https://github.com/thomaspoignant/go-feature-flag/blob/main/LICENSE"><img src="https://img.shields.io/github/license/thomaspoignant/go-feature-flag" alt="License"/></a>
<br/>
<a href="https://github.com/thomaspoignant/go-feature-flag/releases"><img src="https://img.shields.io/github/v/release/thomaspoignant/go-feature-flag" alt="Release version" /></a>
<a href="https://pkg.go.dev/github.com/thomaspoignant/go-feature-flag"><img src="https://godoc.org/github.com/thomaspoignant/go-feature-flag?status.svg" alt="GoDoc" /></a>
<img src="https://img.shields.io/github/go-mod/go-version/thomaspoignant/go-feature-flag?logo=go%20version" alt="Go version"/>
<a href="https://github.com/thomaspoignant/go-feature-flag/blob/main/LICENSE"><img src="https://img.shields.io/github/license/thomaspoignant/go-feature-flag" alt="License"/></a>
<a href="https://github.com/avelino/awesome-go/#server-applications"><img src="https://awesome.re/mentioned-badge-flat.svg" alt="Mentioned in Awesome Go"></a>
<a href="https://github.com/avelino/awesome-go/#server-applications"><img src="https://awesome.re/mentioned-badge.svg" alt="Mentioned in Awesome Go"></a>
<a href="https://gofeatureflag.org/slack"><img src="https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=green" alt="Join us on slack"></a>
<a href="https://github.com/sponsors/thomaspoignant"><img src="https://img.shields.io/github/sponsors/thomaspoignant?logo=GitHub%20Sponsors" alt="Sponsords"></a>
</p>

:pray: If you are using **GO Feature Flag** we've launched the [GO Feature Flag Usage Survey](https://forms.gle/cD4Rj7gJSMStg1Hc9), it would be awesome and super helpful if you can fill it.
> :pray: If you are using **GO Feature Flag** please consider to add yourself in the [adopters](./ADOPTERS.md) list.
> This simple act significantly boosts the project's visibility and credibility, making a substantial contribution to its advancement.
## Table of Contents

- [What is GO Feature Flag?](#what-is-go-feature-flag)
- [What can I do with GO Feature Flag?](#what-can-i-do-with-go-feature-flag)
- [Getting started](#getting-started)
- [Using the GO Module](#using-go-module)
- [Using Open Feature SDKs](#using-open-feature)
- [Can I use GO Feature Flag with any language?](#can-i-use-go-feature-flag-with-any-language)
- [Where do I store my flags file?](#where-do-i-store-my-flags-file)
- [Flags file format](#flags-file-format)
- [Rule format](#rule-format)
- [Users](#users)
- [Variations](#variations)
- [Get all flags for a specific user](#get-all-flags-for-a-specific-user)
- [Rollout](#rollout)
- [Notifiers](#notifiers)
- [Export data](#export-data)
- [Linter](#linter)
- [🎛️ GO Feature Flag](#️-go-feature-flag)
- [Table of Contents](#table-of-contents)
- [What is GO Feature Flag?](#what-is-go-feature-flag)
- [What can I do with GO Feature Flag?](#what-can-i-do-with-go-feature-flag)
- [Getting started](#getting-started)
- [Installation](#installation)
- [Create a feature flag configuration](#create-a-feature-flag-configuration)
- [SDK Initialisation](#sdk-initialisation)
- [Evaluate your flags](#evaluate-your-flags)
- [Create a feature flag configuration](#create-a-feature-flag-configuration-1)
- [Create a relay proxy configuration file](#create-a-relay-proxy-configuration-file)
- [Install the relay proxy](#install-the-relay-proxy)
- [Use Open Feature SDK](#use-open-feature-sdk)
- [Install dependencies](#install-dependencies)
- [Init your Open Feature client](#init-your-open-feature-client)
- [Evaluate your flag](#evaluate-your-flag)
- [Can I use GO Feature Flag with any language?](#can-i-use-go-feature-flag-with-any-language)
- [Where do I store my flags file?](#where-do-i-store-my-flags-file)
- [Flags file format](#flags-file-format)
- [Rule format](#rule-format)
- [Examples](#examples)
- [Users](#users)
- [Variations](#variations)
- [Example](#example)
- [Get all flags for a specific user](#get-all-flags-for-a-specific-user)
- [Rollout](#rollout)
- [Complex rollout strategy available](#complex-rollout-strategy-available)
- [Notifiers](#notifiers)
- [Export data](#export-data)
- [Linter](#linter)
- [How can I contribute?](#how-can-i-contribute)
- [Contributors](#contributors)
- [Contributors](#contributors)
- [Adopters](#adopters)

## What is GO Feature Flag?

Expand Down Expand Up @@ -281,6 +298,7 @@ The available retrievers are:
- **Google Cloud Storage**
- **Kubernetes ConfigMaps**
- **MongoDB**
- **Redis**

_[See the full list and more information.](https://gofeatureflag.org/docs/configure_flag/store_your_flags)_

Expand Down Expand Up @@ -583,3 +601,9 @@ Thanks so much to our contributors.
<a href="https://github.com/thomaspoignant/go-feature-flag/graphs/contributors">
<img src="https://contrib.rocks/image?repo=thomaspoignant/go-feature-flag" />
</a>

## Adopters

If you are using `go-feature-flag`, we encourage you to include your company's name in this list. This simple act significantly boosts the project's visibility and credibility, making a substantial contribution to its advancement. To do so, kindly add yourself to [adopters](./ADOPTERS.md).

Here is the list of [adopters](./ADOPTERS.md).
18 changes: 9 additions & 9 deletions cmd/relayproxy/DOCKERHUB.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
</p>

<p align="center">
<img alt="Docker Image Version" src="https://img.shields.io/docker/v/thomaspoignant/go-feature-flag-relay-proxy?sort=semver&color=green"/>
<img alt="Docker Image Size" src="https://img.shields.io/docker/image-size/thomaspoignant/go-feature-flag-relay-proxy?sort=semver"/>
<img alt="Docker Hub downloads" src="https://img.shields.io/docker/pulls/thomaspoignant/go-feature-flag-relay-proxy?logo=docker"/>
<img alt="Docker Image Version" src="https://img.shields.io/docker/v/thomaspoignant/go-feature-flag?sort=semver&color=green"/>
<img alt="Docker Image Size" src="https://img.shields.io/docker/image-size/thomaspoignant/go-feature-flag?sort=semver"/>
<img alt="Docker Hub downloads" src="https://img.shields.io/docker/pulls/thomaspoignant/go-feature-flag?logo=docker"/>
<a href="https://github.com/thomaspoignant/go-feature-flag/blob/main/LICENSE"><img src="https://img.shields.io/github/license/thomaspoignant/go-feature-flag" alt="License"/></a>
<a href="https://gofeatureflag.org/slack"><img src="https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=green" alt="Join us on slack"></a>
</p>
Expand All @@ -27,21 +27,21 @@ For more information about GO Feature Flag Relay Proxy, please visit [github.com

# Quick reference

- This default distribution is the official distribution for `go-feature-flag-relay-proxy`.
- This default distribution is the official distribution for `go-feature-flag`.

- Where to file issues:
[https://github.com/thomaspoignant/go-feature-flag/issues/](https://github.com/thomaspoignant/go-feature-flag/issues/new?assignees=&labels=bug%2C+relay-proxy%2C+docker%2C+needs-triage&template=bug.md&title=(bug%20docker)).

- Source are available in [`go-feature-flag` repo](https://github.com/thomaspoignant/go-feature-flag/tree/main/cmd/relayproxy).

- All versions are available in the [tags](https://hub.docker.com/r/thomaspoignant/go-feature-flag-relay-proxy/tags).
- All versions are available in the [tags](https://hub.docker.com/r/thomaspoignant/go-feature-flag/tags).

- Release notes are available [here](https://github.com/thomaspoignant/go-feature-flag/releases).


# How to use this image

**`go-feature-flag-relay-proxy`** requires a configuration file to be used.
**`go-feature-flag`** requires a configuration file to be used.

By default, we expect to have this configuration file in the `/goff` directory of the container and the file should be named `goff-proxy.yaml`.

Expand All @@ -50,12 +50,12 @@ The default port used for the service is `1031`.
```shell
docker run \
-v $(pwd)/goff-proxy.yaml:/goff/goff-proxy.yaml \
thomaspoignant/go-feature-flag-relay-proxy:latest
thomaspoignant/go-feature-flag:latest
```

## Test it locally

This is a small example on how to run `go-feature-flag-relay-proxy` locally.
This is a small example on how to run `go-feature-flag` locally.

```shell
# Download an example of a basic configuration file.
Expand All @@ -65,7 +65,7 @@ curl https://raw.githubusercontent.com/thomaspoignant/go-feature-flag/main/cmd/r
docker run \
-p 1031:1031 \
-v $(pwd)/goff-proxy.yaml:/goff/goff-proxy.yaml \
thomaspoignant/go-feature-flag-relay-proxy:latest
thomaspoignant/go-feature-flag:latest

# Call the API
curl -X 'POST' \
Expand Down
10 changes: 5 additions & 5 deletions cmd/relayproxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<p align="center">
<a href="https://github.com/thomaspoignant/go-feature-flag/actions/workflows/ci.yml"><img src="https://github.com/thomaspoignant/go-feature-flag/actions/workflows/ci.yml/badge.svg" alt="Build Status" /></a>
<a href="https://coveralls.io/github/thomaspoignant/go-feature-flag"><img src="https://coveralls.io/repos/github/thomaspoignant/go-feature-flag/badge.svg" alt="Coverage Status" /></a>
<a href="https://sonarcloud.io/dashboard?id=thomaspoignant_go-feature-flag-relay-proxy"><img src="https://sonarcloud.io/api/project_badges/measure?project=thomaspoignant_go-feature-flag-relay-proxy&metric=alert_status" alt="Sonarcloud Status" /></a>
<a href="/thomaspoignant/go-feature-flag-relay-proxy/releases"><img src="https://img.shields.io/github/v/release/thomaspoignant/go-feature-flag-relay-proxy" alt="Release version" /></a>
<a href="https://pkg.go.dev/github.com/thomaspoignant/go-feature-flag-relay-proxy"><img src="https://godoc.org/github.com/thomaspoignant/go-feature-flag-relay-proxy?status.svg" alt="GoDoc" /></a>
<img src="https://img.shields.io/github/go-mod/go-version/thomaspoignant/go-feature-flag-relay-proxy?logo=go%20version" alt="Go version"/>
<a href="/thomaspoignant/go-feature-flag/blob/main/LICENSE"><img src="https://img.shields.io/github/license/thomaspoignant/go-feature-flag-relay-proxy" alt="License"/></a>
<a href="https://sonarcloud.io/dashboard?id=thomaspoignant_go-feature-flag"><img src="https://sonarcloud.io/api/project_badges/measure?project=thomaspoignant_go-feature-flag&metric=alert_status" alt="Sonarcloud Status" /></a>
<a href="/thomaspoignant/go-feature-flag/releases"><img src="https://img.shields.io/github/v/release/thomaspoignant/go-feature-flag" alt="Release version" /></a>
<a href="https://pkg.go.dev/github.com/thomaspoignant/go-feature-flag"><img src="https://godoc.org/github.com/thomaspoignant/go-feature-flag?status.svg" alt="GoDoc" /></a>
<img src="https://img.shields.io/github/go-mod/go-version/thomaspoignant/go-feature-flag?logo=go%20version" alt="Go version"/>
<a href="/thomaspoignant/go-feature-flag/blob/main/LICENSE"><img src="https://img.shields.io/github/license/thomaspoignant/go-feature-flag" alt="License"/></a>
<a href="https://gofeatureflag.org/slack"><img src="https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=green" alt="Join us on slack"></a>
</p>

Expand Down
Loading

0 comments on commit 0b8e194

Please sign in to comment.