Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

monorepo: add imported controller #72

Merged

Conversation

BlaineEXE
Copy link
Contributor

This is the first step in merging repos, using monorepo as the working/feature branch.

This PR does exactly 2 things:

  1. Add a new ./pkg dir
  2. git subtree add --prefix pkg/imported-controller controller/master where controller is https://github.com/kubernetes-sigs/container-object-storage-interface-controller

This adds all 341 controller commits (with history intact), plus the subtree commit to merge them. Due to the huge scope, no other changes are made.

k8s-ci-robot and others added 30 commits October 31, 2019 08:27
This avoids dependencies on the Go module cache or the upstream code
hosting.
prow.sh: use vendor directory if available
Depending on the error, those logs are needed to debug failures.
prow.sh: also log output of system containers
Inside a real Prow job it is better to clean up at runtime instead of leaving that to the Prow job cleanup code because the later sometimes times out.

Signed-off-by: Mucahit Kurt <[email protected]>
…r-cleanup

delete kind cluster after tests run
…a_crds

Add snapshotter CRDs after cluster setup
kind v0.6.0 appends the kubeconfig with the default config at
~/.kube/config.
…ure can be tested. Test cases that test accessing volumes from multiple nodes need to be skipped
Enable topology testing with hostpath driver
…ve_version_gt

Improve snapshot-controller running check and version_gt to support multiple formats
Improve README by adding an explicit Kubernetes dependency section
This requires adding one more parallel e2e test run with
a special focus flag because snapshot tests are still guarded
with a "[Feature:VolumeSnapshotDataSource]" tag. The setting that
skips all tests with "[Feature:.*]" has to be removed because it
overrides the focus.

We don't have serial snapshot tests yet. This needs to be modified
again if we add any in the future.
Enable snapshot tests in 1.17 to be run in non-alpha jobs.
…ubernetes_fix

Fix version_gt to work with Kubernetes prefix
…Version

Update prow hostpath driver version to 1.3.0-rc2
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 30, 2024
Copy link

linux-foundation-easycla bot commented May 30, 2024

CLA Missing ID CLA Not Signed

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label May 30, 2024
@BlaineEXE
Copy link
Contributor Author

BlaineEXE commented May 30, 2024

@xing-yang I see several CLA issues related to the older controller repo commits. Is this something that can be worked around? I'm not sure how to resolve this otherwise, unless we squash all commits from the controller, which won't preserve history.

[update]
It looks like all but one of the problem commits are updates to prow.sh which I believe comes from release tools, which we no longer use. I could try to exclude any prow.sh commits from the history, but I don't know what kind of rebase conflicts I might get from that.

@xing-yang
Copy link
Contributor

I see most of those commits are from Grant. Let me ping him and see if he has a new github id.
For the ones that we couldn't figure out, maybe we can use a different id, maybe yours?

@BlaineEXE
Copy link
Contributor Author

For the ones that we couldn't figure out, maybe we can use a different id, maybe yours?

Is that okay to do? That will strip the original author's attribution and rewrite a few commits in the git history.

@ggriffiths
Copy link
Contributor

ggriffiths commented May 31, 2024

Hi, sorry this is causing some headache.

I no longer work for Portworx or use [email protected]. Because of that, I had removed [email protected] from my github profile.

We can try a few things:

  1. I've temporarily re-added [email protected] in case the CLA check can be re-ran. I can't verify the email, so maybe that won't work.
  2. I've just signed the CLA with my personal email [email protected] if you need to re-write the commit with a new email.
  3. You have my permission to squash my commits into a new commit with a different ID if the above doesn't work.

@BlaineEXE
Copy link
Contributor Author

/retest

@BlaineEXE BlaineEXE force-pushed the merge-add-imported-controller branch from 32431a9 to a64576d Compare June 3, 2024 20:24
@BlaineEXE
Copy link
Contributor Author

Thanks, @ggriffiths ! It looks like that allowed the commits with your ID to pass EasyCLA. Now there is just the remaining unknown user.

If it's okay, would you leave your portworx email added on GitHub for the next 2-3 weeks while we work on merging these repos? Much appreciated!

@BlaineEXE
Copy link
Contributor Author

I can't find the GitHub user "Niu Lechuan" associated with this commit: 3b88f29. It seems the user may have removed their account.

I think the best I can do in the circumstance is to rewrite the commit with my own info. It's a small doc update, so I am not concerned about validating that I believe the commit to be safe and up to my own contribution standards.

@ggriffiths
Copy link
Contributor

If it's okay, would you leave your portworx email added on GitHub for the next 2-3 weeks while we work on merging these repos? Much appreciated!

