v6.1.0 Folder structure support - #12
Conversation
* Folder support for mod packager Now will correctly index mods that are in folders * Added folder entry field into mod builder * Implemented uploading mods into specified folders * Withhold target folder from being serialized No need to serialize, better to hide * Removed websocketsharp * Re-included TargetFolder field to be serialized
* 6.0.5 version bump * 6.1.0 due to breaking changes
arocull
left a comment
There was a problem hiding this comment.
Looking for clarification on implementation before moving forward @WangXin1507
Mostly just curious if this supports subfolders. I don't see much input sanitation for uploading--S3 likely prevents edge-cases, but trailing slashes or subfolders could cause confusion internally for the lambda function and mod loader.
Also will want a follow-up PR on documentation with updated lambda function: https://envision-center.github.io/CollabXR-Documentation/modpackager/modrepository.html#aws-lambda-configuration
| } | ||
|
|
||
| void UploadQueueUpdated(List<(Guid, BuildTarget, int)> uploads) | ||
| void UploadQueueUpdated(List<(ModMetadata, BuildTarget, int)> uploads) |
There was a problem hiding this comment.
Works for now but we may consider making this a struct in the future for easier refactoring.
There was a problem hiding this comment.
Correct me if I'm wrong on any of these @WangXin1507
- Subfolders are supported
- Subfolders are generated at upload time if they don't exist
- I don't believe there is any lambda or AWS changes, just mod packager/loader
I just tested with trailing slashes, and it does generate a "/" subdirectory below the intended subfolder. So, these should probably be sanitized
There was a problem hiding this comment.
- Yes, subfolders are supported by adding a slash in between the folder field, such as "Folder/Subfolder". I am thinking of adding a placeholder text to clarify that but it still might not be the most intuitive option. Open to suggestions.
- Yes, if they do not already exist, any folder or subfolders will be generated when the mod is uploaded.
- There was only one change in lambda for the test bucket.
const listResponse = await client
.send(
new ListObjectsV2Command({
Bucket: baseRepoStruct.S3BucketName,
}),
)
// removed below
.catch((e) => {
return {
statusCode: 500,
};
});I believe I only removed it so that the the code will go through the outside try catch block that produces the error message to troubleshoot permission issues.
The catch block has been readded and uploading to folders is unaffected.
arocull
left a comment
There was a problem hiding this comment.
Talked with Jake, we'll do path sanitizing as a follow-up PR.
Bumping to 6.1.0 due to major changes of folder structure support. Implemented in Envision-Center/CollabXR#112