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

upgrade moto #577

Merged
merged 1 commit into from
Oct 1, 2018
Merged

upgrade moto #577

merged 1 commit into from
Oct 1, 2018

Conversation

mattbennett
Copy link
Member

@mattbennett mattbennett commented Oct 1, 2018

This fixes the NoCredentialsError boto error in the examples tests

@mattbennett mattbennett merged commit 33ca58f into master Oct 1, 2018
mattbennett added a commit to bright-pan/nameko that referenced this pull request Oct 2, 2018
mattbennett added a commit that referenced this pull request Oct 2, 2018
mattbennett added a commit to rejoc/nameko that referenced this pull request Oct 2, 2018
mattbennett added a commit to rejoc/nameko that referenced this pull request Oct 2, 2018
mattbennett added a commit to iky/nameko that referenced this pull request Oct 2, 2018
mattbennett added a commit that referenced this pull request Oct 2, 2018
* split header encoding/decoding logic out into functions

* checkout: simplify methodproxy by not passing worker_ctx in

* checkpoint: avoid passing things down through the chain by using a partial

* minor tidyup and consistency

* checkpoint: standalone rpc proxy reimplemented without "queue consumer"

* restore call stack and timeout implementation

* test cleanup: proxy retries instead of throwing on connection errors

* test cleanup: we now attempt to reconnect forever rather than throwing on
the second failure

* test cleanup: consumeevent no longer exists

* test cleanup: we don't explicitly manage consumers anymore

* test cleanup: reply listener disconnection is now very similar to rpc
consumer disconnection

* longer expiries to ensure queue sticks around until we consume from it

* pyflakes

* additional test coverage for rpc requests longer than reply queue timeouts

* additional test for stopping and restarting standalone proxy

* new feature: use uuid of the standalone proxy in its call stack

* small refactor to pass queue into reply listener

* toxiproxy controller removed "reset" function

* add support for raising if reply queue expires with pending replies
now that the implementation supports it (standalone rpc proxy case)

* import sort

* unused import

* split header encoding/decoding logic out into functions

* additional test coverage for rpc requests longer than reply queue timeouts

* introduce "proxy" class replacing ServiceProxy and MethodProxy

* squash ServiceProxy and MethodProxy into one object; simplify ReplyListener

* unit test coverage for Proxy object

* refactor: simplify Proxy object by passing only get_reply rather than whole
reply listener

* add full publisher "options" to standalone proxy

* remove remaining deprecations ahead of 2.9.0

* remove unused helpers

* also update docs to remove deprecated param

* wait_for_worker_idle is also deprecated

* merge fixes

* static cleanup

* checkpoint: convert messaging.Consumer to use ConsumerMixin directly;
small test tweaks to accomoodate

* checkpoint: RpcConsumer no longer using QueueConsumer; small test tweaks

* move a couple of tests out of test_queue_consumer and into higher-level parts
of the codebase

* move heartbeat tests back into their own section

* test tidyup

* checkpoint: reply listener no longer using queue_consumer

* include ReplyListener in heartbeat tests

* TestDisconnectedWhileWaitingForReply can pass for the service proxy now

* remove tests that are now superseded by better
disconnection tests

* final purge of queue consumer

* remove final reference to QueueConsumer in regression test

* add regression tests detecting missed heartbeat

* don't block consumers on the worker pool

* better implementation

* checkpoint: DRY things out with a shared ConsumerMixin

* tidyup

* tidyup; actually include consumer core

* tidyup; remove queue consumer tests

* import sort

* missing import

* fix bad super call

* fix race condition in standalone rpc proxy check for pending messages

* don't need this call anymore

* don't need the setters

* repr no longer used

* nocover entrypoint that isn't executed by test

* Revert "fix race condition in standalone rpc proxy check for pending messages"

This reverts commit 58e2692.

* rpc proxy should redeclare reply queue in case inactive for longer than expiry time; this also fixes the race condition where disconnection-detection determines the reply queue to be expired when in fact it's still being declared (race based on how quickly rabbit responds)

* use more reliable passive queue declare
rather than the rabbit management api

* need absolute import

* drop other unreliable uses of rabbit_manager

* import sort

* cleaner interface for proxy/rpc-call/reply-listener; more inline docs

* static fixes

* add retry around queue checks to give rabbit some grace time

* actually run the retried functions

* refactor: use consumer as an object, not a mixin

* todo tidyup: remove unnecessary conditional

* todo tidyup: no need to pass serializer to responder

* todo tidyup: apply patches more consistently

* also remove serializer from responder tests

