Skip to content

Upgrade to Netgrif Platform 1.1.0 - #8

Open
tuplle wants to merge 9 commits into
mainfrom
platform-upgrade
Open

tuplle wants to merge 9 commits into
mainfrom
platform-upgrade

Conversation

@tuplle

@tuplle tuplle commented Nov 23, 2026

Copy link
Copy Markdown
Member

What this PR does

Replaces the single engine container (netgrif/application-engine-with-mcp:7.0.3)
with a full Netgrif Platform 1.1.0 cluster on NAE 7.1.0: admin, gateway, root
worker, search node, and the MCP server as a cluster plugin. It also updates the
documentation, the agent skills, and makes plugins the default way to extend the
platform.

Why

  • The engine-with-MCP image no longer matches how the platform is deployed
    (admin + gateway + workers + search node + plugin).
  • The MCP server belongs to the cluster as a plugin, not inside the engine image.
  • The new petriflow-mcp (1.1.x) requires appId on validate_process and adds
    validate_action and generate_app_manifest.
  • Java code called from actions belongs in a plugin (own container, own
    libraries); a module is the second choice.

Changes by area

1. Cluster in docker-compose.yaml

Service Image Port(s)
nae-admin docker.nexus.netgrif.com/netgrif-admin:1.1.0 127.0.0.1:8888, 127.0.0.1:9999
nae-gateway .../netgrif-gateway:1.1.0 8080→8800, 8800
nae-engine (root worker) .../netgrif-nae-worker:1.1.0 127.0.0.1:8082→8080
nae-search .../netgrif-search:1.1.0 8600, 9600 (gRPC)
nae-mcp-plugin .../netgrif-nae-mcp-plugin:1.0.0 127.0.0.1:8700
frontend netgrif/application-engine-frontend:7.1.0 4200
builder netgrif/application-builder:2.1.1-local 127.0.0.1:4300→8080
petriflow-mcp netgrif/petriflow-mcp:1.1.2 3000
init-perms, nae-mongodb, nae-elasticsearch, nae-redis images unchanged 27017, 9200/9300, 6379

Other compose changes:

  • the frontend no longer waits for the engine but for a healthy nae-gateway;
  • the gateway and search node wait for healthy nae-admin and nae-engine;
  • the MCP plugin waits for nae-admin + nae-engine and is bound to loopback
    (its /mcp is unauthenticated and acts as the admin account);
  • admin, gateway, worker and plugin get host.docker.internal:host-gateway;
  • one cluster zone local-zone through the YAML anchor x-cluster-zone
    (admin, gateway, search, worker and plugin);
  • the admin password as anchor x-admin-password
    (netgrif.admin.setup.admin.password);
  • the worker signs JWTs with netgrif.engine.security.jwt.private-key
    from nae/engine/certificates/private.der (new volume mount);
  • server-patterns and spring.ai.mcp.server.* are gone from the engine (the
    MCP server is no longer inside it); netgrif.engine.actions.imports and the
    health/otel settings are added;
  • .mcp.json: engine-mcp points to http://localhost:8700/mcp (was :8080).

Breaking for template users: the engine service is renamed to nae-engine
(docker compose logs/restart engine no longer works), the admin password is set
in netgrif.admin.setup.admin.password, the platform images come from the
private registry (docker login docker.nexus.netgrif.com), the RAM requirement
grows to 12–16 GB, and the frontend's Workflow upload is no longer the primary
way to deploy processes.

2. Documentation

  • README.md: new container and port tables, registry login, memory/disk
    requirements, a note on the unauthenticated MCP endpoint, deployment through
    deploy_process / an application package, plugins in the component overview.
  • AGENTS.md: the cluster as the baseline, health endpoints for
    admin/gateway/search/plugin, validate_process with appId,
    validate_action, application packages, a new Plugins section, modules
    only as the fallback, the known delete_user gap, rules for coexisting with
    other skills, and an extended Definition of done table (cluster config, plugin).
  • nae/README.md, modules/README.md, nae/engine/modules/README.md,
    processes/README.md: renamed commands, new ports, worker instead of engine,
    NAE 7.1.0 for modules, importing processes in a cluster.
  • plugins/README.md: new — the plugins/<artifactId>/ layout, build and run,
    and include: in the root compose.

