Skip to content

Conversation

@Taragolis
Copy link
Contributor

Pre-requirements for #26162

Add new Hook into amazon-provider which integrated with ECR.

Hook itself it is just Thin wrapper around boto3 ECR client with single method for:

  • Obtain temporary credentials
  • Decode them
  • Mask password
  • Prepare to use with docker login

Copy link
Contributor

@o-nikolas o-nikolas left a comment

Choose a reason for hiding this comment

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

Just a nit and a question, otherwise looks good!

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this just to guard empty string/list as an input? Because you are already defaulting this to None in the method signature.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, just a guard. This attribute will propagated from connection

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So value in some cases might be "" just for avoid this situation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@o-nikolas @ferruzzi do we have any concern about this part? Or we could merge this changes?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah no concern I was just checking to be sure. You could re-arrange the if statements so that the falsey check happens first so that you wouldn't need this assignment, but the way you have it is also perfectly fine 👍

Co-authored-by: D. Ferruzzi <ferruzzi@amazon.com>
Co-authored-by: Niko <onikolas@amazon.com>
@Taragolis Taragolis merged commit 8e0df88 into apache:main Dec 17, 2022
@Taragolis Taragolis deleted the amazon-ecr-hook branch December 17, 2022 01:40
gschuurman pushed a commit to gschuurman/airflow that referenced this pull request Dec 19, 2022
Co-authored-by: D. Ferruzzi <ferruzzi@amazon.com>
Co-authored-by: Niko <onikolas@amazon.com>
@pierrejeambrun pierrejeambrun added this to the Airflow 2.6.0 milestone Jan 9, 2023
@pierrejeambrun pierrejeambrun added the type:new-feature Changelog: New Features label Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers kind:documentation provider:amazon AWS/Amazon - related issues type:new-feature Changelog: New Features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants