Skip to content

Dynamic config#272

Draft
JunkyDeveloper wants to merge 6 commits into
Steel-Foundation:masterfrom
JunkyDeveloper:dynamic-config
Draft

Dynamic config#272
JunkyDeveloper wants to merge 6 commits into
Steel-Foundation:masterfrom
JunkyDeveloper:dynamic-config

Conversation

@JunkyDeveloper

Copy link
Copy Markdown
Contributor

Summary

The problem from pterodactyl that steel can't have an already existing config with missing settings. This PR allows to upload a minimal version like only a file with the port and it expands it to the full working config. This allows also for the future, if steel adds new settings to be automatically in configs from older versions.

I had two systems the first one, this version, which also adds the comments. The second version was a bit less code but the comments are not added which I think are helpful.
Also a log section will be added if not exists in the same code

Comment thread prek.toml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what are prek for ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

precommit, means it checks is typo running through are all tests running through, is clippy happy, is the format correct, adds an empty line to each file and more stuff. It is a git commit hook, so I don't need to do all of that things by hand for each commit so it does it automatically.

it already shows I'm not anymore alone who is using prek to have all of these checks. a commit not takes up to 2min :D I removed tests before someone else added it back, we will see.

Also my changes are doing tests and clippy in parallel and 2 other things in parallel

@coco875

coco875 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

does it's also add comment ?

@JunkyDeveloper

Copy link
Copy Markdown
Contributor Author

it also adds the comments, for each settings it uses the config.toml in package-content as a reference

@coco875

coco875 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

yeah but if I want to cleanup config because I know then can I remove and stay remove but when it update I get new field with comment above so like that I can know what was added and also decide to remove the new comment or not

@JunkyDeveloper

JunkyDeveloper commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

yes and no, has your removed setting a default internal? than yes it stay away, does steel require this config without it doesn't boot it create that settings + the comment to it. your custom order will not preserved the order will be from package-content. If you only remove comments, nothing will happen

better understandable? I will add that to the PR description, was not thinking about that

@coco875

coco875 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

but then when it upgrade it reformat back on how default config are with your config then ? if you change order or remove it comment, all will be revert ?

@JunkyDeveloper

Copy link
Copy Markdown
Contributor Author

if a required config is missing, I think yes, but need to test it that's why it is in draft, I need to fully understand the code and maybe make same changes to it

@github-actions

Copy link
Copy Markdown

This pull request has conflicts with the base branch "master". Please resolve those so we can test out your changes.

@github-actions

Copy link
Copy Markdown

Conflicts have been resolved! 🎉

@github-actions

Copy link
Copy Markdown

This pull request has conflicts with the base branch "master". Please resolve those so we can test out your changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants