Fix Slack Connections created in the UI #26845
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.IntegerFieldshould havewtforms.validators.OptionalvalidatorTimeout is optional field, however if try to save connection without specified value in this field that selected error happen
Fixed: Add validators
[Optional(strip_whitespace=True), NumberRange(min=1)]Case 2. Extra fields which use
wtforms.StringFieldin Airflow 2.2 create empty value if user not specified anythingAirflow 2.2.0 and 2.2.5
Airflow 2.3.0, 2.3.1, 2.3.4, 2.4.0
Fixed: Ignore empty string and None values for prefixed extra
Case 3. Extra fields which use
wtforms.IntegerFieldcreate None value if user not specified anythingSee, 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.
I don't think it is possible to do anything with this except:
get_connection_form_widgetsand user should specified in extra as a dictionaryget_connection_form_widgetsandget_ui_field_behaviourdepend on Airflow version