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: implement abstract backend class #186

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

andrey-canon
Copy link
Collaborator

Description

Refactor that implements a backend abstract class, basivally this moves the handler error logic to a new method that could be overridden by any subclass

Testing instructions

Before

After

Additional information

Include anything else that will help reviewers and consumers understand the change.

  • Does this change depend on other changes elsewhere?
  • Any special concerns or limitations? For example: deprecations, migrations, security, or accessibility.
  • Link to other information about the change, such as Jira issues, GitHub issues, or Discourse discussions.

Checklist for Merge

  • Tested in a remote environment
  • Updated documentation
  • Rebased master/main
  • Squashed commits

@github-actions github-actions bot added the test label Jul 3, 2024
@johanseto johanseto self-assigned this Jul 3, 2024
@johanseto johanseto self-requested a review July 3, 2024 23:07
@github-actions github-actions bot added the size/m m lines label label Jul 3, 2024
class ErrorRealTimeImportHandler(AbstractBackend):
"""Class for managing validation error pipe executing the pipeline for data validation."""

def handle_error(self, exception, failed_step_pipeline):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this could be removed.
In this case is doing nothing... or maybe we're gonna manage the error in the error pipeline?

This PR is changing because in the past the error pipeline could fail and call again the error pipeline...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

nop, this is necessary since the parent class is an abstract class , so all methods defined as abstract methods have to be implemented in the subclasses

@johanseto johanseto self-requested a review July 4, 2024 17:39
Copy link
Collaborator

@johanseto johanseto left a comment

Choose a reason for hiding this comment

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

LGTM

@andrey-canon andrey-canon merged commit 6074879 into master Jul 4, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/m m lines label test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants