-
Notifications
You must be signed in to change notification settings - Fork 2
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
due to deprecation of /api/instr-list in dispatcher, oda-api can't get list of instruments #189
Comments
I thought we made a redirect? We want if possible to make old versions compatible. |
I doesn't, there is a strict check for the response code 200. |
Indeed, both versions should work. |
|
That's weird, I definitely encountered problems with, but now I rechecked manually again everything is OK. |
I found the problem, which I actually encountered. Dispatcher redirects /api/instr-list to the absolute url, constructed using It's probably an unwanted behaviour of dispatcher, which add ties to the frontend configuration in the place where it should not exist. Please make issue if you agree |
Dispatcher needs to send full urls in emails, so it needs to know the frontend url. There is not necessarily a way for dispatcher to learn about this url (it might come in headers or might not). It would be best if the redirect did not depend on this though, I'd think relative url redicrect might even work. But there was some issue with that. If you want, give it a try. Also maybe it's good if @burnout87 comments, I forgot the details. |
In the code, in case the I encountered the second option within my development setup, more specifically when running the various tests, because in that case the So I am curios to know which value of |
It is set to my local front-end URL, which is on the other port of localhost. So if it runs, everything works. If not, it fails. |
With products_url = None, this problem doesn't appear, but I'm not completely sure, if it will not affect any frontend-unrelated functionality |
So an example could be: |
Yes. The example is My only point here is that this redirection should not depend on frontend by any means |
It would be best if the redirection works with relative path. I thought I would, but somehow it did not workout in this case, not sure, right @burnout87 ? If you want to propose, go ahead. Or maybe later if needed. |
Probably related thing I thought about: if we have several frontends, each requesting the same dispatcher, what is the proper value for |
Getting back to this. But then there is exception at https://github.com/oda-hub/dispatcher-app/blob/fe7aaf5fee8037050ba35c5a646b2c2278f88042/cdci_data_analysis/analysis/instrument.py#L473 trying to do None + string In general, hardcoding /dispatch-data subpath in the dispatcher code is not good. We can have it inside the |
Thanks for the detailed explanation.
At this point, I'd rather have the dispatch-data subpath in a dedicated config entry (eg My question would be, are there situations where we need the products_url config without the But yeah, then there is the added work to do replace every What do you think? |
No description provided.
The text was updated successfully, but these errors were encountered: