[TT-4023] Track 404 logs not showing in listening port when changing control api port#7976
Conversation
|
This PR addresses an issue where 404 (Not Found) logs were not being generated on the main gateway listening port when the control API was configured on a separate port. The root cause was that the The fix centralizes the assignment of the Additionally, the 404 log entry has been enhanced to include the Files Changed Analysis
Architecture & Impact Assessment
graph TD
subgraph "Before"
A["loadApps() for Control API"] --> B["Control API Router"];
B -- sets handler --> C("router.NotFoundHandler = handle404");
D["startServer() for Main Listener"] --> E["Main Listener Router"];
E -- handler not set --> F((No 404 Logging));
end
subgraph "After"
G["loadApps() for Control API"] --> H["Control API Router"];
H --> I["proxyMux.setRouter()"];
J["startServer() for Main Listener"] --> K["Main Listener Router"];
K --> I;
I -- sets handler on ALL routers --> L("router.NotFoundHandler = handle404");
end
Scope Discovery & Context ExpansionThe change is strategically placed in References
Metadata
Powered by Visor from Probelabs Last updated: 2026-05-15T06:37:50.824Z | Triggered by: pr_updated | Commit: 940b316 💡 TIP: You can chat with Visor using |
✅ Security Check PassedNo security issues found – changes LGTM. ✅ Security Check PassedNo security issues found – changes LGTM. \n\nArchitecture Issues (2)
✅ Performance Check PassedNo performance issues found – changes LGTM. Quality Issues (1)
Powered by Visor from Probelabs Last updated: 2026-05-15T06:37:23.921Z | Triggered by: pr_updated | Commit: 940b316 💡 TIP: You can chat with Visor using |
|
API Changes no api changes detected |
…ening-port-when-changing-control-api-port
…ening-port-when-changing-control-api-port
…ening-port-when-changing-control-api-port
…ent than listen port
…ening-port-when-changing-control-api-port
MFCaballero
left a comment
There was a problem hiding this comment.
Hi @MaciekMis can you please add tests?
…ening-port-when-changing-control-api-port
…ening-port-when-changing-control-api-port
…ening-port-when-changing-control-api-port
Hey, |
|
…ening-port-when-changing-control-api-port
…ening-port-when-changing-control-api-port
🎯 Recommended Merge TargetsBased on JIRA ticket TT-4023: Track 404 logs not showing in listening port when changing control api port Fix Version: Tyk 5.8.15Required:
Fix Version: Tyk 5.13.1Required:
Fix Version: Tyk 5.14.0
Required:
📋 Workflow
|
…ening-port-when-changing-control-api-port
🚨 Jira Linter FailedCommit: The Jira linter failed to validate your PR. Please check the error details below: 🔍 Click to view error detailsNext Steps
This comment will be automatically deleted once the linter passes. |
|
|
/release to release-5.8 |
|
/release to release-5.13 |
|
✅ Cherry-pick successful. A PR was created: #8225 |
|
✅ Cherry-pick successful. A PR was created: #8226 |
…ening port when changing control api port (#7976) (#8225) [TT-4023] Track 404 logs not showing in listening port when changing control api port (#7976) <!-- Provide a general summary of your changes in the Title above --> ## Description <!-- Describe your changes in detail --> ## Related Issue <!-- This project only accepts pull requests related to open issues. --> <!-- If suggesting a new feature or change, please discuss it in an issue first. --> <!-- If fixing a bug, there should be an issue describing it with steps to reproduce. --> <!-- OSS: Please link to the issue here. Tyk: please create/link the JIRA ticket. --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? --> ## How This Has Been Tested <!-- Please describe in detail how you tested your changes --> <!-- Include details of your testing environment, and the tests --> <!-- you ran to see how your change affects other areas of the code, etc. --> <!-- This information is helpful for reviewers and QA. --> ## Screenshots (if appropriate) ## Types of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Refactoring or add test (improvements in base code or adds test coverage to functionality) ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply --> <!-- If there are no documentation updates required, mark the item as checked. --> <!-- Raise up any additional concerns not covered by the checklist. --> - [ ] I ensured that the documentation is up to date - [ ] I explained why this PR updates go.mod in detail with reasoning why it's required - [ ] I would like a code coverage CI quality gate exception and have explained why <!---TykTechnologies/jira-linter starts here--> ### Ticket Details <details> <summary> <a href="https://tyktech.atlassian.net/browse/TT-4023" title="TT-4023" target="_blank">TT-4023</a> </summary> | | | |---------|----| | Status | In Test | | Summary | Track 404 logs not showing in listening port when changing control api port | Generated at: 2026-05-15 09:20:51 </details> <!---TykTechnologies/jira-linter ends here--> --------- Co-authored-by: Radosław Krawczyk <[email protected]> [TT-4023]: https://tyktech.atlassian.net/browse/TT-4023?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ Co-authored-by: Maciej Miś <[email protected]> Co-authored-by: Radosław Krawczyk <[email protected]>
…ning port when changing control api port (#7976) (#8226) [TT-4023] Track 404 logs not showing in listening port when changing control api port (#7976) <!-- Provide a general summary of your changes in the Title above --> ## Description <!-- Describe your changes in detail --> ## Related Issue <!-- This project only accepts pull requests related to open issues. --> <!-- If suggesting a new feature or change, please discuss it in an issue first. --> <!-- If fixing a bug, there should be an issue describing it with steps to reproduce. --> <!-- OSS: Please link to the issue here. Tyk: please create/link the JIRA ticket. --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? --> ## How This Has Been Tested <!-- Please describe in detail how you tested your changes --> <!-- Include details of your testing environment, and the tests --> <!-- you ran to see how your change affects other areas of the code, etc. --> <!-- This information is helpful for reviewers and QA. --> ## Screenshots (if appropriate) ## Types of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Refactoring or add test (improvements in base code or adds test coverage to functionality) ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply --> <!-- If there are no documentation updates required, mark the item as checked. --> <!-- Raise up any additional concerns not covered by the checklist. --> - [ ] I ensured that the documentation is up to date - [ ] I explained why this PR updates go.mod in detail with reasoning why it's required - [ ] I would like a code coverage CI quality gate exception and have explained why <!---TykTechnologies/jira-linter starts here--> ### Ticket Details <details> <summary> <a href="https://tyktech.atlassian.net/browse/TT-4023" title="TT-4023" target="_blank">TT-4023</a> </summary> | | | |---------|----| | Status | In Test | | Summary | Track 404 logs not showing in listening port when changing control api port | Generated at: 2026-05-15 09:20:51 </details> <!---TykTechnologies/jira-linter ends here--> --------- Co-authored-by: Radosław Krawczyk <[email protected]> [TT-4023]: https://tyktech.atlassian.net/browse/TT-4023?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ Co-authored-by: Maciej Miś <[email protected]> Co-authored-by: Radosław Krawczyk <[email protected]>



Description
Related Issue
Motivation and Context
How This Has Been Tested
Screenshots (if appropriate)
Types of changes
Checklist
Ticket Details
TT-4023
Generated at: 2026-05-15 06:36:31