hyperledger / aries-agent-test-harness

Aries agent test framework, with agent backchannel support
https://aries-interop.info
Apache License 2.0
60 stars 65 forks source link

Create VS Code Dev Container for AATH and Backchannels #768

Closed nodlesh closed 4 months ago

nodlesh commented 7 months ago

To make it easier for community participation in AATH Test Development and Backchannel development, we need Dev Containers that work with VS Code so these project areas can be worked on without having to install libraries on local machines. It will be a quick way to just start developing instead of fussing with configurations.

Patrik-Stas commented 7 months ago

Hi @nodlesh this sounds like generally good initiative. Any way of lowering barrier is great, though as non-VS Code user, I wish I could conveniently develop AATH without using VS Code. Full disclaimer - I am not sure what "VS Code Dev Container" is, and whether or not that can be used outside of VS Code.

In our team, colleague of mine @mirgee been undertaking AATH testing work in past. Given his first have experience, he could probably have more insights, but I would like to take this Github Issue as a chance to share my "wishlist" for AATH dev experience.

Before I go ahead, let me briefly set terminology for this post, from dev perspective:

Now back to my wishlist ^_^

  1. Ability to run all external components in docker. Sounds like what this Github Issue is about - I don't want to worry about how to configure external backchannels and their dependencies. I just want to run them.
  2. Ability to run component under test in localhost, any way I want, without this being concern of AATH. This might be more tricky in conjuction with the previous point 1.. But this I find to to be crucial property of making AATH more accessible. As developer, I want to be able to make changes to my code locally, rerun AATH testcase and get the result. What I don't want, is having to build my own docker container, in order to test the component under test.

The bottom line of these 2 points is that "I don't want to care how AATH works" and "I don't want AATH to care how my backchannel works, and how/where it runs". I can foresee some technical complications enabling the 2. point on both linux/mac because of networking differences on docker between the 2 platforms, but I think should be solveable.

Honestly I am not sure what's exactly the current state of art, and how much of this "wishlist" already intersects with the reality. Just sharing, I'll appreciate your thoughts~

nodlesh commented 7 months ago

Thanks for the feedback @Patrik-Stas. The work in this issue is about developing and running agents and tests in the context of developing code (test code or backchannel code). I have the immediate use case where I want to develop the AFJ backchannel however I do not want to install all the libraries locally to run and debug from my IDE (VS Code in this case). Having to install AFJ, supporting libraries, and backchannel test libraries will certainly be a pain and error prone. So what this will do is allow me to use the docker container(s) as if the internal container system is running with my local VS Code. Allowing me to run and debug without ever having to understand the system configuration that allows AFJ and the backchannel to run properly in that container. This should set developers free of having to fully understand AATH or the backchannels in order to develop in them. They can just start writing tests on day one, or writing/updating backchannels on day one. From what I understand the dev containers is an open standard so it can be done with other IDEs. Though there are specifics to VS Code in what I am doing, after I get it working with VS Code I'll see what it takes to generalize it for those not working in VS Code.

I'm not completely understanding your wishlist in this context, but maybe AATH already gets you close, and with the Dev Containers may get you the rest of the way. Right now you can run all external components in docker. You can even do it without running tests by using the ./manage start command. You can start backchannels from any aries framework with this command and have them running, while you are writing AATH tests in your IDE and running/debugging them against the running backchannels and services. When I get the dev containers working, even the code and the supporting infrastructure won't have to be local but in that dev container.

In the end you will run regular docker containers for the services, backchannels, and tests you don't want to write code for, and then run dev containers for the services, backchannels, and tests you want to code.

Let me know where I'm unclear of your requests. I appreciate your feedback.