Skip to content

fix(admin): fix secrets do not support to update attributes by PATCH#9510

Merged
juststillthinking merged 3 commits into
apache:masterfrom
An-DJ:fix-secrets-bug
May 24, 2023
Merged

fix(admin): fix secrets do not support to update attributes by PATCH#9510
juststillthinking merged 3 commits into
apache:masterfrom
An-DJ:fix-secrets-bug

Conversation

@An-DJ

@An-DJ An-DJ commented May 19, 2023

Copy link
Copy Markdown
Contributor

Description

Permit updating the selected attributes of the specified, existing secrets by PATCH.

Fixes #9503

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@An-DJ An-DJ changed the title Fix secrets bug fix(admin): fix secrets do not support to update its attributes by PATCH May 19, 2023
@An-DJ An-DJ changed the title fix(admin): fix secrets do not support to update its attributes by PATCH fix(admin): fix secrets do not support to update attributes by PATCH May 19, 2023
@An-DJ

An-DJ commented May 19, 2023

Copy link
Copy Markdown
Contributor Author

@soulbird plz take a look : )

Comment thread t/admin/secrets.t
assert(prev_update_time ~= nil, "update_time is nil")
ngx.sleep(1)

local code, body = t('/apisix/admin/secrets/vault/test1',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which field was modified? Didn't see how you verified the execution result of PATCH?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TEST 4 changes the token to "unknown" by PATCH on path, then TEST 5 changes the token back to "apisix" by PATCH.

@juststillthinking
juststillthinking merged commit d720047 into apache:master May 24, 2023
@An-DJ
An-DJ deleted the fix-secrets-bug branch May 24, 2023 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: The path parameter must be provided when updating the Secret resource with the PATCH method

3 participants