-
Notifications
You must be signed in to change notification settings - Fork 681
Include default_version by default
#10344
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
Conversation
a03882a to
ddfede2
Compare
| /** @return {Map<string, import("../models/version").default>} */ | ||
| @cached | ||
| get loadedVersionsByNum() { | ||
| let versionsRef = this.hasMany('versions'); | ||
| let values = versionsRef.value(); | ||
| return new Map(values?.map(ref => [ref.num, ref])); | ||
| } |
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 think versionsObj could also be changed to implement in this way. This would allow all versions that belong to this crate to be available, rather than just those loaded via the loadVersionsTask.
|
I have removed a commit that aimed to only await |
ddfede2 to
bfe8d72
Compare
|
Rebased to make CI happy after the new Danger Zone was added :D |
96786e2 to
433abe7
Compare
433abe7 to
59a975b
Compare
|
Rebased! |
|
also, sorry for keeping you waiting on this. I totally forgot about this PR 😞 |
901fc09 to
859959f
Compare
This commit would ensure that `default_version` is included in the `crate` response by default. This eliminates the need to wait for the `versions` request to complete when `default_version` is the only version required.
…ame}/{version}` endpoint
859959f to
37d2806
Compare
|
Conflict resolved! @Turbo87 Just a friendly ping in case you forgot about this PR. 😉 |
666588d to
1644694
Compare
Previously, we fetched all versions and then found the requested version within them. This commit changes the approach to either retrieve the version from loaded versions or fetch it from the endpoint. This change allows us to migrate to paginated versions in the future.
1644694 to
4d95228
Compare
Turbo87
left a comment
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.
LGTM now :)
I guess this is good to go?
Yes, I will file a follow-up PR tomorrow :) thanks for the review! |
This PR would ensure that
default_versionis included in thecrateresponse by default. This eliminates the need to wait for theversionsrequest to complete whendefault_versionis the only version required. This also decouples requested version handling from versions.Related:
default_versioninclude mode #10288