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

Minimize use of argoproj/pkg #22175

Open
crenshaw-dev opened this issue Mar 4, 2025 · 0 comments
Open

Minimize use of argoproj/pkg #22175

crenshaw-dev opened this issue Mar 4, 2025 · 0 comments
Labels
enhancement New feature or request type:tech-debt Enhancement invisible for the end user

Comments

@crenshaw-dev
Copy link
Member

crenshaw-dev commented Mar 4, 2025

Summary

We currently rely on argoproj/pkg for some relatively trivial utilities. I believe the original idea behind the package was to share common utilities among the argoproj suite. In practice, I think the uses of pkg by the 4 main Argo projects are fairly disjoint.

Motivation

  1. Bumping versions is a pain
  2. Maintaining a separate repo means separate issues/PRs/dependabot/etc.
  3. One has to avoid introducing breaking changes to functions that probably aren't even shared

Proposal

We should minimize Argo CD's use of pkg. For whatever utilities remain that are actually shared by all or most Argo projects should be extracted into their own purpose-specific modules with their own documentation and minimal dependencies. Ideally these modules would be treated as their own micro-projects (think similar to the logrus bridge), ideally useful to the broader ecosystem instead of just Argo.

Uses by the top 4 projects:

Command:

grep -r -h '"github.com/argoproj/pkg' **.go | sed 's/^[^"]*"//' | sed 's/"$//' | sort | uniq

Argo CD

github.com/argoproj/pkg/exec
github.com/argoproj/pkg/grpc/http
github.com/argoproj/pkg/kubeclientmetrics
github.com/argoproj/pkg/stats
github.com/argoproj/pkg/sync
github.com/argoproj/pkg/time

The exec module is apparently unique to Argo CD and should probably just be moved to the argo-cd repo.

Argo Events

github.com/argoproj/pkg/expr

Argo Rollouts

github.com/argoproj/pkg/grpc/http
github.com/argoproj/pkg/kubeclientmetrics

Argo Workflows

github.com/argoproj/pkg/cli
github.com/argoproj/pkg/errors
github.com/argoproj/pkg/file
github.com/argoproj/pkg/grpc/http
github.com/argoproj/pkg/humanize
github.com/argoproj/pkg/json
github.com/argoproj/pkg/kube/cli
github.com/argoproj/pkg/kube/errors
github.com/argoproj/pkg/rand
github.com/argoproj/pkg/s3
github.com/argoproj/pkg/stats
github.com/argoproj/pkg/strftime
github.com/argoproj/pkg/sync
github.com/argoproj/pkg/time

The following appear to be completely unique to argo-workflows and should probably just be reincorporated to that repo:

github.com/argoproj/pkg/cli
github.com/argoproj/pkg/file
github.com/argoproj/pkg/json
github.com/argoproj/pkg/kube/cli
github.com/argoproj/pkg/kube/errors
github.com/argoproj/pkg/s3
github.com/argoproj/pkg/strftime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request type:tech-debt Enhancement invisible for the end user
Projects
None yet
Development

No branches or pull requests

2 participants