Skip to content

ui: fix namespace url filter#2970

Open
egabancho wants to merge 1 commit intoinveniosoftware:masterfrom
egabancho:filter-non-namespaced-custom-fields
Open

ui: fix namespace url filter#2970
egabancho wants to merge 1 commit intoinveniosoftware:masterfrom
egabancho:filter-non-namespaced-custom-fields

Conversation

@egabancho
Copy link
Copy Markdown
Member

  • The filter was failing with and IndexError when trying to parse fields with no namespace.

@github-actions
Copy link
Copy Markdown
Contributor

This PR was automatically marked as stale.

@github-actions github-actions bot added the stale No activity for more than 60 days. label Mar 30, 2025
@utnapischtim utnapischtim added this to v14 Sep 8, 2025
@utnapischtim utnapischtim moved this to 👀 In review in v14 Sep 8, 2025
if not namespaces.get(namespace):
return None

namespace_value = namespace_array[1]
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.

If I understand correctly, then this move avoids the array index access for fields that don't have a namespace (i.e. no : in their name)?

Could it be that a field name happens to collide with a namespace name, still causing this to fail?

E.g. having a namespace test (as in the tests below), and a field with the name test?
This would satisfy the check if {"test": ...}.get("test"), still causing this out of bounds error?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good catch!

@egabancho egabancho force-pushed the filter-non-namespaced-custom-fields branch 3 times, most recently from 991675c to 80fabe7 Compare March 31, 2026 20:25
@egabancho egabancho requested a review from max-moser April 1, 2026 08:20
Copy link
Copy Markdown
Contributor

@max-moser max-moser left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

* The filter was failing with and IndexError when trying to parse fields
  with no namespace.
@egabancho egabancho force-pushed the filter-non-namespaced-custom-fields branch from 80fabe7 to f948a66 Compare April 2, 2026 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale No activity for more than 60 days.

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

3 participants