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 linters and test in pubsub & dgraph datasources #1254

Open
wants to merge 22 commits into
base: development
Choose a base branch
from

Conversation

Umang01-hash
Copy link
Contributor

@Umang01-hash Umang01-hash commented Nov 28, 2024

Pull Request Template

Description:

  • Resolve linters and failing tests for Dgraph & PubSub datasources

Checklist:

  • I have formatted my code using goimport and golangci-lint.
  • All new code is covered by unit tests.
  • This PR does not decrease the overall code coverage.
  • I have reviewed the code comments and documentation for clarity.

Thank you for your contribution!

pkg/gofr/datasource/dgraph/dgraph_test.go Outdated Show resolved Hide resolved
pkg/gofr/datasource/dgraph/dgraph_test.go Outdated Show resolved Hide resolved
pkg/gofr/datasource/pubsub/google/google_test.go Outdated Show resolved Hide resolved
pkg/gofr/datasource/pubsub/google/google_test.go Outdated Show resolved Hide resolved
pkg/gofr/datasource/dgraph/dgraph.go Outdated Show resolved Hide resolved
pkg/gofr/datasource/pubsub/eventhub/eventhub.go Outdated Show resolved Hide resolved
pkg/gofr/datasource/pubsub/google/google_test.go Outdated Show resolved Hide resolved
Comment on lines +67 to +71
d.metrics.NewHistogram("dgraph_query_duration", "Response time of Dgraph queries in milliseconds.", responseTimeBuckets...)
d.metrics.NewHistogram("dgraph_query_with_vars_duration", "Response time of Dgraph "+
"queries with variables in milliseconds.", responseTimeBuckets...)
d.metrics.NewHistogram("dgraph_mutate_duration", "Response time of Dgraph mutations in milliseconds.", responseTimeBuckets...)
d.metrics.NewHistogram("dgraph_alter_duration", "Response time of Dgraph alter operations in milliseconds.", responseTimeBuckets...)
Copy link
Member

Choose a reason for hiding this comment

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

Need to update the message here as well because in code we are calculating time in Microseconds instead of Millisecond.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch

@aryanmehrotra
Copy link
Member

Please create separate PR for all the data source separately

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.

4 participants