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

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

Merged
merged 3 commits into from
May 24, 2023

Conversation

An-DJ
Copy link
Contributor

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

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
Copy link
Contributor Author

An-DJ commented May 19, 2023

@soulbird plz take a look : )

assert(prev_update_time ~= nil, "update_time is nil")
ngx.sleep(1)

local code, body = t('/apisix/admin/secrets/vault/test1',
Copy link
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
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.

@monkeyDluffy6017 monkeyDluffy6017 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