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

Allow Users to disable SwaggerUI via configuration #28354

Merged
merged 28 commits into from
Dec 20, 2022

Conversation

gschuurman
Copy link
Contributor

@gschuurman gschuurman commented Dec 14, 2022

Due to potential issues we want to give teams the opportunity to disable the swaggerUI. This can now be done via the configuration key: webserver.enable_swagger_ui.
For backwards compatibility this has been set to default true, but for teams willing to disable this it can be set to false.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an 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 a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborg boring-cyborg bot added the area:webserver Webserver related Issues label Dec 14, 2022
Due to potential issues we want to give teams the opportunity to disable
the swaggerUI. This can now be done via the configuration key:
webserver.enable_swagger_ui.
For backwards compatibility this has been set to default true, but for
teams willing to disable this it can be set to false.
Users can update the code without updating the config file, this would
have caused an issue. By implementing the fallback we set a default
value. By default the swaggerUI should be enabled
Removing the swagger UI via config should also reflect on the ui,
otherwise this change will cause a broken link in the UI
@gschuurman gschuurman force-pushed the feature/disable_swagger_ui branch from 1d30cf7 to 76fb463 Compare December 15, 2022 09:22
@gschuurman gschuurman requested review from msumit and ephraimbuddy and removed request for ryanahamilton, ashb, bbovenzi and msumit December 19, 2022 08:21
csm10495 and others added 10 commits December 19, 2022 10:17
…vent secret leakage in logs (apache#28239)


Co-authored-by: Jarek Potiuk <[email protected]>
Co-authored-by: Ash Berlin-Taylor <[email protected]>
Make it a bit more friendly for the next one who release for the first time
The apache#28325 implemented some changes to spellcheck scripts via
"isort" - apparently in some cases "docs" is not see as internal
package by isort. This needs to be further investigated but this
PR restores proper sorting.
A big restructuring of our docs to make them easier to reason about - in a much more logical and consistent way. Likel other updates and content changes will be needed to make it even better.
Taragolis and others added 10 commits December 19, 2022 10:17
The recent isort changed their mind on sorting the imports. This
change follows the change and bumps isort to latest released
version (isort has no install_requires on its own so bumping
min version has no effect on other dependencies)

This change adds a number of isort:skip_file, isort:off, isort:skips
in order to handle a very annoying bug in isort, that no matter how
much you try, it sometimes treat "known first party" packages
differently - depending on how many files it processes at a time.

We should be able to restore it after this bug is fixed:
PyCQA/isort#2045

This change also updates the common.sql API to skip them from isort
for the very same reason (depending on how many files are modified,
the isort order might change.
Since we disabled warnings and redirected them to the output file,
we lost continuous output of the progress of tests when they
were run as `breeze testing tests` command. The whole summary
of the tests appeared only at the end of tests.

This turned out to be Python output buffering in "filter_out_warning"
class. It is fixed by flushing sys.stdout after every printed line
now.
Breeze in case of ARM processor lacks support for several components
(because they do not have supported ARM binaries available):

* MySQL
* MSSQL
* LevelDB
* Azure Service Bus

When you try to attempt to run pytest on a group of tests that import
one of those, the collection failed and none of the tests could run
even if some of them could.

This change uses pytest's skip on a module level and local imports
in case the tests are inter-mixed with other tests in the same module
to avoid import errors during collection.

The try/except pattern over pytest.importorskip is preferred because
we are using try/except in a number of other cases and we are pretty
familiar with similar pattern and importorskipi has a bit unexpected
behaviour (it returns imported module and you do not see the usual
`import nnnn`. Also in our case we often wrap more than one
import in one try/except (and it would lead to a duplicating messages
to print really.

We also add a separate command in ci to just perform a collection of
tests and see if all tests are collectable after uninstalling all
those libraries. This would prevent the problems from reapparing.

Isort fixes are implemented for recently relesed isort version
Previously, Plyvel had to be disabled in order to get
ARM compatibility (it did not have
binary wheels released and it failed to compile cleanly on debian).
But the last problem is fixed now, so we can re-enable it for ARM.
* Add ensure_ascii=False in trigger dag run api

* Fix static checks
@msumit
Copy link
Contributor

msumit commented Dec 19, 2022

@gschuurman plz fix the braking static check and I think it'll be ok to merge.

@msumit msumit merged commit 032a542 into apache:main Dec 20, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Dec 20, 2022

Awesome work, congrats on your first merged pull request!

@pierrejeambrun pierrejeambrun added this to the Airflow 2.6.0 milestone Jan 9, 2023
@pierrejeambrun pierrejeambrun added the type:new-feature Changelog: New Features label Jan 9, 2023
@gschuurman gschuurman deleted the feature/disable_swagger_ui branch April 9, 2024 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:webserver Webserver related Issues type:new-feature Changelog: New Features
Projects
None yet
Development

Successfully merging this pull request may close these issues.