[
https://issues.apache.org/jira/browse/BEAM-13095?focusedWorklogId=668692&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-668692
]
ASF GitHub Bot logged work on BEAM-13095:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 21/Oct/21 23:11
Start Date: 21/Oct/21 23:11
Worklog Time Spent: 10m
Work Description: pabloem commented on a change in pull request #15770:
URL: https://github.com/apache/beam/pull/15770#discussion_r734099388
##########
File path: playground/backend/internal/fs_tool/fs.go
##########
@@ -53,23 +51,19 @@ type LifeCycle struct {
}
Review comment:
Can you add some more explicit documentation about the `Folder`,
`Extension` and `LifeCycle` types - if possible for each member, so that it's
easier to understand what they are used for
##########
File path: playground/backend/internal/fs_tool/fs.go
##########
@@ -53,23 +51,19 @@ type LifeCycle struct {
}
// NewLifeCycle returns a corresponding LifeCycle depending on the given SDK.
-func NewLifeCycle(sdk pb.Sdk, pipelineId uuid.UUID) (*LifeCycle, error) {
+func NewLifeCycle(sdk pb.Sdk, pipelineId uuid.UUID, workingDir string)
(*LifeCycle, error) {
Review comment:
do we assume that the `workingDir` has to already exist and be
configured before creating a `LifeCycle`? Can we document this please?
##########
File path: playground/backend/internal/fs_tool/java_fs.go
##########
@@ -21,14 +21,14 @@ import (
)
const (
- javaBaseFileFolder = parentBaseFileFolder + "/executable_files"
+ javaBaseFileFolder = "executable_files"
javaExecutableFileExtension = "java"
javaCompiledFileExtension = "class"
)
// newJavaLifeCycle creates LifeCycle with java SDK environment.
-func newJavaLifeCycle(pipelineId uuid.UUID) *LifeCycle {
- baseFileFolder := fmt.Sprintf("%s_%s", javaBaseFileFolder, pipelineId)
+func newJavaLifeCycle(pipelineId uuid.UUID, workingDir string) *LifeCycle {
+ baseFileFolder := fmt.Sprintf("%s/%s/%s", workingDir,
javaBaseFileFolder, pipelineId)
Review comment:
It seems that the `filepath` package can perform these joins of
directory/file names: https://pkg.go.dev/path/filepath#Join
You don't need to make the change in all code files, but can you make the
change in this one file?
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 668692)
Time Spent: 0.5h (was: 20m)
> [Playground] Using working directory from environment in LifeCycle instead of
> using hardcoded backend directory
> ---------------------------------------------------------------------------------------------------------------
>
> Key: BEAM-13095
> URL: https://issues.apache.org/jira/browse/BEAM-13095
> Project: Beam
> Issue Type: Bug
> Components: beam-playground
> Reporter: Aydar Zaynutdinov
> Assignee: Aydar Zaynutdinov
> Priority: P3
> Labels: beam-playground-sprint-2
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Now _LifeCycle_ uses the _backend_ directory as a root folder. Need to use
> the directory from the received parameter.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)