aicam commented on code in PR #3728:
URL: https://github.com/apache/texera/pull/3728#discussion_r2382762621
##########
core/auth/src/main/scala/edu/uci/ics/texera/auth/JwtAuth.scala:
##########
@@ -62,4 +63,35 @@ object JwtAuth {
claims.setExpirationTimeMinutesInTheFuture(TOKEN_EXPIRE_TIME_IN_MINUTES.toFloat)
claims
}
+
+ def jwtDownloadClaims(
Review Comment:
Ditto
##########
core/auth/src/main/scala/edu/uci/ics/texera/auth/JwtAuth.scala:
##########
@@ -62,4 +63,35 @@ object JwtAuth {
claims.setExpirationTimeMinutesInTheFuture(TOKEN_EXPIRE_TIME_IN_MINUTES.toFloat)
claims
}
+
+ def jwtDownloadClaims(
Review Comment:
Ditto
##########
core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/workflow/WorkflowExecutionsResource.scala:
##########
@@ -769,3 +771,62 @@ class WorkflowExecutionsResource {
}
}
}
+
+object WorkflowExportResource {
Review Comment:
Move the helper functions defined here to
`core/amber/src/main/scala/edu/uci/ics/texera/web/service/ResultExportService.scala`
also make sure no function is defined multiple times, if possible you can
combine some of the functions to have less lines of code
##########
core/auth/src/main/scala/edu/uci/ics/texera/auth/JwtAuth.scala:
##########
@@ -33,6 +33,7 @@ import java.nio.charset.StandardCharsets
object JwtAuth {
final val TOKEN_SECRET: String = AuthConfig.jwtSecretKey
+ final val DOWNLOAD_TOKEN_EXPIRE_TIME_IN_SECONDS = 500
Review Comment:
I think we don't need this anymore since we use user token instead of
generating one
##########
core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/workflow/WorkflowExecutionsResource.scala:
##########
@@ -769,3 +771,62 @@ class WorkflowExecutionsResource {
}
}
}
+
+object WorkflowExportResource {
+ def parseOperators(operatorsJson: String): List[OperatorExportInfo] = {
+ new ObjectMapper()
+ .registerModule(DefaultScalaModule)
+ .readValue(operatorsJson, new TypeReference[List[OperatorExportInfo]] {})
+ }
+
+ def validateExportRequest(request: ResultExportRequest): Option[Response] = {
+ if (request.operators.isEmpty) {
Review Comment:
I believe this already exist, make sure to reuse it, also since now we have
two endpoints `/export/dataset` and `/export/local` make sure common checks and
logic are centralized without repeating.
--
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]