Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dist): remove confusing actuator config that doesn't work #12205

Merged
3 commits merged into from
Apr 3, 2023

Conversation

lenaschoenburg
Copy link
Member

@lenaschoenburg lenaschoenburg commented Mar 31, 2023

This removes two properties from our default properties because they are confusing and did not work as expected.

management.endpoint.<id>.enabled appears to only work for built-in actuators and not for our custom ones.

This is not new and I suspect that this never worked as expected. For 8.1 we can see that the backup actuator was available even when it was supposed to be disabled by default:

$ docker run --rm -p 9600:9600 camunda/zeebe:8.1.0
$ curl localhost:9600/actuator | jq '._links."backups-id"'
{
  "href": "http://localhost:9600/actuator/backups/{id}",
  "templated": true
}

Similar for the partitions endpoint on 1.3 which was supposed to be enabled by default but should be disabled when setting MANAGEMENT_ENDPOINTS_PARTITIONS_ENABLED=false:

$ docker run --rm -p 9600:9600 -e MANAGEMENT_ENDPOINTS_PARTITIONS_ENABLED=false camunda/zeebe:1.3.0
$ curl localhost:9600/actuator | jq '._links.partitions'
{
  "href": "http://localhost:9600/actuator/partitions",
  "templated": false
}

Here we can see that this endpoint exists anyway.

I can't find any references to this but I suspect that the enable flags only work for built-in actuators. We can still control which actuators are available by configuring MANAGEMENT_ENDPOINTS_WEB_EXPOSURE_INCLUDE which actually does work as expected.

This removes two properties from our default properties because they are
confusing and did not work as expected.

`management.endpoint.<id>.enabled` appears to only work for built-in
actuators and not for our custom ones.
@github-actions
Copy link
Contributor

github-actions bot commented Mar 31, 2023

Test Results

1 047 files  ±    0  1 047 suites  ±0   1h 56m 58s ⏱️ - 3m 42s
8 704 tests +359  8 682 ✔️ +359  22 💤 ±0  0 ±0 
8 912 runs  +359  8 890 ✔️ +359  22 💤 ±0  0 ±0 

Results for commit ad07619. ± Comparison against base commit 705712c.

This pull request removes 451 and adds 810 tests. Note that renamed tests count towards both.
io.camunda.zeebe.engine.processing.bpmn.activity.OutputMappingTest ‑ shouldApplyOutputMapping[0: io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@23339a25]
io.camunda.zeebe.engine.processing.bpmn.activity.OutputMappingTest ‑ shouldApplyOutputMapping[1: io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@37994ff]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=BUSINESS_RULE_TASK, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@4ca3e806, variables={}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=CALL_ACTIVITY, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@1e1c1634, variables={}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=END_EVENT, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@78333d5a, variables={}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=EVENT_BASED_GATEWAY, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@5b1b5daf, variables={correlationKey=value}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=EVENT_SUB_PROCESS, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@79a7f553, variables={}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=EXCLUSIVE_GATEWAY, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@60af08b2, variables={}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=INTERMEDIATE_CATCH_EVENT, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@2a85e4f4, variables={correlationKey=value}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=INTERMEDIATE_THROW_EVENT, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@3b3fa4c0, variables={}]]
…
io.camunda.zeebe.engine.processing.bpmn.activity.OutputMappingTest ‑ shouldApplyOutputMapping[0: io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@77d86aba]
io.camunda.zeebe.engine.processing.bpmn.activity.OutputMappingTest ‑ shouldApplyOutputMapping[1: io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@21975a54]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=BUSINESS_RULE_TASK, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@71a9e31b, variables={}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=CALL_ACTIVITY, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@7bcd497, variables={}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=END_EVENT, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@6fb9dab6, variables={}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=EVENT_BASED_GATEWAY, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@28a821f9, variables={correlationKey=value}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=EVENT_SUB_PROCESS, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@627a1c77, variables={}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=EXCLUSIVE_GATEWAY, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@1a26eecb, variables={}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=INTERMEDIATE_CATCH_EVENT, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@1acfb04c, variables={correlationKey=value}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=INTERMEDIATE_THROW_EVENT, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@a683f92, variables={}]]
…

♻️ This comment has been updated with latest results.

Copy link
Contributor

@deepthidevaki deepthidevaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 Thanks for finding this issue.

Should we also remove param enableByDefault ?https://github.com/camunda/zeebe/blob/6d90738510da7327f8dc9fd7edc354f39ea37663/dist/src/main/java/io/camunda/zeebe/shared/management/BackupEndpoint.java#L43 ? It also doesn't seems to have any impact.

@lenaschoenburg
Copy link
Member Author

@deepthidevaki Oh right, good point 👍

@lenaschoenburg
Copy link
Member Author

bors r+

ghost pushed a commit that referenced this pull request Apr 3, 2023
12205: fix(dist): remove confusing actuator config that doesn't work r=oleschoenburg a=oleschoenburg

This removes two properties from our default properties because they are confusing and did not work as expected.

`management.endpoint.<id>.enabled` appears to only work for built-in actuators and not for our custom ones.

This is not new and I suspect that this never worked as expected. For 8.1 we can see that the backup actuator was available even when it was [supposed to be disabled](https://github.com/camunda/zeebe/blob/clients/go/v8.1.0/dist/src/main/resources/application.properties#L30) by default: 
```shell
$ docker run --rm -p 9600:9600 camunda/zeebe:8.1.0
$ curl localhost:9600/actuator | jq '._links."backups-id"'
{
  "href": "http://localhost:9600/actuator/backups/{id}",
  "templated": true
}
```

Similar for the partitions endpoint on 1.3 which was supposed to be enabled by default but should be disabled when setting `MANAGEMENT_ENDPOINTS_PARTITIONS_ENABLED=false`:

```shell
$ docker run --rm -p 9600:9600 -e MANAGEMENT_ENDPOINTS_PARTITIONS_ENABLED=false camunda/zeebe:1.3.0
$ curl localhost:9600/actuator | jq '._links.partitions'
{
  "href": "http://localhost:9600/actuator/partitions",
  "templated": false
}
```

Here we can see that this endpoint exists anyway.


I can't find any references to this but I suspect that the enable flags only work for built-in actuators. We can still control which actuators are available by configuring `MANAGEMENT_ENDPOINTS_WEB_EXPOSURE_INCLUDE` which actually does work as expected.


Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
@lenaschoenburg
Copy link
Member Author

bors r-

@ghost
Copy link

ghost commented Apr 3, 2023

Canceled.

Setting this annotation value apparently has no effect so we remove it
here to avoid confusion.
@lenaschoenburg lenaschoenburg force-pushed the os-remove-broken-endpoint-config branch from 92dfbbd to b135979 Compare April 3, 2023 07:46
@lenaschoenburg
Copy link
Member Author

bors r+

@deepthidevaki
Copy link
Contributor

@oleschoenburg We should also backport this to release branch.

@lenaschoenburg lenaschoenburg force-pushed the os-remove-broken-endpoint-config branch from b135979 to ad07619 Compare April 3, 2023 07:59
@ghost
Copy link

ghost commented Apr 3, 2023

Canceled.

@lenaschoenburg
Copy link
Member Author

bors r+

@ghost
Copy link

ghost commented Apr 3, 2023

Build succeeded:

@ghost ghost merged commit 1c8091e into main Apr 3, 2023
@ghost ghost deleted the os-remove-broken-endpoint-config branch April 3, 2023 08:22
@backport-action
Copy link
Collaborator

Successfully created backport PR for release-8.2.0:

ghost pushed a commit that referenced this pull request Apr 3, 2023
12214: [Backport release-8.2.0] fix(dist): remove confusing actuator config that doesn't work r=oleschoenburg a=backport-action

# Description
Backport of #12205 to `release-8.2.0`.

relates to 

Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
@npepinpe npepinpe added the version:8.2.0 Marks an issue as being completely or in parts released in 8.2.0 label Apr 5, 2023
github-merge-queue bot pushed a commit that referenced this pull request Aug 9, 2024
…r-plugin to v3.13.0 (#12205)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version:8.2.0 Marks an issue as being completely or in parts released in 8.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants