Git Product home page Git Product logo

Comments (5)

wwoytenko avatar wwoytenko commented on May 28, 2024 1

Leave a comment in the code and Makefile as well so we would determine why it uses build flags

from greenmask.

wwoytenko avatar wwoytenko commented on May 28, 2024

@joao-zanutto thank you for your research. You're right. We can overcome this issue by manually registering ENV vars. It is completed in #51 . Rebase from the actual main branch and adapt your PR #49 last changes.

About the next points

Define default storage to directory storage on ~/dumps -- this would allow Docker users to map a volume to /home/greenmask/dumps and use it without needing to specify the storage.directory.path configuration

Agree. You can add it into #49

Require storage configuration and error out in case none is provided

Looks like I have done it in #51

from greenmask.

joao-zanutto avatar joao-zanutto commented on May 28, 2024

@wwoytenko following my previous implementation and your own, we would need to statically bind each env to have it working, however, I was thinking in making the bind dynamically using the Config struct.

I tried a few solution, (like the one described in this comment spf13/viper#584 (comment)) but ended up finding a new build flag we can add to make it work out of the box.

There is a new private function bindStruct() that is being called inside the Unmarshall() function, but since it has some retrocompability issues, it was put behind this -tags=viper_bind_struct build arg. (See spf13/viper#1429)

I already built and test locally and it is working, however it doesn't work for the S3 storage parameters because it's defined as a pointer and the function can't parse it properly (See spf13/viper#1429 (comment)). Is there a chance we can remove the pointer definition se we don't have to statically define each S3 parameter as its own env and bind them individually?

from greenmask.

wwoytenko avatar wwoytenko commented on May 28, 2024

I think you can easily get rid of the pointers. It should work as expected, verify that all is okay and NewConfig function calls correctly

from greenmask.

joao-zanutto avatar joao-zanutto commented on May 28, 2024

I think you can easily get rid of the pointers. It should work as expected, verify that all is okay and NewConfig function calls correctly

I did as you instructed but may have missed something because I cannot make it work correctly and I'm having difficult troubleshooting it. May I have your assistance in #55 ?

from greenmask.

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.