-
Notifications
You must be signed in to change notification settings - Fork 594
Community Health: Obsolete resources and corresponding entities #3965
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
Merged
mathjazz
merged 22 commits into
mozilla:main
from
functionzz:obsolete_resources_over_deletion
May 5, 2026
Merged
Changes from 19 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
1102ff5
obsolete resources and corresponding entities
functionzz efacbf2
fix tests
functionzz 0de52d5
Update pontoon/base/models/entity.py
functionzz c36236f
add .current to TranslatedResourceQueryset + ResourceQueryset
functionzz 7e072dd
remove useless .current() calls + rename obsolete() to mark_as_obsole…
functionzz 62971b2
run make format
functionzz 79a85a5
add tests for contributor data + translate link
functionzz 1a52cd7
switch kl to tlh
functionzz 0321a49
remove EntityQueryset.obsolete, replace with inline .update
functionzz 4bbcca6
revert .po change
functionzz 18cfadc
Update pontoon/base/tests/managers/test_user.py
functionzz 7930f41
Update pontoon/sync/tests/test_entities.py
functionzz 31906de
run make format
functionzz 6bdbf6d
add TranslatedResource checks in test
functionzz 39d460d
add obsoletion filter for stats_data
functionzz 72668e1
obsolete entity cannot be translated
functionzz 00cc4c6
de-obsolete Resource, delete TranslatedResources upon Resource obsole…
functionzz 5999176
remove TranslatedResource.objects.current()
functionzz bdc4e7c
update resource de-obsoletion
functionzz 2c28b0d
refactor entities.py, include de-obsoletion logic in update_resources()
functionzz b20a371
Squash with main
functionzz b94fdc4
Merge branch 'main' into obsolete_resources_over_deletion
functionzz 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
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.
Why is this work happening here in
add_resources(), and not inupdate_resources()? That seems like a better place where to update resources.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.
I've thought about that, and the reason is while the above code snippet is definitely an update, the
add_resourcesfunction needs to be responsible in detecting resources that exist that are added back in (i.e de-obsoletion). If I put the de-obsoletion logic inupdate_resources(), I would need to duplicate thevalid_updateslogic intoadd_resources()anyway to filter out the de-obsoleted resources.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.
If the de-obsoletion happens in
update_resources(), won't the de-obsoleted resources be included inchanged_paths? I still don't see why any of the code inadd_resources()needs to change.