Skip to content

Remove cache for kubernetes tests#16927

Merged
potiuk merged 1 commit intoapache:mainfrom
potiuk:remove-cache-for-k8s-test-virtualenv
Jul 11, 2021
Merged

Remove cache for kubernetes tests#16927
potiuk merged 1 commit intoapache:mainfrom
potiuk:remove-cache-for-k8s-test-virtualenv

Conversation

@potiuk
Copy link
Copy Markdown
Member

@potiuk potiuk commented Jul 11, 2021

Different python versions are used for different tests for k8s
so we should not attempt to cache the venv for tests, otherwise
they will randomly fail.


^ 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.

@potiuk potiuk added the full tests needed We need to run full set of tests for this PR to merge label Jul 11, 2021
@potiuk potiuk requested review from ashb and kaxil as code owners July 11, 2021 08:47
@potiuk potiuk force-pushed the remove-cache-for-k8s-test-virtualenv branch from aaff222 to 3e17f73 Compare July 11, 2021 08:52
@potiuk potiuk changed the title Disable cache for virtualenv for K8S tests Fix cache for K8S test virtualenv Jul 11, 2021
@potiuk
Copy link
Copy Markdown
Member Author

potiuk commented Jul 11, 2021

Hey @ephraimbuddy -> I think this is the final reason for K8S tests failing for 'main` repo. I think the venv cache has been irreparably broken by some early attempts of running the tests. I am rebuilding the cache from scratch with this PR and hopefully the "main" K8S tests will finally get green as well.

@potiuk
Copy link
Copy Markdown
Member Author

potiuk commented Jul 11, 2021

The tests in main were failing with (https://github.com/apache/airflow/runs/3039240162?check_suite_focus=true#step:8:1585)

/home/runner/actions-runner/_work/airflow/airflow/.build/.kubernetes_venv/airflow-python-3.9-v1.18.15_host_python_3.6_CeleryExecutor/bin/pip: 2: exec: /home/runner/actions-runner/_work/airflow/airflow/.build/.kubernetes_venv/airflow-python-3.9-v1.18.15_host_python_3.6_CeleryExecutor/bin/python3: not found

Because the python3 binary was missing from the cache (I believe)

Let's see if it helps. Another hypothesis I had was that the python3 symbolic link is not properly stored in the cache of GitHub Actions. So if that one does not work we can simply disable the cache altogether (it does not take that long to build airflow's venv with [cncf.kubernetes, devel] extra only, and this is what the venv really is - it is needed to run all the k8s tests.

@potiuk potiuk requested a review from ephraimbuddy July 11, 2021 08:58
@potiuk potiuk force-pushed the remove-cache-for-k8s-test-virtualenv branch 2 times, most recently from e896297 to 33eb85d Compare July 11, 2021 09:47
@potiuk
Copy link
Copy Markdown
Member Author

potiuk commented Jul 11, 2021

Yeah. Removing cache is best. We are also running different K8S for different python versions and this makes the attempts to cache the venv really bad idea.

@potiuk potiuk changed the title Fix cache for K8S test virtualenv Remove cache for kubernetes tests Jul 11, 2021
@potiuk potiuk force-pushed the remove-cache-for-k8s-test-virtualenv branch from 33eb85d to 2bc40c2 Compare July 11, 2021 09:50
@potiuk potiuk requested a review from eladkal July 11, 2021 09:51
@potiuk potiuk force-pushed the remove-cache-for-k8s-test-virtualenv branch from 2bc40c2 to 279beaf Compare July 11, 2021 11:02
@potiuk
Copy link
Copy Markdown
Member Author

potiuk commented Jul 11, 2021

It works, but I forgot that the "upgrade" test had it's own cache. Removed it too.

Different python versions are used for different tests for k8s
so we should not attempt to cache the venv for tests, otherwise
they will randomly fail.
@potiuk potiuk force-pushed the remove-cache-for-k8s-test-virtualenv branch from 279beaf to ea5799d Compare July 11, 2021 13:16
Copy link
Copy Markdown
Contributor

@ephraimbuddy ephraimbuddy left a comment

Choose a reason for hiding this comment

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

Nice. I have a PR I have not merged because of failing helm tests!

@potiuk potiuk merged commit e8e9a6d into apache:main Jul 11, 2021
@potiuk potiuk deleted the remove-cache-for-k8s-test-virtualenv branch July 11, 2021 13:21
@potiuk
Copy link
Copy Markdown
Member Author

potiuk commented Jul 11, 2021

Nice. I have a PR I have not merged because of failing helm tests!

Go ahead :)

potiuk added a commit that referenced this pull request Jul 18, 2021
Different python versions are used for different tests for k8s
so we should not attempt to cache the venv for tests, otherwise
they will randomly fail.

(cherry picked from commit e8e9a6d)
josh-fell pushed a commit to josh-fell/airflow that referenced this pull request Jul 19, 2021
Different python versions are used for different tests for k8s
so we should not attempt to cache the venv for tests, otherwise
they will randomly fail.
kaxil pushed a commit that referenced this pull request Aug 17, 2021
Different python versions are used for different tests for k8s
so we should not attempt to cache the venv for tests, otherwise
they will randomly fail.

(cherry picked from commit e8e9a6d)
jhtimmins pushed a commit that referenced this pull request Aug 17, 2021
Different python versions are used for different tests for k8s
so we should not attempt to cache the venv for tests, otherwise
they will randomly fail.

(cherry picked from commit e8e9a6d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools full tests needed We need to run full set of tests for this PR to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants