Snapshot dependencies are being triggered even with no changes

We just upgraded to TeamCity 2021.1 and we noticed that build chains no longer behave the same way they did in 2018.1. It seems that 2021.1 sometimes triggers a full builds of the entire chain, but in 2018.1 it seems TeamCity would use artifacts that were acceptable.

Consider this scenario: Build Library and Build App are my build chain with snapshot and artifact dependencies. Build Library has checkout rules to limit what it sees in the repository. The whole build chain was built successfully, then I make a commit that is outside of the checkout rules for Build Library so it should only trigger Build App. I then trigger Build App but Build Library also triggers even with no changes (and TeamCity even shows me no changes).

In 2018.1: this would only trigger Build App and it would use the Build Library artifacts that matches the source from the last build.

4 comments
Comment actions Permalink

To clarify a bit, after pushing my feature branch to TeamCity, TeamCity correctly tells me that Build Library has no pending changes and only Build App has pending changes, but it still triggers Build Library anyway.

0
Comment actions Permalink

Actually, it seems like this isn't strictly related to a new branch. I'm seeing this happen on my default branch. A scheduled trigger just triggered a build step that need not have been built (no reported changes). I updated this post to indicate the behavior I now see.

0
Comment actions Permalink

Here is the log from a build that is currently sitting in the queue but that should not have been triggered at all because there are no changes. Even the log seems to indicate that it detected no changes and doesn't need a build, but yet it still built. What am I missing?

[11:41:26]TeamCity server version is 2021.1.1 (build 92714)
[11:41:26]Collecting changes in 1 VCS root
[11:41:26][Collecting changes in 1 VCS root] VCS Root details
[11:41:26][VCS Root details] "Git on SCM2" {instance id=121, parent internal id=2, parent id=SCM2_Git, description: "https://redacted.com/scm/prj/repo.git#refs/heads/master"}
[11:41:27][Collecting changes in 1 VCS root] Detecting changes in VCS root 'Git on SCM2' (used in 'Build Library', 'Build App' and 8 other configurations)
[11:41:27][Collecting changes in 1 VCS root] Will collect changes for 'Git on SCM2' starting from revision 610545c0be7c16e171956402a6d9a59ddba5f03d
[11:41:27][Collecting changes in 1 VCS root] Compute revision for 'Git on SCM2'
[11:41:27][Compute revision for 'Git on SCM2'] Upper limit revision: 6bca026c32e87f3d51211cc9f8b195b1289cf6e9
[11:41:27][Compute revision for 'Git on SCM2'] MaxModId = 44411
[11:41:27][Compute revision for 'Git on SCM2'] The first revision that was detected in the branch refs/heads/version/2.0.x: 8f8c6dce2543a3c48870bbf159af1cf68f313dcb
[11:41:27][Compute revision for 'Git on SCM2'] The first revision that was detected in the branch refs/heads/version/2.0.x after the last change of the VCS root or checkout rules: 8f8c6dce2543a3c48870bbf159af1cf68f313dcb
[11:41:27][Compute revision for 'Git on SCM2'] No modification from VCS root is attached to build configuration, use first detected revision in branch refs/heads/version/2.0.x: 8f8c6dce2543a3c48870bbf159af1cf68f313dcb
[11:41:27][Compute revision for 'Git on SCM2'] Computed revision: 8f8c6dce2543a3c48870bbf159af1cf68f313dcb
[11:41:27]Finalize build settings (29s)
[11:41:37][Finalize build settings] Retrieve settings, revision: 8f8c6dce2543a3c48870bbf159af1cf68f313dcb (9s)
[11:41:37][Retrieve settings, revision: 8f8c6dce2543a3c48870bbf159af1cf68f313dcb] Settings VCS root details
[11:41:37][Settings VCS root details] "Git on SCM2" {instance id=121, parent internal id=2, parent id=SCM2_Git, description: "https://redacted.com/scm/prj/repo.git#refs/heads/master"}
[11:41:37][Retrieve settings, revision: 8f8c6dce2543a3c48870bbf159af1cf68f313dcb] Load settings from VCS
[11:41:38][Retrieve settings, revision: 8f8c6dce2543a3c48870bbf159af1cf68f313dcb] Generate settings, format: kotlin
[11:41:46][Retrieve settings, revision: 8f8c6dce2543a3c48870bbf159af1cf68f313dcb] Load project model
[11:41:46][Retrieve settings, revision: 8f8c6dce2543a3c48870bbf159af1cf68f313dcb] Read build settings from revision 8f8c6dce2543a3c48870bbf159af1cf68f313dcb
[11:41:46][Read build settings from revision 8f8c6dce2543a3c48870bbf159af1cf68f313dcb] Build settings from VCS were successfully loaded

I'm building branch version/2.0.x.

610545c0be7c16e171956402a6d9a59ddba5f03d is the latest on master branch (default branch).

6bca026c32e87f3d51211cc9f8b195b1289cf6e9 is the latest on version/2.0.x branch.

8f8c6dce2543a3c48870bbf159af1cf68f313dcb is the commit before 6bca026 on version/2.0.x which has been previously built.

0

Please sign in to leave a comment.