You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "Astro-Han (via GitHub)" <gi...@apache.org> on 2026/08/30 17:04:34 UTC

[PR] fix: support rsync 3.1 for Nightly bootstrap [maka]

Astro-Han opened a new pull request, #4280:
URL: https://github.com/apache/maka/pull/4280

   ## Summary
   
   The first Desktop Nightly reached the protected publisher but failed before reading or writing the feed because the Apache Nightlies server runs rsync 3.1.3, which rejects `--mkpath`.
   
   Bootstrap `maka/desktop` as a nested empty directory tree from the Infra-provided base path using rsync's long-supported directory-copy behavior. This keeps publication rsync-only, avoids requiring remote shell access, and preserves the append-only payload / feed-last protocol.
   
   ## Verification
   
   - `node --test scripts/desktop-nightly-workflow-policy.test.mjs scripts/desktop-nightly-stage.test.mjs scripts/desktop-nightly.test.mjs` (12/12 passed)
   - `npx biome check scripts/desktop-nightly-workflow-policy.test.mjs`
   - `git diff --check`
   - Original failure: https://github.com/apache/maka/actions/runs/33323426713
   - End-to-end Nightlies publication requires merging this workflow change and starting a fresh npm Nightly; in-place reruns remain intentionally rejected.
   
   ## Root cause
   
   The publisher assumed both ends supported rsync 3.2's `--mkpath`. GitHub's sender is 3.2.7, but the Nightlies receiver is 3.1.3, so the remote parser rejected the command before any destination directory was created.
   
   ## AI use
   
   Select exactly one:
   
   - [ ] No generative tool made a substantive contribution
   - [x] Generative tooling made a substantive contribution
   
   Tool(s) and scope: Codex diagnosed the failed workflow, implemented the compatibility fix, and added the regression coverage. The human contributor must review the final diff and own the submission.
   
   ## Checklist
   
   - [x] Tests cover the change and fail without it
   - [ ] Lint, format, typecheck and the affected suites pass locally
   
   Does this PR entail a change in behavior?
   
   - [x] Yes — described under Summary above
   - [ ] No
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] fix: support rsync 3.1 for Nightly bootstrap [maka]

Posted by "jackwener (via GitHub)" <gi...@apache.org>.
jackwener commented on code in PR #4280:
URL: https://github.com/apache/maka/pull/4280#discussion_r3889993518


##########
.github/workflows/desktop-nightly.yml:
##########
@@ -308,14 +308,15 @@ jobs:
           umask 077
           printf '%s\n' "$NIGHTLIES_RSYNC_KEY" > "$ssh_directory/key"
           {
+            echo "NIGHTLIES_RSYNC_BASE=$NIGHTLIES_RSYNC_USER@$NIGHTLIES_RSYNC_HOST:${NIGHTLIES_RSYNC_PATH%/}"
             echo "NIGHTLIES_RSYNC_TARGET=$NIGHTLIES_RSYNC_USER@$NIGHTLIES_RSYNC_HOST:${NIGHTLIES_RSYNC_PATH%/}/maka/desktop"
             echo "RSYNC_RSH=ssh -i $ssh_directory/key -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p $NIGHTLIES_RSYNC_PORT"
           } >> "$GITHUB_ENV"
 
       - name: Ensure the Nightly destination exists
         run: |
-          mkdir -p .nightly-empty
-          rsync -rlptDz --mkpath --protect-args .nightly-empty/ "$NIGHTLIES_RSYNC_TARGET/"
+          mkdir -p .nightly-empty/maka/desktop
+          rsync -rlptDz --protect-args .nightly-empty/maka/ "$NIGHTLIES_RSYNC_BASE/maka/"

Review Comment:
   **P3 — same `--delete` guard as on #4271, and the blast radius just grew.**
   
   This is still the only rsync step in the file without a `--delete` negative assertion. The other two have had one for a while:
   
   ```js
   assert.match(step.run, /^rsync -rlptDvz --protect-args /u);
   assert.doesNotMatch(step.run, /--delete/u);
   ```
   
   What changed here is the destination. It used to be `"$NIGHTLIES_RSYNC_TARGET/"`, which is `<path>/maka/desktop`. It is now `"$NIGHTLIES_RSYNC_BASE/maka/"`, which is `<path>/maka` — **one level higher**. So if `--delete` were ever added to this line, an almost-empty source would no longer scope the damage to `maka/desktop`; it would take everything under `maka/` on the Nightlies host.
   
   Neither existing check would stop it. The string assertions do not mention `--delete`, and the new execution test would not fail either: with `--delete` present the local run still creates `maka/desktop` from the source tree, so `stat(...).isDirectory()` still passes. The command is correct today — this is purely about the guard, and the step where an empty source makes `--delete` most destructive remains the one step not protected from it.
   
   `assert.doesNotMatch(bootstrap.run, /--delete/u)` is one line, matches the convention used twice in this file, and sits naturally beside the `--mkpath` and `.nightly-publish` negative assertions you already have here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] fix: support rsync 3.1 for Nightly bootstrap [maka]

Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han merged PR #4280:
URL: https://github.com/apache/maka/pull/4280


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org