Skip to content

Conversation

@k-a-il
Copy link
Contributor

@k-a-il k-a-il commented Aug 19, 2025

Motivation

This PR introduces a plugin AWS license catalog which will be used to customize error messages for unimplemented AWS services or operations.

Downloading and loading of the license catalog is not implemented in this PR and will be completed in the next PR.

Changes

  • Add new license catalog plugin

@k-a-il k-a-il requested a review from bentsku August 19, 2025 14:59
@k-a-il k-a-il self-assigned this Aug 19, 2025
@k-a-il k-a-il changed the base branch from main to iac/catalog-skeleton August 19, 2025 14:59
@k-a-il k-a-il added the semver: patch Non-breaking changes which can be included in patch releases label Aug 19, 2025
@github-actions
Copy link

github-actions bot commented Aug 19, 2025

S3 Image Test Results (AMD64 / ARM64)

    2 files    2 suites   8m 18s ⏱️
  515 tests 465 ✅  50 💤 0 ❌
1 030 runs  930 ✅ 100 💤 0 ❌

Results for commit 961dbee.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Aug 19, 2025

Test Results - Preflight, Unit

22 157 tests  +12   20 419 ✅ +12   6m 25s ⏱️ -17s
     1 suites ± 0    1 738 💤 ± 0 
     1 files   ± 0        0 ❌ ± 0 

Results for commit 0688e84. ± Comparison against base commit d5c781e.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@bentsku bentsku left a comment

Choose a reason for hiding this comment

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

This is nice 👌 super nice to see how easy it is to plug into this! this is only a pre-review as I got the notification, I'm still unsure how we are going to extend the behavior from Pro. Might be good to try it already to see how we could do it, and adapt the code in consequence? You might be on it already 😄

Comment on lines 46 to 50
def map_catalog_availability_to_exception(
service_name: str,
operation_name: str | None,
support_status: AwsServicesSupportInLatest | AwsServiceOperationsSupportInLatest,
) -> AwsServiceAvailabilityException:
Copy link
Contributor

Choose a reason for hiding this comment

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

question: how will we extend this with more possible values in the Pro version? we might want to aim for it to be extended transparently, as we won't be able to plug into the Skeleton.on_not_implemented_error function directly to modify which function is being called.

We could probably patch it, and execute some code before deferring the logic to this function? maybe there are better ways. Patching might do, we're also using it for our AWS routing.

@k-a-il
Copy link
Contributor Author

k-a-il commented Aug 19, 2025

This is nice 👌 super nice to see how easy it is to plug into this! this is only a pre-review as I got the notification, I'm still unsure how we are going to extend the behavior from Pro. Might be good to try it already to see how we could do it, and adapt the code in consequence? You might be on it already 😄

Thanks, yes, I will extend this in pro tomorrow :) I also want to see how the whole integration will work before merging this PR

@k-a-il k-a-il requested a review from a team August 19, 2025 15:26
@github-actions
Copy link

github-actions bot commented Aug 19, 2025

LocalStack Community integration with Pro

    2 files  ± 0      2 suites  ±0   1h 54m 54s ⏱️ - 1m 19s
4 670 tests +11  4 339 ✅ +11  331 💤 ±0  0 ❌ ±0 
4 672 runs  +11  4 339 ✅ +11  333 💤 ±0  0 ❌ ±0 

Results for commit 0688e84. ± Comparison against base commit d5c781e.

♻️ This comment has been updated with latest results.

@k-a-il k-a-il added this to the 4.9 milestone Sep 4, 2025
@k-a-il k-a-il marked this pull request as ready for review September 5, 2025 11:47
@k-a-il k-a-il requested a review from thrau as a code owner September 5, 2025 11:47
@k-a-il k-a-il removed the request for review from thrau September 5, 2025 11:49
Copy link
Member

@silv-io silv-io left a comment

Choose a reason for hiding this comment

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

LGTM! It's all very clean and easily understandable 😄🚀

I basically only have super minor nitpicks and some conceptual questions

Copy link
Contributor

@bentsku bentsku left a comment

Choose a reason for hiding this comment

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

very nice addition with the plugins 🚀 thanks for addressing the comments, and making this looking really great and extendable!

I believe the RemoteCatalogLoader is currently broken and will break the functionality all together, but once this is addressed, I think we would be good to go 👍

Only have a few comments, agreeing with Silvio, and added some more related to some Enum being returned. Nice work 👌

@k-a-il k-a-il changed the base branch from iac/catalog-skeleton to main September 8, 2025 16:06
@k-a-il k-a-il added the docs: needed Pull request requires documentation updates label Sep 8, 2025
@k-a-il k-a-il requested a review from sannya-singal September 8, 2025 16:07
@k-a-il k-a-il force-pushed the iac/service-operation-exceptions branch from b2b69dc to 92e58e9 Compare September 15, 2025 07:11
@k-a-il k-a-il changed the title IaC: provide custom error messages based on AWS catalog data IaC: Add AWS operations and CFN resources catalog Sep 15, 2025
@github-actions
Copy link

github-actions bot commented Sep 15, 2025

Test Results (amd64) - Acceptance

7 tests  ±0   5 ✅ ±0   3m 8s ⏱️ -9s
1 suites ±0   2 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit 0688e84. ± Comparison against base commit d5c781e.

♻️ This comment has been updated with latest results.

@k-a-il
Copy link
Contributor Author

k-a-il commented Sep 15, 2025

I removed integration to service and skeleton to merge this PR faster

@github-actions
Copy link

github-actions bot commented Sep 15, 2025

Test Results (amd64) - Integration, Bootstrap

    5 files      5 suites   2h 37m 39s ⏱️
5 044 tests 4 553 ✅ 491 💤 0 ❌
5 050 runs  4 553 ✅ 497 💤 0 ❌

Results for commit 0688e84.

♻️ This comment has been updated with latest results.

@bentsku bentsku self-requested a review September 15, 2025 15:01
Copy link
Contributor

@bentsku bentsku left a comment

Choose a reason for hiding this comment

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

LGTM, I only have some questions around the fallback for the Pro "runtime-only" Catalog, but this could also be addressed in a follow-up PR 👍, once we know more.

Thanks for splitting the PR so that we don't alter the behavior right away! 🚀

Comment on lines 19 to 24
except Exception as e:
LOG.debug(
"Failed to load catalog plugin with the latest LocalStack services support data, falling back to catalog without remote state: %s",
e,
)
return plugin_manager.load("aws-catalog-runtime-only")
Copy link
Contributor

@bentsku bentsku Sep 15, 2025

Choose a reason for hiding this comment

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

something I missed: I believe we should maybe raise a specific exception we would have subclassed ourselves in case we have a failure in the RemoteCatalogLoader, so that we could probably guard only against this? because here, if we have any kind of exceptions when instantiating the Catalog, we would fallback, even if the exception is something we should fix, like a Key error or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Notes from discussion: agreed that for now it is ok to fall back to the default runtime catalog in case any exception is thrown during catalog initialization.

@k-a-il k-a-il merged commit 58400c1 into main Sep 17, 2025
42 checks passed
@k-a-il k-a-il deleted the iac/service-operation-exceptions branch September 17, 2025 15:45
@alexrashed alexrashed added the notes: skip Pull request does not have to be mentioned in the release notes label Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs: needed Pull request requires documentation updates notes: skip Pull request does not have to be mentioned in the release notes semver: patch Non-breaking changes which can be included in patch releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants