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

Mscolab refactor2 #2533

Merged
merged 2 commits into from
Sep 30, 2024
Merged

Mscolab refactor2 #2533

merged 2 commits into from
Sep 30, 2024

Conversation

joernu76
Copy link
Member

@joernu76 joernu76 commented Sep 18, 2024

Purpose of PR?:

Handle communication with server in a more consistent manner.

Does this PR introduce a breaking change?

No

@joernu76 joernu76 force-pushed the mscolab_refactor2 branch 3 times, most recently from 76bd423 to 8905a00 Compare September 19, 2024 08:01
@joernu76 joernu76 marked this pull request as ready for review September 19, 2024 11:33
* Move (most) communication with server to ConnectionManager class to have
  consistent calls and error handling (e.g. timeout).
* More consistently use json() method of response.
* Removed single letter variables.
if r.status_code == 401:
raise requests.exceptions.ConnectionError
response = session.post(url, data=data, timeout=tuple(config_loader(dataset="MSCOLAB_timeout")))
response.raise_for_status()
Copy link
Member

@ReimarBauer ReimarBauer Sep 26, 2024

Choose a reason for hiding this comment

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

I am not sure what happens on e.g. 403 now.

The 401 in the past was used to get into the http_auth, which already is changed too.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

I mean we only raised explicity on 401 raise requests.exceptions.ConnectionError
I have not found where it was used and got changed there now too

Copy link
Member Author

Choose a reason for hiding this comment

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

The next envisioned change goes deeper in this direction, but I wanted to keep it "small".

Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

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

I looked up the changes against some existing servers and have not found a problem.

Anyway a few comments added, please have a look

update copyright string
Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

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

looks good, also mscolab tutorial suceeds

@joernu76 joernu76 merged commit 54854e1 into develop Sep 30, 2024
8 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants