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

Update get_stack_output_role_arn method to return ArmoRoleArn #603

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

kooomix
Copy link
Contributor

@kooomix kooomix commented Feb 3, 2025

PR Type

Bug fix


Description

  • Updated get_stack_output_role_arn to return ArmoRoleArn.

  • Fixed potential issue with incorrect stack output key.


Changes walkthrough 📝

Relevant files
Bug fix
aws.py
Corrected stack output key in `get_stack_output_role_arn`

infrastructure/aws.py

  • Updated get_stack_output_role_arn to return ArmoRoleArn.
  • Replaced incorrect output key RoleArn with ArmoRoleArn.
  • +1/-1     

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Breaking Change

    The change from 'RoleArn' to 'ArmoRoleArn' may break existing code that relies on the old output key. Verify that all dependent code is updated accordingly.

    return self.get_stack_output("ArmoRoleArn")

    Copy link

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Possible issue
    Add missing error handling

    Add error handling to catch and log specific cases where 'ArmoRoleArn' output is
    missing from the stack outputs

    infrastructure/aws.py [82-83]

     def get_stack_output_role_arn(self):
    -    return self.get_stack_output("ArmoRoleArn")
    +    try:
    +        return self.get_stack_output("ArmoRoleArn")
    +    except KeyError as e:
    +        Logger.logger.error("Stack output 'ArmoRoleArn' not found in stack outputs")
    +        raise
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: The suggestion adds important error handling to explicitly catch and log cases where the required 'ArmoRoleArn' output is missing from stack outputs, improving debugging and error visibility.

    7

    Copy link

    github-actions bot commented Feb 3, 2025

    Failed to generate code suggestions for PR

    @kooomix kooomix merged commit 1270351 into master Feb 3, 2025
    2 checks passed
    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.

    1 participant