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 bathPathMapping filtering with the allowPathMatching enabled. #614

Merged
merged 2 commits into from Jan 30, 2024

Conversation

rddimon
Copy link
Collaborator

@rddimon rddimon commented Jan 29, 2024

Fixes #613

Description of Issue Fixed

Changes proposed in this pull request:

  • Fix bathPathMapping filtering with the allowPathMatching enabled.
  • Updated Readme
  • Added integration test
  • Updated packages

Comment on lines +350 to +353
if (domain.allowPathMatching) {
return mapping.basePath === domain.basePath;
}
})).finally(() => {
Logging.printDomainSummary(this.domains);
return mapping.apiId === domain.apiId;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main change is next:

return mapping.apiId === domain.apiId || (
    mapping.basePath === domain.basePath && domain.allowPathMatching
);

Changed to:

if (domain.allowPathMatching) {
          return mapping.basePath === domain.basePath;
}
return mapping.apiId === domain.apiId;

Copy link

sonarcloud bot commented Jan 30, 2024

Quality Gate Failed Quality Gate failed

Failed conditions

3.9% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@amplify-self-hosted-runners
Copy link

Check Name Conclusion Summary Output
SonarCloud Code Analysis failure Quality Gate failed output
Codacy Static Code Analysis success Your pull request is up to standards! output
Mend Security Check neutral Security Report output
Mend License Check neutral License Report output
test (14.x) success test (14.x) output
test (16.x) success test (16.x) output
test (18.x) success test (18.x) output
test (20.x) success test (20.x) output

@rddimon rddimon self-assigned this Jan 30, 2024
@rddimon rddimon added the bug label Jan 30, 2024
@rddimon rddimon merged commit e88cddb into main Jan 30, 2024
7 of 9 checks passed
@rddimon rddimon deleted the bugfix/AT-11104-update-base-path-mapping branch January 30, 2024 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to update base path mapping
3 participants