aws / aws/eks-anywhere

Refactor CloudStack AnyImmutableField function to return diff object

Open
#3,549 0 comments 0 reactions 0 assignees View on GitHub
area/providers/capc team/providers
Dominant language
Go
Stars
2.1k
Forks
328
Avg merge
1d 4h
Merged PRs (30d)
9

Description

**What would you like to be added**:
As discussed in https://github.com/aws/eks-anywhere/pull/3529, we are currently passing the logger around to record possible diffs identified in EKS-A which could potentially trigger a rolling upgrade or the creation of a new machine template. Instead of evaluating these diffs and logging them in the comparison function, it may make more sense to return some EksaCloudStackDiff object and allow the caller to decide what to do with it, if anything.

This issue is specifically for the CloudStack provider but I suspect other providers may benefit from a similar refactoring.

**Why is this needed**:
The diff itself is lost to the caller, who may want to do something with the results. This pattern would also allow for multiple "diffs" to be evaluated simultaneously and made available to the caller.

Contributor guide

Open the contributing guide

Research direction

Start by locating the CloudStack provider's AnyImmutableField function and read the discussion in pull request #3529. Trace its callers to understand how logger-based diff handling currently works. Done means the CloudStack comparison returns an EksaCloudStackDiff object and callers decide how to use or log the result.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
infrastructure
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.