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

chore(routing-policy): [CHK-3671] improve ecommerce routing policies performance #2763

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

dylantangredi-bvt
Copy link
Collaborator

@dylantangredi-bvt dylantangredi-bvt commented Feb 4, 2025

List of changes

  • add check on operationId to checkout and IO routing policies conditions

Motivation and context

The change was necessary to avoid potential ambiguity when routing by adding stricter conditions on operationIds

Type of changes

  • Add new resources
  • Update configuration to existing resources
  • Remove existing resources

Does this introduce a change to production resources with possible user impact?

  • Yes, users may be impacted applying this change
  • No

Does this introduce an unwanted change on infrastructure? Check terraform plan execution result

  • Yes
  • No

Other information

The backend urls will remain untouched (i.e. there will be no /v2 or /v2.1 set as endpoint based on the conditions). What will change are the conditions necessary for those existing base-urls to be set. For example, the pagopa-wallet-service will be the routing destination only if the operationId from the request is one of those specified in the relevant APIM openapi specifications file (there was no operationId discrimination before)

TESTS: tested after terraform apply on dev with checkout UI, Postman API calls and dev APIM calls.

Terraform targets:

  • module.apim_ecommerce_io_api_v2
  • module.apim_ecommerce_checkout_api_v1
  • module.apim_ecommerce_checkout_api_v2

If PR is partially applied, why? (reserved to mantainers)

…to startsWith to improve routing performance; add operationId to conditions to avoid potential ambiguity during routing;
@dylantangredi-bvt dylantangredi-bvt changed the title refactor(routing-policy): [CHK-3671] improve ecommerce routing policies performance chore(routing-policy): [CHK-3671] improve ecommerce routing policies performance Feb 4, 2025
replace local openapi paths and operationIds with APIM ones; revert conditions from startsWith to contains to prevent some urls from being excluded from routing correctly
@dylantangredi-bvt dylantangredi-bvt marked this pull request as ready for review February 5, 2025 11:47
@dylantangredi-bvt dylantangredi-bvt requested review from a team as code owners February 5, 2025 11:47
scaminati-bv
scaminati-bv previously approved these changes Feb 5, 2025
scaminati-bv
scaminati-bv previously approved these changes Feb 7, 2025
@scaminati-bv scaminati-bv removed their assignment Feb 7, 2025
sfarralorenzo
sfarralorenzo previously approved these changes Feb 10, 2025
CianoDanilo
CianoDanilo previously approved these changes Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants