AydarZaynutdinov commented on a change in pull request #16120:
URL: https://github.com/apache/beam/pull/16120#discussion_r762986798
##########
File path: playground/backend/internal/fs_tool/fs.go
##########
@@ -171,3 +172,10 @@ func (l *LifeCycle) GetAbsoluteBaseFolderPath() string {
absoluteFilePath, _ := filepath.Abs(l.Folder.BaseFolder)
return absoluteFilePath
}
+
+// GetAbsoluteLogFilePath returns absolute path to the logs file
(/path/to/workingDir/executable_files/{pipelineId}/logs.log)
+func (l *LifeCycle) GetAbsoluteLogFilePath() string {
+ filePath := filepath.Join(l.Folder.BaseFolder, logFileName)
+ absoluteFilePath, _ := filepath.Abs(filePath)
Review comment:
`filepath.Abs()`could return an error in case of `os.Getwd()` returns an
error:
```
if IsAbs(path) {
return Clean(path), nil
}
wd, err := os.Getwd()
if err != nil {
return "", err
}
return Join(wd, path), nil
```
--
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]