Skip to content

[DNM] GH-46726: [CI][Dev] fix shellcheck errors in the ci/scripts/conan_build.sh #46727

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

hiroyuki-sato
Copy link
Collaborator

@hiroyuki-sato hiroyuki-sato commented Jun 6, 2025

Rationale for this change

This is the sub issue #44748.

  • SC2046 -- Quote this to prevent word splitt...
  • SC2206 -- Quote to prevent word splitting/g...
  • SC2086 -- Double quote to prevent globbing ...
In ci/scripts/conan_build.sh line 32:
  conan_args+=(--options arrow/*:parquet=${ARROW_CONAN_PARQUET})
                                         ^--------------------^ SC2206 (warning): Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.


In ci/scripts/conan_build.sh line 33:
  conan_args+=(--options arrow/*:with_thrift=${ARROW_CONAN_PARQUET})
                                             ^--------------------^ SC2206 (warning): Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.


In ci/scripts/conan_build.sh line 34:
  conan_args+=(--options arrow/*:with_boost=${ARROW_CONAN_PARQUET})
                                            ^--------------------^ SC2206 (warning): Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.


In ci/scripts/conan_build.sh line 37:
  conan_args+=(--options arrow/*:with_brotli=${ARROW_CONAN_WITH_BROTLI})
                                             ^------------------------^ SC2206 (warning): Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.


In ci/scripts/conan_build.sh line 40:
  conan_args+=(--options arrow/*:with_bz2=${ARROW_CONAN_WITH_BZ2})
                                          ^---------------------^ SC2206 (warning): Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.


In ci/scripts/conan_build.sh line 43:
  conan_args+=(--options arrow/*:with_flight_rpc=${ARROW_CONAN_WITH_FLIGHT_RPC})
                                                 ^----------------------------^ SC2206 (warning): Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.


In ci/scripts/conan_build.sh line 44:
  conan_args+=(--options arrow/*:with_grpc=${ARROW_CONAN_WITH_FLIGHT_RPC})
                                           ^----------------------------^ SC2206 (warning): Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.


In ci/scripts/conan_build.sh line 45:
  conan_args+=(--options arrow/*:with_protobuf=${ARROW_CONAN_WITH_FLIGHT_RPC})
                                               ^----------------------------^ SC2206 (warning): Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.


In ci/scripts/conan_build.sh line 46:
  conan_args+=(--options arrow/*:with_re2=${ARROW_CONAN_WITH_FLIGHT_RPC})
                                          ^----------------------------^ SC2206 (warning): Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.


In ci/scripts/conan_build.sh line 49:
  conan_args+=(--options arrow/*:with_glog=${ARROW_CONAN_WITH_GLOG})
                                           ^----------------------^ SC2206 (warning): Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.


In ci/scripts/conan_build.sh line 52:
  conan_args+=(--options arrow/*:with_jemalloc=${ARROW_CONAN_WITH_JEMALLOC})
                                               ^--------------------------^ SC2206 (warning): Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.


In ci/scripts/conan_build.sh line 55:
  conan_args+=(--options arrow/*:with_json=${ARROW_CONAN_WITH_JSON})
                                           ^----------------------^ SC2206 (warning): Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.


In ci/scripts/conan_build.sh line 58:
  conan_args+=(--options arrow/*:with_lz4=${ARROW_CONAN_WITH_LZ4})
                                          ^---------------------^ SC2206 (warning): Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.


In ci/scripts/conan_build.sh line 61:
  conan_args+=(--options arrow/*:with_snappy=${ARROW_CONAN_WITH_SNAPPY})
                                             ^------------------------^ SC2206 (warning): Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.


In ci/scripts/conan_build.sh line 64:
  conan_args+=(--options arrow/*:with_zstd=${ARROW_CONAN_WITH_ZSTD})
                                           ^----------------------^ SC2206 (warning): Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.


In ci/scripts/conan_build.sh line 67:
version=$(grep '^set(ARROW_VERSION ' ${ARROW_HOME}/cpp/CMakeLists.txt | \
                                     ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
version=$(grep '^set(ARROW_VERSION ' "${ARROW_HOME}"/cpp/CMakeLists.txt | \


In ci/scripts/conan_build.sh line 69:
conan_args+=(--version ${version})
                       ^--------^ SC2206 (warning): Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.


In ci/scripts/conan_build.sh line 72:
rm -rf ${build_dir}/conan || sudo rm -rf ${build_dir}/conan
       ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                         ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
rm -rf "${build_dir}"/conan || sudo rm -rf "${build_dir}"/conan


In ci/scripts/conan_build.sh line 73:
mkdir -p ${build_dir}/conan || sudo mkdir -p ${build_dir}/conan
         ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                             ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
mkdir -p "${build_dir}"/conan || sudo mkdir -p "${build_dir}"/conan


In ci/scripts/conan_build.sh line 74:
if [ -w ${build_dir} ]; then
        ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
if [ -w "${build_dir}" ]; then


In ci/scripts/conan_build.sh line 75:
  cp -a ${source_dir}/ci/conan/* ${build_dir}/conan/
        ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                 ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
  cp -a "${source_dir}"/ci/conan/* "${build_dir}"/conan/


In ci/scripts/conan_build.sh line 77:
  sudo cp -a ${source_dir}/ci/conan/* ${build_dir}/conan/
             ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                      ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
  sudo cp -a "${source_dir}"/ci/conan/* "${build_dir}"/conan/


In ci/scripts/conan_build.sh line 78:
  sudo chown -R $(id -u):$(id -g) ${build_dir}/conan/
                ^------^ SC2046 (warning): Quote this to prevent word splitting.
                         ^------^ SC2046 (warning): Quote this to prevent word splitting.
                                  ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
  sudo chown -R $(id -u):$(id -g) "${build_dir}"/conan/


In ci/scripts/conan_build.sh line 80:
cd ${build_dir}/conan/all
   ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
cd "${build_dir}"/conan/all

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2206 -- Quote to prevent word splitting/g...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

What changes are included in this PR?

Add quote like "${ARROW_CONAN_PARQUET}"

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

Copy link

github-actions bot commented Jun 6, 2025

⚠️ GitHub issue #46726 has been automatically assigned in GitHub to PR creator.

@github-actions github-actions bot added the awaiting review Awaiting review label Jun 6, 2025
@kou
Copy link
Member

kou commented Jun 6, 2025

@github-actions crossbow submit -g conan

conan_args+=(--options arrow/*:parquet=${ARROW_CONAN_PARQUET})
conan_args+=(--options arrow/*:with_thrift=${ARROW_CONAN_PARQUET})
conan_args+=(--options arrow/*:with_boost=${ARROW_CONAN_PARQUET})
conan_args+=(--options arrow/*:parquet="${ARROW_CONAN_PARQUET}")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
conan_args+=(--options arrow/*:parquet="${ARROW_CONAN_PARQUET}")
conan_args+=(--options "arrow/*:parquet=${ARROW_CONAN_PARQUET}")

Copy link
Collaborator Author

@hiroyuki-sato hiroyuki-sato Jun 6, 2025

Choose a reason for hiding this comment

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

I want to double check just in case.
Does the '*' character is just the character not a wildcard character ?

And suggested change means not only parquet but also with_thrift and with_boost too?

  conan_args+=(--options "arrow/*:parquet=${ARROW_CONAN_PARQUET}")
  conan_args+=(--options "arrow/*:with_thrift=${ARROW_CONAN_PARQUET}")
  conan_args+=(--options "arrow/*:with_boost=${ARROW_CONAN_PARQUET}")

and the rest of belows

if [ -n "${ARROW_CONAN_WITH_GLOG:-}" ]; then
  conan_args+=(--options arrow/*:with_glog="${ARROW_CONAN_WITH_GLOG}")
fi
if [ -n "${ARROW_CONAN_WITH_JEMALLOC:-}" ]; then
  conan_args+=(--options arrow/*:with_jemalloc="${ARROW_CONAN_WITH_JEMALLOC}")
fi
if [ -n "${ARROW_CONAN_WITH_JSON:-}" ]; then
  conan_args+=(--options arrow/*:with_json="${ARROW_CONAN_WITH_JSON}")
fi
if [ -n "${ARROW_CONAN_WITH_LZ4:-}" ]; then
  conan_args+=(--options arrow/*:with_lz4="${ARROW_CONAN_WITH_LZ4}")
fi
if [ -n "${ARROW_CONAN_WITH_SNAPPY:-}" ]; then
  conan_args+=(--options arrow/*:with_snappy="${ARROW_CONAN_WITH_SNAPPY}")
fi
if [ -n "${ARROW_CONAN_WITH_ZSTD:-}" ]; then
  conan_args+=(--options arrow/*:with_zstd="${ARROW_CONAN_WITH_ZSTD}")
fi

Copy link
Member

Choose a reason for hiding this comment

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

Yes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks! done.

Copy link

github-actions bot commented Jun 6, 2025

Revision: 07e75eb

Submitted crossbow builds: ursacomputing/crossbow @ actions-fad6f67540

Task Status
conan-maximum GitHub Actions
conan-minimum GitHub Actions

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Jun 6, 2025
@github-actions github-actions bot added awaiting change review Awaiting change review awaiting changes Awaiting changes and removed awaiting changes Awaiting changes awaiting change review Awaiting change review labels Jun 6, 2025
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Jun 6, 2025
@hiroyuki-sato
Copy link
Collaborator Author

It seems that conan-minimum can't find RapidJSON package.

https://github.com/ursacomputing/crossbow/actions/runs/15484349076/job/43595828887#step:6:1006

-- Conan: Including build module from '/root/.conan2/p/opens291bcb59a86d6/p/lib/cmake/conan-official-openssl-variables.cmake'
-- Providing CMake module for FindThriftAlt as part of Parquet CMake package
-- pkg-config package for thrift that is used by parquet for static link isn't found
CMake Warning at cmake_modules/FindRapidJSONAlt.cmake:29 (find_package):
  By not providing "FindRapidJSON.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "RapidJSON", but CMake did not find one.

  Could not find a package configuration file provided by "RapidJSON"
  (requested version 1.1.0) with any of the following names:

    RapidJSONConfig.cmake
    rapidjson-config.cmake

  Add the installation prefix of "RapidJSON" to CMAKE_PREFIX_PATH or set
  "RapidJSON_DIR" to a directory containing one of the above files.  If
  "RapidJSON" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  cmake_modules/ThirdpartyToolchain.cmake:310 (find_package)
  cmake_modules/ThirdpartyToolchain.cmake:2538 (resolve_dependency)
  CMakeLists.txt:618 (include)


CMake Error at /root/.conan2/p/cmakee7c682f30a1a9/p/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
  Could NOT find RapidJSONAlt (missing: RAPIDJSON_INCLUDE_DIR) (Required is
  at least version "1.1.0")
Call Stack (most recent call first):
  /root/.conan2/p/cmakee7c682f30a1a9/p/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)

@kou
Copy link
Member

kou commented Jun 6, 2025

Let's fix the failure before this.

@hiroyuki-sato
Copy link
Collaborator Author

Thanks. I reverted all commits for testing conan-minimum build failure. After resolve build failure I will modify quote again.

@hiroyuki-sato
Copy link
Collaborator Author

@github-actions crossbow submit -g conan

Copy link

github-actions bot commented Jun 7, 2025

Revision: c488ecb

Submitted crossbow builds: ursacomputing/crossbow @ actions-e4ffbae60d

Task Status
conan-maximum GitHub Actions
conan-minimum GitHub Actions

@hiroyuki-sato
Copy link
Collaborator Author

conan-minimum build failure unrelated this change.

@hiroyuki-sato hiroyuki-sato changed the title GH-46726: [CI][Dev] fix shellcheck errors in the ci/scripts/conan_build.sh [DNN] GH-46726: [CI][Dev] fix shellcheck errors in the ci/scripts/conan_build.sh Jun 7, 2025
@hiroyuki-sato hiroyuki-sato changed the title [DNN] GH-46726: [CI][Dev] fix shellcheck errors in the ci/scripts/conan_build.sh [DNM] GH-46726: [CI][Dev] fix shellcheck errors in the ci/scripts/conan_build.sh Jun 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting change review Awaiting change review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants