Skip to content

Conversation

@thesujai
Copy link
Contributor

@thesujai thesujai commented May 29, 2025

Summary

  1. vendors the sentry scrubber.py to match our own needs.
  2. Update to new Core API
  3. Address some suggestions from GSoC: Distributed error reporting #12489

References

Fixes #13395

Reviewer guidance

NA

@github-actions github-actions bot added DEV: backend Python, databases, networking, filesystem... DEV: frontend SIZE: medium labels May 29, 2025
@github-actions
Copy link
Contributor

github-actions bot commented May 29, 2025

Build Artifacts

@thesujai
Copy link
Contributor Author

@rtibbles cc

@MisRob MisRob requested review from akolson, bjester and rtibbles May 30, 2025 03:12
@bjester bjester self-assigned this Jun 3, 2025
@rtibbles rtibbles self-assigned this Jun 18, 2025
Copy link
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

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

Generally, this is looking good to me. One small bit of cleanup where I think we can just use the KDS breakpoints.

I think we need to rebase the feature branch again, but easier to do that after this has been merged.

import { browser, os, device, isTouchDevice } from 'kolibri.utils.browserInfo';
import client from 'kolibri/client';
import urls from 'kolibri/urls';
import { browser, os, device, isTouchDevice, screenBreakpoint } from 'kolibri/utils/browserInfo';
Copy link
Member

Choose a reason for hiding this comment

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

I think instead of adding this separate screenBreakpoint utility here, we can use the KDS breakpoints instead.

Can probably just import:

import useKResponsiveWindow from 'kolibri-design-system/lib/composables/useKResponsiveWindow';

then in the function body do:

const { windowBreakpoint } = useKResponsiveWindow();

Just need to make sure to then reference windowBreakpoint.value when passing it into the context object.

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 tried and had a problem:

windowBreakpoint.value is always null when i try to call it from kolibri/plugins/error_reports/assets/src/utils.js

Here is what I am doing

import useKResponsiveWindow from 'kolibri-design-system/lib/composables/useKResponsiveWindow';

const {windowBreakpoint} = useKResponsiveWindow();
    

console.log('windowBreakpoint', JSON.stringify(windowBreakpoint));

I see this in console:

windowBreakpoint {"value":null}

Copy link
Member

Choose a reason for hiding this comment

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

Hrm, this is probably because we're using it outside a component, so the tracking isn't working.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So is there a workaround for this?

Copy link
Member

Choose a reason for hiding this comment

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

I think it's probably easiest just to copy the logic and read the values when we report an error.

Can just copy the array here: https://github.com/learningequality/kolibri-design-system/blob/develop/lib/composables/useKResponsiveWindow/index.js#L67

And then compare the window width to get the breakpoint.

"available_height": {"type": "integer", "optional": True},
},
},
"screen_breakpoint": {"type": "string", "optional": True},
Copy link
Member

Choose a reason for hiding this comment

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

If we're using the KDS breakpoints, then we can set this as a non-negative integer.

@thesujai thesujai requested a review from rtibbles July 8, 2025 18:34
Copy link
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

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

This is looking good to go, I'm going to give it a manual run through tomorrow to be sure, but nothing immediately jumping out to me!

]


def get_denylist(send_default_pii=False, custom_denylist=None):
Copy link
Member

Choose a reason for hiding this comment

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

It seems like we don't actually use this function anywhere? May be simpler to just merge the DEFAULT_PII_DENYLIST above into the other list, and then remove this function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! done

@thesujai thesujai requested a review from rtibbles July 14, 2025 16:33
@rtibbles rtibbles merged commit ab06242 into learningequality:distributed-error-reporting Jul 17, 2025
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DEV: backend Python, databases, networking, filesystem... DEV: frontend SIZE: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants