Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support non-interactive mode (IDFGH-13828) #18

Open
3 tasks done
alanmosely opened this issue Oct 6, 2024 · 3 comments
Open
3 tasks done

Support non-interactive mode (IDFGH-13828) #18

alanmosely opened this issue Oct 6, 2024 · 3 comments

Comments

@alanmosely
Copy link

alanmosely commented Oct 6, 2024

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate.
  • Described the feature in detail and justified the reason for the request.
  • Provided specific use cases and examples.

Feature description

I am adding esp-idf integration to Dagger (see https://daggerverse.dev/mod/github.com/alanmosely/daggerverse/esp-idf) and one of the things I'd like to support is running idf.py monitor within the official Espressif IDF Docker image.

This is not currently possible using Dagger as it does not pass in stdin (see with_exec docs) so I get the error: Monitor requires standard input to be attached to TTY

In #14233, which covers a related issue, @dobairoland suggests creating a non-interactive mode for IDF monitor where if no stdin is attached, all interactive features are disabled with a warning - this is what this task is requesting

Use cases

Running monitor as part of an automated pipeline, in my case, a Dagger build

Alternatives

Modify Dagger SDK to be able to attach stdin - this would be a Dagger-specific workaround

Additional context

No response

@github-actions github-actions bot changed the title Support non-interactive mode Support non-interactive mode (IDFGH-13828) Oct 6, 2024
@dobairoland
Copy link
Collaborator

We will consider this feature request but with lower priority.

I just want to point out that ESP-IDF, idf.py monitor and the underlying esp-idf-monitor are all designed for interactive console-based terminals. So requests about using it in various IDEs go against its core ideas. IMO IDEs could implement much nicer monitors because they can exploit the full benefit and tools of graphical user interfaces. I'm a little worried that addressing this will be just the first step on a road full of requests to handle IDEs - which is not the goal of esp-idf-monitor.

This is not a rejection of the idea, just an explanation why we don't jump into the implementation immediately.

@igrr
Copy link
Member

igrr commented Oct 7, 2024

Just to add, for testing ESP-IDF-based applications in CI, we generally recommend pytest-embedded. It allows checking the application output as well as sending commands to the application.

(If there is a specific reason why you'd like to run specifically idf.py monitor in a CI pipeline, rather than something like pytest-embedded, we'd love to hear it!)

@alanmosely
Copy link
Author

Thanks for the feedback, makes sense.

Dagger supports more than just running as part of an automated CI pipeline, it enables local development, ie running and debugging pipelines locally - in this situation, being able to run monitor would be quite helpful.

With my module, on a clean machine with just Git, Docker/Podman and Dagger installed, you can trivially and repeatably run any idf.py command (except for monitor) against any esp-idf or esp-adf version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants