Skip to content

Build: phase out git clone option --no-single-branch (one of several approaches) #10422

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

Closed
wants to merge 2 commits into from

Conversation

benjaoming
Copy link
Contributor

@benjaoming benjaoming commented Jun 12, 2023

Fixes: #9736

Comment on lines +169 to +170
# TODO: Remove the 'not'
return not self.project.has_feature(Feature.GIT_CLONE_SINGLE_BRANCH)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

noting the TODO here :)

@benjaoming
Copy link
Contributor Author

Would be nice with a review of the general approach taken before updating tests.

CC: @ericholscher @humitos - there's a wall of text here - #9736 (comment) - the executive point is in the "proposal" but I think the context is needed and I understood what to do by writing it down and reading it myself.

@benjaoming
Copy link
Contributor Author

Hmm... the tests passed without updating them. I'd want to add at least something here.

Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

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

I haven't read this PR or the associated issues in depth yet, but I want to write down a comment here before we go too deep into this.

It's important to have the same behavior (git clone command) on PRs than on tags/branches. I want to avoid building successfully on PRs but failing on regular versions, or similar.

Also, to debug builds will be a lot harder if we have different behaviors here.

Comment on lines +212 to +215
# External builds aren't relevant, there is always an individual fetch operation.
# See self.update()
elif not self.version_type == EXTERNAL:
cmd.extend(["--no-single-branch"])
Copy link
Member

Choose a reason for hiding this comment

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

I'd like to always have the same behavior for branch, tags and external versions. Otherwise, things are going to be pretty complicated to debug. Also, there will be things that work on PRs but fail on regular versions --which is the main feature of PRs builds.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's go over this tomorrow then 👍 If you can set aside some time to read the initial analysis in #9736 (comment), that should give the pretext of why this was necessary.

@benjaoming benjaoming changed the title phase out git clone option --no-single-branch Build: phase out git clone option --no-single-branch (one of several approaches) Jun 13, 2023
@benjaoming
Copy link
Contributor Author

Closing work on this approach in favor of #10430

@benjaoming benjaoming closed this Jun 13, 2023
@benjaoming benjaoming deleted the feature/git-clone-single-branch branch June 13, 2023 16:56
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.

Build: cloning multibranch repository takes too long
2 participants