Skip to content

[BUG]: Changing branch in qprofiles-downloader has no effect #660

@nicogodet

Description

@nicogodet

Is there an existing issue or a documentation page for this?

  • I have searched the existing issues and within documentation

Which version of the app are you using?

dev

Operating System

Windows 10+*

Packaging mode

Source code

Related resources

No response

Description of the bug

If to_local_destination_path exists in clone_or_pull function from profiles_handler_base, branch is never used and therefore, never checkout/switch in case of change in scenario

Steps to reproduce

No response

Relevant log output

For this issue, I added a debug output at beginning of download function

        logger.debug(
            f"Downloading repository {self.SOURCE_REPOSITORY_PATH_OR_URL} to "
            f"{destination_local_path.resolve()} using branch "
            f"{self.DESTINATION_BRANCH_TO_USE}."
        )

output log

> qdt -s https://gitlab.com/isl-ingenierie/qgis/isl_qgis_profiles/-/raw/test/scenarios/scenario_isl_pre_qdt.yml?ref_type=heads -vvv
[...]
2025-04-30 14:45:10||INFO||deployment||run||227||Running step: qprofiles-downloader
[...]
2025-04-30 14:45:11||DEBUG||profiles_handler_base||list_remote_branches||348||3 branche(s) found in repository https://gitlab.com/isl-ingenierie/qgis/isl_qgis_profiles.git: refs/heads/auto-update-plugins ; refs/heads/main ; refs/heads/test
2025-04-30 14:45:11||DEBUG||profiles_handler_base||download||367||Downloading repository https://gitlab.com/isl-ingenierie/qgis/isl_qgis_profiles.git to C:\Users\godet\.cache\qgis-deployment-toolbelt\repositories\qdt-isl-pre using branch test.
[...]
2025-04-30 14:45:12||DEBUG||profiles_handler_base||_fetch||570||Repository C:\Users\godet\.cache\qgis-deployment-toolbelt\repositories\qdt-isl-pre has been fetched from remote https://gitlab.com/isl-ingenierie/qgis/isl_qgis_profiles.git. Local active branch: b'main'.
[...]
2025-04-30 14:45:13||DEBUG||profiles_handler_base||_pull||605||Repository C:\Users\godet\.cache\qgis-deployment-toolbelt\repositories\qdt-isl-pre has been pulled. Local active branch: b'main'. Latest commit cloned: 0d1f3e904ecaee303a35aca9774086277486d744 by b'nicogodet <[email protected]>' at 1745305546
[...]

Comment

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingjobsScenarios and jobs

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions