Skip to content

ide-workspace: a project descriptor without an actions section is not an error (#7286) - #7334

Merged
iliyan-velichkov merged 1 commit into
masterfrom
issue-7286-actions-service-log-level
Sep 11, 2026
Merged

ide-workspace: a project descriptor without an actions section is not an error (#7286)#7334
iliyan-velichkov merged 1 commit into
masterfrom
issue-7286-actions-service-log-level

Conversation

@iliyan-velichkov

Copy link
Copy Markdown
Contributor

Cause

A project.json that omits the actions key is the normal case - every intent-generated project, every sample, every hand-written descriptor that declares only a guid and its dependencies. (A project created through the IDE gets "actions": [] from project.json_, which is an empty list, not a missing key - so the ones that trip this are exactly the authored and generated descriptors.)

ActionsService logged that at ERROR from both of its read sites, and ProjectActionsPublisherHandler reads them both on every publish - listRegisteredActions in beforePublishProject and again in afterPublishProject - so one Publish of one such project emitted two ERROR lines. Nothing had failed and nothing was retried; an ERROR in the Logs view should mean something went wrong. The message also concatenated the project name instead of using an SLF4J {} placeholder.

Change

  • listRegisteredActions says nothing at all. An empty list is its documented return and the caller iterates it either way, so there is no event here to report.
  • executeAction keeps a line - the caller did ask for an action by name - but at debug, with a placeholder.

Return values are unchanged on both paths; this is a logging change only.

Verification

  • New regression test ActionsServiceTest#projectWithoutActionsSectionIsNotAnError: creates a descriptor without an actions section, exercises both read paths, and asserts the service logs nothing at ERROR. Run against the unfixed service it fails with both messages captured -

    AssertionFailedError: unexpected error logged: [Actions section not found in the project descriptor file: TestProject2,
                                                    Actions section not found in the project descriptor file: TestProject2]
    

    and passes with the change.

  • mvn -pl components/ide/ide-workspace test - green, 35 tests.

  • mvn -T 1C formatter:validate with the formatter cache wiped first - BUILD SUCCESS.

  • CamelDirigibleJavaScriptComponentHttpRouteIT (a publish-exercising integration test) - green.

Not verified: no Chrome-driven UI IT was run - the local chromedriver does not match the installed Chrome, and the unit test is the direct and permanent witness for a logging change. The repository was grepped for other occurrences of this message shape; the two lines changed here are the only ones.

Fixes #7286

🤖 Generated with Claude Code

… an error (#7286)

A `project.json` that omits the `actions` key is the normal case - every
intent-generated project, every sample, every hand-written descriptor that
declares only a guid and its dependencies. `ActionsService` logged it at ERROR
from both of its read sites, so a single Publish emitted two of these lines
(`ProjectActionsPublisherHandler` calls `listRegisteredActions` in
`beforePublishProject` and again in `afterPublishProject`), and a CI shard
publishing a handful of projects filled the Logs view with them. Nothing had
failed and nothing was retried. The message also concatenated the project name
instead of using an SLF4J `{}` placeholder.

`listRegisteredActions` now says nothing: an empty list is its documented
return, and the caller iterates it either way. `executeAction` keeps a line -
the caller asked for an action by name - but at `debug`, with a placeholder.
Return values are unchanged on both paths.

Verified: `ActionsServiceTest#projectWithoutActionsSectionIsNotAnError` is a new
regression test that publishes a descriptor without an actions section and
asserts the service logs nothing at ERROR; against the unfixed service it fails
with both messages captured, and passes with the change. The ide-workspace unit
suite is green (35 tests), `mvn -T 1C formatter:validate` is green with the
formatter cache wiped, and `CamelDirigibleJavaScriptComponentHttpRouteIT` (a
publish-exercising integration test) is green.

Fixes #7286

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
List<ProjectAction> actions = projectJson.getActions();
if (actions == null) {
logger.error("Actions section not found in the project descriptor file: " + project);
logger.debug("No actions section in the project descriptor file of project [{}]", project);
@iliyan-velichkov
iliyan-velichkov merged commit 6587ea6 into master Sep 11, 2026
10 checks passed
@iliyan-velichkov
iliyan-velichkov deleted the issue-7286-actions-service-log-level branch September 11, 2026 13:26
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.

ide-workspace: ActionsService logs ERROR for a project descriptor without an actions section

2 participants