update lua-resty-healthcheck to version 2.2.0 .#1417
Merged
Conversation
moonming
approved these changes
Apr 8, 2020
SaberMaster
pushed a commit
to SaberMaster/incubator-apisix
that referenced
this pull request
Jun 30, 2020
shreemaan-abhishek
added a commit
to shreemaan-abhishek/apisix
that referenced
this pull request
Apr 30, 2026
Cover the four scenarios the fix addresses end-to-end via stream sockets: service status disable, re-enable, deletion, and recreation. Each asserts that route matching reflects the new service state once the rebuild path runs. Ports the test file from api7-ee apache#1417 (the source PR for this backport) which was omitted from the initial port.
shreemaan-abhishek
added a commit
that referenced
this pull request
May 7, 2026
* fix: rebuild stream router when services change * test: add integration tests for stream router rebuild on service change Cover the four scenarios the fix addresses end-to-end via stream sockets: service status disable, re-enable, deletion, and recreation. Each asserts that route matching reflects the new service state once the rebuild path runs. Ports the test file from api7-ee #1417 (the source PR for this backport) which was omitted from the initial port. * fix: skip stream routes whose service is missing or disabled The previous commit started rebuilding the stream router whenever services.conf_version changes, but the rebuild produced the same routing decisions because create_router() didn't actually consult service status — service_fetch wasn't even imported in this file. Add the missing service_id enforcement at the top of the iteration loop: - If a stream_route references a service_id whose service can't be fetched (deleted, or not yet synced from etcd), log 'failed to fetch service configuration by id: <id>' and skip the route. - If the service status is 0 (explicitly disabled), skip the route. Combined with the conf_version trigger from the previous commit, a service status flip / delete / late-sync now propagates into routing decisions on the next match() call. This is what the integration tests added in t/stream-node/service-change-rebuild-router.t exercise; without this patch, TESTs 2-4 fail because the disabled / deleted service is ignored at routing time. Signed-off-by: Abhishek Choudhary <[email protected]> * refactor(stream-router): drop unreachable service lookup in rebuild Apisix admin guarantees stream_routes' referenced services exist (referenced services cannot be deleted), and the services schema does not expose a status field, so there is no actionable outcome from a per-route service fetch. Rebuilding on services.conf_version is enough. Refocus the integration test on what apisix exposes: update the bound service and verify routing continues to match through the conf_version-driven rebuild. --------- Signed-off-by: Abhishek Choudhary <[email protected]>
wistefan
pushed a commit
to wistefan/apisix
that referenced
this pull request
Jun 16, 2026
* fix: rebuild stream router when services change * test: add integration tests for stream router rebuild on service change Cover the four scenarios the fix addresses end-to-end via stream sockets: service status disable, re-enable, deletion, and recreation. Each asserts that route matching reflects the new service state once the rebuild path runs. Ports the test file from api7-ee apache#1417 (the source PR for this backport) which was omitted from the initial port. * fix: skip stream routes whose service is missing or disabled The previous commit started rebuilding the stream router whenever services.conf_version changes, but the rebuild produced the same routing decisions because create_router() didn't actually consult service status — service_fetch wasn't even imported in this file. Add the missing service_id enforcement at the top of the iteration loop: - If a stream_route references a service_id whose service can't be fetched (deleted, or not yet synced from etcd), log 'failed to fetch service configuration by id: <id>' and skip the route. - If the service status is 0 (explicitly disabled), skip the route. Combined with the conf_version trigger from the previous commit, a service status flip / delete / late-sync now propagates into routing decisions on the next match() call. This is what the integration tests added in t/stream-node/service-change-rebuild-router.t exercise; without this patch, TESTs 2-4 fail because the disabled / deleted service is ignored at routing time. Signed-off-by: Abhishek Choudhary <[email protected]> * refactor(stream-router): drop unreachable service lookup in rebuild Apisix admin guarantees stream_routes' referenced services exist (referenced services cannot be deleted), and the services schema does not expose a status field, so there is no actionable outcome from a per-route service fetch. Rebuilding on services.conf_version is enough. Refocus the integration test on what apisix exposes: update the bound service and verify routing continues to match through the conf_version-driven rebuild. --------- Signed-off-by: Abhishek Choudhary <[email protected]>
This file contains hidden or 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
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.
fixed bug
Kong/lua-resty-healthcheck#36
mail list: https://lists.apache.org/thread.html/rb607651e8992be6d478e0eda3f08657857725c4c81c4acc8c3ccb171%40%3Cdev.apisix.apache.org%3E