Repository navigation
Report progress and failures from usync-import/export, update packages - #23
Merged
Merged
Conversation
Imports and exports run one handler per request, with Forms last, so a run that stopped part way looked like it had worked. Now: - print each handler as it completes, and on a failed step name the handler and the cause and exit non-zero (also when items fail) - refresh the access token every 2 minutes, as Umbraco tokens expire after 5 and long imports outlived them - raise the per-request timeout from 100 seconds to 30 minutes, configurable with uSync:Command:Timeout - send an empty first RequestId so the server runs its start step - leave the set empty by default so the site's default set is used (set names are case sensitive, "default" missed "Default") - say so when the server runs the action in the background Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Microsoft.AspNetCore.SignalR.Common 10.0.11 (pulled in by SignalR.Client) is affected by GHSA-334f-vvp4-7g6p, fixed in 10.0.13. Move all the Microsoft.Extensions/AspNetCore packages in the CLI to the latest 10.0 patch, and the in-repo test site to Umbraco 17.8.1 and uSync 17.6.2. uSync.Command.Setup keeps its pinned Umbraco version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An unhandled exception on the server comes back as a bare 500 with no body, which the CLI showed as "The server returned 500: ". Say when the server gave no details, explain the common status codes (401, 403, 404), show ProblemDetails title/detail when the server sends them, and point at the site log with the handler name to search for. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A customer reported that
usync-importwasn't bringing in new Umbraco Forms, while importing just the Forms group from the backoffice did. In an "all" run the Forms handlers always go last, and the CLI sends one request per handler. Anything that stops the run part way skips Forms, and the old CLI gave little sign that this had happened.I couldn't reproduce it on a clean site (Umbraco 17.8.1, uSync 17.6.2, uSync.Forms 17.2.0). Testing turned up several ways a long run can fail quietly before it reaches Forms.
What changed
[17/18] Forms : 4) instead of dots.GetAccessTokenno longer resetsHttpClient.BaseAddress, which throws once the client has sent a request.HttpClientdefault of 100 seconds. It can be changed withuSync:Command:Timeout(a TimeSpan) in appsettings.json.RequestId, so the server runsStartProcessAsync(starting notifications and cache clear). Before, the CLI sent a fresh GUID, so the start step never ran.--set, the set is left empty and the server uses its configured default. The old default,"default", didn't match the case-sensitive named options registered as"Default".Testing
Tested against a local v17.8.1 site with uSync and uSync.Forms:
--set Default --group Forms), and an export all complete with per-handler output and exit code 0Package updates
The second commit moves the CLI's Microsoft.Extensions/AspNetCore packages from 10.0.11 to 10.0.15, which clears the SignalR advisory GHSA-334f-vvp4-7g6p (fixed in 10.0.13) that showed up as a warning whenever the CLI was built. The in-repo test site moves to Umbraco 17.8.1 and uSync 17.6.2.
uSync.Command.Setupkeeps its pinned Umbraco 17.6.2, so it still warns about Umbraco's transitive MessagePack and System.Security.Cryptography packages.Not in this PR
While testing I hit a server-side hang. After the CLI timed out on the Datatypes step, the server kept running that step. A second import started a few seconds later never finished: the Datatypes step, which holds uSync's import lock, was waiting on an SQLite write lock. That needs looking at in uSync itself.
🤖 Generated with Claude Code