Giter Site home page Giter Site logo

Workflow about cli HOT 3 CLOSED

nhost avatar nhost commented on May 18, 2024
Workflow

from cli.

Comments (3)

nunopato avatar nunopato commented on May 18, 2024

Looks good, some small notes:

  • config.yaml can't be inside .nhost because Hasura needs it at the root of the project alongside migrations

  • I think point number 1 in nhost dev can and should be done on nhost init when creating config.yaml

  • The same thing for number 2, we are already creating .env.development because of Hasura's webhooks that are specified using ENV vars.

So basically, what we should change is adding nhost login and then nhost init (maybe with a --project-id flag)

from cli.

elitan avatar elitan commented on May 18, 2024

1.
Right, about the config.yaml(hasura). We need to handle that too.

I was thinking of a config file specifically for Nhost. Maybe we can name it .nhost/nhost.yaml. We will store the Nhost project id here so nhost dev (and future commands) knows what project it is.

2.
The reason I wanted to place fetching project info in nhost dev was because if a user changes some settings in Nhost that should be reflected next time the user runs nhost dev.

Think about the following case:

  • User starts Nhost project.

  • User run nhost init.

  • User run nhost dev. (then terminate this command)

  • User make a change in the Nhost console. Ex upgrade the Hasura version.

  • Next time the user runs nhost dev that new hasura version should be used.

However this introduce another issue. Let's say a user is on Hasura v1.2.0 in production and want to upgrade to v1.3.0. The user wants to ofc upgrade the local Hasura version to v1.3.0 first to make sure everything is working. Once everything is working, the user wants to upgrade the Hasura version to v1.3.0 in production. How should this be handled?

One solution would be to introduce some special flag to nhost dev or additional command to handle this. Like nhost pull to pull down all version/settings from Nhost (prod). All settings gets saved in a config file.

Before a user issue nhost dev the user can manually change some configurations in the config file. Ex upgrade Hasura version.

3.
Ah right about the env vars. The issue is that Hasura wont start if not all environment variables are available on startup. This is a bit related to the first (1.) point too.

from cli.

nunopato avatar nunopato commented on May 18, 2024
  1. Do you see a reason for not using the same config.yaml file?

  2. Exactly because of the issue you mention (wanting to test different versions locally), I would not always request, with every nhost dev, for the production version being used. I would do that only once, on nhost init. I think we should always encourage local changes first, production next. Also, I could see this being automated (p.e. update hasura version in production) through the CLI.

from cli.

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.