-
Notifications
You must be signed in to change notification settings - Fork 292
feature: diffing between different releases #131
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
Conversation
Looking greatly improved. I tested it against 2 releases I have that are very complicated. It looks to be working normally except for one instance. I have a single file in my helm chart called networkpolicy.yaml. This single file always contains 2 yaml docs that are 2 NetworkPolicy docs. They both should differ and show up in the diff, but I see the first doc being diffed with the second customers doc.
Diff
I should be seeing 2 network policy diffs where customer1-cluster is being diffed against customer2-cluster, but instead I see a single one for customer1-cluster being diffed against customer2-all. |
I did a few more diffs and so for everything else except for that issue with 2 yaml docs in a single helm chart file looks good. |
I guess helm templates are rendered and applied as a whole and kubernetes takes care of creating multiple objects from same yaml file. |
It shows them both at 2 separate parts in the diff output they are not together and are separated by multiple other diffs. |
3a650cd
to
5d2197e
Compare
@sstarcher resolved the above mentioned issue. now we get the diff for object files separately. |
LGTM, the issue is fixed and I am not seeing anything that's having a issue. |
Thanks @sstarcher , for the prompt feedback 👍 now comes the bigger task 😆 |
adding these changes. |
this commit - add diff release subcommand to compare different releases - adds go report card badge and lisence badge to readme
5d2197e
to
a3fe078
Compare
@aananthraj I have one consideration for that are you blocking it just on the chart name or the repo/chart name? Just to confirm it's only the chart name correct? I have a usecase for having a beta/chart and a stable/chart. |
@databus23 Could we get a look and get this merged and released pretty please. |
Yes @sstarcher, just based on chart names. |
@databus23 , @mumoshu any update on this..? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks a lot for your contribution
@@ -137,3 +145,34 @@ func calculateDistances(diffs []difflib.DiffRecord) map[int]int { | |||
|
|||
return distances | |||
} | |||
|
|||
// reIndexForRelease based on template names | |||
func reIndexForRelease(index map[string]*manifest.MappingResult) map[string]*manifest.MappingResult { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very very nit but I think it's fine to say reindex
rather than reIndex
😃
Hi,
This PR resolves #130 and it contains the following changes
suggestions and comments..?