-
Notifications
You must be signed in to change notification settings - Fork 59
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
Cloud Code develop Cloud Run locally #2818
Comments
Hey there @Kevintjeb, thanks for the report! Sounds like a bug to me. I'm going to do some preliminary investigation and get back to you shortly with some troubleshooting steps. If by any chance you have a minimal version of the project to reproduce the problem that you're comfortable sharing with us we'd be happy to troubleshoot with you that way. If not, no problem I understand. Hope to have this resolved for you soon! |
To investigate the issue with the managed SDK, would you mind running the following command in your project directory and seeing if it succeeds, and if not how it fails? This is the command which appears to be failing in your original issue (and will use the Cloud Code managed SDK).
If the command succeeds, it will create a yaml file in the location specified by As for the custom SDK hanging, I'm able to reproduce that, and I believe it is likely because the alpha components have not been installed. So another thing to try is to run |
Thanks for the quick, extended response wow! The supplied command works and generates :
However, the cloud code still fails with the same error. After I installed the alpha components I now also have the same error with the custom SDK. Using Cloud Code in VsCode I received the following error:
Running the command in the error solves that, however there is still some troubles with starting minikube. So that might be related, but not because of cloud code? it created the following launch.json
EDIT: So I think I tracked it down to Minikube (IntelliJ still has the error with spec generation though, but VsCode goes to start minikube etc). I'm on Cisco Anyconnect VPN and that messes with Minikube. I can't find any documentation on how to setup all dependencies for the Cloud Code Cloud Run locally feature, is there any? |
No problem, happy to help, and appreciate you reporting the issue so we can improve the feature. :)
Hmm interesting. Do you have any proxy settings specified for IntelliJ? They're in Preferences -> System Settings -> HTTP Proxy.
Ideally, no additional set up is required if you're using the managed dependencies, which is why it isn't documented. Unfortunately they're not behaving as expected. I found this minikube issue which seems to be the same as some of the output you're seeing, so it may be worth trying some of the suggestions from that thread. Because the command to generate the deployment/service spec succeeded when run in isolation it's not clear right now why it's failing, but I'll take another look and see if I can find another way to troubleshoot it. |
I don't have proxy settings enabled for intelliJ, so that shouldn't interfere. The main problem seems to be minikube with the vpn, but I simply can't disable the VPN and I've tried all kinds of different solutions for the VPN problem. None of them worked.. It does work like a charm when using VSCode and no VPN! I'd prefer to use IntelliJ, and VPN though :) So for this project/issue it might be worthwhile to try and work together on getting the IntelliJ part working, up until it deploys to minikube/vpn? |
Hey @Kevintjeb thanks for the info! To summarize where we're at, sounds like there's still two problems. 1): Minikube access with the VPN turned on - You can try to see if any of these solutions work for you, in which case you should be able to proceed in VSCode. Example 2 shows specifics for Cisco VPN, so hopefully that will be helpful. 2): Cloud Code fails to create pods and services - we're a little bit stuck on this one since running the command manually succeeded. We're going to improve the error reporting there, and if you're up for it once it's part of our nightly build (probably tomorrow) you can download the nightly build of the plugin, and while it probably won't fix your issue, it should give us a clearer error to continue troubleshooting. Thanks for your detailed responses, really appreciate it and hope we can get this all working for you. 👍 |
Just following up, the improved error reporting is available on the |
Hey there, @Kevintjeb Great, that's certainly a much clearer error message. I just tried it out myself and I'm seeing the same behavior. I'll file a bug for that and update this thread when it's resolved. Thanks for your patience in helping find these issues, really appreciated! |
I had this same issue but also found it worked better once I turned the Jetbrains Kubernetes plugin off. However now I'm getting |
I get the same issue when Dockerfiles are in subfolders. I guess the build context stays at the root folder even when pointing to a Dockerfile in a subdirectory. |
thanks for the extra details @j-frost, @SUSTAPLE117 . Looks like we need to revisit this. @fsladkey did your initial investigation lead to any workarounds that can be used in the meantime? Do we know if this is a Skaffold limitation or a Cloud Code limitation? |
Hey folks! Thanks again for additional details! When I was looking into this a few months ago and was still running into issues, however I just tried again this today and I think I've found a solution. Looks like we need to specify the Dockerfile location when calling Unfortunately, in the meantime I can't think of a good workaround other than opening the directory containing the Dockerfile and running from there. However, I'm pretty hopeful we can get this fix in for the next release. |
@fsladkey nice find! that makes sense. We can let this group know once the fix is merged in and in the |
Closing as this issue is fixed and released. |
Expected Behavior
Running locally starts the Cloud Run container
Actual Behavior
Failure when preparing Google Cloud SDK

Additional Information
I've found that when using my
local gcloud sdk
, it doens't have the 'setting up gcloud sdk', but it doesn't do anything either. It hangs forever..The text was updated successfully, but these errors were encountered: