Skip to content

Conversation

@yeluolei
Copy link
Contributor

@yeluolei yeluolei commented Aug 1, 2018

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"

Description

the kubernetes docker build airflow without rbac support, but the configmap need rbac. so need to change the build script to build js and css files.
currently when open airflow web ui deployed in kubernetes, the webpage is blank and will be some file missing.

  • 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.
    • When adding new operators/hooks/sensors, the autoclass documentation generation needs to be added.

Code Quality

  • Passes git diff upstream/master -u -- "*.py" | flake8 --diff

@yeluolei
Copy link
Contributor Author

yeluolei commented Aug 2, 2018

the travis build failed at check license, seams not a problem.

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.

The tests are failing as a result of the change though - it's complaining about all the new files that node has created.

You will need to add suitable excludion rules into the .rat-excludes file.

@yeluolei yeluolei force-pushed the AIRFLOW-2834 branch 3 times, most recently from 6439d8d to 83661f4 Compare August 7, 2018 06:10
@yeluolei
Copy link
Contributor Author

yeluolei commented Aug 7, 2018

wired, the test complains the files in airflow/www_rbac/node_modules/
but there already a rule in .rat-excludes with airflow/www_rbac/node_modules/

I have tried with different approach to make the exclude rule work, but failed. can you provide a simple instruction to how to ignore files under airflow/www_rbac/node_modules/ ?

@codecov-io
Copy link

Codecov Report

Merging #3675 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3675      +/-   ##
==========================================
+ Coverage   77.63%   77.64%   +<.01%     
==========================================
  Files         204      204              
  Lines       15800    15800              
==========================================
+ Hits        12267    12268       +1     
+ Misses       3533     3532       -1
Impacted Files Coverage Δ
airflow/utils/dag_processing.py 89.87% <0%> (+0.42%) ⬆️

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 acca61c...f8fb4dd. Read the comment docs.

@yeluolei
Copy link
Contributor Author

@ashb

@samdjstephens
Copy link

@ashb @yeluolei I just went through the pain of trying to use scripts/ci/kubernetes to test the kubernetes executor out locally, debugging it and finding this PR. Can we get this merged so no-one else has to go through this again?

@Fokko
Copy link
Contributor

Fokko commented Nov 25, 2018

@verdan PTAL

airflow/www_rbac/node_modules
.*node_modules.*
.*json
flake8_diff.sh
Copy link
Member

Choose a reason for hiding this comment

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

I don't think these changes should be in this PR as they are unrelated - (also flake8-diff.sh doesn't exist anymore)

Copy link
Member

Choose a reason for hiding this comment

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

Oh I just saw my own previous comment. Sorry.

Still, flake8_diff.sh doesn't exist anymore

@ashb
Copy link
Member

ashb commented Nov 26, 2018

Are these changes needed for running tests, or are you re-using the images built there for running Airflow in kube?

@ashb
Copy link
Member

ashb commented Nov 26, 2018

The only reason I hesitate as this will slow down the Travis builds a bit, and they are already slow enough, and this is not needed for running the tests.

Would a comment, or a flag you pass build.sh (i.e. build.sh --with-assets) be enough, so that by default on Travis we don't run compile_assets, but it could be re-used for your local docker builds? (The primary purpose of the script is for CI, not general purpose)

@ashb
Copy link
Member

ashb commented Nov 26, 2018

Oh, and additionally/instead:

If we do leave this in we should work out to add .node_modules to the Travis cache.

@yeluolei
Copy link
Contributor Author

@ashb sorry, I'm not very familiar with travis, this change is to make sure our kube change and kube unit test can pass through, and it's four month ago after I made this change... what do you mean by add some flag to cache? and how to add cache into travis?

@ashb
Copy link
Member

ashb commented Nov 27, 2018

this change is to make sure our kube change and kube unit test can pass

What unit tests depend on the front-end assets?

@kppullin
Copy link
Contributor

I ran across this same issue and created a duplicate PR: #4248

While I understand these scripts are for CI, I also found using the Dockerfile and the kube deploy CI script convenient for testing & iterating on changes made to the kubernetes executor, etc.

@ashb
Copy link
Member

ashb commented Nov 28, 2018

Couldn't you get even quicker dev cycles by volume-mounting the airflow code in? rather than having to rebuild?

@kppullin
Copy link
Contributor

That'd likely work well. I could use the deploy.sh script to bootstrap the system in minikube (postgresql, secrets, etc) and then change the airflow deployment to point a volume.

@yeluolei
Copy link
Contributor Author

@ashb is that means we should not use this Dockerfile to build docker image of airflow, instead we should create one by ourself and then use it in k8s cluster? then I think we need to close this issue and then add some readme in the Dockerfile or some where

@ashb
Copy link
Member

ashb commented Apr 11, 2019

Fixed by #3770

@ashb ashb closed this Apr 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants