Skip to content
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

[Feature] sort objects before rendering diff #566

Open
3 of 14 tasks
jcpunk opened this issue Jun 13, 2023 · 6 comments
Open
3 of 14 tasks

[Feature] sort objects before rendering diff #566

jcpunk opened this issue Jun 13, 2023 · 6 comments
Labels
good first issue Good for newcomers

Comments

@jcpunk
Copy link
Contributor

jcpunk commented Jun 13, 2023

Command

  • check-image-updates
  • delete
  • deploy
  • 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.

@codablock
Copy link
Collaborator

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 codablock added the good first issue Good for newcomers label Jun 14, 2023
@Bharadwajshivam28
Copy link

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..

@codablock
Copy link
Collaborator

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?

@Bharadwajshivam28
Copy link

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

@codablock
Copy link
Collaborator

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.

@Bharadwajshivam28
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants