emblem icon indicating copy to clipboard operation
emblem copied to clipboard

delivery: Generate library and source from Artifact Registry

Open engelke opened this issue 3 years ago • 2 comments

The client libraries at /client-libs/python is generated using the OpenAPI.yaml spec. Should the generated libraries be created at each deploy, or maintained in GitHub?

engelke avatar Sep 07 '21 23:09 engelke

The path forward as discussed in ~January:

  • Setup:
    • After Artifact Registry setup and before Cloud Run deployment, we will generate the client library code and use it as the first "release" to a private Artifact Reigstry Python repository.
    • Create a script that updates requirements.txt to source the library from the private repository.
  • Spec-driven Library Changes:
    • A new Cloud Build pipeline will look for changes to the openapi.yaml specification.
    • When found in a PR, it will run the code generator to ensure the spec is compatible with the generator tool.
    • When found in a main branch update, it will run the generator, take the resulting Python library, and store as a private resource in Artifact Registry.
  • Remove the currently existing generated code from the repository
    • Update setup.sh, cloudbuild.yaml files, and Dockerfiles as need to remove mention
  • Add instructions to run the "requirements.txt update script" after forking the repo

grayside avatar Mar 28 '22 21:03 grayside

Discussed in team sprint meeting (refer 8/22/22) - currently only leveraged in the flask website. This may no longer be necessary if the flask website container gets replaced with the new lit client app.

Requires further discussion on scope of work and impact of current CI/CD flow.

pattishin avatar Aug 22 '22 18:08 pattishin