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

Add debug support taskrun #627

Merged
merged 15 commits into from
Oct 5, 2021
Merged

Conversation

sudhirverma
Copy link
Contributor

@sudhirverma sudhirverma commented Sep 25, 2021

Fix: #623

@codecov-commenter
Copy link

codecov-commenter commented Sep 27, 2021

Codecov Report

Merging #627 (9a4e55d) into master (03f7726) will increase coverage by 0.66%.
The diff coverage is 73.38%.

❗ Current head 9a4e55d differs from pull request most recent head 8f16fff. Consider uploading reports for the commit 8f16fff to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #627      +/-   ##
==========================================
+ Coverage   67.62%   68.29%   +0.66%     
==========================================
  Files         103      111       +8     
  Lines        6333     6592     +259     
  Branches     1154     1185      +31     
==========================================
+ Hits         4283     4502     +219     
- Misses       2050     2090      +40     
Impacted Files Coverage Δ
src/kubectl.ts 44.82% <0.00%> (+17.24%) ⬆️
src/tree-view/debug-node.ts 45.16% <45.16%> (ø)
src/debugger/debugExplorer.ts 46.66% <46.66%> (ø)
src/debugger/debug-tree-view.ts 54.34% <54.34%> (ø)
src/extension.ts 81.72% <63.63%> (-1.14%) ⬇️
src/cli-command.ts 67.70% <68.18%> (+0.04%) ⬆️
src/tkn.ts 77.41% <80.00%> (-0.10%) ⬇️
src/debugger/show-in-terminal.ts 93.33% <93.33%> (ø)
src/debugger/debug.ts 98.27% <98.27%> (ø)
src/context-type.ts 100.00% <100.00%> (ø)
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 03f7726...8f16fff. Read the comment docs.

package.json Outdated
@@ -987,4 +1046,4 @@
"validator": "^11.0.0",
"vscode-kubernetes-tools-api": "1.3.0"
}
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add new line, please

@evidolob
Copy link
Collaborator

@sudhirverma I got this error:
Screenshot 2021-09-27 at 15 18 38
When try to start task run with debug.

And other suggestion, I think it would be better to swap tektonhub and debug view, to keep tektonhub last.

Copy link
Collaborator

@evidolob evidolob left a comment

Choose a reason for hiding this comment

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

Overall works great

export async function debugTreeView(): Promise<TektonNode[]> {
if (sessions && sessions.size !== 0) {
const children = [];
for (const [key, value] of sessions) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please fix 'value' is assigned a value but never used

import * as sinonChai from 'sinon-chai';
import sinon = require('sinon');
import { DebugExplorer } from '../../src/debugger/debugExplorer';
import { TestItem } from '../tekton/testTektonitem';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please fix 'TestItem' is defined but never used

import sinon = require('sinon');
import { DebugExplorer } from '../../src/debugger/debugExplorer';
import { TestItem } from '../tekton/testTektonitem';
import { TknImpl } from '../../src/tkn';
Copy link
Collaborator

Choose a reason for hiding this comment

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

And this 'TknImpl' is defined but never used

@sudhirverma sudhirverma marked this pull request as ready for review September 29, 2021 13:26
@@ -408,6 +416,42 @@ export class Command {
}
}

static loginToContainer(container: string, podName: string, namespace: string): CliCommand {
if (ocFallBack.get('ocFallBack')) {
return newOcCommand('exec', '-it', '-n', namespace, '-c', container, podName, 'bash');
Copy link
Collaborator

Choose a reason for hiding this comment

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

I receive message
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
Could you verify that, and use new type of the command

Copy link
Contributor Author

@sudhirverma sudhirverma Sep 30, 2021

Choose a reason for hiding this comment

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

okay I will use kubectl exec mypod -i -t -- bash

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@evidolob done

@sudhirverma sudhirverma merged commit 19599f1 into redhat-developer:master Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add debug support in vscode
3 participants