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

Sonar PRCA: RuntimeException: No changes found #1968

Closed
pascalberger opened this issue Jun 28, 2016 · 6 comments
Closed

Sonar PRCA: RuntimeException: No changes found #1968

pascalberger opened this issue Jun 28, 2016 · 6 comments
Assignees

Comments

@pascalberger
Copy link
Contributor

In a recent project I receive the following error during Sonar analysis from a PR:

2016-06-28T07:43:03.1350031Z Creating a discussion comment for the message at line 86 from /2016/IOZ.WebParts.GlobalNavigation/LAYOUTS/IOZ.WebParts.GlobalNavigation/CookieSettingsPage.aspx.cs
2016-06-28T07:43:03.3537474Z Creating a discussion comment for the message at line 121 from /2016/IOZ.WebParts.GlobalNavigation/LAYOUTS/IOZ.WebParts.GlobalNavigation/NavigationSettingsPage.aspx.cs
2016-06-28T07:43:03.3849957Z Creating a discussion comment for the message at line 35 from /2016/IOZ.WebParts.GlobalNavigation/LAYOUTS/IOZ.WebParts.GlobalNavigation/NavigationSettingsPage.aspx.cs
2016-06-28T07:43:03.4006212Z Creating a discussion comment for the message at line 100 from /2016/IOZ.WebParts.GlobalNavigation/ADMIN/IOZ.WebParts.GlobalNavigation/GlobalNavigationsettings.aspx.cs
2016-06-28T07:43:03.4631220Z ##[error]System.Management.Automation.RuntimeException: No changes found for /2016/IOZ.WebParts.GlobalNavigation/ADMIN/IOZ.WebParts.GlobalNavigation/GlobalNavigationsettings.aspx.cs ---> System.Management.Automation.RuntimeException: No changes found for /2016/IOZ.WebParts.GlobalNavigation/ADMIN/IOZ.WebParts.GlobalNavigation/GlobalNavigationsettings.aspx.cs
2016-06-28T07:43:03.4631220Z ##[error]   --- End of inner exception stack trace ---
2016-06-28T07:43:03.4631220Z ##[error]   at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
2016-06-28T07:43:03.4787435Z ##[error]   at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
2016-06-28T07:43:03.4787435Z ##[error]   at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
2016-06-28T07:43:03.4787435Z ##[error]   at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2016-06-28T07:43:03.4787435Z ##[error]   at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2016-06-28T07:43:03.4787435Z ##[error]   at Microsoft.TeamFoundation.DistributedTask.Handlers.PowerShellHandler.Execute(ITaskContext context, CancellationToken cancellationToken, Int32 timeoutInMinutes)
2016-06-28T07:43:03.4787435Z ##[error]   at Microsoft.TeamFoundation.DistributedTask.Worker.JobRunner.RunTask(ITaskContext context, TaskWrapper task, CancellationTokenSource tokenSource)

Corresponding code is

catch (Exception ex)

which I assume throws a CA1031 error.

Any idea what might be causing this?

@pascalberger
Copy link
Contributor Author

Btw the file where the error occurs was added in the PR

@pascalberger
Copy link
Contributor Author

Full log from the VSTS run available here.

@bgavrilMS
Copy link
Member

Thanks @pascalberger, will investigate. Is this an ASP core project or an older flavour of ASP?

@pascalberger
Copy link
Contributor Author

pascalberger commented Jun 28, 2016

@bgavrilMS Worse, a SharePoint full trust solution :)

@bgavrilMS
Copy link
Member

Hi @pascalberger - apologies for the long delay. We're actually looking into simplifying the implementation of PRCA as it uses some APIs that are too low level. Long story short - I have no idea why that assertion is thrown. All the files in the CR should have changes... . We'll try to repro the problem to find out more.

In the interim, consider commenting the assertion out:

https://github.com/Microsoft/vsts-tasks/blob/master/Tasks/SonarQubePostTest/PRCA/PostComments-Server.ps1#L317

@bgavrilMS
Copy link
Member

Short term fix - ignore the messages if the underlying file changes are not found. In the longer term, we're looking at using a higher level API that should shield us from this.

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

3 participants