Skip to content

audit add-on: two silent no-ops (entity name must match metamodel, config is cached) #40

Description

@fractal3000

Enabling the audit log took three deploys, and every failure was silent.

(a) Entity names must match the metamodel exactly, and a mismatch is indistinguishable
from "not logged on purpose."
I registered app_Document; the metamodel name is
Document (no prefix — the same name used in JPQL). Nothing threw. LoggedEntity rows were
created, the screen showed them, and no entity was ever logged. There is no validation
because "unknown entity name" and "this entity is deliberately not logged" look identical.

(b) EntityLog caches its configuration at startup. Configuring logging
programmatically (in ApplicationStartedEvent) writes rows the module has already read
past. The log stays empty until the NEXT restart. Fix: entityLog.invalidateCache() after
writing the configuration.

Neither is discoverable by any gate: the application starts, the screens open, the tests
pass. The only check that finds it is: perform an action, then query
AUDIT_ENTITY_LOG and assert a row appeared.
That belongs in jmix-verify-bootrun as the
verification step for any feature whose output is a side effect rather than a screen.


Found while building a real Jmix 2.8 application (document registry, Vaadin UI, PostgreSQL, deployed behind nginx).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions