Skip to content

AIP-84 Add last_asset_event to assets list endpoint #47164

Closed

Description

@bbovenzi

Description

Right now, the functionality of the Assets List in the UI is limited.

Let's extend the existing public/assets endpoint to include latest_asset_event_id and latest_asset_event_timestamp.

Let's make the entire list sortable and filterable by latest_asset_event_timestamp so I can do things like see my assets that have recent updates or see only assets with an update in the last 24 hours

Use case/motivation

No response

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. added
    kind:feature
    needs-triage
    on Feb 27, 2025
  2. added
    area:UI
    on Feb 27, 2025
  3. pierrejeambrun commented on Feb 28, 2025

    @pierrejeambrun
    Member

    Makes sense. Adding good first issue label, let me know if this is needed asap or not.

  4. Lee-W commented on Mar 3, 2025

    @Lee-W
    Member

    @alekzene sure thing. just assigned to you 🙂

  5. Lee-W commented on Mar 3, 2025

    @Lee-W
    Member

    If I understand correctly, we will need to extend

    query to include the latest AssetEvent. To allow the response to include this information, we'll need to also change
    class AssetResponse(BaseModel):

  6. jroachgolf84 commented on Mar 21, 2025

    @jroachgolf84
    Collaborator

    I'm going to take a look at this as well. Let me know if you have a PR open @alekzene!

  7. jroachgolf84 commented on Mar 21, 2025

    @jroachgolf84
    Collaborator

    If I understand correctly, we will need to extend

    airflow/airflow/api_fastapi/core_api/routes/public/assets.py

    Line 95 in 27f559e

    def get_assets(
    query to include the latest AssetEvent. To allow the response to include this information, we'll need to also change
    airflow/airflow/api_fastapi/core_api/datamodels/assets.py

    Line 45 in 27f559e

    class AssetResponse(BaseModel):

    @Lee-W, curious your thoughts here. Do we want to make the last_asset_event field a timestamp, or a reference to an actual AssetEvent?

  8. Lee-W commented on Mar 23, 2025

    @Lee-W
    Member

    @Lee-W, curious your thoughts here. Do we want to make the last_asset_event field a timestamp, or a reference to an actual AssetEvent?

    an AssetEvent probably would make things easier

  9. pierrejeambrun commented on Mar 24, 2025

    @pierrejeambrun
    Member

    Also just to mention that this is a Custom endpoint => /ui. /public interface should remain unchanged. (and most likely we can factorize serializers/re-use code. Basically the ui asset response can extend the public AssetResponse and add the required field.)

  10. jroachgolf84 commented on Mar 24, 2025

    @jroachgolf84
    Collaborator

    That makes sense. From my understanding, the UI view that we'd be tweaking would be /assets (the Asset list view).

  11. 7 remaining items

  12. added this to the Airflow 3.1.0 milestone on Apr 23, 2025
  13. changed the title [-]AIP-84 Custom list assets endpoint with latest event[/-] [+]AIP-84 Add last_asset_event to assets list endpoint and assets sortable by event[/+] on Apr 23, 2025
  14. changed the title [-]AIP-84 Add last_asset_event to assets list endpoint and assets sortable by event[/-] [+]AIP-84 Add last_asset_event to assets list endpoint and sort assets by event[/+] on Apr 23, 2025
  15. changed the title [-]AIP-84 Add last_asset_event to assets list endpoint and sort assets by event[/-] [+]AIP-84 Add last_asset_event to assets list endpoint[/+] on Apr 23, 2025
  16. bbovenzi commented on Apr 23, 2025

    @bbovenzi
    ContributorAuthor

    Thanks Jake! Just updated the description to reflect the changes we talked about

  17. added
    area:API
    and removed
    needs-triage
    on Apr 23, 2025
  18. jroachgolf84 commented on Apr 28, 2025

    @jroachgolf84
    Collaborator

    Just an update, I've implemented the change. Working on making sure that all unit-tests pass!

  19. bbovenzi commented on May 6, 2025

    @bbovenzi
    ContributorAuthor

    Just opened a PR to show the timestamp in the asset list UI.

    Next up we should add order_by timestamp in the API and then last_asset_event_lte and last_asset_event_gte filters

  20. jroachgolf84 commented on May 20, 2025

    @jroachgolf84
    Collaborator

    Work completed, all set to close.

  21. bbovenzi commented on May 22, 2025

    @bbovenzi
    ContributorAuthor

    Did we update order_by and filters?

  22. pierrejeambrun commented on May 23, 2025

    @pierrejeambrun
    Member

    Did we update order_by and filters?

    I believe it remains to be done.

  23. pierrejeambrun commented on Aug 21, 2025

    @pierrejeambrun
    Member

    Closing, because filtering and order_by will be done in #53052

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

Metadata

Metadata

Assignees

Labels

area:APIarea:UIkind:feature

Type

No type

Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions