Dashboard/Overviews error after updating to 2018.7.8

Hello!

I started getting the following error on the dashboard page and each project’s overview page, right after updating to 2018.7.8 from 2018.7.7:

Exception occurred while executing a reader for `
– Variable setup for when you want to run this query manually
– DECLARE @dataVersion timestamp
– SELECT @dataVersion = DataVersion FROM ServerTask WHERE Id =
– DROP TABLE #Latest

– Get this first so we don’t miss any updates between calls
SELECT Max(DataVersion) FROM ServerTask

DECLARE @ProjectIds as TABLE (ProjectId nvarchar(400))

– Narrowing this criteria any further makes it hard to invalidate the cache
INSERT INTO @ProjectIds
SELECT DISTINCT ProjectId
FROM ServerTask
WHERE ProjectId is not null
AND DataVersion > @DataVersion

DECLARE @cnt int
SELECT @cnt = count(*) FROM @ProjectIds
IF @cnt = 0
RETURN

SELECT *
INTO #Latest
FROM (
SELECT
‘C’ AS CurrentOrPrevious,
d.Id as DeploymentId,
d.Created,
d.ProjectId,
d.EnvironmentId,
d.ReleaseId,
d.TaskId,
d.TenantId,
d.ChannelId,
t.[State],
t.HasPendingInterruptions,
t.HasWarningsOrErrors,
t.ErrorMessage,
t.QueueTime,
t.StartTime,
t.CompletedTime,
r.[Version],
ROW_NUMBER() OVER (PARTITION BY d.EnvironmentId, d.ProjectId, d.TenantId, d.ReleaseId ORDER BY Created DESC) as [Rank]
FROM Deployment d
INNER JOIN ServerTask t ON t.Id = d .TaskId
INNER JOIN [Release] r on r.Id = d.ReleaseId
WHERE NOT ((t.State = ‘Canceled’ OR t.State = ‘Cancelling’) AND t.StartTime IS NULL)
AND d.ProjectId in (SELECT ProjectId FROM @ProjectIds)
) s
WHERE s.Rank = 1

SELECT *
FROM #Latest
UNION ALL
SELECT *
FROM (
SELECT
‘P’ AS CurrentOrPrevious,
d.Id as DeploymentId,
d.Created,
d.ProjectId,
d.EnvironmentId,
d.ReleaseId,
d.TaskId,
d.TenantId,
d.ChannelId,
t.[State],
t.HasPendingInterruptions,
t.HasWarningsOrErrors,
t.ErrorMessage,
t.QueueTime,
t.StartTime,
t.CompletedTime,
r.[Version],
ROW_NUMBER() OVER (PARTITION BY d.EnvironmentId, d.ProjectId, d.TenantId, d.ReleaseId ORDER BY Created DESC) as [Rank]
FROM [Deployment] d
INNER JOIN [ServerTask] t on t.Id = d.TaskId
INNER JOIN [Release] r on r.Id = d.ReleaseId
WHERE
d.Id NOT IN (SELECT DeploymentId FROM #Latest)
AND t.State = ‘Success’
AND d.ProjectId in (SELECT ProjectId FROM @ProjectIds)
) s
WHERE s.[Rank] = 1
`
SQL Error 137 - Must declare the scalar variable “@DataVersion”.

Other pages seem to work fine.

We are also seeing this exact same error on the dashboard and project overview pages. For some people, the dashboard still works though.

Hi,

Thanks for letting us know, and I’m sorry you hit this problem. I’m guessing you have case-sensitive SQL servers. I’ve raised an issue and am working on getting a fix out the door today.

Regards,

Rob W

Yup, can confirm that it’s case sensitive.

Thanks for the quick response, waiting for the fix. :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.