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

support user mode systemd #2350

Merged
merged 13 commits into from
Jan 26, 2024
Merged

support user mode systemd #2350

merged 13 commits into from
Jan 26, 2024

Conversation

Yujie-Xie
Copy link
Collaborator

What problem does this PR solve?

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change
  • Has persistent data change

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release notes:

NONE

@ti-chi-bot ti-chi-bot bot requested review from nexustar and srstack January 4, 2024 08:08
@CLAassistant
Copy link

CLAassistant commented Jan 4, 2024

CLA assistant check
All committers have signed the CLA.

@ti-chi-bot ti-chi-bot bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jan 4, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jan 4, 2024

Codecov Report

Attention: 111 lines in your changes are missing coverage. Please review.

Comparison is base (0972f87) 55.54% compared to head (847bd74) 55.30%.

❗ Current head 847bd74 differs from pull request most recent head 51374bc. Consider uploading reports for the commit 51374bc to get more accurate results

Files Patch % Lines
pkg/cluster/manager/deploy.go 43.48% 11 Missing and 2 partials ⚠️
pkg/cluster/manager/scale_out.go 25.00% 10 Missing and 2 partials ⚠️
pkg/cluster/operation/destroy.go 52.17% 6 Missing and 5 partials ⚠️
pkg/cluster/spec/instance.go 37.50% 7 Missing and 3 partials ⚠️
pkg/cluster/spec/tispark.go 37.50% 6 Missing and 4 partials ⚠️
pkg/cluster/manager/check.go 68.97% 5 Missing and 4 partials ⚠️
pkg/cluster/task/monitored_config.go 35.71% 5 Missing and 4 partials ⚠️
pkg/cluster/operation/action.go 79.49% 0 Missing and 8 partials ⚠️
pkg/cluster/task/env_init.go 53.33% 5 Missing and 2 partials ⚠️
pkg/cluster/task/mkdir.go 57.14% 5 Missing and 1 partial ⚠️
... and 7 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2350      +/-   ##
==========================================
- Coverage   55.54%   55.30%   -0.23%     
==========================================
  Files         329      329              
  Lines       34869    35020     +151     
==========================================
+ Hits        19365    19367       +2     
- Misses      13190    13322     +132     
- Partials     2314     2331      +17     
Flag Coverage Δ
cluster 44.69% <62.63%> (-0.23%) ⬇️
dm 25.55% <40.74%> (+0.02%) ⬆️
playground 15.31% <0.00%> (-0.04%) ⬇️
tiup 33.60% <ø> (ø)
unittest 22.24% <0.93%> (-0.10%) ⬇️

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.

@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 4, 2024
@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 15, 2024
systemdDir := "/etc/systemd/system/"
sudo := true
if systemdMode == spec.UserMode {
systemdDir = "~/.config/systemd/user/"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will this folder be created automatically if it doesn't exist?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. It will be created in the InitConfig function

pkg/cluster/task/ssh.go Outdated Show resolved Hide resolved
@kaaaaaaang kaaaaaaang changed the title no sudo support user mode systemd Jan 26, 2024
@kaaaaaaang
Copy link
Collaborator

/lgtm

@ti-chi-bot ti-chi-bot bot added the lgtm label Jan 26, 2024
@kaaaaaaang
Copy link
Collaborator

/approve

@ti-chi-bot ti-chi-bot bot added the approved label Jan 26, 2024
@ti-chi-bot ti-chi-bot bot removed the lgtm label Jan 26, 2024
Copy link
Contributor

ti-chi-bot bot commented Jan 26, 2024

@Yujie-Xie: Your PR was out of date, I have automatically updated it for you.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@kaaaaaaang
Copy link
Collaborator

/lgtm

@ti-chi-bot ti-chi-bot bot added the lgtm label Jan 26, 2024
Copy link
Contributor

ti-chi-bot bot commented Jan 26, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-01-26 02:38:57.786816408 +0000 UTC m=+1101179.351114112: ☑️ agreed by kaaaaaaang.
  • 2024-01-26 02:39:17.006593116 +0000 UTC m=+1101198.570890820: ✖️🔁 reset by ti-chi-bot[bot].
  • 2024-01-26 03:20:35.891073004 +0000 UTC m=+1103677.455370708: ☑️ agreed by kaaaaaaang.

@kaaaaaaang
Copy link
Collaborator

/approve

Copy link
Contributor

ti-chi-bot bot commented Jan 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kaaaaaaang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot merged commit 5811bbb into master Jan 26, 2024
18 of 19 checks passed
@ti-chi-bot ti-chi-bot bot deleted the no-sudo branch January 26, 2024 03:21
@kaaaaaaang kaaaaaaang added this to the v1.15.0 milestone Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants