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

Make diffgraph applier return number of transitive changes #256

Merged
merged 7 commits into from
Sep 16, 2024

Conversation

bbrehm
Copy link
Contributor

@bbrehm bbrehm commented Sep 16, 2024

With this, the diffgraph applier again counts the number of transitive modifications in the graph, in order to restore the logging.

Furthermore this restores the correct order of nodes that are transitively added -- we need to drainDeferred after every single update, not just at the end. This behavior was a little subtle and was missing both tests and a comment explaining it, so it got lost in a refactor (cf git blame). Now it's protected by both source-code comment and unit test.

@bbrehm bbrehm requested a review from mpollmeier September 16, 2024 14:33
@@ -12,7 +12,7 @@ object DiffGraphApplier {
graph: Graph,
diff: DiffGraphBuilder,
schemaViolationReporter: SchemaViolationReporter = new SchemaViolationReporter
): Unit = {
): Int = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Our future selves are demanding to add some comments like /** returns the number of modifications that were successfully applied to the graph */ to methods like this, which only return an Int that could mean anything or nothing.

@bbrehm bbrehm merged commit 1c6bf43 into master Sep 16, 2024
1 check 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