Sure, will do.

@BlaineEXE BlaineEXE changed the base branch from master to monorepo June 4, 2024 20:35
…1a72d228184a34c'

git-subtree-dir: pkg/imported-controller
git-subtree-mainline: 29504fc
git-subtree-split: 38b4915
@BlaineEXE BlaineEXE force-pushed the merge-add-imported-controller branch from a64576d to 605062d Compare June 4, 2024 20:39
@BlaineEXE
Copy link
Contributor Author

BlaineEXE commented Jun 4, 2024

I'm going to start adding notes here, because editing that commit is proving to be extremely hard.

Commit 3b88f29 is commit 159, as a note.

  1. git rebase --interactive monorepo fails on 1/203 when rebasing non-edited commits
  2. git rebase --interactive --strategy subtree monorepo fails on 23/203 when rebasing non-edited commits
    Removing vendor/sigs.k8s.io/container-object-storage-interface-spec/spec.md
    Removing vendor/sigs.k8s.io/container-object-storage-interface-spec/cosicomponents.png
    Removing vendor/sigs.k8s.io/container-object-storage-interface-spec/cosi.proto
    Removing vendor/sigs.k8s.io/container-object-storage-interface-spec/cosi.pb.json.go
    Removing vendor/sigs.k8s.io/container-object-storage-interface-spec/cosi.pb.go
    Removing vendor/sigs.k8s.io/container-object-storage-interface-spec/Makefile
    Removing vendor/sigs.k8s.io/container-object-storage-interface-spec/.gitignore
    Removing vendor/sigs.k8s.io/container-object-storage-interface-spec/OWNERS_ALIASES
    Removing vendor/sigs.k8s.io/yaml/yaml_go110.go
    Removing vendor/sigs.k8s.io/yaml/yaml.go
    Removing vendor/sigs.k8s.io/yaml/fields.go
    Removing vendor/sigs.k8s.io/yaml/.travis.yml
    Removing vendor/sigs.k8s.io/yaml/.gitignore
    Removing vendor/sigs.k8s.io/yaml/OWNERS_ALIASES
    Auto-merging vendor/sigs.k8s.io/yaml/build.make
    Auto-merging vendor/sigs.k8s.io/yaml/build.make
    Auto-merging vendor/sigs.k8s.io/yaml/build.make
    Auto-merging vendor/sigs.k8s.io/yaml/build.make
    Auto-merging vendor/sigs.k8s.io/yaml/build.make
    The previous cherry-pick is now empty, possibly due to conflict resolution.
    If you wish to commit it anyway, use:
    
        git commit --allow-empty
    
    Otherwise, please use 'git rebase --skip'
    interactive rebase in progress; onto 29504fc
    Last commands done (23 commands done):
      pick 104a1ac build.make: avoid unit-testing E2E test suite
      pick 94fc1e3 build.make: avoid unit-testing E2E test suite
      (see more in file .git/rebase-merge/done)
    Next commands to do (180 remaining commands):
      pick fb13c51 verify-shellcheck.sh: import from Kubernetes
      pick b2d25d4 verify-shellcheck.sh: make it usable in csi-release-tools
      (use "git rebase --edit-todo" to view and edit)
    You are currently rebasing branch 'merge-add-imported-controller' on '29504fc'.
      (all conflicts fixed: run "git rebase --continue")
    
    nothing to commit, working tree clean
    Could not apply 94fc1e3... build.make: avoid unit-testing E2E test suite
    
  3. git rebase --interactive --strategy subtree --rebase-merges monorepo fails on 12/721 when rebasing non-edited commits
  4. git rebase <opts> HEAD~1 has the same behavior as above for all 3 options
  5. git subtree does not have a rebase subcmd
  6. git rebase does not have a --prefix option
  7. I'm going to try using method 2 again, and this time allow empty commits.
    1. resolve step 23/303 with git commit --allow-empty, git rebase --continue
    2. Get error on 113/203
      Auto-merging vendor/sigs.k8s.io/yaml/build.make
      Auto-merging vendor/sigs.k8s.io/yaml/build.make
      Auto-merging vendor/sigs.k8s.io/yaml/prow.sh
      Auto-merging vendor/sigs.k8s.io/yaml/prow.sh
      Auto-merging vendor/sigs.k8s.io/yaml/prow.sh
      Auto-merging vendor/sigs.k8s.io/yaml/prow.sh
      Auto-merging vendor/sigs.k8s.io/yaml/prow.sh
      CONFLICT (rename/delete): vendor/sigs.k8s.io/container-object-storage-interface-spec/release-tools/update-vendor.sh deleted in 1e3cc97b9d67512a0552e27d1f0f82f92faad58a and renamed to vendor/sigs.k8s.io/container-object-storage-interface-spec/Makefile in 465b16f2635bc1d644a11692b0aaba4b7eafd47b. Version 465b16f2635bc1d644a11692b0aaba4b7eafd47b of vendor/sigs.k8s.io/container-object-storage-interface-spec/Makefile left in tree.
      error: could not apply 465b16f... We maintain release tools only under Spec repo
      hint: Resolve all conflicts manually, mark them as resolved with
      hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
      hint: You can instead skip this commit: run "git rebase --skip".
      hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
      Could not apply 465b16f... We maintain release tools only under Spec repo
      
      status
            interactive rebase in progress; onto 29504fc
      Last commands done (113 commands done):
        pick 7100c12 Only set staging registry when running canary job
        pick 465b16f We maintain release tools only under Spec repo
        (see more in file .git/rebase-merge/done)
      Next commands to do (90 remaining commands):
        pick f1a048d Add approvers to facilitate project management
        pick b963927 Basic makefile template to get release tools
        (use "git rebase --edit-todo" to view and edit)
      You are currently rebasing branch 'merge-add-imported-controller' on '29504fc'.
        (fix conflicts and then run "git rebase --continue")
        (use "git rebase --skip" to skip this patch)
        (use "git rebase --abort" to check out the original branch)
      
      Changes to be committed:
        (use "git restore --staged <file>..." to unstage)
              new file:   vendor/sigs.k8s.io/container-object-storage-interface-spec/Dockerfile
      
      Unmerged paths:
        (use "git restore --staged <file>..." to unstage)
        (use "git add <file>..." to mark resolution)
              added by them:   vendor/sigs.k8s.io/container-object-storage-interface-spec/Makefile
      
      seems to be this commit, which adds both files, so I think it's okay to add both and continue the rebase: kubernetes-retired/container-object-storage-interface-controller@465b16f
    3. Again on 150/203
            Auto-merging vendor/sigs.k8s.io/container-object-storage-interface-spec/cmd/controller-manager/controller-manager.go
      Removing vendor/sigs.k8s.io/container-object-storage-interface-spec/deploy/fullstack/provisioner/ns.yaml
      Removing vendor/sigs.k8s.io/container-object-storage-interface-spec/deploy/fullstack/provisioner/kustomization.yaml
      Removing vendor/sigs.k8s.io/container-object-storage-interface-spec/deploy/fullstack/kustomization.yaml
      Removing vendor/sigs.k8s.io/container-object-storage-interface-spec/deploy/fullstack/controller/ns.yaml
      Removing vendor/sigs.k8s.io/container-object-storage-interface-spec/deploy/fullstack/controller/kustomization.yaml
      Removing vendor/sigs.k8s.io/container-object-storage-interface-spec/deploy/base/kustomization.yaml
      Removing vendor/sigs.k8s.io/container-object-storage-interface-spec/pkg/bucketrequest/bucketrequest.go
      Removing vendor/sigs.k8s.io/container-object-storage-interface-spec/pkg/bucketaccessrequest/bucketaccessrequest_test.go
      Removing vendor/sigs.k8s.io/container-object-storage-interface-spec/pkg/bucketaccessrequest/bucketaccessrequest.go
      Auto-merging vendor/sigs.k8s.io/container-object-storage-interface-spec/go.sum
      CONFLICT (content): Merge conflict in vendor/sigs.k8s.io/container-object-storage-interface-spec/go.sum
      error: could not apply 090921d... Updating the go mod and go sum and fixing compilation
      hint: Resolve all conflicts manually, mark them as resolved with
      hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
      hint: You can instead skip this commit: run "git rebase --skip".
      hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
      Could not apply 090921d... Updating the go mod and go sum and fixing compilation
      
      This is the point where i realized that the rebase was actually applying all the controller commits directly to the API repo. We can't use this method.

@BlaineEXE
Copy link
Contributor Author

@xing-yang here is the response I got from TLF. We are advised to force merge without passing EasyCLA check. In this case, I think we have documented well that there is one PR not passing, and why, so we should have enough information recorded to explain if anyone asks us why.

image

@xing-yang
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 13, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BlaineEXE, xing-yang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [BlaineEXE,xing-yang]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@xing-yang xing-yang merged commit 19d5477 into kubernetes-retired:monorepo Jun 13, 2024
2 of 4 checks passed
@BlaineEXE BlaineEXE deleted the merge-add-imported-controller branch June 14, 2024 17:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.