Git Product home page Git Product logo

Comments (3)

mch-sb avatar mch-sb commented on September 9, 2024

Another workaround:

    - prefect_docker.deployments.steps.build_docker_image:
        id: build-image
        requires: prefect-docker==0.6.0
        image_name: "{{ prefect.variables.dp_test_project_image_name }}"
        tag: latest
        dockerfile: Dockerfile # added
        additional_tags:
          - "{{ get-commit-hash.stdout }}"
  docker_push: &docker_push
    - prefect_docker.deployments.steps.push_docker_image:
        requires: prefect-docker==0.6.0
        image_name: "{{ build-image.image_name }}"
        tag: "{{ build-image.tag }}"
        additional_tags: "{{ build-image.additional_tags }}"

With this the params to push_docker_image and build_docker_image are not the same, and they are not hiting eachothers cache it seems

from prefect.

desertaxle avatar desertaxle commented on September 9, 2024

Thanks for the bug report @mch-sb!

The intent of caching those steps is to avoid performing duplicate builds and pushes when deploying multiple flows, so you definitely shouldn't see cache hits between a build and a push on a single deployment. Your idea of including the function name in the cache key computation is great! Would you be up for submitting a PR making that change?

from prefect.

zzstoatzz avatar zzstoatzz commented on September 9, 2024

hi @mch-sb - thanks for identifying the issue here! the PRs above should fix this for 3.x and 2.x respectively, and will go out with the next release

from prefect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.