You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "luizotavio32 (via GitHub)" <gi...@apache.org> on 2026/07/13 21:07:55 UTC
[PR] fix(event-log): require segment boundary after 'embedded' in route regex [superset]
luizotavio32 opened a new pull request, #42011:
URL: https://github.com/apache/superset/pull/42011
### SUMMARY
Backports to 6.1 the segment-boundary fix for embedded-route classification in `loggerMiddleware`.
6.1 already carries the earlier embedded-route work (the regex with an optional trailing slash). However, the first branch of that regex does not enforce an end-of-segment boundary after `embedded`, so `EMBEDDED_ROUTE_REGEX.test(...)` also matches prefixes like `/dashboard/123/embeddedXYZ`, misclassifying those events with `source: 'embedded_dashboard'` instead of `source: 'dashboard'`.
This requires an end-of-segment boundary (`/`, `?`, `#`, or end of string) after `embedded`:
```diff
- /\/dashboard\/[^/]+\/embedded\/?|\/embedded\/[^/]+\/?/;
+ /\/dashboard\/[^/]+\/embedded(?:[/?#]|$)|\/embedded\/[^/]+\/?/;
```
The second branch (`/embedded/:uuid`) is unchanged — its `[^/]+` already treats the UUID as a full segment.
This mirrors the fix under review for master in apache/superset#42005.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A — internal event-logging metadata change only.
### TESTING INSTRUCTIONS
Unit tests in `superset-frontend/src/middleware/logger.test.ts` add coverage for the prefix case:
- `/dashboard/123/embeddedXYZ/` -> `dashboard`
alongside the existing embedded/regular-dashboard cases.
Run:
```bash
cd superset-frontend
npm run test -- src/middleware/logger.test.ts
```
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(event-log): require segment boundary after 'embedded' in route regex [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #42011:
URL: https://github.com/apache/superset/pull/42011#issuecomment-4962698260
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(event-log): require segment boundary after 'embedded' in route regex [superset]
Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #42011:
URL: https://github.com/apache/superset/pull/42011#issuecomment-4962738625
### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | 5d864443db708a70e83c74446792db32ab4961ad |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a5553ab21d88900080c534c |
|<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-42011--superset-docs-preview.netlify.app](https://deploy-preview-42011--superset-docs-preview.netlify.app) |
|<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br /><br /><br />_Use your smartphone camera to open QR code link._</details> |
|<span aria-hidden="true">🤖</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#DcpLCoAgEADQu8w6QzPFukHHUGeiID-IQRLdPXdv8V7IJYVcYQUYwBUb_dG9nw-j4AiRkJV0V2Iu3RFtaUyPolekfKW2Yc_aKqWkdZNAYxbOueFeydnD9wM) |
---
<!-- [superset-docs-preview Preview](https://deploy-preview-42011--superset-docs-preview.netlify.app) -->
_To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(event-log): require segment boundary after 'embedded' in route regex [superset]
Posted by "luizotavio32 (via GitHub)" <gi...@apache.org>.
luizotavio32 closed pull request #42011: fix(event-log): require segment boundary after 'embedded' in route regex
URL: https://github.com/apache/superset/pull/42011
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org