Skip to content

refactor [server] lfs configs into [lfs.server] with deprecation warnings #32332

Closed
@rremer

Description

@rremer

Feature Description

It was determined in #32307 that all the modules/setting/lfs.go:LFS configurations nested under the [server] section is not ideal. These keys should be renamed, and their usage flagged via deprecatedSetting. When this issue is closed, a new one labelled with a future release number should be opened to track the removal of the compatibility code for loading the old configs, and the deprecation warnings removed at that same time.

Screenshots

Here's the state of current LFS-related configurations as they are today:

[server]
LFS_START_SERVER =
LFS_ALLOW_PURE_SSH =
LFS_HTTP_AUTH_EXPIRY =
LFS_MAX_FILE_SIZE =
LFS_LOCKS_PAGING_NUM =
LFS_CONTENT_PATH = # marked deprecated in favor of [lfs].PATH
LFS_JWT_SECRET_URI =
LFS_JWT_SECRET =

[lfs]
PATH =

There are a few ways to reorganize this, I'm going to start by pointing out two ways, but the point of this issue is to reach a consensus and document the decision.

  1. Move everything lfs-related under the [lfs] section, and change their keys accordingly
[server]

[lfs]
PATH =
ENABLED = # previously [server].LFS_START_SERVER 
ALLOW_SSH = # previously [server].LFS_ALLOW_PURE_SSH
HTTP_AUTH_EXPIRY = # previously [server].LFS_HTTP_AUTH_EXPIRY
MAX_FILE_SIZE_BYTES = # previously [server].LFS_MAX_FILE_SIZE
LOCKS_PAGING_NUM = # previously [server].LOCKS_PAGING_NUM
JWT_SECRET_URI = # previously [server].LFS_JWT_SECRET_URI
JWT_SECRET = # previously [server].LFS_JWT_SECRET
  1. Move lfs-related configs under subsections
[server]

[lfs.storage]
PATH = # previously [lfs].PATH and before that [server].LFS_CONTENT_PATH
MAX_FILE_SIZE_BYTES = # previously [server].LFS_MAX_FILE_SIZE
LOCKS_PAGING_NUM = # previously [server].LOCKS_PAGING_NUM

[lfs.server]
ENABLED = # previously [server].LFS_START_SERVER 
ALLOW_SSH = # previously [server].LFS_ALLOW_PURE_SSH
HTTP_AUTH_EXPIRY = # previously [server].LFS_HTTP_AUTH_EXPIRY
JWT_SECRET_URI = # previously [server].LFS_JWT_SECRET_URI
JWT_SECRET = # previously [server].LFS_JWT_SECRET

[lfs.client]
# future mirroring configs, for the server's lfs client to talk to upstreams

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions