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

[sync part2] Moved client prometheus code to separate promclient package. #729

Merged
merged 1 commit into from
Feb 1, 2019

Conversation

bwplotka
Copy link
Member

@bwplotka bwplotka commented Jan 14, 2019

Allows to reuse Prometheus client methods cleanly.

Nothing changed, except fixed IsWALDirAccessible (as WAL is actually a dir). Otherwise just moved code.

This is prerequisite for #731

@@ -606,117 +605,6 @@ func runRule(
return nil
}

// Scalar response consists of array with mixed types so it needs to be
// unmarshaled separatelly.
func convertScalarJSONToVector(scalarJSONResult json.RawMessage) (model.Vector, error) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Those two are 1:1 moved, nothing changed.

)

func TestRule_UnmarshalScalarResponse(t *testing.T) {
Copy link
Member Author

Choose a reason for hiding this comment

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

1:1 moved.

@@ -357,45 +338,3 @@ func (s *metadata) Timestamps() (mint int64, maxt int64) {

return s.mint, s.maxt
}

func queryExternalLabels(ctx context.Context, logger log.Logger, base *url.URL) (labels.Labels, error) {
Copy link
Member Author

Choose a reason for hiding this comment

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

1:1 moved.

"github.com/improbable-eng/thanos/pkg/testutil"
)

func TestSidecar_queryExternalLabels(t *testing.T) {
Copy link
Member Author

Choose a reason for hiding this comment

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

1:1 moved.

@bwplotka bwplotka changed the title Moved client prometheus code to separate promclient package. [sync part2] Moved client prometheus code to separate promclient package. Jan 21, 2019
Copy link
Contributor

@domgreen domgreen left a comment

Choose a reason for hiding this comment

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

Just question about splitting the promclient package into two

pkg/promclient/promclient.go Show resolved Hide resolved
pkg/promclient/promclient.go Outdated Show resolved Hide resolved
@bwplotka bwplotka force-pushed the bucket-usage-simplify branch 2 times, most recently from e8933b0 to fd8d951 Compare January 23, 2019 16:39
@bwplotka
Copy link
Member Author

Addressed. Will rebase later, as it should not affect it much, conflict is because of imports...

@bwplotka bwplotka force-pushed the bucket-usage-simplify branch from fd8d951 to 7b72b6d Compare January 30, 2019 13:21
@bwplotka bwplotka force-pushed the promclient branch 2 times, most recently from 126de42 to 8c4cc0c Compare January 30, 2019 13:51
Copy link
Contributor

@domgreen domgreen left a comment

Choose a reason for hiding this comment

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

LGTM - lets get a green CI run before merging 👍

@bwplotka bwplotka force-pushed the promclient branch 3 times, most recently from ef254d1 to 02b0186 Compare January 31, 2019 18:11
@bwplotka bwplotka changed the base branch from bucket-usage-simplify to master February 1, 2019 20:38
Nothing changed, except fixed IsWALDirAccessible (as WAL is actually a dir).
Otherwise just moved code.

Signed-off-by: Bartek Plotka <[email protected]>
@bwplotka bwplotka merged commit 85b4394 into master Feb 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants