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

filesystem changes #6466

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

elee1766
Copy link
Contributor

No description provided.

@elee1766
Copy link
Contributor Author

@mohammed90 can you try this?

when i run caddyfile adapt, i get

{
"apps": {
filesystems: {filesystems: [{"name":"foo","files_system":{...}}
//...

not sure if this is right still.

@elee1766
Copy link
Contributor Author

@elee1766 elee1766 marked this pull request as ready for review July 23, 2024 19:05
@mohammed90
Copy link
Member

@mohammed90 can you try this?

This works! See mohammed90/caddy-git-fs#2. I had to introduce a local interface to reach the Unwrap method, and this is alright.

when i run caddyfile adapt, i get

{
"apps": {
filesystems: {filesystems: [{"name":"foo","files_system":{...}}
//...

not sure if this is right still.

I wonder if it's possible to reduce the nesting. In other words, to make it:

{
    "apps": {
        filesystems: {
            "foo": {
                    // filesystem stuff...
                    "backend": "fs_backend_module" ...
            },
            "bar": {
                    // filesystem stuff...
                    "backend": "fs_backend_module" ...
            }
        }

or if necessary at all 🤔

@mholt
Copy link
Member

mholt commented Aug 5, 2024

Nit, but should it be file_systems? (Since it's two words)

@elee1766
Copy link
Contributor Author

elee1766 commented Aug 5, 2024

Nit, but should it be file_systems? (Since it's two words)

https://caddyserver.com/docs/caddyfile/options#storage

dont think it's a nit, i think you're right, you already use file_system elsewhere in the project. will change soon

@@ -20,13 +20,13 @@ func init() {

type moduleEntry struct {
Key string `json:"name,omitempty"`
FileSystemRaw json.RawMessage `json:"file_system,omitempty" caddy:"namespace=caddy.fs inline_key=backend"`
FileSystemRaw json.RawMessage `json:"filesystem,omitempty" caddy:"namespace=caddy.fs inline_key=backend"`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
FileSystemRaw json.RawMessage `json:"filesystem,omitempty" caddy:"namespace=caddy.fs inline_key=backend"`
FileSystemRaw json.RawMessage `json:"file_system,omitempty" caddy:"namespace=caddy.fs inline_key=backend"`

Copy link
Member

Choose a reason for hiding this comment

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

huh? The point of this PR is to fix that, but you're suggesting reverting the fix back to status-quo. I'm confused.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, well I thought we agreed it was two words: #6466 (comment) (see also next comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i changed this in other places (see httptype.go), but i did not change it here in fear of breaking existing caddyfiles.

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.

4 participants