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 LegacyUIDeprecated rule and unittests #11185

Closed

Conversation

rafaelpierre
Copy link

Adds LegacyUIDeprecated rule to upgrade/rules as per:

https://github.com/apache/airflow/blob/master/UPDATING.md#drop-legacy-ui-in-favor-of-fab-rbac-ui

Closes: #11019


^ 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 Sep 28, 2020

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/master/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: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

Copy link
Author

@rafaelpierre rafaelpierre left a comment

Choose a reason for hiding this comment

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

thanks @turbaszek!

airflow/upgrade/rules/legacy_ui_deprecated.py Outdated Show resolved Hide resolved
@rafaelpierre
Copy link
Author

@turbaszek replaced one quote with three quotes in the test msg, should be fine now

@turbaszek turbaszek added the area:upgrade Facilitating migration to a newer version of Airflow label Oct 3, 2020
@rafaelpierre
Copy link
Author

@turbaszek thanks for approving! just to check, should I close the PR? I noticed some of the tests are being skipped - from the logs it indicates that perhaps it is failing for Python 2.7

image

@potiuk potiuk force-pushed the v1-10-test branch 2 times, most recently from bd4214b to 195f00d Compare October 3, 2020 22:42
@turbaszek
Copy link
Member

Please rebase your PR, we added few changes that should fix the CI issues. Please do rebase and try to avoid merge commits, more information:
https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#id9

@rafaelpierre
Copy link
Author

rebased PR with changes for fixing CI issues. added test if rbac is None

@rafaelpierre rafaelpierre reopened this Oct 4, 2020
@turbaszek
Copy link
Member

@rafaelpierre if you would like I can help you with sorting out the commits 👍

@rafaelpierre
Copy link
Author

rafaelpierre commented Oct 4, 2020

@turbaszek much appreciated, thanks! I'm not that familiar with rebase :) one thing I'm struggling with is that I have already rebased, however it still shows that these files are conflicting:

breeze-complete
scripts/ci/libraries/_initialization.sh
scripts/docker/install_mysql.sh

however, if you look into the first file in the my branch, it doesn't have any conflict (line 138 looks the same as from v1-10-test)

rbac_conf = conf.get("webserver", "rbac")

if rbac_conf == "false":
msg = """rbac in airflow.cfg must be explicitly set empty as RBAC mechanism is enabled by default. """
Copy link
Member

Choose a reason for hiding this comment

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

Probably we can use single quote string 👌

@turbaszek
Copy link
Member

@rafaelpierre can you please take a look at the CI problems:

tests/upgrade/rules/test_legacy_ui_deprecated.py:37:5: E303 too many blank lines (2)
airflow/upgrade/rules/legacy_ui_deprecated.py:32:111: E501 line too long (118 > 110 characters)

@github-actions
Copy link

github-actions bot commented Oct 5, 2020

The CI and PROD Docker Images for the build are prepared in a separate "Build Image" workflow,
that you will not see in the list of checks (you will see "Wait for images" jobs instead).

You can checks the status of those images in The workflow run

@github-actions
Copy link

github-actions bot commented Oct 5, 2020

The CI and PROD Docker Images for the build are prepared in a separate "Build Image" workflow,
that you will not see in the list of checks (you will see "Wait for images" jobs instead).

You can checks the status of those images in The workflow run

@github-actions
Copy link

github-actions bot commented Oct 5, 2020

The Build 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*.

@rafaelpierre rafaelpierre deleted the legacy-ui-deprecated-rule branch October 5, 2020 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:upgrade Facilitating migration to a newer version of Airflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create LegacyUIDeprecatedRule to ease upgrade to Airflow 2.0
3 participants