Skip to content

proof of concept for a standalone Go module and workspace - #763

Draft
hdwhdw wants to merge 6 commits into
sonic-net:masterfrom
hdwhdw:poc/go-work-module-graph
Draft

hdwhdw wants to merge 6 commits into
sonic-net:masterfrom
hdwhdw:poc/go-work-module-graph

Conversation

@hdwhdw

@hdwhdw hdwhdw commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Status: Paused since 2026-08-24.

The roadmap prioritizes gradual pure-package expansion through internal adapters and provider selection with //go:build constraints.

The evidence below supports future roadmap decisions about the standalone Go module and workspace approach.

Verification is incomplete because the most recent CI run was canceled after the roadmap priorities changed.

Proven behavior

  • a fresh sonic-gnmi clone resolves a fetchable MGMT pseudo-version for basic Go module commands
  • pure-package CI passes without a sibling MGMT checkout
  • integrated CI selects generated MGMT through a temporary workspace
  • module and workspace vendoring can share the existing patch sequence through VENDOR_DIR

Remaining limits

Tracking: Azure DevOps work item 39361136.

Create an ephemeral Go workspace after the standard sonic-mgmt-common build. Verify that the combined module graph resolves sonic-mgmt-common to the exact checkout used by the existing integration build.

Keep the current vendor generation, patch application, build, and test flow unchanged. Log the exact sonic-mgmt-common commit and any normal tracked-file normalization from its build.

ADO: 39361136
Signed-off-by: Dawei Huang <daweihuang@microsoft.com>
@mssonicbld

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

hdwhdw added 3 commits August 23, 2026 00:27
…lone

Signed-off-by: Dawei Huang <daweihuang@microsoft.com>
This reverts commit 13c65db.

Signed-off-by: Dawei Huang <daweihuang@microsoft.com>
Use a fetchable sonic-mgmt-common module for standalone Go commands. Keep patched vendoring compatible with an explicitly selected Go workspace owned by an integrating repository.\n\nADO: 39361136

Signed-off-by: Dawei Huang <daweihuang@microsoft.com>
@mssonicbld

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Create temporary workspaces only in integrated CI after MGMT generation. Keep the pure job on the standalone module and correct its checkout-relative paths.\n\nADO: 39361136

Signed-off-by: Dawei Huang <daweihuang@microsoft.com>
@mssonicbld

Copy link
Copy Markdown
Contributor

/azp run

@hdwhdw hdwhdw changed the title ci: prove go.work module resolution in integration tests build: support standalone modules and integrated Go workspaces Aug 24, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Use VENDOR_DIR for the remaining client patches so module and workspace vendoring share the same patch sequence.\n\nADO: 39361136

Signed-off-by: Dawei Huang <daweihuang@microsoft.com>
@mssonicbld

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@hdwhdw hdwhdw changed the title build: support standalone modules and integrated Go workspaces proof of concept for a standalone Go module and workspace Aug 24, 2026
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