-
Notifications
You must be signed in to change notification settings - Fork 313
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
WIP: Adding Linting and Testing on all committs #352
base: master
Are you sure you want to change the base?
Conversation
.github/workflows/ci.yml
Outdated
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 |
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.
does this require a really old version of python? 3.7 will be EOL in a few months.
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.
👍 will update
.github/workflows/ci.yml
Outdated
@@ -0,0 +1,43 @@ | |||
name: Lint and Test Charts | |||
|
|||
on: push |
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 prefer running those on PRs instead.
Linting on push requires additional management, which we don't have right now.
.github/workflows/ci.yml
Outdated
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 |
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.
Let's use the v3
version.
.github/workflows/ci.yml
Outdated
fetch-depth: "0" | ||
|
||
- name: Set up Helm | ||
uses: azure/setup-helm@v1 |
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.
The latest version is v3
. Any reason for using v1
?
.github/workflows/ci.yml
Outdated
- name: Set up Helm | ||
uses: azure/setup-helm@v1 | ||
with: | ||
version: v3.8.1 |
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 is a year-old version. Do you have any reason not to use the latest?
.github/workflows/ci.yml
Outdated
- name: Set up chart-testing | ||
uses: helm/chart-testing-action@v2.2.1 | ||
with: | ||
version: v3.5.1 |
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.
These are also old versions, any reason for not using the latest?
ci/kind-test-values.yaml
Outdated
@@ -0,0 +1,8 @@ | |||
elasticsearch: |
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.
Where is this file used?
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.
From https://github.com/helm/chart-testing/blob/main/doc/ct_install.md
Charts may have multiple custom values files matching the glob pattern '*-values.yaml' in a directory named 'ci' in the root of the chart's directory. The chart is installed and tested for each of these files. If no custom values file is present, the chart is installed and tested with defaults.
ct.yml
Outdated
@@ -0,0 +1,5 @@ | |||
chart-repos: |
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.
The same here. Where is this file used?
I'd love to land this - but i'm inclined to skip the install step if it's not completing unless/until the deadlock gets sorted out |
Sure, I put it on hold because I was trying to get an hint on why this would not work on a kind cluster. In the meanwhile I have realised that GitHub has added large runners, so I would give a shot using those, what do you think? Can anyone set up a runner group ? https://docs.github.com/en/actions/using-github-hosted-runners/using-larger-runners |
59ece92
to
2ab8cef
Compare
To make some iterative progress here, can you please re-base and get lint-only running? Then we can work on install checks after. |
I will work with you to ensure this gets merged. |
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.
Re-base on current code, just lint for now.
Thanks, on it. Should be able to get it ready by eod |
@robholland should be good. I left the values for testing and removed the testing from the CI/CD pipeline, wdyt? |
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.
Please add a ci/
values file that tests cassandra + ElasticSearch combination (we mention that as our "default" in the README).
@@ -1,6 +1,6 @@ | |||
{{- if $.Values.server.enabled }} | |||
{{- range $service := (list "frontend" "history" "matching" "worker") }} | |||
{{ $serviceValues := index $.Values.server $service }} | |||
{{- $serviceValues := index $.Values.server $service }} |
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.
The dash has actually recently been removed because it throws a warning in helm lint
;) #284 Did you add this back due to ct lint
?
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.
No it might be result of a bad rebase:)
@@ -31,7 +31,7 @@ spec: | |||
|
|||
--- | |||
{{- range $service := (list "frontend" "matching" "history" "worker") }} | |||
{{ $serviceValues := index $.Values.server $service }} | |||
{{- $serviceValues := index $.Values.server $service }} |
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.
Same as above.
@@ -179,7 +179,7 @@ server: | |||
# tx_isolation: 'READ-COMMITTED' | |||
frontend: | |||
service: | |||
annotations: {} # Evaluated as template | |||
annotations: {} # Evaluated as template |
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.
Please revert this change.
- name: Run chart-testing (lint) | ||
run: ct lint --charts ./ --config=ct.yml | ||
|
||
- name: Create kind cluster |
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.
We don't need the cluster for now as we're not testing install.
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.
Do you suggest we add elasticsearch + cassandra but not run the tests in CI? Also I discovered I had to upgrade the action and now it doesn't work anymore :(
This is the last build with 2.4.0 that now fails because Google deprecated some APIs
https://github.com/edmondop/helm-charts/actions/runs/9551467429/job/26325831512
using the new version fails for other reasons , see https://github.com/edmondop/helm-charts/actions/runs/9551593568/job/26326271659#step:6:21. Maybe they changed the expected directory struxture, will investigate. If you are on the Slack channel you can ping me there so we can close this
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.
Did ping on slack but haven't heard back. I suggested adding a new values file for the cassandra/ES case, but now that I think about it, maybe the values files doesn't matter for lint? And no, we shouldn't do the install tests yet, so don't need the Kind cluster.
What was changed
Addresses #343
Getting the build to pass seems to be blocked by #182 but I don't think disabling hooks is appropriate:
master...BAXUSNFT:temporal-helm-charts:master#diff-5f8eb04d49dd7caffd33da659dd7bae84435c114a6255319b2965dcf6a2536ab
As you see from my fork https://github.com/edmondop/helm-charts/actions/runs/3988830053/jobs/6840499585 , the install fails because the default keyspace is never ready.