Skip to content

fix non sudo enable community addon#4714

Merged
maci3jka merged 11 commits intomasterfrom
KU-1812/enable-git-safe-dir-when-non-root-enable-addon
Nov 8, 2024
Merged

fix non sudo enable community addon#4714
maci3jka merged 11 commits intomasterfrom
KU-1812/enable-git-safe-dir-when-non-root-enable-addon

Conversation

@maci3jka
Copy link
Copy Markdown
Contributor

@maci3jka maci3jka commented Oct 22, 2024

Summary

This PR fixes issues when non-root user in non-strict environment tries to enable community addons.

Closes #4574

Changes

added temporary setting to git to ingnore

Testing

enabled and disabled community addon

Possible Regressions

n/a

Checklist

  • Read the contributions page.
  • Submitted the CLA form, if you are a first time contributor.
  • The introduced changes are covered by unit and/or integration tests.

Notes

@maci3jka maci3jka requested a review from a team October 22, 2024 15:10
Copy link
Copy Markdown
Member

@berkayoz berkayoz left a comment

Choose a reason for hiding this comment

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

I'm not too happy about this workaround, this feels like just masking the underlying issue. The safe directory wildcard also feels too wide, could we deem certain directories as safe instead of any?

@maci3jka
Copy link
Copy Markdown
Contributor Author

I'm not too happy about this workaround, this feels like just masking the underlying issue. The safe directory wildcard also feels too wide, could we deem certain directories as safe instead of any?

How about narowing it to $SNAP/addons/community/* ?

@maci3jka maci3jka requested a review from berkayoz October 23, 2024 12:51
Copy link
Copy Markdown
Member

@berkayoz berkayoz left a comment

Choose a reason for hiding this comment

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

Great work, almost there!

Comment thread microk8s-resources/gitconfig
Comment thread microk8s-resources/wrappers/git.wrapper Outdated
Comment thread snap/snapcraft.yaml Outdated
Comment thread snap/hooks/install
@maci3jka maci3jka requested a review from berkayoz November 6, 2024 11:48
Copy link
Copy Markdown
Member

@berkayoz berkayoz left a comment

Choose a reason for hiding this comment

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

LGTM, can you revert the trivy changes? Let's do the trivy fix as a separate PR/card as it still seems to fail here.

This reverts commit 5bbbc2b.
@maci3jka maci3jka merged commit 32910f0 into master Nov 8, 2024
@maci3jka maci3jka deleted the KU-1812/enable-git-safe-dir-when-non-root-enable-addon branch November 8, 2024 12:20
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.

Error enabling community addon in MicroK8s 1.30.1

2 participants