Skip to content
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

bump up the troubleshoot version to v0.72.x #4031

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

arcolife
Copy link
Contributor

@arcolife arcolife commented Sep 7, 2023

What this PR does / why we need it:

bump up the troubleshoot version to v0.71.1

Which issue(s) this PR fixes:

Fixes SC-87575

Special notes for your reviewer:

  • Follow-up from bump up the troubleshoot version to v0.71.1 #4029
  • Turns out, for tests to kick in, a PR should be raised from a feature branch in upstream rather than the fork.
    (🙇🏼‍♂️ @cbodonnell for the hint!).
  • Visual smoke tests on okteto went well (uploading a license to admin portal and running analysers).

Steps to reproduce

Does this PR introduce a user-facing change?

NONE

Does this PR require documentation?

NONE

cbodonnell
cbodonnell previously approved these changes Sep 7, 2023
adamancini
adamancini previously approved these changes Sep 7, 2023
@xavpaice
Copy link
Member

Currently blocked by replicatedhq/troubleshoot#1331, we'll need to integrate the version that has the fix

@arcolife arcolife dismissed stale reviews from adamancini and cbodonnell via 234a235 September 14, 2023 14:13
@arcolife arcolife changed the title bump up the troubleshoot version to v0.71.1 bump up the troubleshoot version to v0.72 Sep 15, 2023
@arcolife arcolife changed the title bump up the troubleshoot version to v0.72 bump up the troubleshoot version to v0.72.x Sep 15, 2023
go.mod Outdated Show resolved Hide resolved
@arcolife
Copy link
Contributor Author

arcolife commented Sep 15, 2023

go: finding module for package github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud
go: github.com/replicatedhq/kots/pkg/kotsutil imports
        github.com/replicatedhq/troubleshoot/pkg/collect imports
        github.com/microsoft/go-mssqldb tested by
...
        github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud: module github.com/Azure/azure-sdk-for-go/sdk/azcore@latest found (v1.7.2, replaced by github.com/Azure/azure-sdk-for-go/sdk/azcore@v0.21.1), but does not contain package github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud

Here on, if you try to solve for tidy, it works out eventually, by commenting out

+       // github.com/Azure/azure-sdk-for-go/sdk/azcore => github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1
+       // github.com/Azure/azure-sdk-for-go/sdk/internal => github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3

but then make test fails:

# github.com/Azure/azure-sdk-for-go/sdk/storage/azblob
../../../../go/pkg/mod/github.com/!azure/azure-sdk-for-go/sdk/storage/azblob@v0.3.0/zc_blob_lease_client.go:25:16: undefined: to.StringPtr
...
go/sdk/storage/azblob@v0.3.0/zc_shared_policy_shared_key_credential.go:190:17: undefined: log.EventResponse

so now we're dealing with azure's storage/azblob which when I try for its latest release bump, cracks:

github.com/vmware-tanzu/velero/pkg/util/logging
../../../../go/pkg/mod/github.com/vmware-tanzu/velero@v1.10.1/pkg/util/logging/kopia_log.go:35:10: cannot use &kopiaLog{…} (value of type *kopiaLog) as *zap.SugaredLogger value in return statement
# github.com/kopia/kopia/repo/blob/azure
../../../../go/pkg/mod/github.com/kopia/kopia@v0.13.0/repo/blob/azure/azure_storage.go:27:17: undefined: azblob.ServiceClient
../../../../go/pkg/mod/github.com/kopia/kopia@v0.13.0/repo/blob/azure/azure_storage.go:28:17: undefined: azblob.ContainerClient

which is when I gave up. Don't think we should be bumping dep versions to fix go mod tidy like that. Not sure about where to go from here atm.

  • May need to start vendoring but that'll affect the size of our git repo.
  • And because go.mod has a lot of "replace", this dep tree is now becoming unstable with many deps running way behind on versions.

@cbodonnell
Copy link
Contributor

cbodonnell commented Sep 18, 2023

@arcolife The key issue was the bump of github.com/microsoft/go-mssqldb to v1.6.0 brought in by the latest troubleshoot go module. github.com/microsoft/go-mssqldb depends on github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud, which does not exist in v0.21.1. Other than this, we are OK and since KOTS does not depend on troubleshoot functions using github.com/microsoft/go-mssqldb, we can pin github.com/microsoft/go-mssqldb at the existing v1.5.0 version and it will build:

github.com/microsoft/go-mssqldb => github.com/microsoft/go-mssqldb v1.5.0

For some context, we have pinned these Azure dependencies to older versions because we also import Velero to support configuring snapshots in KOTS. Velero's go.mod: https://github.com/vmware-tanzu/velero/blob/v1.10.1/go.mod#L60-L62

There are likely some replace directives outside of this that we could get rid of, but I agree with you that it's out of scope of this PR.

@arcolife arcolife force-pushed the bump-troubleshoot-v0.71.1 branch 2 times, most recently from f855b05 to 245dcee Compare September 19, 2023 04:14
@arcolife
Copy link
Contributor Author

arcolife commented Sep 19, 2023

since KOTS does not depend on troubleshoot functions using github.com/microsoft/go-mssqldb

@cbodonnell Thanks for the confirmation. I've pinned it with a comment and if the tests pass (eventually), we're good to go!

For pruning, I've opened another issue here #4045

go.mod Outdated Show resolved Hide resolved
* Story ID: 87575

Signed-off-by: Archit Sharma <archit@pm.me>
@cbodonnell cbodonnell merged commit bc8004b into main Sep 21, 2023
79 checks passed
@cbodonnell cbodonnell deleted the bump-troubleshoot-v0.71.1 branch September 21, 2023 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants