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: cortex cli as client - communicate with API server via cortexjs #906

Merged
merged 35 commits into from
Jul 26, 2024

Conversation

louis-jan
Copy link
Contributor

@louis-jan louis-jan commented Jul 23, 2024

Describe Your Changes

This PR is a draft of incomplete work refactoring the Cortex CLI to remove coupled logics, thus enabling it to use CortexJS and send requests to the engine server.

This would help to address:

  • The loading time of the Cortex CLI is slow because it needs to reload all of the dependencies for every single command.
  • States between commands are not synchronized, since every command is an instance of the Cortex CLI app.
  • Reduce the workload on the Cortex CLI; it's just a 1-1 API mapping.

Every command will get access to the CortexJS client instance.

sequenceDiagram
    participant CLI as Cortex CLI
    participant CMD as Commands
    participant CJS as cortexjs
    participant ES as Engine Server

    CLI->>CMD: Provides
    CMD->>CJS: Imports
    CMD->>CJS: Uses
    CJS->>ES: Sends API requests
Loading

Fixes Issues

  • Closes #
  • Closes #

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

@louis-jan louis-jan force-pushed the refactor/cortex-cli-as-client branch 5 times, most recently from 02feca6 to b654a74 Compare July 25, 2024 14:08
@marknguyen1302 marknguyen1302 marked this pull request as ready for review July 25, 2024 16:31
@louis-jan louis-jan force-pushed the refactor/cortex-cli-as-client branch from cc000ed to 1399bc6 Compare July 25, 2024 18:05
@louis-jan louis-jan merged commit f82f5d7 into dev Jul 26, 2024
2 checks passed
@louis-jan louis-jan deleted the refactor/cortex-cli-as-client branch July 26, 2024 03:32
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