Open seagullmouse opened 1 year ago
@seagullmouse thanks for bringing this to our attention. Cloud Code should have this schema bundled so I will notify that team to fix this on their end but we also host the schemas in our Github repo at the following locations so you can add this URL in the UI field you posted above:
v4beta4.json schema
https://raw.githubusercontent.com/GoogleContainerTools/skaffold/main/docs-v2/content/en/schemas/v4beta4.json
To view other schemas, see: https://github.com/GoogleContainerTools/skaffold/tree/main/docs-v2/content/en/schemas
Thanks for the reply.
Might be something wrong with my IntelliJ set up.
I've added the schema
But still see the IntelliJ warning
Any ideas or should I wait to see if Cloud Code send an update?
@seagullmouse it looks like you have Jetbrains Kubernetes plugin installed which tries to treat this file as a Kubernetes resource. Try adding #noK8s
annotation on top of the file and let us know if this fixes the problem.
Do you see Cloud Code generated documentation and completions on other fields in YAML? It seems so since there are no errors on other fields.
#noK8s
makes no difference.What type of resource should I associate this file with? E.g. I could set up a rule then associates files named skaffold.yaml
as Google Cloud or Skaffold but I don't see those options.
@ivanporty did you have additional information here related to the above? Thanks
I see, we are not up to date yet with the schema, we'll update with the next release.
To add the new schema manually, you need to use IntelliJ schema settings, not Cloud Code. They are in the lower right corner of the IDE window by default (you will see v3.json there):
Click it, use Add/Edit schema settings
and add new schema using URL above (https://raw.githubusercontent.com/GoogleContainerTools/skaffold/main/docs-v2/content/en/schemas/v4beta4.json). This should fix the warnings you see.
Could this lack of compatibility with v4beta4 also be the reason that I can't use the Cloud Code: Kubernetes run configuration?
"Invalid Data: Unable to read your skaffold.yaml config file. Check that it is properly formed, and ensure that a profile is selected on the Build/Deploy tab."
I am able to run everything fine from the command line so my skaffold config appears to be fine.
@ivanporty, do you have any insights as to the root cause of what might be happening above?
@seagullmouse can you output what version of skaffold is being used by Cloud Code?
skaffold version v2.9.0
This is still an issue with latest versions of Skaffold and IntelliJ.
It seems to ignore my custom added schemas
If I click through on a yaml element for it's definition, the v3 schema is still shown, although I don't know where/how this is being sourced
Expected behavior
Provide a URL for schemas that can be passed into IntelliJ IDE
Actual behavior
Every URL I have tried seems to fail.
Please advise which URL to use.