-
Notifications
You must be signed in to change notification settings - Fork 1
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: remove parent task key #112
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
b22c252
refactor: remove parent_task_key from ComputeTask
guilhem-barthes 65eff8e
refactor: remove view expanded_compute_tasks
guilhem-barthes cb7bdce
docs: add changelog
guilhem-barthes 3ed665e
fix: Remove parent_task_keys from events
guilhem-barthes f69c4d3
fix: Typo in migration 52
guilhem-barthes 4b90948
fix: Typo in migration 52
guilhem-barthes 35f8a05
fix: drop condition in migration 52
guilhem-barthes 5c0e911
fix: revert changes in chaincode/ledger/dbal_computetask.go
guilhem-barthes ae3082c
refactor: parent task index creation in ledger
guilhem-barthes daa912e
fix: replace parent_task_keys by parentTaskKeys
guilhem-barthes e18a3b7
feat: add a function to find children
guilhem-barthes bcd7c6c
fix: fix typo
guilhem-barthes 21577cf
docs: update changelog
guilhem-barthes a71b042
fix(tests): add GetComputerTaskParents mock
guilhem-barthes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,17 +183,12 @@ func (s *ComputeTaskService) propagateDone(triggeringParent, child *asset.Comput | |
return nil | ||
} | ||
|
||
// loop over parent, only change status if all parents are DONE | ||
for _, parentKey := range child.ParentTaskKeys { | ||
if parentKey == triggeringParent.Key { | ||
// We already know this one is DONE | ||
continue | ||
} | ||
parent, err := s.GetComputeTaskDBAL().GetComputeTask(parentKey) | ||
if err != nil { | ||
return err | ||
} | ||
parents, err := s.GetComputeTaskDBAL().GetComputeTaskParents(child.Key) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
for _, parent := range parents { | ||
if parent.Status != asset.ComputeTaskStatus_STATUS_DONE { | ||
logger.Debug(). | ||
Str("parent", parent.Key). | ||
|
@@ -204,7 +199,7 @@ func (s *ComputeTaskService) propagateDone(triggeringParent, child *asset.Comput | |
return nil | ||
} | ||
} | ||
err := s.applyTaskAction(child, transitionTodo, fmt.Sprintf("Last parent task %s done", triggeringParent.Key)) | ||
err = s.applyTaskAction(child, transitionTodo, fmt.Sprintf("Last parent task %s done", triggeringParent.Key)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For my info: why remove the ":" here ? |
||
if err != nil { | ||
return err | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just put #112, github does the link to the PR automatically :)