Skip to content

Update to go-mssqldb 1.9.1 #591

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Conversation

shueybubbles
Copy link
Collaborator

Fixes #571
Fixes #587
Adds a --trace-file parameter to help debugging hard-to-repro scenarios

Copy link

@Copilot Copilot AI left a comment

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 upgrades the go-mssqldb dependency, introduces a new --trace-file flag for runtime tracing, and enhances Azure AD pipeline authentication support across tests and CI pipeline configs.

  • Bumps github.com/microsoft/go-mssqldb to v1.9.1 and updates related indirect dependencies.
  • Adds --trace-file CLI flag, with runtime/trace Start/Stop logic for collecting traces.
  • Adds ActiveDirectoryAzurePipelines support in both production code and test helper; updates Azure environment variables in pipelines.
  • Updates localization catalogs and JSON translation files with new trace-related messages.

Reviewed Changes

Copilot reviewed 21 out of 24 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
go.mod Bump go-mssqldb to v1.9.1, update x/text, x/term, Azure SDK deps
cmd/sqlcmd/sqlcmd.go Add --trace-file flag, trace.Start/Stop logic, extend auth flags
pkg/sqlcmd/commands_test.go Refactor Azure auth in tests (helper introduced)
internal/translations/catalog.go Map new trace messages to catalog indices
.pipelines/include-runtests-linux.yml Inject Azure subscription env vars (formatting updated)
Comments suppressed due to low confidence (3)

.pipelines/include-runtests-linux.yml:30

  • Extra space before the colon in the YAML key may break parsing. It should be AZURESUBSCRIPTION_CLIENT_ID: $(AZURESUBSCRIPTION_CLIENT_ID) without a space before the colon.
      AZURESUBSCRIPTION_CLIENT_ID : $(AZURESUBSCRIPTION_CLIENT_ID)

cmd/sqlcmd/sqlcmd.go:385

  • There are no unit tests covering the new --trace-file flag and its tracing behavior. Consider adding tests to validate trace file creation, error handling, and trace.Stop invocation.
	rootCmd.Flags().StringVar(&args.TraceFile, "trace-file", "", localizer.Sprintf("Write runtime trace to the specified file. Only for advanced debugging."))

pkg/sqlcmd/commands_test.go:279

  • The variable 's' is undefined here, causing a compile error. You likely intended to reference the existing connect object (e.g., 'c' or 'connect') instead.
		authenticationMethod = "-G " + s.Connect.AuthenticationMethod

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.

Support for workload identity authentication mode Process does not exit
3 participants