* todo tidyup: explict method to stop consumer;
it now requeues any subsequently received messages

* import sort

* more cleanup: remove unnecessary serializer attrs
and the incorrect comment referring to kombu

* can drop the complex fixture re-ordering now that
we don't wait for consumers to close gracefully
on kill (this has been fine since we started using
a vhost per test)

* add tests for new Consumer core

* DRY out temporary fixture by moving it to conftest

* add tests for container being killed to
publisher and event dispatcher

* replace existing rpc test for container being killed
with one following the same pattern as other entrypoints

* fix import

* don't need to do this because consumer.run just
executes in a managed thread; already tested elsewhere

* fix imports

* no cover pragmas

* tiny bit more cleanup: pass options to publisher earlier

* serializer arg not used by consumer

* rename "options" to "publisher_options"

* import sort

* tests for stopping consumers with active workers

* accept consumer options in amqp consuming extensions
(except rpc, because they all share a consumer)

* add autodoc'd modules so we check spelling

* spelling fixes

* restore AUTO_FIX_IMPORTS

* remove HeaderEncoder, HeaderDecoder classes

* serialization.setup() returning namedtuple

* add comment explaining why we have to use a background thread
to wait on the worker pool

* be more explicit determining target service/method

* speak like yoda i do

* upgrade moto (#577)
mattbennett pushed a commit that referenced this pull request Jan 4, 2019
* Global nameko config

Config made accessible outside container and workers - mainly in the service
definition, e.g.:

```python

from nameko.messaging import Consumer
from nameko import config

class Service:

    @consume(
        queue=Queue(
            exchange=config.MY_EXCHANGE,
            routing_key=config.MY_ROUTING_KEY,
            name=config.MY_QUEUE_NAME
        ),
        prefetch_count=config.MY_CONSUMER_PREFETCH_COUNT
    )
    def consume(self, payload):
        pass

```

* Fix import ordering

* Add ability to define config options via cli args

Example::
  $ nameko run service \
  --define AMQP_URI=pyamqp://guest:guest@localhost/yo \
  --define YO="{'yo': True}"

* Plain mutable dict is fine as config

* upgrade moto (#577)

* Add config setup and update managers

* No need for user config, a plain dict is fine

* Remove container config

Keep the config pproperty for backward compatibility but raise a warning
if accessed. Also remove config passing from the service runner.

* Migrate testing tooling to use nameko.config

Config fixtures now use config_setup and config_update context managers.

* Migrate container and service runner tests

Now once the test tooling is migrated we can make container and service
runner tests pass

* Upgrade messaging to use nameko.config

* Upgrade utils tests to use nameko.config

* Upgrade generic extensions tests to use nameko.config

* Upgrade RPC to use nameko.config

* Upgrade standalone RPC to use nameko.config

* Upgrade events to use nameko.config

* Upgrade standalone events to use nameko.config

* A few more test upgrades to nameko.config

* Upgrade web extensions to use nameko.config

* Docstring should use nameko.config example

* Upgrade cli moddule to use nameko.config

* upgrade all event tests to work with nameko.config

* don't nullify config in mock_container fixture

* Fix AMQP extensions after v3.0.0-rc merge (and conflicts resolution)

* Fix cli package after v3.0.0-rc merge (and conflicts resolution)

* Check toxiproxy tests

* Left test migration to nameko.config

* Deprecate config dependency provider

* A little PEP8 cleanup

* Fix import sorting

* Stop yielding configs by config fixtures

* Remove unused variable

* Upgrade pylint (a bit) to work well with p3.7

* Migrate serializing to use nameko.config

* Migrate SSL to use nameko.config

* Minor pep8 fixes

* Remove deprecated Config dependency provider from docs

* Deprecate --broker cli option

* Migrate docs examples to use nameko.config

* Remove "maybe" fixmes

* Retry on any error when deleting test rabbit vhosts

This would include connection error which is caught and wrapped into
generic exception. We can get connection refused if sqs requests
mock leaks to the vhost deleting green thread.

* Migrate docs testing examples to use nameko.config

* Finalize disconnection tests upgrade

* Test container config deprecated

* Upgrade test to work with latest kombu versions

This particularly changed:
celery/kombu@1160b92

* Remove forgotten broker default

* Always configure serialization in RPC client...

... even if some options come as arguments.

* More readable config tests

* Add a few comments to test cases

* Remove a fixture use - no need for it

* rename to update_config and setup_config
@mattbennett mattbennett deleted the fix-examples-tests branch May 3, 2020 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant