Commit Graph

167 Commits

Author SHA1 Message Date
Tony Breeds 8077f22f3a Retire Packaging Deb project repos
This commit is part of a series to retire the Packaging Deb
project. Step 2 is to remove all content from the project
repos, replacing it with a README notification where to find
ongoing work, and how to recover the repo if needed at some
future point (as in
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project).

Change-Id: I9fce77de093a2922ef3cc9484cc2880cec812cba
2017-09-12 15:59:04 -06:00
Thomas Goirand fc76675610 Fixed debian/gbp.conf to use debian/newton as packaging branch. 2016-08-11 11:40:11 +02:00
Ondřej Nový 82bf14bbf3 d/rules: Changed UPSTREAM_GIT protocol to https 2016-05-19 21:15:30 +02:00
Ondřej Nový e9215ef25e Standards-Version is 3.9.8 now (no change) 2016-04-09 19:26:50 +02:00
Thomas Goirand 0e1c5554c8 Uploading to unstable. 2016-04-04 09:25:27 +00:00
Thomas Goirand 28456b06db * Disabled futurist.tests.test_executors.TestRejection.test_rejection which
is failing.
2016-03-02 13:22:20 +00:00
Thomas Goirand fce0f0761b Standards-Version: 3.9.7 2016-03-02 13:14:20 +00:00
Thomas Goirand b190556bfa Fixed (build-)depends for this release. 2016-03-02 13:13:26 +00:00
Thomas Goirand b87b823de9 futurist 0.13.0 release
meta:version: 0.13.0
 meta:series: mitaka
 meta:release-type: release
 meta:announce: openstack-dev@lists.openstack.org
 meta:pypi: yes
 -----BEGIN PGP SIGNATURE-----
 Comment: GPGTools - http://gpgtools.org
 
 iQEcBAABAgAGBQJWzHEjAAoJEDttBqDEKEN6eL8IAIbE+zxDH8IlKbzMtX25w7Fx
 rtrdW3fkibt1zDRg90VfrwMdB9KW3SVtXqw5Fbo8sMQ8PPw0ZLHHBIkMWgZi9xza
 bDFWFYb55VeNMTizzssGnfJHStqP+xMurIhy1N62fFdicQlsTGJ6KkEJRXUXJPLL
 aSgw+0qZi1VAujZ9KewG50Tpx17pEE54g2eIORFZgNtlRqZTwx7zIKcfYOzP67AU
 Rz7gYMPXc02SwAiAwuV2aIoUr1oQ9tE5RK43Qw9Pb5/cmZfdV5Lj8FI0jZXVxEMj
 clLXQpSg0eEzFU7Jtfox+dEa0D96yFQFuzUEUIseYVyShEMsq0eIXsLPz6e9PH0=
 =glRI
 -----END PGP SIGNATURE-----

Merge tag '0.13.0' into debian/mitaka

futurist 0.13.0 release

meta:version: 0.13.0
meta:series: mitaka
meta:release-type: release
meta:announce: openstack-dev@lists.openstack.org
meta:pypi: yes
2016-03-02 13:11:19 +00:00
Thomas Goirand f181277c54 Now packaging 0.13.0 2016-03-02 13:07:13 +00:00
Joshua Harlow ba541d6dc1 Single quote the callables name (when submission errors)
The rest of the code single quotes it so this code might
as well to (to follow the existing logging style).

Change-Id: Ibd2a8b49d11dcd32d9168a96950e08616ac1c54d
2016-03-02 13:06:21 +00:00
OpenStack Proposal Bot b3fddb0140 Updated from global requirements
Change-Id: I9e3931c02e490775c8ca164ccd4cc9f9f9d0d085
2016-03-02 13:06:21 +00:00
Dmitry Tantsur 19212c37fe Reschedule failed periodic tasks after a short delay
When testing Ironic with Futurist I found out that whe number of tasks
seriously exceed number of possible workers, the conductor goes into loop
retrying them and mostly stops reacting. Insert a short random delay before
retrying, so that the executor has chances of processing tasks before we
through more on it. Also recalculate the "now" value, as submitting a task
could take some time.

Change-Id: I8e45ddf7c87cf130028fc9fe937691968db17ee9
2016-03-02 13:06:21 +00:00
Dmitry Tantsur 9f2b4b8a3f Fix wrong comparison in reject_when_reached
We say we raise when backlog goes past max size, but actually we raise when
backlogs tries to reach the max size. This patch fixes reject_when_reached to
actually allow max size to be reached, but no more.

Also adding missing unit test for reject_when_reached.

Change-Id: Ide835b6e5fd15171b9bebc7ca112b84423b39fab
2016-03-02 13:06:21 +00:00
OpenStack Proposal Bot be169de42b Updated from global requirements
Change-Id: I1b917be8fc98934141e20032ba4b7a374145dc61
2016-03-02 13:06:21 +00:00
Joshua Harlow 430b56434b Ensure all futures have completed before run returns
Now that shutdown can be skipped (which would previously
wait for all submitted futures to be finished) we need to have
a way to know that all submitted futures have been finished
before our run method returns.

A simple countdown barrier/latch does this so ensure that we use
it in the periodic run loop to be able to only return from the
run loop when no active futures are in progress.

Change-Id: Ia3dd84ebfe2416060aaf5113cc8310a23919a3f9
2016-03-02 13:06:21 +00:00
OpenStack Proposal Bot e66c0bf814 Updated from global requirements
Change-Id: I83acfbc37819b8004702305b7dcc3b7626893ade
2016-03-02 13:06:21 +00:00
Dmitry Tantsur 10f8c12d1f Allow PeriodicWorker to skip executor shutdown in case of a preexisting executor
The current behaviour of always shutting down the executor makes it troublesome
to use a precreated executor and makes completely impossible to use the same
executor for running PeriodicWorker itself (which is what I'm doing for Ironic).

This change adds a base class ExecutorFactory with 'shutdown' attribute
defaulting to True. It also adds a new class ExistingExecutor that takes an
existing executor and sets shutdown to False.

Change-Id: I6a574ba77439aeee46b9e154aa059098ec087308
2016-03-02 13:06:21 +00:00
Joshua Harlow d17c52f1c3 Expose underlying futures.CancelledError
When a future is cancelled and the result is fetched
it will raise a CancelledError which is quite useful to
be able to catch.

So to enable catching that specific exception expose it
in futurist __init__.py so that people can easily catch
it just by catching futurist.CancelledError and handling
the outcome of that.

Change-Id: I7bc1838aadcbb8cd0d635da83bb1e1b1ec761e89
2016-03-02 13:06:21 +00:00
OpenStack Proposal Bot 42225d506b Updated from global requirements
Change-Id: Ibb973cd6e48441e461addd2a8b818f4738a2e4d3
2016-03-02 13:06:21 +00:00
OpenStack Proposal Bot 11927d055b Updated from global requirements
Change-Id: I32ac08430f35278356061cff0120e841a09f3983
2016-03-02 13:06:21 +00:00
Surojit Pathak 960ecac851 Modification of the example code
To illustrate the fact that we can share code seemlessly with different
scheduling behavior, at ease with futurist. Moreover, the example code
shows how the concurrency/parallel execution can be observed from same
code, just by changing the executor. This demonstrates the power of
futurist interfaces.

Change-Id: Ifdd2a89c8cd9d06f54900960a69debc41b42ab3d
2016-03-02 13:06:21 +00:00
Dmitry Tantsur e2c2df6691 PeriodicWorker.create to accept arguments for periodic tasks
Sometimes it might be required to pass the same arguments to all
tasks collected by create (e.g. ironic passes context).

Change-Id: I7992c59e76b8b7b9101501d75cb7a53d982d07fd
2016-03-02 13:06:21 +00:00
Dmitry Tantsur 1537f43609 Handle exceptions from executor.submit in PeriodicWorker
Currently PeriodicWorker fails if executor raises RejectedSubmission.
This change makes it catch RejectedSubmission and RuntimeError from
executor.submit and reschedule the task as soon as possible.

Change-Id: Ifff7850c9b44ee076f428ed3a613a13e182a549d
Closes-Bug: #1532255
2016-03-02 13:06:21 +00:00
Dmitry Tantsur c01db2de8e Add periodics.is_periodic to check if object is a periodic task
People implementing their own periodic tasks collection (as opposed
to using PeriodicWorker.create) need to know if something is
a periodic task without inspecting its private attributes.
This function returning True means something is safe to add
to a PeriodicWorker (will not raise ValueError).

Change-Id: Iee8da601b1bc994188c58ca459574a466270bf63
2016-03-02 13:06:21 +00:00
janonymous 977a07da46 py26/py33 are no longer supported by Infra's CI
Python 3.3/2.6 support would be dropped by
Infra team from mitaka,CI would no longer be testing it,
so projects should drop it also.

Change-Id: Iaabbd65c53d71f5aa19bdca29c14ba5248d78c27
2016-03-02 13:06:21 +00:00
Ondřej Nový 5d99188a14 Fixed VCS URLs (https). 2016-02-28 15:38:11 +01:00
Joshua Harlow bd9f7ca8e8 Single quote the callables name (when submission errors)
The rest of the code single quotes it so this code might
as well to (to follow the existing logging style).

Change-Id: Ibd2a8b49d11dcd32d9168a96950e08616ac1c54d
2016-02-22 10:08:36 +01:00
Jenkins 9cf9c74513 Merge "Reschedule failed periodic tasks after a short delay" 2016-02-22 08:06:54 +00:00
Jenkins 76d9eb76bc Merge "Fix wrong comparison in reject_when_reached" 2016-02-22 08:02:38 +00:00
OpenStack Proposal Bot d750d05b7b Updated from global requirements
Change-Id: I9e3931c02e490775c8ca164ccd4cc9f9f9d0d085
2016-02-19 18:50:24 +00:00
Dmitry Tantsur f9f685e51d Reschedule failed periodic tasks after a short delay
When testing Ironic with Futurist I found out that whe number of tasks
seriously exceed number of possible workers, the conductor goes into loop
retrying them and mostly stops reacting. Insert a short random delay before
retrying, so that the executor has chances of processing tasks before we
through more on it. Also recalculate the "now" value, as submitting a task
could take some time.

Change-Id: I8e45ddf7c87cf130028fc9fe937691968db17ee9
2016-02-19 10:17:33 +01:00
Dmitry Tantsur 6a2f5a0bb3 Fix wrong comparison in reject_when_reached
We say we raise when backlog goes past max size, but actually we raise when
backlogs tries to reach the max size. This patch fixes reject_when_reached to
actually allow max size to be reached, but no more.

Also adding missing unit test for reject_when_reached.

Change-Id: Ide835b6e5fd15171b9bebc7ca112b84423b39fab
2016-02-17 20:07:24 +01:00
OpenStack Proposal Bot cc7bc7017a Updated from global requirements
Change-Id: I1b917be8fc98934141e20032ba4b7a374145dc61
2016-02-11 14:45:35 +00:00
Joshua Harlow da698e8511 Ensure all futures have completed before run returns
Now that shutdown can be skipped (which would previously
wait for all submitted futures to be finished) we need to have
a way to know that all submitted futures have been finished
before our run method returns.

A simple countdown barrier/latch does this so ensure that we use
it in the periodic run loop to be able to only return from the
run loop when no active futures are in progress.

Change-Id: Ia3dd84ebfe2416060aaf5113cc8310a23919a3f9
2016-02-09 10:03:57 -08:00
OpenStack Proposal Bot e7bbc502fe Updated from global requirements
Change-Id: I83acfbc37819b8004702305b7dcc3b7626893ade
2016-02-07 00:13:38 +00:00
Dmitry Tantsur 7a225a3a31 Allow PeriodicWorker to skip executor shutdown in case of a preexisting executor
The current behaviour of always shutting down the executor makes it troublesome
to use a precreated executor and makes completely impossible to use the same
executor for running PeriodicWorker itself (which is what I'm doing for Ironic).

This change adds a base class ExecutorFactory with 'shutdown' attribute
defaulting to True. It also adds a new class ExistingExecutor that takes an
existing executor and sets shutdown to False.

Change-Id: I6a574ba77439aeee46b9e154aa059098ec087308
2016-02-03 11:33:10 +01:00
Joshua Harlow 588c0770e9 Expose underlying futures.CancelledError
When a future is cancelled and the result is fetched
it will raise a CancelledError which is quite useful to
be able to catch.

So to enable catching that specific exception expose it
in futurist __init__.py so that people can easily catch
it just by catching futurist.CancelledError and handling
the outcome of that.

Change-Id: I7bc1838aadcbb8cd0d635da83bb1e1b1ec761e89
2016-01-26 17:11:22 -08:00
OpenStack Proposal Bot 7361553319 Updated from global requirements
Change-Id: Ibb973cd6e48441e461addd2a8b818f4738a2e4d3
2016-01-24 20:48:25 +00:00
OpenStack Proposal Bot 9c2a1a184c Updated from global requirements
Change-Id: I32ac08430f35278356061cff0120e841a09f3983
2016-01-17 01:10:09 +00:00
Jenkins b11b773ddf Merge "PeriodicWorker.create to accept arguments for periodic tasks" 2016-01-16 20:23:00 +00:00
Thomas Goirand 860242a940 Fixed debian/copyright ordering. 2016-01-16 03:55:18 +00:00
Thomas Goirand 9c1c412850 futurist 0.9.0 release
meta:version: 0.9.0
 meta:series: mitaka
 meta:release-type: release
 -----BEGIN PGP SIGNATURE-----
 
 iEYEABECAAYFAlZ4WF4ACgkQgNg6eWEDv1kEegCfb0XC5YZbdhrv4GC20epIIfPw
 LlgAnjKijGc+xVm1kPBh5w4w8LLuIyCL
 =Ev5u
 -----END PGP SIGNATURE-----

Merge tag '0.9.0' into debian/mitaka

futurist 0.9.0 release

meta:version: 0.9.0
meta:series: mitaka
meta:release-type: release
2016-01-16 03:49:08 +00:00
Thomas Goirand 510ca0a6b1 Now packaging 0.9.0 2016-01-16 03:48:51 +00:00
Thomas Goirand 706f29b01f Now packaging from debian/mitaka 2016-01-16 03:47:48 +00:00
Jenkins a57e1c8dba Merge "Modification of the example code" 2016-01-15 13:14:19 +00:00
Surojit Pathak 7283021caf Modification of the example code
To illustrate the fact that we can share code seemlessly with different
scheduling behavior, at ease with futurist. Moreover, the example code
shows how the concurrency/parallel execution can be observed from same
code, just by changing the executor. This demonstrates the power of
futurist interfaces.

Change-Id: Ifdd2a89c8cd9d06f54900960a69debc41b42ab3d
2016-01-14 23:18:30 +00:00
Jenkins 79eeb23680 Merge "Handle exceptions from executor.submit in PeriodicWorker" 2016-01-14 02:41:48 +00:00
Dmitry Tantsur 1f4aeed76b PeriodicWorker.create to accept arguments for periodic tasks
Sometimes it might be required to pass the same arguments to all
tasks collected by create (e.g. ironic passes context).

Change-Id: I7992c59e76b8b7b9101501d75cb7a53d982d07fd
2016-01-11 15:10:24 +01:00
Dmitry Tantsur b545f81bb9 Handle exceptions from executor.submit in PeriodicWorker
Currently PeriodicWorker fails if executor raises RejectedSubmission.
This change makes it catch RejectedSubmission and RuntimeError from
executor.submit and reschedule the task as soon as possible.

Change-Id: Ifff7850c9b44ee076f428ed3a613a13e182a549d
Closes-Bug: #1532255
2016-01-11 13:39:49 +01:00