MetaCell / cloud-harness

Other
16 stars 5 forks source link

CH-151 Application generation improvements #778

Closed condar-metacell closed 1 month ago

condar-metacell commented 1 month ago

Closes CH-151

Significant refactoring of both harness-application and harness-generate plus added the features listed in the ticket as well as:

  1. Adding support for an --app-name/-a option to all harness-generate calls which restricts clients and servers to only generate for the specified app
  2. Generating a .ch-manifest file in harness-application to help simplify the logic in harness-generate
  3. Improving the interface for harness-generate by using sub-parser commands
  4. Add the ability to generate only typescript or python client libraries with a flag when using harness-generate

Breaking Changes This is a breaking change to the command line interface of harness-generate, the following are the changes that will need to be accounted for:

  1. The harness-generate command now has 4 sub-commands: all, clients, models and servers which will run the generation script for all resource types, client code, models and server stubs respectfully.
  2. The old default of harness-generate which generated all types of resources is no longer valid, instead use harness-generate all
  3. The flag -c/--clients has been removed, instead use harness-generate clients
  4. The flag -m/--models has been removed, instead use harness-generate models
  5. The -s/--server command line option has been removed and it's responsibilities split:
    1. To generate only server stubs use harness-generate servers
    2. To restrict which app gets servers generated use -a/--app-name
  6. All generation modes support a -a/--app-name option; client and server generation is restricted to the app selected.

...

Use both harness-application and harness-generate to create apps, stubs and clients. harness-deployment and skaffold should work from a newly created app without any additional steps needed.

...

Sanity checks:

Breaking changes (select one):

Possible deployment updates issues (select one):

Test coverage (select one):

Documentation (select one):

Nice to have (if relevant):