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

fix(KONFLUX-6398): fixes swapped pid and taskRunID #79

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/shared/components/pipeline-run-logs/logs/logs-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ export const getDownloadAllLogsCallback = (
allLogs += await getTaskRunLog(
workspace,
namespace,
pipelineRunUID,
taskRun?.metadata?.uid,
pipelineRunUID,
Copy link
Member

Choose a reason for hiding this comment

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

since you've changed the order of parameters and arguments as well, doe this PR changes something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Still needs testing because not on all places it is changed. But I do not have access to test it so trying to get that.

).then((log) => `${tasks[currTask].name.toUpperCase()}\n\n${log}\n\n`);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/__tests__/tekton-results.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ describe('tekton-results', () => {
it('should return the latest component build task run', async () => {
commonFetchJSONMock.mockReturnValueOnce(mockLogsRecordsList);
commonFetchTextMock.mockReturnValueOnce(Promise.resolve(mockLogResponse));
expect(await getTaskRunLog('test-ws', 'test-ns', 'pipelinerun-uid', 'test-id')).toEqual(
expect(await getTaskRunLog('test-ws', 'test-ns', 'test-id', 'pipelinerun-uid')).toEqual(
'sample log',
);
expect(commonFetchTextMock.mock.calls).toEqual([
Expand Down
2 changes: 1 addition & 1 deletion src/utils/tekton-results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ export const getTaskRuns = (
export const getTaskRunLog = (
workspace: string,
namespace: string,
pid: string,
taskRunID: string,
pid: string,
): Promise<string> =>
commonFetchText(
`${getTRUrlPrefix(workspace)}/${namespace}/results/${pid}/logs/${taskRunID}`,
Expand Down
Loading