How to get rid of unexpected pending change

Hello,

Teamcity UI keeps showing a pending change in the following CI setup:

Here configuration Gradle-Dist | Auto-Apply-Logging has a snapshot dependency and a build trigger on a Logging | Build. Every time there is a new successful build in Logging | Build, Gradle-Dist | Auto-Apply-Logging modifies one of the Gradle-Dist source files, commits it and pushes (git).

Auto-Apply-Logging configuration:

I read that it's recommended to revert the working copy to the state corresponding to the build start. That's why the last build step looks like this:

The following sequence of events occurs now:

  1. A new change is introduced to the Logging repo
  2. Logging | Build configuration is triggered by a webhook, builds new logging.jar and uploads it to artifactory
  3. Gradle-Dist | Auto-Apply-Logging is triggered by the Logging | Build end, changes one of the Gradle-Dist files, commits it and pushes to the Gradle-Dist repo
  4. Gradle-Dist | Build configuration is triggered by a webhook on the Gradle-Dist repo
  5. At the same time, a pending change starts showing in the Gradle-Dist | Auto-Apply-Logging. Its details indicate a change made by the previous Gradle-Dist | Auto-Apply-Logging run

E.g. on the screenshot above we can see that Logging v.1.4 was released during the Logging | Build #4, then the pending Gradle-Dist | Auto-Apply-Logging diff mentions the changes made by the previous Gradle-Dist | Auto-Apply-Logging run.

 

Could you please advise, how can I get rid of that pending notification?

Regards, Denis

0
1 comment

Hi Denis,

 

resetting the head is useful when performing git operations to keep the local repo in a consistent revision, but it doesn't change what happens on the remote server, and with a new commit being pushed, TeamCity will find it and add it to the pending changes whether you run the reset HEAD or not.

 

There are two ways of getting rid of the pending change: Either run a new build, or ignore the changed file via checkout rules. If you ignore the files on the checkout rules, they will not be pulled when checking out automatically, so you would need to either check out manually or not use those files in the specific build.

0

Please sign in to leave a comment.