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

add hostname to the labels of the metrics; pull out calls to metrics … #707

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mike-kingsbury
Copy link
Contributor

@mike-kingsbury mike-kingsbury commented Sep 14, 2022

Adds hostnames to metrics; pull out metrics functionality to metrics.py file, suggested by Bruno.

Signed-off-by: Mike Kingsbury [email protected]

Maintainers will complete the following section

  • Commit messages are descriptive enough
  • Code coverage from testing does not decrease and new code is covered
  • New code has type annotations
  • n/a OpenAPI schema is updated (if applicable)
  • n/a DB schema change has corresponding DB migration (if applicable)
  • n/a README updated (if worker configuration changed, or if applicable)

Copy link
Contributor

@chmeliik chmeliik left a comment

Choose a reason for hiding this comment

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

Seems reasonable 👍

Are there any tests for these metrics that could be updated? If we have none, that's probably OK

cachito/web/metrics.py Outdated Show resolved Hide resolved
@brunoapimentel
Copy link
Contributor

Seems reasonable +1

Are there any tests for these metrics that could be updated? If we have none, that's probably OK

I don't think there are any :(

WIth this change, it should be easy enough to add unit tests for metrics.py. I also agree it's probably OK to have this merged without the tests, they can be added as an improvement later.

@brunoapimentel
Copy link
Contributor

Overall, LGTM. Only fix needed is adding type annotations, as mentioned.

@MartinBasti
Copy link
Contributor

What's the status of this PR? Is it pending review or pending changes?

@mike-kingsbury
Copy link
Contributor Author

Should be now pending review, changes were made to the annotations

Comment on lines -107 to +109
mako==1.2.2 \
--hash=sha256:3724869b363ba630a272a5f89f68c070352137b8fd1757650017b7e06fda163f \
--hash=sha256:8efcb8004681b5f71d09c983ad5a9e6f5c40601a6ec469148753292abc0da534
mako==1.2.1 \
Copy link
Contributor

Choose a reason for hiding this comment

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

Are the requirements*.txt changes intentional? A lot of dependencies got downgraded, as well as the python version used to generate the files

@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with python 3.10
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we keep running pip-compile using python 3.10 since it's the newest version? (if there is any difference between using 3.9 and 3.10). Apart from that, LGTM

@mike-kingsbury
Copy link
Contributor Author

mike-kingsbury commented Nov 22, 2022 via email

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.

5 participants