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

refactor(connection): call specific error response codes (DEV-3339) #832

Merged
merged 12 commits into from Feb 29, 2024

Conversation

jnussbaum
Copy link
Collaborator

No description provided.

@jnussbaum jnussbaum self-assigned this Feb 26, 2024
@jnussbaum jnussbaum changed the title fix: no retry on DuplicateValueException fix: no retry on DuplicateValueException (DEV-3339) Feb 27, 2024
Copy link

linear bot commented Feb 27, 2024

src/dsp_tools/utils/connection_live.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@Nora-Olivia-Ammann Nora-Olivia-Ammann left a comment

Choose a reason for hiding this comment

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

What I am most unhappy with, is that the error handling that lives in the connection object is too specific for such a generic class.
In my opinion what could work is that we do

  • a network action without
  • the first types of responses are generic as they can happen with any input, for these responses we have the loop automatically
  • the second types of error handling are specific depending on when the function is used (xmlupload, create, etc.)
  • There we work out the problem
  • communicate that
  • if it is an error that we want to retry, we enter a function that executes the loop (for simplicity's sake no matter what type of response it gets, it will retry the set amount of times.
  • if we don't want to retry we continue

Do you think something like that is feasible?

@Nora-Olivia-Ammann Nora-Olivia-Ammann changed the title fix: no retry on DuplicateValueException (DEV-3339) refactor(ConnectionLive): call specific error response codes (DEV-3339) Feb 27, 2024
@Nora-Olivia-Ammann Nora-Olivia-Ammann changed the title refactor(ConnectionLive): call specific error response codes (DEV-3339) refactor(connection): call specific error response codes (DEV-3339) Feb 27, 2024
Copy link
Collaborator

@BalduinLandolt BalduinLandolt left a comment

Choose a reason for hiding this comment

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

LGTM

src/dsp_tools/utils/connection_live.py Outdated Show resolved Hide resolved
@Nora-Olivia-Ammann
Copy link
Collaborator

@jnussbaum I was not able to request a review from you, probably because you opened the PR, but I would be glad for your input.

@jnussbaum
Copy link
Collaborator Author

@jnussbaum I was not able to request a review from you, probably because you opened the PR, but I would be glad for your input.

@nora: LGTM

@Nora-Olivia-Ammann Nora-Olivia-Ammann merged commit d8531bd into main Feb 29, 2024
9 checks passed
@Nora-Olivia-Ammann Nora-Olivia-Ammann deleted the wip/no-retry-on-DuplicateValueException branch February 29, 2024 07:04
@daschbot daschbot mentioned this pull request Feb 29, 2024
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.

None yet

3 participants