3. Agent skills

  • write-plugin (new): a full playbook for a Netgrif Platform plugin
    (Spring Boot 4.1, plugin-client 1.1.0, nae-plugin-maven-plugin 1.0.2, the
    mandatory service profile), a plugin-vs-module decision table, and
    references/project-template.md with a verified pom.xml, compose.yaml,
    Dockerfile and entry-point layout.
  • generate-process: new "Rules no request overrides" (architecture before
    XML, validate_process even when the user asks to skip it); the modeling
    principles rewritten from P1–P9 to M1 static atomicity, M2 dynamic
    atomicity, M3 cohesion, M4 object communication
    plus complementary R1–R6
    and coupling levels U1–U6; a new architecture decision table; a channel as a
    user transition → system transition with caseRef/taskRef;
    list_components/get_component for form fields; extended common mistakes.
  • generate-process/references/modeling-principles.md: full rewrite
    (PCC/PCO vocabulary, a step-by-step tutor-assignment decomposition, the review
    checklist).
  • generate-process/test/test-plan.md: new scenarios and an extended
    procedure for testing the skill.
  • test-process: Stage 1 with appId, Stage 2 against the cluster on
    :8700, default worker NETGRIF Root Worker, upload_application +
    deploy_application, get_task shape in the plugin runtime, the ~5 s wait
    after replaceExisting, and the test-user deletion limitation.
  • generate-action: validate_action before the action goes into the XML.
  • generate-menu-import, write-module: NAE 7.1.0 (Menu API line
    numbers, ../application-engine at tag v7.1.0), module as the fallback.

4. JWT key for the local cluster

  • nae/engine/certificates/{keypair.pem,private.der,public.crt} — a development
    RSA key for JWT signing in the root worker, mounted into nae-engine.

How to verify

  1. docker login docker.nexus.netgrif.com, then docker compose config and
    docker compose up -d.
  2. Health: admin :8888, gateway :8080, search :8600, plugin :8700
    (worker :8082 for debugging only) → all UP.
  3. list_nodes over engine-mcp returns NETGRIF Admin, NETGRIF Root Worker
    and Netgrif Gateway, all RUNNING.
  4. Log in at http://localhost:4200 as admin with the password from compose
    (netgrif.admin.setup.admin.password).
  5. Deploy processes/hello_world/hello_world.xml with deploy_process (worker
    NETGRIF Root Worker), or as an application package, and walk through a case.
  6. validate_process with appId and validate_action on the example process
    and action.

Notes for reviewers

  • The platform images are private (Netgrif registry); frontend, MCP and the
    databases stay on Docker Hub.
  • Test users cannot be deleted in this runtime (the admin REST API has no
    user-delete route) — documented in AGENTS.md, tracked in TODOs.md.
  • Keep the platform versions (admin, gateway, worker, frontend) aligned; the MCP
    plugin version is independent.

- compose: add nae-admin 1.1.0 and nae-gateway 1.1.0, run the root worker
  from netgrif-nae-worker 1.1.0, add nae-mcp-plugin 1.0.0; bump the
  frontend to 7.1.0 and petriflow-mcp to 1.1.1
- omit nae-search for single-worker local development
- publish the gateway on 8080 and 8800 so the frontend reaches it through
  either nae.json or gateway_url; bind admin, worker, plugin and builder
  to loopback
- point engine-mcp at the plugin on localhost:8700
- update AGENTS.md and skills for the cluster: delete_user limitation,
  validate_process appId, validate_action, application packages, NAE 7.1.0
  menu API, per-worker modules
- document the new ports, registry login, admin password and memory needs;
  track the admin user-delete endpoint in TODOs.md
@tuplle
tuplle requested a review from petrovicLubos November 23, 2026 22:42
@gitguardian

gitguardian Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
40802344 Triggered Generic Private Key 36345b2 nae/engine/certificates/keypair.pem View secret
41125287 Triggered Generic High Entropy Secret 73e5221 docker-compose.yaml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@petrovicLubos

Copy link
Copy Markdown
Contributor

Tried the PR end to end on a local cluster, twice on 24 Nov 2026: first on an existing setup, then from a fresh clone of the branch with all images pulled again, building a real app (invoices & orders) from a business requirements document. Covered: realm app-users, test users per role, admin roles step, memory limits, menu and dashboard imports. The realm and admin-roles changes work well, and handing over test users per role is a big improvement. Issues found, each reproduced:

  1. The template in generate-dashboard-items/references/dashboard-api.md does not pass validate_action (petriflow-mcp 1.1.2), seen again on the fresh clone:
    Cannot find matching constructor java.util.LinkedHashMap(java.lang.Object) at new LinkedHashMap(dashboardCase.dataSet["dashboard_item_list"].options ?: [:]).
    Fix: new LinkedHashMap((Map) (dashboardCase.dataSet["dashboard_item_list"].options ?: [:])). The reference also says the template was never compiled.

  2. replaceExisting deletes data, but test-process recommends it for every iteration. Redeploying a process with replaceExisting: true deletes all its cases and the menu items whose views point to it (menu_item, filters, view configurations). Elasticsearch keeps their documents, so after that menu folders show "This view has no filter" and the frontend login stops working until the menu import is deployed again and the stale index documents are removed. Suggest a warning in test-process (redeploy menu and dashboard imports afterwards), and deleting the index documents together with the cases.

  3. actorList cannot hold users of the realm app-users. Setting a user id of an app-users user (as the frontend's user picker does) fails in DataService.makeActorFieldValue: the user is not found, the id is then looked up as a group and the admin throws Group [...] does not exist. The value is not saved, so an actorRef to specific users of the app cannot be set up. The user's personal group id works as a workaround. Since the PR moves all app users to app-users, this blocks every process that assigns work to named users.

  4. The frontend logs users of app-users out right after login. With the current netgrif/application-engine-frontend:7.1.0 build, login (POST with X-Realm-Id) succeeds, but the session check uses GET /api/auth/login, which the admin answers with 405, so the user is sent back to the login page. Workaround: nginx replaces the bundle's built-in providers block with the one the admin publishes at /api/frontend-config/public/nae/default (it has the verify endpoint). The bundle is served with expires max, so browsers keep the old main.js until its URL changes.

  5. The realm tools need a newer image under the same tag. list_realms, create_realm, switch_realm, list_process_roles, list_global_roles exist only in the current build of docker.nexus.netgrif.com/netgrif-nae-mcp-plugin:1.0.0. An image pulled earlier under the same tag (digest 7d6d6fa3…) has none of them, and docker compose up does not pull again, so AGENTS.md and test-process point to tools that are missing. The same applies to netgrif/application-engine-frontend:7.1.0: only the new build has 40-env.sh / env.js with DEFAULT_REALM and the X-Realm-Id header; the old one ignores DEFAULT_REALM. Suggest new tags (or pull_policy: always plus a note in the README).

  6. Dashboard skill describes NAE 7.0.3, behaviour differs on 7.1.0. With inheritIcon / inheritName the created dashboard_item has an empty item_icon, and item_name holds only the default value without the menu item's translations (checked in MongoDB), so the tile has no icon. The skill's compatibility line still says engine-mcp at http://localhost:8080/mcp (now :8700), and the source references point to tag v7.0.3.

  7. A menu item with setAutoSelect(true) hides the dashboard. After login the double drawer auto-opens that item (openAvailableView), so main_dashboard is never shown. Worth a line in generate-menu-import / generate-dashboard-items: no auto-select when the app has a dashboard.

  8. deploy_process of a menu or dashboard import times out over MCP, and the upload action keeps running. A menu import with ~20 items returns Read timed out after 30 s while its action needs about 2 more minutes; a dashboard import deployed right after it fails with menu item ... not found after 5 attempts, because the menu items do not exist yet. test-process could say to wait until the menu items exist (and check list_processes) after a timeout instead of retrying or moving on.

  9. Errors come back as HTTP 200. When a finish action throws, the task stays unfinished (good), but the REST API and finish_task / set_data_at_task answer 200 with {"error": ...} in the body. A test script or agent that checks only the status code reports success. test-process should check the body.

  10. Admin in the frontend gets only "Wrong credentials". After DEFAULT_REALM=app-users the admin account cannot sign in at :4200 and nothing explains why. The README covers it, but a hint on the login screen or in the hand-off ("admin → :8888") would save confusion.

Fixed since my first run: netgrif.engine.dashboard.enabled is now set for nae-engine in docker-compose.yaml.

@tuplle tuplle changed the title Upgrade to Netgrif Platform 1.1.1 Upgrade to Netgrif Platform 1.1.0 Nov 26, 2026
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.

2 participants