Skip to content
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

fix: action buttons on the DAG list page don't work for DAGs with custom names #625

Merged

Conversation

rocwang
Copy link
Contributor

@rocwang rocwang commented Jul 22, 2024

When a DAG has a custom name defined, the actions buttons on the DAG list page don't work as the frontend uses the custom name instead of the DAG file name to call the "Submit DAG Action" API (POST /api/v1/dags/:name).

For example, given a DAG namely test.yaml as below:

name: Custom Name
steps:
  - name: step1
    command: echo hello

When the "Start the DAG" button is clicked from the DAG list page, the following API is called incorrectly:

POST /api/v1/dags/Custom Name.

Instead, POST /api/v1/dags/test should be called.

Screenshot 2024-07-22 at 6 20 04 PM

To fix it, I simply extract the DAG filename without the .yaml extention name from data.DAGStatus.File, and then use that as the name property on DAGActions.

Copy link
Collaborator

@yottahmd yottahmd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨✨✨LGTM✨✨✨, thank you very much for fixing the bug!

@yottahmd yottahmd merged commit b1c961b into dagu-org:main Jul 22, 2024
3 checks passed
@rocwang rocwang deleted the fix/dag-actions-with-custom-dag-name branch July 22, 2024 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants