Skip to content

refactor(os-update): rename the row of an update on a device to OsUpdateOnDevice CU-17tkuw67mjh - #3348

Merged
semen-flamingo merged 1 commit into
mainfrom
feat/os-update-on-device-rename
Dec 4, 2026
Merged

semen-flamingo merged 1 commit into
mainfrom
feat/os-update-on-device-rename

refactor(os-update): rename the row of an update on a device to OsUpd…

a7fe338
Select commit
Loading
Failed to load commit list.
Flamingo / flamingo Code Review completed Dec 4, 2026 in 0s

flamingo Code Review: neutral

5 findings: 🔴 1 action required · 🟠 0 recommended · 🔵 4 informational

Advisory: findings do not block the merge.

  • 🔴 Action required · error · openframe-api-service-core/src/main/resources/schema/os-update.graphqls:165: GraphQL schema renames OsUpdateDeviceStatus/Connection/Edge/OsUpdateDevice with no deprecation alias for existing clients
  • 🔵 Informational · info · Pre-existing: this pull request did not introduce it · OFJAVA-002 · openframe-api-lib/src/main/java/com/openframe/api/service/rmm/osupdate/OsUpdateOnDeviceService.java:110: CursorCodec.encode(rawCursor) is called inside the toDeviceResponse argument list
  • 🔵 Informational · info · Pre-existing: this pull request did not introduce it · OFJAVA-002 · openframe-api-lib/src/main/java/com/openframe/api/service/rmm/osupdate/OsUpdateOnDeviceService.java:80: sortInput.getField() is called inside the isBlank(...) argument list in toOsUpdateSort
  • 🔵 Informational · info · Pre-existing: this pull request did not introduce it · OFJAVA-002 · openframe-api-lib/src/main/java/com/openframe/api/service/rmm/osupdate/OsUpdateOnDeviceService.java:55: findPage receives nested getCursor()/getLimit() calls as arguments
  • 🔵 Informational · info · Pre-existing: this pull request did not introduce it · OFJAVA-002 · openframe-data-mongo-sync/src/main/java/com/openframe/data/repository/rmm/osupdate/CustomOsUpdateOnDeviceRepositoryImpl.java:136: sort.getField() called inside Criteria.where(...) argument list in findRowsWithoutValue

Annotations

Check failure on line 165 in openframe-api-service-core/src/main/resources/schema/os-update.graphqls

See this annotation in the file changed.

@flamingo flamingo / flamingo Code Review

GraphQL schema renames OsUpdateDeviceStatus/Connection/Edge/OsUpdateDevice with no deprecation alias for existing clients

GraphQL schema renames OsUpdateDeviceStatus/Connection/Edge/OsUpdateDevice with no deprecation alias for existing clients

The diff renames four published GraphQL type names in os-update.graphqls: the enum `OsUpdateDeviceStatus` → `OsUpdateOnDeviceStatus`, and the types `OsUpdateDeviceConnection`/`OsUpdateDeviceEdge`/`OsUpdateDevice` → `OsUpdateOnDevice*`. GraphQL type names are part of the wire contract: any client query that names them (inline fragments, named fragments `on OsUpdateDevice`, `$status: OsUpdateDeviceStatus!` variable declarations, generated TS types) stops validating. A grep of this repository (no hits for `OsUpdateDeviceStatus|OsUpdateDeviceConnection|OsUpdateDeviceEdge` outside the diff) confirms nothing in-repo still references them, but the graph lists OpenFrame OSS Frontend as a consumer of this repo's published frontend-core package, and GraphQL documents there are not visible to me — that is what is left to check.

**What it risks:** Frontend queries/fragments or codegen artifacts naming the old types fail GraphQL validation at runtime after deploy, breaking the OS-update device list and status filter for all tenants.

**How to fix:** Either land this rename together with the frontend change in the same release, or keep the old names as deprecated aliases in the schema for one release cycle; confirm no deployed client document references the old type names.

Check notice on line 110 in openframe-api-lib/src/main/java/com/openframe/api/service/rmm/osupdate/OsUpdateOnDeviceService.java

See this annotation in the file changed.

@flamingo flamingo / flamingo Code Review

CursorCodec.encode(rawCursor) is called inside the toDeviceResponse argument list

CursorCodec.encode(rawCursor) is called inside the toDeviceResponse argument list

OFJAVA-002 forbids calling a method inside another call's argument list (CI-enforced by PMD NoMethodCallAsArgument). In the new openframe-api-lib OsUpdateOnDeviceService#toResponse the encoded cursor is produced inline as the third argument of osUpdateResponseMapper.toDeviceResponse; it must be extracted to a named local first.

**What it risks:** The PMD rule is priority 1 and fails the build, so the module will not pass CI; debugging the cursor value also has no line to break on.

**How to fix:** Assign CursorCodec.encode(rawCursor) to a named local (e.g. cursor) and pass that variable.

Check notice on line 83 in openframe-api-lib/src/main/java/com/openframe/api/service/rmm/osupdate/OsUpdateOnDeviceService.java

See this annotation in the file changed.

@flamingo flamingo / flamingo Code Review

sortInput.getField() is called inside the isBlank(...) argument list in toOsUpdateSort

sortInput.getField() is called inside the isBlank(...) argument list in toOsUpdateSort

OFJAVA-002 requires every method call to be extracted into a named local before being passed as an argument; here sortInput.getField() is invoked inside isBlank(...) in the new OsUpdateOnDeviceService of openframe-api-lib. The same compound condition also mixes a null check with the blank check, which OFJAVA-007 wants behind a named predicate.

**What it risks:** PMD NoMethodCallAsArgument (priority 1) fails the build for this module.

**How to fix:** Read the requested field into a local (null-safe) and test that local with isBlank, then trim the local.

Check notice on line 57 in openframe-api-lib/src/main/java/com/openframe/api/service/rmm/osupdate/OsUpdateOnDeviceService.java

See this annotation in the file changed.

@flamingo flamingo / flamingo Code Review

findPage receives nested getCursor()/getLimit() calls as arguments

findPage receives nested getCursor()/getLimit() calls as arguments

OFJAVA-002 forbids method calls in an argument list; listDevices in the new openframe-api-lib OsUpdateOnDeviceService passes normalizedPagination.getCursor() and normalizedPagination.getLimit() + 1 directly into osUpdateOnDeviceRepository.findPage.

**What it risks:** PMD NoMethodCallAsArgument fails the build, and the fetch-size (+1) has no named value a reader or debugger can inspect.

**How to fix:** Extract the cursor and the fetch limit into named locals before calling findPage.

Check notice on line 136 in openframe-data-mongo-sync/src/main/java/com/openframe/data/repository/rmm/osupdate/CustomOsUpdateOnDeviceRepositoryImpl.java

See this annotation in the file changed.

@flamingo flamingo / flamingo Code Review

sort.getField() called inside Criteria.where(...) argument list in findRowsWithoutValue

sort.getField() called inside Criteria.where(...) argument list in findRowsWithoutValue

OFJAVA-002 forbids calling a method inside another call's argument list; the sibling method findRowsWithValue extracts `String sortField = sort.getField();` first, while this new line passes the call directly into Criteria.where(...). This is CI-enforced by PMD NoMethodCallAsArgument.

**What it risks:** The PMD rule is priority 1 and fails the build, blocking the module.

**How to fix:** Extract the sort field into a named local before building the criteria.