Giter Site home page Giter Site logo

Comments (4)

F1bonacc1 avatar F1bonacc1 commented on May 18, 2024

Hi @shivaraj-bh,

That's a proposal that makes a lot of sense.
The downside is that it will break backward compatibility. As you know the namespace key is part of the process:

processes:
  p1:
    command: c1
    namespace: n1
  p2:
    command: c2
    namespace: n2

Changing p2 to p1 will fail parsing on the yaml level.
The YAML spec does not allow for duplicate keys in a mapping node.

There are a few bad options that I see:

Option 1:

processes:
  n1:
    p1:
      command: c1
  n2:
    p1:
      command: c2

Which breaks backward compatibility.

Option2:
Add NS prefix with a delimiter.

processes:
  n1::p1:
    command: c1
    namespace: n1
  n2::p1:
    command: c2
    namespace: ABCD # kept for BW compatibility, but will be replaced with `n2` in code.

Feels not intuitive and hacky.

Option3:
Convert processes to a list.

processes:
  - p1:
    command: c1
    namespace: n1
  - p1:
    command: c2
    namespace: n2

Also breaks backward compatibility and for long enough compose.yaml files there will be more than 1 default.p1 processes.

Do you see any other options that I am missing?

from process-compose.

adrian-gierakowski avatar adrian-gierakowski commented on May 18, 2024

IMHO this feels like feature creep.

Apart from requiring breaking changes to configuration format, it will also force the user provide the namespace when calling command which take process name as args (process start|stop|logs ā€¦)

Maybe namespace should have been called group to not give people ideas, lol šŸ˜‚

Anyway, if this was to go ahead, Iā€™d suggest to add a new namespaces prop which could house the namespaced processes. Top level processes could be placed in default namespace which would also be the default when addressing processes without providing namespace explicitly on command line

from process-compose.

shivaraj-bh avatar shivaraj-bh commented on May 18, 2024

@F1bonacc1 I had Option 3 in mind as well, but that again introduces its own set of problems. I posted this thinking -- maybe we can find an easy way out -- but seems like it will only introduce breaking changes for no real functionality benefits.

from process-compose.

shivaraj-bh avatar shivaraj-bh commented on May 18, 2024

I am guessing we agree on the fact that this might not be feasible, closing this as not planned.

from process-compose.

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.