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

Remove pod-level metrics from web and CLI #304

Merged
merged 13 commits into from
Feb 9, 2018
Merged

Conversation

hawkw
Copy link
Contributor

@hawkw hawkw commented Feb 8, 2018

This PR updates the web UI to remove the pod detail page, and to remove the links to that page from pod names in metrics tables. It also removes the pods option from conduit stat, and the sourcePod and targetPod fields from the controller API proto's MetricMetadata message.

I've updated the conduit stat tests to reflect these changes, and manually verified the web UI changes.

Closes #261

@hawkw hawkw requested review from pcalcado, rmars and adleong February 8, 2018 19:53
@hawkw hawkw added the review/ready Issue has a reviewable PR label Feb 8, 2018
Copy link
Member

@adleong adleong left a comment

Choose a reason for hiding this comment

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

I think there is more pod-level data displayed on the deployment detail page: pod-summary, pod-distribution-chart, etc.

@@ -11,10 +11,10 @@ import { Table } from 'antd';
const resourceInfo = {
"upstream_deployment": { title: "deployment", url: "/deployment?deploy=" },
"downstream_deployment": { title: "deployment", url: "/deployment?deploy=" },
"upstream_pod": { title: "upstream pod", url: "/pod?pod=" },
"downstream_pod": { title: "downstream pod", url: "/pod?pod=" },
"upstream_pod": { title: "upstream pod", url: null },
Copy link
Member

Choose a reason for hiding this comment

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

should these lines be removed entirely?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@adleong removing those lines entirely breaks the deployment detail page --- I wasn't sure if we still wanted to render the list of pods in the deployment. If we don't, I can remove that as well.

Copy link

@rmars rmars Feb 9, 2018

Choose a reason for hiding this comment

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

you should be able to remove these lines, nothing's using them now, afaict

Copy link
Contributor Author

Choose a reason for hiding this comment

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

whoops, totally forgot about that --- removed in a76ea00

Copy link

@rmars rmars left a comment

Choose a reason for hiding this comment

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

Nice!
There's a lint warning on this branch that should be cleaned up.

There's some more references to pod fetching in ApiHelpers.jsx that could be removed (in urlsForResource)

@@ -51,7 +50,7 @@ export default class DeploymentDetail extends React.Component {
pollingInterval: 10000,
deploy: deployment,
metrics: [],
pods: [],
// pods: [],
Copy link

Choose a reason for hiding this comment

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

I would just delete this rather than commenting it out.
we're now at the point where we're removing so much that I think it'll just be clutter if we continue to comment things out.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I meant to comment it out while testing the change, and then delete everything that was commented out, but I think I missed that one, thanks.

@@ -160,55 +148,22 @@ export default class DeploymentDetail extends React.Component {
}

renderMidsection() {
Copy link

Choose a reason for hiding this comment

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

TIOLI the Deployment Details section is quite awkward on a row by itself, and it was slated to be removed anyway. I'd just remove all of renderMidsection() (or I will, in a follow up branch; there's more things that we're taking out too).

@@ -12,7 +11,7 @@ import { rowGutter } from './util/Utils.js';
import TabbedMetricsTable from './TabbedMetricsTable.jsx';
import UpstreamDownstream from './UpstreamDownstream.jsx';
import { Col, Row } from 'antd';
import { emptyMetric, getPodsByDeployment, processRollupMetrics, processTimeseriesMetrics } from './util/MetricUtils.js';
import { emptyMetric, processRollupMetrics, processTimeseriesMetrics } from './util/MetricUtils.js';
Copy link

Choose a reason for hiding this comment

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

emptyMetric should go too - there are lint warnings on this branch


/Users/mars/workspace/go/src/github.com/runconduit/conduit/web/app/js/components/DeploymentDetail.jsx
  14:10  warning  'emptyMetric' is defined but never used  no-unused-vars

✖ 1 problem (0 errors, 1 warning)

this.serverPromise = Promise.all([deployFetch, podRollupFetch, upstreamFetch, downstreamFetch, podListFetch, pathsFetch])
.then(([deployMetrics, podRollup, upstreamRollup, downstreamRollup, podList, paths]) => {
this.serverPromise = Promise.all([deployFetch, upstreamFetch, downstreamFetch, pathsFetch])
.then(([deployMetrics,upstreamRollup, downstreamRollup, paths]) => {
Copy link

Choose a reason for hiding this comment

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

nit: space after comma in deployMetrics,upstreamRollup

@hawkw
Copy link
Contributor Author

hawkw commented Feb 8, 2018

BTW, after testing this branch against a cluster running the latest Conduit nightly, I noticed some pages failing to load. I think that's due to the protobuf changes, and I'm building a dev version of Conduit to test against in order to make sure that's the case

Copy link
Member

@siggy siggy left a comment

Choose a reason for hiding this comment

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

after going through the full setup in BUILD.md, i noticed the Deployment Detail pages indicate the deployments are UNADDED, even though they are:

screen shot 2018-02-08 at 1 59 54 pm

@hawkw
Copy link
Contributor Author

hawkw commented Feb 8, 2018

@siggy yeah, I just noticed that as well. Am currently trying to figure out what I broke.

@hawkw
Copy link
Contributor Author

hawkw commented Feb 9, 2018

Okay folks, metrics work again and the inadvertent UNADDED badge has been removed:

screen shot 2018-02-08 at 4 32 40 pm

I think this is review-able again!

hawkw added 2 commits February 8, 2018 16:39
Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
sourceName, sourceDeployment := s.getNameAndDeployment(requestScope.Ctx.SourceIp)
targetName, targetDeployment := s.getNameAndDeployment(requestScope.Ctx.TargetAddr.Ip)
var sourceDeployment string
sourceDeploymentPtr, _ := s.getDeployment(requestScope.Ctx.SourceIp)
Copy link
Member

Choose a reason for hiding this comment

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

if we always discard the error then why have getDeployment return an error at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

due to a poorly-conceived attempt at forwards-compatibility. simplified in 62f7927

targetName, targetDeployment := s.getNameAndDeployment(requestScope.Ctx.TargetAddr.Ip)
var sourceDeployment string
sourceDeploymentPtr, _ := s.getDeployment(requestScope.Ctx.SourceIp)
if sourceDeploymentPtr == nil {
Copy link
Member

Choose a reason for hiding this comment

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

If we always replace nils with empty strings, why not have getDeployments just return empty strings in the first place?

@@ -66,9 +66,8 @@ message MetricSeries {
}

message MetricMetadata {
string targetPod = 1;
reserved 1, 3;
Copy link
Member

Choose a reason for hiding this comment

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

Our histogram change probably already broke API compatibility so 0.2 -> 0.3 is going to be a breaking change. Therefore, I don't think we need to reserve fields 1 and 3. 🍳

Signed-off-by: Eliza Weisman <[email protected]>
@@ -66,9 +66,7 @@ message MetricSeries {
}

message MetricMetadata {
string targetPod = 1;
Copy link
Member

Choose a reason for hiding this comment

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

Can condense the existing fields to make use of the newly available field numbers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't do this because the gRPC docs said it was considered harmful. But if we're not concerned about compatibility, can change.

Signed-off-by: Eliza Weisman <[email protected]>
Copy link
Member

@adleong adleong left a comment

Choose a reason for hiding this comment

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

⭐ Eggs-cellent! 🥚

Copy link

@rmars rmars left a comment

Choose a reason for hiding this comment

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

⭐️ 🚳 📻

@hawkw hawkw merged commit 2015d99 into master Feb 9, 2018
@hawkw hawkw removed the review/ready Issue has a reviewable PR label Feb 9, 2018
@olix0r olix0r deleted the eliza/rm-pod-detail branch April 30, 2018 23:20
khappucino pushed a commit to Nordstrom/linkerd2 that referenced this pull request Mar 5, 2019
* 80b4ec5 (tag: v0.1.13) Bump version to v0.1.13 (linkerd#324)
* 6b23542 Add client support for server push (linkerd#314)
* 6d8554a Reassign capacity from reset streams. (linkerd#320)
* b116605 Check whether the send side is not idle, not the recv side (linkerd#313)
* a4ed615 Check minimal versions (linkerd#322)
* ea8b8ac Avoid prematurely unlinking streams in `send_reset`, in some cases. (linkerd#319)
* 9bbbe7e Disable length_delimited deprecation warning. (linkerd#321)
* 00ca534 Update examples to use new Tokio (linkerd#316)
* 12e0d26 Added functions to access io::Error in h2::Error (linkerd#311)
* 586106a Fix push promise frame parsing (linkerd#309)
* 2b960b8 Add Reset::INTERNAL_ERROR helper to test support (linkerd#308)
* d464c6b set deny(warnings) only when cfg(test) (linkerd#307)
* b0db515 fix some autolinks that weren't resolving in docs (linkerd#305)
* 66a5d11 Shutdown the stream along with connection (linkerd#304)
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.

5 participants