Comments (4)
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.
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.
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.
Rolling into #461
from invoke.
Related Issues (20)
- 2.0.0: pytest is failing in tests/runners.py units HOT 8
- 2.1.0 finds it suddenly unable to find the tasks directory HOT 9
- 2.1 has no decorator HOT 3
- Import is resolving the wrong module HOT 2
- after an upgrade to ubuntu 23.04 (python 3.11), invoke can no longer import external modules HOT 2
- MockContext does not support asynchronous HOT 2
- Invoke 2.1.0 / 2.1.1 is not able to read invoke.yaml configuration file HOT 10
- Add __all__ to __init__.py
- task decorator is wrongly typed HOT 3
- Improve types of context.run HOT 2
- types of context.config is not correct HOT 3
- `add_collection()` is missing the `ModuleType` in the type-hints HOT 1
- How do I read the current output with asynchronous without waiting for the process to finish? HOT 1
- Regex support for MockContext is broken?
- `paramiko.ssh_exception.SSHException: Channel is not open` when chaining invoke tasks
- invoke 2.1.3 does not work when run inside bash
- 2.2.0: sphinx warnings `reference target not found`
- Document adding print-completion-script to venv
- MockContext does not honor "warn=False" which is the default behaviour
- Load project level configuration files earlier
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from invoke.