Closed yarikoptic closed 4 years ago
i responded in @jwodder post.
to me this is a dandi policy at this point and implemented by two clients (the GUI and the CLI).
i think from an execution perspective this should be currently done by the CLI currently and then in the future by the API. the redirector shouldn't be taking that decision for every link that passes through it, even though it can, for efficiency reasons at the moment.
CLI doesn't implement this. Moreover it is change in behavior in redirector from what I see (although didn't analyze in detail)... As commented on that original PR I would strongly prefer to centralize this logic in redirector. But if you stay firm on this decision, let us know and we will do it in CLI.
i will send a PR soon, but i still think this should be in the API.
Yes! Everything like this should be via API at some point! ATM this logic isn't provided by API AFAIK!
And as I stated before - I don't like "if" part if the logic. Ideally we should agree on a more consistent behavior (eg always a draft when version is not specified, like what git does pretty much). Jumping from drafts into released version is IMHO suboptimal and might be confusing. So I expect change to come, that is why trying to avoid dealing with it in the client
@mgrauer and @yarikoptic - this may not be the right thread to this but close enough.
if we change the word draft
to current
, it can always point to the latest state of the dataset. not persistent, but latest. persistent states would be versions. it would also fit nicely with the ui upgrades that have happened.
and then the idea that a dataset level identifier always takes you to current, and version specific ones take you to persistent states of the data.
Tomato tomato to me. Both have vague semantic... At least none are master it slave so we would not need to rename them.
But if by default we forward to the draft (or current), we would still need another magical word like released. That is why I in general preferred to forward to the most recent release and require draft explicitly, and otherwise blow with an informative message
we can say current
, latestrelease
, specific version
. but for the moment i'll simply redirect to draft, that page should always still show releases.
https://dandiarchive.org/dandiset/000003 is currently an HTTP redirect to https://gui.dandiarchive.org/#/dandiset/000003, which then appears to perform a JavaScript redirect to the same URL with
/draft
added to the end.Originally posted by @jwodder in https://github.com/dandi/dandi-cli/issues/199#issuecomment-674170415
@Satra I think redirector should be the one making full decision what to redirect to for unspecified version. An I wrong?