Adds the ss param to the CMP fetch URL. Feeling a bit conflicted about having the logic for this inside the _buildUrl method, though it is technically part of building the URL. Open to moving it into a separate function.
Looks like it works as expected, but I share your mixed feelings about having the logic be inside the _buildURL method. I suggest factoring it out to a static method of either the CMP or the Metrics class. While you're at it, could you convert CMP#_buildURL to use the _buildQueryPair method you made in Metrics? It can be (and should be, since it can be) converted to a static method, I think.
Probably most importantly, we should see if we can rename the key from ss to something else, to avoid the confusion of a key that means one thing in the context of a call to the CMP server and something else entirely in the context of a call to the metrics server. Let's work with JJ to see how we can do this - technically, it should be an easy change on the CMP server side.
See comment (but disregard the part about the parameter naming)
wlycdgr
changed the title
GH-2289: Add sub status to CMP fetch URL
(REVIEWED; COMMENTS TO BE ADDRESSED) GH-2289: Add sub status to CMP fetch URL
Mar 3, 2021
As we discussed, I moved the query string building to a util function that we can use for both the CMP & Metrics classes (with a small addition for when we need a ? at the beginning of the returned string instead of &), and I factored getting the sub status out from CMP_buildURL into its own static method.
wlycdgr
changed the title
(REVIEWED; COMMENTS TO BE ADDRESSED) GH-2289: Add sub status to CMP fetch URL
GH-2289: Add sub status to CMP fetch URL
Mar 8, 2021
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.
Adds the
ssparam to the CMP fetch URL. Feeling a bit conflicted about having the logic for this inside the_buildUrlmethod, though it is technically part of building the URL. Open to moving it into a separate function.