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

Fix: Shell scripts to pass shellcheck linter for sensor.sh and central.sh #3578

Merged
merged 19 commits into from
Oct 28, 2022

Conversation

rachana-dani
Copy link
Contributor

@rachana-dani rachana-dani commented Oct 26, 2022

Description


Fix shell scripts to pass Shellcheck linter for
deploy/k8s/sensor.sh
deploy/k8s/central.sh
deploy/openshift/central.sh

Checklist

  • Investigated and inspected CI test results
  • Unit test and regression tests added [Does not apply]
  • Evaluated and added CHANGELOG entry if required [Does not apply]
  • Determined and documented upgrade steps [Does not apply]
  • Documented user facing changes (create PR based on [openshift/openshift-docs] Does not apply and merge into rhacs-docs)

If any of these don't apply, please comment below.

Testing Performed

CI pipeline is a sufficient indicator but tested by running make shell-style. It passed successfully.

@openshift-ci
Copy link

openshift-ci bot commented Oct 26, 2022

Hi @rachana-dani. Thanks for your PR.

I'm waiting for a stackrox member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@github-actions github-actions bot added the external-contributor To put on issues and PRs from external contributors label Oct 26, 2022
@janisz
Copy link
Contributor

janisz commented Oct 26, 2022

/ok-to-test

@roxbot
Copy link
Contributor

roxbot commented Oct 26, 2022

Images are ready for the commit at 4777193.

To use with deploy scripts, first export MAIN_IMAGE_TAG=3.72.x-436-g477719336f.

@janisz
Copy link
Contributor

janisz commented Oct 27, 2022

@rachana-dani Style check still failing

@janisz janisz self-requested a review October 27, 2022 09:36
@@ -1,13 +1,15 @@
#!/usr/bin/env bash
# shellcheck disable=SC1091
# shellcheck disable=SC2086
Copy link
Contributor

Choose a reason for hiding this comment

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

Where do we need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its needed for ROX_ADMIN_PASSWORD="$(cat ${K8S_DIR}/central-deploy/password)". I will move the suppress comment to appropriate position.

@rachana-dani
Copy link
Contributor Author

@rachana-dani: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/grouped-static-checks d46ee71 link true /test grouped-static-checks
Full PR test history. Your PR dashboard.

Hey @janisz, I have excluded the file names from stylecheck_skip.txt and the grouped_static_checks are failing. This check is to see if files present in stylecheck_skip.txt don't have linting issues anymore. If none of the other tests are failing , why is this one failing?
Am I missing something? Can you please help me with this?

@rachana-dani
Copy link
Contributor Author

@rachana-dani: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/grouped-static-checks 2202929 link true /test grouped-static-checks
Full PR test history. Your PR dashboard.

link

Hey @janisz , I have not made any changes to deploy/openshift/sensor.sh but yet somehow grouped_static_checks test is failing for me.
Please confirm if this is an issue? I don't think this is an expected behaviour?

@janisz
Copy link
Contributor

janisz commented Oct 28, 2022

/retest

@janisz
Copy link
Contributor

janisz commented Oct 28, 2022

Please remove deploy/openshift/sensor.sh from the list as it's symlink to k8s/sensor.sh

deploy/openshift/sensor.sh -> ../k8s/sensor.sh

@rachana-dani
Copy link
Contributor Author

Thanks @janisz. @gavin-stackrox @tommartensen, can you please review this PR?

@gavin-stackrox
Copy link
Contributor

Thanks @janisz. @gavin-stackrox @tommartensen, can you please review this PR?

Hi @rachana-dani, thanks for the fix! It looks like @janisz has approved the PR and a single approver is sufficient to merge. Are you able to merge it?

@janisz janisz merged commit aa084c0 into stackrox:master Oct 28, 2022
ivan-degtiarenko pushed a commit that referenced this pull request Nov 5, 2022
…l.sh (#3578)

Co-authored-by: rdani <rachana_sudhindradani@intuit.com>
Co-authored-by: Tomasz Janiszewski <janiszt@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external-contributor To put on issues and PRs from external contributors ok-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants