Skip to content

DYN-9707: Revert GraphLock#17210

Merged
RobertGlobant20 merged 8 commits into
DynamoDS:masterfrom
ivaylo-matov:DYN-9707-Revert-Graph-Lock
Jul 7, 2026
Merged

DYN-9707: Revert GraphLock#17210
RobertGlobant20 merged 8 commits into
DynamoDS:masterfrom
ivaylo-matov:DYN-9707-Revert-Graph-Lock

Conversation

@ivaylo-matov

Copy link
Copy Markdown
Contributor

Purpose

Revert the graph file locking feature introduced in #17139 and remove all related infrastructure -.dynlock sidecar files, GraphLockManager, conflict dialog, and tests.

The three squash-merge commits from DYN-9707 were reverted in reverse order:

Graph lock is intentionally removed. The FileTrust / ForceBlockRun improvements from #17153 and #17167 are re-applied in a follow-up commit on this branch, without any graph-lock integration.

Key changes:

  • removed: GraphLockManager and locking types under src/DynamoCore/Graph/Workspaces/Locking/
  • removed: WpfGraphLockUserPrompt, graph-lock UI strings (default Resources.resx / Resources.en-US.resx), and GraphLockManagerTests
  • removed: Graph-lock acquisition/release and conflict handling from DynamoModel / DynamoViewModel
  • re-landed (graph-lock-free): Instance-scoped RunSettings.ForceBlockRun, forceBlockRun plumbing through open/insert commands, stale file-trust warning fixes, and regression tests from DYN-9707: Refactor ForceBlockRun to instance  #17153 / DYN-9707: Fix ForceBlockRun not applied when opening legacy XML workspaces #17167
  • API: RunSettings.ForceBlockRun restored as an instance property; PublicAPI.Unshipped.txt upd#17153 / #17167ated in DynamoCore

Declarations

Check these if you believe they are true

Release Notes

Dynamo no longer creates .dynlock sidecar files or warns when opening a graph file that is already open in another Dynamo instance.

Reviewers

@DynamoDS/eidos
@johnpierson
@RobertGlobant20

FYIs

@dnenov
@jasonstratton

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-9707

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reverts the graph file locking feature (the .dynlock sidecar mechanism, conflict UI, and related tests) while keeping/re-applying the file trust / ForceBlockRun plumbing improvements so untrusted graphs are blocked consistently during open/insert.

Changes:

  • Removed graph-lock infrastructure (GraphLockManager, .dynlock support types), WPF conflict prompt, and associated unit tests/resources.
  • Simplified file open path in DynamoModel to remove lock acquisition/redirect/cancel logic while still propagating forceBlockRun for JSON and legacy XML graphs.
  • Updated WPF open/insert flows and message box helper signature to reflect the removal of graph-lock UI.

Reviewed changes

Copilot reviewed 16 out of 19 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
test/DynamoCoreTests/Models/FileTrustHeadlessTests.cs Minor formatting adjustment in trust precondition helper.
test/DynamoCoreTests/Graph/Workspaces/GraphLockManagerTests.cs Removes unit tests for graph lock acquisition/conflict behaviors.
src/DynamoCoreWpf/Views/FileTrust/FileTrustWarning.xaml.cs Formatting-only change in popup activation condition.
src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs Removes graph-lock prompt hookup and cancel/redirect handling in Open; clarifies trust-warning timing for Insert.
src/DynamoCoreWpf/UI/Prompts/DynamoMessageBox.xaml.cs Removes unused maxWidth parameter from the internal owner+custom-buttons overload.
src/DynamoCoreWpf/Services/WpfGraphLockUserPrompt.cs Deletes the WPF conflict prompt implementation for graph-lock.
src/DynamoCoreWpf/PublicAPI.Unshipped.txt Removes unshipped public resource entries related to graph-lock strings.
src/DynamoCoreWpf/Properties/Resources.resx Removes base graph-lock resource strings.
src/DynamoCoreWpf/Properties/Resources.en-US.resx Removes en-US graph-lock resource strings.
src/DynamoCoreWpf/Properties/Resources.Designer.cs Removes strongly-typed accessors for graph-lock strings; shows broader regeneration churn.
src/DynamoCoreWpf/DynamoCoreWpf.csproj Removes compile include for deleted WpfGraphLockUserPrompt.cs.
src/DynamoCore/Models/DynamoModel.cs Removes graph-lock integration; retains JSON/XML open paths with forceBlockRun propagation.
src/DynamoCore/Graph/Workspaces/Locking/IGraphLockUserPrompt.cs Deletes graph-lock core UI prompt contract.
src/DynamoCore/Graph/Workspaces/Locking/GraphLockUserResponse.cs Deletes graph-lock user response type.
src/DynamoCore/Graph/Workspaces/Locking/GraphLockResult.cs Deletes graph-lock acquire result type.
src/DynamoCore/Graph/Workspaces/Locking/GraphLockOutcome.cs Deletes graph-lock outcome enum.
src/DynamoCore/Graph/Workspaces/Locking/GraphLockManager.cs Deletes graph-lock manager implementation.
src/DynamoCore/Graph/Workspaces/Locking/GraphLockInfo.cs Deletes graph-lock metadata type.
src/DynamoCore/Graph/Workspaces/Locking/GraphLockFile.cs Deletes .dynlock file IO implementation.
Files not reviewed (1)
  • src/DynamoCoreWpf/Properties/Resources.Designer.cs: Generated file

Comment on lines +2198 to 2202
// These kind of exceptions indicate that file is not accessible
if (ex is IOException || ex is UnauthorizedAccessException)
{
LastGraphLockOpenOutcome = GraphLockOutcome.RedirectedToCopy;
throw ex;
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in 87023cb

Comment on lines 2211 to 2214
else
{
// These kind of exceptions indicate that file is not accessible
if (ex is IOException || ex is UnauthorizedAccessException)
{
throw ex;
}

XmlDocument xmlDoc;

// When Json opening failed, either this file is corrupted or file might be XML
if (ex is JsonReaderException && DynamoUtilities.PathHelper.isValidXML(filePathToOpen, out xmlDoc, out ex))
{
openedSuccessfully = OpenXmlFileFromPath(xmlDoc, filePathToOpen, forceManualExecutionMode, forceBlockRun: forceBlockRun);
return;
}
else
{
throw ex;
}
throw ex;
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in 87023cb

Comment on lines 2039 to 2042
/// <summary>
/// Looks up a localized string similar to From Template....
/// Looks up a localized string similar to _Template.
/// </summary>
public static string DynamoViewFileMenuOpenTemplate {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in feb5750

Comment on lines 18 to 23
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in feb5750

Comment thread src/DynamoCoreWpf/Properties/Resources.resx
@sonarqubecloud

sonarqubecloud Bot commented Jul 7, 2026

Copy link
Copy Markdown

@RobertGlobant20 RobertGlobant20 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Confirmed this is a clean selective revert — the graph-lock feature (GraphLockManager, .dynlock sidecars, conflict UI, and tests) is fully removed with no dangling references, while the FileTrust/ForceBlockRun improvements from #17153/#17167 are correctly retained. Build integrity and the re-applied open/insert trust-warning logic verified. 👍

@RobertGlobant20 RobertGlobant20 merged commit 539bb0a into DynamoDS:master Jul 7, 2026
29 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants