Skip to content

fix: run mx update-widgets before mx check to prevent false CE0463#164

Merged
ako merged 1 commit intomendixlabs:mainfrom
engalar:fix/ce0463-auto-update-widgets
Apr 10, 2026
Merged

fix: run mx update-widgets before mx check to prevent false CE0463#164
ako merged 1 commit intomendixlabs:mainfrom
engalar:fix/ce0463-auto-update-widgets

Conversation

@engalar
Copy link
Copy Markdown
Contributor

@engalar engalar commented Apr 9, 2026

Summary

  • Run mx update-widgets automatically before mx check in docker check and docker build commands to normalize pluggable widget definitions against installed .mpk files
  • Added --no-update-widgets flag to opt out
  • Failure of update-widgets is non-fatal (warns and continues)

Context

CE0463 ("The definition of this widget has changed") fires when widget Object properties don't match Type PropertyTypes. This is a known issue with mxcli-generated pluggable widgets. Running mx update-widgets normalizes the Objects as a workaround.

A follow-up PR will address the root cause in the widget template engine.

Closes #121

Test plan

  • Unit tests verify update-widgets runs before check by default
  • Unit tests verify --no-update-widgets skips the step
  • go build ./... and go vet pass
  • Manual test with a project that has pluggable widgets

🤖 Generated with Claude Code

Pluggable widget definitions created by mxcli may have Object properties
that don't match the Type PropertyTypes schema, triggering CE0463 errors
during mx check. Running update-widgets first normalizes widget Objects
against installed .mpk files.

Added --no-update-widgets flag to docker check and docker build commands
to opt out of this behavior.

Closes mendixlabs#121
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

AI Code Review

What Looks Good

The PR implements a practical workaround for CE0463 errors by automatically running mx update-widgets before mx check in docker commands. The implementation is clean and follows existing patterns:

  • Consistent implementation: Added SkipUpdateWidgets flag to both docker build and docker check commands with corresponding struct fields
  • Proper error handling: Update-widgets failures are non-fatal (warned and continued) as specified
  • Clear documentation: Help text explains the behavior and purpose
  • Well-tested: Comprehensive unit tests verify:
    • Update-widgets runs before check by default
    • Flag properly skips the step
    • Correct command ordering via fake mx binaries
    • Tests avoid time.Sleep and use actual command verification
  • Atomic scope: Focuses solely on the widget normalization workaround without unrelated changes
  • Robust testing: Tests skip appropriately on Windows and verify both positive and negative cases

The changes are minimal and targeted, touching only the necessary files to implement the feature without duplicating existing functionality or modifying MDL syntax (which makes the MDL-specific checklist sections inapplicable).

Recommendation

Approve - The PR is ready for merge. It solves a real user issue (CE0463 false positives) with a well-implemented, tested workaround that maintains backward compatibility via the opt-out flag. The follow-up PR addressing the root cause in the widget template engine is appropriately noted.


Automated review via OpenRouter (Nemotron Super 120B) — workflow source

Copy link
Copy Markdown
Collaborator

@ako ako left a comment

Choose a reason for hiding this comment

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

Clean fix with the right approach — mx update-widgets normalizes pluggable widget Objects against .mpk PropertyTypes, preventing false CE0463. PR correctly notes this is a workaround pending a root-cause fix in the widget template engine.

What's good:

  • SkipUpdateWidgets option threaded through both BuildOptions and CheckOptions
  • --no-update-widgets flag on both docker build and docker check
  • Failure is non-fatal (warns and continues) — correct, since worst case is the original CE0463
  • Tests use fake shell scripts to verify command order (update-widgets before check) and the opt-out flag

Minor:

  • Flag naming --no-update-widgets is slightly inconsistent with neighboring --skip-check. --skip-update-widgets would match better.
  • No test for the failure path (update-widgets exits non-zero → warning printed, check still runs)
  • No test for the Build() path even though the same logic was added there

LGTM.

@ako ako merged commit fe6e61f into mendixlabs:main Apr 10, 2026
1 of 2 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

2 participants