Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.20.0 #375

Merged
merged 38 commits into from
Aug 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
19c5a48
feat: Add dependency graph implementation
r3nic1e Jul 22, 2022
b5ee8a7
fix: handle graph errors
r3nic1e Jul 22, 2022
1691f7f
feat: update golangci-lint
r3nic1e Jul 22, 2022
94e4d34
fix: disable some golangci-lint checks
r3nic1e Jul 22, 2022
068e524
fix: linter issues
r3nic1e Jul 22, 2022
e45e61b
fix: remove some nolints
r3nic1e Jul 22, 2022
3a86b30
feat: add tests for graph
r3nic1e Jul 23, 2022
5315720
fix: some linters for tests
r3nic1e Jul 23, 2022
53815ee
feat: add dfs to detect cycles
r3nic1e Jul 23, 2022
ec4af53
feat(deps): update dependencies
r3nic1e Jul 26, 2022
743d088
Merge pull request #370 from helmwave/update-deps
zhilyaev Jul 26, 2022
f647ef1
Merge pull request #366 from helmwave/dependency-graph
zhilyaev Jul 26, 2022
5cfd50d
silence kubedog klog
zhilyaev Jul 26, 2022
35c510a
fix: go.mod
zhilyaev Jul 26, 2022
1fd95d7
Merge branch 'release-0.20.0' into disable-klog
zhilyaev Jul 26, 2022
441a005
wip test1
zhilyaev Jul 26, 2022
2a754a0
feat: add contexts
r3nic1e Jul 26, 2022
9bd7292
flexible chart name
zhilyaev Jul 26, 2022
de9bf50
fix tests
zhilyaev Jul 26, 2022
d43bb36
Merge pull request #374 from helmwave/chart-short
zhilyaev Jul 26, 2022
dec4bf6
Merge pull request #372 from helmwave/disable-klog
zhilyaev Jul 26, 2022
7f0c158
Merge pull request #373 from helmwave/contexts
zhilyaev Jul 26, 2022
969b98e
fix: linter issues and tests
r3nic1e Jul 27, 2022
bb6c52c
feat: replace `In` method with generics and interface
r3nic1e Jul 27, 2022
e220993
feat: add a bit more interfaces
r3nic1e Jul 28, 2022
0671017
fix: disable ireturn linter
r3nic1e Jul 28, 2022
401baeb
fix: some linter issues
r3nic1e Jul 28, 2022
cbd3306
Merge pull request #379 from helmwave/fix-linters
zhilyaev Jul 29, 2022
3ffdfe8
fix: helper.In logic
r3nic1e Jul 30, 2022
28d0b32
fix: race condition
r3nic1e Jul 30, 2022
30559b5
feat: add flag for limited parallel releases
r3nic1e Jul 30, 2022
d179e75
Merge pull request #380 from helmwave/limited-parallel
r3nic1e Jul 30, 2022
e705622
feat: allow to skip missing values and rendering values
r3nic1e Jul 30, 2022
5db1cba
fix: render by default
r3nic1e Jul 30, 2022
3e053ce
Merge pull request #381 from helmwave/values
zhilyaev Jul 30, 2022
56b7fbe
fix: values tests
r3nic1e Jul 31, 2022
5c62b70
feat: trigger notify workflow on release
r3nic1e Jul 31, 2022
32c87f3
feat: update some actions
r3nic1e Jul 31, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
57 changes: 29 additions & 28 deletions .github/workflows/container-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,43 @@ name: Container analysis

on:
push:
branches: [ main ]
branches: [main]
schedule:
- cron: '44 10 * * 6'

- cron: "44 10 * * 6"

jobs:
trivy:
runs-on: ubuntu-latest
steps:
- name: Run Trivy
uses: aquasecurity/trivy-action@0105373003c89c494a3f436bd5efc57f3ac1ca20
with:
image-ref: 'ghcr.io/helmwave/helmwave:latest'
format: 'template'
template: '@/contrib/sarif.tpl'
output: 'trivy-results.sarif'
severity: 'CRITICAL,HIGH'
- name: Run Trivy
uses: aquasecurity/trivy-action@503d3abc15463af68b817d685982721f134256a5
with:
image-ref: "ghcr.io/${{ github.repository }}:latest"
format: "template"
template: "@/contrib/sarif.tpl"
output: "trivy-results.sarif"
severity: "CRITICAL,HIGH"

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-results.sarif'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: "trivy-results.sarif"

snyk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run Snyk
continue-on-error: true
uses: snyk/actions/docker@14818c4695ecc4045f33c9cee9e795a788711ca4
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: ghcr.io/helmwave/helmwave:latest
args: --file=Dockerfile
- name: Upload Snyk result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: snyk.sarif
- uses: actions/checkout@v3

- name: Run Snyk
continue-on-error: true
uses: snyk/actions/docker@ff5c02a0e3adc5c52e2c9e7558edf2b46d69ac1f
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: ghcr.io/${{ github.repository }}:latest
args: --file=Dockerfile

- name: Upload Snyk result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: snyk.sarif
11 changes: 5 additions & 6 deletions .github/workflows/go-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@ on:

