Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Bowl for all VFS API requests #9579

Open
wants to merge 2 commits into
base: project-profile
Choose a base branch
from

Conversation

abryant-hv
Copy link
Contributor

Note to reviewers: split into two commits, with the most interesting API changes in the first commit.

@abryant-hv abryant-hv requested a review from a team as a code owner September 11, 2024 14:26
FileObject destFile = KettleVFS.getFileObject( dest );
IKettleVFS vfs = KettleVFS.getInstance( DefaultBowl.getInstance() );
FileObject srcFile = vfs.getFileObject( src );
FileObject destFile = vfs.getFileObject( dest );
try ( InputStream in = KettleVFS.getInputStream( srcFile );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The getOutputStream() is using the kettleVFS with Bowl and getInputStream() does not? Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getInputStream( FileObject ) is a static helper method. It doesn't do anything with the bowl, so isn't on IKettleVFS and remains on KettleVFS. There are several methods like this.

@@ -150,8 +152,8 @@ public Result execute( final Params params, String[] arguments ) throws Throwabl
// Try to load the transformation from file, even if it failed to load from the repository
// You could implement some fail-over mechanism this way.
if ( trans == null ) {
trans = loadTransFromFilesystem( params.getLocalInitialDir(), params.getLocalFile(), params.getLocalJarFile(),
params.getBase64Zip() );
trans = loadTransFromFilesystem( DefaultBowl.getInstance(), params.getLocalInitialDir(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can potentially create problems. In the Pan/Kitchen.java, we are taking the project parameter to figure out the what is the ProjctBowl. This project bowl will be set in the TransMeta/JobMeta when the loadXml is called. But here, we are initializing TransMeta with the defaultBowl.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, this will need to be modified by BACKLOG-42187

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants