Skip to content
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

Sort the assets by creation time in the version endpoint, just like /assets #597

Merged
merged 2 commits into from
Oct 24, 2024

Conversation

danscales
Copy link
Collaborator

Sort the assets by creation time in the version endpoint, just like the /assets endpoint

We made the asset list in the GET version endpoint more useful recently by including the asset-id. But that list is not being sorted by creation time, unlike the list provided by /assets, so the assets are somewhat randomly ordered.

So, add the change to sort the asset list of the GET version endpoint by creation time. This ensures that the default asset is always first, etc. (same as the ordering in _build_filtered_query)

…assets

We made the asset list in the GET version endpoint more useful recently
by including the asset-id. But that list is not being sorted by creation
time, unlike the list provided by /assets, so the assets are somewhat
randomly ordered.

So, add the change to sort the asset list of the GET version endpoint by
creation time. This ensures that the default asset is always first, etc.
Copy link
Member

@dmannarino dmannarino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@gtempus
Copy link
Contributor

gtempus commented Oct 24, 2024

We don't know if this will break anyone, though, right? I'm not opposed to the change, but can we add an explanation of the order_by behavior in the docs, @danscales?

Updating doc based on good comment from Gary.
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.18%. Comparing base (8157344) to head (674ca77).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #597   +/-   ##
========================================
  Coverage    81.18%   81.18%           
========================================
  Files          129      129           
  Lines         5842     5842           
========================================
  Hits          4743     4743           
  Misses        1099     1099           
Flag Coverage Δ
unittests 81.18% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@danscales
Copy link
Collaborator Author

We don't know if this will break anyone, though, right? I'm not opposed to the change, but can we add an explanation of the order_by behavior in the docs, @danscales?

OK, added a comment for the docs for both the "Get Version" and "Get Version Assets" endpoints. Thanks for the suggestion!

@danscales danscales merged commit 50c4642 into develop Oct 24, 2024
2 checks passed
@danscales danscales deleted the sort_version_assets branch October 24, 2024 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants