Skip to content

Fix missing ParentInstanceID when creating a sub-orchestration - #131

Closed
Jean Carlos Magalhães (jeanmartins) wants to merge 15 commits into
microsoft:mainfrom
jeanmartins:develop
Closed

Fix missing ParentInstanceID when creating a sub-orchestration#131
Jean Carlos Magalhães (jeanmartins) wants to merge 15 commits into
microsoft:mainfrom
jeanmartins:develop

Conversation

@jeanmartins

Copy link
Copy Markdown
Contributor

Issue: What is ParentInstanceID? #129

Test evidence:

image

@jeanmartins

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the SQLite and PostgreSQL backends so sub-orchestration instances persist their ParentInstanceID into the Instances table, aligning runtime behavior with the existing schema and the linked issue about missing parent tracking.

Changes:

  • Capture ExecutionStarted.ParentInstance.OrchestrationInstance.InstanceId during instance creation.
  • Include ParentInstanceID in the INSERT statements for both SQLite and PostgreSQL backends.
  • Apply small Go formatting cleanups in backend/postgres/postgres.go.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
backend/sqlite/sqlite.go Persists ParentInstanceID when inserting orchestration instances in SQLite.
backend/postgres/postgres.go Persists ParentInstanceID when inserting orchestration instances in PostgreSQL and includes minor formatting cleanup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/sqlite/sqlite.go
Comment thread backend/postgres/postgres.go
@cgillum

Copy link
Copy Markdown
Member

Jean Carlos Magalhães (@jeanmartins) Thanks for this PR! The changes look good to me, and I've approved the CI to run. I agree with Copilot that it would be good to have a test or two that validates the behavior, if you don't mind.

JeanCarlos_MartinsDa and others added 2 commits May 4, 2026 19:59
Copilot AI review requested due to automatic review settings May 4, 2026 23:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread api/orchestration.go
Comment thread api/orchestration.go Outdated
Comment thread tests/metadata_test.go Outdated
Copilot AI review requested due to automatic review settings May 4, 2026 23:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/sqlite/sqlite.go Outdated
Comment thread backend/postgres/postgres.go Outdated
Comment thread api/orchestration.go
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 4, 2026 23:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread api/orchestration.go
Comment thread backend/postgres/postgres.go
Comment thread tests/backend_test.go
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 5, 2026 00:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/sqlite/sqlite.go
Comment thread backend/postgres/postgres.go
Comment thread backend/sqlite/sqlite.go
Comment thread api/orchestration.go
Copilot AI review requested due to automatic review settings May 5, 2026 03:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/protos/orchestrator_service.pb.go Outdated
Comment thread api/orchestration.go
Comment thread client/client_grpc.go
@jeanmartins

Copy link
Copy Markdown
Contributor Author

Hi Chris Gillum (@cgillum) , I added tests and also few changes to bring parent instance id in OrchestrationMetada, can you check please?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread vendored/durabletask-protobuf/protos/orchestrator_service.proto Outdated
Comment thread backend/executor.go

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 10 changed files in this pull request and generated no new comments.

@jeanmartins

Copy link
Copy Markdown
Contributor Author

Hi Chris Gillum (@cgillum) , I think everything look good now, could you review the changes please? Thanks!

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.

3 participants