Skip to content

Conversation

floreks
Copy link
Member

@floreks floreks commented Feb 1, 2016

This is the current look of the card status. I've also done some refactoring during backend implementation.

I've had a problem with cluster started with gulp local-up-cluster. Events returned by it has empty Type property. No idea why. It works fine on my local cluster started from kubernetes repo fork.

zrzut ekranu z 2016-02-01 14-03-33

Important: Need help in finding Pending icon. :)

@maciaszczykm @bryk PTAL

Copy link
Member Author

Choose a reason for hiding this comment

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

Whoever knows this icon name. Please tell me. :)
zrzut ekranu z 2016-02-01 14-08-44

@codecov-io
Copy link

Current coverage is 79.06%

Merging #319 into master will increase coverage by +0.08% as of 861bca5

@@            master    #319   diff @@
======================================
  Files           68      68       
  Stmts          552     554     +2
  Branches         0       0       
  Methods          0       0       
======================================
+ Hit            436     438     +2
  Partial          0       0       
  Missed         116     116       

Review entire Coverage Diff as of 861bca5

Powered by Codecov. Updated on successful CI builds.

@floreks floreks force-pushed the card-status branch 3 times, most recently from 76cb8ee to 7099b41 Compare February 1, 2016 14:21
@bryk
Copy link
Contributor

bryk commented Feb 1, 2016

Re icon: anything worth using on material icons? E.g., https://design.google.com/icons/#ic_timelapse ?
Can you look at others?

@bryk
Copy link
Contributor

bryk commented Feb 1, 2016

Or something from the notification list? https://design.google.com/icons/

@bryk
Copy link
Contributor

bryk commented Feb 1, 2016

Re performance: It seems that for every card we query for events. I think it was supposed to query for events only when not all pods are running. Am I correct?

Sample log:

2016/02/01 16:44:25 Incoming HTTP/1.1 GET /api/replicasets request from [::1]:48812
2016/02/01 16:44:25 Getting list of all replica sets in the cluster
2016/02/01 16:44:25 Getting list of pods error events
2016/02/01 16:44:26 Getting list of pods error events
2016/02/01 16:44:26 Getting list of pods error events
2016/02/01 16:44:26 Getting list of pods error events
2016/02/01 16:44:26 Getting list of pods error events
2016/02/01 16:44:26 Getting list of pods error events
2016/02/01 16:44:26 Getting list of pods error events
2016/02/01 16:44:26 Getting list of pods error events
2016/02/01 16:44:26 Getting list of pods error events
2016/02/01 16:44:26 Getting list of pods error events
2016/02/01 16:44:26 Getting list of pods error events
2016/02/01 16:44:26 Getting list of pods error events
2016/02/01 16:44:26 Getting list of pods error events
2016/02/01 16:44:26 Outcoming response to [::1]:48812 with 201 status code

@bryk
Copy link
Contributor

bryk commented Feb 1, 2016

Should this be an error? It is not when I test it

selection_015

Copy link
Contributor

Choose a reason for hiding this comment

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

Hey, now instead of one api call we have N api calls. Please fix :)

Copy link
Member Author

Choose a reason for hiding this comment

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

There are N api calls even now. I've only refactored it and extracted function.

https://github.com/kubernetes/dashboard/blob/master/src/app/backend/events.go#L149

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, yes. Sorry. Can you add a todo so that we know what to fix?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure. This PR is quite big so i will do that in next PR.

@floreks
Copy link
Member Author

floreks commented Feb 1, 2016

Should this be an error? It is not when I test it

Check my initial comment :)

I've had a problem with cluster started with gulp local-up-cluster. Events returned by it has empty Type property. No idea why. It works fine on my local cluster started from kubernetes repo fork.

You can check if they are empty on replica set detail events tab. If there will be no warning icons then it means that event types are empty and no errors can be recognized.

@floreks
Copy link
Member Author

floreks commented Feb 1, 2016

Re performance: It seems that for every card we query for events. I think it was supposed to query for events only when not all pods are running. Am I correct?

This may be misleading, because log info is on the start of function and then in the function itself is check whether pod is in some fail state in order to get events.

@floreks floreks force-pushed the card-status branch 3 times, most recently from fd4c4cb to 847c450 Compare February 2, 2016 08:46
@floreks
Copy link
Member Author

floreks commented Feb 2, 2016

Re icon: anything worth using on material icons? E.g., https://design.google.com/icons/#ic_timelapse ?
Can you look at others?

I couldn't find anything better than timelapse, so I've used it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Should it be public?

Copy link
Contributor

Choose a reason for hiding this comment

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

No need IMO

@floreks
Copy link
Member Author

floreks commented Feb 2, 2016

I've changed some comments and renamed functions. PTAL

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm.... I'd reverse this statement. The reason is that if new status is added, the function will be broken. If you list running and success here, then everything would be fine.

Copy link
Member Author

Choose a reason for hiding this comment

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

Makes sense.

@bryk
Copy link
Contributor

bryk commented Feb 2, 2016

The icons need some kind of tooltip that explain what they mean. I.e., the timelapse icon should have description that says that some pods are pending.

@bryk
Copy link
Contributor

bryk commented Feb 2, 2016

Should this be an error? It is not when I test it

Check my initial comment :)

Hmm.. I'm running on a "real" cluster and I still see this as pending. We should fix this, IMO. How about some kind of heuristics? I.e., when there is no event type, then check whether reason has Failed substring. This should cover most cases, as I'm looking at various failure reasons. What do you think?

@floreks
Copy link
Member Author

floreks commented Feb 2, 2016

I've extracted new functions to new file. It feels more related to events than to replicasetcommon. I need to adjust some comments only, but you can take a look.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm... This is equivalent to checking for only first event's type. How about for every event you check whether it has type or not. This is the way we should do this, because, I imagine, that some events have type and some not.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that if api will fill one event type then it will fill it for all events, but just to be extra safe I'll change.

@bryk
Copy link
Contributor

bryk commented Feb 2, 2016

Btw, I tested this on my instance. The tool we're building looks better and better! :)

@bryk
Copy link
Contributor

bryk commented Feb 2, 2016

We need some more tests on the backend and everything else looks good.

@floreks floreks force-pushed the card-status branch 4 times, most recently from 28911c9 to ffe7854 Compare February 2, 2016 12:09
@floreks
Copy link
Member Author

floreks commented Feb 2, 2016

This PR has grown quite big :). PTAL

Copy link
Contributor

Choose a reason for hiding this comment

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

I dont think this should be $secondary. It is a coincidence that our secondary color is red. It was pink not so long ago.

This should have color of {{warn-A700}} as defined, e.g., here: https://github.com/angular/material/blob/1f997951b5d480d04ea7d356107837e279d6a271/src/components/input/input-theme.scss#L70

@bryk
Copy link
Contributor

bryk commented Feb 2, 2016

Last two comments and LGTM.

@bryk
Copy link
Contributor

bryk commented Feb 2, 2016

Should we merge this after replica set renaming? I think yes.

@floreks
Copy link
Member Author

floreks commented Feb 2, 2016

Last two comments and LGTM.

Fixed

Should we merge this after replica set renaming? I think yes.

Unfortunately yes. Conflicts are going to kill me for sure :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Is it ok?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes.

@bryk
Copy link
Contributor

bryk commented Feb 2, 2016

Ok, so LGTM on this. Let's wait for the rename to be done, and you'll rebase. Hopefully, without many problems :)

@bryk
Copy link
Contributor

bryk commented Feb 3, 2016

Rebase please :)

@floreks floreks force-pushed the card-status branch 2 times, most recently from e179100 to 68c7c96 Compare February 3, 2016 09:33
@floreks
Copy link
Member Author

floreks commented Feb 3, 2016

I really hope that I've merged it correctly :)

@bryk
Copy link
Contributor

bryk commented Feb 3, 2016

LGTM, nice job! Tested on prod, works like a charm. Merging.

bryk added a commit that referenced this pull request Feb 3, 2016
Added replica set card status messages
@bryk bryk merged commit c25dd5b into kubernetes:master Feb 3, 2016
@floreks floreks deleted the card-status branch February 3, 2016 09:49
@floreks floreks mentioned this pull request Feb 19, 2016
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