Skip to content

Conversation

@wking
Copy link
Member

@wking wking commented Jul 8, 2020

To make ShellCheck happy, addressing:

$ sudo podman run --rm --volume "${PWD}:/workdir:ro,z" --workdir /workdir registry.svc.ci.openshift.org/ci/shellcheck sh -c 'find ci-operator/step-registry/ipi -name "*.sh" -print0 | xargs -0 -n1 shellcheck'

In ci-operator/step-registry/ipi/conf/aws/sharednetwork/ipi-conf-aws-sharednetwork-commands.sh line 13:
aws_region=$(/tmp/yq r ${CONFIG} 'platform.aws.region')
                       ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean:
aws_region=$(/tmp/yq r "${CONFIG}" 'platform.aws.region')

For more information:
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

In ci-operator/step-registry/ipi/conf/azure/sharednetwork/ipi-conf-azure-sharednetwork-commands.sh line 13:
azure_region=$(/tmp/yq r ${CONFIG} 'platform.azure.region')
                         ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean:
azure_region=$(/tmp/yq r "${CONFIG}" 'platform.azure.region')

For more information:
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

More groundwork for #9772.

To make ShellCheck happy, addressing:

  $ sudo podman run --rm --volume "${PWD}:/workdir:ro,z" --workdir /workdir registry.svc.ci.openshift.org/ci/shellcheck sh -c 'find ci-operator/step-registry/ipi -name "*.sh" -print0 | xargs -0 -n1 shellcheck'

  In ci-operator/step-registry/ipi/conf/aws/sharednetwork/ipi-conf-aws-sharednetwork-commands.sh line 13:
  aws_region=$(/tmp/yq r ${CONFIG} 'platform.aws.region')
                         ^-------^ SC2086: Double quote to prevent globbing and word splitting.

  Did you mean:
  aws_region=$(/tmp/yq r "${CONFIG}" 'platform.aws.region')

  For more information:
    https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

  In ci-operator/step-registry/ipi/conf/azure/sharednetwork/ipi-conf-azure-sharednetwork-commands.sh line 13:
  azure_region=$(/tmp/yq r ${CONFIG} 'platform.azure.region')
                           ^-------^ SC2086: Double quote to prevent globbing and word splitting.

  Did you mean:
  azure_region=$(/tmp/yq r "${CONFIG}" 'platform.azure.region')

  For more information:
    https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 8, 2020
Copy link
Contributor

@abhinavdahiya abhinavdahiya left a comment

Choose a reason for hiding this comment

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

/lgtm

PATCH="${SHARED_DIR}/install-config-sharednetwork.yaml.patch"

aws_region=$(/tmp/yq r ${CONFIG} 'platform.aws.region')
aws_region=$(/tmp/yq r "${CONFIG}" 'platform.aws.region')
Copy link
Contributor

Choose a reason for hiding this comment

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

https://github.com/openshift/release/pull/10105/files#diff-27605b7c8f643fa9b7d430f76604ebe6R10 is already quotes CONFIG, why do we need to quote again ??

this shellcheck warnings is just too noisy imo

Copy link
Member Author

@wking wking Jul 8, 2020

Choose a reason for hiding this comment

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

The earlier quotes affect word splitting on that line. These quotes affect splitting on this line. For example:

$ A='b c'
$ B="${A}"
$ python -c 'import sys; print(sys.argv)' ${B}
['-c', 'b', 'c']
$ python -c 'import sys; print(sys.argv)' "${B}"
['-c', 'b c']

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 8, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, wking

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 6761c26 into openshift:master Jul 8, 2020
@openshift-ci-robot
Copy link
Contributor

@wking: Updated the following 2 configmaps:

  • step-registry configmap in namespace ci at cluster api.ci using the following files:
    • key ipi-conf-aws-sharednetwork-commands.sh using file ci-operator/step-registry/ipi/conf/aws/sharednetwork/ipi-conf-aws-sharednetwork-commands.sh
    • key ipi-conf-azure-sharednetwork-commands.sh using file ci-operator/step-registry/ipi/conf/azure/sharednetwork/ipi-conf-azure-sharednetwork-commands.sh
  • step-registry configmap in namespace ci at cluster app.ci using the following files:
    • key ipi-conf-aws-sharednetwork-commands.sh using file ci-operator/step-registry/ipi/conf/aws/sharednetwork/ipi-conf-aws-sharednetwork-commands.sh
    • key ipi-conf-azure-sharednetwork-commands.sh using file ci-operator/step-registry/ipi/conf/azure/sharednetwork/ipi-conf-azure-sharednetwork-commands.sh
Details

In response to this:

To make ShellCheck happy, addressing:

$ sudo podman run --rm --volume "${PWD}:/workdir:ro,z" --workdir /workdir registry.svc.ci.openshift.org/ci/shellcheck sh -c 'find ci-operator/step-registry/ipi -name "*.sh" -print0 | xargs -0 -n1 shellcheck'

In ci-operator/step-registry/ipi/conf/aws/sharednetwork/ipi-conf-aws-sharednetwork-commands.sh line 13:
aws_region=$(/tmp/yq r ${CONFIG} 'platform.aws.region')
                      ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean:
aws_region=$(/tmp/yq r "${CONFIG}" 'platform.aws.region')

For more information:
 https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

In ci-operator/step-registry/ipi/conf/azure/sharednetwork/ipi-conf-azure-sharednetwork-commands.sh line 13:
azure_region=$(/tmp/yq r ${CONFIG} 'platform.azure.region')
                        ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean:
azure_region=$(/tmp/yq r "${CONFIG}" 'platform.azure.region')

For more information:
 https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

More groundwork for #9772.

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.

@wking wking deleted the ipi-shellcheck-cleanup branch July 8, 2020 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants