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

feat: Read application config .cortexrc from file #1031

Closed
vansangpfiev opened this issue Aug 27, 2024 · 11 comments
Closed

feat: Read application config .cortexrc from file #1031

vansangpfiev opened this issue Aug 27, 2024 · 11 comments
Assignees
Labels
category: app shell Installer, updaters, distributions
Milestone

Comments

@vansangpfiev
Copy link
Contributor

Support reading config from file, it would be easier for us/user to change data folder, port, etc

~$ cat .cortexrc

dataFolderPath: /home/jan/cortex
cortexCppHost: 127.0.0.1
cortexCppPort: 3929
apiServerHost: localhost
apiServerPort: 1337
@dan-homebrew
Copy link
Contributor

Question: how would this work if user has multiple Cortex versions installed?

  • cortex
  • cortex-nightly
  • cortex-beta

@vansangpfiev
Copy link
Contributor Author

We can add different section for each version, I think

[cortex]
  dataFolderPath: /home/jan/cortex
  cortexCppHost: 127.0.0.1
  cortexCppPort: 3929
  apiServerHost: localhost
  apiServerPort: 1337

[cortex-nightly]
...
[cortex-beta]
...

@vansangpfiev
Copy link
Contributor Author

@namchuai namchuai moved this from Planning to In Review in Jan & Cortex Sep 5, 2024
@namchuai
Copy link
Contributor

namchuai commented Sep 5, 2024

PR: #1094

@freelerobot freelerobot changed the title Read application config from file feat: Read application config .cortexrc from file Sep 6, 2024
@freelerobot
Copy link
Contributor

@namchuai Can I check, did we go with A or B:

A: Separate Configuration files
Stable: /Users//.cortexrc
Beta: /Users//.cortexrc-beta
Nighty: /Users//.cortexrc-nightly

B: Universal configuration file
~/.cortexrc only.

Trivial difference but need to remember for uninstaller and other processes. I feel A is easier to track long term...

@namchuai
Copy link
Contributor

namchuai commented Sep 6, 2024

Great question @0xSage . I think we go with B. But we don't have any confirmation yet, so please leave your objection if my assumption is wrong.

  • We only have one configuration file ~/.cortexrc
  • ~/.cortexrc will contain configuration for each variants (prod, beta, nightly)

@dan-homebrew @vansangpfiev @nguyenhoangthuan99

@freelerobot
Copy link
Contributor

freelerobot commented Sep 6, 2024

Great question @0xSage . I think we go with B. But we don't have any confirmation yet, so please leave your objection if my assumption is wrong.

  • We only have one configuration file ~/.cortexrc
  • ~/.cortexrc will contain configuration for each variants (prod, beta, nightly)

@dan-homebrew @vansangpfiev @nguyenhoangthuan99

Ah this might be insconsistent from spec: #1115 (comment)

cc @dan-homebrew

@namchuai
Copy link
Contributor

namchuai commented Sep 6, 2024

@0xSage you are right. I missed that one. Let's go with A.

@dan-homebrew dan-homebrew added the category: app shell Installer, updaters, distributions label Sep 6, 2024
@namchuai
Copy link
Contributor

namchuai commented Sep 9, 2024

FYI, since we only have cortexcpp as backend, we will only have below settings.

dataFolderPath: /Users/jamesnguyen/cortexcpp
apiServerHost: 127.0.0.1
apiServerPort: 3928

@namchuai
Copy link
Contributor

Move to QA since PR is merged.

@gabrielle-ong
Copy link
Contributor

Image

@gabrielle-ong gabrielle-ong moved this from Review + QA to Completed in Jan & Cortex Oct 3, 2024
@gabrielle-ong gabrielle-ong added this to the v1.0.0 milestone Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: app shell Installer, updaters, distributions
Projects
Archived in project
Development

No branches or pull requests

5 participants