DAVFoundation / missioncontrol

πŸ›° Controls and orchestrates missions between vehicles and DAV users
MIT License
181 stars 156 forks source link

Get rid of hasStore() calls throughout app #169

Closed TalAter closed 6 years ago

TalAter commented 6 years ago

Thank you for your help :heart:

What is this project?

DAV (Decentralized Autonomous Vehicles) is a new foundation working to build an open-source infrastructure for autonomous vehicles (cars, drones, trucks, robots, and all the service providers around them) to communicate and transact with each other over blockchain.

The specific project you are looking at is Mission Control. It is the brain in charge of orchestrating missions between DAV users and autonomous vehicles.

How you can help

When initially building the app, we imagined an option of running it outside of docker (i.e., without a Redis image available) for testing purposes. This isn't really feasible any more.

Still, there are a few instances throughout the app where we are testing for hasStore() - https://github.com/DAVFoundation/missioncontrol/search?q=hasstore&type=Code&utf8=%E2%9C%93

hasStore() returns false when running outside of an environment with Redis and then the code is supposed to return some default value instead of calling Redis. This hasn't really happened.

Now is the time to say farewell to hasStore() and remove all traces of it.

Contributing to Mission Control

Asking for help

We appreciate your effort in taking the time to work on this issue and help out the open source community and the foundation. If you need any help, feel free to ask below or in our gitter channel. We are always happy to help πŸ˜„

psalv commented 6 years ago

May I claim this issue?

If so I want to ensure my understanding of the issue is correct; the following files, and any traces of them, need to be deleted altogether since they currently only contain hasStore() information:

server/store/redis.js server/lib/environment.js test/specs/lib.environment.spec.js

Is this correct?

TalAter commented 6 years ago

We definitely do not want to delete server/store/redis.js

You want to change the code to always assume that had hasStore() been there, it would have returned true... you can delete the code that would have run had it returned false.

You can delete:

psalv commented 6 years ago

Ah I misread the issue, glad I asked. I understand now.

georgesco94 commented 6 years ago

Hello, I would like to try this issue if possible. Think it should be done pretty quick. Thanks

TalAter commented 6 years ago

I believe @psalv is already working on this issue.

psalv commented 6 years ago

Created pull request #175 for this issue.

cg-cnu commented 6 years ago

Thanks for your awesome work @psalv πŸ‘ Please join our gitter channel to find out about more opportunities to contribute to DAV and opensource πŸ™‚