Skip to content

bug(librarian): Add new api paths to an existing package #2651

@parthea

Description

@parthea

See the state.yaml below for google-cloud-container with one api path google/container/v1.

image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator:latest
libraries:
  - id: google-cloud-container
    version: 2.60.0
    last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6
    apis:
      - path: google/container/v1
        service_config: container_v1.yaml
    source_roots:
      - packages/google-cloud-container
    preserve_regex: []
    remove_regex: []
    tag_format: '{id}-v{version}'

I would like to be able to use librarian to add another api path to an existing library.

I'd like to run something like

librarian generate --library=google-cloud-container --api=google/container/v1beta1 

The generate-request.json file should include both google/container/v1beta1 and google/container/v1

Currently the generate-request.json file looks like this:

{
  "id": "google-cloud-container",
  "version": "2.60.0",
  "apis": [
    {
      "path": "google/container/v1",
      "service_config": "container_v1.yaml",
      "status": ""
    }
  ],
  "source_roots": [
    "packages/google-cloud-container"
  ],
  "preserve_regex": [
  ],
  "remove_regex": [
  ],
  "tag_format": "{id}-v{version}"
}

but it should be

{
  "id": "google-cloud-container",
  "version": "2.60.0",
  "apis": [
    {
      "path": "google/container/v1",
      "service_config": "container_v1.yaml",
      "status": ""
    },
    {
      "path": "google/container/v1beta1",
      "service_config": "container_v1beta1.yaml",
      "status": ""
    }
  ],
  "source_roots": [
    "packages/google-cloud-container"
  ],
  "preserve_regex": [
  ],
  "remove_regex": [
  ],
  "tag_format": "{id}-v{version}"
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions