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

Change Graph logger call sites #4165

Merged
merged 22 commits into from
Oct 29, 2021

Conversation

nathaniel-may
Copy link
Contributor

@nathaniel-may nathaniel-may commented Oct 29, 2021

waiting to merge till #4163 is in the feature branch, but it's ready for review.

Description

Changes log call sites in graph module

TODO:

  • point to feature/structured-logging to merge

Checklist

  • I have signed the CLA
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md and added information about my change

@cla-bot cla-bot bot added the cla:yes label Oct 29, 2021
@nathaniel-may nathaniel-may changed the title Graph call sites Change Graph logger call sites Oct 29, 2021
@nathaniel-may nathaniel-may changed the base branch from feature/structured-logging to client-call-sites October 29, 2021 19:02
@nathaniel-may nathaniel-may marked this pull request as ready for review October 29, 2021 19:02
Copy link
Member

@emmyoop emmyoop left a comment

Choose a reason for hiding this comment

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

Just a small issue.

@@ -264,3 +306,4 @@ def cli_msg(self) -> str:
SystemStdOutMsg(bmsg=b'')
SystemStdErrMsg(bmsg=b'')
SystemReportReturnCode(code=0)
SelectorReportInvalidSelector(selector_methods={'':''}, spec_method='', raw_spec='')
Copy link
Member

Choose a reason for hiding this comment

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

missing SelectorAlertAllUnusedNodes and SelectorAlertUpto3UnusedNodes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch!

@@ -103,11 +94,11 @@ def get_nodes_from_criteria(
try:
collected = self.select_included(nodes, spec)
except InvalidSelectorException:
valid_selectors = ", ".join(self.SELECTOR_METHODS)
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason to move this into SelectorReportInvalidSelector?

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'm trying to take the approach where the event represents all the necessary data, and the responsibility to turn data into human-readable strings is entirely up to the event methods. valid_selectors looks like it's entirely about turning data into strings so I moved it.

Copy link
Member

Choose a reason for hiding this comment

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

Makes sense. Just want to make sure I'm consistent.

Base automatically changed from client-call-sites to feature/structured-logging October 29, 2021 20:35
@nathaniel-may nathaniel-may merged commit d2f0e2d into feature/structured-logging Oct 29, 2021
@nathaniel-may nathaniel-may deleted the graph-call-sites branch October 29, 2021 21:08
@nathaniel-may nathaniel-may mentioned this pull request Nov 8, 2021
21 tasks
emmyoop added a commit that referenced this pull request Nov 8, 2021
graph call sites for structured logging
emmyoop added a commit that referenced this pull request Nov 8, 2021
graph call sites for structured logging
kwigley pushed a commit that referenced this pull request Nov 9, 2021
graph call sites for structured logging
nathaniel-may pushed a commit that referenced this pull request Nov 9, 2021
graph call sites for structured logging
iknox-fa pushed a commit that referenced this pull request Feb 8, 2022
graph call sites for structured logging


automatic commit by git-black, original commits:
  51d8440
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants