-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
feat(testing): add reconfiguration completion detection mechanism #11581
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR is marked as stale because it has been open for 14 days with no activity. |
bungle
approved these changes
Oct 24, 2023
hanshuebner
force-pushed
the
feat/reconfiguration-detection
branch
from
October 25, 2023 14:35
ba7ff2c
to
858d479
Compare
hanshuebner
changed the title
feat(testing): add X-Kong-If-Reconfigured-Since header
feat(testing): add reconfiguration completion detection mechanism
Oct 25, 2023
hanshuebner
force-pushed
the
feat/reconfiguration-detection
branch
from
October 26, 2023 07:09
72b5454
to
0fb457b
Compare
hanshuebner
force-pushed
the
feat/reconfiguration-detection
branch
2 times, most recently
from
October 26, 2023 08:56
4d2121c
to
0ef54bc
Compare
hanshuebner
force-pushed
the
feat/reconfiguration-detection
branch
from
October 26, 2023 09:31
0ef54bc
to
41f3180
Compare
samugi
reviewed
Oct 26, 2023
hanshuebner
force-pushed
the
feat/reconfiguration-detection
branch
from
October 26, 2023 13:48
d92c52b
to
45d2066
Compare
This change adds a new response header X-Kong-Transaction-Id to the Admin API. It contains the (ever incrementing) PostgreSQL transaction ID of the change that was made. The value can then be put into the X-If-Kong-Transaction-Id variable in a request to the proxy path. The request will be rejected with a 503 error if the proxy path has not been reconfigured yet with this or a later transaction id. The mechanism is useful in testing, when changes are made through the Admin API and the effects on the proxy path are then to be verified. Rather than waiting for a static period or retrying the proxy path request until the expected result is received, the proxy path client specifies the last transaction ID received from the Admin API in the X-If-Kong-Transaction-Id header and retries the request if a 503 error is received.
hanshuebner
force-pushed
the
feat/reconfiguration-detection
branch
from
October 27, 2023 07:53
45d2066
to
2adca37
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Superseded by #11941
This change adds a new response header X-Kong-Transaction-Id to the Admin API. It contains the (ever incrementing) PostgreSQL transaction ID of the change that was made. The value can then be put into the X-If-Kong-Transaction-Id variable in a request to the proxy path. The request will be rejected with a 503 error if the proxy path has not been reconfigured yet with this or a later transaction id.
The mechanism is useful in testing, when changes are made through the Admin API and the effects on the proxy path are then to be verified. Rather than waiting for a static period or retrying the proxy path request until the expected result is received, the proxy path client specifies the last transaction ID received from the Admin API in the X-If-Kong-Transaction-Id header and retries the request if a 503 error
is received.
Docs:
Checklist
CHANGELOG/unreleased/kong
or addingskip-changelog
label on PR if unnecessary. README.mdIssue reference
KAG-2759