client: configuration rework#577
Conversation
|
paging @iKevinY , @rwblickhan , @brian-nguyen for thoughts 🙏 |
|
Does this mean we can deploy multiple projects to a single remote? |
|
@rwblickhan no, but it does mean that you can more easily deploy a different project to the same remote to "recycle" them so to speak. For example: then in another project: then, when you run that said, if multi-project remotes is something people want... this would help that too 🤔 |
There was a problem hiding this comment.
Please let's not switch to YAML. YAML is increasingly becoming more and more heinous in my view, and it's only major advantage right now is that there are more [mature] libraries available for working with it. TOML is definitely the better choice, although I definitely think the current structure needs some work: there's a lot of nesting — an example of what good TOML looks like would be Rust's Cargo files.
With some consideration for nesting and similar design choices, TOML should definitely remain the choice of configuration markup in my opinion. As for the question of projects needing versions, perhaps that's something that Git's hashes can handle? (I think that's how it works in other similar systems).
|
I am for the shift to YAML because of the uniformity with cloud providers configuration files e.g gcloud and aws. |
|
@yaoharry the thing is, @mRabitsky note taken about the nested properties - I've update the configuration to use lists instead of maps. We lose the uniqueness guarantees, but we have a much nicer-looking configuration now (let me know if this still isn't what you had in mind: inertia.tomlname = "test"
url = ""
[[profile]]
name = "dev"
branch = ""
[profile.build]
type = "dockerfile"
buildfile = "Dockerfile.dev"
[[profile]]
name = "staging"
branch = ""
[profile.build]
type = "dockerfile"
buildfile = "Dockerfile.staging"
inertia.global[[remote]]
version = ""
name = "dev"
ip = "0.0.0.0"
[remote.ssh]
user = "bob"
pemfile = ""
ssh-port = ""
[remote.daemon]
port = "4043"
token = ""
webhook-secret = ""
verify-ssl = false
[remote.profiles]
asdf = "asdf"
oipo = "oiup"
[[remote]]
version = ""
name = "staging"
ip = "0.0.0.0"
[remote.ssh]
user = "bob"
pemfile = ""
ssh-port = ""
[remote.daemon]
port = "4043"
token = ""
webhook-secret = ""
verify-ssl = false
[remote.profiles]
fdsa = "fdsaf"
wqrte = "erterh"
|
|
@mRabitsky re:
By version I was referring to Inertia version. In |
7325533 to
f56b3ca
Compare
Codecov Report
@@ Coverage Diff @@
## master #577 +/- ##
==========================================
- Coverage 56.5% 55.36% -1.13%
==========================================
Files 62 67 +5
Lines 3020 3004 -16
==========================================
- Hits 1706 1663 -43
- Misses 1105 1145 +40
+ Partials 209 196 -13
Continue to review full report at Codecov.
|
iKevinY
left a comment
There was a problem hiding this comment.
Haven't dove into reading any code changes, but the configuration file split looks good to me. Sticking with TOML seems fine; it's human-editable enough.
One minor nitpick: I think pemfile should be changed to something like identityfile (this is the terminology that SSH uses within ~/.ssh/config to refer to a private key file); while AWS issues PEM files, chances are that other cloud providers will just have typical public-private RSA keys.
|
thanks @iKevinY 😋 i've updated the references you don't have to read the code, sorry for the sinful PR 😂 |
🎟️ Ticket(s): Closes #101
👷 Changes
Many, many changes to configuration, which then caused many changes in
client, which means a lot had to change incmd, which meanslocalmust be updated, and I cleaned up a lot of misc stuff... therefore, huge mess of a PR.Moral of the story: fix yo shit before building too much on top of your shit
Rough tl;dr
/path/to/project/inertia.tomlinertia projectto manage configuration (replacesinertia config)~/.inertia/inertia.globalMisc changes
Examples (updated)
inertia.toml
inertia.global
Questions
version, to track daemon version. do projects need it?tomlstill the right choice? wouldymlbe better? toml🔦 Testing Instructions
nothing yet (tests are all busted)