Download a folder from repository
What does this MR do?
This is based from the Community contribution MR from @kiameisomabes: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20604.
Add links to download a folder from repository in different formats (zip
, tar.gz
, tar.bz2
, or tar
).
Add GetArchiveRequest
to git-archive params.
Modifies Git::Repository#archive_metadata
to append path
to ArchivePrefix
so it'll not hit the cache of repository archive when it already exists.
gitlab-ee MR is created as ee_compat_check
fails: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/10533.
What are the relevant issue numbers?
TODOs
-
Update GITALY_SERVER_VERSION
when version required gets released. -
Update GITLAB_WORKHORSE_VERSION
when version required gets released. -
Update gitaly-proto
gem when version required gets released.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated via this MR -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
Security reports checked/validated by reviewer
Closes #24704 (closed)
Merge request reports
Activity
changed milestone to %11.10
assigned to @patrickbajao
mentioned in merge request gitlab-workhorse!375 (merged)
1 Message This merge request adds or changes files that require a review from the Technical Writing team. Documentation review
The following files require a review from a technical writer:
doc/user/project/repository/img/download_source_code.png
doc/user/project/repository/index.md
The review does not need to block merging this merge request. See the:
- DevOps stages for the appropriate technical writer for this review.
- Documentation workflows for information on when to assign a merge request for review.
Reviewer roulette
Changes that require review have been detected! A merge request is normally reviewed by both a reviewer and a maintainer in its primary category (e.g. frontend or backend), and by a maintainer in all other categories.
To spread load more evenly across eligible reviewers, Danger has randomly picked a candidate for each review slot. Feel free to override this selection if you think someone else would be better-suited, or the chosen person is unavailable.
Once you've decided who will review this merge request, mention them as you normally would! Danger does not (yet?) automatically notify them for you.
Category Reviewer Maintainer backend Rubén Dávila ( @rdavila
)Michael Kozono ( @mkozono
)frontend Adriel Santiago ( @adrielsantiago
)Tim Zallmann ( @timzallmann
)~Documentation Evan Read ( @eread
)Generated by
DangerEdited by 🤖 GitLab Bot 🤖mentioned in merge request !20604 (closed)
Hi @nick.thomas, can you also please review this MR? Since you're reviewing the MR for gitlab-workhorse, I think it's also good if you review the backend part of this MR as well as it's related to it.
Also, what do you think about putting this behind a feature flag? The change in how we encode the send data header for git-archive and the new links?
Pipeline is red as some of the dependencies are still pointing to branches instead of releases. Thanks!
Edited by Patrick Bajao@patrickbajao I've tried running this locally against the gitaly and gitlab-workhorse branches, but I'm not seeing that it just gets the subdirectory in the archive :( . Is it currently working for you locally?
@nick.thomas Hmm it does work on my end. Just tested it again. Not sure if this will help but...
I'm using the GDK and before I run
gdk run
, I rungdk install
to re-compile gitaly and workhorse. Both gitaly and gitlab-workhorse src are checked out under the branches specified inGITALY_SERVER_VERSION
andGITLAB_WORKHORSE_VERSION
when I do this. I don't thinkgdk install
will pick up the branches automatically.Running
make gitlab-workhorse-update gitaly-update
works for me too if my src aren't under the branches I need.Edited by Patrick Bajaoassigned to @nick.thomas
marked the checklist item Tested in all supported browsers as completed
marked the checklist item Changelog entry added, if necessary as completed
@patrickbajao this LGTM, subject to my actually observing it do the right thing in manual testing! I'll dedicate some more time to that today.
We should also give it a frontend review; to aid that, could you include some screenshots of the new functionality and assign it to them? Reviewer roulette has picked some options that seem reasonable: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/26532#note_153741069
assigned to @patrickbajao
@patrickbajao OK, I've wiped and rebuilt my gitlab-workhorse and gitaly setups, and with that, this is now working!
Awesome, thanks for taking time to test this @nick.thomas!
And yup, I'll be asking for an FE review for this. Just need to make some minor FE changes based on feedback.
added 392 commits
-
fa636f5a...e08c693b - 389 commits from branch
master
- 541f656e - Add download directory in menu and add subdirectory params for RepositoriesController#archive
- be13f15b - Download a folder from repository
- df66214f - Make the dropdown match the design
Toggle commit list-
fa636f5a...e08c693b - 389 commits from branch
- Resolved by Adriel Santiago
Hi @adrielsantiago, I made some minor FE changes on this MR to update the look of the dropdown. Please see attached screenshots as well.
Can you please do an FE review of this MR? Thanks!
Edited by Patrick Bajao
Hi @pedroms, since the design has been implemented this is also ready for UX review. Can you please take a look? Thanks!
added 1 commit
- ee66e0f4 - Add documentation for download source code feature
added documentation label
- Resolved by Marcia Ramos
Hi @marcia and @jramsay, I made some changes to
doc/user/project/repository/index.md
to include some information on how to use the download source code feature and some basic info. The only new feature here is downloading by directory but there's no existing documentation for downloading source code and CI artifacts so added some for them as well.Can you please review them? Thanks!
marked the checklist item Documentation created/updated via this MR as completed
- Resolved by Pedro Moreira da Silva
@patrickbajao obviously, I'm not UX so take this with a piece of salt, but I wonder if we should make the position of the
Download source code
option consistent between the two cases? I.e. make "Download this directory" the second, rather than first, option, when it's available. I find it really annoying when options jump around positionally :p"Download artifacts" moves around still, but short of making that first - and I don't think it deserves to be first - I'm not sure we can get around that.
added 1 commit
- a8f3ddae - Switch positions of source and directory sections
Opened this MR on gitlab-ee (https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/10533) since
ee_compat_check
job is failing. Will be updating that MR with changes that still need to be done here (e.g. version changes).RSpec jobs are failing due to https://gitlab.com/gitlab-org/gitlab-ce/issues/59777. It's currently being fixed in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/26821.
Edited by Patrick Bajao- Resolved by Inactive Account
- Resolved by Patrick Bajao
- Resolved by Patrick Bajao
- Resolved by Patrick Bajao
assigned to @patrickbajao
@patrickbajao - The changes are looking good. Left a few thoughts for your consideration.