aws / aws/eks-anywhere

FluxAddonClient: abstraction to encapsulate provider specific repository setup behavior.

Open
#1,993 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/gitops kind/cleanup team/cli
Dominant language
Go
Stars
2.1k
Forks
328
Avg merge
1d 4h
Merged PRs (30d)
9

Description

We have decoupled git-specific actions from git-provider specific actions in the FluxAddonClient.

However, there are a set of actions that we take in the FluxAddonClient workflow that are dependent on wether or not we're using the generic Git 'provider' or a the Github 'provider' -- these conditionals are distracting and potentially prone to error. We should introduce a layer of abstraction which is separate from the FluxAddonClient workflow organization that hides these details.

One idea would be to turn what is currently the 'provider' into a 'repositoryManager', since it's strictly responsible for managing Git repositories, and re-introduce a new 'Provider' abstraction with a few basic methods -- such as

type Provider interface {
    BootstrapFlux() error
    Validate() error
}

which is responsible only for taking a git client, a git repository manager (currently the 'provider') and abstracting the BootstrapFlux calls so that their conditional logic can be removed from the FluxAddonClient workflow

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the FluxAddonClient workflow and trace the provider-specific conditionals and BootstrapFlux calls. Review the current provider's repository-management responsibilities, then determine where the proposed Provider interface and repository manager should be introduced. Done means provider-specific setup is hidden behind the abstraction and the FluxAddonClient workflow no longer contains those conditionals.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, github, go
Domain
backend-api-design
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.