Skip to content

Consumer smoke test: remove each registration in turn #34

Closed

Description

@CaffeinatedCoder

Added 2026-11-11, from spike B (#17). spikes/B.DesignTime/run.sh is the first version of this test and its starting point. Two rules it learned: a generated script is judged by applying it to an empty database (the idempotent one twice), never by its text, which was green while the script did not run; and the control is a consumer whose own IDesignTimeServices registers a differ, where the same checks must see the object missing.


The delivery check, after #17. Plan, section 4.

Change

Port test/consumer-smoke-test.sh from CaffeinatedCoder/EFCore.ComplexIndexes: pack, restore into a project outside the repository through a private package cache and source mapping, assert on scaffolded content. Its break changes: there is no .targets to neuter, so it removes UseSchemaKit(), then the provider package, and requires a failure each time. It runs in both invocation modes, on every PR.

Done when

Both modes are lanes behind the CI gate, and each removal has been seen to fail.

Activity

  1. added this to the 11.0.0 milestone on Nov 11, 2026
  2. added
    tests
    package/core
    area/release
    on Nov 11, 2026
  3. CaffeinatedCoder commented on Nov 14, 2026

    @CaffeinatedCoder
    OwnerAuthor

    A first run by hand, from the pre-preview sweep of main @ 948496a, 2026-11-14. Both packages packed, a consumer outside the repository (net11.0, Npgsql EF rc.3, dotnet-ef 11.0.0-rc.3 as a local tool), one entity with an exclusion constraint and a lambda condition. Each path is judged by pg_constraint and by a second, overlapping insert (23P01). This is the list the lane has to automate; every row was clean.

    Path Server Result
    migrations add, then a second one – the extension and the constraint; the second is empty
    migrations remove, has-pending-model-changes 18 sound
    database update, to 0, and up again 18 applied, the row refused
    migrations script, script --idempotent applied twice 16, 18 sound both times
    migrations bundle, run 18 applied, refused
    Migrate() at start-up, EnsureCreated() 16, 18 applied, refused
    AddDbContextPool, AddDbContextFactory, a web host through its DI 16, 18 applied, refused
    IDesignTimeDbContextFactory with a migrations assembly apart from the context's 16 sound, the second add empty
    dbcontext optimize, then every path again on the compiled model 18 the stamp and the declaration are in the generated code; sound
    AddEntityFrameworkSchemaKitNpgsql() with a caller-owned provider 18 sound
    ReplaceService<IMigrationsModelDiffer, …> before, and another package's differ 18 SchemaKit outermost, the other called as inner
    No UseSchemaKit(); the same with a compiled model, a design-time factory, a web host – refused at the declaration
    ReplaceService after; SchemaKit registered before the provider; a provider without SchemaKit's services – refused, each with its message
    The kernel's UseSchemaKit() alone on Npgsql – refused at the first diff ("no contributor with that owner is registered"), not at the declaration

    Two messages to look at when the lane is built:

    • The last row. UseNpgsql(cs).UseSchemaKit() compiles as soon as the kernel's namespace is in scope, the declaration passes on the kernel's stamp, and the refusal names the package, which the consumer already references, not the call that is missing.
    • A caller-owned provider without SchemaKit's services is told to call AddEntityFrameworkSchemaKit(). On Npgsql that leads to the same no-contributor refusal; AddEntityFrameworkSchemaKitNpgsql() is the call.

    Not in this run, and needed by the lane: a 5.x snapshot with a declared model and one more change, migrations add and migrations remove (#98).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/releasepackage/coretests

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions