Commit f5cfb9b
authored
Be a lot more conservative in _github_submodule_required (#708)
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.1 parent ec4a5ae commit f5cfb9b
1 file changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
679 | 679 | | |
680 | 680 | | |
681 | 681 | | |
682 | | - | |
683 | | - | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
684 | 691 | | |
685 | 692 | | |
686 | 693 | | |
| |||
0 commit comments