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

task: skip existing files on download #361

Closed
Tracked by #362
casperdcl opened this issue Jan 11, 2022 · 3 comments
Closed
Tracked by #362

task: skip existing files on download #361

casperdcl opened this issue Jan 11, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request resource-task iterative_task TF resource

Comments

@casperdcl
Copy link
Contributor

Don't download files if size/mode time/checksum is the same.

@casperdcl casperdcl added resource-task iterative_task TF resource enhancement New feature or request labels Jan 11, 2022
@0x2b3bfa0 0x2b3bfa0 changed the title optimse task download on destroy optimise task download on destroy Jan 11, 2022
@0x2b3bfa0
Copy link
Member

Similarly to #360 (comment), it should be easily feasible for machines, but not that much for Kubernetes.

@casperdcl casperdcl changed the title optimise task download on destroy task: skip existing files on download Jan 12, 2022
@DavidGOrtega
Copy link
Contributor

Similarly to #360 (comment), it should be easily feasible for machines, but not that much for Kubernetes.

Lets do it at least for machines.

@0x2b3bfa0
Copy link
Member

0x2b3bfa0 commented May 11, 2022

This is a core feature of rclone and already implemented unless proven otherwise. Tested with a dummy 1 GB file.

terraform {
  required_providers {
    iterative = {
      source = "github.com/iterative/iterative"
    }
  }
}

provider "iterative" {}

resource "iterative_task" "example" {
  cloud   = "aws"
  machine = "m"

  script = <<-END
    #!/bin/sh
    fallocate --length 1G file
  END

  storage {
    workdir = "."
    output  = "file"
  }
}

@0x2b3bfa0 0x2b3bfa0 self-assigned this May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request resource-task iterative_task TF resource
Projects
None yet
Development

No branches or pull requests

3 participants