-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fixes Error "Request Entity Too Large" #585
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
tested on local successfully, will test on dev now |
Signed-off-by: munishchouhan <[email protected]>
Tested successfully in dev:
|
Signed-off-by: munishchouhan <[email protected]>
* Truncate the payload if it exceeds the maximum size | ||
*/ | ||
protected static truncateLargeCondaFile(String condafile) { | ||
int maxSize = 14 * 1024 //14 KB for the file and 2 KB for the rest of the fields |
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.
let's make a config option for this as usual
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.
done
src/main/groovy/io/seqera/wave/service/persistence/impl/SurrealPersistenceService.groovy
Outdated
Show resolved
Hide resolved
@@ -95,6 +95,7 @@ class SurrealPersistenceService implements PersistenceService { | |||
|
|||
@Override | |||
void saveBuild(WaveBuildRecord build) { | |||
build.condaFile = truncateLargeCondaFile(build.condaFile) |
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.
Think can also happen for the docker file in principle
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.
ok will add it too
I think when condafile is present continerfile will be our template so it wont exceed size, but when we only have dockerfile, size can be bigger
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.
done
…lPersistenceService.groovy Co-authored-by: Paolo Di Tommaso <[email protected]>
src/main/groovy/io/seqera/wave/service/persistence/WaveContainerRecord.groovy
Show resolved
Hide resolved
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Surreal have exposed config variables to modify HTTP request size limit It will be released in v 2.0.0 |
This PR will add a method to truncate condafile to 14kb if it is bigger than that