Skip to content

Conversation

@Franr
Copy link
Contributor

@Franr Franr commented Apr 26, 2025

What?

Using the new url to prevent sso login url deprecation warning.
A new toolbox image must be released first: binbashar/le-docker-leverage-toolbox#72

Why?

To prevent login url deprecation warnings

References

#302

Before release

Review the checklist here

Summary by CodeRabbit

  • New Features
    • Updated SSO login to use a configurable start URL, allowing for greater flexibility in SSO provider integration.
  • Bug Fixes
    • Adjusted tests to match the new SSO URL format, ensuring accurate validation of the login process.
  • Chores
    • Increased the minimum required version for the TOOLBOX component.
  • Tests
    • Modified test assertions for command output to be less strict about line positions, improving test robustness.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 26, 2025

Walkthrough

The changes update the minimum required version for the "TOOLBOX" component in the leverage/__init__.py file from "0.2.0" to "0.2.4". In leverage/container.py, the AWS SSO login URL construction was changed from a hardcoded region-based URL to a configurable SSO start URL from the container's configuration. Corresponding tests were updated to patch and verify the new URL format. Additionally, some test assertions in tests/bats/leverage.bats were relaxed to use partial or regexp line matching instead of fixed index matching.

Changes

File(s) Change Summary
leverage/init.py Updated TOOLBOX minimum version from "0.2.0" to "0.2.4".
leverage/container.py Changed AWS SSO login URL from hardcoded region-based to configurable SSO start URL from config.
tests/test_containers/test_aws.py Updated SSO login test to patch and assert new dynamic SSO start URL format.
tests/bats/leverage.bats Modified test assertions to use partial or regexp line matching instead of fixed index matching.

Poem

In the toolbox, a version hops up a notch,
SSO URLs now dance to a config’s watch.
No more hardcoded paths for the bunny to chase,
Each login link finds its own special place.
Tests now patch and check with glee—
🐇 Code keeps hopping, wild and free!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c8f5318 and 46d53ed.

📒 Files selected for processing (1)
  • leverage/__init__.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • leverage/init.py
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: integration_tests_cli_refarch (3.9.15, 1.6.0-0.2.0)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

MINIMUM_VERSIONS = {
"TERRAFORM": "1.3.5",
"TOOLBOX": "0.2.0",
"TOOLBOX": "0.2.1", # we require awscli >= 2.22 now
Copy link
Contributor Author

Choose a reason for hiding this comment

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

binbashar/le-docker-leverage-toolbox#72

we need the --use-device-code flag

@coveralls
Copy link

coveralls commented Apr 26, 2025

Pull Request Test Coverage Report for Build 15400906598

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 60.982%

Totals Coverage Status
Change from base Build 14328327159: 0.0%
Covered Lines: 2576
Relevant Lines: 4092

💛 - Coveralls

@Franr Franr self-assigned this Apr 27, 2025
Copy link

@rodriguez-matias rodriguez-matias left a comment

Choose a reason for hiding this comment

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

LGTM

@Franr Franr merged commit a4609c6 into master Jun 3, 2025
27 checks passed
@Franr Franr deleted the new-sso-url branch June 3, 2025 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants