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: handle uri skeleton non null #2135

Open
acpana opened this issue Jun 25, 2024 · 1 comment
Open

fix: handle uri skeleton non null #2135

acpana opened this issue Jun 25, 2024 · 1 comment

Comments

@acpana
Copy link
Collaborator

acpana commented Jun 25, 2024

Today it seems that the ExpectedSkeleton is not checked if it is not null BUT the servicemappings lists idTemplateCanBeUsedToMatchResourceName == false . We should at least throw a warning in this scenario, otherwise the ExpectedSkeleton is not checked which may lead contributors to believe that their test is passing!

@acpana
Copy link
Collaborator Author

acpana commented Jun 25, 2024

Example:

spec:
name: VertexAI
version: v1beta1
serviceHostName: "aiplatform.googleapis.com"
resources:
- name: google_vertex_ai_dataset
kind: VertexAIDataset
# This resource does not support import.
skipImport: true
idTemplate: "{{name}}"
idTemplateCanBeUsedToMatchResourceName: false
resourceAvailableInAssetInventory: true

But the ExpectedSkeleton is not null

- ExpectedSkeleton:
apiVersion: vertexai.cnrm.cloud.google.com/v1beta1
kind: VertexAIDataset
spec:
projectRef:
external: kcc-test
location: us-central1
ResourceConfigId: VertexAIDataset
URI: "https://us-central1-aiplatform.googleapis.com/v1beta1/projects/kcc-test/locations/us-central1/datasets/1234567890?alt=json"

This stood out to me for the "malformed" schema and then I realized that we don't check the yamls if the idTemplateCanBeUsedToMatchResourceName is unset:

if !*rc.IDTemplateCanBeUsedToMatchResourceName {
continue

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

No branches or pull requests

1 participant