feat: Refactor secret values#3225
Conversation
|
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with |
deiga
left a comment
There was a problem hiding this comment.
Changing the migration test input state doesn't seem correct, could you verify?
dcb06d3 to
e363fd4
Compare
Signed-off-by: Steve Hipwell <steve.hipwell@gmail.com>
e363fd4 to
08a6dc7
Compare
|
@robert-crandall please could you give this a review? |
robert-crandall
left a comment
There was a problem hiding this comment.
Before this PR, key_id had ConflictsWith: ["plaintext_value"], meaning key_id + encrypted_value was an explicitly documented (and valid) pattern. The docs said: "This should be provided when setting encrypted_value".
After this PR, key_id gains RequiredWith: ["value_encrypted"]. This means: if key_id is set in config, value_encrypted must also be set. Any user who currently has key_id = "..." alongside encrypted_value = "..." will get a plan-time validation failure immediately on upgrading, despite encrypted_value being nominally "deprecated but still supported."
The fix is either:
- Remove
RequiredWithfromkey_id(users relying on deprecatedencrypted_value + key_idshouldn't be broken), or - Add
"encrypted_value"to theRequiredWithlist:RequiredWith: []string{"value_encrypted", "encrypted_value"}(so both old and new usage pass), or - At minimum, document this as a breaking migration requirement with clear upgrade instructions.
|
@robert-crandall the analysis you've got above is muddled, Copilot I assume? I added the |
Signed-off-by: Steve Hipwell <steve.hipwell@gmail.com>
Resolves #ISSUE_NUMBER
Before the change?
key_idto be passed inAfter the change?
value&value_encrypted)value_wopatternvalue_encryptedrequireskey_idto be passed inPull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!