-
Notifications
You must be signed in to change notification settings - Fork 229
chore: remove Atlas Sign-In logic COMPASS-9595 #7150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -60,18 +53,6 @@ export function configureStore( | |||
) | |||
); | |||
|
|||
options.atlasAuthService.on('signed-in', () => { | |||
void store.dispatch(getUserInfo()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sanity check: this isn't necessary for data explorer-related thing is it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On cloud we are always in logged in state, plus we don't have settings feature there.
I don't think we are now listening for these events anywhere else, so probably should be safe to clean that as well.
// because oidc options overlap with atlas login used for ai feature | ||
isAIFeatureEnabled | ||
) { | ||
if (isOIDCEnabled) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if I understand right we still have OIDC logins(?). I'm not sure if any of the removed code may have been an unintentional dependency there.
With this change, would Compass AI features work with the current atlas apis? Or does this change need api endpoint updates and backend in production? |
Great, totally missed the target part in your comment. I see that you've removed |
@mabaasit I rename the environment variable to be about the AI opt-in, does that sound good? |
I added a feature flag now so we will only want to do this cleanup after we actually release the feature. |
We also have to wait for the new endpoints to be released to production and enabled, probably on staging and QA: https://wiki.corp.mongodb.com/spaces/MMS/pages/285087612/Config+Service+Application+Property+Admin+UI |
a7394b4
to
be37538
Compare
be37538
to
080b6d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes the Atlas Sign-In logic and UI components from Compass to support the removal of authentication requirements for AI features. The changes eliminate the sign-in modal, authentication state management, and related telemetry events while updating environment variable names to reflect the new opt-in only approach.
- Removes Atlas sign-in modal components and authentication state management
- Updates environment variables from
COMPASS_E2E_SKIP_ATLAS_SIGNIN
toCOMPASS_E2E_SKIP_AI_OPT_IN
- Eliminates sign-in related telemetry events and test files
Reviewed Changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
packages/compass-telemetry/src/telemetry-events.ts | Removes AI sign-in modal telemetry event types |
packages/compass-settings/src/stores/settings.ts | Removes atlas login attempt cancellation on modal close |
packages/compass-settings/src/stores/index.ts | Removes atlas login reducer and auth service event handlers |
packages/compass-settings/src/stores/atlas-login.ts | Completely removes atlas login state management |
packages/compass-settings/src/components/settings/gen-ai-settings.tsx | Removes atlas login UI component from Gen AI settings |
packages/compass-settings/src/components/settings/gen-ai-settings.spec.tsx | Removes atlas login related tests |
packages/compass-settings/src/components/settings/atlas-login.tsx | Removes entire atlas login settings component |
packages/compass-settings/src/components/settings/atlas-login.spec.tsx | Removes all atlas login component tests |
packages/compass-settings/src/components/modal.tsx | Removes atlas login initialization and AI feature condition |
packages/compass-query-bar/src/stores/ai-query-reducer.ts | Updates environment variable name for AI feature access |
packages/compass-generative-ai/src/store/atlas-signin-reducer.ts | Removes atlas sign-in state management reducer |
packages/compass-generative-ai/src/store/atlas-signin-reducer.spec.ts | Removes all atlas sign-in reducer tests |
packages/compass-generative-ai/src/store/atlas-ai-store.ts | Removes sign-in reducer and auth service event handlers |
packages/compass-generative-ai/src/components/plugin.tsx | Removes AI sign-in modal component |
packages/compass-generative-ai/src/components/ai-signin-modal.tsx | Removes entire AI sign-in modal component |
packages/compass-generative-ai/src/atlas-ai-service.ts | Updates environment variable name for AI feature check |
packages/compass-e2e-tests/tests/collection-ai-query.test.ts | Updates environment variable name in tests |
packages/compass-e2e-tests/tests/atlas-login.test.ts | Removes entire atlas login e2e test suite |
packages/compass-e2e-tests/helpers/selectors.ts | Removes atlas login related selectors |
packages/compass-aggregations/src/modules/pipeline-builder/pipeline-ai.ts | Updates environment variable name for AI feature access |
docs/tracking-plan.md | Removes AI sign-in modal telemetry events from documentation |
docs/security-test-summary.md | Removes atlas login integration test documentation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Since we're removing the signin requirement from the AI features we do not hacve any components in need of the Atlas sign-in flows. As it's also built using a pattern we have deviated from, it's best to remove it now and re-add it through a different structure later if needed.
I'm relying on tests to ensure no unintentional functionality breaks but let me know if this has unintended effects on parts of Compass or DE that depend on auth for different reasons.