Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Fixes #1075 - FetchMetrics doesn't return latest metric(s) when version < 0 #1076

Merged
merged 1 commit into from
Jul 15, 2016

Conversation

jcooklin
Copy link
Collaborator

@jcooklin jcooklin commented Jul 15, 2016

Fixes #1075

This PR was submitted in response to PR #1049 and comments made by @tjmcs. After this PR lands #1049 can land.

Summary of changes:

  • FetchMetrics now returns latest metric when version < 0

Testing done:

  • test + manual

@intelsdi-x/snap-maintainers

@jcooklin jcooklin changed the title Ib/fixes 1075 Fixes #1075 - FetchMetrics doesn't return latest metric(s) when version < 0 Jul 15, 2016
@@ -81,17 +81,6 @@ func (s *Server) getMetricsFromTree(w http.ResponseWriter, r *http.Request, para
return
}

// If no version was given, get all that fall at this namespace.
Copy link
Contributor

Choose a reason for hiding this comment

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

Removing this block of code no longer returns metrics from the rest server when using curl http://localhost:8181/v1/metrics/intel/mock/foo and now returns a 400 for invalid syntax instead of versions 1 and 2 of the metric.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point, I was looking at it from the POV of the client.

@candysmurf
Copy link
Contributor

LGTM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants