Azure multi repo trigger – Why is it triggering multiple times for the same commit?

Sample from yml file:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>pool:
name: Managed
demands:
- agent.name -equals Agent2
# Overrides the value for Build.BuildNumber, which is used to name the artifact (ZIP file) that is produced
name: '$(Date:yyyyMMdd)T$(Hours)$(Minutes)$(Seconds)'
resources:
repositories:
- repository: RepoA
type: git
ref: release/X
name: company/RepoA
trigger:
branches:
include:
- release/X
- repository: RepoB
type: git
ref: release/X
name: company/RepoB
trigger:
branches:
include:
- release/X
... <more repos and other stuff to build the app> ...
</code>
<code>pool: name: Managed demands: - agent.name -equals Agent2 # Overrides the value for Build.BuildNumber, which is used to name the artifact (ZIP file) that is produced name: '$(Date:yyyyMMdd)T$(Hours)$(Minutes)$(Seconds)' resources: repositories: - repository: RepoA type: git ref: release/X name: company/RepoA trigger: branches: include: - release/X - repository: RepoB type: git ref: release/X name: company/RepoB trigger: branches: include: - release/X ... <more repos and other stuff to build the app> ... </code>
pool:
  name: Managed
  demands:
  - agent.name -equals  Agent2

# Overrides the value for Build.BuildNumber, which is used to name the artifact (ZIP file) that is produced
name: '$(Date:yyyyMMdd)T$(Hours)$(Minutes)$(Seconds)'
resources:
  repositories:
  - repository: RepoA
    type: git
    ref: release/X
    name: company/RepoA
    trigger:
      branches:
        include:
        - release/X

  - repository: RepoB
    type: git
    ref: release/X
    name: company/RepoB
    trigger:
      branches:
        include:
        - release/X

... <more repos and other stuff to build the app> ...

Our application is split into multiple repos. Whenever a commit is made to any repo the pipeline should trigger and build the application (using all repos).

The issue occurs when I work on a feature where I have to make changes to both repos here. That results technically results in two commits (one for RepoA and one for RepoB), which means that this pipeline will trigger twice. This in itself it not so bad since we are self-hosting and don’t pay per run, but the issue is that sometimes the first run will fail, because it does not have the updated code from the other repo. This must be some internal limitation of how Azure works.

This means that in a scenario with a commit to both repos (that is done at the same time), two runs will happen. First run fails, then the second run will start directly after and succeed.

Two questions:

  1. Why is this happening?
  2. How, if possible, can we fix this?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật