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

Cannot execute a flow named pause #5832

Open
loicmathieu opened this issue Nov 7, 2024 · 1 comment
Open

Cannot execute a flow named pause #5832

loicmathieu opened this issue Nov 7, 2024 · 1 comment
Labels
area/backend Needs backend code changes bug Something isn't working

Comments

@loicmathieu
Copy link
Member

Describe the issue

You cannot execute a flow named pause.

Try for example to create the following flow and execute it:

id: pause
namespace: company.team
tasks:
  - id: pause
    type: io.kestra.plugin.core.flow.Pause
    delay: PT30S
  - id: hello
    type: io.kestra.plugin.core.log.Log
    message: Hello World! 🚀

This is because Micronaut redirect to the pause endpoint of the ExecutionController instead of the create endpoint:

    @Post(uri = "/{namespace}/{id}", consumes = MediaType.MULTIPART_FORM_DATA)
    public Publisher<ExecutionResponse> create()
    }

    @Post(uri = "/{executionId}/pause")
    public void pause()
    }

The same issue occurs for all endpoints taken an executionId and using a POST method: pause, resume, kill, unqueue, ...

To fix that we can either:

  • use a regex (to be validated): {executionId:[^/]*}
  • rename those endpoints to use something that cannot be used as a flow identifier, like _pause so there are no possible mismatches.

Environment

  • Kestra Version: develop
@loicmathieu loicmathieu added bug Something isn't working area/backend Needs backend code changes area/frontend Needs frontend code changes labels Nov 7, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Issues Nov 7, 2024
@loicmathieu loicmathieu removed the area/frontend Needs frontend code changes label Nov 7, 2024
@brian-mulier-p
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/backend Needs backend code changes bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

2 participants