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

FISH-6606 Use Temporary Filename Only While Saving the Uploaded File #6014

Merged
merged 3 commits into from
Nov 8, 2022

Conversation

aubi
Copy link
Contributor

@aubi aubi commented Nov 2, 2022

Description

Fixing issue with empty ear/war file during deployment via admin gui and uploading file

Upgrade of common-upload probably changed the behaviour of saving file, now it fails if the target file already exists. Now, we use only the filename.
The temp file is still created as Java always creates it, it is deleted before the uploaded file is written.

Important Info

Testing

Testing Performed

Upload the file attached to the Jira ticket, basically any ear/war should be deployable via upload.
Process:

  1. Open localhost:4848
  2. Select Applications in the left menu
  3. Click Deploy... button
  4. Click Browse button and choose your ear/war
  5. Click OK in the upper right corner to deploy the app.
  6. The application should appear in the list of deployed applications

Testing Environment

Linux, OpenJDK 8, 11

@aubi
Copy link
Contributor Author

aubi commented Nov 2, 2022

Jenkins test please

Copy link
Contributor

@breakponchito breakponchito left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@Pandrex247 Pandrex247 left a comment

Choose a reason for hiding this comment

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

Works, but looks a little wonky: create temp file, then immediately delete, then write deleted temp file to uploaded file (which recreates the temp file again), then delete the temp file again.

@aubi
Copy link
Contributor Author

aubi commented Nov 4, 2022

Jenkins test please

1 similar comment
@aubi
Copy link
Contributor Author

aubi commented Nov 4, 2022

Jenkins test please

@aubi aubi force-pushed the FISH-6606-fix-empty-uploaded-file branch from cb7ccdc to 53c3147 Compare November 4, 2022 17:43
@aubi
Copy link
Contributor Author

aubi commented Nov 4, 2022

Jenkins test please

Upgrade of common-upload probably changed the behaviour of saving file,
now it fails if the target file already exists. Now, we use only the
filename.
The temp file is still created as Java always creates it, it is
deleted before the uploaded file is written.
@aubi aubi force-pushed the FISH-6606-fix-empty-uploaded-file branch from 0455145 to b4e2503 Compare November 7, 2022 12:49
@aubi aubi force-pushed the FISH-6606-fix-empty-uploaded-file branch from 3f68bf9 to 6c784e0 Compare November 7, 2022 16:53
@JamesHillyard
Copy link
Member

Fixes #6020

@Pandrex247 Pandrex247 merged commit 25f99af into payara:master Nov 8, 2022
@AleksanderBastl
Copy link

When can we expect Payara 2022.4 with this patch to download.

@JamesHillyard
Copy link
Member

Hi @AleksanderBastl,

Payara Community Edition 5.2022.5 is currently scheduled for December 2022, however I can't guarantee an exact release date. Alternatively, you could opt to build Payara locally to utilise this bug fix early, instructions on building Payara are documented here: https://docs.payara.fish/community/docs/General%20Info/Build%20Instructions.html

Best Regards,
James

@AleksanderBastl
Copy link

Thank you for quick answer and solution for my question.

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.

5 participants