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

WIP: [AIRFLOW-4506] Make GIT_SYNC_DEPTH and GIT_SYNC_REV configurable #5281

Closed
wants to merge 1 commit into from

Conversation

andrejbaran
Copy link

@andrejbaran andrejbaran commented May 14, 2019

Make sure you have checked all steps below.

Jira

  • My PR addresses the following Airflow Jira issues and references them in the PR title. For example, "[AIRFLOW-XXX] My Airflow PR"
    • https://issues.apache.org/jira/browse/AIRFLOW-XXX
    • In case you are fixing a typo in the documentation you can prepend your commit with [AIRFLOW-XXX], code changes always need a Jira issue.
    • In case you are proposing a fundamental code change, you need to create an Airflow Improvement Proposal (AIP).
    • In case you are adding a dependency, check if the license complies with the ASF 3rd Party License Policy.

Description

  • Here are some details about my PR, including screenshots of any UI changes:

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:

Commits

  • My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Documentation

  • In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public functions and the classes in the PR contain docstrings that explain what it does
    • If you implement backwards incompatible changes, please leave a note in the Updating.md so we can assign it to a appropriate release

Code Quality

  • Passes flake8

@andrejbaran andrejbaran changed the title [AIRFLOW-4506] Make GIT_SYNC_DEPTH and GIT_SYNC_REV configurable WIP: [AIRFLOW-4506] Make GIT_SYNC_DEPTH and GIT_SYNC_REV configurable May 14, 2019
@codecov-io
Copy link

Codecov Report

Merging #5281 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5281      +/-   ##
==========================================
+ Coverage   78.76%   78.76%   +<.01%     
==========================================
  Files         474      474              
  Lines       30142    30144       +2     
==========================================
+ Hits        23741    23743       +2     
  Misses       6401     6401
Impacted Files Coverage Δ
airflow/kubernetes/worker_configuration.py 96.03% <ø> (ø) ⬆️
airflow/executors/kubernetes_executor.py 62.43% <100%> (+0.19%) ⬆️

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 795f386...2509615. Read the comment docs.

1 similar comment
@codecov-io
Copy link

codecov-io commented May 14, 2019

Codecov Report

Merging #5281 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5281      +/-   ##
==========================================
+ Coverage   78.76%   78.76%   +<.01%     
==========================================
  Files         474      474              
  Lines       30142    30144       +2     
==========================================
+ Hits        23741    23743       +2     
  Misses       6401     6401
Impacted Files Coverage Δ
airflow/kubernetes/worker_configuration.py 96.03% <ø> (ø) ⬆️
airflow/executors/kubernetes_executor.py 62.43% <100%> (+0.19%) ⬆️

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 795f386...2509615. Read the comment docs.

@andrejbaran
Copy link
Author

andrejbaran commented May 14, 2019

Hey @dimberman I'm not sure whether this is the correct approach to default values in this case as I want to keep it backward compatible (meaning no entries in airflow.cfg)

@dimberman
Copy link
Contributor

Hi @andrejbaran I'm not sure what the question is? This seems in-line with existing stuff. That said, could you add a test for this please?

@@ -64,10 +64,13 @@ def _get_init_containers(self):
'value': self.kube_config.git_sync_dest
}, {
'name': 'GIT_SYNC_DEPTH',
'value': '1'
'value': self.kube_config.git_sync_depth if self.kube_config.git_sync_depth else '1'
Copy link
Member

Choose a reason for hiding this comment

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

Don't' put the default in code, just put the default in the config file.

Copy link
Member

@ashb ashb left a comment

Choose a reason for hiding this comment

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

Move defaults for both new config entries out of the code into the config file.

@dimberman
Copy link
Contributor

@andrejbaran any word on this? Would love to get it merged ASAP :).

@mik-laj mik-laj added the k8s label Aug 15, 2019
@mik-laj
Copy link
Member

mik-laj commented Sep 12, 2019

@andrejbaran Can I help you with this change?

@andrejbaran
Copy link
Author

@mik-laj @dimberman hey guys, sorry for not responding. I will try to finish this up next week.

@stale
Copy link

stale bot commented Nov 20, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Nov 20, 2019
@stale stale bot closed this Nov 27, 2019
@KevinKobi
Copy link

GIT_SYNC_REV was added #6350 but not GIT_SYNC_DEPTH :(
are there plans to add it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale PRs per the .github/workflows/stale.yml policy file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants