Ma77Ball commented on code in PR #5743:
URL: https://github.com/apache/texera/pull/5743#discussion_r3451037596


##########
config-service/src/main/scala/org/apache/texera/service/ConfigService.scala:
##########
@@ -72,6 +74,8 @@ class ConfigService extends 
Application[ConfigServiceConfiguration] with LazyLog
 
     environment.jersey.register(new ConfigResource)
 
+    ConfigService.enforceRoleAnnotations(environment)

Review Comment:
   1. Done. Moved the repeated auth setup into one shared 
`AuthFeatures.register(...)` in `common/auth`, so all 5 services call it 
instead of each keeping its own copy.



##########
config-service/src/main/scala/org/apache/texera/service/ConfigService.scala:
##########
@@ -72,6 +74,8 @@ class ConfigService extends 
Application[ConfigServiceConfiguration] with LazyLog
 
     environment.jersey.register(new ConfigResource)
 
+    ConfigService.enforceRoleAnnotations(environment)

Review Comment:
   2. A compile-time check is not really possible here. The check works by 
inspecting which endpoints each service registers, and that only happens at 
runtime, so the compiler cannot see it. The current check still runs at startup 
(before any traffic) and is covered by tests, so missing annotations are caught 
early. Happy to open a follow-up issue if we want to explore it further.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to