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

[BUG]: Pipeline fails when referencing repository within project (submodule) #20778

Open
4 of 7 tasks
Woudjee opened this issue Jan 9, 2025 · 0 comments
Open
4 of 7 tasks

Comments

@Woudjee
Copy link

Woudjee commented Jan 9, 2025

New issue checklist

Task name

checkout

Task version

No response

Issue Description

Imagine the following structure:

Azure project 1:

  • Repository 1.1
  • Repository 1.2

Azure project 2:

  • Repository 2.1

When adding repository 1.1 as a submodule to repository 2.1, the following pipeline works as expected and correctly (after 8 hours of trial and error...). However, when I add repository 1.1 as a submodule to repository 1.2, this does not work. It appears not to matter what is inside the repositories, as my final attempt included 3 empty repositores.

The following article explains the steps I had to follow to make it work: https://linkedin.com/pulse/git-dealing-error-tf401019-when-using-submodules-azure-cardamone/

Note: even though what I wrote was correct an hour ago. I just retried it and it also fails now. I am out of inspiration.

I have absolutely no idea what my problem is and spent all day working on solely this issue. If anyone could point me in the right direction, that would be highly appreciated!

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Windows 10/Windows 11

Relevant log output

==============================================================================
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Syncing repository: XXX (Git)
Prepending Path environment variable with directory containing 'git.exe'.
git version
git version 2.47.0.windows.2
git lfs version
git-lfs/3.4.0 (GitHub; windows amd64; go 1.20.6; git d06d6e9e)
git config --get remote.origin.url
git clean -ffdx
git reset --hard HEAD
HEAD is now at 4b30aa2 Update XXX
git submodule foreach --recursive "git clean -ffdx"
git submodule foreach --recursive "git reset --hard HEAD"
git config gc.auto 0
git config core.longpaths true
git config --get-all http.XXX
git config --get-all http.extraheader
git config --get-regexp .*extraheader
git config --get-all http.proxy
git config http.version HTTP/1.1
git --config-env=http.extraheader=env_var_http.extraheader fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin --depth=1  XXX
remote: Azure Repos        
remote: 
remote: Found 0 objects to send. (0 ms)        
git --config-env=http.extraheader=env_var_http.extraheader fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin --depth=1  XXX
remote: Azure Repos        
remote: 
remote: Found 0 objects to send. (0 ms)        
From XXX
 * branch            4XXX -> FETCH_HEAD
git checkout --progress --force refs/remotes/origin/XXX
HEAD is now at XXX Update XXX
git submodule sync
Synchronizing submodule url for 'XXX'
git --config-env=XXX submodule update --init --force --depth=1
Cloning into 'C:/Agent/_work/4/s/XXX'...
fatal: Cannot prompt because terminal prompts have been disabled.
fatal: Cannot prompt because terminal prompts have been disabled.
fatal: could not read Username for 'XXX': terminal prompts disabled
fatal: clone of 'XXX' into submodule path 'C:/Agent/_work/4/s/XXX' failed
Failed to clone 'XXX'. Retry scheduled
Cloning into 'C:/Agent/_work/4/s/XXX'...
fatal: Cannot prompt because terminal prompts have been disabled.
fatal: Cannot prompt because terminal prompts have been disabled.
fatal: could not read Username for 'XXX': terminal prompts disabled
fatal: clone of 'XXX' into submodule path 'C:/Agent/_work/4/s/XXX' failed
Failed to clone 'XXX' a second time, aborting
##[error]Git submodule update failed with exit code: 1
Finishing: Checkout XXX@new to s

Full task logs with system.debug enabled

 [REPLACE THIS WITH YOUR INFORMATION] 

Repro steps

# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core

trigger:
  branches:
    exclude:
      - main

pool:
  # vmImage: 'windows-latest'
  name: 'Default'

variables:
  solution: '**/*.sln'
  buildPlatform: 'x64'
  buildConfiguration: 'Release'

steps:
- checkout: self
  persistCredentials: false
  submodules: true

- task: NuGetToolInstaller@1
  displayName: Install Nuget

- task: NuGetCommand@2
  displayName: Restore NuGet Packages
  inputs:
    command: restore
    restoreSolution: '$(solution)'

- task: VSBuild@1
  inputs:
    solution: '$(solution)'
    msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactStagingDirectory)\WebApp.zip" /p:DeployIisAppPath="Default Web Site"'
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

- task: VSTest@2
  inputs:
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'
@Woudjee Woudjee added the bug label Jan 9, 2025
@Woudjee Woudjee changed the title [BUG]: Pipeline fails when referencing repository within project [BUG]: Pipeline fails when referencing repository within project (submodule) Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant