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

refactor(coordinator): and gsctl to support FLEX interactive #3297

Merged
merged 2 commits into from
Oct 19, 2023

Conversation

lidongze0629
Copy link
Collaborator

@lidongze0629 lidongze0629 commented Oct 18, 2023

What do these changes do?

🤖 Generated by Copilot at a3ee60b

# where config is
# {
#     "solution": "GraphScope One" or "Interactive" or "GraphScope Insight"
# }
python3 -m gscoordinator --config base64(config)
  • Remove the show_log and log_level attributes from the SessionConfig class, and add them to the global Config class along with a new solution attribute, which indicates the solution type under the FLEX architecture (link, link)
  • Add a new file ./python/graphscope/gsctl/commands/common_command.py, which defines a group of commands that are common to all solutions under the FLEX architecture, such as connect and close (link)
  • Add a new file ./python/graphscope/gsctl/commands/dev_command.py, which defines a group of commands for GraphScope development, such as install-deps, make, make-image, and test (link)
  • Modify the ./python/graphscope/gsctl/gsctl.py file, which is the main script of the gsctl utility, to use the get_command_collection and get_current_context functions(link)
  • Update the documentation of the gsctl command-line utility in the ./docs/utilities/gs.md file, to reflect the new features and modes of operation under the FLEX architecture (link)

@codecov-commenter
Copy link

codecov-commenter commented Oct 19, 2023

Codecov Report

Merging #3297 (a9ffbc9) into main (d065429) will decrease coverage by 0.68%.
The diff coverage is 2.72%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3297      +/-   ##
==========================================
- Coverage   42.06%   41.39%   -0.68%     
==========================================
  Files         101      107       +6     
  Lines       11021    11203     +182     
==========================================
+ Hits         4636     4637       +1     
- Misses       6385     6566     +181     
Files Coverage Δ
python/graphscope/client/utils.py 70.68% <100.00%> (ø)
python/graphscope/config.py 75.39% <100.00%> (+0.09%) ⬆️
python/graphscope/deploy/hosts/cluster.py 40.29% <0.00%> (ø)
python/graphscope/gsctl/commands/__init__.py 0.00% <0.00%> (ø)
python/graphscope/gsctl/commands/utils.py 0.00% <0.00%> (ø)
python/graphscope/gsctl/commands/common_command.py 0.00% <0.00%> (ø)
python/graphscope/gsctl/rpc.py 0.00% <0.00%> (ø)
python/graphscope/gsctl/config.py 0.00% <0.00%> (ø)
python/graphscope/gsctl/commands/dev_command.py 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d065429...a9ffbc9. Read the comment docs.

sighingnow
sighingnow previously approved these changes Oct 19, 2023
Copy link
Collaborator

@sighingnow sighingnow left a comment

Choose a reason for hiding this comment

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

LGTM.

@@ -325,9 +322,17 @@ class SessionConfig:

@dataclass
class Config(Serializable):
# Solution under the FLEX architecture, choose from 'GraphScope One', 'Interactive' or 'GraphScope Insight'
solution: str = "GraphScope One"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe using an enum would better, like

from enum import Flag, STRICT, auto
class StrictFlag(Flag, boundary=STRICT):
    RED = auto()
    GREEN = auto()
    BLUE = auto()

python/graphscope/gsctl/commands/dev_command.py Outdated Show resolved Hide resolved
python/graphscope/gsctl/config.py Show resolved Hide resolved
python/graphscope/gsctl/config.py Outdated Show resolved Hide resolved
@lidongze0629 lidongze0629 merged commit dc08671 into alibaba:main Oct 19, 2023
48 checks passed
@sighingnow sighingnow deleted the interactive branch October 19, 2023 11:36
@lidongze0629 lidongze0629 restored the interactive branch November 20, 2023 03:02
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.

3 participants