fix(discovery): add sqdiscovery URL as config
COMPLETES https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-621805
This pull request addresses
ds.ciscospark.com address cannot be static for PSF cases
by making the following changes
add a config for sqdiscovery
Change Type
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation update
- [ ] Tooling change
- [ ] Internal code refactor
The following scenarios were tested
Run web client with built SDK locally
I certified that
- [x] I have read and followed contributing guidelines
- [x] I discussed changes with code owners prior to submitting this pull request
- [x] I have not skipped any automated checks
- [x] All existing and new tests passed
- [x] I have updated the documentation accordingly
Make sure to have followed the contributing guidelines before submitting.
The changes introduce a new environment variable named π Walkthrough
Walkthrough
SQDISCOVERY_SERVICE_URL with the value https://ds.ciscospark.com/v1/region across the codebase. This variable is added to the default environment configuration (.env.default), documented in ENV.md and the README, and integrated into various source files such as the core configuration, service modules, and FedRAMP-specific modules. The service discovery mechanism is updated to dynamically reference the new variable instead of using a hardcoded URL. Adjustments have also been made in test files, build scripts, and Docker environment configurations to accommodate the variable. The overall structure, logic, and existing functionality remain unchanged, with the modifications solely expanding the configuration options for specifying the client region information endpoint.
[!WARNING] There were issues while running some tools. Please review the errors and either fix the toolβs configuration or disable the tool if itβs a critical failure.
π§ ESLint
If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.
yarn install v1.22.22 [1/4] Resolving packages... warning [email protected]: This version is no longer supported. Please see https://eslint.org/version-support for other options. warning eslint > @humanwhocodes/[email protected]: Use @eslint/config-array instead warning eslint > @humanwhocodes/config-array > @humanwhocodes/[email protected]: Use @eslint/object-schema instead warning eslint > file-entry-cache > flat-cache > [email protected]: Rimraf versions prior to v4 are no longer supported warning eslint > file-entry-cache > flat-cache > rimraf > [email protected]: Glob versions prior to v9 are no longer supported warning eslint > file-entry-cache > flat-cache > rimraf > glob > [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. warning eslint-import-resolver-typescript > [email protected]: Glob versions prior to v9 are no longer supported warning [email protected]: Glob versions prior to v9 are no longer supported warning intern > [email protected]: Glob versions prior to v9 are no longer supported warning intern > glob > [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. warning jasmine > [email protected]: Glob versions prior to v9 are no longer supported warning jest > @jest/core > jest-config > [email protected]: Glob versions prior to v9 are no longer supported warning jest > @jest/core > jest-runtime > [email protected]: Glob versions prior to v9 are no longer supported warning jest > @jest/core > @jest/reporters > [email protected]: Glob versions prior to v9 are no longer supported warning jest > @jest/core > @jest/transform > babel-plugin-istanbul > test-exclude > [email protected]: Glob versions prior to v9 are no longer supported warning mocha > [email protected]: Glob versions prior to v9 are no longer supported warning mocha > glob > [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. warning [email protected]: 16.1.1 warning sinon > @sinonjs/samsam > [email protected]: This package is deprecated. Use the optional chaining (?.) operator instead. warning wd > archiver > [email protected]: Glob versions prior to v9 are no longer supported warning wd > [email protected]: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
(For a CapTP with native promises, see @endo/eventual-send and @endo/captp) warning wd > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 warning wd > archiver > archiver-utils > [email protected]: Glob versions prior to v9 are no longer supported warning wd > request > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. warning wd > request > [email protected]: this library is no longer supported warning @babel/cli > [email protected]: Glob versions prior to v9 are no longer supported warning @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-async-generator-functions instead. warning @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead. warning @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-export-namespace-from instead. warning @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead. warning @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead. warning @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead. warning @babel/[email protected]: π¨ This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information. warning @babel/polyfill > [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. warning @babel/runtime-corejs2 > [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. warning babel-plugin-lodash > [email protected]: Glob versions prior to v9 are no longer supported warning workspace-aggregator-dd0a3d8a-db98-46a6-9df2-e58b003473cf > [email protected]: This version is no longer supported. Please see https://eslint.org/version-support for other options. warning workspace-aggregator-dd0a3d8a-db98-46a6-9df2-e58b003473cf > [email protected]: Glob versions prior to v9 are no longer supported warning workspace-aggregator-dd0a3d8a-db98-46a6-9df2-e58b003473cf > [email protected]: 16.1.1 warning workspace-aggregator-dd0a3d8a-db98-46a6-9df2-e58b003473cf > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-async-generator-functions instead. warning workspace-aggregator-dd0a3d8a-db98-46a6-9df2-e58b003473cf > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead. warning workspace-aggregator-dd0a3d8a-db98-46a6-9df2-e58b003473cf > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-export-namespace-from instead. warning workspace-aggregator-dd0a3d8a-db98-46a6-9df2-e58b003473cf > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead. warning workspace-aggregator-dd0a3d8a-db98-46a6-9df2-e58b003473cf > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead. warning workspace-aggregator-dd0a3d8a-db98-46a6-9df2-e58b003473cf > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead. warning workspace-aggregator-dd0a3d8a-db98-46a6-9df2-e58b003473cf > @babel/[email protected]: π¨ This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information. [2/4] Fetching packages... error [email protected]: The engine "node" is incompatible with this module. Expected version "^14 || ^16 || ^17 || ^18 || ^19". Got "22.9.0" error Found incompatible module. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
π Recent review details
Configuration used: .coderabbit.yaml Review profile: CHILL Plan: Pro
π₯ Commits
Reviewing files that changed from the base of the PR and between 79c2277fe0d4da703d9313e91fce5fca25ab0c36 and 92d67291e1ad8363c8add5d9e60011cd92511ba1.
π Files selected for processing (1)
packages/@webex/webex-core/test/unit/spec/services/services.js(1 hunks)
β° Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Build Packages
- GitHub Check: AWS Amplify Console Web Preview
π Additional comments (2)
packages/@webex/webex-core/test/unit/spec/services/services.js (2)
251-259: Good test setup for configurable discovery URLThis new
beforeEachblock properly configures the test environment with a specific discovery URL, aligning with the PR objective to make the sqdiscovery URL configurable rather than hardcoded.
269-281: Well-structured test case for successful request pathThis test case appropriately verifies that
fetchClientRegionInfocorrectly handles successful requests by:
- Checking the return value is properly passed through from the response body
- Verifying the request is made with the correct URL from the configuration
- Ensuring proper request parameters (auth headers, timeout)
This complements the existing failure test and provides good coverage for the new configurable URL feature.
β¨ Finishing Touches
- [ ] π Generate Docstrings
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
πͺ§ Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>, please review it.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai generate docstringsto generate docstrings for this PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
This pull request is automatically being deployed by Amplify Hosting (learn more).
Access this pull request here: https://pr-4117.d3m3l2kee0btzx.amplifyapp.com