-
Notifications
You must be signed in to change notification settings - Fork 897
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: merge
key for key groups and *make keys unique*
#1493
Feature: merge
key for key groups and *make keys unique*
#1493
Conversation
9fbc9ea
to
372d21b
Compare
Just so I have said it: This does not ensure that a key is included only once. Maybe this is a desirable feature when people start merging But that is not any different from the overall |
Should also mention: |
Would be nice to get an ETA of when this will be looked at and maybe an ETA for a new patch release that includes this feature? |
@felixfontein Sorry to bother you again, but what is the current state of sops, it seems to be very slow moving and the last patch release has been a long time ago. Why does a small MR like this take so much time to review and merge and when is the next patch release planned? 3.9.0 is on the road map for a very long time already, do you need help or is it something else? |
It seems that most maintainers currently have no time to review PRs. Since I don't want to merge PRs that I don't fully understand without a second review, this means that rarely any PRs get merged currently. I was hoping for a soonish 3.9.0 release for some time already, I have no idea when it will happen. |
If you need maintainers, I would be happy to support sops. Who would be in charge of deciding this and what would I have to do? |
I'm not sure how the process works, but joining the #sops-dev channel on the CNCF Slack (https://github.com/getsops/sops/blob/main/CONTRIBUTING.md#communication, the second link allows you to get an invite for the CNCF Slack, and the former then allows you to join that channel) is probably a good idea. |
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.
Some thoughts about recursion ;)
Just so I have said it: This does not ensure that a key is included only once. Maybe this is a desirable feature when people start merging
key_groups
now?
I tend to say yes. We definitely have to make sure to avoid breaking backwards compatibility, though. Maybe it should only be used for everything inside merge
, but not for the ones added on top-level? I.e. remove duplicates in line 193, after processing group.Merge
and before processing group.Age
.
This implementation would allow
Which would result in duplicated |
45fc358
to
8b39237
Compare
I implemented the uniqueness as requested. The top-level is not touched. |
I wouldn't say "desired", but I think it's a good compromise between backwards compatibility (you were able to duplicate keys before) and not deduplicating at all. Another possibility would be to deduplicate everything once |
8b39237
to
ec03063
Compare
To me, changing the behavior of the top-level based on a key being present would be unintuitive. |
Having thought some more about this, I tend to agree that removing duplication in generally should be OK. It's mainly breaking in the sense that if you re-encrypt a file that has duplicated keys (like when editing the encrypted content), suddenly some keys are removed, which can be quite confusing for users. But as long as we explicitly announce deduplication in the changelog, I think it should be OK. (I would also mention it in the PR's title, so it shows up prominently in the git commit log.) |
ec03063
to
78b2ab1
Compare
merge
key for key groupsmerge
key for key groups and *make keys unique*
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.
Looks good to me. Let's wait a bit more whether someone comments on #1493 (comment).
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
closes getsops#1123 Signed-off-by: Jonas Badstübner <[email protected]>
78b2ab1
to
a1738b7
Compare
@jonasbadstuebner thanks for your contribution! |
This closes #1123
The test is not very great (as in: "It doesn't check very much"), but since it was not too hard to implement, I think this is okay.
If you have any comments, please let me know.