Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Always return a response in TI's action_clear view #15980

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

Merged
merged 1 commit into from
May 24, 2021

Conversation

uranusjr
Copy link
Member

@uranusjr uranusjr commented May 21, 2021

A flask view should always return a response object, not None. This makes TaskInstanceModelView.action_view works like all other action views in the same class, redirecting to the previous page even after an exception (and show the exception as a flash).

This does not get #15775 resolved, but should make the error more obvious to the user, instead of masking it with another error.


^ 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:webserver Webserver related Issues label May 21, 2021
@uranusjr uranusjr changed the title Always return as reponse in TI's action_clear view Always return an reponse in TI's action_clear view May 21, 2021
@uranusjr uranusjr changed the title Always return an reponse in TI's action_clear view Always return a response in TI's action_clear view May 21, 2021
@uranusjr uranusjr force-pushed the ti-clear-view-no-return-none branch from ac65e97 to 1d847c7 Compare May 21, 2021 12:03
@kaxil kaxil merged commit 2bac05e into apache:master May 24, 2021
@uranusjr uranusjr deleted the ti-clear-view-no-return-none branch May 24, 2021 15:16
@ashb
Copy link
Member

ashb commented Jun 10, 2021

@uranusjr

I'm seeing this in the logs:

tests/www/views/test_views_tasks.py::test_task_instance_clear_failure XFAIL (until #15980 is merged)                                                                                                                                             [ 72%]

Shouldn't we expect this to pass now?

@uranusjr
Copy link
Member Author

Turns out I didn’t do enough to make the action fail. Let me fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:webserver Webserver related Issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.