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 UDF logs #1023

Merged
merged 13 commits into from
Jun 17, 2024
Merged

Add UDF logs #1023

merged 13 commits into from
Jun 17, 2024

Conversation

caseyhans
Copy link
Collaborator

@caseyhans caseyhans commented May 6, 2024

Adds logging for all UDF functionality, including UserDefinedForm, ModelBinding, TagBinding, ModelUDFContent, and TagUDFContent

A number of larger changers were made to make it to facilitate this task:

  • Added Assessment.Log logging for UDF create/update
  • Added read-only reversion admin pages, these were helpful for debugging but will also be useful in production
  • Added new middleware and helper methods which allow us to get the request (and therefore the user) from anywhere in the application. This middleware should work in all known deployments on HAWC, but require the reasonable assumption that each request is on it's own thread, which may not be the case in future deployments

Copy link
Owner

@shapiromatron shapiromatron left a comment

Choose a reason for hiding this comment

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

Looks great, though I made a number of edits. I added some new admin views to make it easier to debug, but also wanted to add the user to the logs created so I ended up creating some new middleware to make that possible. Please review and let me know if it works ok and performs as expected; if you're happy we can merge!

@caseyhans
Copy link
Collaborator Author

caseyhans commented Jun 15, 2024

LGTM! I fixed one bug I found; in the UDF update view, previewing a schema with required fields would trip up the actual form. The preview schema div is now emptied prior to form submission. If that change looks good to you, then it's ready to merge!

@shapiromatron shapiromatron changed the title Add udf logs Add UDF logs Jun 15, 2024
Copy link
Owner

Choose a reason for hiding this comment

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

@caseyhans I did a minor update to make it consistent with how we handled this in HERO - we just disable the fieldset so that they're removed from the validation

@shapiromatron shapiromatron merged commit 271e6be into main Jun 17, 2024
6 checks passed
@shapiromatron shapiromatron deleted the udf-logs branch June 17, 2024 15:28
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