-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Google Cloud Spanner Receiver gracefully handles unreadable databases #26732
Google Cloud Spanner Receiver gracefully handles unreadable databases #26732
Conversation
|
c2234a0
to
2397c5e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a changelog
receiver/googlecloudspannerreceiver/internal/statsreader/databasereader.go
Outdated
Show resolved
Hide resolved
I close my PR in favor of this one.
|
I merged in the changes from this PR. Thanks @afarbos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go.mod/go.sum deps changes detected, please run "make gotidy" and commit the changes in this PR.
|
receiver/googlecloudspannerreceiver/internal/statsreader/projectreader.go
Outdated
Show resolved
Hide resolved
|
e3f97c0
to
64ae47c
Compare
24c3f04
to
d25ec56
Compare
@harishbohara11 Could you please validate that this works on your end as well? I used the following config to check this:
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
@bogdandrutu Can you please review the PR? As a codeowner of GoogleCloudSpannerReceiver, @KiranmayiB has provided approval. |
@spidercensus Thanks for your PR and apologies that it is taking so long to merge this. Given we now have a codeowner approval I can do a final review and merge this, but before this I need you to do the following steps so that CI passes:
Could you do these steps and ping me when finished? Thanks! |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
This build process really needs to be made platform-independent (Dockerized). There were far too many times that I had to re-run go.mod because my version of @mx-psi Please review. |
@spidercensus Thanks for following the steps, there was one more merge conflict but it was easy to fix so I fixed it myself :) I am sorry it took so long to merge this, but it finally got through!
If you have time, would you be able to open an issue about this? If not, any further details are helpful. In general, we aim to have compatibility with all supported Go versions (currently Go 1.20 and Go 1.21), but dependency management in Go can sometimes be a bit unwieldy, and e.g. right now the |
…
Description:
Fixing a bug. Google Cloud Spanner Receiver currently generates an exception and exits if it attempts to read data from a database that doesn't exist. However it's normal for a single receiver to poll multiple databases, so this is not graceful failure. This PR makes a change to gracefully generate an error in case of an unreadable missing database and then continue reading other databases..
Issue: 14624
Changelog:
DatabaseReader.Read
returns a vector ofmetadata.MetricsDatapoint
and amultierr.Errors
object instead of theresult
vector and a singleError
.DatabaseReader.Read
appends any errors encountered to themultierr.Errors
object instead of returning(nil, Error)
.DatabaseReader.Read
adds aNewPartialScrapeError
tomultierr.Errors
object if errors were encountered while reading and some results were still populated into theresult
vectorProjectReader.Read
returns a vector ofmetadata.MetricsDatapoint
and aErrors
object instead of theresult
vector andnil
.ProjectReader.Read
combines allmultierr.Errors
objects into a singleError
before returning them aserr
.ProjectReader.Read
returns aNewPartialScrapeError
instead oferr
if errors were encountered while reading and some results were still populated into theresult
vector.googleCloudSpannerReceiver.Scrape
returns a vector ofmetadata.MetricsDatapoint
and aError
object instead of just theresult
vector.