-
Notifications
You must be signed in to change notification settings - Fork 451
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
Implement reading all wasm module roots in machine locator [NIT-2444] #2254
Conversation
moduleRoots[moduleRoot] = true | ||
if file.Name() == "latest" { | ||
latestModuleRoot = moduleRoot | ||
rootPath = dir | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only include dirs if their name is either "latest" or the wasmMduleRoot - otherwise locator will not be able to find it
see GetMachinePath.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't that exactly what I'm doing already ? Iterating all folders, checking if there's module-root.txt
then reading file content (which is same as directory name if it's not "latest"), then adding to moduleRoots.
Or am I missing something ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you have a file "foobar/module-root.txt" - you cannot use this module-root because the locator won't be able to find "foobar" dir later. We can change that in GetMachinePath.. but easier to just not include it in the list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, ptal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
One comment but I plan to fix it in a separate PR
moduleRoots[moduleRoot] = true | ||
if file.Name() == "latest" { | ||
latestModuleRoot = moduleRoot | ||
rootPath = dir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rootpath=dir doesn't belong in the latest "if". machines might not have a "latest" and it'd still be correct
No description provided.