Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • bliss bliss
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 556
    • Issues 556
    • List
    • Boards
    • Service Desk
    • Milestones
  • Jira
    • Jira
  • Merge requests 148
    • Merge requests 148
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • BlissBliss
  • blissbliss
  • Merge requests
  • !3220

Resolve "test: gevent thread exception is back"

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Wout De Nolf requested to merge 2259-test-gevent-thread-exception-is-back into master Dec 03, 2020
  • Overview 16
  • Commits 6
  • Pipelines 18
  • Changes 29

Closes #2259 (closed)

  • Redis connections created with single_connection_client=True were not all closed by clean_all_redis_connection (in addition single connections and reusable connections were stored in the same dict so you could in principle end up reusing a single connection)

  • Added tests for Redis connection cleanup (introduced clean_socket in analogy to clean_gevent)

  • Change the modbus server from the test suite from threaded (yikes) to subprocess

  • Add some docstrings to the Beacon connection class + minor refactoring/renaming of internals (the words "connection" and "pool" should be chosen with care)

  • What we called a Redis connection is not a Redis connection, it is a proxy (like tango's DeviceProxy). Refactor to make that clear:

    • get_redis_proxy: returns SafeRedisDbProxy
    • get_fixed_connection_redis_proxy: returns FixedConnectionRedisDbProxy
    • get_redis_connection: returns redis.Redis (DEPRECATED)

    This is applied to bliss.config.conductor.connection.Connection and bliss.config.conductor.client.

  • The new redis_connection.py module removes the Redis logic from connection.py which is for the Beacon connection. For example this is more or less what Connection.get_redis_proxy does (without the caching and cleanup sugar):

    from bliss.config.conductor.redis_connection import create_connection_pool
    pool = create_connection_pool("redis://localhost:25002", db=1)
    rdb_proxy = pool.create_proxy()
    # The proxy provides an API for Redis commands:
    print(rdb_proxy.keys())
Edited Dec 06, 2020 by Wout De Nolf
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 2259-test-gevent-thread-exception-is-back