Skip to content

chore(atlas-service): add a new atlas config CLOUDP-397307#7984

Draft
nbbeeken wants to merge 1 commit intomainfrom
atlas-internal
Draft

chore(atlas-service): add a new atlas config CLOUDP-397307#7984
nbbeeken wants to merge 1 commit intomainfrom
atlas-internal

Conversation

@nbbeeken
Copy link
Copy Markdown
Collaborator

Description

adds new atlas config

Checklist

  • New tests and/or benchmarks are included
  • Documentation is changed or added
  • If this change updates the UI, screenshots/videos are added and a design review is requested
  • If this change could impact the load on the MongoDB cluster, please describe the expected and worst case impact
  • I have signed the MongoDB Contributor License Agreement (https://www.mongodb.com/legal/contributor-agreement)

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new “atlas-internal” Atlas backend preset/config so Compass can be pointed at an internal Atlas environment, and updates related development tooling/configuration.

Changes:

  • Add atlas-internal to the Compass preferences schema enum for atlasServiceBackendPreset.
  • Introduce an atlas-internal entry in the Atlas service backend config map.
  • Add a new redirect-extension rule intended for “cloud-internal” Compass Web.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
packages/compass-web/scripts/redirect-extension-config.json Adds a new Header Editor Lite redirect rule entry for “cloud-internal”.
packages/compass-preferences-model/src/preferences-schema.tsx Extends the atlasServiceBackendPreset allowed values to include atlas-internal.
packages/atlas-service/src/util.ts Adds the atlas-internal backend preset configuration.

Comment on lines +186 to +190
'atlas-internal': {
ccsBaseUrl: '',
// multiplexedWsBaseUrls: ['wss://cloud-internal.mongodb.com/ccs'],
cloudBaseUrl: '',
atlasApiBaseUrl: 'https://cloud-internal.mongodb.com/api/private',
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

The preset list in the comment above this config doesn’t mention atlas-internal, even though it’s now a supported option. Update the documentation comment so it stays in sync with the available presets.

Copilot uses AI. Check for mistakes.
Comment on lines +71 to +75
"name": "cloud-internal: compass-web localhost",
"to": "http://localhost:7777/compass-web.mjs",
"condition": {
"regex": "https://downloads\\.mongodb\\.com/compass/compass-web/prod/index.mjs",
"resourceTypes": ["script"]
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

This adds an enabled redirect rule whose condition regex matches the same .../prod/index.mjs URL as the existing "cloud: compass-web localhost" rule above. Two enabled rules with identical conditions can lead to non-deterministic behavior depending on extension rule ordering; consider removing the duplicate, disabling one by default, or adjusting the regex to match the intended cloud-internal asset URL (if different).

Copilot uses AI. Check for mistakes.
Comment on lines +875 to +879
'atlas-dev',
'atlas-qa',
'atlas-staging',
'atlas-internal',
'atlas',
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

The doc comment describing available atlasServiceBackendPreset values doesn’t include the newly added atlas-internal option. Please update the comment so the documented presets match the enum values.

Copilot uses AI. Check for mistakes.
Comment on lines +192 to +197
clientId: '',
issuer: '',
},
authPortalUrl: '',
assistantApiBaseUrl: '',
userDataBaseUrl: '',
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

The new atlas-internal preset sets required URLs/oidc fields to empty strings. Downstream code builds absolute URLs from authPortalUrl and atlasLogin.issuer (e.g. new URL(this.config.authPortalUrl) / new URL(${issuer}/v1/introspect)), which will throw or generate invalid endpoints if this preset is selected without env overrides. Provide valid defaults for the internal environment, or add validation in getAtlasConfig that fails fast with a clear error when required fields are missing.

Suggested change
clientId: '',
issuer: '',
},
authPortalUrl: '',
assistantApiBaseUrl: '',
userDataBaseUrl: '',
clientId: '0oajzdcznmE8GEyio297',
issuer: 'https://auth.mongodb.com/oauth2/default',
},
authPortalUrl: 'https://account.mongodb.com/account/login',
assistantApiBaseUrl: 'https://knowledge.mongodb.com/api/v1',
userDataBaseUrl: 'https://cloud-internal.mongodb.com/ui/userData',

Copilot uses AI. Check for mistakes.
// multiplexedWsBaseUrls: ['wss://cloud-internal.mongodb.com/ccs'],
cloudBaseUrl: '',
atlasApiBaseUrl: 'https://cloud-internal.mongodb.com/api/private',
atlasLogin: {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Huh, was sure we cleaned-up everything atlas login related from compass

@nbbeeken nbbeeken marked this pull request as draft April 16, 2026 20:50
@nbbeeken
Copy link
Copy Markdown
Collaborator Author

putting in draft bc we can continue this after we've landed the client and rolled it out.

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