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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

consolidate_go_stacktrace.py: Use relative paths by default #21673

Merged
merged 1 commit into from
Oct 18, 2022

Conversation

michi-covalent
Copy link
Contributor

@michi-covalent michi-covalent commented Oct 11, 2022

consolidate_go_stacktrace.py changes Cilium file prefix to // by default, which is not very useful. Convert Cilium file paths to relative paths instead. This commit does not change the behavior when --source-dir is specified.

to paste stack trace to goland:

  • shift-shift to open global search
  • search for Analyze Stack Trace or Thread Dump...
  • paste the stack trace and click OK 馃殌

Signed-off-by: Michi Mutsuzaki michi@isovalent.com

consolidate_go_stacktrace.py: Use relative paths by default

consolidate_go_stacktrace.py changes Cilium file prefix to // by
default, which is not very useful. Convert Cilium file paths to
relative paths instead. This commit does not change the behavior
when --source-dir is specified.

Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
@michi-covalent michi-covalent added the release-note/misc This PR makes changes that have no direct user impact. label Oct 11, 2022
@michi-covalent
Copy link
Contributor Author

michi-covalent commented Oct 11, 2022

tested both with and without -s $(pwd) flag.

  • with -s $(pwd)
created by github.com/cilium/cilium/pkg/endpointmanager.(*EndpointManager).RegenerateAllEndpoints
        /my/path/to/cilium/pkg/endpointmanager/manager.go:520 +0x225
  • without -s $(pwd)
created by github.com/cilium/cilium/pkg/endpointmanager.(*EndpointManager).RegenerateAllEndpoints
        pkg/endpointmanager/manager.go:520 +0x225

also validated that relative paths work with goland:

Screen Shot 2022-10-11 at 3 43 21 PM

@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not directly related to this pr, it's probably better which python version is expected 馃憖

@michi-covalent michi-covalent marked this pull request as ready for review October 11, 2022 22:46
@michi-covalent michi-covalent requested a review from a team as a code owner October 11, 2022 22:46
Copy link
Member

@aditighag aditighag left a comment

Choose a reason for hiding this comment

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

I haven't verified the changes with the script, but your example looks reasonable to me - #21673 (comment).

also validated that relative paths work with goland:

馃殌 It'll be great if we include the steps somewhere. Can you add the example in the PR description for now? Thanks!

@michi-covalent michi-covalent added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Oct 17, 2022
@michi-covalent
Copy link
Contributor Author

this pr only touches consolidate_go_stacktrace.py so no need for a full CI run. marking it ready to merge.

@qmonnet qmonnet merged commit bafbfb8 into master Oct 18, 2022
@qmonnet qmonnet deleted the pr/michi/consolidate branch October 18, 2022 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants