Skip to content

Conversation

@Zerpet
Copy link
Member

@Zerpet Zerpet commented Oct 30, 2025

Proposed Changes

This PR fixes the most critical shellcheck issues in the selenium test suite's component scripts (bin/components/*) without adding excessive quoting that changes the existing coding style.

Changes made:

  • Added missing shebangs (#!/usr/bin/env bash) to 3 files that were missing them
  • Replaced legacy backtick syntax (`command`) with modern $() syntax in 2 files
  • Removed unused SCRIPT variable in rabbitmq component

What was NOT changed:

  • Variable quoting: Remaining SC2086 warnings about unquoted variables are informational and left as-is per project coding style preference
  • Array handling: Kept existing array syntax with command substitution
  • Export statements: Not added as they would change behavior

These minimal changes improve script portability (shebangs) and maintainability (modern syntax) while respecting the project's existing coding conventions.

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)
  • Build system and/or CI

Checklist

Put an x in the boxes that apply.
You can also fill these out after creating the PR.
This is simply a reminder of what we are going to look for before merging your code.

  • Mandatory: I (or my employer/client) have have signed the CA (see https://github.com/rabbitmq/cla)
  • I have read the CONTRIBUTING.md document
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally with my changes
  • If relevant, I have added necessary documentation to https://github.com/rabbitmq/rabbitmq-website
  • If relevant, I have added this change to the first version(s) in release-notes that I expect to introduce it

Further Comments

This is a minimal, conservative approach that addresses only the most important shellcheck findings:

  1. Missing shebangs: Critical for script portability and proper shell selection
  2. Backticks to $(): Modern, more readable syntax that's easier to nest
  3. Unused variables: Simple cleanup with no functional impact

The remaining shellcheck warnings (SC2086 about unquoted variables) are informational and don't represent actual bugs in this codebase. Adding quotes everywhere would be a larger stylistic change that goes beyond fixing actual issues.

Addressed shellcheck warnings too
Address only the most critical shellcheck issues without excessive quoting:
- Add missing shebangs to 3 files (devkeycloak-proxy, forward-proxy, proxy)
- Replace legacy backtick syntax with modern $() in 2 files
- Remove unused SCRIPT variable in rabbitmq

These changes improve script portability and maintainability while keeping
the existing coding style. Remaining SC2086 (quoting) warnings are
informational and left as-is per project preference.
@Zerpet Zerpet force-pushed the fix-selenium-keycloak branch from edd86b7 to b6a92ec Compare October 30, 2025 13:42
@michaelklishin michaelklishin added this to the 4.3.0 milestone Oct 30, 2025
@michaelklishin michaelklishin merged commit 11d9bef into main Oct 30, 2025
290 checks passed
@michaelklishin michaelklishin deleted the fix-selenium-keycloak branch October 30, 2025 19:38
michaelklishin added a commit that referenced this pull request Oct 30, 2025
Fix shellcheck warnings in selenium component scripts (backport #14860)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants