Skip to content

Commit ecf0c58

Browse files
committed
cleanup
1 parent 67098eb commit ecf0c58

File tree

5 files changed

+3
-17
lines changed

5 files changed

+3
-17
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8-
## v2.0.2 - 2025-11-XX
8+
## v2.0.2 - 2025-12-01
99

1010
### Added
1111

srv/service/admin-service.cds

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ service EventQueueAdminService {
1212
*
1313
} actions {
1414
action setStatusAndAttempts(
15-
// TODO: remove tenant as soon as CAP issue is fixed https://github.tools.sap/cap/issues/issues/18445
16-
@mandatory
17-
tenant: String,
1815
status: db.Status,
1916
@assert.range: [0,100]
2017
attempts: Integer) returns Event;
@@ -31,9 +28,6 @@ service EventQueueAdminService {
3128
createdAt: Integer;
3229
} actions {
3330
action releaseLock(
34-
// TODO: remove tenant as soon as CAP issue is fixed https://github.tools.sap/cap/issues/issues/18445
35-
@mandatory
36-
tenant: String,
3731
@mandatory
3832
type: String,
3933
@mandatory

srv/service/admin-service.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ module.exports = class AdminService extends cds.ApplicationService {
9393
});
9494

9595
this.on("releaseLock", async (req) => {
96+
const tenant = req.headers["z-id"];
9697
cds.log("eventQueue").info("Releasing event-queue lock", req.data);
97-
const { tenant, type, subType, namespace } = req.data;
98+
const { type, subType, namespace } = req.data;
9899
return await cds.tx({ tenant }, async (tx) => {
99100
return await distributedLock.releaseLock(tx.context, [namespace, type, subType].join("##"), {
100101
skipNamespace: true,

test/__snapshots__/admin-service.test.js.snap

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,12 @@ exports[`admin-service-test metadata snapshot 1`] = `
6666
</EntityType>
6767
<Action Name="setStatusAndAttempts" IsBound="true" EntitySetPath="in">
6868
<Parameter Name="in" Type="EventQueueAdminService.Event"/>
69-
<Parameter Name="tenant" Type="Edm.String"/>
7069
<Parameter Name="status" Type="Edm.Int32"/>
7170
<Parameter Name="attempts" Type="Edm.Int32"/>
7271
<ReturnType Type="EventQueueAdminService.Event"/>
7372
</Action>
7473
<Action Name="releaseLock" IsBound="true">
7574
<Parameter Name="in" Type="EventQueueAdminService.Lock"/>
76-
<Parameter Name="tenant" Type="Edm.String"/>
7775
<Parameter Name="type" Type="Edm.String"/>
7876
<Parameter Name="subType" Type="Edm.String"/>
7977
<ReturnType Type="Edm.Boolean"/>
@@ -144,9 +142,6 @@ exports[`admin-service-test metadata snapshot 1`] = `
144142
<Annotations Target="EventQueueAdminService.Event/createdAt">
145143
<Annotation Term="Core.Computed" Bool="true"/>
146144
</Annotations>
147-
<Annotations Target="EventQueueAdminService.setStatusAndAttempts(EventQueueAdminService.Event)/tenant">
148-
<Annotation Term="Common.FieldControl" EnumMember="Common.FieldControlType/Mandatory"/>
149-
</Annotations>
150145
<Annotations Target="EventQueueAdminService.setStatusAndAttempts(EventQueueAdminService.Event)/status">
151146
<Annotation Term="Validation.AllowedValues">
152147
<Collection>
@@ -198,9 +193,6 @@ exports[`admin-service-test metadata snapshot 1`] = `
198193
</Record>
199194
</Annotation>
200195
</Annotations>
201-
<Annotations Target="EventQueueAdminService.releaseLock(EventQueueAdminService.Lock)/tenant">
202-
<Annotation Term="Common.FieldControl" EnumMember="Common.FieldControlType/Mandatory"/>
203-
</Annotations>
204196
<Annotations Target="EventQueueAdminService.releaseLock(EventQueueAdminService.Lock)/type">
205197
<Annotation Term="Common.FieldControl" EnumMember="Common.FieldControlType/Mandatory"/>
206198
</Annotations>

test/admin-service.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ describe("admin-service-test", () => {
102102
const { ID } = response.data.value[0];
103103

104104
const responseSetStatus = await POST(`/odata/v4/event-queue/admin/Event/${ID}/setStatusAndAttempts`, {
105-
tenant: "local-dummy",
106105
status: eventQueue.EventProcessingStatus.Done,
107106
attempts: 1,
108107
});

0 commit comments

Comments
 (0)