Problem/Motivation

When a workspace is published, config changes are applied to Live through ConfigImporter, but validation was skipped via a reflection hack that pokes the importer's protected $validated and $extensionChangelist properties. Consequences:

  • A change that leaves the site's config dependency graph inconsistent could be published without warning.
  • Per-item import errors were collected, logged as a warning, and then committed anyway, so a partially-failed import was treated as success.
  • A mid-import failure left Live partially written with no way back.

Proposed resolution

  • Remove the reflection hack and run the full ConfigImporter validation on publish. The publish source is a complete copy of Live plus the workspace overlay, so dependency validation runs against the whole resulting tree. A change that would break the dependency graph is now rejected before anything is written.
  • Take a config checkpoint before the import; on a thrown exception or any collected getErrors(), roll Live back to the checkpoint and stop the publish, preserving the workspace overlay so the changes can be re-published.
  • Make the kernel test fixtures a complete, coherent source and test add coverage for a failed import that rolls back.
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

amateescu created an issue. See original summary.

amateescu’s picture

Status: Active » Needs review

  • amateescu committed 6574d611 on 1.0.x
    fix: #3594189 Validate configuration on workspace publish and roll back...
amateescu’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

amateescu’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.