Skip to content

[Bug]: Target types filter does not work on the Events page in UI #4211

Description

@jvstme

Steps to reproduce

  1. Open the Events page.
  2. Set the Target types filter to any allowed value.

Actual behaviour

The event list is always empty.

The API returns error 429:

{"detail":[{"type":"enum","loc":["body","include_target_types",0],"msg":"Input should be 'project', 'user', 'fleet', 'instance', 'run', 'job', 'volume', 'gateway' or 'secret'","input":"Instance","ctx":{"expected":"'project', 'user', 'fleet', 'instance', 'run', 'job', 'volume', 'gateway' or 'secret'"}}]}

Expected behaviour

The event list shows all events that have at least one target of the specified type.

dstack version

0.21.2

Server logs

Additional information

No response

Activity

  1. nightcityblade commented on Aug 26, 2026

    @nightcityblade

    Hi, I'd like to work on this. I'll submit a PR shortly.

  2. hhhhzzzj commented on Aug 31, 2026

    @hhhhzzzj
    Contributor

    I traced the Events filter issue from the UI down to the backend route.

    The Events page passes capitalized target type values (such as 'Instance') in include_target_types, while the backend Pydantic model expects lowercase enum literals ('project', 'instance', 'fleet', etc.), causing a validation failure on the query.

    Normalizing the target types to lowercase before dispatching the API request and adding a schema test will fix the filtering. Happy to put together a PR for this if you'd like.

  3. jvstme commented on Aug 31, 2026

    @jvstme
    CollaboratorAuthor

    @hhhhzzzj, please do, thanks

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingui

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions