-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/improve on push filter #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the DRS object preparation workflow by moving it from transfer-time to a pre-push hook, improving predictability and reducing transfer-side overhead. The key changes shift LFS candidate discovery to use git lfs push --dry-run for more accurate file selection, and install a pre-push hook during initialization to orchestrate the workflow.
- Adds
git drs prepushcommand to prepare DRS objects before invoking Git LFS pre-push - Implements dry-run-based LFS file discovery with remote/ref resolution and pointer file safeguards
- Installs pre-push hook during
git drs initfor consistent workflow execution
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/prepush/main.go | New pre-push hook command that buffers stdin, prepares DRS objects, and delegates to git lfs pre-push |
| cmd/initialize/main.go | Adds pre-push hook installation logic with existing hook preservation |
| drsmap/drs_map.go | Implements dry-run-based LFS discovery with ResolveRemoteAndRef, RunLfsPushDryRun, and pointer file detection |
| drslog/logger.go | Adds PID prefix and fixes call depth for accurate caller location in logs |
| cmd/transfer/main.go | Removes UpdateDrsObjects call as it's now handled by pre-push hook |
| cmd/root.go | Registers prepush command in CLI |
| config/config.go | Improves error message clarity |
| docs/developer-guide.md | Documents new pre-push workflow in developer guide |
| docs/commands.md | Documents prepush command and hook installation |
| tests/monorepos/list-indexd.sh | New utility script for listing Indexd records from Kubernetes pod |
| tests/monorepos/run-test.sh | Moves set -x earlier and makes remote/branch explicit in git push commands |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
drsmap/drs_map.go
Outdated
| out, err := RunLfsPushDryRun(ctx, repoDir, spec, logger) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
|
|
||
| // create a map of LFS file info | ||
| lfsFileMap := make(map[string]LfsFileInfo) |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If git lfs push --dry-run returns no output (empty string), the function will return an empty map without any indication that no files were found. This could be confusing when debugging - was there an issue, or are there genuinely no LFS files to push? Consider logging a message when the dry-run output is empty to help distinguish between these cases, for example: "No LFS files to push (dry-run returned no output)".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot open a new pull request to apply changes based on this feedback
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Avoid duplicate indexd hash lookups during registrationContext Old
sequenceDiagram
participant Client
participant Indexd
participant DRS
Client->>Indexd: GET /index/index?hash=sha256:{oid}
Indexd-->>Client: ListRecords
Client->>DRS: GetDownloadURL(oid)
DRS->>Indexd: GET /index/index?hash=sha256:{oid}
Indexd-->>DRS: ListRecords
DRS-->>Client: AccessURL
Decision NewsequenceDiagram
participant Client
participant Indexd
participant DRS
Client->>Indexd: GET /index/index?hash=sha256:{oid}
Indexd-->>Client: ListRecords
Client->>DRS: getDownloadURLFromRecords(oid, records)
DRS-->>Client: AccessURL
Alternatives Considered // Modify GetDownloadURL() to accept optional records
// Add an overloaded version or modify GetDownloadURL() to accept pre-fetched records
func (cl *IndexDClient) GetDownloadURL(oid string, records []drs.DRSObject) (*drs.AccessURL, error) {
// If records is nil, it will query indexd. Otherwise, it uses the provided records.
...
}While this is cleaner and "more natural", this would break the interface and require changes to:
So, a better solution was to create an internal helper method that doesn't change the public interface. See: func (cl *IndexDClient) getDownloadURLFromRecords(oid string, records []drs.DRSObject) (*drs.AccessURL, error)
Consequences
Related
Manual testingFrom tests/monorepos/fixtures, confirm only called once by matching |
Indexd mock server instrumentation for hash lookup testsContext Decision
sequenceDiagram
participant Test
participant IndexdMock
participant Client
Test->>Client: RegisterFile(oid)
Client->>IndexdMock: GET /index/index?hash=sha256:{oid}
IndexdMock-->>Client: ListRecords (hashQueryCount++)
Client->>IndexdMock: GET /ga4gh/drs/v1/objects/{id}/access/{accessId}
IndexdMock-->>Client: AccessURL (/signed/...)
Client->>IndexdMock: GET /signed/... (CanDownloadFile)
IndexdMock-->>Client: 200 OK
Test->>IndexdMock: HashQueryCount()
Consequences
Related
|
quinnwai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall
Nice tested the below script works, however the end to end test needs patching, see associated comment below. Left comments, let me know if anything else to test + review on the next round
Example E2E Testing Script
Don't forget to adapt the REPO_NAME and git drs remote add gen3 flags to fit your personal params
#!/bin/bash
set -e
set -x # Print each command as it's executed
# Set repo name and remote URL
REPO_NAME="git-drs-e2e-test-3"
GIT_USER="cbds"
# REMOTE_URL="https://source.ohsu.edu/$GIT_USER/$REPO_NAME"
REMOTE_URL="git@source.ohsu.edu:$GIT_USER/$REPO_NAME.git"
# Clean up if rerunning (don't fail if not removable)
rm -rf "$REPO_NAME" || true
# Create directory and initialize git
mkdir "$REPO_NAME"
cd "$REPO_NAME"
# Step 1: Initialize Repository
git init
git drs remote add gen3 local --url https://caliper-local.ohsu.edu/ --cred ~/.gen3/credentials-local.json --project cbds-git_drs_test --bucket cbds
git drs init
# set branch / add remote
git branch -M main
git remote add origin "$REMOTE_URL"
git lfs track "*.greeting"
git add .gitattributes
# Step 2: Create and Commit Initial Files
mkdir -p data/A data/B data/C
DATE="hello $(date)"
echo $DATE > data/A/simple.greeting
echo $DATE > data/B/simple.greeting
echo $DATE > data/C/simple.greeting
git add data/
git add .drs/config.yaml
git commit -m "Initial commit: Add .greeting files with 'hello'"
# Prompt user for remote if not set
git push -f
forge publish $GH_PAT
# check that list works
FORGE_UID=$(forge list | sed -n '2p' | awk '{print $2}')
if [ -z "$FORGE_UID" ]; then
echo "Error: No UID found in forge list"
exit 1
fi
# check status and output works
sleep 5
forge status "$FORGE_UID" > status.log 2>&1
grep "Status" status.log || { echo "Error: forge status failed"; exit 1; }
forge output "$FORGE_UID" > output.log 2>&1
grep "Logs" output.log || { echo "Error: forge output failed"; exit 1; }
# Keep polling forge status until either Failed or Completed
while true; do
STATUS=$(forge status "$FORGE_UID" | grep "Status" | awk '{print $6}')
echo "Current status: $STATUS"
if [ "$STATUS" == "Completed" ]; then
echo "Forge job completed successfully."
break
elif [ "$STATUS" == "Failed" ]; then
echo "Forge job failed."
exit 1
else
echo "Forge job still in progress. Waiting for 10 seconds before checking again..."
sleep 10
fi
done
# # Step 3: clone and pull files
git clone "$REMOTE_URL"
cd "$REPO_NAME"
git drs init
git lfs pull
|
|
||
| These commands are called automatically by Git hooks: | ||
|
|
||
| - `git drs precommit`: Process staged files during commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To your point in #124, could we remove git drs precommit entirely from docs / commands? Not being used anywhere and would just cause user confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot write an issue
cmd/initialize/main.go
Outdated
| if !strings.HasSuffix(updated, "\n") { | ||
| updated += "\n" | ||
| } | ||
| updated += "\n# git-drs pre-push hook\n" + hookBody |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when git drs init is called on an existing Git DRS repo, this lfs pre-push and drs pre-push get placed the wrong way around in the git hook. For instance, after appending:
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { printf >&2 "\n%s\n\n" "This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'pre-push' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks')."; exit 2; }
git lfs pre-push "$@"
# git-drs pre-push hook
remote="$1"
if [ -n "$remote" ]; then
git drs prepush "$remote"
else
git drs prepush
fiNot sure if you have a migration strategy but I imagine this might become a problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when git drs init is called on an existing Git DRS repo,
Can you document how to re-create?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure so TLDR is git drs init using an older version (0.5.0) and then git drs init using a newer version.
To curl older version:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/calypr/git-drs/refs/heads/fix/install-error-macos/install.sh)" -- 0.5.0
Lmk if that works
| Long: "Pre-push hook that updates DRS objects before transfer", | ||
| Args: cobra.RangeArgs(0, 1), | ||
| RunE: func(cmd *cobra.Command, args []string) error { | ||
| //myLogger := drslog.GetLogger() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comment?
| //myLogger := drslog.GetLogger() |
| } | ||
|
|
||
| // create a drs logger and pass it to GetAllLfsFiles | ||
| logger := &drslog.Logger{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| logger := &drslog.Logger{} | |
| logger, err := drslog.NewLogger("", true) | |
| if err != nil { | |
| t.Fatalf("Failed to create logger: %v", err) | |
| } | |
| defer drslog.Close() |
nil pointer error when testing...
Could you check that the e2e test passes on your end? Still running into errors
Error
$go test tests/integration/calypr/end_to_end_test.go
[52744] 2026/01/09 09:16:28 drs_map.go:39: running command: [git symbolic-ref -q --short HEAD]
[52744] 2026/01/09 09:16:28 drs_map.go:39: running command: [git for-each-ref --format=%(upstream:short) refs/heads/main]
[52744] 2026/01/09 09:16:28 drs_map.go:117: running command: [git lfs push --dry-run origin HEAD]
--- FAIL: TestEndToEndGitDRSWorkflow (21.23s)
end_to_end_test.go:48: Temporary directory: /var/folders/nq/88_4pk_s25z4g3g52gvm5b88px118k/T/git-drs-e2e-2383170322
end_to_end_test.go:106: Running CMD: calypr_admin collaborators add wongq@ohsu.edu /programs/test/projects/hao7d2fu --project_id test-hao7d2fu --profile calypr-dev -w -a
approved: /end_test.go:136: calypr_admin collaborators add:
- policy_id: programs.test.projects.hao7d2fu_reader
request_id: a5b983db-904f-4209-96b0-fbcf977b9c8c
status: SIGNED
username: wongq@ohsu.edu
- policy_id: programs.test.projects.hao7d2fu_writer
request_id: 8cdc774d-6a3c-4c18-8678-f138e26cbceb
status: SIGNED
username: wongq@ohsu.edu
msg: OK
end_to_end_test.go:149: git-drs add remote output: 2026/01/09 09:16:27 logger.go:77: .gitignore has been updated and staged
2026/01/09 09:16:27 logger.go:77: Git DRS initialized
2026/01/09 09:16:27 logger.go:71: Using 4 concurrent transfers
end_to_end_test.go:157: git-drs add remote output: 2026/01/09 09:16:27 logger.go:71: Remote added/updated: calypr-dev → https://calypr-dev.ohsu.edu (project: test-hao7d2fu, bucket: cbds)
2026/01/09 09:16:27 logger.go:71: Gen3 profile 'calypr-dev' configured and token refreshed successfully
end_to_end_test.go:172: .drs/config.yaml contents: default_remote: calypr-dev
remotes:
calypr-dev:
gen3:
endpoint: https://calypr-dev.ohsu.edu
project_id: test-hao7d2fu
bucket: cbds
end_to_end_test.go:205: Remote URL: https://source.ohsu.edu/CBDS/test-hao7d2fu.git
end_to_end_test.go:234: Failed to get LFS files: git lfs push --dry-run failed: Invalid remote name "origin": invalid remote name: "/private/var/folders/nq/88_4pk_s25z4g3g52gvm5b88px118k/T/git-drs-e2e-2383170322/test-hao7d2fu/origin"
FAIL
FAIL command-line-arguments 21.867s
FAIL
Repro
- See
tests/README.mdon how to setup env vars etc
go test -v tests/integration/calypr/end_to_end_test.
go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't had the chance to confirm - the end to end test is failing because of logging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@quinnwai confirmed I can reproduce this. thanks
cmd/prepush/main.go
Outdated
| } | ||
|
|
||
| // Build and run: git lfs pre-push <args...> | ||
| cmdArgs := append([]string{"lfs", "pre-push"}, args...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we using lfs pre-push as opposed to lfs status?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See your catch above "when git drs init is called on an existing Git DRS repo, this lfs pre-push and drs pre-push get placed the wrong way around in the git hook. "
When that is fixed, this goes away.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I had a different question, moreso why we use lfs pre-push to get the set of files required for commit as opposed to lfs status which does the same and to my limited testing seems a bit faster. I think this is more a performance question when do via test-monorepo testing etc tho. if lfs pre-push isn't significantly slow and still faster that our prev implementation then I defer to you on this
Co-authored-by: Quinn Wai Wong <54592956+quinnwai@users.noreply.github.com>
Co-authored-by: Quinn Wai Wong <54592956+quinnwai@users.noreply.github.com>
drsmap/drs_map.go
Outdated
| func GetAllLfsFiles() (map[string]LfsFileInfo, error) { | ||
| // get all LFS files' info using json | ||
| cmd := exec.Command("git", "lfs", "ls-files", "--json") | ||
| func getDefaultRemote() (string, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this func doesn't appear to be called anywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, good call forgot to add a comment on this
| isDownloadable := true | ||
| cl.Logger.Printf("checking if %s file is downloadable", oid) | ||
| signedUrl, err := cl.GetDownloadURL(oid) | ||
| signedUrl, err := cl.getDownloadURLFromRecords(oid, recordsForDownload) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense from reading it but for some reason still running into a weird git lfs pre-push error. You can reproduce by rerunning the script I attached here
Logs
[61592] 2026/01/09 12:22:38 main.go:155: ~~~~~~~~~~~~~ START: drs transfer ~~~~~~~~~~~~~
[61592] 2026/01/09 12:22:38 main.go:193: Using 8 concurrent workers (from Git LFS)
[61592] 2026/01/09 12:22:38 main.go:245: Transfer operation: upload
[61578] 2026/01/09 12:22:38 main.go:274: Current command: {"event":"upload","oid":"f5cc729662804a6deb0ca5caed1f65813a62f93caff12a526fd8ad854ee21767","size":34,"path":"/Users/wongq/data/calypr/git-drs/calypr-dev/git-drs-e2e-test-3/.git/lfs/objects/f5/cc/f5cc729662804a6deb0ca5caed1f65813a62f93caff12a526fd8ad854ee21767","action":null}
[61578] 2026/01/09 12:22:38 main.go:127: Worker 2: Uploading file OID f5cc729662804a6deb0ca5caed1f65813a62f93caff12a526fd8ad854ee21767
[61578] 2026/01/09 12:22:38 indexd_client.go:275: register file started for oid: f5cc729662804a6deb0ca5caed1f65813a62f93caff12a526fd8ad854ee21767
[61578] 2026/01/09 12:22:38 indexd_client.go:658: Querying indexd at https://calypr-dev.ohsu.edu/index/index?hash=sha256:f5cc729662804a6deb0ca5caed1f65813a62f93caff12a526fd8ad854ee21767
[61578] 2026/01/09 12:22:38 indexd_client.go:664: Looking for files with hash sha256:f5cc729662804a6deb0ca5caed1f65813a62f93caff12a526fd8ad854ee21767
[61578] 2026/01/09 12:22:39 indexd_client.go:691: Found 0 indexd record(s) matching the hash {[] [] 0 0 100 [] [] [] { f5cc729662804a6deb0ca5caed1f65813a62f93caff12a526fd8ad854ee21767 } map[] }
[61578] 2026/01/09 12:22:39 indexd_client.go:298: creating record: no existing indexd record for this project
[61578] 2026/01/09 12:22:39 indexd_client.go:569: retrieved IndexdObj: {"did":"fc8efc22-429c-5ec5-a77f-ecc28ab315d5","file_name":"data/A/simple.greeting","urls":["s3://cbds/fc8efc22-429c-5ec5-a77f-ecc28ab315d5/f5cc729662804a6deb0ca5caed1f65813a62f93caff12a526fd8ad854ee21767"],"size":34,"authz":["/programs/cbds/projects/git_drs_test"],"hashes":{"sha256":"f5cc729662804a6deb0ca5caed1f65813a62f93caff12a526fd8ad854ee21767"},"form":"object"}
[61578] 2026/01/09 12:22:39 indexd_client.go:590: POST request created for indexd: https://calypr-dev.ohsu.edu/index/index
[61578] 2026/01/09 12:22:39 indexd_client.go:604: POST successful: 200 OK
[61578] 2026/01/09 12:22:40 indexd_client.go:611: GET for DRS ID successful: fc8efc22-429c-5ec5-a77f-ecc28ab315d5
[61578] 2026/01/09 12:22:40 indexd_client.go:351: checking if f5cc729662804a6deb0ca5caed1f65813a62f93caff12a526fd8ad854ee21767 file is downloadable
[61584] 2026/01/09 12:22:40 main.go:274: Current command: {"event":"terminate"}
[61586] 2026/01/09 12:22:40 main.go:274: Current command: {"event":"terminate"}
[61586] 2026/01/09 12:22:40 main.go:278: Received TERMINATE signal
[61586] 2026/01/09 12:22:40 main.go:304: ~~~~~~~~~~~~~ COMPLETED: custom transfer ~~~~~~~~~~~~~
[61588] 2026/01/09 12:22:40 main.go:274: Current command: {"event":"terminate"}
[61588] 2026/01/09 12:22:40 main.go:278: Received TERMINATE signal
[61584] 2026/01/09 12:22:40 main.go:278: Received TERMINATE signal
[61588] 2026/01/09 12:22:40 main.go:304: ~~~~~~~~~~~~~ COMPLETED: custom transfer ~~~~~~~~~~~~~
[61592] 2026/01/09 12:22:40 main.go:274: Current command: {"event":"terminate"}
[61592] 2026/01/09 12:22:40 main.go:278: Received TERMINATE signal
[61592] 2026/01/09 12:22:40 main.go:304: ~~~~~~~~~~~~~ COMPLETED: custom transfer ~~~~~~~~~~~~~
[61590] 2026/01/09 12:22:40 main.go:274: Current command: {"event":"terminate"}
[61590] 2026/01/09 12:22:40 main.go:278: Received TERMINATE signal
[61584] 2026/01/09 12:22:40 main.go:304: ~~~~~~~~~~~~~ COMPLETED: custom transfer ~~~~~~~~~~~~~
[61590] 2026/01/09 12:22:40 main.go:304: ~~~~~~~~~~~~~ COMPLETED: custom transfer ~~~~~~~~~~~~~
[61580] 2026/01/09 12:22:40 main.go:274: Current command: {"event":"terminate"}
[61582] 2026/01/09 12:22:40 main.go:274: Current command: {"event":"terminate"}
[61582] 2026/01/09 12:22:40 main.go:278: Received TERMINATE signal
[61580] 2026/01/09 12:22:40 main.go:278: Received TERMINATE signal
[61580] 2026/01/09 12:22:40 main.go:304: ~~~~~~~~~~~~~ COMPLETED: custom transfer ~~~~~~~~~~~~~
[61582] 2026/01/09 12:22:40 main.go:304: ~~~~~~~~~~~~~ COMPLETED: custom transfer ~~~~~~~~~~~~~
[61524] 2026/01/09 12:22:40 main.go:103: git lfs pre-push failed: exit status 2
* push origin main * fix #132
* Doing a token request if it is unable to parse the experation date. Also reverting the logging to fix debug output issue * adds mutex * refactored logger
Move DRS object preparation to pre-push hook, improve LFS dry-run handling, and expand tooling/docs
Summary
Add a dedicated git drs prepush hook command that prepares DRS objects before invoking git lfs pre-push, buffering stdin safely for the child process.
Shift LFS object discovery to a git lfs push --dry-run flow with remote/ref resolution and pointer safeguards, ensuring UpdateDrsObjects operates on what will actually be pushed.
Install a pre-push hook during git drs init, and document the prepush workflow in developer and command references.
Improve logging to include PID-prefixed entries and more accurate caller location for thread-safe logging.
Add a tests/monorepos/list-indexd.sh utility for listing Indexd records tied to a resource path in a Kubernetes-hosted Postgres instance.
Architecture Changes
DRS object preparation moved from transfer-time to pre-push: the pre-push hook now invokes UpdateDrsObjects before git lfs pre-push, while transfer no longer preloads DRS objects, making the push pipeline more predictable and minimizing transfer-side work.
LFS candidate selection now follows Git LFS’s own dry-run: GetAllLfsFiles uses git lfs push --dry-run plus remote/ref resolution to target what would be pushed, with safeguards for empty pointers and small pointer files.
Initialization now provisions a pre-push hook: git drs init installs or updates the pre-push hook to route through git drs prepush for consistent pre-push behavior.
old
flowchart TD A[git push] --> B[git lfs pre-push] subgraph prepush[pre-push hook; runs once] subgraph xfer[N concurrent] B --> C[git drs transfer] C --> D[UpdateDrsObjects] D --> E[GetAllLfsFiles] E --> F[git lfs status; all files from all commits] end endnew
flowchart TD A[git push] --> B[hook] subgraph prepush[pre-push hook; runs once] B --> C[git drs prepush] C --> D[UpdateDrsObjects] D --> E[GetAllLfsFiles] E --> F[git lfs push --dry-run ; only files from this commit set] F --> G[git lfs pre-push] end subgraph xfer[N concurrent] G --> H[git drs transfer] endpre-push now orchestrates DRS preparation before handing off to Git LFS, while transfer focuses strictly on upload/download work.
Links to Issues
Reviewer Testing
Goal: Confirm git drs prepush prepares DRS objects before Git LFS pre-push.
Expected: The pre-push hook should run git drs prepush, prepare DRS objects, then invoke git lfs pre-push via the buffered stdin flow. This behavior is implemented in cmd/prepush/main.go and installed by git drs init in cmd/initialize/main.go.
Goal: Ensure only LFS files that would be pushed are considered.
Expected: GetAllLfsFiles uses the dry-run output to determine which LFS objects to prepare, including remote/ref resolution and pointer safeguards described in drsmap/drs_map.go.
Goal: List Indexd records for a resource path from the test cluster.
Given:
The system will respond with:
The user can then backout changes to the repo, correct the data and proceed normally.