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

regression: undefined fileBuffer in getUploadFormData when onFile is called before onField #34091

Open
wants to merge 1 commit into
base: release-7.1.0
Choose a base branch
from

Conversation

abhinavkrin
Copy link
Member

@abhinavkrin abhinavkrin commented Nov 29, 2024

Proposed changes (including videos or screenshots)

This PR addresses a regression in the getUploadFormData function where field events are processed after file events, causing the file buffer to become undefined. This leads to intermittent request failures when processing uploads.

Issue(s)

Steps to test or reproduce

Further comments

CORE-843

Copy link
Contributor

dionisio-bot bot commented Nov 29, 2024

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

Copy link

changeset-bot bot commented Nov 29, 2024

⚠️ No Changeset found

Latest commit: 0353ef8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

PR Preview Action v1.4.8
🚀 Deployed preview to https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-34091/
on branch gh-pages at 2024-11-29 19:08 UTC

Copy link

codecov bot commented Nov 29, 2024

Codecov Report

Attention: Patch coverage is 90.47619% with 4 lines in your changes missing coverage. Please review.

Project coverage is 75.79%. Comparing base (5b4ed31) to head (0353ef8).

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                @@
##           release-7.1.0   #34091      +/-   ##
=================================================
+ Coverage          75.75%   75.79%   +0.03%     
=================================================
  Files                510      512       +2     
  Lines              22078    22169      +91     
  Branches            5387     5397      +10     
=================================================
+ Hits               16726    16803      +77     
- Misses              4706     4713       +7     
- Partials             646      653       +7     
Flag Coverage Δ
unit 75.79% <90.47%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@scuciatto scuciatto added this to the 7.1.0 milestone Nov 29, 2024
}
});

it('should return fields without errors when no file is uploaded but fileOptional is true', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add cases for:

  • file uploaded & fileOptional true
  • file uploaded with many extra fields

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