Skip to content

Conversation

@Taragolis
Copy link
Contributor

Follow up: Status of testing Providers that were prepared on September 28, 2022: Provider slack: 6.0.0rc1

During the test found different issues with connections created in the UI.


Case 1. Extra fields which use wtforms.IntegerField should have wtforms.validators.Optional validator

Timeout is optional field, however if try to save connection without specified value in this field that selected error happen

image

Fixed: Add validators [Optional(strip_whitespace=True), NumberRange(min=1)]


Case 2. Extra fields which use wtforms.StringField in Airflow 2.2 create empty value if user not specified anything

Airflow 2.2.0 and 2.2.5

id: slack_api. Host: , Port: None, Schema: , Login: , Password: ***, extra: {'extra__slack__base_url': '', 'extra__slack__proxy': '', 'extra__slack__timeout': None}

Airflow 2.3.0, 2.3.1, 2.3.4, 2.4.0

id: slack_api. Host: , Port: None, Schema: , Login: , Password: ***, extra: {'extra__slack__timeout': None}

Fixed: Ignore empty string and None values for prefixed extra


Case 3. Extra fields which use wtforms.IntegerField create None value if user not specified anything

See, Case 2


Case 4. In Airflow 2.2 if user specify anything in extra fields than test connection from the UI failed with bad request

Connections created in the UI work fine, only test connections won't work.

image

I don't think it is possible to do anything with this except:

  1. Do not use get_connection_form_widgets and user should specified in extra as a dictionary
  2. Additional logic which create different output for get_connection_form_widgets and get_ui_field_behaviour depend on Airflow version

@Taragolis
Copy link
Contributor Author

cc: @potiuk

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.

2 participants