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

Fixes #16972 - Slugify role session name in AWS base hook #17210

Conversation

mcreenan
Copy link
Contributor

closes: #16972

This change ensures the role session name only contains valid characters according to the pattern defined by the RoleSessionName parameter in STS AssumeRole (https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html).

@boring-cyborg boring-cyborg bot added area:providers provider:amazon-aws AWS/Amazon - related issues labels Jul 25, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Jul 25, 2021

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it’s a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

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

Nice!

@github-actions
Copy link

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Jul 25, 2021
@mcreenan mcreenan requested a review from potiuk July 25, 2021 19:57
@potiuk potiuk closed this Jul 25, 2021
@potiuk potiuk reopened this Jul 25, 2021
@potiuk
Copy link
Member

potiuk commented Jul 25, 2021

Rebuilding

@potiuk
Copy link
Member

potiuk commented Jul 25, 2021

Can you please rebase to latest main @mcreenan - I think I fixed all the "red-build" stability issues that plagued us in the last week

@mcreenan mcreenan force-pushed the 16972-remove-invalid-characters-from-role-session-name branch from 7d8802a to 345bcc6 Compare July 25, 2021 21:30
@mcreenan
Copy link
Contributor Author

Can you please rebase to latest main @mcreenan - I think I fixed all the "red-build" stability issues that plagued us in the last week

Done... I think. I'm new to this style of workflow.

@potiuk
Copy link
Member

potiuk commented Jul 25, 2021

Yeah. Airflow is a beast and keeping it tamed is a special kinda skill. Sometimes it shows it's humours :)

@potiuk
Copy link
Member

potiuk commented Jul 25, 2021

Now - we are back to "real" issues - static checks are failing - there are some CHANGELOG,rst entries wrong (single instead of double backticks)

@potiuk
Copy link
Member

potiuk commented Jul 25, 2021

And some unit tests

@mcreenan
Copy link
Contributor Author

Now - we are back to "real" issues - static checks are failing - there are some CHANGELOG,rst entries wrong (single instead of double backticks)

Can you help me understand what's going on here? I didn't change CHANGELOG.rst.

And some unit tests

I'll look at those.

@mcreenan
Copy link
Contributor Author

There's something strange going on. The tests that are failing aren't at all related to what I changed (especially the google ones). When I run the aws providers tests locally, I get 2 other unrelated errors.

@potiuk
Copy link
Member

potiuk commented Jul 26, 2021

Please rebase to latest main - we had some problems with main broken. Those problem should be fixed now.

@mcreenan mcreenan force-pushed the 16972-remove-invalid-characters-from-role-session-name branch from 345bcc6 to 2bad45d Compare July 26, 2021 23:56
@mcreenan
Copy link
Contributor Author

Please rebase to latest main - we had some problems with main broken. Those problem should be fixed now.

Done.

@mcreenan
Copy link
Contributor Author

Is there anything else I need to do with this PR? It looks like the latest run of tests still had some failures unrelated to this change.

@potiuk potiuk merged commit 80fc80a into apache:main Aug 1, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Aug 1, 2021

Awesome work, congrats on your first merged pull request!

@mcreenan mcreenan deleted the 16972-remove-invalid-characters-from-role-session-name branch August 1, 2021 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers okay to merge It's ok to merge this PR as it does not require more tests provider:amazon-aws AWS/Amazon - related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AWS Hooks fail when assuming role and connection id contains forward slashes
3 participants