-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to filter by last dagrun state in UI. #42779
Conversation
601b9d5
to
c8ce39d
Compare
I am trying to run
|
On my end, running It looks like your Can you verify your pnpm, eslint and node versions? You can find more information about supported versions in https://github.com/apache/airflow/blob/main/contributing-docs/14_node_environment_setup.rst |
Yes, sometimes I need to make sure my local environment has the right version of node by running |
c8ce39d
to
7fdfe0a
Compare
Thanks @pierrejeambrun and @bbovenzi . I had an uncommitted file with eslint error at TypeScript was complaining about typecasting the query parameter which was a string to type DagRunState. I did a typecast using "as". Googling around recommends using const with array of string but would be helpful to know if there is a similar pattern check in the existing code for reuse. The issue would be around passing invalid lastrun value that will be passed to API and 422 will be returned resulting in empty page.
|
We don't have an example of that yet. But I imagine we'll need a util like that. In the stackoverflow link. I would definitely lean towards a version of option 3. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, working as expected.
A few minor suggestions :)
@bbovenzi Quoting from the answer this needs the dag run states to be an array of strings. Since it's a type using union syntax I guess it's tricky. Please add in if I missed something or to change something since the part seems to be auto generated.
|
7fdfe0a
to
19bfa09
Compare
Thanks @pierrejeambrun and @bbovenzi , made the suggested changes and rebased with latest main branch. Slightly off-topic but I see PRs with only new UI folder changes running tests for databases like mysql, postgres and sqlite which takes 20 minutes each along with integration tests, docs builds (--docs-only and spellcheck take 20+ mins) which I also guess is not required. Skipping them can speed up UI PRs build time and also reduce CI load. I tried to figure out how to skip them which should probably be done in selective_check function in ci_commands.py but couldn't figure out the exact conditional and logic. https://github.com/apache/airflow/actions/runs/11229469726/job/31215226666 (20 minutes per database) |
Perhaps something like this: https://stackoverflow.com/a/70694878 |
It seems it still needs specifying all union type values to be passed again to the util function as per the comment. I will leave it to another PR/issue to unblock this PR since the query parameter cannot be invalid from UI events unless user edits the URL intentionally or has a typo. It looks like a common request. Thanks for the pointers @bbovenzi . |
I believe those are part of 'default' tests. For instance if we check the @cached_property
def run_tests(self) -> bool:
return self._should_be_run(FileGroupForCi.ALL_SOURCE_FILES) So they will run every time. Maybe the CI team has an idea on how we can improve that, and do different 'default tests' depending on the Front-end and backend. (if front files are touch run default front-end, if |
cc: @potiuk Just in case you have an idea. |
19bfa09
to
1194b6b
Compare
* Add support to filter by last dagrun state in UI. * Fix lint errors. * Fix lint errors. * Fix PR comments over null checks and query parameter to be last_dag_run_state.
* Add support to filter by last dagrun state in UI. * Fix lint errors. * Fix lint errors. * Fix PR comments over null checks and query parameter to be last_dag_run_state.
* Add support to filter by last dagrun state in UI. * Fix lint errors. * Fix lint errors. * Fix PR comments over null checks and query parameter to be last_dag_run_state.
* Add support to filter by last dagrun state in UI. * Fix lint errors. * Fix lint errors. * Fix PR comments over null checks and query parameter to be last_dag_run_state.
closes: #42715
related: #42715
Add filter state on change to "lastrun" URL parameter which is used in legacy UI too and pass the state to dags list API.