Skip to content

Standalone Console API & user feedback improvements#9847

Merged
philipsens merged 6 commits intomasterfrom
issue/9794-when-not-hazelcast-members-you-see-no-answer-found-on-temporary-queue
Nov 10, 2025
Merged

Standalone Console API & user feedback improvements#9847
philipsens merged 6 commits intomasterfrom
issue/9794-when-not-hazelcast-members-you-see-no-answer-found-on-temporary-queue

Conversation

@Matthbo
Copy link
Member

@Matthbo Matthbo commented Nov 4, 2025

No description provided.

@Matthbo Matthbo requested a review from a team as a code owner November 4, 2025 16:43
@Matthbo Matthbo self-assigned this Nov 4, 2025
@Matthbo Matthbo force-pushed the issue/9794-when-not-hazelcast-members-you-see-no-answer-found-on-temporary-queue branch from 9313838 to 446b85a Compare November 5, 2025 14:18
Copy link
Contributor

@evandongen evandongen left a comment

Choose a reason for hiding this comment

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

Mooi werk! Paar dingen toegevoegd, daar kunnen we evt samen nog even naar kijken als je wilt.


@Scheduled(fixedDelayString = "${console.socket.poller.warnings}", timeUnit = TimeUnit.SECONDS, initialDelayString = "${console.socket.poller.startDelay}")
public void serverWarnings() {
if (hasNoAvailableWorker()) return;
Copy link
Contributor

Choose a reason for hiding this comment

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

Ik vind dit (zeker zonder accolades) niet echt lekker lezen. Kan je het omdraaien?

Bv:

	if (hasAvailableWorker()) {
		// doe dingen
	}

@Override
public final void afterPropertiesSet() {
environment = applicationContext.getEnvironment();
clusterMembers = getGateway().getMembers().stream()
Copy link
Contributor

Choose a reason for hiding this comment

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

Is de lijst van clusterMembers altijd vast of wil je dat dynamisch bepalen?

Copy link
Member Author

Choose a reason for hiding this comment

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

De lijst past zich aan zodra een nieuwe member zich aan- of afmeld via hazelcast, het is dus een momentopname

private List<SecurityRolesDTO> getSecurityRoles() {
return BusMessageUtils.getAuthorities()
.stream()
.map(authority -> new SecurityRolesDTO(authority.getAuthority().substring(5)))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.map(authority -> new SecurityRolesDTO(authority.getAuthority().substring(5)))
.map(SecurityRolesDTO::new)

Comment on lines +81 to +84
public SecurityRolesDTO(String role) {
this.name = role;
this.allowed = BusMessageUtils.hasRole(role);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

En dan hier:

Suggested change
public SecurityRolesDTO(String role) {
this.name = role;
this.allowed = BusMessageUtils.hasRole(role);
}
public SecurityRolesDTO(GrantedAuthority authority) {
this.name = authority.getAuthority().substring(5);
this.allowed = BusMessageUtils.hasRole(this.name);
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Oooh ja, dit ziet er natuurlijk een stuk netter uit :D

Map<String, Object> emptyMap = Map.of();
List<Object> emptyList = List.of();
returnMap.put("securityRoles", getSecurityRoles());
returnMap.put("jmsRealms", emptyMap);
Copy link
Contributor

Choose a reason for hiding this comment

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

Ik zou hier gewoon iedere keer Map.of() meegeven. Dat is sowieso altijd al een referentie naar hetzelfde object: java.util.ImmutableCollections#EMPTY_MAP

zelfde voor list.

Copy link
Member Author

Choose a reason for hiding this comment

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

Dat wist ik niet, ik had verwacht dat elke .of() een nieuw object in memory zou stoppen

this.expiringCertificates = data.expiringCertificates;
},
error: (error: HttpErrorResponse) => {
if (error.status === 503) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Heb je hier nou echt de hele map nodig uit org.frankframework.console.controllers.SecurityItems#getUnavailableSecurityItems?

Copy link
Member Author

Choose a reason for hiding this comment

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

Dit zou inderdaad wat mooier kunnen als we er vanuit gaan dat alles optioneel kan zijn.
Het is op dit moment ook nog onduidelijk of we bepaalde properties wel via dit endpoint willen laten lopen en niet afsplitsen en een nieuwe pagina op de frontend maken.
Omdat dit nog op tafel ligt dacht ik dat het beste was om niet al te veel dit om te gooien


}

private ResponseErrorHandler ignoreErrorHandler() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Kan je toelichten waarom je dit gebruikt in een comment?

return frankApiService.callSyncGateway(RequestMessageBuilder.create(BusTopic.HEALTH));
}

private Map<String, Object> getUnavailableServerInformation() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Hoe langer ik er naar kijk, hoe meer ik me afvraag of dit wel de juiste oplossing is. Waarom doe je dit hier (en in SecurityItems)? Heeft de frontend echt al deze lege attributen nodig?

Copy link
Member Author

Choose a reason for hiding this comment

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

De frontend verwacht dat het hele object er niet of wel is, in een normale scenario kan je daar van uitgaan aangezien het verplichte informatie is.
Maar omdat er nu geen ff worker instantie draait heeft het dus placeholders nodig hier of veel meer checks in de frontend voor optionele properties

Copy link
Contributor

Choose a reason for hiding this comment

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

Duidelijk. Dan is het nu maar even wat het is denk ik.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 6, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
15.0% Coverage on New Code (required ≥ 65%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@philipsens philipsens merged commit a2588a4 into master Nov 10, 2025
31 of 33 checks passed
@philipsens philipsens deleted the issue/9794-when-not-hazelcast-members-you-see-no-answer-found-on-temporary-queue branch November 10, 2025 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When not Hazelcast members, you see 'no answer found on temporary queue'

3 participants