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

Traverse continues after a failed push #1659

Open
PawelLipski opened this issue May 19, 2023 · 4 comments
Open

Traverse continues after a failed push #1659

PawelLipski opened this issue May 19, 2023 · 4 comments
Labels
bug Something isn't working traverse

Comments

@PawelLipski
Copy link
Collaborator

It occurs to me that it's indeed what I observed recently (specifically, vanilla git push failing on non-fast-forward since the branch was present in the remote repo, but not in refs/remotes locally).

I'd say it should NOT continue; the traverse flow should be stopped at any failure.

@PawelLipski PawelLipski added bug Something isn't working traverse labels May 19, 2023
@PawelLipski
Copy link
Collaborator Author

PawelLipski commented May 19, 2023

Yeah, indeed:

image

@PawelLipski
Copy link
Collaborator Author

Huh it might be hard to circumvent... com.intellij.dvcs.push.PushController#push simply doesn't throw an exception when the push fails ☹️

@mkondratek
Copy link
Collaborator

mkondratek commented May 22, 2023

pls take a look at:
git4idea.push.GitPusher#expireExistingErrorsAndWarnings

I think we could provide a similar solution - notification-based, i.e.:

GitPushResultNotification[] existingNotifications =
  NotificationsManager.getNotificationsManager().getNotificationsOfType(GitPushResultNotification.class, myProject);

then filter for NotificationType.ERROR (I am assuming failed push is an error - not a warn), and then assert the specific details of the notification so we are sure that's our failed push. wdyt?

@PawelLipski
Copy link
Collaborator Author

and then assert the specific details of the notification so we are sure that's our failed push. wdyt?

Huh seems pretty hackish and brittle TBH 🤔 to rely on a notification to determine if an error has happened 🐞

@PawelLipski PawelLipski changed the title Does traverse continue after a failed push? Traverse continues after a failed push Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working traverse
Projects
None yet
Development

No branches or pull requests

2 participants