OctopusDeploy / Issues

| Public | Bug reports and known issues for Octopus Deploy and all related tools
https://octopus.com
162 stars 20 forks source link

Resource Not Found Following Octopus Server Update #7060

Closed FinnianDempsey closed 3 years ago

FinnianDempsey commented 3 years ago

Team

Severity

Several Customers are affected and unable to view resources in the dashboard

Version

Upgraded to 2021.1 from older versions (2018.x.x etc)

Latest Version

No response

What happened?

After upgrading from earlier versions, several customers have reported cases of 'Resource not found' appearing when navigating the dashboard.

Our initial investigation seems that this is caused by the PackageReferenceID being different in the several places it's referenced.

Screen Shot 2021-09-22 at 16 19 17

Reproduction

Jeremy has tested with a customer database upgrading until it 'broke': https://octopusdeploy.slack.com/archives/CNHBHV2BX/p1632256957334600

We can reproduce the error by modifying the PackageReferenceId in the DeploymentProcess JSON in the database.

Error and Stacktrace

The resource 'b1e62c04-0c70-4526-bae5-27800241bdc6' was not found.

More Information

Slack channel for investigating - Internal

Workaround

It is possible to modify the id's referenced in the database so that resource can be found.

AdamHollow49 commented 3 years ago

Similar report: https://octopus.zendesk.com/agent/tickets/76231

This issue isn't just happening for Package References but also for Deployment Processes, Deployment Settings, etc.

YuKitsune commented 3 years ago

Release note: Fixed a "resource not found" issue when viewing old deployments.

Octobob commented 2 years ago

:tada: The fix for this issue has been released in:

Release stream Release
2021.1 2021.1.7814
2021.2 2021.2.7633
2021.3 2021.3.4192
2022.1+ all releases
zxenlogics commented 2 years ago

We just upgraded to 2021.3.8275 and I'm getting similar issue with Deployments but via the API. I've been trying to troubleshoot and work around the problem but with no luck. I manage a web app that leverages the Octopus client API but after the upgrade a particular feature of our web app just won't work because of this piece of code below (simplified):

repo.Deployments.FindAll().Select(d => new { d.Id, d.Name }).Dump().

I get the error below. If I even try to filter out that specific release id I get the same error. Any attempt to work around the issue using that code above will error out. Any suggestion?

The resource 'Releases-18866' was not found. Octopus.Client at Octopus.Client.OctopusClient.DispatchRequest[TResponseResource](OctopusRequest request, Boolean readResponse) at Octopus.Client.OctopusClient.Get[TResource](String path, Object pathParameters) at Octopus.Client.OctopusClient.List[TResource](String path, Object pathParameters) at Octopus.Client.OctopusClient.Paginate[TResource](String path, Object pathParameters, Func2 getNextPage) at Octopus.Client.Repositories.BasicRepository1.Paginate(Func2 getNextPage, String path, Object pathParameters) at Octopus.Client.Repositories.BasicRepository1.FindMany(Func2 search, String path, Object pathParameters) at Octopus.Client.Repositories.BasicRepository1.FindAll(String path, Object pathParameters) at UserQuery.ShowReleaseByReleaseId(IOctopusSpaceRepository repo) at UserQuery.Main() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()