Skip to content

Conversation

@ashb
Copy link
Member

@ashb ashb commented Sep 14, 2022

Previously we had the validation on the Dataset model, but we since moved the "dag" facing class to a separate one. This adds validation to the public class, and extends the validation to not allow space-only strings

Closes #26380

@ashb ashb added this to the Airflow 2.4.0 milestone Sep 14, 2022
@norm
Copy link
Contributor

norm commented Sep 14, 2022

Might be worth retiring tests/models/test_dataset.py as part of this?

@ashb
Copy link
Member Author

ashb commented Sep 14, 2022

Might be worth retiring tests/models/test_dataset.py as part of this?

I considered that, but we do still have validation on the model -- should we keep that or not?

@ashb
Copy link
Member Author

ashb commented Sep 14, 2022

Oh, those are testing the public dataset class (after the refactor the test got changed, but not the location), not the model. Yeah I'll remove those tests!

@ashb ashb added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Sep 14, 2022
@ashb ashb force-pushed the uri-length-check branch 3 times, most recently from ce9e374 to 5038bf4 Compare September 14, 2022 13:05
@ashb
Copy link
Member Author

ashb commented Sep 14, 2022

Fail Ash. (New dev env, don't have pre-commit set up there yet)

Previously we had the validation on the Dataset model, but we since
moved the "dag" facing class to a separate one. This adds validation to
the public class, and extends the validation to not allow space-only
strings
@kaxil
Copy link
Member

kaxil commented Sep 14, 2022

The failure is due to #26382 I think -- where we forgot to add it to rat_exclude?

@jedcunningham
Copy link
Member

The failure is due to #26382 I think -- where we forgot to add it to rat_exclude?

Yep, unrelated to this one.

@ashb
Copy link
Member Author

ashb commented Sep 14, 2022

Failure is on main, merging.

@ashb
Copy link
Member Author

ashb commented Sep 14, 2022

#26396 to fix main.

@ashb ashb merged commit bd181da into apache:main Sep 14, 2022
@ashb ashb deleted the uri-length-check branch September 14, 2022 16:11
jedcunningham pushed a commit that referenced this pull request Sep 15, 2022
Previously we had the validation on the Dataset model, but we since
moved the "dag" facing class to a separate one. This adds validation to
the public class, and extends the validation to not allow space-only
strings

(cherry picked from commit bd181da)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI doesn't handle whitespace/empty dataset URI's well

4 participants