Skip to content

feat: add announcement and scheduled maintenance banner system (#3733) - #4004

Open
alfespa17 wants to merge 2 commits into
mainfrom
feat/announcements-banner
Open

alfespa17 wants to merge 2 commits into
mainfrom
feat/announcements-banner

fix: address PR #4004 review feedback and sync with main

ed12ef8
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Nov 29, 2026 in 43s

Quality Gate failed

Failed conditions
B 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

Annotations

Check warning on line 30 in api/src/main/java/io/terrakube/api/rs/checks/announcement/AnnouncementReadCheck.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this field injection and use constructor injection instead.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIov2ufvcVldxuqYCV2&open=AaIov2ufvcVldxuqYCV2&pullRequest=4004

Check failure on line 53 in api/src/main/java/io/terrakube/api/rs/hooks/announcement/AnnouncementManageHook.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this method to reduce its Cognitive Complexity from 25 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIov2nzvcVldxuqYCVw&open=AaIov2nzvcVldxuqYCVw&pullRequest=4004

Check warning on line 28 in api/src/main/java/io/terrakube/api/rs/checks/announcement/AnnouncementManageCheck.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this field injection and use constructor injection instead.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIov2uevcVldxuqYCVy&open=AaIov2uevcVldxuqYCVy&pullRequest=4004

Check warning on line 33 in api/src/main/java/io/terrakube/api/rs/checks/announcement/AnnouncementReadCheck.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this field injection and use constructor injection instead.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIov2ufvcVldxuqYCV3&open=AaIov2ufvcVldxuqYCV3&pullRequest=4004

Check warning on line 36 in api/src/main/java/io/terrakube/api/rs/checks/announcement/AnnouncementReadCheck.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this field injection and use constructor injection instead.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIov2ufvcVldxuqYCV4&open=AaIov2ufvcVldxuqYCV4&pullRequest=4004

Check warning on line 146 in api/src/test/java/io/terrakube/api/plugin/token/team/TeamTokenControllerTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this and every subsequent useless "eq(...)" invocation; pass the values directly.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIov2v-vcVldxuqYCV_&open=AaIov2v-vcVldxuqYCV_&pullRequest=4004

Check warning on line 0 in api/src/main/java/io/terrakube/api/rs/announcement/Announcement.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the "java.time" API for date and time.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIov2uivcVldxuqYCV5&open=AaIov2uivcVldxuqYCV5&pullRequest=4004

Check warning on line 45 in api/src/main/java/io/terrakube/api/plugin/token/team/TeamTokenController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Constructor has 8 parameters, which is greater than 7 authorized.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIov2vfvcVldxuqYCV6&open=AaIov2vfvcVldxuqYCV6&pullRequest=4004

Check warning on line 157 in api/src/test/java/io/terrakube/api/AnnouncementTests.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace "ignored" with an unnamed pattern.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIov2wQvcVldxuqYCWC&open=AaIov2wQvcVldxuqYCWC&pullRequest=4004

Check warning on line 156 in api/src/test/java/io/terrakube/api/AnnouncementTests.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this use of "Thread.sleep()".

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIov2wQvcVldxuqYCWB&open=AaIov2wQvcVldxuqYCWB&pullRequest=4004

Check warning on line 31 in api/src/main/java/io/terrakube/api/rs/checks/announcement/AnnouncementManageCheck.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this field injection and use constructor injection instead.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIov2uevcVldxuqYCVz&open=AaIov2uevcVldxuqYCVz&pullRequest=4004

Check warning on line 0 in api/src/main/java/io/terrakube/api/rs/hooks/announcement/AnnouncementManageHook.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the "java.time" API for date and time.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIov2nzvcVldxuqYCVv&open=AaIov2nzvcVldxuqYCVv&pullRequest=4004

Check warning on line 0 in api/src/main/java/io/terrakube/api/plugin/announcement/PublicAnnouncementCacheService.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the "java.time" API for date and time.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIov2vxvcVldxuqYCV7&open=AaIov2vxvcVldxuqYCV7&pullRequest=4004

Check warning on line 83 in api/src/main/java/io/terrakube/api/plugin/announcement/PublicAnnouncementCacheService.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Move this method into "CachedEntry".

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIov2vxvcVldxuqYCV9&open=AaIov2vxvcVldxuqYCV9&pullRequest=4004

Check warning on line 165 in api/src/test/java/io/terrakube/api/plugin/token/team/TeamTokenControllerTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this and every subsequent useless "eq(...)" invocation; pass the values directly.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIov2v-vcVldxuqYCWA&open=AaIov2v-vcVldxuqYCWA&pullRequest=4004

Check warning on line 0 in api/src/main/java/io/terrakube/api/rs/checks/announcement/AnnouncementReadCheck.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the "java.time" API for date and time.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIov2ufvcVldxuqYCV0&open=AaIov2ufvcVldxuqYCV0&pullRequest=4004

Check warning on line 33 in api/src/main/java/io/terrakube/api/plugin/announcement/PublicAnnouncementCacheService.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use a thread-safe type; adding "volatile" is not enough to make this field thread-safe.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIov2vxvcVldxuqYCV8&open=AaIov2vxvcVldxuqYCV8&pullRequest=4004

Check warning on line 25 in api/src/main/java/io/terrakube/api/rs/checks/announcement/AnnouncementManageCheck.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this field injection and use constructor injection instead.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIov2uevcVldxuqYCVx&open=AaIov2uevcVldxuqYCVx&pullRequest=4004

Check warning on line 0 in api/src/main/java/io/terrakube/api/plugin/announcement/PublicAnnouncementController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the "java.time" API for date and time.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIov2vzvcVldxuqYCV-&open=AaIov2vzvcVldxuqYCV-&pullRequest=4004

Check warning on line 27 in api/src/main/java/io/terrakube/api/rs/checks/announcement/AnnouncementReadCheck.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this field injection and use constructor injection instead.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIov2ufvcVldxuqYCV1&open=AaIov2ufvcVldxuqYCV1&pullRequest=4004