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

Ability to generate cloud credentials in the CLI build tool #12438

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

radeusgd
Copy link
Member

@radeusgd radeusgd commented Mar 7, 2025

Pull Request Description

I needed to generate credentials for the staging environment.
The standard workflow to do this was to rebuild the IDE with a different .env file. However this took so long, as it was finishing (and the build failed for me), I was already finishing this script.

This should be useful for testing cloud integration from the CLI during development. It relies on the same logic as is used for generating credentials in our CI tests.

Important Notes

Usage:

  • You need to set up the same set of environment variables as for the CI workflow:
    • ENSO_CLOUD_COGNITO_REGION, ENSO_CLOUD_COGNITO_USER_POOL_ID, ENSO_CLOUD_COGNITO_USER_POOL_WEB_CLIENT_ID - which can be taken from the .env file corresponding to a given environment, although there they have slightly different prefixes (as the config is for IDE not CI).
    • ENSO_CLOUD_TEST_ACCOUNT_USERNAME and ENSO_CLOUD_TEST_ACCOUNT_PASSWORD
  • Then running ./run backend generate-cloud-credentials should create a enso.credentials file in your CWD. To make our libs use it, you can set ENSO_CLOUD_CREDENTIALS_FILE env var to point at it.

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.
  • If meaningful changes were made to logic or tests affecting Enso Cloud integration in the libraries,
    or the Snowflake database integration, a run of the Extra Tests has been scheduled.
    • If applicable, it is suggested to paste a link to a successful run of the Extra Tests.

@radeusgd radeusgd added -tooling Category: tooling l-cloud-integration Enso Cloud integration work labels Mar 7, 2025
@radeusgd radeusgd self-assigned this Mar 7, 2025
@radeusgd radeusgd added the CI: No changelog needed Do not require a changelog entry for this PR. label Mar 7, 2025
@Akirathan
Copy link
Member

What kind of expiration will the generated credential file have? I know that when I am running IDE in staging env, the $HOME/.enso/credentials file is changed every time I launch the app. Could you point the ./run backend generate-cloud-credentials to take the staging environment variables by default?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-tooling Category: tooling CI: No changelog needed Do not require a changelog entry for this PR. l-cloud-integration Enso Cloud integration work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants