Repository navigation
Push workspace syncs without announcing them to open tabs #6915
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
Changes from all commits
7d64d3b
acd72df
30786db
20d766e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -72,8 +72,9 @@ on: | |||||||||||||||||||||
| description: | | ||||||||||||||||||||||
| Version spec for `npm install -g @cardstack/boxel-cli`. | ||||||||||||||||||||||
| Default `latest` follows the most recent published version. | ||||||||||||||||||||||
| Staging and production syncs pass `realm push --changed-since`, | ||||||||||||||||||||||
| so the version has to support it. | ||||||||||||||||||||||
| Staging and production syncs pass `realm push --changed-since` | ||||||||||||||||||||||
| and `--no-realm-events` when this version lists them. An older | ||||||||||||||||||||||
| version sends every file and announces the push to open tabs. | ||||||||||||||||||||||
| type: string | ||||||||||||||||||||||
| default: latest | ||||||||||||||||||||||
| secrets: | ||||||||||||||||||||||
|
|
@@ -286,8 +287,20 @@ jobs: | |||||||||||||||||||||
| echo "::notice::This boxel-cli has no --changed-since, so every file goes up." | ||||||||||||||||||||||
| fi | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # The push is indexed without announcing it to the workspace's open | ||||||||||||||||||||||
| # tabs, which pick the new content up on their next load instead of | ||||||||||||||||||||||
| # resetting mid-session. A boxel-cli without --no-realm-events | ||||||||||||||||||||||
| # rejects it, so that one announces. | ||||||||||||||||||||||
| realm_events=() | ||||||||||||||||||||||
| if grep -q -- '--no-realm-events' <<< "$push_help"; then | ||||||||||||||||||||||
| realm_events+=(--no-realm-events) | ||||||||||||||||||||||
| echo "Pushing with --no-realm-events: open tabs pick the changes up on their next load." | ||||||||||||||||||||||
| else | ||||||||||||||||||||||
| echo "::notice::This boxel-cli has no --no-realm-events, so the push is announced to open tabs." | ||||||||||||||||||||||
| fi | ||||||||||||||||||||||
|
Comment on lines
+294
to
+300
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Claude Code 🤖] The run log never shows whether the flag was used. If the CLI doesn't have the flag, the step falls back without saying so. If it does have it, nothing in the log says that either:
Suggested change
Make the same change to the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Claude Code 🤖] Fixed in acd72df. Both sync steps now log 'Pushing with --no-realm-events…' when the CLI lists the flag, and print a |
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| set +e | ||||||||||||||||||||||
| OUTPUT=$(boxel realm push . "${WORKSPACE_URL}" --delete "${changed_since[@]}" 2>&1) | ||||||||||||||||||||||
| OUTPUT=$(boxel realm push . "${WORKSPACE_URL}" --delete "${changed_since[@]}" "${realm_events[@]}" 2>&1) | ||||||||||||||||||||||
| STATUS=$? | ||||||||||||||||||||||
| set -e | ||||||||||||||||||||||
| echo "$OUTPUT" | ||||||||||||||||||||||
|
|
@@ -345,8 +358,20 @@ jobs: | |||||||||||||||||||||
| echo "::notice::This boxel-cli has no --changed-since, so every file goes up." | ||||||||||||||||||||||
| fi | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # The push is indexed without announcing it to the workspace's open | ||||||||||||||||||||||
| # tabs, which pick the new content up on their next load instead of | ||||||||||||||||||||||
| # resetting mid-session. A boxel-cli without --no-realm-events | ||||||||||||||||||||||
| # rejects it, so that one announces. | ||||||||||||||||||||||
| realm_events=() | ||||||||||||||||||||||
| if grep -q -- '--no-realm-events' <<< "$push_help"; then | ||||||||||||||||||||||
| realm_events+=(--no-realm-events) | ||||||||||||||||||||||
| echo "Pushing with --no-realm-events: open tabs pick the changes up on their next load." | ||||||||||||||||||||||
| else | ||||||||||||||||||||||
| echo "::notice::This boxel-cli has no --no-realm-events, so the push is announced to open tabs." | ||||||||||||||||||||||
| fi | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| set +e | ||||||||||||||||||||||
| OUTPUT=$(boxel realm push . "${WORKSPACE_URL}" --delete "${changed_since[@]}" 2>&1) | ||||||||||||||||||||||
| OUTPUT=$(boxel realm push . "${WORKSPACE_URL}" --delete "${changed_since[@]}" "${realm_events[@]}" 2>&1) | ||||||||||||||||||||||
| STATUS=$? | ||||||||||||||||||||||
| set -e | ||||||||||||||||||||||
| echo "$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.
[Claude Code 🤖] Please update the
boxel-cli-versioninput description, since a caller pinning the CLI reads it to learn what the sync needs from the CLI. It doesn't mention--no-realm-events. A version without the flag still pushes fine, but it announces every pushed file to open tabs. The description also says the version "has to support"--changed-since, but both sync steps fall back when it doesn't. Suggested text:Non-blocking. The
--no-realm-eventshalf is introduced by this change; the--changed-sincehalf is pre-existing.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.
[Claude Code 🤖] Fixed in acd72df. The
boxel-cli-versiondescription now says the syncs pass--changed-sinceand--no-realm-eventsonly when the version lists them, and that an older version sends every file and announces the push.