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

Add StorageConfigList to config response #8537

Merged
merged 6 commits into from
Jan 22, 2025

Conversation

N-o-Z
Copy link
Member

@N-o-Z N-o-Z commented Jan 21, 2025

Closes #8498

Change Description

Background

This PR introduces StorageConfigList to our config endpoint response.
The implementation of the StorageConfigList is currently not part of this PR and we return an empty response

@N-o-Z N-o-Z added exclude-changelog PR description should not be included in next release changelog msb labels Jan 21, 2025
@N-o-Z N-o-Z requested a review from a team January 21, 2025 22:05
@N-o-Z N-o-Z self-assigned this Jan 21, 2025
Copy link

github-actions bot commented Jan 21, 2025

♻️ PR Preview 3a75969 has been successfully destroyed since this PR has been closed.

🤖 By surge-preview

Copy link

github-actions bot commented Jan 21, 2025

E2E Test Results - Quickstart

11 passed

Copy link

E2E Test Results - DynamoDB Local - Local Block Adapter

13 passed

Copy link
Contributor

@itaigilo itaigilo left a comment

Choose a reason for hiding this comment

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

Mainly, need some clarifications about this change.


StorageConfigList:
type: array
items:
Copy link
Contributor

Choose a reason for hiding this comment

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

In the PRD there are pagination and results here -
Assuming these are not really needed, but can you please verify this and/or change the PRD accordingly?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not only is it not needed - it is a problem because StorageConfigList is nested inside the Config response.

@@ -137,7 +137,8 @@ var runCmd = &cobra.Command{
Short: "Run lakeFS",
Run: func(cmd *cobra.Command, args []string) {
logger := logging.ContextUnavailable()
cfg := loadConfig().GetBaseConfig()
cfg := loadConfig()
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this change is needed?
I couldn't find any other usage of cfg in this function -
Can you point to where it's used?

Copy link
Member Author

Choose a reason for hiding this comment

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

cfg is the interface and should be passed to the block factory

}

storageCfg := c.getStorageConfig()
// TODO (niro): Needs to be populated
storageListCfg := apigen.StorageConfigList{}
Copy link
Contributor

Choose a reason for hiding this comment

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

So should there be cfg.getStorageConfigList(), or any other usage of cfg?

Copy link
Member Author

Choose a reason for hiding this comment

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

Currently TBD

@@ -33,15 +33,15 @@ const (
extensionValidationExcludeBody = "x-validation-exclude-body"
)

func Serve(cfg *config.BaseConfig, catalog *catalog.Catalog, middlewareAuthenticator auth.Authenticator, authService auth.Service, authenticationService authentication.Service, blockAdapter block.Adapter, metadataManager auth.MetadataManager, migrator Migrator, collector stats.Collector, cloudMetadataProvider cloud.MetadataProvider, actions actionsHandler, auditChecker AuditChecker, logger logging.Logger, gatewayDomains []string, snippets []params.CodeSnippet, pathProvider upload.PathProvider, usageReporter stats.UsageReporterOperations) http.Handler {
func Serve(cfg config.Config, catalog *catalog.Catalog, middlewareAuthenticator auth.Authenticator, authService auth.Service, authenticationService authentication.Service, blockAdapter block.Adapter, metadataManager auth.MetadataManager, migrator Migrator, collector stats.Collector, cloudMetadataProvider cloud.MetadataProvider, actions actionsHandler, auditChecker AuditChecker, logger logging.Logger, gatewayDomains []string, snippets []params.CodeSnippet, pathProvider upload.PathProvider, usageReporter stats.UsageReporterOperations) http.Handler {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this change is needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Controller should get the config interface and not an instance of BaseConfig

@N-o-Z N-o-Z requested a review from itaigilo January 22, 2025 14:49
@N-o-Z N-o-Z merged commit 08411e4 into master Jan 22, 2025
40 checks passed
@N-o-Z N-o-Z deleted the task/add-storage-config-list-8498 branch January 22, 2025 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exclude-changelog PR description should not be included in next release changelog msb
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend Config object
2 participants