Skip to content

Add context parameter to DB interface functions #1394

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

Merged

Conversation

jtlisi
Copy link
Contributor

@jtlisi jtlisi commented May 16, 2019

This does not change the functionality of the DB in any way. It only passes the context as a parameter. I am working on an object store backend for rules files in GCS and want to pass a context variable. I also think it is useful to have the context in postgres if we want to add lower level instrumentation.

Signed-off-by: Jacob Lisi [email protected]

@jtlisi jtlisi changed the title Add context as parameter to functions in DB interface Add context parameter to DB interface functions May 16, 2019
@@ -119,20 +120,20 @@ type dbStore struct {
// GetRules implements ConfigClient.
func (d dbStore) GetRules(since configs.ID) (map[string]configs.VersionedRulesConfig, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a context here too please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I wanted to wait til #1258 was merged so I could avoid more merge conflicts, but I'll add it here.

@jtlisi jtlisi force-pushed the 20190516_add_context_db_interface branch from 543ff25 to b4e77b6 Compare May 19, 2019 13:53
@jtlisi jtlisi force-pushed the 20190516_add_context_db_interface branch from b4e77b6 to d29fcb2 Compare May 19, 2019 20:30
Copy link
Contributor

@khaines khaines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tomwilkie
Copy link
Contributor

LGTM!

@tomwilkie tomwilkie merged commit 52745fd into cortexproject:master May 29, 2019
@tomwilkie tomwilkie deleted the 20190516_add_context_db_interface branch May 29, 2019 18:55
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.

3 participants