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

[AIRFLOW-7108] Fix CloudSecretsManagerBackend invalid connections_prefix #7861

Merged

Conversation

xinbinhuang
Copy link
Contributor

@xinbinhuang xinbinhuang commented Mar 25, 2020

GCP Secrets Manager only accepts [a-zA-Z0-9-_]* as its valid secret id key. This PR fixes the implementation and adds checks in the constructor.

Screenshot at GCP Console
image


Issue link: AIRFLOW-7108

Make sure to mark the boxes below before creating PR: [x]


In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.
Read the Pull Request Guidelines for more information.

@boring-cyborg boring-cyborg bot added area:docs area:secrets provider:google Google (including GCP) related issues labels Mar 25, 2020
@xinbinhuang
Copy link
Contributor Author

Need to rebase after #7861 is merged

@zhongjiajie
Copy link
Member

Should we add [WIP] in PR title avoid incorrect merge?

@codecov-io
Copy link

Codecov Report

Merging #7861 into master will increase coverage by 21.15%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #7861       +/-   ##
===========================================
+ Coverage   65.44%   86.60%   +21.15%     
===========================================
  Files         927      927               
  Lines       44963    44972        +9     
===========================================
+ Hits        29425    38946     +9521     
+ Misses      15538     6026     -9512     
Impacted Files Coverage Δ
.../providers/google/cloud/secrets/secrets_manager.py 100.00% <100.00%> (ø)
airflow/secrets/base_secrets.py 94.11% <100.00%> (ø)
airflow/kubernetes/volume_mount.py 44.44% <0.00%> (-55.56%) ⬇️
airflow/kubernetes/volume.py 52.94% <0.00%> (-47.06%) ⬇️
airflow/kubernetes/pod_launcher.py 47.18% <0.00%> (-39.44%) ⬇️
...viders/cncf/kubernetes/operators/kubernetes_pod.py 69.69% <0.00%> (-25.26%) ⬇️
airflow/kubernetes/refresh_config.py 50.98% <0.00%> (-23.53%) ⬇️
airflow/providers/google/cloud/operators/vision.py 99.63% <0.00%> (+0.36%) ⬆️
...osoft/azure/operators/azure_container_instances.py 78.28% <0.00%> (+0.65%) ⬆️
airflow/cli/cli_parser.py 98.13% <0.00%> (+0.93%) ⬆️
... and 492 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a15026f...a851519. Read the comment docs.

@kaxil
Copy link
Member

kaxil commented Mar 25, 2020

Can you rebase your PR on master please

@xinbinhuang xinbinhuang force-pushed the fix_secrets_manager_connections_prefix branch from a851519 to d760723 Compare March 25, 2020 20:31
@xinbinhuang
Copy link
Contributor Author

@zhongjiajie @kaxil Just rebased. Going through Travis now. Should be good to go after that

@xinbinhuang
Copy link
Contributor Author

@zhongjiajie @kaxil Just rebased. Going through Travis now. Should be good to go after that

Travis green!. Let me know if you have any other comments.

@kaxil kaxil merged commit f9c2263 into apache:master Mar 26, 2020
@kaxil
Copy link
Member

kaxil commented Mar 26, 2020

Thanks @xinbinhuang

kaxil pushed a commit that referenced this pull request Mar 26, 2020
kaxil pushed a commit to astronomer/airflow that referenced this pull request Mar 30, 2020
kaxil pushed a commit that referenced this pull request Mar 30, 2020
kaxil pushed a commit to astronomer/airflow that referenced this pull request Apr 28, 2020
(cherry picked from commit f9c2263)
(cherry picked from commit f08b84f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:secrets provider:google Google (including GCP) related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants