G3T to git-drs Migration: pain points, developer feedbacks. #32
matthewpeterkort
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Steps to reproduce attempting to migrate project from g3t to git-drs
create a new git repo in the frontend:
https://source.ohsu.edu/orgs/CBDS/repositories
clone it locally: git clone git@source.ohsu.edu:CBDS/multi-modal.git
copy in the old .g3t and MANIFEST directory from old project. In this case cbds-multimodal project on calypr-dev
make in a new dir make a new python env, pip install g3t. pull the existing files down from the .g3t project
4.4 Do this g3t operations in a seperate draft to minimize issues between the two different .git directories. This also avoids having to do a
git add remote, because the two utilities conflict with eachother and remove the old remote.
Run this script to make meta files. Adapted from Walsh draft.
4.5 move all of the pulled files and the meta files to the new repo that you cloned earlier.
4.55 install git-drs using go or maybe some other way so that users don't need to have go installed to get this thing to run.
Clone use case:
Setup:
if your gen3 config profile name does not match the config specified in the cloned .config this will need to be manually changed. In my opinion, the git drs init command should take care of this for you and update the config file for you.
Feedbacks
I don't like that os/exec is called for the git commands. I ran into nasty os exec errors from this that was not trivial to debug.
a package like go-git would provide a go native error that could be passed back to the user instead of a black box error to improve error handling for the user.
We need to implement multi file uploading leveraging the existing cdis client bulk uploader. Nobody wants to wait for files to upload one at a time.
Config should be marshaled / unmarshalled directly from the config file that way when the user runs the git-drs init command they can save whatever they specified to the config directory, eg: if their gen3 profile name is different than whatever one was cloned.
The user is expected to add the .drs/config on their very first commit. Using something like go-git this could probably be done silently and incorporated into one of the function calls either drs-init or as part of the hook attached to 'git commit' perhaps, since the user shouldn't be expected to know about the .drs/config file to begin with.
I have added a delete indexd record function as it had helped me debug my issues during the migration, but there should also probably be a delete file function added to this API so that a push can also effectively remove files from an S3 bucket. The delete indexd record function should probably have a pattern based approach just like 'git add'
User docs needed to be added complete with instructions on how to download the executable from the releases page, and other setup pain points. Thinking about this further the git-drs executable should probably be part of the main g3t meta executable so that the user only has to download one executable.
This code block is called alot. It should be its own function.
In some places in the command flow new logger is declared twice, ex: UpdateDrsObjects and precommit hook. Instead of instantiating the logger twice, probably just pass the instance to the function using a method function.
json.Decoder can probably be used in cmd/transfer/main.go to avoid copying the bytes into the unmarshal when they can be read directly from stdin.
Beta Was this translation helpful? Give feedback.
All reactions