Skip to content

Fix import from old org #106

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

Merged
merged 2 commits into from
May 14, 2025
Merged

Fix import from old org #106

merged 2 commits into from
May 14, 2025

Conversation

hoshsadiq
Copy link
Contributor

@hoshsadiq hoshsadiq commented Apr 11, 2025

Description

Since the tool was moved from the old wayfair-incubator org to commercetools, using go install fails. This will fix the import to use the new org. Fixes #105

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

@hoshsadiq hoshsadiq requested a review from a team as a code owner April 11, 2025 11:27
@Oded-B
Copy link
Collaborator

Oded-B commented Apr 11, 2025

The ERROR: invalid tag "/:pr-106": invalid reference format failure in Docker / build (pull_request) is unrelated this change - there's some bug in CI that fails PR from forks, I'll take a look

@Oded-B
Copy link
Collaborator

Oded-B commented Apr 11, 2025

I'm 74% sure #108 will fix the Docker / build (pull_request failure

@Oded-B
Copy link
Collaborator

Oded-B commented Apr 14, 2025

Alright #108 was merged, try to merge from main to see if this fixes the Docker / build (pull_request) issue.
The other failed check is because you need to go mod tidy the go.mod file.

@hoshsadiq
Copy link
Contributor Author

I've rebased. I'm unsure about the go mod tidy. It doesn't return anything, but my ide does fail on a bunch of things for k8s.io that I have to add as replace directives:

// Add replace directives for k8s.io modules with version issues
replace (
        k8s.io/cloud-provider => k8s.io/cloud-provider v0.32.2
        k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.32.2
        k8s.io/cri-api => k8s.io/cri-api v0.32.2
        k8s.io/cri-client => k8s.io/cri-client v0.0.0-20240429231629-220bfaa459cb
        k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.32.2
        k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.32.2
        k8s.io/endpointslice => k8s.io/endpointslice v0.32.2
        k8s.io/externaljwt => k8s.io/externaljwt v0.32.2
        k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.32.2
        k8s.io/kube-proxy => k8s.io/kube-proxy v0.32.2
        k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.32.2
        k8s.io/kubelet => k8s.io/kubelet v0.32.2
        k8s.io/mount-utils => k8s.io/mount-utils v0.32.2
        k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.32.2
        k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.32.2
)

yet none of them are actually needed according to go mod

$ go mod why k8s.io/cloud-provider k8s.io/cluster-bootstrap k8s.io/cri-api k8s.io/cri-client k8s.io/csi-translation-lib k8s.io/dynamic-resource-allocation k8s.io/endpointslice k8s.io/externaljwt k8s.io/kube-controller-manager k8s.io/kube-proxy k8s.io/kube-scheduler k8s.io/kubelet k8s.io/mount-utils k8s.io/pod-security-admission k8s.io/sample-apiserver
go: downloading k8s.io/cri-client v0.0.0-20240429231629-220bfaa459cb
# k8s.io/cloud-provider
(main module does not need package k8s.io/cloud-provider)

# k8s.io/cluster-bootstrap
(main module does not need package k8s.io/cluster-bootstrap)

# k8s.io/cri-api
(main module does not need package k8s.io/cri-api)

# k8s.io/cri-client
(main module does not need package k8s.io/cri-client)

# k8s.io/csi-translation-lib
(main module does not need package k8s.io/csi-translation-lib)

# k8s.io/dynamic-resource-allocation
(main module does not need package k8s.io/dynamic-resource-allocation)

# k8s.io/endpointslice
(main module does not need package k8s.io/endpointslice)

# k8s.io/externaljwt
(main module does not need package k8s.io/externaljwt)

# k8s.io/kube-controller-manager
(main module does not need package k8s.io/kube-controller-manager)

# k8s.io/kube-proxy
(main module does not need package k8s.io/kube-proxy)

# k8s.io/kube-scheduler
(main module does not need package k8s.io/kube-scheduler)

# k8s.io/kubelet
(main module does not need package k8s.io/kubelet)

# k8s.io/mount-utils
(main module does not need package k8s.io/mount-utils)

# k8s.io/pod-security-admission
(main module does not need package k8s.io/pod-security-admission)

# k8s.io/sample-apiserver
(main module does not need package k8s.io/sample-apiserver)

@hnnsgstfssn
Copy link
Contributor

The other failed check is because you need to go mod tidy the go.mod file.

Just want to note that we have an open support ticket with Github on this failed check on Dependabot pull requests since it seems to be a bug with Dependabot.

Copy link
Contributor

@hnnsgstfssn hnnsgstfssn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also update ./.github/PULL_REQUEST_TEMPLATE.md and ./.github/ISSUE_TEMPLATE/BUG_REPORT.md?

@Oded-B
Copy link
Collaborator

Oded-B commented Apr 15, 2025

The other failed check is because you need to go mod tidy the go.mod file.

Just want to note that we have an open support ticket with Github on this failed check on Dependabot pull requests since it seems to be a bug with Dependabot.

Are you sure it's related to Dependabot? This PR changes the ordering of dependeices in go.mod , go mod tidy is specific about ordering so the check fails.
image

And these are the exact lines go mod want to change:
image

I think it's just a matter of moving the these line back to their original postions, or am I missing something?

@hoshsadiq
Copy link
Contributor Author

Sorry, for some reason I don't get notified on this thread. I've updated those two extra files (unsure how I missed it since I used sed 🤔 ). Anyway, yeah the go mod changes are not dependabot related, but I'm unsure what I can do here besides manually make changes to go.mod. Running go mod tidy doesn't make that same change.

@hoshsadiq
Copy link
Contributor Author

Oh, interesting, go 1.24.2 and 1.24.1 seem to produce a different go.mod. Should be fixed now.

@Oded-B
Copy link
Collaborator

Oded-B commented Apr 22, 2025

Ah, more linting issues :/
This time its the dependency ordeting in the golang files themselves 🤦

Usually the IDE takes care of this but in cases when you Sed across multiple files its usually faster to do it via the CLI:

go install github.com/daixiang0/gci@latest #if not installed already
gci write .

@hoshsadiq
Copy link
Contributor Author

Also fixed now!

@sunchill06
Copy link
Contributor

@Oded-B could you review this again? This is blocking some Dependabot PRs.

@Oded-B Oded-B enabled auto-merge (squash) April 29, 2025 11:24
@Oded-B Oded-B disabled auto-merge April 29, 2025 11:24
@Oded-B
Copy link
Collaborator

Oded-B commented Apr 29, 2025

I approved, but it's waiting for @hnnsgstfssn (i think).
I'm not near a computer but from my POV we should merge it, now, with admin override if needs be

Copy link
Contributor

@hnnsgstfssn hnnsgstfssn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good from me- apologies but have been on annual leave this past week.

@hnnsgstfssn
Copy link
Contributor

@hoshsadiq there is a requirement on signed commits. Would you mind setting that up and force push signed commits? Here's the Github docs on how to do it.

Screenshot 2025-04-29 at 17 44 47

I'll add a PR to mention this in the contributions doc.

hnnsgstfssn added a commit that referenced this pull request Apr 29, 2025
There is a requirement for signed commits before merging a pull request
and this is not documented in the contributing document.

This came up while trying to get [1] merged.

[1] #106
@hoshsadiq
Copy link
Contributor Author

Ohh, fun, I thought I had set it up. Will do soon

hnnsgstfssn added a commit that referenced this pull request May 2, 2025
There is a requirement for signed commits before merging a pull request
and this is not documented in the contributing document.

This came up while trying to get [1] merged.

[1] #106
@hoshsadiq
Copy link
Contributor Author

Sorry it took so long, but force pushed a verified commit now.

@Oded-B Oded-B merged commit 6a5f8dd into commercetools:main May 14, 2025
7 of 8 checks passed
@Oded-B
Copy link
Collaborator

Oded-B commented May 14, 2025

Merged with the failed lint run.
I'll fix that later

@hoshsadiq hoshsadiq deleted the fix-import branch May 14, 2025 18:59
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.

Go install fails due to wrong package path
4 participants