Skip to content

Minimize use of argoproj/pkg #22175

@crenshaw-dev

Description

@crenshaw-dev

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/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

No uses.

Argo Rollouts

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

Argo Workflows

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttype:tech-debtEnhancement such as refactor invisible for the end user

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions