Skip to content

chore: merge upstream into stacklet/integration and stamp 0.9.53a1 - #23

Merged
jtroup merged 24 commits into
stacklet/integrationfrom
elmo/cuddly-marmot
Sep 7, 2026
Merged

jtroup merged 24 commits into
stacklet/integrationfrom
elmo/cuddly-marmot

Conversation

@jtroup

@jtroup jtroup commented Sep 7, 2026 •

Copy link
Copy Markdown

ENG-8730

what

Merges upstream cloud-custodian a83dda5c9..e4c099e03 into
stacklet/integration and restamps the workspace onto a new alpha
series: c7n becomes 0.9.53a1+e4c099e03, with the provider and
tool packages bumped in step.

The merge was clean apart from the version fields in
pyproject.toml/c7n/version.py and the resulting uv.lock churn.
No Stacklet-side code changed.

Upstream content picked up:

  • core: dynamic tagging is centralised — the "default-value with no
    key" lookup pattern now applies to Azure and GCP as well as AWS,
    and ASG-specific tag logic shares a mixin with the generic path.
  • aws: new vpc-lattice-rule and SageMaker Studio (app,
    user-profile, space) resources; emr-serverless-app detail
    spec; members filter on cleanrooms collaborations; wafv2-enabled
    no longer ignores CLOUDFRONT scope; ForAnyValue handling in the
    cross-account filter; InternalServerException retried by default;
    IAM tag updates retried on concurrent modification; configurable
    server-side encryption for S3 policy log output.
  • azure: function app deployment uses an Entra ID bearer token instead
    of SCM basic auth; new budget, private DNS zone/record set and
    machine-learning-model-version resources; machine learning job
    archive action.
  • gcp: region-parented resources enumerate correctly when no explicit
    region is given; disk actions support regional persistent disks;
    cloud-run label mutations drop non-schema fields; notebook-v2 get
    and update-metadata actions; Vertex AI evaluation run resource.
  • k8s: resource listing follows pagination continuation tokens.
  • c7n-org: orgaccounts.py reads State rather than Status when
    deciding whether an account is active.

Upstream's 2026-08 dependency refresh is included.


🤖 Generated with Claude Code

jimfulton and others added 24 commits August 20, 2026 21:26
Signed-off-by: 1fanwang <1fannnw@gmail.com>
* releng - dependency updates 2026-08

* AzureResource security hub support

* accept MIT-0 (MIT no attribution) license from cffi
…10872)

---------

Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>
---------

Co-authored-by: Caleb Syring <caleb.syring@sixfeetup.com>
---------

Co-authored-by: Daniel Lindsley <daniel@sixfeetup.com>
Co-authored-by: AJ Kerrigan <aj@speckledmonkey.com>
…n#11053)

Adds azure.private-dns-zone and azure.private-record-set, bringing Private
DNS to parity with the existing dnszone/recordset support.

Private DNS record sets carry metadata rather than tags, so they join
public DNS record sets in arm_tags_unsupported.

Also fixes two test harness gaps found while recording the cassettes: the
subscription id sanitizer missed response bodies that escape slashes as
\/, and x-ms-operation-identifier response headers were recorded verbatim,
carrying the recording tenant and user object ids into cassettes.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
…cloud-custodian#10991)

Allow configuring server-side encryption for policy log uploads to the
S3 output via query parameters on the output url, eg
s3://bucket/prefix?sse=aws:kms&kms-key=alias/custodian. Supplying
kms-key implies aws:kms. Defaults to AES256 to preserve existing
behavior; aws:kms without a key falls back to the account's AWS managed
aws/s3 key.
…n is provided (cloud-custodian#11009)

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…cloud-custodian#11008)

* azure - functions - use Entra ID token for SCM deploy instead of basic auth
* azure - update function app runtime to python 3.12

---------

Co-authored-by: AJ Kerrigan <aj@stacklet.io>
…loud-custodian#11081)

ResourceQuery._invoke_client_enum made a single unpaginated API call
per resource type and discarded the continuation token, so passing
limit silently truncated results to just the first page. It now loops
until the server stops returning metadata._continue, and raises
PolicyExecutionError instead of silently dropping already-fetched
items if a later page's response shape is unexpected.

Verified against a real kube-apiserver (recorded as the new flight
data fixture) and independently against a real k3s cluster.
* Centralize dynamic tag lookup logic where possible
* Extend the "default-value with no key" pattern from AWS to GCP & Azure
* Fix aws.asg-specific tag logic, and extract shared behavior between ASG & generic tag logic into a mixin
@jtroup
jtroup requested a review from a team as a code owner September 7, 2026 13:46
@greptile-apps

greptile-apps Bot commented Sep 7, 2026

Copy link
Copy Markdown

Too many files changed for review (258 files, 100 file limit).

Bypass the limit by tagging @greptile-apps to review.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

21 issues found across 258 files

Not reviewed (too large): tools/c7n_gcp/tests/data/flights/disk-regional-delete/get-compute.googleapis.com-compute-v1-projects-cloud-custodian-aggregated-disks_1.json (~2,136 lines), tools/c7n_gcp/tests/data/flights/disk-regional-label/get-compute.googleapis.com-compute-v1-projects-cloud-custodian-aggregated-disks_1.json (~2,136 lines), tools/c7n_gcp/tests/data/flights/disk-regional-snapshot/get-compute.googleapis.com-compute-v1-projects-cloud-custodian-aggregated-disks_1.json (~2,136 lines) - if these are generated or fixture files, add them to ignored paths to exclude them from future reviews.

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="tools/c7n_azure/tests_azure/templates/machine-learning-model-version.json">

<violation number="1" location="tools/c7n_azure/tests_azure/templates/machine-learning-model-version.json:77">
P2: During fixture provisioning, ARM passes `{sub}`, `{rg}`, and `{ws}` literally, so Azure ML receives an invalid datastore URI instead of the deployed workspace URI. Build this value with `subscription().subscriptionId`, `resourceGroup().name`, and `variables('workspaceName')` in both model-version resources.</violation>
</file>

<file name="tests/terraform/lattice_rule_query_listener/main.tf">

<violation number="1" location="tests/terraform/lattice_rule_query_listener/main.tf:46">
P3: The entire second resource set (test_service2/test_listener2/test_rule2, lines 46-85) is unused: test_lattice_rule_query_listener only reads the first listener's listener_id, and no other test references these resources. Remove the block so the terraform fixture doesn't provision two services when one suffices.</violation>
</file>

<file name="tools/c7n_azure/tests_azure/templates/provision.sh">

<violation number="1" location="tools/c7n_azure/tests_azure/templates/provision.sh:299">
P2: When the subscription deployment fails, `deploy_resource` still reaches the success echo and returns 0. Append `|| return 1` so `provision.sh` reports the budget provisioning failure.</violation>
</file>

<file name="c7n/resources/iam.py">

<violation number="1" location="c7n/resources/iam.py:48">
P2: These tag actions used `QueryResourceManager.retry`, which retries `InternalServerException`; this replacement drops that transient error while adding `ConcurrentModification`. Include `InternalServerException` in `_iam_tag_retry` to preserve the existing retry behavior.</violation>
</file>

<file name="tools/c7n_azure/tests_azure/templates/cleanup.sh">

<violation number="1" location="tools/c7n_azure/tests_azure/templates/cleanup.sh:40">
P2: When the script is run using the template README's documented `az account set` setup, `AZURE_SUBSCRIPTION_ID` is unset. Derive the subscription ID from `az account show` or validate the environment variable before constructing this URL, otherwise budget cleanup silently leaves both subscription budgets behind.</violation>

<violation number="2" location="tools/c7n_azure/tests_azure/templates/cleanup.sh:41">
P2: When Azure returns an HTTP error for either budget DELETE, `curl` still exits successfully without `--fail`, so cleanup reports completion and leaves the budget behind. Make both requests fail or explicitly handle their status before continuing.</violation>
</file>

<file name="c7n/resources/cleanrooms.py">

<violation number="1" location="c7n/resources/cleanrooms.py:71">
P2: When `ListMembers` fails transiently while fetching a page, this wrapper does not retry the request because `paginate()` is lazy and only returns a `PageIterator`. Configure the paginator with `RetryPageIterator` before calling `build_full_result()`.</violation>
</file>

<file name="tools/c7n_azure/tests_azure/templates/machine-learning-job-archive.json">

<violation number="1" location="tools/c7n_azure/tests_azure/templates/machine-learning-job-archive.json:89">
P2: Provisioning this test template exposes the AML compute's remote-login port publicly. Disable public remote login, or restrict it through an explicit network configuration, because this template provisions real resources in the user's subscription.</violation>
</file>

<file name="tools/ops/azure/functionslc.py">

<violation number="1" location="tools/ops/azure/functionslc.py:99">
P1: When this tool runs in Azure China, Germany, or US Government, the hard-coded hostname points at the public Azure App Service endpoint instead of that cloud's SCM endpoint. Derive the SCM URI from the app's actual hostname or the selected cloud's App Service suffix rather than hard-coding `.azurewebsites.net`.</violation>

<violation number="2" location="tools/ops/azure/functionslc.py:102">
P2: When a remote build lasts longer than the bearer token lifetime, this cached token expires while `wait_for_remote_builds` continues polling. The loop treats the resulting authentication errors as `Active` and has no timeout, so refresh the token before polling or on a 401 instead of storing one token for the entire wait.</violation>
</file>

<file name="docs/source/gcp/examples/audit-event-recording.rst">

<violation number="1" location="docs/source/gcp/examples/audit-event-recording.rst:42">
P2: This basic-usage block is not runnable as shown: `@terraform` has no import, and `project_id` and `database_id` are referenced without definitions. Add the import and initialize those values, or clearly mark the omitted context, so readers do not copy a test that fails at collection or runtime.</violation>

<violation number="2" location="docs/source/gcp/examples/audit-event-recording.rst:188">
P2: When another project ID contains the recording project ID, `_sanitize` rewrites that reference too because it performs a global string replacement. Make replacement path-aware or qualify this statement instead of promising that other project references are left alone.</violation>
</file>

<file name="tests/terraform/vpc_lattice_rule/tf_resources.json">

<violation number="1" location="tests/terraform/vpc_lattice_rule/tf_resources.json:1">
P3: The new `vpc_lattice_rule` fixture is never referenced: no test in the tree decorates `@terraform('vpc_lattice_rule')` (tests/test_lattice.py uses the `lattice_rule_*` fixtures), and its `main.tf` is byte-identical to `lattice_rule_query_service/main.tf` with the same resource set. This is an orphaned duplicate of an existing fixture; drop it (or its separate resources) to avoid maintaining two copies of the same terraform test data.</violation>
</file>

<file name="tools/c7n_azure/c7n_azure/actions/tagging.py">

<violation number="1" location="tools/c7n_azure/c7n_azure/actions/tagging.py:80">
P2: Policies such as `tags: {enabled: true}` now pass validation but send a boolean or number to Azure, which rejects the tag update instead of failing policy validation. Keep the mapping value schema string-valued, or coerce values before building the Azure tags payload.</violation>

<violation number="2" location="tools/c7n_azure/c7n_azure/actions/tagging.py:112">
P2: When an existing Azure tag differs from the policy key only by case, conditional defaults do not recognize it as present and can overwrite it with the default. Normalize both existing tag keys and the requested name before calling `Lookup.resolve_value`.</violation>
</file>

<file name="c7n/resources/sagemaker.py">

<violation number="1" location="c7n/resources/sagemaker.py:1299">
P1: Event-mode resolution fails for these resources because `DescribeSource.get_resources()` filters the list response by `resource_type.id` before `augment()` runs. Since the list summaries lack the configured ARN key, this raises `KeyError` instead of resolving the event resource; add an ID-aware `get_resources()` path that describes the event resource before filtering.</violation>
</file>

<file name="tools/c7n_azure/c7n_azure/functionapp_utils.py">

<violation number="1" location="tools/c7n_azure/c7n_azure/functionapp_utils.py:109">
P1: When deploying in Azure China, Government, or German clouds, this URI targets the public App Service hostname and cannot reach the deployed Function App. Build the SCM URI from the app's cloud-specific `default_host_name` or the API-returned `scmUri` instead of hard-coding `.azurewebsites.net`.</violation>
</file>

<file name="tools/c7n_gcp/c7n_gcp/resources/compute.py">

<violation number="1" location="tools/c7n_gcp/c7n_gcp/resources/compute.py:510">
P2: When a disk audit event omits `protoPayload.resourceName`, `ApiAuditMode` passes its zonal labels unchanged, so this access raises `KeyError` instead of resolving the disk. Fall back to the existing `project_id`/`zone`/`disk_id` fields when no path is available.</violation>
</file>

<file name="tests/data/placebo/test_distribution_wafv2_filter_scope/cloudfront.ListDistributions_1.json">

<violation number="1" location="tests/data/placebo/test_distribution_wafv2_filter_scope/cloudfront.ListDistributions_1.json:15">
P3: LastModifiedTime is serialized as a bare dict without the `__class__: "datetime"` marker that placebo's deserializer requires to reconstruct a datetime object, so on replay this field stays a plain dict instead of a datetime. The current test never reads the field, so it passes, but the fixture deviates from the format every other recorded fixture uses (see test_distribution_wafv2's ListDistributions JSON). Add `"__class__": "datetime"` so the value round-trips correctly if any test later reads it.</violation>
</file>

<file name="tools/c7n_gcp/c7n_gcp/resources/vertexai.py">

<violation number="1" location="tools/c7n_gcp/c7n_gcp/resources/vertexai.py:826">
P2: When a policy uses this documented retention example, the list response lacks `completionTime`, so the age filter matches no evaluation runs. Use a field returned by `list` such as `createTime`, or enrich each resource before filtering; remove `completionTime` from `default_report_fields` as well.</violation>
</file>

<file name="tools/c7n_azure/tests_azure/tests_resources/terraform/budget/main.tf">

<violation number="1" location="tools/c7n_azure/tests_azure/tests_resources/terraform/budget/main.tf:46">
P2: Every Terraform plan reevaluates `timestamp()`, making both budgets non-idempotent and causing an update or replacement on each run. Use a stable input or a `time_static` resource for the budget start date.</violation>
</file>

Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
Tip: instead of fixing issues one by one fix them all with cubic

Re-trigger cubic

deployments[p.name] = {'scm_uri': creds.scm_uri, 'status': None}
log.info('Retrieved deployment credentials for %s policy', p.name)
app_name = params.function_app['name']
scm_uri = 'https://{}.scm.azurewebsites.net'.format(app_name)

@cubic-dev-ai cubic-dev-ai Bot Sep 7, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1: When this tool runs in Azure China, Germany, or US Government, the hard-coded hostname points at the public Azure App Service endpoint instead of that cloud's SCM endpoint. Derive the SCM URI from the app's actual hostname or the selected cloud's App Service suffix rather than hard-coding .azurewebsites.net.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At tools/ops/azure/functionslc.py, line 99:

