refactor: improve skip stage detection, propagate context in downloader, and style log viewer#6928
Open
Parthtiw710 wants to merge 1 commit into
Open
Conversation
…er, and style log viewer Signed-off-by: Parthtiw710 <www.parthtiwari@gmail.com>
Author
|
@eeshaanSA @rahulshendre @khanhtc1202 i have added the context which was written in todo instruction comments, please look the changes. in prev pr i replaced waitgroup to do as mentioned in todo instrucions, i am currently working on todo instructions left in comments. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces performance optimizations, robustness improvements, and a UI enhancement to the log viewer:
DownloadBinaryto accept acontext.Contextand usehttp.NewRequestWithContext, enabling proper timeouts and cancellation.targetDSPduring stage skip checks, reducing network overhead and disk usage.statusReasonsupport toreportStageStatusto report skip reasons and failure messages to the control plane.Key Changes
⚙️ Piped & Launcher (Go)
pkg/lifecycle/binary.go/pkg/lifecycle/binary_test.go:ctx context.Contextparameter toDownloadBinary.http.NewRequestwithhttp.NewRequestWithContextto inherit cancellation signals.launcher.go,piped.go, and test assertions to propagate context.pkg/app/pipedv1/controller/scheduler.go:reportStageStatussignature to includestatusReason.StatusReasonfield insideReportStageStatusChangedRequest.pkg/app/pipedv1/controller/skipstage.go:gitClient.CloneinsidedetermineSkipStage.s.targetDSP.Get(ctx, io.Discard)to instantiate the repository object directly, preventing redundant repository clones.🎨 Web Frontend (TypeScript/React)
web/src/components/deployments-detail-page/log-viewer/log/index.tsx:useAuthhook to query the active user's identity.me?.subject, Directory~, and Filestage.log) constructed with Material UIBoxand CSSclipPathpolygons.