Skip to content

Conversation

@Eijebong
Copy link
Contributor

This function is used to decide whether we can use github directly to download the code without cloning the repository. That optimization only works if the repository doesn't have submodules.

Before this commit, if github returned any status code that wasn't a 2xx or 3xx, we would consider that the repository didn't have any submodule. This is fairly obviously wrong as a transient server error on the github side for example would mean that we'd assume that the repository doesn't have any submodules.

We now check for HTTPErrors and only consider that a repository doesn't have any submodule iif the status is 404 otherwise, something went wrong, log it and fallback to the non optimized path.

I also kept the bare exception but added some log to it, just in case.

This function is used to decide whether we can use github directly to
download the code without cloning the repository. That optimization only
works if the repository doesn't have submodules.

Before this commit, if github returned any status code that wasn't a 2xx
or 3xx, we would consider that the repository didn't have any submodule.
This is fairly obviously wrong as a transient server error on the github
side for example would mean that we'd assume that the repository doesn't
have any submodules.

We now check for HTTPErrors and only consider that a repository doesn't
have any submodule iif the status is 404 otherwise, something went
wrong, log it and fallback to the non optimized path.

I also kept the bare exception but added some log to it, just in case.
@Eijebong Eijebong requested a review from a team as a code owner June 17, 2025 10:16
@Eijebong Eijebong requested a review from jcristau June 17, 2025 10:16
@Eijebong Eijebong merged commit f5cfb9b into taskcluster:main Jun 17, 2025
20 of 22 checks passed
@serge-sans-paille
Copy link
Contributor

Thanks!

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.

3 participants