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

Adding group aggregators to fix many -> one relationships. #36

Merged
merged 10 commits into from
Jun 28, 2022

Conversation

felder
Copy link
Contributor

@felder felder commented Mar 29, 2022

No description provided.

@welcome
Copy link

welcome bot commented Mar 29, 2022

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

Copy link
Collaborator

@yuvipanda yuvipanda left a comment

Choose a reason for hiding this comment

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

Thank you so much for working on this, @felder!

@felder felder requested a review from yuvipanda March 30, 2022 19:37
@yuvipanda
Copy link
Collaborator

Thanks @felder. Is this ready to merge? If you can add some inline comments on why group is necessary, I think that will help with longer term maintenance.

@felder
Copy link
Contributor Author

felder commented Apr 1, 2022

@yuvipanda This is ready for merge.

sum(
# Get a list of all the nodes and which pool they are in. Group
# aggregator is used because we only expect each node to exist
# in a single pool. Unfortunately, if a node pool is rotated it may
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, I think the explanation is slightly different. kube_pod_labels comes from https://github.com/kubernetes/kube-state-metrics, and there is a particular label (kubernetes_node) that lists the node on which the kube-state-metrics pod is running! So that's totally irrelevant to these queries, but when a nodepool is rotated it caused there to exist two metrics with the same node value (which we care about) but different kubernetes_node values (because kube-state-metrics was running in a different node, even though we don't care about that). So I think this group really just drops all labels except the two we care about to avoid messing things up.

@yuvipanda yuvipanda merged commit be78ef5 into jupyterhub:main Jun 28, 2022
@welcome
Copy link

welcome bot commented Jun 28, 2022

Congrats on your first merged pull request in this project! 🎉
congrats
Thank you for contributing, we are very proud of you! ❤️

@yuvipanda
Copy link
Collaborator

Thanks, @felder!

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.

2 participants