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

odo logs: add option to limit component logs to a particular container #5892

Open
3 tasks
rm3l opened this issue Jun 29, 2022 · 7 comments
Open
3 tasks

odo logs: add option to limit component logs to a particular container #5892

rm3l opened this issue Jun 29, 2022 · 7 comments
Labels
area/log Issues or PRs related to `odo logs` estimated-size/S (5-10) Rough sizing for Epics. Less then one sprint of work for one person kind/user-story An issue of user-story kind lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/Medium Nice to have issue. Getting it done before priority changes would be great.

Comments

@rm3l
Copy link
Member

rm3l commented Jun 29, 2022

/kind user-story

User Story

As an odo user, I want to limit the output of my component logs to a particular container, so that I can focus on that container and debug.

This is feedback received during the "Sprint 220" review.

Acceptance Criteria

  • odo logs should have a -c, --container option that returns the logs of this particular container
  • It should error out if there is no matching container
  • It should be possible to use this option along with the --follow flag

Links

/kind user-story

@openshift-ci openshift-ci bot added the kind/user-story An issue of user-story kind label Jun 29, 2022
@rm3l rm3l changed the title odo logs: add option to see logs of a particular container odo logs: add option to limit component logs to a particular container Jun 29, 2022
@rm3l rm3l changed the title odo logs: add option to limit component logs to a particular container odo logs: add option to filter component logs to a particular container Jun 29, 2022
@rm3l rm3l changed the title odo logs: add option to filter component logs to a particular container odo logs: add option to limit component logs to a particular container Jun 29, 2022
@dharmit
Copy link
Member

dharmit commented Jun 29, 2022

Before doing this, we first need to figure out a way to show the user the list of containers and segregate them to Dev mode or Deploy mode.

/area log

@openshift-ci openshift-ci bot added the area/log Issues or PRs related to `odo logs` label Jun 29, 2022
@valaparthvi
Copy link
Contributor

valaparthvi commented Jul 7, 2022

We've looked into several ways to approach this issue:

  1. odo logs --list-containers that lists containers before user can decide which container, and then run odo logs --container
  2. odo logs interactive mode that gives a list of containers to choose from
  3. odo logs --container [--pods]- odo logs should show what pod the container belongs to if there are multiple containers with the same name.
  4. provide completion for container names when running odo logs --container

We are inclined towards approach 3.

There might some changes to odo logs from #5872, we'll wait until that is in.
/status blocked

@valaparthvi valaparthvi added the status/blocked Denotes an issue or PR that is blocked on something (e.g., issue/PR in different repo) label Jul 7, 2022
@dharmit
Copy link
Member

dharmit commented Jul 7, 2022

We've looked into several ways to approach this issue:

  1. odo logs --list-containers that lists containers before user can decide which container, and then run odo logs --container

  2. odo logs interactive mode that gives a list of containers to choose from

  3. odo logs --container [--pods]- odo logs should show what pod the container belongs to if there are multiple containers with the same name.

  4. provide completion for container names when running odo logs --container

IMO, it should be odo list containers.

@kadel kadel added the priority/Medium Nice to have issue. Getting it done before priority changes would be great. label Jul 18, 2022
@cdrage cdrage added the estimated-size/S (5-10) Rough sizing for Epics. Less then one sprint of work for one person label Aug 4, 2022
@valaparthvi valaparthvi removed the status/blocked Denotes an issue or PR that is blocked on something (e.g., issue/PR in different repo) label Aug 18, 2022
@valaparthvi
Copy link
Contributor

We'll wait until we're GA since this is not a blocking feature.

@matthewhembree
Copy link

Accommodating logs from init containers would be helpful as well. Use cases might be for troubleshooting database migrations or Hashicorp Vault agent.

@github-actions
Copy link
Contributor

A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 30, 2023
@rm3l rm3l removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 30, 2023
Copy link
Contributor

A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 29, 2024
@rm3l rm3l added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/log Issues or PRs related to `odo logs` estimated-size/S (5-10) Rough sizing for Epics. Less then one sprint of work for one person kind/user-story An issue of user-story kind lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/Medium Nice to have issue. Getting it done before priority changes would be great.
Projects
Status: No status
Development

No branches or pull requests

6 participants