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

ci: Add shellcheck step to lint job #2650

Merged
merged 1 commit into from
Jan 23, 2024
Merged

ci: Add shellcheck step to lint job #2650

merged 1 commit into from
Jan 23, 2024

Conversation

marun
Copy link
Contributor

@marun marun commented Jan 23, 2024

#lintallthethings!

We lint code, why not shell scripts? In addition to simplifying the avoidance of common shell errors, the shellcheck wiki has lots of documentation for all the error types it checks for.

Testing

In addition to CI, local testing on arm64 linux and macos verified the logic for downloading and using a local (vs a system-wide) shellcheck.

@marun marun self-assigned this Jan 23, 2024
@marun marun marked this pull request as draft January 23, 2024 18:52
@marun marun force-pushed the ci-shellcheck branch 4 times, most recently from e8ad336 to afdd091 Compare January 23, 2024 21:29
@marun marun marked this pull request as ready for review January 23, 2024 21:29
if [[ "${SYSTEM_VERSION}" == "${VERSION}" ]]; then
SHELLCHECK=shellcheck
else
SHELLCHECK="${REPO_ROOT}/build/shellcheck"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not entirely convinced this is the best location. I'm also not a huge fan of running directly from /tmp (as per ANR). Suggested alternatives?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

$REPO_ROOT/tmp?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think build is reasonable... It's where we put the rest of our binaries right now... and it's ignored accordingly already

@@ -60,4 +60,4 @@ fi

#################################
# - Execute in random order to identify unwanted dependency
ginkgo -p -v --randomize-all ./tests/e2e/e2e.test -- ${E2E_ARGS} "${@}"
ginkgo ${GINKGO_ARGS} -v --randomize-all ./tests/e2e/e2e.test -- "${E2E_ARGS[@]}" "${@}"
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 fix right? previously we just always ran in parallel right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I tried to make the parallelism conditional but failed :/

Though maybe this is no longer required due to using a smaller shared network (2 vs 5 nodes)?

@StephenButtolph StephenButtolph added testing This primarily focuses on testing ci This focuses on changes to the CI process labels Jan 23, 2024
@StephenButtolph StephenButtolph added this to the v1.10.19 milestone Jan 23, 2024
@StephenButtolph StephenButtolph added this pull request to the merge queue Jan 23, 2024
Merged via the queue into master with commit ad516fc Jan 23, 2024
17 checks passed
@StephenButtolph StephenButtolph deleted the ci-shellcheck branch January 23, 2024 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci This focuses on changes to the CI process testing This primarily focuses on testing
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants