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

[vdk-plugins] airflow-provider-vdk: Add hidden fields to VDK Connection #883

Merged
merged 1 commit into from Jun 29, 2022

Conversation

doks5
Copy link
Contributor

@doks5 doks5 commented Jun 29, 2022

In the Airflow UI, users can create new connections manually from the Admin section. When
done this way a web form is shown, where they can fill in host, port, username, password,
etc. needed to establish a new connection to third-party services.

The fields shown in the web form can be customised by overwriting the get_ui_field_behaviour()
method from the BaseHook. In the vdk airflow provider, we do some field relabeling to make
the user experience more consistent with our project.

This, however, caused some issues, as apperantly the dictionary where the changes to the connection
fields' behaviour is specified, needs to have a hidden_fields key/value pair.

This change introduces a hidden_fields key/value pair, and we use it to hide the schema field, which
is not really used by vdk.

Testing Done: Tested with local airflow instance and veryfied no errors in logs and correct web form
is shown to users.

Signed-off-by: Andon Andonov andonova@vmware.com

In the Airflow UI, users can create new connections manually from the Admin section. When
done this way a web form is shown, where they can fill in host, port, username, password,
etc. needed to establish a new connection to third-party services.

The fields shown in the web form can be customised by overwriting the `get_ui_field_behaviour()`
method from the **BaseHook**. In the vdk airflow provider, we do some field relabeling to make
the user experience more consistent with our project.

This, however, caused some issues, as apperantly the dictionary where the changes to the connection
fields' behaviour is specified, needs to have a `hidden_fields` key/value pair.

This change introduces a `hidden_fields` key/value pair, and we use it to hide the schema field, which
is not really used by vdk.

Testing Done: Tested with local airflow instance and veryfied no errors in logs and correct web form
is shown to users.

Signed-off-by: Andon Andonov <andonova@vmware.com>
@doks5
Copy link
Contributor Author

doks5 commented Jun 29, 2022

airflow_vdk_conn

@doks5 doks5 merged commit fdcd86f into main Jun 29, 2022
@doks5 doks5 deleted the person/andonova/airflow-ui branch June 29, 2022 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants