-
Notifications
You must be signed in to change notification settings - Fork 289
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
fix: set default ImageAlias for Helm app type using helmvalues git write-back method #725
Merged
pasha-codefresh
merged 11 commits into
argoproj-labs:master
from
askhari:fix/set-default-image-alias-with-helmvalues
May 31, 2024
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
b40e984
Release v0.13.0
pasha-codefresh 00ce8a7
add: GetImagesAndAliasesFromApplication to retrieve images with aliases
askhari 43afe23
changed: image version value to avoid issues with integration tests
askhari b86e898
Merge branch 'master' of https://github.com/argoproj-labs/argocd-imag…
pasha-codefresh efec2b0
fix: revert back version
askhari 26bf144
change: make NormalizedSymbolicName() method public
askhari f84d0bc
Merge remote-tracking branch 'askhari/fix/set-default-image-alias-wit…
pasha-codefresh bdcecc1
fix: getHelmParamNamesFromAnnotation should take info from container …
pasha-codefresh 4a08ed6
optimize code
pasha-codefresh f282927
check if alias exist
pasha-codefresh c1784a3
Merge branch 'master' into fix/set-default-image-alias-with-helmvalues
pasha-codefresh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
why you need to change this logic? why just not replace it with c.ImageAlias if it is exist ?
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.
Thank you for pointing it out :)
There are mainly two reasons for this decision:
If in the end it should be better to leave it as before, just let me know and I'll make revert the changes to use c.ImageAlias.
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.
I forgot... please, if in the end no changes should be done, let me know to mark the conversation as resolved.
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.
I just concerned that you actually changing logic, because inside getHelmParamNamesFromAnnotation here more conditions. I would not change it for now. Also this function is well covered with tests, in case if you are going to use new logic, you have to cover it with unit tests
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.
Yup, you are absolutely right and I should think thrice before changing things.
I'll change it back to the previous statement changing the c.ImageName for c.normalizedSymbolicName() which will work properly with the annotation names because it already replaces the "/" characters for "_". I'll check if the logic works that way and push the changes back.
Thank you for noticing and explaining it :)
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.
@pasha-codefresh , thank you very much for your help. I really appreciate it and with those changes I now understand what you meant by passing the container image. Thank you!
Do you need me to work on some more changes from my side for this PR? I think that with the changes you made, the problem is already solved.
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.
@askhari maybe you can help with manual test?
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.
Sure! I'll run it on a cluster where we have a test application just for this purpose and will paste here the results to show the validation.
It will take a few days because I'll be off and I'm not sure if I'll have enough time today to test it properly.
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.
Fine for me
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.
I see that this is already merged. Thank you for your help @pasha-codefresh .
Still, I attach a test I made to validate that the code is retrieving the information properly when using aliases.
Below there is a screenshot which uses an application definition with a docker image called labduck and using an alias labbat to validate that it is retrieving the values properly from the annotations.
Again thank you for your help to solve this issue.
Cheers!