Skip to content

Commit 8e36ce3

Browse files
authored
docs: doc/architecture.md to explain state.yaml (#1585)
After #773, we use the state.yaml in .librarian directory of the target repositories.
1 parent 18457c3 commit 8e36ce3

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

doc/architecture.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,20 @@ libraries.
6969

7070
## Files used by Librarian in language repositories
7171

72-
Each language repo used by Librarian must have a `generator-input` root directory.
73-
Within that directory, there must be two files: `pipeline-state.json` and `pipeline-config.json`.
74-
Broadly speaking, `pipeline-state.json` is maintained automatically, but `pipeline-config.json`
75-
is maintained by hand (and is expected to change rarely). The current split of information
76-
is more blurry than we'd like; go/sdk-librarian-state-config proposes a clearer split.
72+
Each language repo used by Librarian must have a `.librarian` root directory.
73+
Within that directory, there must be a `state.yaml` file. This file is maintained
74+
automatically by the Librarian CLI.
7775

78-
These files are JSON representations of the `PipelineState` and `PipelineConfig` messages
79-
declared in [pipeline.proto](https://github.com/googleapis/librarian/blob/v0.1.0/proto/pipeline.proto).
80-
See the schema for more details, but the most important aspect is the list of libraries within
81-
`PipelineState`.
76+
This file is a YAML representation of the `LibrarianState` struct
77+
declared in [internal/config/state.go](https://github.com/googleapis/librarian/blob/main/internal/config/state.go).
78+
See the struct definition for more details, but the most important aspect is the list of libraries within
79+
`LibrarianState`.
8280

8381
## The meaning of "library" within Librarian
8482

8583
Librarian manages libraries - but the meaning of "library" is not as intuitive and universal
8684
as we might like or imagine it to be. Within Librarian, the term "library" has a very specific
87-
meaning, namely "an entry within the `pipeline-state.json` file, within a given repository".
85+
meaning, namely "an entry within the `state.yaml` file, within a given repository".
8886
Librarian cares about information relating to a library such as:
8987

9088
- The library ID: this is how Librarian instructs language-specific containers to operate
@@ -96,7 +94,7 @@ Librarian cares about information relating to a library such as:
9694
the library, so that Librarian can determine that a new version of the library should be released.
9795

9896
This is not an exhaustive list; see
99-
[pipeline.proto](https://github.com/googleapis/librarian/blob/v0.1.0/proto/pipeline.proto) for more details.
97+
[internal/config/state.go](https://github.com/googleapis/librarian/blob/main/internal/config/state.go) for more details.
10098

10199
This approach is designed to accommodate the requirements of different languages:
102100

0 commit comments

Comments
 (0)