Giter Club home page Giter Club logo

astoria's People

Contributors

dependabot[bot] avatar raccube avatar sedders123 avatar trickeydan avatar willb97 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

astoria's Issues

astwifid

This is a meta-ticket to track the various parts required to implement astwifid.

  • Design #52
  • Implementation #53
  • Testing

astctl: Hide initial logger line

e.g 2021-01-30 19:27:08 astctl-10971672-b38c-4724-90ac-83b61bd7a50b INFO astctl-0788fa8e-3be1-4465-88e4-a262ff43581d v0.1.0 - Set a metadata attribute.

  • Ugly
  • Not useful for CLI tools

Documentation: Line Length and Wrapping

there's some variation in line wrapping between files โ€“ do you have opinions on whether we should hard-wrap docs or not (and if so, at how many columns)? it's already inconsistent in the existing docs, so don't worry about changing anything this pr, but possibly something to consider

I'm not really sure where I sit on this. I'll open an issue and we can discuss this evening.

Originally posted by @trickeydan in #20 (comment)

Create a mock version of astdiskd

Create a replacement for astdiskd (astdiskd-mock) which can be used to manually add/remove fake disks pointing to a directory on the filesystem.

debian: gmqtt and dbus-next dependencies are missing

Solutions:

  • Add repo containing those packages to build process
  • Override package names in debian folder
I: dh_python3 pydist:224: Cannot find package that provides dbus_next. Please add package that provides it to Build-Depends or add "dbus_next python3-dbus-next" line to debian/py3dist-overrides or add proper dependency to Depends by hand and ignore this info.
I: dh_python3 pydist:224: Cannot find package that provides gmqtt. Please add package that provides it to Build-Depends or add "gmqtt python3-gmqtt" line to debian/py3dist-overrides or add proper dependency to Depends by hand and ignore this info.

Unit Tests

  • Data Components
    • Data Component class
    • Consumer Base Class
    • Manager Base Class
  • astprocd messages
  • MQTTWrapper
  • astctl
    • astctl event
    • astctl list-disks
  • Managers
    • astdiskd
    • astprocd
      • UsercodeLifecycle / Execution
    • astmetad

astctl: Common command class

We should use a common class for commands to reduce code overlap.

The class should also handle the timeout issue

Deprecate bundle.toml

We have decided that we no longer want bundle.toml to be used inside the bundle file.

astctl static-disk remove-all doesn't work

Error message:

2021-10-23 19:28:45 astdiskd INFO Static disk 1e24acb1-0169-4516-862e-4334dded6ff3 mounted (/home/dan/Code/sr/sr-robot3/examples)
2021-10-23 19:29:29 astdiskd INFO Static disk static-1e24acb1-0169-4516-862e-4334dded6ff3 unmounted (/home/dan/Code/sr/sr-robot3/examples)
2021-10-23 19:29:29 astdiskd ERROR Task exception was never retrieved
future: <Task finished name='Task-121' coro=<StateManager._register_request.<locals>._handler() done, defined at /home/dan/.cache/pypoetry/virtualenvs/sr.robot3-y247SDwh-py3.9/lib/python3.9/site-packages/astoria/common/manager.py:73> exception=RuntimeError('dictionary changed size during iteration')>
Traceback (most recent call last):
  File "/home/dan/.cache/pypoetry/virtualenvs/sr.robot3-y247SDwh-py3.9/lib/python3.9/site-packages/astoria/common/manager.py", line 76, in _handler
    response = await handler(req)
  File "/home/dan/.cache/pypoetry/virtualenvs/sr.robot3-y247SDwh-py3.9/lib/python3.9/site-packages/astoria/managers/astdiskd/static.py", line 106, in handle_remove_all_static_disks
    for uuid, path in self.disks.items():
RuntimeError: dictionary changed size during iteration
^C2021-10-23 19:30:15 astdiskd INFO Halting

tests/data/exec_code: Store test data outside of zip

We currently store test zip files, whilst this is useful to have, it is also incredibly difficult to look at exactly what code the unit tests are running.

We should zip these before running the unit tests in a temp directory. Binary files in git isn't fun.

Reject old robot.zip

Check if info.yaml or wifi.yaml (yml too)are present in the robot.zip, if so the reject the zip and print an error stating that this is an incompatible (old) zip.

May be worth checking for overlay files too.

Might be worth doing this at the same time as #54

MQTT client collision breaks existing processes

If a second process connects to the broker with the same client ID, it breaks the existing client.

It should raise an exception on the new client.

This behaviour is important as we don't want multiple instances of state managers.

astwifid: Design

We will need to design the various states that astwifid can be in.

e.g client mode / AP mode.

It will need to listen to information from astmetad to listen for changes in credentials, region and robot mode (i.e comp / dev)

The design should be added to the design section of the documentation and must include a state machine diagram.

Documentation

  • Running astoria
  • Writing new State Managers / Consumers
  • Architecture / State Diagrams
  • Code documentation

New Message Type: Events

Published by a state manager or consumer to /astoria/event/event-name (retain=False)

Potential Format

class EventData(pydantic.BaseModel):
	event_name: str
	triggering_component: str (Client name of triggering component)
	data: str  # Must always be a string

Use Cases

  • Broadcast of logs in real-time from astprocd (#22)
  • Start button trigger (#23)

Race Condition in dependency waiting

Introduced in 832ad05

If waiting on multiple dependencies, there is a possible race condition.

  • foo depends on bar and bees
  • foo starts and waits for bar and bees
  • bar starts
  • foo marks bar as started
  • bar stops
  • bees starts
  • foo marks bees as started
  • foo starts as all dependencies are satisfied (they aren't)

Packaging

We should package this application for:

  • Debian
  • PyPI
    • Automate PyPI upload in CI

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.