Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add exception or non service lib #7866

Merged
merged 2 commits into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-go:latest
digest: sha256:8b4f6b8ecbd7fe80feb5c4449c0bca2abc6d2ecca0999120da23c4b1c90ca81d
digest: sha256:7f4378b2797923822b452565b346173e306e2587a75f0662437eaba12afd344f
2 changes: 1 addition & 1 deletion internal/postprocessor/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func (p *postProcessor) generateModule(modPath, importPath string) error {
func (p *postProcessor) generateVersionFile(moduleName, path string) error {
// These directories are not modules on purpose, don't generate a version
// file for them.
if strings.Contains(path, "debugger/apiv2") {
if strings.Contains(path, "debugger/apiv2") || strings.Contains(path, "orgpolicy/apiv1") {
return nil
}
pathSegments := strings.Split(filepath.Dir(path), "/")
Expand Down
5 changes: 2 additions & 3 deletions internal/postprocessor/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package main

import (
"flag"
"io/ioutil"
"log"
"os"
"path/filepath"
Expand Down Expand Up @@ -143,13 +142,13 @@ func TestUpdateSnippetsMetadata(t *testing.T) {

// Assert result and restore testdata
f := filepath.FromSlash("testdata/internal/generated/snippets/video/stitcher/apiv1/snippet_metadata.google.cloud.video.stitcher.v1.json")
read, err := ioutil.ReadFile(f)
read, err := os.ReadFile(f)
if err != nil {
t.Fatal(err)
}
if strings.Contains(string(read), "3.45.6") {
s := strings.Replace(string(read), "3.45.6", "$VERSION", 1)
err = ioutil.WriteFile(f, []byte(s), 0)
err = os.WriteFile(f, []byte(s), 0)
if err != nil {
t.Fatal(err)
}
Expand Down