Git Product home page Git Product logo

Comments (11)

moxious avatar moxious commented on August 16, 2024

Root cause is this line of code, the names of parameters must match a regex which can't include dots, although those are valid YAML config. I'm not sure if you have another reason in the deploy chain to tighten this down, but dotted param names seem like valid YAML and are used in helm charts elsewhere.

https://github.com/GoogleCloudPlatform/marketplace-k8s-app-tools/blob/master/marketplace/deployer_util/config_helper.py#L24

from marketplace-k8s-app-tools.

moxious avatar moxious commented on August 16, 2024

Another similar error in the same vein, this time with me innovating new ways of breaking things. At first I thought this was due to a type boolean parameter in my schema, but after switching it to a string the error persists.

deployer | May 8, 2018, 4:55:38 PM | AttributeError: 'bool' object has no attribute 'encode'
-- | -- | --
deployer | May 8, 2018, 4:55:38 PM | f.write(v.encode(encoding))
deployer | May 8, 2018, 4:55:38 PM | File "/bin/expand_config.py", line 124, in write_values
deployer | May 8, 2018, 4:55:38 PM | write_values(values, args.final_values_dir, args.encoding)
deployer | May 8, 2018, 4:55:38 PM | File "/bin/expand_config.py", line 63, in main
deployer | May 8, 2018, 4:55:38 PM | main()
deployer | May 8, 2018, 4:55:38 PM | File "/bin/expand_config.py", line 128, in <module>
deployer | May 8, 2018, 4:55:38 PM | Traceback (most recent call last):
deployer | May 8, 2018, 4:55:37 PM | + /bin/expand_config.py

from marketplace-k8s-app-tools.

huyhg avatar huyhg commented on August 16, 2024

The reason for this restriction is because properties are also being passed as environment variables, particularly in the case where envsubst is used for template expansion instead of helm's go template.

Can you provide a copy of your values.yaml file?

from marketplace-k8s-app-tools.

moxious avatar moxious commented on August 16, 2024

@huyhg I sent you an invite to a private repo where I am keeping materials. Values is here: https://github.com/neo-technology/neo4j-google-k8s-marketplace/blob/master/chart/values.yaml

from marketplace-k8s-app-tools.

huyhg avatar huyhg commented on August 16, 2024

Could you grant @trironkk and @vcanaa access to the repo as well? Thanks.

from marketplace-k8s-app-tools.

moxious avatar moxious commented on August 16, 2024

Done. I also added @deustis as he and I were discussing this just yesterday.

from marketplace-k8s-app-tools.

huyhg avatar huyhg commented on August 16, 2024

The boolean failure is interesting. bool is currently unsupported in our schema (which I will add). It's surprising that it fails with that encode attribute instead of a validation rejecting the value.

Did you pass a boolean value to the APP_PARAMETERS json, independent of the type in the schema?

from marketplace-k8s-app-tools.

moxious avatar moxious commented on August 16, 2024

No. The way I'm calling it can be seen here:

https://github.com/neo-technology/neo4j-google-k8s-marketplace/blob/master/README.md#running-the-deployer-container

The "yes" was previously a boolean, now a string in schema.yaml.

from marketplace-k8s-app-tools.

huyhg avatar huyhg commented on August 16, 2024

Alright, there are a few things after I investigated.

  • yes is actually a reserved word yaml that is interpreted as a true boolean value. This leads to the exception about a bool object instead of a str object.
  • The vendor/marketplace-tools is not at the latest version. Please update it to the latest version (ideally at a commit after #79 having been merged so that you can use boolean type). This is the reason for the AttributeError: 'bool' object has no attribute 'encode' error. In the latest version you should have seen an InvalidSchema error instead.

from marketplace-k8s-app-tools.

moxious avatar moxious commented on August 16, 2024

from marketplace-k8s-app-tools.

huyhg avatar huyhg commented on August 16, 2024

Closing this in favor of #84 and the fact the deployment is unblocked.

from marketplace-k8s-app-tools.

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.