Skip to content

dvc gc --all-commits --cloud: Inconsistency in behavior when using "config.local" file for "gc" and "push" commands.  #10560

Open
@RaahimSiddiqi

Description

@RaahimSiddiqi

Bug Report

Inconsistency in behavior when using "config.local" file for "gc" and "push" commands. I am using a password-based authentication system for a remote SSH system. The "url" field is in the regular config file, and the "password" field is in the "config.local" file.

When running "dvc push" commands, this successfully picks up the url from the regular config file, and the password from the config.local file. However, running "dvc gc" related commands fails, and throws an error related to a missing url field. However, if i copy-paste the url field from the regular config file into the config-local file, this will work.

Reproduce


config file:

[core]
    remote = localremote
['remote "localremote"']
    url = ssh://@DVCSystem:22/DVC/

config.local file:

['remote "localremote"']
    password = 12345678

  1. Now run the dvc push command, and verify it is working.
  2. Now run dvc gc --all-commits --cloud command, and it will fail.

Expected

An error will be thrown about a missing URL field in the dictionary.

I am aware that this issue can be solved by copy-pasting the URL from config file into the config.local file. But i'm hoping for a proper fix for this.

DVC doctor

DVC version: 3.55.2 (pip)

Platform: Python 3.11.9 on Windows-10-10.0.22631-SP0
Subprojects:
dvc_data = 3.16.5
dvc_objects = 5.1.0
dvc_render = 1.0.2
dvc_task = 0.4.0
scmrepo = 3.3.7
Supports:
azure (adlfs = 2024.7.0, knack = 0.12.0, azure-identity = 1.17.1),
http (aiohttp = 3.10.5, aiohttp-retry = 2.8.3),
https (aiohttp = 3.10.5, aiohttp-retry = 2.8.3),
ssh (sshfs = 2024.6.0)
Config:
Global: C:\Users\Raahim.siddiqi\AppData\Local\iterative\dvc
System: C:\ProgramData\iterative\dvc
Cache types: https://error.dvc.org/no-dvc-cache
Caches: local
Remotes: azure, ssh
Workspace directory: NTFS on C:
Repo: dvc, git
Repo.site_cache_dir: C:\ProgramData\iterative\dvc\Cache\repo\0a64a38d268fc6862f2aa4915375898d

Metadata

Metadata

Assignees

No one assigned

    Labels

    A: gcRelated go garbage collectionbugDid we break something?p2-mediumMedium priority, should be done, but less important

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions