-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Use set instead of list for dags' tags #41695
Open
Avihais12344
wants to merge
29
commits into
apache:main
Choose a base branch
from
Avihais12344:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 23 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
3881820
Started working on dag tags, moved the tags to set, and added atest t…
Avihais12344 079ebb2
Fixed more areas of the c'tor.
Avihais12344 cfaa915
Fixed test of dag tags.
Avihais12344 c4534de
Added a check to see if the tags are mutable.
Avihais12344 a03c055
Added newsfragment.
Avihais12344 b31dcca
Removed unecessary check.
Avihais12344 bd24f30
Merge remote-tracking branch 'upstream/main'
Avihais12344 a20eeb7
Removed str specification at the type, for compatability with python …
Avihais12344 c5c2e02
Removed more type specification as part of compatability with python 3.8
Avihais12344 49c7743
Fixed the newsfragment.
Avihais12344 8a611d2
Added missing word.
Avihais12344 9432103
Used `` for code segemnts at the rst file.
Avihais12344 659d75b
Reformatted the file.
Avihais12344 816d73e
Fixed wrong method for adding tag.
Avihais12344 1e8af76
Added type hinting at the dag bag.
Avihais12344 ce824cb
Deserialized the tags to set.
Avihais12344 40605cd
Adjusted the tests for the set type.
Avihais12344 557ced7
Added type hinting.
Avihais12344 41e5112
Sorting the tags by name.
Avihais12344 035e50a
Merge branch 'main' of github.com:Avihais12344/airflow
Avihais12344 6a433ef
Changed to typing.
Avihais12344 669ede1
Update newsfragments/41420.significant.rst
Avihais12344 fd652b3
Update newsfragments/41420.significant.rst
Avihais12344 08a5689
Removed the generic specification at the dag args expected types, as …
Avihais12344 eb20c7b
Added tags to the expected serialized DAG.
Avihais12344 d43f204
Added sorting the tags keys by the name key.
Avihais12344 64dcb34
Merge remote-tracking branch 'upstream/main'
Avihais12344 bae6471
Fixed sorting tags by name to use `sorted` instead of `.sort`
Avihais12344 18773a7
Fixed tags comparesion, as it's now a set, and not a list.
Avihais12344 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
**Breaking Change** | ||
|
||
Replaced Python's ``list`` with ``MutableSet`` for the property ``DAG.tags``. | ||
|
||
At the constractur you still can use list, | ||
you actually can use any data structure that implements the | ||
``Collection`` interface. | ||
|
||
The ``tags`` property of the ``DAG`` model would be of type | ||
``MutableSet`` instead of ``list``, | ||
as there are no actual duplicates at the tags. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to support this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I want to check behaviour, if we change the behaviour, we should know about it.
For example, changing the implementation of the tags from
set
tolist
would break this change, and we would know about it.That's why I think we should have this test, but let's keep the conversation here, as we talk about the same thing.