-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for automatic expression optimizations (#3)
- Key changes: - Added support for [automatic expression optimizations](https://pkg.go.dev/github.com/VictoriaMetrics/metricsql#Optimize) for non-full access requests; - Minor changes: - lfgw: - Slight improvements in code style; - Migrated to go 1.17; - Fully deprecated non-OIDC modes; - Bumped go.mod deps; - Updated base images; - Enabled more linters for .golangci-lint; - CI: - Simplified Taskfile; - Enabled dependabot alerts; - Added a workflow to publish docker images.
- Loading branch information
Showing
18 changed files
with
298 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.git | ||
*.md | ||
*.yaml | ||
*.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: "docker" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
|
||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: main | ||
|
||
on: | ||
push: | ||
# pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
|
||
jobs: | ||
lint-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: "1.17" | ||
|
||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
skip-go-installation: true | ||
|
||
- name: Run tests | ||
shell: bash | ||
run: | | ||
go test ./... | ||
docker: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- lint-test | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Login to Docker registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: ghcr.io/${{ github.repository }} | ||
|
||
- name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,6 @@ | |
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
temp | ||
temp/ | ||
acl.yaml | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
linters: | ||
enable: | ||
- gocritic | ||
- gosec | ||
## TODO: clean the list | ||
- gofmt | ||
- goimports | ||
- gocyclo | ||
- goconst | ||
# - prealloc | ||
- revive | ||
- unconvert | ||
# - unparam | ||
|
||
linters-settings: | ||
gosimple: | ||
go: "1.17" | ||
gocyclo: | ||
min-complexity: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,54 @@ | ||
# CHANGELOG | ||
|
||
## 0.5.0 | ||
|
||
- Key changes: | ||
- Added support for [automatic expression optimizations](https://pkg.go.dev/github.com/VictoriaMetrics/metricsql#Optimize) for non-full access requests; | ||
- Minor changes: | ||
- lfgw: | ||
- Slight improvements in code style; | ||
- Migrated to go 1.17; | ||
- Fully deprecated non-OIDC modes; | ||
- Bumped go.mod deps; | ||
- Updated base images; | ||
- Enabled more linters for .golangci-lint; | ||
- CI: | ||
- Simplified Taskfile; | ||
- Enabled dependabot alerts; | ||
- Added a workflow to publish docker images. | ||
|
||
## 0.4.0 | ||
|
||
* Added support for multiple roles (previously, only the first one would be picked). | ||
- Added support for multiple roles (previously, only the first one would be picked). | ||
|
||
## 0.3.0 | ||
|
||
* Added support for POST requests; | ||
* Updated metricsql from `v0.10.1` to `v0.14.0`. | ||
- Added support for POST requests; | ||
- Updated metricsql from `v0.10.1` to `v0.14.0`. | ||
|
||
## 0.2.3 | ||
|
||
* Added `/federate` to a list of requests that should be rewritten. | ||
- Added `/federate` to a list of requests that should be rewritten. | ||
|
||
## 0.2.2 | ||
|
||
* Moved to go 1.16; | ||
* Bumped dependencies; | ||
* Improved build caching. | ||
- Moved to go 1.16; | ||
- Bumped dependencies; | ||
- Improved build caching. | ||
|
||
## 0.2.1 | ||
|
||
* Adjusted request rewrite logic, so now all requests containing `/api/` are rewritten, whereas previously only those starting with `/api/`. So, non-standard URIs are taken into account now. | ||
* Explicitly specified flush interval for reverse proxy; | ||
- Adjusted request rewrite logic, so now all requests containing `/api/` are rewritten, whereas previously only those starting with `/api/`. So, non-standard URIs are taken into account now. | ||
- Explicitly specified flush interval for reverse proxy; | ||
|
||
## 0.2.0 | ||
|
||
* Added support for extra authorization headers (X-Forwarded-Access-Token, X-Auth-Request-Access-Token). | ||
- Added support for extra authorization headers (X-Forwarded-Access-Token, X-Auth-Request-Access-Token). | ||
|
||
## 0.1.1 | ||
|
||
* Bugfix for doubling URI-path while proxying in case UPSTREAM_URL has non-empty URI. | ||
- Bugfix for doubling URI-path while proxying in case UPSTREAM_URL has non-empty URI. | ||
|
||
## 0.1.0 | ||
|
||
* Initial release. | ||
- Initial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,15 @@ | ||
version: '3' | ||
|
||
env: | ||
TARGET: ./... | ||
|
||
tasks: | ||
default: | ||
- task: test | ||
- task: lint | ||
|
||
test: | ||
cmds: | ||
- go test $TARGET | ||
# - go test ./... -race | ||
- go test ./... | ||
|
||
lint: | ||
deps: | ||
- lint:go-vet | ||
- lint:golint | ||
- lint:golangci-lint | ||
- lint:gosec | ||
- lint:staticcheck | ||
|
||
lint:go-vet: | ||
cmds: | ||
- go vet $TARGET | ||
|
||
lint:golint: | ||
cmds: | ||
- golint $TARGET | ||
|
||
lint:golangci-lint: | ||
cmds: | ||
- golangci-lint run $TARGET | ||
|
||
lint:gosec: | ||
cmds: | ||
- gosec -quiet $TARGET | ||
|
||
lint:staticcheck: | ||
cmds: | ||
- staticcheck $TARGET | ||
- golangci-lint run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.