googleapis / googleapis/librarian

python: make API generation order irrelevant

Open
#4,740 0 comments 0 reactions 0 assignees View on GitHub
priority: p3
Dominant language
Go
Stars
45
Forks
61
Avg merge
19h 11m
Merged PRs (30d)
181

Description

Currently, when a library contains multiple API paths with the same version (e.g. google/cloud/firestore/v1 and google/cloud/firestore/admin/v1) they both end up being generated into `owl-bot-staging/v1`, and the last one to be generated effectively takes priority for things like setup.py.

The simplest (though kludgy) way of fixing this is to generate APIs with the longest paths first - we always want the *shortest* path to take priority, per version.

We should figure out what we really want the files to look like in cases like this (the overwriting is awkward), and change generation accordingly, ideally while removing the idea of "staging" entirely.

Contributor guide

Open the contributing guide

Research direction

Start at the API generation flow that places same-version paths in owl-bot-staging/v1, and inspect how setup.py selection is determined. Reproduce the google/cloud/firestore/v1 and google/cloud/firestore/admin/v1 case, then trace the staging and path-ordering behavior. Done means generation is deterministic and the intended shortest-path priority and file layout are defined and implemented.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, python
Domain
build-system, tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.