Skip to content

chore(azldev): move azldev to a proper go module tool#18052

Draft
dmcilvaney wants to merge 1 commit into
microsoft:4.0from
dmcilvaney:damcilva/4.0/pipelines/go_tool_azldev
Draft

chore(azldev): move azldev to a proper go module tool#18052
dmcilvaney wants to merge 1 commit into
microsoft:4.0from
dmcilvaney:damcilva/4.0/pipelines/go_tool_azldev

Conversation

@dmcilvaney

@dmcilvaney dmcilvaney commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Move azldev version management into a conventional nested Go module so Dependabot can update the direct azldev dependency. Dependabot does not yet support dependencies declared solely by Go tool directives.

  • Refactor version resolution to read tools/azldev/go.mod and resolve it to a validated immutable Git hash at the GitHub Actions, Docker, and ADO installation boundaries.
  • Retain .azldev-version temporarily for compatibility with the currently deployed trusted rendered-spec workflow.
  • After this merges, existing 4.0 PRs must rebase so their raw heads include tools/azldev/go.mod.
  • ADO runs are reviewer-gated; a target ADO run will validate the internal Go proxy path before merge.

Copilot AI review requested due to automatic review settings July 17, 2026 22:17

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

Moves azldev version management into Go modules and updates CI to resolve and validate immutable tool hashes.

Changes:

  • Adds the azldev Go tool dependency and supporting documentation.
  • Refactors GitHub and ADO workflows to resolve the post-merge azldev hash.
  • Adds resolver tests and dependency-smoke coverage.

Reviewed changes

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

Show a summary per file
File Description
go.mod Declares the azldev tool and dependencies.
go.sum Locks Go dependency checksums.
DEVELOPING.md Documents Go-based installation and usage.
.github/workflows/lint.yaml Runs azldev through go tool.
.github/workflows/dependency-smoke.yml Adds resolver test execution.
.github/workflows/azldev-smoke.yml Builds the runner from a resolved hash.
.github/workflows/check-rendered-specs.yml Resolves the post-merge tool and render scope.
.github/workflows/containers/azldev-runner.Dockerfile Installs azldev using an immutable hash.
.github/workflows/ado/templates/steps/install-deps.yml Resolves azldev from go.mod.
.github/workflows/ado/templates/steps/get-changes-info.yml Validates PR commit state before installation.
.github/instructions/pr-check-workflows.instructions.md Updates runner-build guidance.
scripts/ci/render-specs-check/resolve_azldev_version.py Implements secure version/hash resolution.
scripts/ci/render-specs-check/tests/conftest.py Configures resolver test imports.
scripts/ci/render-specs-check/tests/requirements.txt Pins pytest.
scripts/ci/render-specs-check/tests/test_resolve_azldev_version.py Tests resolver behavior and validation.

Comment thread scripts/ci/render-specs-check/resolve_azldev_version.py Outdated
Comment thread scripts/ci/render-specs-check/resolve_azldev_version.py Outdated
Comment thread go.mod Outdated
Copilot AI review requested due to automatic review settings July 17, 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 14 out of 15 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

go.mod:5

  • The stated Dependabot migration is incomplete: .github/dependabot.yml currently configures only pip and github-actions, so Dependabot will not scan this root Go module or propose azldev updates. Add a root gomod update entry (preferably scoped to github.com/microsoft/azure-linux-dev-tools) so this tool declaration is actually managed as intended.
tool github.com/microsoft/azure-linux-dev-tools/cmd/azldev

Copilot AI review requested due to automatic review settings July 18, 2026 01:52

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 15 out of 16 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

scripts/ci/render-specs-check/resolve_azldev_version.py:125

  • Resolving only the azldev module to a commit hash does not reproduce the tool selected by this repository's module graph. go tool azldev and the documented unversioned go install honor root go.mod transitive versions/replacements, while every Docker/ADO install uses go install ...@<hash>, which ignores root go.mod. Consequently, a Dependabot transitive update (explicitly enabled here) can change the developer/lint binary without changing this hash or setting render-all, so the render gates test a different binary. Build CI from a validated post-merge module graph, or restrict and validate the graph so only the top-level azldev pin can vary.
        module = json.loads(_run_go("mod", "download", "-json", f"{AZLDEV_MODULE}@{version}"))

Comment thread go.mod Outdated
Copilot AI review requested due to automatic review settings July 21, 2026 23:05
@dmcilvaney
dmcilvaney force-pushed the damcilva/4.0/pipelines/go_tool_azldev branch from 8bc90e3 to 48a6ef8 Compare July 21, 2026 23:05

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 12 out of 13 changed files in this pull request and generated 8 comments.

Comment thread scripts/ci/render-specs-check/resolve_azldev_version.py
Comment thread .github/workflows/ado/templates/steps/install-deps.yml
Comment thread scripts/ci/render-specs-check/resolve_azldev_version.py Outdated
Comment thread scripts/ci/render-specs-check/resolve_azldev_version.py Outdated
Comment thread tools/azldev/go.mod
Comment thread .github/workflows/check-rendered-specs.yml
Comment thread .github/workflows/azldev-smoke.yml
Comment thread .github/workflows/lint.yaml Outdated
Copilot AI review requested due to automatic review settings July 22, 2026 00:59
@dmcilvaney
dmcilvaney force-pushed the damcilva/4.0/pipelines/go_tool_azldev branch from 48a6ef8 to cc220c6 Compare July 22, 2026 00:59

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 12 out of 13 changed files in this pull request and generated no new comments.

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