Repository navigation
Merge fix/SDK-7075-honour-project-name-env - #291
Merged
bsautomation merged 6 commits intoOct 15, 2026
Merged
Conversation
The service read projectName/buildName only from the config file, so an
exported BROWSERSTACK_PROJECT_NAME / BROWSERSTACK_BUILD_NAME never reached
the session and the build was created under the config-file name.
Every other SDK already maps these (node-agent capsMapping.js, python
constants.py, javaagent SeleniumPatchUtils.java, csharp utils.cs) and so
does the binary's own env->config map (core/config/env.js). The binary
resolves them correctly here too, but the service consumes only hubUrl,
apis, credentials, accessibilityOptions and testContextOptions from that
resolved config, so the values were dropped before reaching the caps.
Write them into the capability at both shapes, mirroring the existing
localIdentifier handling, so the session carries the env value.
Verified against a wdio_cucumber sample in binary flow (SDK_CLI_BIN_PATH
pinned, cold cache). Session capabilities, config file vs env differing:
before platforms[0].projectName = 'repro_project'
platforms[0].buildName = 'repro_build'
after platforms[0].projectName = 'repro_project_env_vars'
platforms[0].buildName = 'repro_build_env_vars'
Refs SDK-7075 — unblocks the app_automate env_vars tests, whose fixture
looks the build up by project AND build name and so failed with
"Project with name '<name>_env_vars' not found" before reaching its
BROWSERSTACK_LOCAL assertions.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…7075) Adds three constructor tests: the env vars win over the caps for both the array and the multiremote capability shapes, and the caps values survive when the env vars are unset. The two "prefer env" tests fail without the launcher change. Folding BROWSERSTACK_BUILD_NAME into the caps also means a buildName is now present whenever that var is exported, so _handleBuildIdentifier no longer treats it as missing and keeps the identifier instead of dropping it. Updates that test to the corrected contract and refreshes the SDK-4748 comments that asserted this service never reads the var as a buildName source. "buildName absent" now means absent from both the caps and the environment, which the BUILD_RUN_IDENTIFIER test already covers. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…(SDK-7075) The env override only ran when the caps already carried bstack:options. Caps the service builds bstack:options for (extension caps such as goog:chromeOptions) and legacy caps (top-level build/project keys) still ignored BROWSERSTACK_PROJECT_NAME / BROWSERSTACK_BUILD_NAME, so the build start payload and _handleBuildIdentifier kept seeing the config name. Fold the override into one _applyEnvBuildNames helper called from all four capability arms: it writes into bstack:options when present, into the top-level project/build keys of legacy caps on a BrowserStack session, and never touches the caps of a non-BrowserStack session. Blank env values are ignored. The tests now clean the env vars in afterEach and cover the service-created, legacy, multiremote and non-BrowserStack shapes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…orting (SDK-7075) - Align top-level project/build keys that sit next to bstack:options, so a capability never carries two different names. (Live probe: the hub prefers bstack:options, so this is defensive, not a behaviour change.) - Return no names for a non-BrowserStack session: its caps are left untouched, so the Test Reporting fields keep the caps values instead of disagreeing with the session. - Tests: restore the isBStackSession spy in finally; cover padded env values, a build-only env override and the mixed bstack:options + top-level shape. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…plies (SDK-7075) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
bsautomation
requested review from
AakashHotchandani and
yashdsaraf
and removed request for
a team
October 15, 2026 13:07
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge into sdk_v8_pre_prod :by automationbs