amoghrajesh commented on PR #67292: URL: https://github.com/apache/airflow/pull/67292#issuecomment-4517710687
I found another bug related to the core API where editing a task state field overwrote the `expiry` to `NEVER` and also we didn't provide an option for users to set expiry for a task state when creating a new one. For the task state Storage tab, here's how the UI should call the API: Adding a new task state: <img width="1665" height="728" alt="image" src="https://github.com/user-attachments/assets/30461934-50c8-496c-a7b4-e3f171b6592b" /> So the modal for adding a task state ^ will need a new field for `expiry_date` - I imagine a datetime picker along with something that can serve three expiry options: 1. "default" pre-selected 2. Maybe a radio button for "never expire" 3. Datetime picker for selecting a datetime for expiry Once a value is picked, call the `PUT /states/{key}` with: - `{"value": "...", "expires_at": "default"}` — apply server default retention - `{"value": "...", "expires_at": null}` — never expire `{"value": "...", "expires_at": "2026-06-01T00:00:00Z"}` — specific datetime from the date picker Editing an existing task state: Edit existing key (value only) now can call the `PATCH /states/{key}` with `{"value": "..."}`. Expiry is always preserved, no expiry field needed. This is being fixed in https://github.com/apache/airflow/pull/67319 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
