Skip to content

Add support for query parameters in path matching#13

Merged
stevekinney merged 3 commits into
mainfrom
improve-path-matching
Jul 20, 2021
Merged

Add support for query parameters in path matching#13
stevekinney merged 3 commits into
mainfrom
improve-path-matching

Conversation

@stevekinney

Copy link
Copy Markdown
Contributor

What was changed

Adds support for query parameters when determining if one path is a match or child of the other.

Why?

When we support query parameters for filtering, we're going to want to have our active links still work. This is probably an edge case, but an easy enough fix.

Comment thread src/lib/utilities/path-matches.test.ts Outdated
expect(pathMatches('/workflows?query=param', '/queries')).toBe(false);
});

it('should query params ignore do not match and the paths match', () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

typo?

Suggested change
it('should query params ignore do not match and the paths match', () => {
it('should ignore query params present in both paths and the paths match', () => {

Comment thread src/lib/utilities/path-matches.test.ts Outdated
);
});

it('should query params ignore do not match and the paths do not match', () => {

@feedmeapples feedmeapples Jul 20, 2021

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

typo?

@stevekinney
stevekinney merged commit 44afb33 into main Jul 20, 2021
@stevekinney
stevekinney deleted the improve-path-matching branch July 20, 2021 15:56
Alex-Tideman added a commit that referenced this pull request Apr 2, 2026
Implement Tier 1 detections from existing data (#9, #11, #13, #15, #19,
#23, #35) and Tier 2 detections from event history scanning (#8, #12,
#26, #27, #28, #29, #30). Adds detectEventHistoryErrors with single-pass
scanning and updates getApplicableCommonErrors to accept optional event
history. All 35 error definitions now have active detection logic.
Alex-Tideman added a commit that referenced this pull request Apr 28, 2026
* Add common-error component with 35 workflow configuration warnings (#3262)

Create a reusable common-error component system for displaying operational
guidance about workflow misconfigurations. Includes typed data for 35 known
issues with severity levels, documentation links, and a /common-errors route.

* Integrate common-error detection into workflow detail header

Add automatic detection of 21 workflow configuration issues and display
them as warnings in the workflow header. Detection covers timeout
misconfigurations, retry policy issues, heartbeat settings, and more.
Also fixes raw code references in error titles.

* Fix detection accuracy for common errors

- Raise #31 threshold from 4000 to 10000 to match "significant additional events"
- Add null guards to all getCommonErrorById calls via addError helper
- Detect #3 (short timeout) from workflowRunTimeout on first event, not just execution timeout
- Fix #10 false positives for empty retry policy objects
- Handle protobuf nanos field in durationToSeconds for sub-second durations

* Add detection logic for 14 remaining common errors (#8-#35)

Implement Tier 1 detections from existing data (#9, #11, #13, #15, #19,
#23, #35) and Tier 2 detections from event history scanning (#8, #12,
#26, #27, #28, #29, #30). Adds detectEventHistoryErrors with single-pass
scanning and updates getApplicableCommonErrors to accept optional event
history. All 35 error definitions now have active detection logic.

* Add snippet to pass in headerSnippet for common errors. Refactor workflow-run-layout to svelte5

* Add back common errors page

* Remove common errors from snippet

* Revert alert to current styles

* Fix test failures for detectFirstEventErrors and routeForCommonErrors

Update detectFirstEventErrors test calls to match updated function
signature that removed the workflow parameter. Add missing
routeForCommonErrors test case to route-for-base-path tests.

* Replace VerticalNav with tab group on common errors page

Switch from VerticalNav sidebar to TabButtons for severity filtering.
Remove layout reset (@) since the page no longer needs a custom layout.
Add WorkflowCommonErrors snippet to workflow run layout.

* Remove common errors from header snippet

* Fix type errors in alert component and stories

Rename $$Props to Props in alert.svelte for Svelte 5 convention.
Update stories to use module script and ComponentProps for proper
type inference with Storybook.

* Update src/lib/components/common-errors/common-error.svelte

Co-authored-by: Laura Whitaker <[email protected]>

* Update src/lib/components/common-errors/common-errors-data.ts

Co-authored-by: Laura Whitaker <[email protected]>

* Update src/lib/utilities/common-error-detection.ts

Co-authored-by: Laura Whitaker <[email protected]>

* Remove workflow-common-errors.svelte

* Remove getCommonErrorsByCategory

* Update src/lib/components/common-errors/common-error-list.svelte

Co-authored-by: Laura Whitaker <[email protected]>

* Fix naming

* Add back workflow-common-errors.svelte
;5u

* Formatting

* Add type predicate filter

---------

Co-authored-by: Laura Whitaker <[email protected]>
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