golemfactory / yapapi

Python high-level API for Golem.
https://yapapi.readthedocs.io/en/stable/
GNU Lesser General Public License v3.0
48 stars 23 forks source link

It is unknown how to set gftp service bus url properly #1069

Open lucekdudek opened 1 year ago

lucekdudek commented 1 year ago

As for now, yapapi is passing GSB_URL implicitly via os.environ.

        env = dict(os.environ, RUST_LOG="debug") if self._debug else None
        self._proc = await asyncio.create_subprocess_shell(
            "gftp server", stdout=asyncio.subprocess.PIPE, stdin=asyncio.subprocess.PIPE, env=env
        )

https://github.com/golemfactory/yapapi/blob/b89b1323bf156466d884dc938937e36ccbdc8d75/yapapi/storage/gftp.py#L99-L102

This behavior should be changed so it is explicit and doesn't result in unintentional behaviors (e.g. set variables that user would not want to set when using gftp). Additionally we need to allow users to set the gsb url in a clear way from python code level.