Skip to content

Handle missing Endpoint key on directory refresh #455

@geoffxy

Description

@geoffxy
Traceback (most recent call last):                                                               
  File "<frozen runpy>", line 198, in _run_module_as_main                                        
  File "<frozen runpy>", line 88, in _run_code                                                   
  File "/home/geoffxy/projects/brad/src/brad/calibration/measure_load.py", line 292, in <module> 
    main()                                                                                       
  File "/home/geoffxy/projects/brad/src/brad/calibration/measure_load.py", line 149, in main     
    asyncio.run(directory.refresh())                                                             
  File "/home/geoffxy/.pyenv/versions/3.11.3/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)                                                                      
           ^^^^^^^^^^^^^^^^                                                                      
  File "/home/geoffxy/.pyenv/versions/3.11.3/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)                                                   
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                   
  File "/home/geoffxy/.pyenv/versions/3.11.3/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()                                                                       
           ^^^^^^^^^^^^^^^                                                                       
  File "/home/geoffxy/projects/brad/src/brad/provisioning/directory.py", line 141, in refresh    
    await self.refresh_impl()                                                                    
  File "/home/geoffxy/projects/brad/src/brad/provisioning/directory.py", line 162, in refresh_impl
    redshift = await self._refresh_redshift()                                                    
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                    
  File "/home/geoffxy/projects/brad/src/brad/provisioning/directory.py", line 261, in _refresh_redshift
    "endpoint_address": cluster["Endpoint"]["Address"],                                          
                        ~~~~~~~^^^^^^^^^^^^                                                      
KeyError: 'Endpoint'                          

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions