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

cmd/snap/debug-api: option to choose access through /run/snapd-snap.socket #14540

Conversation

bboozzoo
Copy link
Contributor

Add an option to choose access through the dedicated snap socket. Useful for debugging when curl isn't around.

…ocket

Add an option to choose access through the dedicated snap socket.

Signed-off-by: Maciej Borzecki <[email protected]>
@bboozzoo bboozzoo added the Simple 😃 A small PR which can be reviewed quickly label Sep 26, 2024
Copy link

codecov bot commented Sep 26, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 79.28%. Comparing base (ac897ee) to head (7c5b741).
Report is 54 commits behind head on master.

Files with missing lines Patch % Lines
cmd/snap/cmd_debug_api.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #14540      +/-   ##
==========================================
+ Coverage   78.85%   79.28%   +0.43%     
==========================================
  Files        1079     1082       +3     
  Lines      145615   147619    +2004     
==========================================
+ Hits       114828   117047    +2219     
+ Misses      23601    23381     -220     
- Partials     7186     7191       +5     
Flag Coverage Δ
unittests 79.28% <0.00%> (+0.43%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

"header": "Set header (can be repeated multiple times), header kind and value are separated with ': '",
"request": "HTTP method to use (defaults to GET)",
"fail": "Fail on request errors",
"snap-socket": "Use snap access socket",
Copy link
Contributor

Choose a reason for hiding this comment

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

This is vague, can you clarify that this is using the socket used by snapctl when SNAP_NAME is set?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hm but it's using the snap socket only when --snap-socket is passed in the command line, SNAP_NAME is not checked at all

Copy link
Contributor

@MiguelPires MiguelPires left a comment

Choose a reason for hiding this comment

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

lgtm, thank you

@bboozzoo bboozzoo added the Skip spread Indicate that spread job should not run label Oct 1, 2024
@bboozzoo bboozzoo closed this Oct 1, 2024
@bboozzoo bboozzoo reopened this Oct 1, 2024
@bboozzoo bboozzoo merged commit 2eefa00 into canonical:master Oct 7, 2024
102 of 110 checks passed
@bboozzoo bboozzoo deleted the bboozzoo/snap-debug-api-through-snap-socket branch October 7, 2024 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Simple 😃 A small PR which can be reviewed quickly Skip spread Indicate that spread job should not run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants