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

fix(spanner): use correct logger when stopping emulator #609

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

radhus
Copy link
Member

@radhus radhus commented Oct 31, 2024

Fixes a bug introduced in b1b5e7e (PR #594) where an empty context is used, which removes the logger.

Could be done cleaner with Go >=1.21 as can be seen in a TODO comment.

Before:

❯ make go-test
[sage] building binary and generating Makefiles...
[go-test] running Go tests...
[go-test] starting Cloud Spanner emulator...
[go-test] running Cloud Spanner emulator on 0.0.0.0:44611
[sage] stopping down Cloud Spanner emulator...

After:

❯ make go-test
[sage] building binary and generating Makefiles...
[go-test] running Go tests...
[go-test] starting Cloud Spanner emulator...
[go-test] running Cloud Spanner emulator on 0.0.0.0:46023
[go-test] stopping down Cloud Spanner emulator...

Fixes a bug introduced in b1b5e7e
(PR #594) where an empty context is used, which removes the logger.

Could be done cleaner with Go >=1.21 as can be seen in a TODO comment.

Before:
```
❯ make go-test
[sage] building binary and generating Makefiles...
[go-test] running Go tests...
[go-test] starting Cloud Spanner emulator...
[go-test] running Cloud Spanner emulator on 0.0.0.0:44611
[sage] stopping down Cloud Spanner emulator...
```

After:
```
❯ make go-test
[sage] building binary and generating Makefiles...
[go-test] running Go tests...
[go-test] starting Cloud Spanner emulator...
[go-test] running Cloud Spanner emulator on 0.0.0.0:46023
[go-test] stopping down Cloud Spanner emulator...
```
@radhus radhus requested a review from a team as a code owner October 31, 2024 08:27
@radhus radhus merged commit 23d5113 into master Oct 31, 2024
3 checks passed
@radhus radhus deleted the fix-emulator-logger branch October 31, 2024 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants