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

feat(ingest): add more fail-safes to stateful ingestion #8111

Merged
merged 3 commits into from
Jun 1, 2023

Conversation

hsheth2
Copy link
Collaborator

@hsheth2 hsheth2 commented May 23, 2023

Stacked on top of the changes in #8104. Review that PR first.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added ingestion PR or Issue related to the ingestion of metadata smoke_test Contains changes related to smoke tests labels May 23, 2023
@hsheth2 hsheth2 requested a review from asikowitz May 23, 2023 19:23
Stacked on top of the changes in datahub-project#8104. Review that PR first.
Copy link
Collaborator

@asikowitz asikowitz left a comment

Choose a reason for hiding this comment

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

One question but lgtm

self.job_id, self.state_type_class
)
if not last_checkpoint:
return
cur_checkpoint = self.state_provider.get_current_checkpoint(self.job_id)
assert cur_checkpoint is not None
# Get the underlying states
last_checkpoint_state = cast(GenericCheckpointState, last_checkpoint.state)
last_checkpoint_state: GenericCheckpointState = last_checkpoint.state
cur_checkpoint_state = cast(GenericCheckpointState, cur_checkpoint.state)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you remove the cast here too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

nope - get_current_checkpoint doesn't infer types in the same way


# If the source already had a failure, skip soft-deletion.
# TODO: Eventually, switch this to check if anything in the pipeline had a failure so far.
if self.source.get_report().failures:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this take into account the commit_policy? Or for stale entity removal the rule is just commit iff there are no failures

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the latter

in the commit policy rules should be tied to each stateful ingestion handler

Copy link
Collaborator

Choose a reason for hiding this comment

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

Does that mean we're dropping support for a configurable commit policy? Right now it seems like it doesn't really do anything

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

eventually yes I'd like to drop support for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ingestion PR or Issue related to the ingestion of metadata smoke_test Contains changes related to smoke tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants