Giter Club home page Giter Club logo

Comments (4)

bitprophet avatar bitprophet commented on June 20, 2024

See #298 for one not-me user encountering confusion re: current state of deduplication and pre/post tasks. Has explicit examples of what they ran, expected, and got. ❤️

Some of their "expected" outputs aren't actual bugs, but simply how the current implementation is supposed to work (though it may not be documented perfectly). The crux of that issue is the thing that wasn't strongly considered, though - having a specific task appear in BOTH the pre AND post lists for explicitly selected tasks.

Basically, deduping is being done "locally" (IIRC) such that one doesn't end up with the same task repeated in a row. Another option could be to "fully" deduplicate, as in, if a task is already in the runlist at all, never add another copy of it. More likely, we'd want to only apply that to pre/post tasks - if a user said inv foo bar foo we would not want to skip that 2nd foo.

In the end though, this ticket's core problem remains: there are a lot of strategies one could reasonably expect/employ for deduplicating tasks and we need to figure out the best way to select/swap them, or try to hone a single, least-surprising algorithm that captures most use cases.

from invoke.

presidento avatar presidento commented on June 20, 2024

Without maintaining the dependency graph, the perfect deduplication is almost impossible. And parallel running is absolutely impossible. (If pre hook means the pre-hooked task must be run completely before calling the original task, and post hook means it must be called somewhere after the original task is fully finished. Because you don't know which part of the queue can be paralellized, and which tasks must wait for the end of the execution of the precedent tasks.)

Nevertheless, with pre-post annotations on the Call object and a two-rounded deduplication, a good enough deduplication can be reached. See my pull request. (#299)

from invoke.

bitprophet avatar bitprophet commented on June 20, 2024

Don't think either myself or Bruce noted this in another ticket, and this is probably the most appropriate one anyways - Bruce Eckel dug around during PyCon sprints for prior art re: dealing with DAGs in Python, so that we'd be prepared to implement a serious graph-oriented setup for dependencies.

He found dagger and updated a copy of it to be Python 2+3 compat (it was not 3 compat): https://github.com/BruceEckel/pythondagger23

from invoke.

bitprophet avatar bitprophet commented on June 20, 2024

Rolling into #461

from invoke.

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.