-
Notifications
You must be signed in to change notification settings - Fork 4
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
PushFlows ignores the result of PushCommand.call() with BitBucket #89
Comments
Can you share the exact flow you were using? Also, can you say more about your setup? Is your Git VCS self-hosted and if so, can you confirm you can reach it from your kestra container? Do you see any server logs that can be helpful to reproduce this? We should certainly fail the task if something fails to be pushed cc @smunteankestra perhaps you can check the default BitBucket setup on develop to see if you can reproduce? |
@anna-geller Yes, I can share the flow, it's pretty simple:
We have indeed a self-hosted BitBucket. It's reachable from Kestra, since I can do There are some rules for commits, for example unsigned commits are rejected. In this case, maybe the error is that the commit is unsigned. Or maybe something else. The point of the bug report is that Kestra doesn't log any errors if the push is rejected. If I saw the reject message, I could fix it (e.g., disabling in BitBucket the requirement for signed commits for this particular repo). |
@anna-geller Flow id: manuallypush
namespace: io.kestra.flows
tasks:
- id: commit_and_push
type: io.kestra.plugin.git.PushFlows
username: "{{kv('user')}}"
password: "{{ kv('password') }}"
url: https://bitbucket.org/kestratest123/kestratest123.git
branch: main
sourceNamespace: debug
targetNamespace: tutorial
gitDirectory: flows
commitMessage: "push all development flows to Git and create a PR"
dryRun: false |
@smunteankestra The point is that PushCommand::call() returns a value ( But, Kestra ignores the result (see |
great, thx so much for thorough examination @smunteankestra 💯 so next steps: add error handling for when push doesn't work when commit signature verification is not enabled |
Describe the issue
I have a situation where the
PushFlows
task finishes successfully, but I see no commits in the remote git repo (BitBucket).Here is a screenshot from Kestra, where the log output claims that changes were pushed:
However, when I check the remote repository, no commits have been made in fact.
By looking in the source code, I see that the result of
PushCommand.call()
is ignored:According to this StackOverflow question, not all push errors result in an exception being thrown, some of them are returned as push results : https://stackoverflow.com/questions/51140394/jgit-push-wont-fail-when-push-is-impossible
I believe that the push fails in some way, but there's no way to see the error in Kestra.
I would expect at the very least that any push result is logged. Even better, it would be returned as an output, and the task would throw an exception if any update was rejected.
Environment
The text was updated successfully, but these errors were encountered: