-
Notifications
You must be signed in to change notification settings - Fork 86
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
feat(helm): Use commandArgs for all command arguments and add dlv debug helm test #484
feat(helm): Use commandArgs for all command arguments and add dlv debug helm test #484
Conversation
Codecov Report
@@ Coverage Diff @@
## master #484 +/- ##
=======================================
Coverage 49.33% 49.33%
=======================================
Files 57 57
Lines 5021 5021
=======================================
Hits 2477 2477
Misses 2290 2290
Partials 254 254
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
15e5176
to
97a459d
Compare
{{- if .Values.cacheFlushInterval -}} | ||
- --cache-flush-interval={{.Values.cacheFlushInterval}} | ||
{{ end -}} | ||
# TODO: discuss, these args will always be passed causing dlv to fail. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: discuss, these args will always be passed causing dlv to fail.
I believe we should simpy use commandArgs and remove all these flags but this is a breaking change (leaning toward this option to simplify) or update the values such that they are optionally applied
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated this PR to consolidate all metacontroller cli args as commandArgs
. This is a breaking change.
Dockerfile.debug
Outdated
@@ -9,6 +9,7 @@ WORKDIR /go/src/metacontroller/ | |||
ENV ADDITIONAL_BUILD_ARGUMENTS='-gcflags="all=-N -l"' | |||
RUN make install | |||
RUN go get github.com/go-delve/delve/cmd/dlv | |||
RUN go install github.com/go-delve/delve/cmd/dlv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm I think line above is doing the same...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@grzesuav It looks like the functionality changed in go 1.18: https://tip.golang.org/doc/go1.18#modules
go get
go get no longer builds or installs packages in module-aware mode. go get is now dedicated to adjusting dependencies in go.mod. Effectively, the -d flag is always enabled. To install the latest version of an executable outside the context of the current module, use go install example.com/cmd@latest. Any version query may be used instead of latest. This form of go install was added in Go 1.16, so projects supporting older versions may need to provide install instructions for both go install and go get. go get now reports an error when used outside a module, since there is no go.mod file to update. In GOPATH mode (with GO111MODULE=off), go get still builds and installs packages, as before.
I was confused by this as well 😂 . I updated it just use the install command now.
.github/workflows/test_release.yaml
Outdated
@@ -127,15 +127,23 @@ jobs: | |||
echo "::set-output name=changed::true" | |||
fi | |||
|
|||
- name: Setup kind | |||
- name: Build local debug image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why you would like to use debug image in testing ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this test I want to cover two things.
- The helm chart can accept values to allow deploying the debug version of metacontroller
- Any helm chart or Dockerfile changes do not break the debug version of metacontroller
Basically, this is more a dev facing use case than user facing. Please let me know if this makes sense.
97a459d
to
65c0aa0
Compare
6040156
to
8f29fac
Compare
Note to self: Use https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts to share docker image across jobs in workflow Upload as tar Set small retention policy |
7e172c3
to
340b290
Compare
@@ -2,6 +2,28 @@ | |||
name: Test / Release | |||
on: [push, pull_request] | |||
jobs: | |||
dockerbuild: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This lets us build the docker image once and reference it in each kind version rather than rebuilding the docker image for every kind version.
@@ -4,7 +4,7 @@ rbac: | |||
image: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed pdb-value.yaml
as the test coverage for pdb is included in leader-election-values.yaml
as well. (I'm not sure why github thinks this was a rename)
340b290
to
d34ce3c
Compare
Hi @grzesuav , this PR is ready for review. Please let me know your feedback. Also, this has a breaking change. I included the BREAKING CHANGE footer in the commit message so hopefully it versions properly (first time committing a breaking change with semantic release for me). |
Signed-off-by: Mike Smith <10135646+mjsmith1028@users.noreply.github.com>
Signed-off-by: Mike Smith <10135646+mjsmith1028@users.noreply.github.com>
Signed-off-by: Mike Smith <10135646+mjsmith1028@users.noreply.github.com>
BREAKING CHANGE: The following helm values are removed. The equivalent command arguments can now be passed directly to the `commandArgs` value. - discoveryInterval - cacheFlushInterval - zap.logLevel - zap.devel - zap.encoder - zap.stacktraceLevel Signed-off-by: Mike Smith <10135646+mjsmith1028@users.noreply.github.com>
d34ce3c
to
9be8f2b
Compare
🎉 This PR is included in version 4.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Merge after PR: #483 is merged to master