-
Notifications
You must be signed in to change notification settings - Fork 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
[24.0] Restore histories API behavior for keys
query parameter
#17779
Merged
mvdbeek
merged 24 commits into
galaxyproject:release_24.0
from
davelopez:24.0_restore_histories_API_behaviour_for_keys_query
Mar 20, 2024
Merged
Changes from 18 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
ba074bd
Preserve API behavior for "keys"
davelopez e2ad32d
Revert a7ea52841748437acfb172e11f513eed6f2fcceb
davelopez 947c6da
Do not force serialize model_class when it is Optional
davelopez c7f0fb0
Use `response_model_exclude_unset` whenever we return `AnyHistoryView`
davelopez 9f11c07
Add API test for show history views/keys
davelopez 1683dfb
Do not mix `await` and `then`
davelopez 6add6cc
Remove global Vue import
davelopez 671b522
Fix side effect when updating parts of a history
davelopez fbc2d9e
Add TODO doc for partial_model
davelopez 95fb8da
Remove config to allow all extra fields for history models
davelopez aba671c
Increase test coverage for API queries with view and keys
davelopez df2e202
Reorder union for proper model matching
davelopez f92f14e
Add missing optional fields to CustomHistoryView
davelopez 4f97f7e
Update client API schema
davelopez d5d26b3
Refactor move user-related types to api module
davelopez b0bccaf
Fix typo
davelopez 178d7b7
Refactor and reuse userOwnsHistory
davelopez 95eedff
Fix typing issue
davelopez 3085b6e
Add HistoryContentStateCounts
davelopez b7f3c66
Ensure `contents_active` return 0 instead of None
davelopez df60d8e
Replace deprecated model.dict with model.model_dump
davelopez 1d38546
Fix UpdateHistoryContentsBatchPayload model_config
davelopez 5aa5537
Fix model_config for UpdateHistoryContentsPayload
davelopez 7dd3f71
Remove unused HistoryBase model
davelopez 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
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.
How do you feel about adding a constant field in the model that indicates what view we're dealing with ?
The pro is that we don't need helper to figure out the actual type, the con is that we're serializing more than strictly necessary.
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.
That would simplify things yes, I like the idea, but I didn't consider it because it was changing the API response again 😆 but I can give it a try and see how we feel about it. Should I target this in a follow-up on
dev
for that change though? Or directly in this PR?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.
Let's target dev and mention it at the backend meeting ? We do have a related precedent in
model_class
which is only used for a similar purpose. Yet another alternative is that we include the model-type in the response header, which doesn't alter the response in the body but that would at least be more explicit than"contents_active" in history && "user_id" in history
, which feels like a contract we could easily break accidentally.