Skip to content

feat(api server): add support for streaming logs from completed analysisruns#3678

Merged
krancour merged 11 commits intoakuity:mainfrom
krancour:krancour/verification-logs-endpoint
Mar 24, 2025
Merged

feat(api server): add support for streaming logs from completed analysisruns#3678
krancour merged 11 commits intoakuity:mainfrom
krancour:krancour/verification-logs-endpoint

Conversation

@krancour
Copy link
Member

@krancour krancour commented Mar 19, 2025

WIP

Back end components of #3641

Still needs corresponding functionality added to CLI. Done

UI components to be added in a follow-up PR. (#3674)

cc @jessesuen @hiddeco @Marvin9 @gdsoumya

@krancour krancour added kind/enhancement An entirely new feature priority/high Needs to be addressed sooner rather than later area/api-server Affects Kargo's API server labels Mar 19, 2025
@krancour krancour added this to the v1.4.0 milestone Mar 19, 2025
@krancour krancour self-assigned this Mar 19, 2025
@krancour krancour requested a review from a team as a code owner March 19, 2025 22:45
@krancour krancour marked this pull request as draft March 19, 2025 22:45
@netlify
Copy link

netlify bot commented Mar 19, 2025

Deploy Preview for docs-kargo-io ready!

Name Link
🔨 Latest commit d59ae83
🔍 Latest deploy log https://app.netlify.com/sites/docs-kargo-io/deploys/67e1a5aa04128e0008730eeb
😎 Deploy Preview https://deploy-preview-3678.docs.kargo.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov
Copy link

codecov bot commented Mar 19, 2025

Codecov Report

Attention: Patch coverage is 43.77990% with 235 lines in your changes missing coverage. Please review.

Project coverage is 21.90%. Comparing base (1e623df) to head (d59ae83).
Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
internal/server/get_analysisrun_logs_v1alpha1.go 59.21% 120 Missing and 4 partials ⚠️
internal/cli/cmd/logs/logs.go 0.00% 78 Missing ⚠️
...ice/v1alpha1/svcv1alpha1connect/service.connect.go 0.00% 18 Missing ⚠️
internal/server/config/config.go 0.00% 10 Missing ⚠️
internal/cli/option/flag.go 0.00% 4 Missing ⚠️
cmd/cli/root.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3678      +/-   ##
==========================================
+ Coverage   21.81%   21.90%   +0.09%     
==========================================
  Files         310      312       +2     
  Lines       64652    65210     +558     
==========================================
+ Hits        14105    14287     +182     
- Misses      49782    50154     +372     
- Partials      765      769       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
@krancour krancour force-pushed the krancour/verification-logs-endpoint branch from 1a34a9e to 7cd2fb6 Compare March 20, 2025 19:25
@krancour krancour marked this pull request as ready for review March 20, 2025 19:26
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>

Co-authored-by: Hidde Beydals <hiddeco@users.noreply.github.com>
@krancour
Copy link
Member Author

Thanks for reviewing @hiddeco. Going to hold off on merge until I've heard from @Marvin9 and @gdsoumya as I want to be sure this meshes well with things they are each working on.

@krancour krancour added the do not merge yet Denotes a PR that a maintainer is explicitly requesting NOT yet be merged by their peers label Mar 20, 2025
@Marvin9
Copy link
Contributor

Marvin9 commented Mar 21, 2025

I am testing this against UI

Copy link
Contributor

@Marvin9 Marvin9 left a comment

Choose a reason for hiding this comment

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

Stamp for UI

{{- range $key, $value := .Values.api.rollouts.logs.httpHeaders }}
{{- $headers = append $headers (printf "%s=%s" $key $value) }}
{{- end }}
ANALYSIS_RUN_LOG_HTTP_HEADERS: {{ quote (join "," $headers) }}
Copy link
Contributor

Choose a reason for hiding this comment

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

just ensuring the expected value here is header1=val1,header2=val2,... right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct

Copy link
Member Author

Choose a reason for hiding this comment

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

It's also tolerant of whitespace around commas if there should happen to be any.

Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
@krancour krancour removed the do not merge yet Denotes a PR that a maintainer is explicitly requesting NOT yet be merged by their peers label Mar 24, 2025
@krancour krancour added this pull request to the merge queue Mar 24, 2025
Merged via the queue into akuity:main with commit ec8d3f7 Mar 24, 2025
18 checks passed
@krancour krancour deleted the krancour/verification-logs-endpoint branch March 24, 2025 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api-server Affects Kargo's API server kind/enhancement An entirely new feature priority/high Needs to be addressed sooner rather than later

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants