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

[minor] Auspice dataset functionality: URL redirects don't update displayed metadata #1475

Open
jameshadfield opened this issue Jun 5, 2024 · 3 comments
Labels
t:bug Type: bug, error, something isn't working

Comments

@jameshadfield
Copy link
Member

Minor bug: https://nextstrain.org/flu/seasonal/vic/na/2y is a redirect (302) to https://nextstrain.org/seasonal-flu/vic/na/2y (we have quite a few redirects within nextstrain these days)

When using this as a dataset for within nextclade - https://clades.nextstrain.org/?dataset-json-url=https://nextstrain.org/flu/seasonal/vic/na/2y - the auspice dataset is correctly fetched (i.e. redirects are followed) but the shown metadata isn't updated:
image

@jameshadfield jameshadfield added t:bug Type: bug, error, something isn't working good first issue Good for newcomers help wanted Extra attention is needed needs triage Mark for review and label assignment labels Jun 5, 2024
@ivan-aksamentov
Copy link
Member

@jameshadfield Can you tell me a little bit more about what you mean by metadata? What's the expected result?

At first I thought it's about the .meta.extensions.nextclade.pathogen, but I don't see it in JSON, so it must be something else.

@ivan-aksamentov ivan-aksamentov removed good first issue Good for newcomers help wanted Extra attention is needed needs triage Mark for review and label assignment labels Jun 5, 2024
@ivan-aksamentov
Copy link
Member

ivan-aksamentov commented Jun 5, 2024

Perhaps you mean the URL? Then it just shows the original URL from the incoming URL param. Would it not be surprising if, as a user, you pass one thing and it shows you something else? I'd be confused.

In terms of implementation, I don't know how hard it would be to also get the final URL out of axios. It must be on a response object probably. But I have a few wrappers on top of it, so probably not very immediate to implement.

Does the final URL even matter to the user? :)

@jameshadfield
Copy link
Member Author

Perhaps you mean the URL? Then it just shows the original URL from the incoming URL param. Would it not be surprising if, as a user, you pass one thing and it shows you something else? I'd be confused.

Yeah I do (I shouldn't have used "metadata"). The best behaviour (IMO) would be to update the URL param to reflect the redirect which occurs behind the scenes, and also update the URL shown in the UI. But perfect is the enemy of good and I can appreciate this isn't a one-line change. Happy for "won't fix" - especially as such URLs would have to be manually constructed by users - but wanted to use this venue to surface it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t:bug Type: bug, error, something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants