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

Add Python Helm testing framework #11693

Merged
merged 3 commits into from
Oct 28, 2020

Conversation

dimberman
Copy link
Contributor


^ 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 boring-cyborg bot added the area:helm-chart Airflow Helm Chart label Oct 20, 2020
@dimberman dimberman linked an issue Oct 20, 2020 that may be closed by this pull request
@dimberman dimberman marked this pull request as ready for review October 20, 2020 17:52
@github-actions
Copy link

The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*.

tests/helm/__init__.py Outdated Show resolved Hide resolved
.dockerignore Outdated Show resolved Hide resolved
@github-actions
Copy link

The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*.

@github-actions
Copy link

The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*.

@kaxil kaxil changed the title add python helm testing framework Add Python Helm testing framework Oct 22, 2020
Comment on lines 33 to 36
:param name:
:param values:
:param show_only:
:return:
Copy link
Member

Choose a reason for hiding this comment

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

Either we should all the descriptions or remove these too

@github-actions
Copy link

The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*.

@@ -277,7 +277,7 @@ repos:
entry: "^\\s*from\\s+\\."
pass_filenames: true
files: \.py$
exclude: ^tests/
exclude: ^tests/|^chart/tests/
Copy link
Member

@mik-laj mik-laj Oct 25, 2020

Choose a reason for hiding this comment

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

It is needed? We can solve pylint problems with a trick similar to mypy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this one is needed as if it's not excluded it will try to parse those files

Copy link
Member

Choose a reason for hiding this comment

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

In my opinion, this is expected behavior. Instead, we should use the correct imports.

-from .helm_template_generator import render_chart
+from tests.helm_template_generator import render_chart

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screen Shot 2020-10-26 at 11 10 42 AM

That works on the docker-based tests, but is shows an error on PyCharm which might make development difficult. Any idea how to fix that? I think pycharm usually assumes root.

Copy link
Member

Choose a reason for hiding this comment

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

  1. Click File => Project structure
  2. On the left menu, select "Project settings => Modules
  3. Click + >> Add new module to a new project module
  4. Select Python
  5. Next
  6. Type Chart in "Module name"" field
  7. Finish
  8. Click Add Content Root and add /chart directory again

Copy link
Member

Choose a reason for hiding this comment

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

Screenshot 2020-10-26 at 19 33 49

TESTING.rst Show resolved Hide resolved
@github-actions
Copy link

The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*.

@github-actions
Copy link

The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*.

Copy link
Member

@mik-laj mik-laj left a comment

Choose a reason for hiding this comment

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

@dimberman dimberman force-pushed the helm-testing-framework branch 2 times, most recently from 0babdba to c5e36d2 Compare October 27, 2020 23:04
@dimberman dimberman merged commit 0d1ad66 into apache:master Oct 28, 2020
@dimberman dimberman deleted the helm-testing-framework branch October 28, 2020 01:29
@mik-laj
Copy link
Member

mik-laj commented Oct 28, 2020

🎉 Thanks!

I will now migrate the rest of the files.
#11827

michalmisiewicz pushed a commit to michalmisiewicz/airflow that referenced this pull request Oct 30, 2020
* Helm Python Testing

* helm change

* add back args
szn pushed a commit to szn/airflow that referenced this pull request Nov 1, 2020
* Helm Python Testing

* helm change

* add back args
potiuk pushed a commit that referenced this pull request Nov 14, 2020
* Helm Python Testing

* helm change

* add back args

(cherry picked from commit 0d1ad66)
@potiuk potiuk added this to the Airflow 1.10.13 milestone Nov 14, 2020
@potiuk potiuk added the type:misc/internal Changelog: Misc changes that should appear in change log label Nov 14, 2020
potiuk pushed a commit that referenced this pull request Nov 16, 2020
* Helm Python Testing

* helm change

* add back args

(cherry picked from commit 0d1ad66)
potiuk pushed a commit that referenced this pull request Nov 16, 2020
* Helm Python Testing

* helm change

* add back args

(cherry picked from commit 0d1ad66)
kaxil pushed a commit that referenced this pull request Nov 18, 2020
* Helm Python Testing

* helm change

* add back args

(cherry picked from commit 0d1ad66)
cfei18 pushed a commit to cfei18/incubator-airflow that referenced this pull request Mar 5, 2021
* Helm Python Testing

* helm change

* add back args

(cherry picked from commit 0d1ad66)
cognifloyd pushed a commit to cognifloyd/stackstorm-k8s that referenced this pull request Feb 16, 2022
* Helm Python Testing

* helm change

* add back args

Partial Commit Extracted From: https://github.com/apache/airflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:helm-chart Airflow Helm Chart type:misc/internal Changelog: Misc changes that should appear in change log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better unit tests for Helm Chart
5 participants