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

Fix Spark Conn Add/Edit Pages #8685

Merged
merged 1 commit into from
May 3, 2020
Merged

Conversation

XD-DENG
Copy link
Member

@XD-DENG XD-DENG commented May 3, 2020

  • Currently in master and 1.10.10, connection add/edit UI pages are not working correctly for Spark connections.

Current Connection Adding for Spark ('Spark' in not available):

Airflow

Current Connection Editing for Spark:

Airflow-2

You can easily reproduce this by trying to edit default connection spark_default.

Root-cause

The root-cause is that "spark" is not listed in models.Connection._types. So when www/forms.py tries to produce the UI, "spark" is not available and it always tried to "fall back" to the option list whose first entry is "Docker" (this is why we see "Docker Registry" when we edit "spark_default").

In addition, we should hide irrelevant entries for spark connections ("schema", "login", and "password")

After Fix - Add Spark Connection

Airflow-3

After Fix - Edit Spark Connection

Airflow-4


Make sure to mark the boxes below before creating PR: [x]

  • Description above provides context of the change
  • Unit tests coverage for changes (not needed for documentation changes)
  • Target Github ISSUE in description if exists
  • Commits follow "How to write a good git commit message"
  • Relevant documentation is updated including usage instructions.
  • I will engage committers as explained in Contribution Workflow Example.

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.
Read the Pull Request Guidelines for more information.

@boring-cyborg boring-cyborg bot added the area:webserver Webserver related Issues label May 3, 2020
@XD-DENG XD-DENG added this to the Airflow 1.10.11 milestone May 3, 2020
@XD-DENG XD-DENG changed the title Fix Spark connection add/edit UI pages Fix Spark Conn Add/Edit Pages + Sort Connection Type Options May 3, 2020
Copy link
Member

@zhongjiajie zhongjiajie left a comment

Choose a reason for hiding this comment

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

Code looking good, but should we separate PR? Seem sorting and adding miss type unrelated.

@XD-DENG
Copy link
Member Author

XD-DENG commented May 3, 2020

Code looking good, but should we separate PR? Seem sorting and adding miss type unrelated.

@zhongjiajie two changes are both small so appended the 2nd change here. But I don't mind splitting them into two.

@XD-DENG XD-DENG changed the title Fix Spark Conn Add/Edit Pages + Sort Connection Type Options Fix Spark Conn Add/Edit Pages May 3, 2020
@XD-DENG
Copy link
Member Author

XD-DENG commented May 3, 2020

Hi @zhongjiajie , I have split the PR into two. The change to order connection types alphabetically is in PR #8692

The PR description, title, etc, of this PR are updated as well.

Let me know if everything looks good to you?

Copy link
Member

@zhongjiajie zhongjiajie left a comment

Choose a reason for hiding this comment

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

LGTM, waiting for Github action

@XD-DENG XD-DENG merged commit 0b598a2 into apache:master May 3, 2020
@XD-DENG XD-DENG deleted the fix/spark-connection branch May 3, 2020 18:19
kaxil pushed a commit that referenced this pull request Jun 22, 2020
connection add/edit UI pages were not working correctly for Spark connections.

The root-cause is that "spark" is not listed in models.Connection._types.
So when www/forms.py tries to produce the UI,
"spark" is not available and it always tried to "fall back" to the option list
whose first entry is "Docker"

In addition, we should hide irrelevant entries for
spark connections ("schema", "login", and "password")

(cherry picked from commit 0b598a2)
potiuk pushed a commit that referenced this pull request Jun 29, 2020
connection add/edit UI pages were not working correctly for Spark connections.

The root-cause is that "spark" is not listed in models.Connection._types.
So when www/forms.py tries to produce the UI,
"spark" is not available and it always tried to "fall back" to the option list
whose first entry is "Docker"

In addition, we should hide irrelevant entries for
spark connections ("schema", "login", and "password")

(cherry picked from commit 0b598a2)
kaxil pushed a commit that referenced this pull request Jul 1, 2020
connection add/edit UI pages were not working correctly for Spark connections.

The root-cause is that "spark" is not listed in models.Connection._types.
So when www/forms.py tries to produce the UI,
"spark" is not available and it always tried to "fall back" to the option list
whose first entry is "Docker"

In addition, we should hide irrelevant entries for
spark connections ("schema", "login", and "password")

(cherry picked from commit 0b598a2)
cfei18 pushed a commit to cfei18/incubator-airflow that referenced this pull request Mar 5, 2021
connection add/edit UI pages were not working correctly for Spark connections.

The root-cause is that "spark" is not listed in models.Connection._types.
So when www/forms.py tries to produce the UI,
"spark" is not available and it always tried to "fall back" to the option list
whose first entry is "Docker"

In addition, we should hide irrelevant entries for
spark connections ("schema", "login", and "password")

(cherry picked from commit 0b598a2)
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.

2 participants