Skip to content

Conversation

bentsku
Copy link
Contributor

@bentsku bentsku commented Mar 15, 2023

This PR implements the validation when deleting a Model resource: it will check if it's in use in any Method of the RestAPI, and it is, will reject the call. This allows us to not have any integration calling a non existing Model anymore.

This logic will also be applied to RequestValidator, and maybe some other resources. We will extract the logic then into something more general when applying it to other resources.

@coveralls
Copy link

coveralls commented Mar 15, 2023

Coverage Status

Coverage: 85.133% (+0.02%) from 85.111% when pulling 476e2d8 on apigw-models-conflict into e1f6be5 on apigw-parity-work-models.

@bentsku bentsku force-pushed the apigw-parity-work-models branch from ea9006d to e1f6be5 Compare March 16, 2023 11:11
@bentsku bentsku force-pushed the apigw-models-conflict branch from 25ed6ec to aceccb0 Compare March 16, 2023 11:20
Base automatically changed from apigw-parity-work-models to master March 16, 2023 13:18
@bentsku bentsku force-pushed the apigw-models-conflict branch from 476e2d8 to 59fc4a9 Compare March 16, 2023 13:20
@bentsku bentsku temporarily deployed to localstack-ext-tests March 16, 2023 13:20 — with GitHub Actions Inactive
@bentsku bentsku changed the title wip: implement apigw Model validation if in use by a Method implement apigw Model validation if in use by a Method Mar 16, 2023
@bentsku bentsku self-assigned this Mar 16, 2023
@bentsku bentsku added the aws:apigateway Amazon API Gateway label Mar 16, 2023
@github-actions
Copy link

github-actions bot commented Mar 16, 2023

LocalStack integration with Pro

       3 files  ±  0         3 suites  ±0   1h 41m 26s ⏱️ - 1m 37s
1 807 tests +11  1 425 ✔️ +11  382 💤 ±0  0 ±0 
2 525 runs  +11  1 791 ✔️ +11  734 💤 ±0  0 ±0 

Results for commit 0675706. ± Comparison against base commit 77aab87.

♻️ This comment has been updated with latest results.

@bentsku bentsku temporarily deployed to localstack-ext-tests March 16, 2023 18:45 — with GitHub Actions Inactive
@bentsku bentsku requested a review from whummer March 16, 2023 18:45
@bentsku bentsku marked this pull request as ready for review March 16, 2023 18:45
@bentsku bentsku requested a review from calvernaz as a code owner March 16, 2023 18:45
Copy link
Member

@whummer whummer left a comment

Choose a reason for hiding this comment

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

Great to see this validation @bentsku - and as usual, kudos for the comprehensive snapshot tests! 🚀

I only have one comment about using a computed property/function rather than storing redundant mappings, otherwise LGTM!

@bentsku bentsku temporarily deployed to localstack-ext-tests March 17, 2023 12:46 — with GitHub Actions Inactive
@bentsku bentsku requested a review from whummer March 17, 2023 12:46
Copy link
Member

@whummer whummer left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@bentsku bentsku merged commit 8456a3f into master Mar 18, 2023
@bentsku bentsku deleted the apigw-models-conflict branch March 18, 2023 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:apigateway Amazon API Gateway
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants