I’m trying to use DigitalOceans Functions with Golang. I have the requirement to in part use private GO modules. I managed to get the functions to build and run in the APP Platform with Env Variables and creating a .netrc file in a build script. The problem I’m facing with Functions in the App Platform environment is that actual runtime logs don’t seem to be accesssible. The only runtime logs which are shown are an aggregate of the entire project (which includes several packages and functions) and unfortunately only simplified build logs and not real runtime logs. I also tried log forwarding to a managed OpeanSearch but this does not work as well. It seems to me that the level of control on functions inside of App Platform is greatly reduced.
So I switched back to functions in namespaces and inside the actual functions environment. Using the .netrc trick i described above works relatively OK so far. I still have to hardcode the credetials into the build script as for some reason the .env file is not being read. The initial build process works fine, which the logs confirm as all modules were pulled.
Unfortunately, as soon as I then try to invoke the function I receive an error: cannot download modules
, there are no further logs availble. My assumption is that some parts which are included during the initial remote build are included but not when invoking the function.
Is anybody able to help on this? I’m at my whits end here trying to understand what the underlying issue is.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hey @setorblagogeeseal,
I’ve not tested this with a private Go module, but can confirm that this works with public ones as shown in this example repo here:
If you are still seeing that problem with a private one, what you could try doing is reaching out to the DigitalOcean support team who might be able to advise you further:
- Bobby.