Skip to content

GH-47402: [CI][Dev] Fix shellcheck errors in the ci/scripts/python_test_emscripten.sh#47403

Merged
raulcd merged 3 commits into
apache:mainfrom
hiroyuki-sato:topic/shellcheck-python_test_emscripten
Jul 24, 2026
Merged

GH-47402: [CI][Dev] Fix shellcheck errors in the ci/scripts/python_test_emscripten.sh#47403
raulcd merged 3 commits into
apache:mainfrom
hiroyuki-sato:topic/shellcheck-python_test_emscripten

Conversation

@hiroyuki-sato

@hiroyuki-sato hiroyuki-sato commented Aug 22, 2025

Copy link
Copy Markdown
Collaborator

Rationale for this change

This is the sub issue #44748.

  • SC2086: Double quote to prevent globbing and word splitting
  • SC2012: Use find instead of ls to better handle non-alphanumeric filenames
shellcheck ci/scripts/python_test_emscripten.sh

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

Did you mean:
cd "${build_dir}"


In ci/scripts/python_test_emscripten.sh line 31:
pyodide_wheel=$(ls -t dist/pyarrow*.whl | head -1)
                ^---------------------^ SC2012 (info): Use find instead of ls to better handle non-alphanumeric filenames.


In ci/scripts/python_test_emscripten.sh line 34:
python scripts/run_emscripten_tests.py ${pyodide_wheel} --dist-dir=${pyodide_dist_dir} --runtime=node
                                       ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                   ^-----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
python scripts/run_emscripten_tests.py "${pyodide_wheel}" --dist-dir="${pyodide_dist_dir}" --runtime=node


In ci/scripts/python_test_emscripten.sh line 37:
python scripts/run_emscripten_tests.py ${pyodide_wheel} --dist-dir=${pyodide_dist_dir} --runtime=chrome
                                       ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                   ^-----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
python scripts/run_emscripten_tests.py "${pyodide_wheel}" --dist-dir="${pyodide_dist_dir}" --runtime=chrome

For more information:
  https://www.shellcheck.net/wiki/SC2012 -- Use find instead of ls to better ...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

What changes are included in this PR?

  • SC2086: Quote variables.
  • SC2012: skip shellcheck.

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

@github-actions

Copy link
Copy Markdown

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

@github-actions github-actions Bot added the awaiting review Awaiting review label Aug 22, 2025
Comment thread ci/scripts/python_test_emscripten.sh Outdated

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This part use ls with -t option, so we can't use echo.
I don't know alternate command which is usable on macOS / Linux.
(As far as I know, find and stat can't use the same option on macOS / Linux)

latest=$(python3 -c '
import glob, os
files = glob.glob("dist/pyarrow*.whl")
if files:
    print(max(files, key=os.path.getmtime))
')
echo "$latest"

@github-actions github-actions Bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Aug 22, 2025
@hiroyuki-sato
hiroyuki-sato force-pushed the topic/shellcheck-python_test_emscripten branch from 5b99b51 to 2e4daa4 Compare August 25, 2025 11:29
@hiroyuki-sato

Copy link
Copy Markdown
Collaborator Author

@kou CI has been passed. Please take a look when you get a chance.

@kou

kou commented Aug 26, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit emscripten

@github-actions

Copy link
Copy Markdown

Revision: 2e4daa4

Submitted crossbow builds: ursacomputing/crossbow @ actions-ccceaf6e7f

Task Status
test-conda-python-emscripten GitHub Actions
test-ubuntu-22.04-cpp-emscripten GitHub Actions

@hiroyuki-sato

Copy link
Copy Markdown
Collaborator Author

I reverted this change for testing test-conda-python-emscripten

@hiroyuki-sato

Copy link
Copy Markdown
Collaborator Author

@github-actions crossbow submit emscripten

@github-actions

Copy link
Copy Markdown
Unable to match any tasks for `emscripten`
The Archery job run can be found at: https://github.com/apache/arrow/actions/runs/17230344793

@hiroyuki-sato

Copy link
Copy Markdown
Collaborator Author

@github-actions crossbow submit test-conda-python-emscripten test-ubuntu-22.04-cpp-emscripten

@github-actions

Copy link
Copy Markdown

Revision: 46d2857

Submitted crossbow builds: ursacomputing/crossbow @ actions-80377eea67

Task Status
test-conda-python-emscripten GitHub Actions
test-ubuntu-22.04-cpp-emscripten GitHub Actions

@hiroyuki-sato

Copy link
Copy Markdown
Collaborator Author

test-conda-python-emscripten testing has been failed after revert this change. So, test-conda-python-emscripten failure unrelated this change.

@kou

kou commented Aug 26, 2025

Copy link
Copy Markdown
Member

OK. Let's complete #47330 before this.

@hiroyuki-sato
hiroyuki-sato force-pushed the topic/shellcheck-python_test_emscripten branch from e1ecc13 to 0a2541a Compare July 24, 2026 10:00
@hiroyuki-sato

Copy link
Copy Markdown
Collaborator Author

@github-actions crossbow submit test-conda-python-emscripten test-ubuntu-22.04-cpp-emscripten

@github-actions

Copy link
Copy Markdown

Revision: 0a2541a

Submitted crossbow builds: ursacomputing/crossbow @ actions-c47d1b6828

Task Status
test-conda-python-emscripten GitHub Actions
test-ubuntu-22.04-cpp-emscripten GitHub Actions

@hiroyuki-sato
hiroyuki-sato force-pushed the topic/shellcheck-python_test_emscripten branch from 0a2541a to bc5e282 Compare July 24, 2026 11:31
@hiroyuki-sato

Copy link
Copy Markdown
Collaborator Author

@github-actions crossbow submit test-conda-python-emscripten test-ubuntu-22.04-cpp-emscripten

@github-actions

Copy link
Copy Markdown

Revision: bc5e282

Submitted crossbow builds: ursacomputing/crossbow @ actions-a99c8df489

Task Status
test-conda-python-emscripten GitHub Actions
test-ubuntu-22.04-cpp-emscripten GitHub Actions

@hiroyuki-sato

Copy link
Copy Markdown
Collaborator Author

It looks like the CI for test-conda-python-emscripten passed in #50598.

@raulcd raulcd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions Bot added awaiting merge Awaiting merge and removed awaiting committer review Awaiting committer review labels Jul 24, 2026
@hiroyuki-sato

hiroyuki-sato commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator Author

Both the CI and Crossbow have passed.

I rebased this PR only to rerun the test-conda-python-emscripten test. There have been no changes to the code in this PR since the last review.

Since #50610 also modifies .pre-commit-config.yaml, there may be a merge conflict if either PR is merged first. If that happens, I'll rebase this PR again.

@raulcd
raulcd merged commit 6efe7b3 into apache:main Jul 24, 2026
39 checks passed
@raulcd raulcd removed the awaiting merge Awaiting merge label Jul 24, 2026
@raulcd

raulcd commented Jul 24, 2026

Copy link
Copy Markdown
Member

Thanks so much for working on those @hiroyuki-sato ! I merged this one before :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants