Skip to content

feat: wf logs #6606

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

Merged
merged 2 commits into from
May 23, 2025
Merged

feat: wf logs #6606

merged 2 commits into from
May 23, 2025

Conversation

nishant-d
Copy link
Member

@nishant-d nishant-d commented May 23, 2025

Description

Fixes https://github.com/devtron-labs/sprint-tasks/issues/2286

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit/api test cases.

Does this PR introduce a user-facing change?


Copy link

@Copilot 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.

Pull Request Overview

This PR introduces a new boolean parameter, followLogs, to the log fetching functions across several modules so that log streaming can be optionally followed. Key changes include updating function signatures in the CiLogService, both deployment and build HandlerService implementations, and modifying REST handlers to parse and pass the followLogs parameter.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/pipeline/CiLogService.go Updated the FetchRunningWorkflowLogs function to accept and forward the followLogs parameter.
pkg/deployment/trigger/devtronApps/prePostWfAndLogsCode.go Modified GetRunningWorkflowLogs and its helper to include the new followLogs parameter.
pkg/deployment/trigger/devtronApps/HandlerService.go Updated the interface and implementation signatures to incorporate followLogs.
pkg/build/trigger/HandlerService.go Added the followLogs parameter to log retrieval functions and updated corresponding internal calls.
api/restHandler/app/pipeline/configure/DeploymentPipelineRestHandler.go Parsed the followLogs query parameter and passed it to the service call.
api/restHandler/app/pipeline/configure/BuildPipelineRestHandler.go Similarly parsed and passed the followLogs parameter in GetBuildLogs.
Comments suppressed due to low confidence (1)

pkg/build/trigger/HandlerService.go:1688

  • Ensure that the addition of the followLogs parameter maintains backward compatibility with existing clients or that the change is adequately communicated in release notes.
func (impl *HandlerServiceImpl) GetRunningWorkflowLogs(workflowId int, followLogs bool) (*bufio.Reader, func() error, error) {

@nishant-d nishant-d changed the title wf logs feat: wf logs May 23, 2025
@nishant-d nishant-d changed the title feat: wf logs feat: wf logs May 23, 2025
@nishant-d nishant-d changed the base branch from main to develop May 23, 2025 11:09
Copy link

@nishant-d nishant-d merged commit 0f53272 into develop May 23, 2025
6 checks passed
@nishant-d nishant-d deleted the wf-log-follow branch May 23, 2025 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants