You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2023-04-27 17:16:37,650 - custodian.output - ERROR - Error while executing policy
Traceback (most recent call last):
File "/Users/kirill.kravtsov/Library/Caches/pypoetry/virtualenvs/asset-hound-smtHBYHl-py3.10/lib/python3.10/site-packages/c7n/policy.py", line 331, in run
resources = self.policy.resource_manager.resources()
File "/Users/kirill.kravtsov/Library/Caches/pypoetry/virtualenvs/asset-hound-smtHBYHl-py3.10/lib/python3.10/site-packages/c7n_gcp/query.py", line 214, in resources
resources = self.filter_resources(resources)
File "/Users/kirill.kravtsov/Library/Caches/pypoetry/virtualenvs/asset-hound-smtHBYHl-py3.10/lib/python3.10/site-packages/c7n/manager.py", line 112, in filter_resources
resources = f.process(resources, event)
File "/Users/kirill.kravtsov/Library/Caches/pypoetry/virtualenvs/asset-hound-smtHBYHl-py3.10/lib/python3.10/site-packages/c7n/filters/core.py", line 339, in process
return self.process_set(resources, event)
File "/Users/kirill.kravtsov/Library/Caches/pypoetry/virtualenvs/asset-hound-smtHBYHl-py3.10/lib/python3.10/site-packages/c7n/filters/core.py", line 356, in process_set
resource_map = {r[rtype_id]: r forrin resources}
File "/Users/kirill.kravtsov/Library/Caches/pypoetry/virtualenvs/asset-hound-smtHBYHl-py3.10/lib/python3.10/site-packages/c7n/filters/core.py", line 356, in<dictcomp>
resource_map = {r[rtype_id]: r forrin resources}
KeyError: 'name'
The actual object doesn't have an id/name fields and should probably be:
name="metadata.name"id="metadata.uid"
I can confirm that after changing this code the resource starts working as intended. I can reasonably infer that CloudRunJob class will experience similar issues, but I don't have any to test my theory.
The text was updated successfully, but these errors were encountered:
Describe the bug
When I run a policy that involves
gcp.cloud-run-service
resource it fails with an errorWhat did you expect to happen?
No error, policy processed
Cloud Provider
Google Cloud (GCP)
Cloud Custodian version and dependency information
Policy
Relevant log/traceback output
Extra information or context
The issue is related to the resource definition:
https://github.com/cloud-custodian/cloud-custodian/blob/main/tools/c7n_gcp/c7n_gcp/resources/cloudrun.py#L19
The actual object doesn't have an id/name fields and should probably be:
I can confirm that after changing this code the resource starts working as intended. I can reasonably infer that
CloudRunJob
class will experience similar issues, but I don't have any to test my theory.The text was updated successfully, but these errors were encountered: