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

add mod file for controller pkg #4062

Merged
merged 9 commits into from
Oct 11, 2023
Merged

add mod file for controller pkg #4062

merged 9 commits into from
Oct 11, 2023

Conversation

lingdie
Copy link
Collaborator

@lingdie lingdie commented Oct 10, 2023

🤖 Generated by Copilot at 6f1028e

Summary

📦🔧🧹

This pull request refactors the module structure and dependencies of the sealos project, especially for the controllers. It introduces a new controllers/pkg module that contains common packages for other controllers, and updates the go.mod files and imports in each controller to use the new module. It also removes unused or outdated code, such as the deprecate/pkg/buildah package, and improves the code style and clarity of some constants and imports.

controllers/pkg
New module for common code
Spring cleaning for go.mod

Walkthrough

  • Split the root sealos module into submodules, and created a new controllers/pkg module to contain common packages for other controllers (link, link, link, link, link, link, link, link, link, link)
  • Updated the go.mod files in controllers/account, controllers/admission, controllers/licenseissuer, and controllers/resources to use the latest versions of some indirect dependencies (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Renamed the constants admissionV1 and userV1 to admissionv1 and userv1 respectively in controllers/account/api/v1/debt_webhook.go to match the imported package names and avoid confusion (link, link, link)
  • Sorted the imports in the package v1 in controllers/account/api/v1/debt_webhook.go alphabetically for consistency and readability (link)
  • Removed the unused import of github.com/labring/sealos/pkg/utils/retry from the package controllers in controllers/resources/controllers/monitor_controller.go (link)
  • Removed the unused indirect dependencies from the go.mod files in controllers/account, controllers/admission, and controllers/resources (link, link, link, link, link)
  • Deleted the files in the deprecate/pkg/buildah directory, which contained unused and outdated code for building container images (link, link, link, link, link, link, link, link, link, link)

@pull-request-size
Copy link

Whoa! Easy there, Partner!

This PR is too big. Please break it up into smaller PRs.

@sealos-ci-robot
Copy link
Member

sealos-ci-robot commented Oct 10, 2023

🤖 Generated by lychee action

Summary

Status Count
🔍 Total 941
✅ Successful 369
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 571
❓ Unknown 0
🚫 Errors 0

Full action output

Full Github Actions output

@lingdie lingdie added this to the v5.0 milestone Oct 11, 2023
@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

All modified lines are covered by tests ✅

see 1 file with indirect coverage changes

📢 Thoughts on this report? Let us know!.

@zzjin zzjin merged commit 0362392 into labring:main Oct 11, 2023
66 of 67 checks passed
@lingdie lingdie modified the milestones: v5.0, v4.4 Oct 12, 2023
@sealos-ci-robot
Copy link
Member

/cherry-pick release-v4.4

@sealos-ci-robot
Copy link
Member

🤖 says: Error cherry-picking.

CONFLICT (modify/delete): controllers/account/api/v1/debt_webhook.go deleted in HEAD and modified in 0362392 (add mod file for controller pkg (#4062)). Version 0362392 (add mod file for controller pkg (#4062)) of controllers/account/api/v1/debt_webhook.go left in tree.
CONFLICT (modify/delete): controllers/account/go.mod deleted in HEAD and modified in 0362392 (add mod file for controller pkg (#4062)). Version 0362392 (add mod file for controller pkg (#4062)) of controllers/account/go.mod left in tree.
CONFLICT (modify/delete): controllers/account/go.sum deleted in HEAD and modified in 0362392 (add mod file for controller pkg (#4062)). Version 0362392 (add mod file for controller pkg (#4062)) of controllers/account/go.sum left in tree.
CONFLICT (modify/delete): controllers/admission/go.mod deleted in HEAD and modified in 0362392 (add mod file for controller pkg (#4062)). Version 0362392 (add mod file for controller pkg (#4062)) of controllers/admission/go.mod left in tree.
CONFLICT (modify/delete): controllers/admission/go.sum deleted in HEAD and modified in 0362392 (add mod file for controller pkg (#4062)). Version 0362392 (add mod file for controller pkg (#4062)) of controllers/admission/go.sum left in tree.
CONFLICT (modify/delete): controllers/licenseissuer/go.mod deleted in HEAD and modified in 0362392 (add mod file for controller pkg (#4062)). Version 0362392 (add mod file for controller pkg (#4062)) of controllers/licenseissuer/go.mod left in tree.
CONFLICT (modify/delete): controllers/licenseissuer/go.sum deleted in HEAD and modified in 0362392 (add mod file for controller pkg (#4062)). Version 0362392 (add mod file for controller pkg (#4062)) of controllers/licenseissuer/go.sum left in tree.
CONFLICT (modify/delete): controllers/pkg/resources/resources.go deleted in HEAD and modified in 0362392 (add mod file for controller pkg (#4062)). Version 0362392 (add mod file for controller pkg (#4062)) of controllers/pkg/resources/resources.go left in tree.
CONFLICT (modify/delete): controllers/resources/controllers/monitor_controller.go deleted in HEAD and modified in 0362392 (add mod file for controller pkg (#4062)). Version 0362392 (add mod file for controller pkg (#4062)) of controllers/resources/controllers/monitor_controller.go left in tree.
CONFLICT (modify/delete): controllers/resources/go.mod deleted in HEAD and modified in 0362392 (add mod file for controller pkg (#4062)). Version 0362392 (add mod file for controller pkg (#4062)) of controllers/resources/go.mod left in tree.
CONFLICT (modify/delete): controllers/resources/go.sum deleted in HEAD and modified in 0362392 (add mod file for controller pkg (#4062)). Version 0362392 (add mod file for controller pkg (#4062)) of controllers/resources/go.sum left in tree.
CONFLICT (modify/delete): controllers/resources/main.go deleted in HEAD and modified in 0362392 (add mod file for controller pkg (#4062)). Version 0362392 (add mod file for controller pkg (#4062)) of controllers/resources/main.go left in tree.
Auto-merging go.mod
CONFLICT (content): Merge conflict in go.mod
Auto-merging go.sum
CONFLICT (content): Merge conflict in go.sum
Auto-merging go.work
CONFLICT (content): Merge conflict in go.work
Auto-merging go.work.sum
CONFLICT (content): Merge conflict in go.work.sum
CONFLICT (file location): controllers/pkg/go.mod added in 0362392 (add mod file for controller pkg (#4062)) inside a directory that was renamed in HEAD, suggesting it should perhaps be moved to pkg/go.mod.
CONFLICT (file location): controllers/pkg/go.sum added in 0362392 (add mod file for controller pkg (#4062)) inside a directory that was renamed in HEAD, suggesting it should perhaps be moved to pkg/go.sum.
error: could not apply 0362392... add mod file for controller pkg (#4062)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

@sealos-ci-robot
Copy link
Member

🤖 says: ‼️ cherry pick action failed.
See: https://github.com/labring/sealos/actions/runs/6491034526

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.

3 participants