Git Product home page Git Product logo

Comments (5)

codyoss avatar codyoss commented on August 28, 2024 1

This is by design. To send fields that are default type values and omitted with omitempty please use ForceSendFields: https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields. Hope that helpes.

from google-api-go-client.

entigo-mart-erlenheim avatar entigo-mart-erlenheim commented on August 28, 2024

This is by design. To send fields that are default type values and omitted with omitempty please use ForceSendFields: https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields. Hope that helpes.

Thank you! My bad, I had completely missed the ForceSendFields field. Still getting used to the Google api differences when compared to AWS.

from google-api-go-client.

codyoss avatar codyoss commented on August 28, 2024

No problem! Just an FYI we also offer a newer style of library that has some improved ergonomics. Here is the equivalent for the API you are using: https://pkg.go.dev/cloud.google.com/go/[email protected]/apiv2

from google-api-go-client.

entigo-mart-erlenheim avatar entigo-mart-erlenheim commented on August 28, 2024

Thank you for trying to help! I have now tried the suggested ForceSendFields and can report that it only helps with marshaling the Yaml, but the problem still persists because Cloud Deploy uses Skaffold to unmarshal the yaml by using Golang. This means that to Skaffold the field will still be 0 and count as empty field that won't be sent to the Cloud Run Job. MaxRetries ends up defaulting back to 3. I also created a Cloud Forum support post about this problem as I consider the API implementation to be flawed when it comes to yaml based workflows. Unless of course I'm missing something.

from google-api-go-client.

codyoss avatar codyoss commented on August 28, 2024

I would report this to the skaffold project -- it seems like this is something they could potentially address in their layer, detecting if a variable is present in the yaml.

from google-api-go-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.