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

wip feat: everything cancellable #5674

Closed

Conversation

axel7083
Copy link
Contributor

@axel7083 axel7083 commented Jan 24, 2024

What does this PR do?

Api changes

Fixes #5651

  • CancellationTokenSource is now a class instantiable, instead of an interface

extension-api changes

Continue the work started with #4364

List of methods supporting cancellable

  • listContainers
  • inspectContainer (⚠️ issue with Dockerode.Container.inspect typing missing signalAbort)

It is supported see dockerode/lib/container.js#L55

  • createContainer
  • startContainer
  • logsContainer
  • stopContainer
  • deleteContainer
  • buildImage
  • saveImage (❌ cannot be made cancellable)
  • listImages (⚠️ issue with Dockerode.ListImagesOptions typing missing signalAbort)

It is supported see dockerode/lib/docker.js#L450

  • pushImage
  • pullImage
  • tagImage (⚠️ issue with Dockerode.Image.tag typing missing signalAbort)

It is supported see dockerode/lib/image.js#L210

  • deleteImage (⚠️ issue with Dockerode.ImageRemoveOptions typing missing signalAbort)

It is supported see dockerode/lib/image.js#L249

  • getImageInspect (❌ not supported)

not supported dockerode/lib/image.js#L20

  • info
  • onEvent (already provide disposable)
  • listNetworks (⚠️ issue with Dockerode.listNetworks typing missing signalAbort)

It is supported see dockerode/lib/docker.js#L1208

  • createNetwork
  • listVolumes (⚠️ issue with Dockerode.listContainers typing missing signalAbort)

It is supported see dockerode/lib/docker.js#L1132

  • createVolume (⚠️ issue with Dockerode.VolumeCreateOptions typing missing signalAbort)

It is supported see dockerode/lib/docker.js#L1045

  • deleteVolume (⚠️ issue with Dockerode.Volume.remove typing missing signalAbort)

It is supported see dockerode/lib/volume.js#L64

  • createPod
  • replicatePodmanContainer (⚠️ depends on getContainerInspect)
  • startPod

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
@axel7083 axel7083 changed the title feat: everything cancellable wip feat: everything cancellable Jan 24, 2024
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
@axel7083
Copy link
Contributor Author

Waiting on DefinitelyTyped/DefinitelyTyped#68327

@axel7083
Copy link
Contributor Author

Closing as we do not have support for cancelling stuff properly for now

@axel7083 axel7083 closed this May 27, 2024
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.

allow extensions to create CancellationTokenSource
1 participant