-
Notifications
You must be signed in to change notification settings - Fork 225
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
Throw an error depending on the expiration of TemporalConfigStorage #1513
base: master
Are you sure you want to change the base?
Conversation
digdag-standards/src/main/java/io/digdag/standards/command/KubernetesCommandExecutor.java
Outdated
Show resolved
Hide resolved
digdag-storage-gcs/src/main/java/io/digdag/storage/gcs/GCSStorage.java
Outdated
Show resolved
Hide resolved
digdag-storage-gcs/src/main/java/io/digdag/storage/gcs/GCSStorage.java
Outdated
Show resolved
Hide resolved
digdag-storage-s3/src/main/java/io/digdag/storage/s3/S3Storage.java
Outdated
Show resolved
Hide resolved
digdag-storage-s3/src/main/java/io/digdag/storage/s3/S3Storage.java
Outdated
Show resolved
Hide resolved
a514810
to
6cd7f3f
Compare
6cd7f3f
to
626b0e0
Compare
@szyn Could you review this PR? |
@@ -276,7 +293,7 @@ CommandStatus getCommandStatusFromKubernetes(final CommandContext context, | |||
final InputStream in = outConfigStorage.getContentInputStream(outputArchiveKey); | |||
ProjectArchives.extractTarArchive(context.getLocalProjectPath(), in); // runtime exception | |||
} | |||
else if (defaultPodTTL.isPresent() && isRunningLongerThanTTL(previousStatusJson)) { | |||
else if (isRunningLongerThanOutConfigStorageExpiration(previousStatusJson) || (defaultPodTTL.isPresent() && isRunningLongerThanTTL(previousStatusJson))) { |
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.
I guess you are using a non-blocking operator such as py>
. In this case, IIRC, (defaultPodTTL.isPresent() && isRunningLongerThanTTL(previousStatusJson))
will never become true. In addtion, this block will not execute when user/WorkflowExecutionTimeoutEnforcer cancel-requested to the attempt. Is it OK/acceptable for you?
We also had the same kind of issue. Thus we introduce the cleanup
function to the Operator and CommnadExecutor interfaces and implements them in PyOperatorFactory and EcsCommandExecutor. Please see #1480, and this function helps to perform the cleanup process if the attempt received cancel-requested. I feel it is a good idea to handle it by using the same way to avoid such an issue.
How about adding it to KubernetesCommandExecutor
as well? How do you think about that?
c55e9cc
to
bd66ae8
Compare
objective
KubernetesCommandExecutor now throws an exception when the execution time of a pod exceeds the defaultPodTTL.
But we also need to consider that the pod execution time may exceed expiration of TemporalConfigStorage.
This is because pod error detection can be done early.
problem
if we continue processing when the pod's execution time exceed the expiration of TemporalConfigStorage, the curl command will raise an error when trying to upload the archive to the expired TemporaryConfigStorage at the end of the pod process.
It is inefficient to not notice error until the end of the pod process.
Fail if inTemporalConfigStorage has expired.
digdag/digdag-standards/src/main/java/io/digdag/standards/command/KubernetesCommandExecutor.java
Line 183 in ec9ba0e
Fail if outTemporalConfigStorage has expired.
digdag/digdag-standards/src/main/java/io/digdag/standards/command/KubernetesCommandExecutor.java
Line 213 in ec9ba0e
changes
Make throwing an error depending on the expiration of TemporalConfigStorage.
reopened #1359