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

Adds loggers to report flow #3872

Merged
merged 6 commits into from
Nov 28, 2024
Merged

Conversation

madelondohmen
Copy link
Contributor

Changes

This PR adds some loggers to the report flow.
Event codes can be found here: #3043 (comment)

Issue link

Closes ...

QA notes

Please add some information for QA on how to test the newly created code.


Code Checklist

  • All the commits in this PR are properly PGP-signed and verified.
  • This PR only contains functionality relevant to the issue.
  • I have written unit tests for the changes or fixes I made.
  • I have checked the documentation and made changes where necessary.
  • I have performed a self-review of my code and refactored it to the best of my abilities.
  • Tickets have been created for newly discovered issues.
  • For any non-trivial functionality, I have added integration and/or end-to-end tests.
  • I have informed others of any required .env changes files if required and changed the .env-dist accordingly.
  • I have included comments in the code to elaborate on what is not self-evident from the code itself, including references to issues and discussions online, or implicit behavior of an interface.

Checklist for code reviewers:

Copy-paste the checklist from the docs/source/templates folder into your comment.


Checklist for QA:

Copy-paste the checklist from the docs/source/templates folder into your comment.

@madelondohmen madelondohmen self-assigned this Nov 21, 2024
@madelondohmen madelondohmen requested a review from a team as a code owner November 21, 2024 09:33
Copy link
Contributor

@ammar92 ammar92 left a comment

Choose a reason for hiding this comment

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

I suggest looking at the code base on how we currently deal with the logs and event codes. See for example the constants defined in octopoes/octopoes/types.py, similar constants can be defined in rocky/reports/views/mixins.py and rocky/rocky/scheduler.py. Also note that event codes are currently implemented as integers, so prefixing with 0 and sending them out as strings is wrong. For example and in the style of the already existing logs, "080071" would be something like 800071

@madelondohmen
Copy link
Contributor Author

I suggest looking at the code base on how we currently deal with the logs and event codes. See for example the constants defined in octopoes/octopoes/types.py, similar constants can be defined in rocky/reports/views/mixins.py and rocky/rocky/scheduler.py. Also note that event codes are currently implemented as integers, so prefixing with 0 and sending them out as strings is wrong. For example and in the style of the already existing logs, "080071" would be something like 800071

@ammar92 This was based on a conversation with @underdarknl, who said that the event codes had to be strings instead of integers and that they had to start with a "0" (like how it's written here #3043 (comment)). @underdarknl, what do you think?

@stephanie0x00
Copy link
Contributor

Moved from QA to blocked as it's waiting for input from @underdarknl .

@underdarknl
Copy link
Contributor

Lets continue with Integers for now. The spec mentions 'codes', the examples have Codes with a leading zero, but beyond that there's no immediate value to making them into strings I think.

Copy link

sonarcloud bot commented Nov 28, 2024

@underdarknl underdarknl merged commit fb59a14 into main Nov 28, 2024
21 of 22 checks passed
@underdarknl underdarknl deleted the feature/add-logging-to-reports branch November 28, 2024 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants