Repository navigation
feat: refactor module downloading - #2286
Closed
jcdickinson wants to merge 2 commits into
Closed
jcdickinson wants to merge 2 commits into
jcdickinson wants to merge 2 commits into
Conversation
jcdickinson
requested review from
a team,
aluzzardi,
samalba and
shykes
as code owners
April 23, 2022 03:04
jcdickinson
marked this pull request as draft
April 23, 2022 03:10
Contributor
Author
|
I want to follow this up with |
This significantly reworks how modules are downloaded. There are now different strategies for downloading modules. * Git: downloads with git and maintains the old behavior * Github: downloads using a .tar.gz from github. The API is used to find the latest tag * HTTP: Example, `https://github.com/dagger/dagger#/archive/refs/tags/v0.2.7.tar.gz` results in the `github.com/dagger/dagger` module name and `https://github.com/dagger/dagger/archive/refs/tags/v0.2.7.tar.gz` download URL. Everything is simply dumped into the directory, and versions are not supported. Support for providing a _full_ authentication header has also been added. This is done with the `authorization-header` flag. For example, `--authorization-header 'token ghp_...'`. This works for both HTTP and Github repos. Finally, some of the require_tests were broken. The tests seemed to represent desired behavior, so I updated`parseDaggerRepoName`. Signed-off-by: Jonathan Dickinson <[email protected]>
Member
|
I think it would be really appreciate to have your point of view on that PR @aluzzardi @helderco |
Contributor
Author
|
I think the basic HTTP download might need some redesign. Currently it takes URLs in the form: The fragment portion is lost after the |
Contributor
|
/cc @helderco |
Contributor
|
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Contributor
|
This PR was closed because it has been stalled for 7 days with no activity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This significantly reworks how modules are downloaded. There are now different strategies for downloading modules.
https://github.com/dagger/dagger#/archive/refs/tags/v0.2.7.tar.gzresults in thegithub.com/dagger/daggermodule name andhttps://github.com/dagger/dagger/archive/refs/tags/v0.2.7.tar.gzdownload URL. Everything is simply dumped into the directory, and versions are not supported.Support for providing a full authentication header has also been added. This is done with the
authorization-headerflag. For example,--authorization-header 'token ghp_...'. This works for both HTTP and Github repos.Finally, some of the require_tests were broken. The tests seemed to represent desired behavior, so I updated
parseDaggerRepoName.An alternative to #2275.
Signed-off-by: Jonathan Dickinson [email protected]