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

Sanitize end of line character when loading token from a file (vault) #16407

Merged

Conversation

mmenarguezpear
Copy link
Contributor

This commit addresses #16406


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
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.

@boring-cyborg
Copy link

boring-cyborg bot commented Jun 11, 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, pylint 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: [email protected]
    Slack: https://s.apache.org/airflow-slack

@mmenarguezpear mmenarguezpear force-pushed the fix-issue-16406-hashicorp-toekn-path-strip branch from c68f0de to 690f5ed Compare June 11, 2021 23:42
@mmenarguezpear
Copy link
Contributor Author

@mik-laj is there something else needed for a review?

@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 Jun 12, 2021
@mmenarguezpear
Copy link
Contributor Author

I have also verified this change fixes the isse with the following Dockerfile

FROM apache/airflow:2.1.0-python3.8

COPY requirements.txt /opt/airflow/requirements.txt

RUN pip install -r /opt/airflow/requirements.txt

RUN sed -i s/\_client\.token\ =\ f\.read\(\)/\_client\.token\ =\ f\.read\(\)\.strip\(\)/g /home/airflow/.local/lib/python3.8/site-packages/airflow/providers/hashicorp/_internal_client/vault_client.py

COPY src /opt/airflow

where requirements.txt

apache-airflow-providers-amazon==1.4.0
apache-airflow==2.1.0
apache-airflow-providers-hashicorp==1.0.2

@potiuk potiuk merged commit 70cfe01 into apache:main Jun 12, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Jun 12, 2021

Awesome work, congrats on your first merged pull request!

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants