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

[Feature]: Make local terminal cores configurable #2492

Merged
merged 4 commits into from
Jan 8, 2024

Conversation

link3280
Copy link
Contributor

Why are the changes needed?

As titled.

Brief change log

As titled.

How was this patch tested?

  • Add some test cases that check the changes thoroughly including negative and positive cases if possible

  • Add screenshots for manual tests if appropriate

  • Run test locally before making a pull request

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

@CLAassistant
Copy link

CLAassistant commented Dec 29, 2023

CLA assistant check
All committers have signed the CLA.

@link3280 link3280 changed the title Make local terminal cores configurable [Feature]: Make local terminal cores configurable Dec 29, 2023
Copy link

codecov bot commented Dec 29, 2023

Codecov Report

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

Comparison is base (818cc20) 32.65% compared to head (5971b3e) 32.65%.
Report is 1 commits behind head on master.

Files Patch % Lines
...tic/server/terminal/local/LocalSessionFactory.java 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #2492   +/-   ##
=========================================
  Coverage     32.65%   32.65%           
+ Complexity     4484     4483    -1     
=========================================
  Files           599      599           
  Lines         50310    50313    +3     
  Branches       6689     6689           
=========================================
+ Hits          16428    16429    +1     
- Misses        32566    32568    +2     
  Partials       1316     1316           
Flag Coverage Δ
core 30.76% <50.00%> (-0.01%) ⬇️
trino 50.93% <ø> (+0.06%) ⬆️

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.

Copy link
Contributor

@zhoujinsong zhoujinsong left a comment

Choose a reason for hiding this comment

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

@link3280 I left some comments, please take a look.

Besides, I found there are no docs about the configurations of terminals, it will make users hard to get these configurations.

Maybe we should add some description in docs and examples in default configuration files, how do you think? @link3280

@@ -313,6 +313,12 @@ public class ArcticManagementConf {
.defaultValue(30)
.withDescription("session timeout in minute");

public static final ConfigOption<Integer> TERMINAL_LOCAL_CORES =
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems to be a configuration only for the local terminal.
If yes, we may want to move it into LocalSessionFactory and name it cores because the TerminalManager will reorganize configurations based on different backend types.

You can find similar configurations only for the Kyuubi terminal in KyuubiTerminalSessionFactory.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree that LocalSessionFactory is a better place for the config option. But do you think cores should be prefixed with the terminal type local, as it's only effective for the local terminal. That makes the full key terminal.local.cores.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, my previous description was not clear. The complete configuration name in the configuration file should indeed be terminal.local.cores. Just as you have implemented, in the code, we only need to name the configuration cores, and TerminalManager will handle the decomposition of different backend configurations.

Copy link
Contributor

@zhoujinsong zhoujinsong left a comment

Choose a reason for hiding this comment

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

LGTM.

@zhoujinsong
Copy link
Contributor

I created #2496 to follow the docs issues.

@zhoujinsong zhoujinsong merged commit cb2646c into apache:master Jan 8, 2024
7 checks passed
@zhoujinsong zhoujinsong mentioned this pull request Jun 25, 2024
66 tasks
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.

4 participants