[COMPASS-6119] Investigate how to fix keychain integration in Linux e2e tests in CI Created: 12/Sep/22  Updated: 09/Jan/24  Resolved: 13/Dec/23

Status: Closed
Project: Compass
Component/s: CI, Tech debt, Testing
Affects Version/s: None
Fix Version/s: 1.41.0

Type: Task Priority: Major - P3
Reporter: Anna Henningsen Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by COMPASS-5911 Saved connections are not being displ... Closed
Related
related to COMPASS-6513 compass 1.31.1 not saving favorites Open
related to COMPASS-6073 Implement connection export via CLI Closed
related to COMPASS-6074 Implement connection import via CLI Closed
Epic Link: COMPASS-6856
Story Points: 3
Documentation Changes: Not Needed
Sprint: Iteration Qantassaurus

 Description   

It seems that currently, using the keychain fails in Linux CI e2e tests due to lack of a viable dbus session with keychain access.

Unlike the similar situation for macOS, this is less immediately problematic, since no popups or similar are shown; accessing the keychain fails silently.

So far, this has not been an issue in tests, since Compass is still able to store models using the keychain in memory. However, in COMPASS-6073/COMPASS-6074 we start testing that favorites are preserved across Compass runs, which is not the case in Linux CI because of this issue.

When running tests locally, this is not an issue, since xvfb-maybe will only start a separate X11 environment if none is available otherwise.

This appears to have come up before. The error is the same as described in atom/node-keytar#132 with the accepted solution being to start a separate dbus session. This workaround was removed in Compass in 9f7304fc since it didn’t appear to affect whether tests pass. (That code might no longer work the same way today, e.g. the referenced python package is not available anymore.)

We should determine:

  • Is failing silently when the keychain fails to save data acceptable in general?
  • Is it worth fixing this in CI?


 Comments   
Comment by Githook User [ 09/Jan/24 ]

Author:

{'name': 'Basit', 'email': '1305718+mabaasit@users.noreply.github.com', 'username': 'mabaasit'}

Message: tests: enable keychain on ci for linux COMPASS-6119 (#5214)
Branch: remove-enable-gai-experience-feature-flag
https://github.com/mongodb-js/compass/commit/256e06136511bd8d3d4bee3cb6b911fa914aee1e

Comment by Githook User [ 13/Dec/23 ]

Author:

{'name': 'Basit', 'email': '1305718+mabaasit@users.noreply.github.com', 'username': 'mabaasit'}

Message: tests: enable keychain on ci for linux COMPASS-6119 (#5214)
Branch: compass-7354-remove-global-app-registry-workspace-opening-events
https://github.com/mongodb-js/compass/commit/256e06136511bd8d3d4bee3cb6b911fa914aee1e

Comment by Githook User [ 13/Dec/23 ]

Author:

{'name': 'Basit', 'email': '1305718+mabaasit@users.noreply.github.com', 'username': 'mabaasit'}

Message: tests: enable keychain on ci for linux COMPASS-6119 (#5214)
Branch: beta-releases
https://github.com/mongodb-js/compass/commit/256e06136511bd8d3d4bee3cb6b911fa914aee1e

Comment by Githook User [ 13/Dec/23 ]

Author:

{'name': 'Basit', 'email': '1305718+mabaasit@users.noreply.github.com', 'username': 'mabaasit'}

Message: tests: enable keychain on ci for linux COMPASS-6119 (#5214)
Branch: main
https://github.com/mongodb-js/compass/commit/256e06136511bd8d3d4bee3cb6b911fa914aee1e

Comment by Anna Henningsen [ 18/Nov/22 ]

https://github.com/mongodb-js/compass/issues/3512 is likely an instance of this being a problem in the real world (on WSL)

Generated at Wed Feb 07 22:41:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.