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

BUG-2097 fix read only #380

Merged
merged 6 commits into from
May 3, 2023
Merged

BUG-2097 fix read only #380

merged 6 commits into from
May 3, 2023

Conversation

Will-NOQ
Copy link
Collaborator

@Will-NOQ Will-NOQ commented May 3, 2023

What changed?

  • AWS read only now working as designed
  • Fixed text formatting in the wizard on smaller terminal windows

Additional notes

The reason for moving larger prompts from questionary to click.echo is due to the issues questionary has with large strings. Text is frequently truncated and if you resize the terminal the text will occasionally be duplicated. The strings in click.echo are prefixed with a new line for readability. It creates a visual grouping of the click text with the questionary prompt. We could consider moving away from questionary in the future but this solves the problem until then.

How was it tested?

If it was manually verified, list the instructions for your reviewers to follow.

  • Unit Tests
  • Functional Tests
  • Created read only aws org in the wizard w/ small terminal
  • Created read only aws account in the wizard w/ small terminal

@codecov
Copy link

codecov bot commented May 3, 2023

Codecov Report

Patch coverage: 37.50% and project coverage change: +0.01 🎉

Comparison is base (0f3cf6e) 85.24% compared to head (bb244c2) 85.26%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #380      +/-   ##
==========================================
+ Coverage   85.24%   85.26%   +0.01%     
==========================================
  Files          98       98              
  Lines       10610    10609       -1     
==========================================
+ Hits         9045     9046       +1     
+ Misses       1565     1563       -2     
Flag Coverage Δ
functional_tests 67.04% <25.00%> (-0.09%) ⬇️
functional_tests_config_discovery 47.16% <37.50%> (+<0.01%) ⬆️
unit_tests 75.25% <25.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
iambic/plugins/v0_1_0/aws/cloud_formation/utils.py 17.46% <0.00%> (+0.40%) ⬆️
iambic/plugins/v0_1_0/aws/handlers.py 55.85% <33.33%> (-0.21%) ⬇️
iambic/plugins/v0_1_0/aws/models.py 86.06% <100.00%> (-0.04%) ⬇️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -165,6 +165,10 @@ async def apply_iam_templates(
:param templates: The list of templates to apply.
:param remote_worker: The remote worker to use for applying templates.
"""
if config.spoke_role_is_read_only:
log.critical("Unable to apply resources when spoke_role_is_read_only is True")
return []
Copy link
Contributor

Choose a reason for hiding this comment

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

should we raise an error instead? I guess we don't want to raise because we don't want to interrupt the other plugins?

Copy link
Collaborator Author

@Will-NOQ Will-NOQ May 3, 2023

Choose a reason for hiding this comment

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

yeah I didn't want AWS to interrupt execution of other providers. Ideally we should return template change details with the exception in each instance but the way we output proposed changes will need to be updated and didn't want the ticket to go down a rabbit hole.

Created an issue that will allow us to assign provider wide exceptions #382

Copy link
Contributor

Choose a reason for hiding this comment

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

yea, its an aspect of provider isolation in apply. because if okta has a service outage, I still want AWS to work.

@Will-NOQ Will-NOQ merged commit 1049788 into main May 3, 2023
@Will-NOQ Will-NOQ deleted the bug/en-2097-fix-read-only branch May 3, 2023 18:29
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.

2 participants