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

WIP: Adding Linting and Testing on all committs #352

Open
wants to merge 28 commits into
base: master
Choose a base branch
from

Conversation

edmondop
Copy link

@edmondop edmondop commented Jan 22, 2023

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.

@edmondop edmondop requested review from a team as code owners January 22, 2023 01:39
@edmondop edmondop changed the title Adding Linting and Testing on all committs WIP: Adding Linting and Testing on all committs Jan 23, 2023
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
Copy link
Contributor

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.

Copy link
Author

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 Show resolved Hide resolved
@@ -0,0 +1,43 @@
name: Lint and Test Charts

on: push
Copy link
Contributor

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.

runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
Copy link
Contributor

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.

fetch-depth: "0"

- name: Set up Helm
uses: azure/setup-helm@v1
Copy link
Contributor

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?

- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.8.1
Copy link
Contributor

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?

Comment on lines 26 to 29
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.2.1
with:
version: v3.5.1
Copy link
Contributor

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?

@@ -0,0 +1,8 @@
elasticsearch:
Copy link
Contributor

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?

Copy link
Author

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:
Copy link
Contributor

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?

@underrun
Copy link
Contributor

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

@edmondop
Copy link
Author

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

.github/workflows/ci.yml Outdated Show resolved Hide resolved
ct.yml Outdated Show resolved Hide resolved
@robholland
Copy link
Contributor

To make some iterative progress here, can you please re-base and get lint-only running? Then we can work on install checks after.

@robholland
Copy link
Contributor

I will work with you to ensure this gets merged.

Copy link
Contributor

@robholland robholland left a 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.

@robholland robholland added the needs revision Team has requested some changes label Jun 14, 2024
@edmondop
Copy link
Author

Re-base on current code, just lint for now.

Thanks, on it. Should be able to get it ready by eod

@edmondop
Copy link
Author

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?

Copy link
Contributor

@robholland robholland left a 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 }}
Copy link
Contributor

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 ?

Copy link
Author

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 }}
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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.

Copy link
Author

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

Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs revision Team has requested some changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants