Skip to content

Commit

Permalink
chore(orchestration): start generating orchestration module (#4893)
Browse files Browse the repository at this point in the history
This commit will be tagged orchestration/v0.1.0

Also fixed a small bug in the generator to carve module from the first sub-dir of the root module.
  • Loading branch information
codyoss committed Sep 27, 2021
1 parent 84ff476 commit 4fc91cb
Show file tree
Hide file tree
Showing 13 changed files with 1,982 additions and 20 deletions.
18 changes: 9 additions & 9 deletions internal/.repo-metadata-full.json
Expand Up @@ -35,15 +35,6 @@
"release_level": "alpha",
"library_type": ""
},
"cloud.google.com/go/analytics/data/apiv1alpha": {
"distribution_name": "cloud.google.com/go/analytics/data/apiv1alpha",
"description": "Google Analytics Data API",
"language": "Go",
"client_library_type": "generated",
"docs_url": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/analytics/latest/data/apiv1alpha",
"release_level": "alpha",
"library_type": ""
},
"cloud.google.com/go/apigateway/apiv1": {
"distribution_name": "cloud.google.com/go/apigateway/apiv1",
"description": "API Gateway API",
Expand Down Expand Up @@ -899,6 +890,15 @@
"release_level": "beta",
"library_type": ""
},
"cloud.google.com/go/orchestration/airflow/service/apiv1": {
"distribution_name": "cloud.google.com/go/orchestration/airflow/service/apiv1",
"description": "Cloud Composer API",
"language": "Go",
"client_library_type": "generated",
"docs_url": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/orchestration/latest/airflow/service/apiv1",
"release_level": "beta",
"library_type": ""
},
"cloud.google.com/go/orgpolicy/apiv2": {
"distribution_name": "cloud.google.com/go/orgpolicy/apiv2",
"description": "Organization Policy API",
Expand Down
17 changes: 9 additions & 8 deletions internal/gapicgen/generator/config.go
Expand Up @@ -1297,6 +1297,15 @@ var microgenGapicConfigs = []*microgenConfig{
// GA after 2021/10/11
releaseLevel: "beta",
},
{
inputDirectoryPath: "google/cloud/orchestration/airflow/service/v1",
pkg: "service",
importPath: "cloud.google.com/go/orchestration/airflow/service/apiv1",
gRPCServiceConfigPath: "composer_grpc_service_config.json",
apiServiceConfigPath: "composer_v1.yaml",
// GA after 2021/10/27
releaseLevel: "beta",
},

// Non-Cloud APIs
{
Expand All @@ -1307,14 +1316,6 @@ var microgenGapicConfigs = []*microgenConfig{
apiServiceConfigPath: "analyticsadmin_v1alpha.yaml",
releaseLevel: "alpha",
},
{
inputDirectoryPath: "google/analytics/data/v1alpha",
pkg: "data",
importPath: "cloud.google.com/go/analytics/data/apiv1alpha",
gRPCServiceConfigPath: "analytics_data_grpc_service_config.json",
apiServiceConfigPath: "analyticsdata_v1alpha.yaml",
releaseLevel: "alpha",
},
{
inputDirectoryPath: "google/area120/tables/v1alpha1",
pkg: "tables",
Expand Down
7 changes: 4 additions & 3 deletions internal/gapicgen/generator/gapics.go
Expand Up @@ -87,14 +87,15 @@ func (g *GapicGenerator) Regen(ctx context.Context) error {
(g.gapicToGenerate != "" && !strings.Contains(g.gapicToGenerate, c.importPath)) {
continue
}
modPath := filepath.Dir(filepath.Join(g.googleCloudDir, c.importPath))
modImportPath := filepath.Dir(c.importPath)

modImportPath := filepath.Join("cloud.google.com/go", strings.Split(strings.TrimPrefix(c.importPath, "cloud.google.com/go/"), "/")[0])
modPath := filepath.Join(g.googleCloudDir, modImportPath)
if g.genModule {
if err := generateModule(modPath, modImportPath); err != nil {
return err
}
newMods = append(newMods, modInfo{
path: filepath.Dir(filepath.Join(g.googleCloudDir, strings.TrimPrefix(c.importPath, "cloud.google.com/go"))),
path: filepath.Join(g.googleCloudDir, strings.TrimPrefix(modImportPath, "cloud.google.com/go")),
importPath: modImportPath,
serviceImportPath: c.importPath,
})
Expand Down
5 changes: 5 additions & 0 deletions orchestration/CHANGES.md
@@ -0,0 +1,5 @@
# Changes

## v0.1.0

- feat(orchestration): start generating clients
40 changes: 40 additions & 0 deletions orchestration/README.md
@@ -0,0 +1,40 @@
# Cloud Composer API

[![Go Reference](https://pkg.go.dev/badge/cloud.google.com/go/orchestration.svg)](https://pkg.go.dev/cloud.google.com/go/orchestration)

Go Client Library for Cloud Composer API.

## Install

```bash
go get cloud.google.com/go/orchestration
```

## Stability

The stability of this module is indicated by SemVer.

However, a `v1+` module may have breaking changes in two scenarios:

* Packages with `alpha` or `beta` in the import path
* The GoDoc has an explicit stability disclaimer (for example, for an experimental feature).

## Go Version Support

See the [Go Versions Supported](https://github.com/googleapis/google-cloud-go#go-versions-supported)
section in the root directory's README.

## Authorization

See the [Authorization](https://github.com/googleapis/google-cloud-go#authorization)
section in the root directory's README.

## Contributing

Contributions are welcome. Please, see the [CONTRIBUTING](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/CONTRIBUTING.md)
document for details.

Please note that this project is released with a Contributor Code of Conduct.
By participating in this project you agree to abide by its terms. See
[Contributor Code of Conduct](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/CONTRIBUTING.md#contributor-code-of-conduct)
for more information.
159 changes: 159 additions & 0 deletions orchestration/airflow/service/apiv1/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4fc91cb

Please sign in to comment.