jobs:
lint:
strategy:
fail-fast: false
matrix:
go-version:
- 1.18.x
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.18

- uses: actions/checkout@v3

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.45.0
version: v1.47.2
40 changes: 30 additions & 10 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@ on:
push:
tags: ["v*"]

permissions:
contents: write
packages: write
issues: write

jobs:
tagger:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
permissions:
contents: write
steps:
- name: Create tag
id: tag
Expand Down Expand Up @@ -68,6 +65,9 @@ jobs:
goreleaser:
runs-on: ubuntu-latest
if: always()
permissions:
contents: read
packages: write
needs:
- get-tag
steps:
Expand All @@ -77,14 +77,14 @@ jobs:
ref: ${{ needs.get-tag.outputs.tag }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand All @@ -102,12 +102,32 @@ jobs:
${{ runner.os }}-go-

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.CR_PAT }}
# IDK
ASSUME_NO_MOVING_GC_UNSAFE_RISK_IT_WITH: go1.18

trigger-notify:
runs-on: ubuntu-latest
if: always()
permissions:
actions: write
needs:
- get-tag
steps:
- name: Trigger helmwave/docs workflow
uses: actions/github-script@v6
with:
github-token: ${{ secrets.PAT }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: "notify.yml",
ref: process.env.GITHUB_TAG,
})
env:
GITHUB_TAG: ${{ needs.get-tag.outputs.tag }}
31 changes: 20 additions & 11 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,19 @@ output:
linters:
enable-all: true
disable:
- gochecknoglobals # TODO: get rid of globals
- exhaustivestruct # deprecated
- exhaustruct # it requires to initialize billions of fields, I ain't monkey to fix these
- gochecknoinits # we want to use `init()` functions
- gocyclo # we use cyclop
- godox # TODO: get rid of TODOs
- goerr113 # need to create wrapped static errors
- goimports # we already lint with gofumpt
- golint # deprecated
- gomnd # we want to keep magic numbers
- interfacer # deprecated
- ireturn # sometimes we need to return interfaces
- maligned # deprecated
- nonamedreturns # we do want some named returns
- scopelint # deprecated
- varnamelen # I don't think short names are bad
- wsl # lots of style checks
Expand Down Expand Up @@ -72,15 +76,6 @@ linters-settings:
# switch
default-signifies-exhaustive: true

exhaustivestruct:
# Struct Patterns is list of expressions to match struct packages and names
# The struct packages have the form example.com/package.ExampleStruct
# The matching patterns can use matching syntax from https://pkg.go.dev/path#Match
# If this list is empty, all structs are tested.
struct-patterns:
- "*.Test"
- "example.com/package.ExampleStruct"

forbidigo:
# Forbid the following identifiers (identifiers are written using regexp):
forbid:
Expand Down Expand Up @@ -121,6 +116,16 @@ linters-settings:
- whyNoLint
- yodaStyleExpr

# these checks fail on generics
# https://github.com/go-critic/go-critic/issues/1219
# https://github.com/go-critic/go-critic/issues/1223
# https://github.com/go-critic/go-critic/issues/1224
# https://github.com/go-critic/go-critic/issues/1242
- rangeValCopy
- typeDefFirst
- hugeParam
- paramTypeCombine

settings:
captLocal: # must be valid enabled check name
# whether to restrict checker to params only (default true)
Expand Down Expand Up @@ -436,9 +441,13 @@ issues:
- path: _test\.go
linters:
- dupl
- forcetypeassert
- gochecknoglobals
- goconst
- godot
- lll
- revive
- wrapcheck
- forcetypeassert

# Independently from option `exclude` we use default exclude patterns,
# it can be disabled by this option. To list all
Expand Down
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"go.buildTags": "integration"
"go.buildTags": "integration",
"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": ".github/workflows/*.yml"
}
}
5 changes: 3 additions & 2 deletions cmd/helmwave/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ var (
ErrNotChose = errors.New("you did not specify a shell")
)

//nolint:forbidigo // we need to use fmt.Print
func completion() *cli.Command {
return &cli.Command{
Name: "completion",
Expand All @@ -82,11 +83,11 @@ func completion() *cli.Command {

switch c.Args().First() {
case "bash":
fmt.Print(bash) // nolint:forbidigo
fmt.Print(bash)

return nil
case "zsh":
fmt.Print(zsh) // nolint:forbidigo
fmt.Print(zsh)

return nil
default:
Expand Down
3 changes: 2 additions & 1 deletion cmd/helmwave/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/urfave/cli/v2"
)

//nolint:gochecknoglobals // we need global list of commands
var commands = []*cli.Command{
new(action.Build).Cmd(),
new(action.Diff).Cmd(),
Expand Down Expand Up @@ -91,7 +92,7 @@ func version() *cli.Command {
Aliases: []string{"ver"},
Usage: "Show shorts version",
Action: func(c *cli.Context) error {
fmt.Println(helmwave.Version) // nolint:forbidigo
fmt.Println(helmwave.Version) //nolint:forbidigo // we need to use fmt.Println here

return nil
},
Expand Down