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: Fix handling unavailable services #3879

Merged
merged 54 commits into from
Nov 14, 2024
Merged

Conversation

pj892031
Copy link
Contributor

@pj892031 pj892031 commented Nov 6, 2024

Description

The new Gateway contains a couple of bugs about unavailable services. The response of Gateway is incorrect:

  • when no ZAAS is onboarded and the request treatment requires any it returns 503, but if the ZAAS is onboarded and down, the authentication treatment is omitted
    • now response code 503 is always (if there is no onboarded ZAAS or all are down)
  • if the first ZAAS is down, the rest are not called and GW returns 500
    • the fix skip the invalid call and try the next one
  • if a service instance is down the load balancer does not try the next instance
    • the impact is limited because of repeating (see 5 attempts)
    • the fix skip unavailable service and try the next one
  • error handling of ServiceNotAccessibleException is incorrect
    • it generates a mix of 500 and 503 responses because of missing argument URL
    • fix to show the correct message
  • the response from ZAAS other than 401 and 200 is incorrectly processed in case of the latest instance to try a call
    • it could lead to propagating wrong credentials (ie. Basic null:null for passticket)

Linked to #3878 (a follow up of #3871)

Type of change

Please delete options that are not relevant.

  • fix: Bug fix (non-breaking change which fixes an issue)
  • feat: New feature (non-breaking change which adds functionality)
  • docs: Change in a documentation
  • refactor: Refactor the code
  • chore: Chore, repository cleanup, updates the dependencies.
  • BREAKING CHANGE or !: Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the style guidelines of this project
  • PR title conforms to commit message guideline ## Commit Message Structure Guideline
  • I have commented my code, particularly in hard-to-understand areas. In JS I did provide JSDoc
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The java tests in the area I was working on leverage @nested annotations
  • Any dependent changes have been merged and published in downstream modules

For more details about how should the code look like read the Contributing guideline

pj892031 and others added 30 commits October 25, 2024 17:08
Signed-off-by: ac892247 <[email protected]>
Signed-off-by: ac892247 <[email protected]>
Signed-off-by: ac892247 <[email protected]>
Signed-off-by: ac892247 <[email protected]>
Signed-off-by: ac892247 <[email protected]>
Signed-off-by: ac892247 <[email protected]>
Signed-off-by: ac892247 <[email protected]>
Signed-off-by: ac892247 <[email protected]>
Signed-off-by: Pavel Jareš <[email protected]>
Signed-off-by: Pavel Jareš <[email protected]>
Signed-off-by: Pavel Jareš <[email protected]>
Signed-off-by: Pavel Jareš <[email protected]>
Signed-off-by: Pavel Jareš <[email protected]>
achmelo and others added 2 commits November 6, 2024 13:36
Signed-off-by: Pavel Jareš <[email protected]>
Base automatically changed from reboot/fix-zaas-responses to v3.x.x November 6, 2024 13:06
@pj892031 pj892031 marked this pull request as ready for review November 7, 2024 08:54
@pj892031 pj892031 requested a review from achmelo November 7, 2024 08:56
Copy link

sonarcloud bot commented Nov 13, 2024

@pj892031 pj892031 merged commit d285a33 into v3.x.x Nov 14, 2024
27 checks passed
@pj892031 pj892031 deleted the reboot/fix-unavailable-services branch November 14, 2024 08:01
nxhafa pushed a commit to nxhafa/api-layer that referenced this pull request Nov 20, 2024
Signed-off-by: Pavel Jareš <[email protected]>
Signed-off-by: ac892247 <[email protected]>
Signed-off-by: Pavel Jareš <[email protected]>
Co-authored-by: ac892247 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

2 participants