Skip to content

frontend: Add feature to view deploy/rs/ds logs#2581

Merged
joaquimrocha merged 1 commit intomainfrom
multi-pods-logs
Feb 21, 2025
Merged

frontend: Add feature to view deploy/rs/ds logs#2581
joaquimrocha merged 1 commit intomainfrom
multi-pods-logs

Conversation

@knrt10
Copy link
Member

@knrt10 knrt10 commented Nov 18, 2024

This adds feature to view all the pods of pods in a deployment/ReplicaSet/DaemonSet rather than going to a specific pod.

Fixes: #2552

Testing

  • Create a deployment kubectl create deployment nginx --image=nginx --replicas=3
  • Run the app and navigate to the deployment/replica set/daemon set.
  • Click on the logs button to view the logs of all the workloads in the deployment

Screenshots

Screenshot 2024-11-29 at 2 59 43 PM Screenshot 2024-11-29 at 2 59 50 PM

@knrt10 knrt10 requested a review from a team November 18, 2024 02:59
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Nov 18, 2024
@knrt10
Copy link
Member Author

knrt10 commented Nov 18, 2024

So weird, I ran the tests locally, updated snapshots, wonder why it is still failing 🤔

@knrt10 knrt10 marked this pull request as draft November 18, 2024 09:50
@knrt10
Copy link
Member Author

knrt10 commented Nov 18, 2024

Changing some UX for this

@knrt10 knrt10 marked this pull request as ready for review November 29, 2024 09:31
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Nov 29, 2024
@knrt10
Copy link
Member Author

knrt10 commented Nov 29, 2024

Updated, please review

@knrt10 knrt10 force-pushed the multi-pods-logs branch 3 times, most recently from 46a12fb to 7daec5f Compare December 2, 2024 03:00
@knrt10 knrt10 force-pushed the multi-pods-logs branch 2 times, most recently from 7848c4f to 016f070 Compare December 16, 2024 09:21
@illume illume requested a review from Copilot January 3, 2025 07:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 41 out of 57 changed files in this pull request and generated no comments.

Files not reviewed (16)
  • frontend/src/components/common/Resource/MainInfoSection/snapshots/MainInfoSection.Normal.stories.storyshot: Language not supported
  • frontend/src/components/common/Resource/MainInfoSection/snapshots/MainInfoSection.NullBacklink.stories.storyshot: Language not supported
  • frontend/src/components/configmap/snapshots/Details.Empty.stories.storyshot: Language not supported
  • frontend/src/components/configmap/snapshots/Details.WithBase.stories.storyshot: Language not supported
  • frontend/src/components/crd/snapshots/CustomResourceDefinition.Details.stories.storyshot: Language not supported
  • frontend/src/components/crd/snapshots/CustomResourceDetails.NoError.stories.storyshot: Language not supported
  • frontend/src/components/cronjob/snapshots/CronJobDetails.EveryAst.stories.storyshot: Language not supported
  • frontend/src/components/cronjob/snapshots/CronJobDetails.EveryMinute.stories.storyshot: Language not supported
  • frontend/src/components/endpoints/snapshots/EndpointDetails.Default.stories.storyshot: Language not supported
  • frontend/src/components/endpoints/snapshots/EndpointDetails.Error.stories.storyshot: Language not supported
  • frontend/src/components/horizontalPodAutoscaler/snapshots/HPADetails.Default.stories.storyshot: Language not supported
  • frontend/src/components/horizontalPodAutoscaler/snapshots/HPADetails.Error.stories.storyshot: Language not supported
  • frontend/src/components/ingress/snapshots/ClassDetails.Basic.stories.storyshot: Language not supported
  • frontend/src/components/ingress/snapshots/ClassDetails.WithDefault.stories.storyshot: Language not supported
  • frontend/src/components/ingress/snapshots/Details.WithResource.stories.storyshot: Language not supported
  • frontend/src/components/ingress/snapshots/Details.WithTLS.stories.storyshot: Language not supported

Copy link
Contributor

@illume illume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will be a very useful feature for people. It's very often the case I've personally wanted to look at all the logs in a deployment rather than ones from just one pod.

I think the error states could be added for if any request fails. Left a couple of notes in the spots I think they could be handled.

Maybe not in this PR... but it would probably good to add a loading state? I'm not sure if the logs already have a loading state? (I didn't look).

Adding some states into a LogsButton.stories.tsx would be nice to have.

@knrt10 knrt10 requested a review from illume January 20, 2025 05:33
@knrt10
Copy link
Member Author

knrt10 commented Jan 20, 2025

Updated the PR, please review

@knrt10
Copy link
Member Author

knrt10 commented Jan 20, 2025

Maybe not in this PR... but it would probably good to add a loading state? I'm not sure if the logs already have a loading state? (I didn't look).

I checked and can confirm that there isn't currently any loading state implemented for the logs

Adding some states into a LogsButton.stories.tsx would be nice to have.

You're right - it would be good to add loading states for:

  • Initial pod fetching
  • Log stream initialization
  • Reconnection attempts

But I guess we can do it in a separate PR. WDYT?

@knrt10 knrt10 force-pushed the multi-pods-logs branch 2 times, most recently from d8e8756 to ae23695 Compare January 20, 2025 05:44
@knrt10 knrt10 changed the title frontend: Add feature to view deploy logs frontend: Add feature to view deploy/rs/ds logs Feb 3, 2025
@knrt10 knrt10 requested a review from joaquimrocha February 3, 2025 05:37
@knrt10 knrt10 force-pushed the multi-pods-logs branch 3 times, most recently from b88a765 to 0cff437 Compare February 3, 2025 05:44
This adds feature to view all the pods of pods in deploy, replicaSet,
daemonSet rather than a specific pod.

Fixes: #2552

Signed-off-by: Kautilya Tripathi <ktripathi@microsoft.com>
@dosubot dosubot bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 21, 2025
@joaquimrocha
Copy link
Contributor

Nice work. I think we can iterate later to add things like showing all containers' logs too.

@joaquimrocha joaquimrocha merged commit a229907 into main Feb 21, 2025
19 checks passed
@joaquimrocha joaquimrocha deleted the multi-pods-logs branch February 21, 2025 17:52
@illume illume added kind/feature Categorizes issue or PR as related to a new feature. frontend Issues related to the frontend labels Feb 26, 2025
@illume illume added this to the v0.29.0 milestone Feb 26, 2025
@joaquimrocha joaquimrocha moved this from Queued to Done in Headlamp Release Plan / Roadmap Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboard frontend Issues related to the frontend kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Development

Successfully merging this pull request may close these issues.

FEATURE REQUEST - Multi pod logs

3 participants