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

FIX: switching to https for sdss to avoid query issues #2654

Merged
merged 1 commit into from
Feb 3, 2023

Conversation

bsipocz
Copy link
Member

@bsipocz bsipocz commented Feb 1, 2023

To fix #2644

Thanks @weaverba137 for the suggestion, this does the trick.

@bsipocz bsipocz added this to the v0.4.7 milestone Feb 1, 2023
@bsipocz
Copy link
Member Author

bsipocz commented Feb 1, 2023

Before merging, we need to make sure to pay a bit closer attention on the test coverage for older DRs, and whether everything keeps working for those.

@codecov
Copy link

codecov bot commented Feb 1, 2023

Codecov Report

Merging #2654 (315c83f) into main (8b24c19) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #2654   +/-   ##
=======================================
  Coverage   68.94%   68.94%           
=======================================
  Files         304      304           
  Lines       22621    22621           
=======================================
  Hits        15596    15596           
  Misses       7025     7025           
Impacted Files Coverage Δ
astroquery/sdss/__init__.py 100.00% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@weaverba137
Copy link
Member

The changes look good, but here's some follow up from the SDSS data team that might be worth thinking about.

The load balancers are setup with a standard 301 redirect to https when clients connect using http. However, most http clients see 301 redirects and ( surprisingly ) drop the body, headers, and arguments of the original request ( and sometimes change their HTTP method ). This is why when you queried over http, you were getting a non-existent key stack trace: your original arguments were not being forwarded to a server after a 301 redirect.

Clearly if the query still works, then the payload is not being dropped, but it might even be worth testing both http and https separately to be absolutely sure. Maybe for only a few releases, so it doesn't add a huge number of tests.

@bsipocz
Copy link
Member Author

bsipocz commented Feb 1, 2023

This is eyeopening, thanks for sharing their response.

Clearly if the query still works, then the payload is not being dropped, but it might even be worth testing both http and https separately to be absolutely sure. Maybe for only a few releases, so it doesn't add a huge number of tests.

if we change the default url for https, then I think we'll be good without testing http behaviour. If a user changes the default, they are on their own to make sure that request actually works and makes sense 🤷‍♀️

Copy link
Member

@pllim pllim left a comment

Choose a reason for hiding this comment

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

Makes sense. Thanks!

@bsipocz bsipocz merged commit 36b2a4e into astropy:main Feb 3, 2023
@pllim
Copy link
Member

pllim commented Feb 3, 2023

Thanks! Any plans to push a pre-release out to PyPI?

@bsipocz
Copy link
Member Author

bsipocz commented Feb 3, 2023

Sure, I'll merge a few more things and push one at the end of the day.

@bsipocz bsipocz mentioned this pull request Feb 3, 2023
19 tasks
@pllim
Copy link
Member

pllim commented Feb 7, 2023

I can confirm that the error went away downstream. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: SDSS KeyNotFoundException for query_region
3 participants