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

[hack] a script that can be used to smoke test the latest release #220

Merged
merged 2 commits into from
Aug 8, 2023

Conversation

jmazzitelli
Copy link
Contributor

@jmazzitelli jmazzitelli commented Aug 7, 2023

We can now use this script after each release to confirm the helm charts that are about to be published actually work.

You should just be able to run smoke-test-release-branch.sh but there are some cmdline options you can use to customize it in case you want to test on, say, your own remote repo.

Also included is a new CI workflow to automatically run this script on release PRs (or any PR that modifies the published helm charts index file).

@jmazzitelli jmazzitelli force-pushed the hack-smoke-test branch 2 times, most recently from 8cefbb8 to e4c4d78 Compare August 7, 2023 18:27
We will be able to use this in a github action when we release the helm charts.
@jmazzitelli
Copy link
Contributor Author

jmazzitelli commented Aug 7, 2023

You can confirm the new github action works by looking at my test PR over in my fork: jmazzitelli#2

Notice that because the helm chart index was changed (which happens when new helm charts are released), that triggered the new workflow which runs the new smoke test script. See the successful smoke test run here: https://github.com/jmazzitelli/helm-charts/actions/runs/5795882447/job/15708303878?pr=2#step:3:83

and that normally only happens in release PRs. This will smoke test
the latest release found in the PR branch.
@leandroberetta
Copy link
Contributor

@jmazzitelli I'm running this script locally and I'm hitting the following issue:

(Helm: Chart=[kiali-server], Release=[kiali-server], Version=[1.61.0])
deployment.apps/kiali condition met
error: timed out waiting for the condition on pods/kiali-84f8c58f5f-frrzw

I'm just running the script with no parameters. I can confirm that the pod is there, I will continue troubleshooting, any idea?.

@jmazzitelli
Copy link
Contributor Author

jmazzitelli commented Aug 8, 2023

(Helm: Chart=[kiali-server], Release=[kiali-server], Version=[1.61.0])

That's weird it is running with version 1.61.0. Are you testing that? Look at the output of the script and see what release branch it thinks it is using. Make sure when you pull this PR you merge it on top of a master branch.

It is going to look at "origin"'s branches and try to find the latest helm-charts-releases branch. It might be your fork doesn't have all of them fetched?

@leandroberetta
Copy link
Contributor

Yeah, it's true, but I synced my fork and it's doing the same thing, I'm not sure why it's picking:

[HACK] Will smoke test remote release branch [origin/helm-charts-release-58-main]

Shouldn't be using master?.

@jmazzitelli
Copy link
Contributor Author

[HACK] Will smoke test remote release branch [origin/helm-charts-release-58-main]

Shouldn't be using master?.

No, I wrote the script so by default it will try to find the latest helm-charts-release-* branch (it will get all of them and then sort them so it will pick the one with the highest number - in our case that is helm-charts-release-88-main.

In fact, I don't even know how you are picking up helm-charts-release-58-main because that isn't even in the remote repo anymore! That branch has been deleted -- see https://github.com/kiali/helm-charts/branches/all

Do a git remote prune origin -- it should purge all of the old branches that we don't have anymore. It sounds like your local repo doesn't have the latest from kiali/helm-charts repo. What is your origin pointing to anyway? It sounds like it might not even be pointing to the correct repo. Do this and see what it says:

$ git remote -v | grep origin
origin	[email protected]:kiali/helm-charts.git (fetch)
origin	[email protected]:kiali/helm-charts.git (push)

@leandroberetta
Copy link
Contributor

OK, that is the issue, I generally use "origin" for my fork, and "upstream" for the upstream repo. Now it works, I used your recommended parameter -grn upstream

Copy link
Contributor

@leandroberetta leandroberetta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good:

[HACK] =========================
[HACK] The smoke test has PASSED
[HACK] =========================

@jmazzitelli jmazzitelli merged commit 2b20e8a into kiali:master Aug 8, 2023
1 check passed
@jmazzitelli jmazzitelli deleted the hack-smoke-test branch August 8, 2023 20:17
Matiasmct pushed a commit to giffgaff/kiali-charts-backup that referenced this pull request Nov 29, 2023
…ali#220)

* [hack] a script that can be used to smoke test the latest release
We will be able to use this in a github action when we release the helm charts.

* a github workflow that runs whenever a PR touches the docs/index.yaml,
and that normally only happens in release PRs. This will smoke test
the latest release found in the PR branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants