Skip to content

Stored user specified storage settings are ignored #1992

@dcherian

Description

@dcherian

Another version of #1700

// Launch spec version detection and an optimistic config.yaml fetch concurrently.
// For IC1 repos this avoids a sequential round-trip; for V2+ repos the config.yaml
// result is ignored (config lives in the repo info object instead).
let temp_settings = storage.default_settings().await.inject()?;
let temp_am = AssetManager::new_no_cache(
Arc::clone(&storage),
temp_settings,
SpecVersionBin::current(),
1,
DEFAULT_MAX_CONCURRENT_REQUESTS,
);
let storage_c = Arc::clone(&storage);
let user_settings = config.as_ref().and_then(|c| c.storage().cloned());
let fetch_version =
tokio::spawn(Self::fetch_spec_version(storage_c, user_settings));
let fetch_config_yaml = temp_am.fetch_config();
// Use join! (not try_join!) so that a config.yaml error doesn't fail the
// open for V2+ repos that never had a config.yaml file.
let (spec_version_result, config_yaml_result) =
join!(fetch_version, fetch_config_yaml);

is problematic because we create a client with default settings and ignore what the user specified.

#1991 makes it slightly better in that we obey user preferences specified at runtime but ignore any storage settings stored in the repo config.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions