-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
During Function update, cleanup should only happen for temp files that were generated #7201
Conversation
…mp files that were generated
&& componentPackageFile != null && componentPackageFile.exists()) { | ||
componentPackageFile.delete(); | ||
if (componentPackageFile != null && componentPackageFile.exists()) { | ||
if ((functionPkgUrl != null && !functionPkgUrl.startsWith(Utils.FILE)) || uploadedInputStream != null) { |
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.
Do we also need to exclude "http" ?
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.
Do we need to add this for sources and sinks as well?
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.
no. Only file. Since for http(or others) we will make a copy and do validation on that copy. We need to cleanup this copy.
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.
good catch about sources/sinks. Will add
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.
Added the same logic for sources/sinks
…t were generated (apache#7201) * Fix logic while updating functions. Cleanup should only happen for temp files that were generated * Fix integration tests * Fix test * Fix logic for parallelism > 1 * Fix test * Address comments Co-authored-by: Sanjeev Kulkarni <sanjeevk@splunk.com>
…t were generated (apache#7201) * Fix logic while updating functions. Cleanup should only happen for temp files that were generated * Fix integration tests * Fix test * Fix logic for parallelism > 1 * Fix test * Address comments Co-authored-by: Sanjeev Kulkarni <sanjeevk@splunk.com>
…t were generated (apache#7201) * Fix logic while updating functions. Cleanup should only happen for temp files that were generated * Fix integration tests * Fix test * Fix logic for parallelism > 1 * Fix test * Address comments Co-authored-by: Sanjeev Kulkarni <sanjeevk@splunk.com>
needs to cherry-pick to 2.6.2. |
…t were generated (#7201) * Fix logic while updating functions. Cleanup should only happen for temp files that were generated * Fix integration tests * Fix test * Fix logic for parallelism > 1 * Fix test * Address comments Co-authored-by: Sanjeev Kulkarni <sanjeevk@splunk.com> (cherry picked from commit 828d033)
(If this PR fixes a github issue, please add
Fixes #<xyz>
.)Fixes #
(or if this PR is one task of a github issue, please add
Master Issue: #<xyz>
to link to the master issue.)Master Issue: #
Motivation
When doing function updates, cleanup should only be done for files that were temporarily created.
Modifications
Describe the modifications you've done.
Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation