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(...)->once() doesn't work on a parallel deployment #1419

Closed
hyde1 opened this issue Nov 17, 2017 · 8 comments
Closed

task(...)->once() doesn't work on a parallel deployment #1419

hyde1 opened this issue Nov 17, 2017 · 8 comments
Labels
Milestone

Comments

@hyde1
Copy link
Contributor

hyde1 commented Nov 17, 2017

Q A
Issue Type Bug
Deployer Version Deployer 6.0.3
Local Machine OS Ubuntu 16.04.3 LTS
Remote Machine OS Ubuntu 16.04.3 LTS

Description

Hi,

It seams that task(...)->once() doesn't work when I used with the --parallel flag

Steps to reproduce

Create a simple recipe with a "once" task like:

task('deploy:migratedb', function() {
	run('cd {{release_path}} && php migrate.php');
})->once();

Deploy on 2 hosts with the --parallel flag and the task is executed twice

Output log

$ dep deploy production --parallel -vvv
➤ Executing task deploy:migratedb
[host1] > cd /var/www/application/releases/76 && php migrate.php
[host2] > cd /var/www/application/releases/76 && php migrate.php
[host1] < Migrated 0 migrations in 0
• done on [host1]
[host1] < Migrated 0 migrations in 0
• done on [host2]
✔ Ok [963ms]

Is seams that the task is flagged to "hasRun" at the end of it's execution, so in a parallel deployment the task is executed on every host whereas it works fin on a simple deployment.

Thanks for your help

@antonmedv
Copy link
Member

Yes, it's looks like a bug. Try to fix it on weekends.

@mikkelle
Copy link

mikkelle commented Feb 8, 2018

Hi,
When this bug will be fixed - I need it so much?:)

Thanks

@staabm
Copy link
Contributor

staabm commented Feb 8, 2018

feel free to provide a PR.

@gedimin45
Copy link

Hello!

Any plans on getting this fixed?

@antonmedv
Copy link
Member

Does any body wants to fix it?

@antonmedv
Copy link
Member

Everything working in v7). Added test for once().

@kanevbg
Copy link
Contributor

kanevbg commented Feb 18, 2021

Can this be merged to v6?

@antonmedv
Copy link
Member

Sorry but no. This too much work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants