Skip to content
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

tests: enable keychain on ci for linux COMPASS-6119 #5214

Merged
merged 2 commits into from
Dec 13, 2023
Merged

Conversation

mabaasit
Copy link
Contributor

@mabaasit mabaasit commented Dec 8, 2023

In this PR we are enabling keychain on CI for Linux by using plain-text method to store the credentials. As we are not using keytar to access the keychain, its not triggered at all and hence does not require us to set keychain management on CI or does not block the tests.

Description

Checklist

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)

@mabaasit mabaasit marked this pull request as ready for review December 9, 2023 10:35
@@ -98,6 +98,17 @@ class CompassApplication {
);
}

const IS_CI =
process.env.IS_CI ||
process.env.CI ||
Copy link
Collaborator

@mcasimir mcasimir Dec 12, 2023

Choose a reason for hiding this comment

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

Such a relief that we don't need to unlock things anymore both on the CI and outside. Sorry for being hair splitty, but do we have to rely on such a generic environment variables, especially on linux where i'm even more likely to start compass from a terminal? For example, as a developer i may have this variable set on my machine to test something out. Regardless, we probably don't want to set a precedent where we rely this much on non-production environment variables in a way that may affect production to this extent.

Is "EVERGREEN_BUILD_VARIANT" here not enough? possibly better, did you consider a more intentional variable to be set explicitly on CI, for example: MONGODB_COMPASS_USE_PLAIN_SAFE_STORAGE=true?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually EVERGREEN_BUILD_VARIANT should suffice this check, however its being used throughout along with CI for ci check. I wanted to keep the behaviour.
For IS_CI, I think we can remove it as I can not find where/how we set it.

And as for adding a new variable, I did not consider that because we already have CI checks in place and wanted to have similar check here as well.

Copy link
Collaborator

Choose a reason for hiding this comment

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

do you mean maybe: EVERGREEN_BUILD_VARIANT && CI then rather than ||?

Copy link
Contributor Author

@mabaasit mabaasit Dec 12, 2023

Choose a reason for hiding this comment

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

I was thinking of having similar behaviour as we have right now and that's using ||. But the fact that users can have it set in local env will have unexpected behaviour, it makes sense either to use && or use an explicit variable name. I am fine any from these two options. Let me know what you think?

Copy link
Collaborator

@gribnoysup gribnoysup Dec 12, 2023

Choose a reason for hiding this comment

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

We usually use MONGODB_COMPASS_TEST_ prefix for this kind of stuff, we should probably stick to the pattern? Generally speaking yeah, a bit weird to see IS_CI env checks right in the Compass app source, I'd probably have a preference for avoiding this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added fb3dedf

@mabaasit mabaasit merged commit 256e061 into main Dec 13, 2023
7 checks passed
@mabaasit mabaasit deleted the keychain-on-linux branch December 13, 2023 08:19
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.

4 participants