<comment>When this tool runs in Azure China, Germany, or US Government, the hard-coded hostname points at the public Azure App Service endpoint instead of that cloud's SCM endpoint. Derive the SCM URI from the app's actual hostname or the selected cloud's App Service suffix rather than hard-coding `.azurewebsites.net`.</comment>

<file context>
@@ -94,13 +95,15 @@ def cli(**kwargs):
-            deployments[p.name] = {'scm_uri': creds.scm_uri, 'status': None}
-            log.info('Retrieved deployment credentials for %s policy', p.name)
+            app_name = params.function_app['name']
+            scm_uri = 'https://{}.scm.azurewebsites.net'.format(app_name)
+            token_scope = session.cloud_endpoints.endpoints.resource_manager.rstrip('/') \
+                + '/.default'
</file context>
Fix with cubic

class resource_type(TypeInfo):
service = 'sagemaker'
enum_spec = ('list_user_profiles', 'UserProfiles', None)
arn = id = 'UserProfileArn'

@cubic-dev-ai cubic-dev-ai Bot Sep 7, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1: Event-mode resolution fails for these resources because DescribeSource.get_resources() filters the list response by resource_type.id before augment() runs. Since the list summaries lack the configured ARN key, this raises KeyError instead of resolving the event resource; add an ID-aware get_resources() path that describes the event resource before filtering.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At c7n/resources/sagemaker.py, line 1299:

<comment>Event-mode resolution fails for these resources because `DescribeSource.get_resources()` filters the list response by `resource_type.id` before `augment()` runs. Since the list summaries lack the configured ARN key, this raises `KeyError` instead of resolving the event resource; add an ID-aware `get_resources()` path that describes the event resource before filtering.</comment>

<file context>
@@ -1261,3 +1261,140 @@ class resource_type(TypeInfo):
+    class resource_type(TypeInfo):
+        service = 'sagemaker'
+        enum_spec = ('list_user_profiles', 'UserProfiles', None)
+        arn = id = 'UserProfileArn'
+        name = 'UserProfileName'
+        date = 'CreationTime'
</file context>
Fix with cubic

# Use an Entra ID bearer token instead of SCM Basic Auth publishing credentials, so
# deployment works in tenants where Basic Auth is disabled by policy. Requires the
# deploying identity to hold Website Contributor (or equivalent) on the Function App.
scm_uri = 'https://{}.scm.azurewebsites.net'.format(app_name)

@cubic-dev-ai cubic-dev-ai Bot Sep 7, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1: When deploying in Azure China, Government, or German clouds, this URI targets the public App Service hostname and cannot reach the deployed Function App. Build the SCM URI from the app's cloud-specific default_host_name or the API-returned scmUri instead of hard-coding .azurewebsites.net.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At tools/c7n_azure/c7n_azure/functionapp_utils.py, line 109:

<comment>When deploying in Azure China, Government, or German clouds, this URI targets the public App Service hostname and cannot reach the deployed Function App. Build the SCM URI from the app's cloud-specific `default_host_name` or the API-returned `scmUri` instead of hard-coding `.azurewebsites.net`.</comment>

<file context>
@@ -98,16 +98,20 @@ def get_function_name(policy_name, suffix):
+        # Use an Entra ID bearer token instead of SCM Basic Auth publishing credentials, so
+        # deployment works in tenants where Basic Auth is disabled by policy. Requires the
+        # deploying identity to hold Website Contributor (or equivalent) on the Function App.
+        scm_uri = 'https://{}.scm.azurewebsites.net'.format(app_name)
+        token_scope = session.cloud_endpoints.endpoints.resource_manager.rstrip('/') + '/.default'
+        token = session.get_credentials().get_token(token_scope).token
</file context>
Fix with cubic

"apiVersion": "2023-04-01",
"name": "[format('{0}/{1}/{2}', variables('workspaceName'), parameters('modelName'), parameters('modelVersion'))]",
"properties": {
"modelUri": "azureml://subscriptions/{sub}/resourceGroups/{rg}/workspaces/{ws}/datastores/workspaceblobstore/paths/model.pkl",

@cubic-dev-ai cubic-dev-ai Bot Sep 7, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: During fixture provisioning, ARM passes {sub}, {rg}, and {ws} literally, so Azure ML receives an invalid datastore URI instead of the deployed workspace URI. Build this value with subscription().subscriptionId, resourceGroup().name, and variables('workspaceName') in both model-version resources.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At tools/c7n_azure/tests_azure/templates/machine-learning-model-version.json, line 77:

<comment>During fixture provisioning, ARM passes `{sub}`, `{rg}`, and `{ws}` literally, so Azure ML receives an invalid datastore URI instead of the deployed workspace URI. Build this value with `subscription().subscriptionId`, `resourceGroup().name`, and `variables('workspaceName')` in both model-version resources.</comment>

<file context>
@@ -0,0 +1,99 @@
+            "apiVersion": "2023-04-01",
+            "name": "[format('{0}/{1}/{2}', variables('workspaceName'), parameters('modelName'), parameters('modelVersion'))]",
+            "properties": {
+                "modelUri": "azureml://subscriptions/{sub}/resourceGroups/{rg}/workspaces/{ws}/datastores/workspaceblobstore/paths/model.pkl",
+                "modelType": "CustomModel",
+                "isArchived": false
</file context>
Fix with cubic

Comment on lines +299 to +300
az deployment sub create --location $resourceLocation --name cctest-budget \
--template-file $file --output None

@cubic-dev-ai cubic-dev-ai Bot Sep 7, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: When the subscription deployment fails, deploy_resource still reaches the success echo and returns 0. Append || return 1 so provision.sh reports the budget provisioning failure.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At tools/c7n_azure/tests_azure/templates/provision.sh, line 299:

<comment>When the subscription deployment fails, `deploy_resource` still reaches the success echo and returns 0. Append `|| return 1` so `provision.sh` reports the budget provisioning failure.</comment>

<file context>
@@ -294,6 +294,10 @@ deploy_resource() {
 
+    elif [[ "$fileName" == "budget.json" ]]; then
+
+        az deployment sub create --location $resourceLocation --name cctest-budget \
+            --template-file $file --output None
     elif [[ "$fileName" == "ai-foundry-application.json" ]]; then
</file context>
Suggested change
az deployment sub create --location $resourceLocation --name cctest-budget \
--template-file $file --output None
az deployment sub create --location $resourceLocation --name cctest-budget \
--template-file $file --output None || return 1
Fix with cubic

key: state
value: CANCELLED
- type: value
key: completionTime

@cubic-dev-ai cubic-dev-ai Bot Sep 7, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: When a policy uses this documented retention example, the list response lacks completionTime, so the age filter matches no evaluation runs. Use a field returned by list such as createTime, or enrich each resource before filtering; remove completionTime from default_report_fields as well.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At tools/c7n_gcp/c7n_gcp/resources/vertexai.py, line 826:

<comment>When a policy uses this documented retention example, the list response lacks `completionTime`, so the age filter matches no evaluation runs. Use a field returned by `list` such as `createTime`, or enrich each resource before filtering; remove `completionTime` from `default_report_fields` as well.</comment>

<file context>
@@ -787,6 +784,61 @@ class resource_type(VertexAITypeInfo):
+                    key: state
+                    value: CANCELLED
+              - type: value
+                key: completionTime
+                value_type: age
+                op: greater-than
</file context>
Fix with cubic

}

locals {
today = timestamp()

@cubic-dev-ai cubic-dev-ai Bot Sep 7, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: Every Terraform plan reevaluates timestamp(), making both budgets non-idempotent and causing an update or replacement on each run. Use a stable input or a time_static resource for the budget start date.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At tools/c7n_azure/tests_azure/tests_resources/terraform/budget/main.tf, line 46:

<comment>Every Terraform plan reevaluates `timestamp()`, making both budgets non-idempotent and causing an update or replacement on each run. Use a stable input or a `time_static` resource for the budget start date.</comment>

<file context>
@@ -0,0 +1,52 @@
+}
+
+locals {
+  today          = timestamp()
+  current_year   = formatdate("YYYY", local.today)
+  current_month  = formatdate("MM", local.today)
</file context>
Fix with cubic

}


resource "aws_vpclattice_service" "test_service2" {

@cubic-dev-ai cubic-dev-ai Bot Sep 7, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: The entire second resource set (test_service2/test_listener2/test_rule2, lines 46-85) is unused: test_lattice_rule_query_listener only reads the first listener's listener_id, and no other test references these resources. Remove the block so the terraform fixture doesn't provision two services when one suffices.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At tests/terraform/lattice_rule_query_listener/main.tf, line 46:

<comment>The entire second resource set (test_service2/test_listener2/test_rule2, lines 46-85) is unused: test_lattice_rule_query_listener only reads the first listener's listener_id, and no other test references these resources. Remove the block so the terraform fixture doesn't provision two services when one suffices.</comment>

<file context>
@@ -0,0 +1,85 @@
+}
+
+
+resource "aws_vpclattice_service" "test_service2" {
+  name      = "test-service2"
+  auth_type = "NONE"
</file context>
Fix with cubic

@@ -0,0 +1,194 @@
{

@cubic-dev-ai cubic-dev-ai Bot Sep 7, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: The new vpc_lattice_rule fixture is never referenced: no test in the tree decorates @terraform('vpc_lattice_rule') (tests/test_lattice.py uses the lattice_rule_* fixtures), and its main.tf is byte-identical to lattice_rule_query_service/main.tf with the same resource set. This is an orphaned duplicate of an existing fixture; drop it (or its separate resources) to avoid maintaining two copies of the same terraform test data.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At tests/terraform/vpc_lattice_rule/tf_resources.json, line 1:

<comment>The new `vpc_lattice_rule` fixture is never referenced: no test in the tree decorates `@terraform('vpc_lattice_rule')` (tests/test_lattice.py uses the `lattice_rule_*` fixtures), and its `main.tf` is byte-identical to `lattice_rule_query_service/main.tf` with the same resource set. This is an orphaned duplicate of an existing fixture; drop it (or its separate resources) to avoid maintaining two copies of the same terraform test data.</comment>

<file context>
@@ -0,0 +1,194 @@
+{
+    "pytest-terraform": 1,
+    "outputs": {},
</file context>
Fix with cubic

"Id": "E1EXAMPLE1234",
"ARN": "arn:aws:cloudfront::123456789012:distribution/E1EXAMPLE1234",
"Status": "Deployed",
"LastModifiedTime": {

@cubic-dev-ai cubic-dev-ai Bot Sep 7, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: LastModifiedTime is serialized as a bare dict without the __class__: "datetime" marker that placebo's deserializer requires to reconstruct a datetime object, so on replay this field stays a plain dict instead of a datetime. The current test never reads the field, so it passes, but the fixture deviates from the format every other recorded fixture uses (see test_distribution_wafv2's ListDistributions JSON). Add "__class__": "datetime" so the value round-trips correctly if any test later reads it.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At tests/data/placebo/test_distribution_wafv2_filter_scope/cloudfront.ListDistributions_1.json, line 15:

<comment>LastModifiedTime is serialized as a bare dict without the `__class__: "datetime"` marker that placebo's deserializer requires to reconstruct a datetime object, so on replay this field stays a plain dict instead of a datetime. The current test never reads the field, so it passes, but the fixture deviates from the format every other recorded fixture uses (see test_distribution_wafv2's ListDistributions JSON). Add `"__class__": "datetime"` so the value round-trips correctly if any test later reads it.</comment>

<file context>
@@ -0,0 +1,72 @@
+                    "Id": "E1EXAMPLE1234",
+                    "ARN": "arn:aws:cloudfront::123456789012:distribution/E1EXAMPLE1234",
+                    "Status": "Deployed",
+                    "LastModifiedTime": {
+                        "hour": 0,
+                        "microsecond": 0,
</file context>
Fix with cubic

@kevin-birkett kevin-birkett left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks @jtroup

@jtroup
jtroup merged commit 06043c2 into stacklet/integration Sep 7, 2026
3 checks passed
@jtroup
jtroup deleted the elmo/cuddly-marmot branch September 7, 2026 16:23
jtroup added a commit that referenced this pull request Sep 16, 2026
…24)

[ENG-8864](https://stacklet.atlassian.net/browse/ENG-8864)

### what

Merges upstream cloud-custodian `e4c099e03..bf0b50d` into
`stacklet/integration` and restamps the workspace onto the new
upstream hash. The base and alpha are unchanged at `0.9.53a1`; only
the local version segment moves, to `+bf0b50dbc`. All thirteen
workspace packages are stamped uniformly, `uv.lock` agrees with
them, and no reference to the old hash remains.

Two commits: the upstream merge on its own, then the stamp. The
merge's combined diff (`git show --cc`) is empty, so there is no
hand-written content in it to review — every conflict was resolved
by taking upstream's side verbatim.

Conflicts were `tests/test_tags.py`,
`tools/c7n_kube/c7n_kube/query.py`,
`tools/c7n_kube/tests/test_query_pagination.py` and `uv.lock`. In
the three source files upstream was a strict superset of the branch:
the k8s pagination fix (cloud-custodian#11081) picked up a second
continuation-token key in cloud-custodian#11083, and `test_tags.py` gained a
`ClientError` import. `uv.lock` was rebuilt by `just append-hash
bf0b50d`.

Upstream content picked up:

- core: a `--vars-file` parameter for injecting policy variables.
- aws: tag actions tolerate resources deleted mid-run;
  cloudwatch-dashboard tagging moves to the native cloudwatch APIs;
  a new apigwv2 `route` resource for authorization-type filtering; a
  `deployments` filter on bedrock-custom-model; kms and route53
  actions now skip AWS-managed resources.
- gcp: audit mode for dataproc-clusters, and an update action on
  kms-cryptokey.
- k8s: a `custom-resource` type for dynamic CRD discovery.
- releng: a python-requirements dependency group bump.

No Stacklet code changed.

### why

Keeps `stacklet/integration` current with upstream so the prerelease
builds carry the latest fixes.

`git log stacklet/integration..HEAD` lists 34 commits, but only the
ten summarised above are new content. The previous upstream merge
(#23) was squash-merged, so upstream history never entered the
ancestry and the merge base was still `a83dda5c9` — everything #23
had already brought in looked like an independent addition on both
sides, which is why files carrying no Stacklet changes conflicted at
all.

Landing this as a merge commit rather than a squash is what stops
that repeating: the first commit's second parent is `bf0b50dbc`, and
preserving it makes the next merge base `bf0b50dbc` instead of
`a83dda5c9`. Rebase is already disabled on the repo, so merge commit
and squash are the only two buttons.

### testing

The upstream commits bring their own tests, which arrive with the
merge: placebo and terraform fixtures for the new apigwv2 route, the
bedrock deployments filter and native cloudwatch-dashboard tagging;
ec2 and elasticache cases for tagging a resource deleted mid-run;
and flight data for k8s custom-resource discovery and the gcp
dataproc and kms additions. No Stacklet code changed, so Stacklet CI
and upstream CI running on this PR is the verification.

### docs

No docs needed.

---------------------------

🤖 Generated with [Claude Code](https://claude.com/claude-code)

[ENG-8864]:
https://stacklet.atlassian.net/browse/ENG-8864?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.