Skip to content

Conversation

@pcrespov
Copy link
Member

@pcrespov pcrespov commented Apr 3, 2025

What do these changes do?

Enhance JSON serialization with a fallback representation encoder and update logging to utilize it

This is how it logs the new formatting of troubleshooting dump:
The error message shown to the user heads the error log. then there is a json with

  1. details of the exception (type, hierarchy and OEC)
  2. context (i.e. variable when exception raised)
  3. tip for resolution
  4. traceback of the error

image

Related issue/s

How to test

  • test_json_dumps_with_representation_encoder

Dev-ops

None

@pcrespov pcrespov added this to the The Awakening milestone Apr 3, 2025
@pcrespov pcrespov self-assigned this Apr 3, 2025
@codecov
Copy link

codecov bot commented Apr 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.09%. Comparing base (e11ff32) to head (d1e1f4e).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7473      +/-   ##
==========================================
- Coverage   87.43%   87.09%   -0.35%     
==========================================
  Files        1737     1383     -354     
  Lines       67032    56943   -10089     
  Branches     1138      624     -514     
==========================================
- Hits        58609    49594    -9015     
+ Misses       8102     7152     -950     
+ Partials      321      197     -124     
Flag Coverage Δ
integrationtests 65.20% <100.00%> (-0.05%) ⬇️
unittests 86.12% <100.00%> (-0.48%) ⬇️
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library ∅ <ø> (∅)
pkg_notifications_library ∅ <ø> (∅)
pkg_postgres_database ∅ <ø> (∅)
pkg_service_integration ∅ <ø> (∅)
pkg_service_library 72.22% <100.00%> (ø)
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 85.46% <ø> (ø)
agent 96.46% <ø> (ø)
api_server 90.83% <ø> (ø)
autoscaling 96.08% <ø> (ø)
catalog 91.82% <ø> (+0.11%) ⬆️
clusters_keeper 99.24% <ø> (ø)
dask_sidecar 91.29% <ø> (ø)
datcore_adapter 98.12% <ø> (ø)
director 76.78% <ø> (ø)
director_v2 91.30% <ø> (-0.13%) ⬇️
dynamic_scheduler 97.35% <ø> (ø)
dynamic_sidecar 90.11% <ø> (ø)
efs_guardian 89.79% <ø> (ø)
invitations 93.28% <ø> (ø)
payments 92.66% <ø> (ø)
resource_usage_tracker 89.12% <ø> (-0.11%) ⬇️
storage 87.17% <ø> (-0.27%) ⬇️
webclient ∅ <ø> (∅)
webserver 85.88% <100.00%> (-0.04%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e11ff32...d1e1f4e. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pcrespov pcrespov added a:webserver webserver's codebase. Assigning the area is particularly useful for bugs a:models-library labels Apr 3, 2025
@pcrespov pcrespov changed the title ✨ Maintenance: Enhance JSON serialization with a fallback representation encoder a… ✨ Maintenance: Improves troubleshooting dump message used to log 5XX errors Apr 3, 2025
@pcrespov pcrespov marked this pull request as ready for review April 3, 2025 15:55
@pcrespov pcrespov enabled auto-merge (squash) April 3, 2025 15:55
@pcrespov pcrespov added the t:maintenance Some planned maintenance work label Apr 3, 2025
@pcrespov pcrespov requested a review from odeimaiz April 3, 2025 16:18
@pcrespov pcrespov added the 🤖-automerge marks PR as ready to be merged for Mergify label Apr 3, 2025
@pcrespov
Copy link
Member Author

pcrespov commented Apr 3, 2025

@mergify queue

@mergify
Copy link
Contributor

mergify bot commented Apr 3, 2025

queue

☑️ Nothing to do

  • any of: [🔀 queue conditions]
    • all of: [📌 queue conditions of queue default]
      • branch-protection-review-decision = APPROVED [🛡 GitHub branch protection]
      • any of: [🛡 GitHub branch protection]
        • check-neutral = deploy to dockerhub
        • check-skipped = deploy to dockerhub
        • check-success = deploy to dockerhub
      • any of: [🛡 GitHub branch protection]
        • check-neutral = system-tests
        • check-skipped = system-tests
        • check-success = system-tests
      • any of: [🛡 GitHub branch protection]
        • check-neutral = unit-tests
        • check-skipped = unit-tests
        • check-success = unit-tests
      • any of: [🛡 GitHub branch protection]
        • check-neutral = integration-tests
        • check-skipped = integration-tests
        • check-success = integration-tests
      • #approved-reviews-by >= 2 [🛡 GitHub branch protection]
      • #approved-reviews-by>=2
      • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
      • #changes-requested-reviews-by=0
      • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
      • #review-threads-unresolved=0
      • -conflict
      • -draft
      • base=master
      • label!=🤖-do-not-merge
      • label=🤖-automerge
      • any of: [🛡 GitHub branch protection]
        • check-success = check OAS' are up to date
        • check-neutral = check OAS' are up to date
        • check-skipped = check OAS' are up to date
      • any of: [🛡 GitHub branch protection]
        • check-success = [build] docker images (excluding frontend) (3.11, ubuntu-24.04)
        • check-neutral = [build] docker images (excluding frontend) (3.11, ubuntu-24.04)
        • check-skipped = [build] docker images (excluding frontend) (3.11, ubuntu-24.04)
  • -closed [📌 queue requirement]
  • -conflict [📌 queue requirement]
  • -draft [📌 queue requirement]
  • any of: [📌 queue -> configuration change requirements]
    • -mergify-configuration-changed
    • check-success = Configuration changed

Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

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

very nice!

Copy link
Member

@odeimaiz odeimaiz left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Collaborator

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

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

nice 👍

@pcrespov
Copy link
Member Author

pcrespov commented Apr 4, 2025

@mergify queue

@mergify
Copy link
Contributor

mergify bot commented Apr 4, 2025

queue

☑️ Nothing to do

  • any of: [🔀 queue conditions]
    • all of: [📌 queue conditions of queue default]
      • branch-protection-review-decision = APPROVED [🛡 GitHub branch protection]
      • any of: [🛡 GitHub branch protection]
        • check-neutral = deploy to dockerhub
        • check-skipped = deploy to dockerhub
        • check-success = deploy to dockerhub
      • any of: [🛡 GitHub branch protection]
        • check-neutral = system-tests
        • check-skipped = system-tests
        • check-success = system-tests
      • any of: [🛡 GitHub branch protection]
        • check-neutral = unit-tests
        • check-skipped = unit-tests
        • check-success = unit-tests
      • any of: [🛡 GitHub branch protection]
        • check-neutral = check OAS' are up to date
        • check-skipped = check OAS' are up to date
        • check-success = check OAS' are up to date
      • any of: [🛡 GitHub branch protection]
        • check-neutral = integration-tests
        • check-skipped = integration-tests
        • check-success = integration-tests
      • any of: [🛡 GitHub branch protection]
        • check-neutral = [build] docker images (excluding frontend) (3.11, ubuntu-24.04)
        • check-skipped = [build] docker images (excluding frontend) (3.11, ubuntu-24.04)
        • check-success = [build] docker images (excluding frontend) (3.11, ubuntu-24.04)
      • #approved-reviews-by >= 2 [🛡 GitHub branch protection]
      • #approved-reviews-by>=2
      • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
      • #changes-requested-reviews-by=0
      • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
      • #review-threads-unresolved=0
      • -conflict
      • -draft
      • base=master
      • label!=🤖-do-not-merge
      • label=🤖-automerge
  • -closed [📌 queue requirement]
  • -conflict [📌 queue requirement]
  • -draft [📌 queue requirement]
  • any of: [📌 queue -> configuration change requirements]
    • -mergify-configuration-changed
    • check-success = Configuration changed

@pcrespov pcrespov disabled auto-merge April 4, 2025 13:43
@pcrespov pcrespov merged commit 11a7e7b into ITISFoundation:master Apr 4, 2025
33 checks passed
@pcrespov pcrespov deleted the mai/error-dumps branch April 4, 2025 13:43
@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 4, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖-automerge marks PR as ready to be merged for Mergify a:models-library a:webserver webserver's codebase. Assigning the area is particularly useful for bugs t:maintenance Some planned maintenance work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants