kluctl icon indicating copy to clipboard operation
kluctl copied to clipboard

[Feature] sort objects before rendering diff

Open jcpunk opened this issue 2 years ago • 6 comments
trafficstars

Command

  • [ ] check-image-updates
  • [X] delete
  • [X] deploy
  • [X] diff
  • [ ] helm-pull
  • [ ] helm-update
  • [ ] list-images
  • [ ] list-targets
  • [ ] poke-images
  • [ ] prune
  • [ ] render
  • [ ] seal
  • [ ] validate
  • [ ] version

Who are you?

Pat Riehecky, Computing Specialist at Fermilab

What do you want to do?

When reviewing the list of different objects, it would be easier if the objects themselves were sorted. The content of the diff is sorted, but the list of objects themselves are not.

Why do you need that?

When looking over somewhat large diffs it can be difficult to track all the changes in a given namespace when the objects are not sorted.

jcpunk avatar Jun 13 '23 12:06 jcpunk

Should be reasonable to implement, but then it should be controllable by a flag (something like --sort-diff-object). I also think that this is a good first issue for new contributors.

codablock avatar Jun 14 '23 13:06 codablock

Hey @codablock I want to work on this can you please help me in giving some more details and steps to get started as it will be my first issue.

Thanks..

Bharadwajshivam28 avatar Mar 02 '24 22:03 Bharadwajshivam28

Hey @Bharadwajshivam28. Happy to see you give it a try. Did you already try to compile the project? A simple make build should be sufficient. Alternatively, use your IDE to run/debug ./cmd with the desired arguments.

You'll also need to setup a demo project to test this out. Do you already actively use Kluctl?

codablock avatar Mar 04 '24 07:03 codablock

Hey @Bharadwajshivam28. Happy to see you give it a try. Did you already try to compile the project? A simple make build should be sufficient. Alternatively, use your IDE to run/debug ./cmd with the desired arguments.

You'll also need to setup a demo project to test this out. Do you already actively use Kluctl?

Thanks... I am not using it actively but I have used it a few times ....

I have understood the issue but if you give me some clear view of the issue and end goal then it would be great for me to start

Bharadwajshivam28 avatar Mar 04 '24 10:03 Bharadwajshivam28

The end goal is to have the output of kluctl diff (and the diff seen in kluctl deploy) to have objects sorted by ref. Right now, they are simply in the order as they appear in the recursive deployment project.

I assume that the change needed has to be done somewhere in formatCommandResultText.

codablock avatar Mar 04 '24 11:03 codablock

The end goal is to have the output of kluctl diff (and the diff seen in kluctl deploy) to have objects sorted by ref. Right now, they are simply in the order as they appear in the recursive deployment project.

I assume that the change needed has to be done somewhere in formatCommandResultText.

Thanks I will soon raise PR

Bharadwajshivam28 avatar Mar 04 '24 19:03 Bharadwajshivam28