We had an issue recently that caused TeamCity to stop running builds for several hours. The result was a large queue of pending changes. Now this has been resolved, and new changes are going through the pipeline with no problem.
However, the pending changes area still shows 43 pending. All of these changes have been included in subsequent commits, and have therefore been built. Why is TeamCity showing these old commits as pending? And how do I clear the queue?
I've had the same issue and found a way to work around it. Not ideal but worked for me.
Select your project. Click on Edit Configuration Settings. Select Actions and Copy. Create a duplicate copy of your project.
Now go through the process again only delete the old project instead of copying it.
This gives you a new project with the same setup and none of the history or pending items of the old one. Like I said not ideal, but will get rid of the pending items.
Related
Accidentally changed the underlying branch for a sonar project and ran the analysis and now after reverting the to original branch, all the issues marked as wont fix are again show on the dashboard. Is there any option available in sonarqube to the previous state of the project which was working fine or any possible solution to restore the quality profile.
Unfortunately, there is no way to restore the previous state. SonarQube allows to delete analysis result (Activity tab in 7.1), but all except the last. It means that you can fix statistics by removing accidental analysis, but you must fix issues statuses manually.
I have been developing a feature for my app in Xcode. I use the master-branch as my stable/production-ready branch. When i work on a feature i start a feature-branch. This particular feature branch I have been using has had a lot of significant commits (30+ commits) and now when i try to merge it into my master-branch Xcode tells me there has been a conflict with various files and the merge is unable to be performed. There is no option to resolve the conflicts.
I am using Xcode 8.0. At this point the feature-branch is far ahead of the master-branch and is production ready. I would like to begin working on new features but i don't want to make a mess by creating more branches off of the current feature branch. The only thing I can think of is to just completely replace the master-branch with my feature-branch but is this even possible? If so then how?
I have been unable to find anything in Xcode, Apple documentation or on stack. Thanks for any advice!
What you should do here is merge your master-branch into your feature-branch. Fix your conflicts. Test, make sure it works. When you're convinced all is good, merge feature-branch back into master-branch.
During this time, you can still work in master-branch as needed. But keep in mind more conflicts could arise. And in that case, I'd also just do master-branch -> feature-branch -> master-branch where the "->" represents doing a merge.
For conflicts, I actually don't use Xcode to resolve, but there are numerous resources out there to indicate how to do this.
I had a similar situation, but Source Control in Xcode wouldn't let me merge branches due to "tree conflicts". It just hung. Good thing I had a backup, cause I could no longer open the project.
After restoring the project from my backup, I did the following to replace the Master branch with my Development branch.
In Xcode I went to Source Control-> Working Copies and selected my Development branch as the working copy.
Under Source Control, I did a Commit for all my pending changes
In Source Control in the Working Copies section, I hovered over the the Development branch to expand the menu to the right and selected Configure project name
At the top of the Configure window, I selected Branches
I selected the Master branch and clicked on the - sign at the bottom and confirmed that I wanted to delete it.
Went back to Source Control, hovered over the Development branch in the Working Copies section and selected New Branch from the menu that expanded to the right.
Named the new branch "Master". This made Master the current branch.
When back to Source Control and changed the current branch back to my Development branch.
We're using TeamCity 9.0.4.
Our full builds take over three hours. While a build is in progress if new commits come in they get queued with, apparently, a VCS snapshot from the time they were queued (I can't see that behaviour specified anywhere, but it's what I've observed).
So by the time the next build is dequeued there may be many builds queued up as developers have been committing changes. The intermediate builds are usually not useful at this point - we just want it to skip straight to the latest build for that configuration.
Other build systems I've used only queue one additional build per configuration and takes its VCS snapshot at the point it is dequeued. This has the effect we want.
I can't work out how to achieve this with TeamCity. What am I missing?
According to our documentation, TeamCity should perform the following build queue optimizations: https://confluence.jetbrains.com/display/TCD9/Build+Queue#BuildQueue-BuildQueueOptimizationbyTeamCity
If it does not work for you, I'd recommend upgrading your server to the most recent version first, and if it does not help, create an issue in our tracker with details about these builds.
I think you've specified this in your trigger.
Edit Configuration Settings | Triggers | VCS Trigger | Show advanced options | Trigger a build on each check-in
That option should be unchecked. The wording is a little confusing I guess. Even with this unchecked, each VCS commit will queue a build but it won't force them to be built in isolation.
We are using TeamCity 9.0.0. The server got corrupted for reasons not relevant to this discussion, so I had to rollback to a stable snapshot (we use Amazon AWS snapshots), which was roughly 12 hours old. I lost some of the builds that happened during those 12 hours but that's ok.
The restore seemed to work, but now the VCS Triggers are not happening. The VCS root is from TFS 2013.
I tried checkin in new changes and builds still don't trigger. I tried running the build manually and it doesn't pick up the latest changes.
It looks like something got out of sync when I restored the snapshot.
Thoughts?
--------Update 1 -------
I looked at the history and I see several builds triggering after I rolled back my server so I think that is not related. I tried creating a new VCS root and removing the existing one. I checked in a change and the build triggered fine. I tried a second check in and this time the build didn't trigger. It's almost like it misses some changesets.
Try cleaning Server cache at <TeamCity Data Directory>/system/caches. If even that doesn't work try deleting and re-creating the VCS.
Our team started using TFS few months back and we are learning as we progress. We first checked in our existing code to TFS thereby creating a Main Branch. We then created a Development Branch from this Main branch.
We just did a release and I merged Development branch with Main. It asked me to map Main branch folder on my workstation. Done that Merge completed successfully. But after merge I noticed on server that change sets are still old and source code on server has not changed.
looking further I noticed that the changed file is marked as 'merge pending'.
When I opened solution from mapped folder of main branch, I did see that all changes from Development branch merged to Main are in pending state.
Questions
Do I always have to check in pending changes after each merge in TFS
Is is possible to merge source code on server instead of from
workstation (All code in development is in Checked in state).
I am using VS2012 (if that matters)
Please advise, especially if I am taking a wrong approach with TFS.
In answer to your questions:
Yes, you always have to check in pending changes. Pending changes are local to your machine, they give you the chance to review the result of the merge locally before they are committed to the server. This is especially important because the merge may result in a conflict that you need to resolve before you can check in.
I don't think that this is possible (although I never researched this specific question). This is, again, because of the possibility of a conflict that needs to be resolved manually. Even if you perform a merge programmatically via the TFS API, the merge will happen locally.
Don't worry, you are doing the right thing. Only one word of warning regarding merges in general: Before you attempt a merge, always make sure that you perform a "get latest" operation on the target branch! The source branch does not need to be up-to-date on your local machine because the merge operation will get the source branch data from the server. But the changes will be merged with whatever version your local target branch files have, so if these are not up-to-date you will get unexpected results.