Skip to content

/api/tree API applies unneeded time filter by default #1963

Description

@mentonin

Description

/api/tree queries for the latest checkout for each tree. By default, it filters by checkouts in the last 7 days. However, this operation is really fast now (queries a pre-computed table), and there should be no reason to have this limit by default.

Related to this, there is a misagreement between the API and the dashboard here:

  • API default is interval_in_days=7 (as mentioned above)
  • The dashboard root / redirects to /tree?i=7 and queries with interval_in_days=7 (not present in production)
  • Dashboard /tree queries with interval_in_days=30

Proposed solution

Therefore, I suggest:

  • Keep interval_in_days as optional, but do not filter if unset
  • Make / redirect to /tree without hardcoded parameters
  • Make /tree query with interval_in_days unset by default
    • Alternatively, grab the default directly from the backend

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions