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

libgit2: fixes issues when using Managed Transport for BitBucket and Azure DevOps repositories #662

Closed
wants to merge 3 commits into from

Conversation

pjbgf
Copy link
Member

@pjbgf pjbgf commented Apr 10, 2022

Improvements:

  • Implement single-use SSH connections to improve stability for bitbucket.org repositories.
  • Deny Azure DevOps from using Managed Transport, as it does not fully support multi_ack and multi_ack_detailed.
  • Allow for opt-in/out of Managed Transport on a per repository basis.

Paulo Gomes added 3 commits April 10, 2022 19:54
Public bitbucket.org accounts do not support concurrent
connections, making the controller to stumble upon itself
with long-running connections, specially if more than one
GitRepository is defined.

To avoid such problems, bitbucket is now handled as single-use
connections, which seems to improve its stability, although
may still generate the occasional ssh.Dial TimeOut when a new
connection takes places whilst an another is still established.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
Managed transport now defines its own protocols, providing
the flexibility of opt-in/out per repository. The feature switch
now controls the auto upgrade from normal protocols (http,
https and ssh) into managed protocols (http+managed, https+managed
and ssh+managed).

The use of the feature switch matches the previous behaviour, with
the difference that now users are allowed to try Managed Transport
for a connection at a time, regardless of the feature switch status.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
DevOps requires the Git protocol capabilities (e.g. multi_ack
and multi_ack_detailed) that are not fully supported by libgit2/git2go
in managed transport mode.

This disables the auto upgrade feature for Azure DevOps
repositories, but still allow for opt-in in case users
want to force the use of Managed Transport.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
@pjbgf pjbgf added the area/git Git related issues and pull requests label Apr 10, 2022
// DevOps requires the Git protocol capabilities (e.g. multi_ack
// and multi_ack_detailed) that are not fully supported by libgit2/git2go
// in managed transport mode.
"dev.azure.com",
Copy link
Member

Choose a reason for hiding this comment

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

Does this means we’ll not be able to get rid of libssh and openssl dependencies due to Azure DevOps?

Copy link
Member Author

Choose a reason for hiding this comment

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

For the time being, yes. I will create an issue to further detail the problem and potential consequences.

@pjbgf
Copy link
Member Author

pjbgf commented May 13, 2022

PR #713 supersedes this, as it reduces complexity whilst increasing reliability of the managed transport.

@pjbgf pjbgf closed this May 13, 2022
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/git Git related issues and pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants