Skip to content

Fix SSL last run ID type#46

Open
jcsco wants to merge 1 commit into
v2from
agent/fix-ssl-last-run-id
Open

Fix SSL last run ID type#46
jcsco wants to merge 1 commit into
v2from
agent/fix-ssl-last-run-id

Conversation

@jcsco

@jcsco jcsco commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Related to splunk/terraform-provider-synthetics#94


Before the change?

  • SslCheckV2Response.Test.LastRunId was modeled as an int.
  • The Synthetics API returns lastRunId as a UUID string, so decoding an SSL check response could fail with cannot unmarshal string into Go struct field ...lastRunId of type int.

After the change?

  • Model SSL check lastRunId values as strings.
  • Exercise a UUID lastRunId through GetSslCheckV2 and assert that the response preserves it exactly.

Pull request checklist

  • Regression test updated and the complete v2 unit test suite run
  • Docs reviewed; no documentation changes are needed

Test Output

go test ./syntheticsclientv2/... -v -tags=unit_tests -timeout=30s -parallel=4 -cover

PASS
coverage: 73.5% of statements
ok github.com/splunk/syntheticsclient/v2/syntheticsclientv2 1.351s

Additional validation:

go vet -tags=unit_tests ./syntheticsclientv2/...

Does this introduce a breaking change?

  • Yes
  • No

This changes the type of the exported LastRunId field from int to string. Code that assigns or compares an integer directly will need to use the API's UUID string representation instead.


@jcsco jcsco self-assigned this Jul 8, 2026
@jcsco jcsco marked this pull request as ready for review July 8, 2026 16:07
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.

1 participant