Skip to content

Conversation

@jmgasper
Copy link
Collaborator

@jmgasper jmgasper commented Nov 1, 2025

No description provided.

@jmgasper jmgasper merged commit 7097889 into master Nov 1, 2025
7 of 8 checks passed
@@ -0,0 +1,3 @@
-- Add isFileSubmission flag to submissions to differentiate file vs URL entries
ALTER TABLE "submission"
ADD COLUMN IF NOT EXISTS "isFileSubmission" BOOLEAN NOT NULL DEFAULT false;
Copy link

Choose a reason for hiding this comment

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

[⚠️ performance]
Consider adding an index on the isFileSubmission column if it will be frequently queried or filtered on. This can improve query performance.

@@index([committed]) // Index for filtering by committed status
@@index([submissionId]) // Index for filtering by submission
@@index([submissionId, id]) // Helps ORDER BY id after filtering by submission
Copy link

Choose a reason for hiding this comment

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

[⚠️ performance]
The new index @@index([submissionId, id]) is added to help with ORDER BY id after filtering by submissionId. Ensure that this index is necessary and beneficial for your query patterns, as additional indexes can increase write overhead and storage usage.

@@index([submissionId, id]) // Helps ORDER BY id after filtering by submission
@@index([resourceId]) // Index for filtering by resource (reviewer)
@@index([phaseId]) // Index for filtering by phase
@@index([phaseId, id]) // Helps ORDER BY id after filtering by phase
Copy link

Choose a reason for hiding this comment

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

[⚠️ performance]
The new index @@index([phaseId, id]) is added to help with ORDER BY id after filtering by phaseId. Verify that this index is required and will be utilized effectively, as it can lead to increased maintenance costs and storage requirements.

appeal appeal?
@@index([reviewItemId]) // Index for joining with reviewItem table
@@index([reviewItemId, sortOrder, id]) // Helps ordered pagination on review item comments
Copy link

Choose a reason for hiding this comment

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

[⚠️ performance]
The new index @@index([reviewItemId, sortOrder, id]) is intended to assist with ordered pagination on review item comments. Ensure that the query patterns justify this index, as it can add overhead to write operations and consume additional storage.

fileSize Int?
viewCount Int?
systemFileName String?
isFileSubmission Boolean @default(false)
Copy link

Choose a reason for hiding this comment

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

[⚠️ design]
The addition of the isFileSubmission field with a default value of false should be reviewed to ensure it aligns with the existing data model and business logic. Consider potential impacts on existing queries and data integrity.

})
async createSubmission(
@Req() req: Request,
@UploadedFile() file: Express.Multer.File,
Copy link

Choose a reason for hiding this comment

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

[❗❗ security]
Ensure that the @UploadedFile() decorator is correctly configured to handle file uploads securely. Consider validating the file type and size to prevent potential security risks associated with handling binary data.

);
const authUser: JwtUser = req['user'] as JwtUser;
return this.service.createSubmission(authUser, body);
return this.service.createSubmission(authUser, body, file);
Copy link

Choose a reason for hiding this comment

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

[⚠️ correctness]
The createSubmission method now includes a file parameter. Ensure that the createSubmission service method properly handles the file, including validation and storage, to avoid potential issues with file handling.

ui: {
reviewUIUrl:
process.env.REVIEW_UI_URL ?? 'https://review-v6.topcoder-dev.com',
reviewUIUrl: process.env.REVIEW_UI_URL ?? 'https://review.topcoder-dev.com',
Copy link

Choose a reason for hiding this comment

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

[❗❗ correctness]
The change updates the default URL from https://review-v6.topcoder-dev.com to https://review.topcoder-dev.com. Ensure that this change aligns with the intended environment and that the new URL is correctly configured and accessible. This could impact the application's ability to connect to the review UI if the URL is incorrect.

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.

2 participants