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

Microsoft.AspnetCore.OData 7.5.16 Breaks Restier #2700

Closed
robertmclaws opened this issue Aug 17, 2022 · 13 comments
Closed

Microsoft.AspnetCore.OData 7.5.16 Breaks Restier #2700

robertmclaws opened this issue Aug 17, 2022 · 13 comments

Comments

@robertmclaws
Copy link
Collaborator

robertmclaws commented Aug 17, 2022

Hey folks! Just wanted to let you know that something happened in the 7.5.16 build, and a Restier service that was working in 7.5.15 started 404ing on every endpoint except $metadata. No idea why I'm going to have to go deep with the Router code and run my unit tests to see what happened, but you folks might want to pull this build, as I saw some other problems cropping up for people in this release as well.

Assemblies affected

Microsoft.AspnetCore.OData 7.5.16

@habbes
Copy link
Contributor

habbes commented Aug 17, 2022

Hi @robertmclaws thanks for reporting this. Are there specific URLs that are failing, is there a noticeable pattern?

@robertmclaws
Copy link
Collaborator Author

Nope, no specific pattern, just 100% of the endpoints failed.

I haven't been able to track down a cause, but a point release shouldn't be a breaking change. So if something broke, at the very least you should heavily consider hiding the release on NuGet until we track down the issue.

/cc @mikepizzo

@mikepizzo
Copy link
Member

mikepizzo commented Aug 17, 2022

hmm... @robertmclaws -- were you able to track this down any futher?

I was able to update a Microsoft.Restier.AspNetCore 1.0.0-rc8.20220714.1 project to 7.5.16 and not encounter the 404 issue. I did have to update my newtonsoft.json and dependency injection references, and ended up moving to from .netcore3.1 to .net60 to avoid various build issues, but after that everything worked fine.

@robertmclaws
Copy link
Collaborator Author

robertmclaws commented Aug 17, 2022

@mikepizzo I'll see what I can do. We're already on .NET 6 and are running the latest everything on all of our Restier-based projects. When we upgraded to 7.5.16 last night, I noticed that the default changed to returning JSON instead of XML for the metadata, and all my methods started 404ing. Backing out to 7.5.15 fixed the issue.

I'll go into the Restier project itself tonight and update the references to see if any of the tests break.

@mikepizzo
Copy link
Member

Are you using the latest preview nuget release of RESTier, or a later build directly from the repo?

@robertmclaws
Copy link
Collaborator Author

We're using the latest RC8 build on NuGet. Outside of this issue and the ones that you mentioned in your email, Restier RC8 is intended to be the same build as Restier RTM.

@habbes
Copy link
Contributor

habbes commented Aug 18, 2022

@robertmclaws thanks for sharing more details.

Regarding this statement:

, as I saw some other problems cropping up for people in this release as well.

Would you mind sharing some examples of problems that cropped up? Were they also using Restier?

I have tried running the samples from the repository again, and I was not able to reproduce the issue. The $metadata endpoint returned XML as expected and the other routes also worked as expected.

Was there any other change you made after upgrading or it was just the version update?

@mikepizzo @xuzhg is there any precedent for this? Hiding the release for the moment does sound like a good idea. I have already published a blog post on this feature: https://devblogs.microsoft.com/odata/using-the-new-json-writer-in-odata/
I can add a warning that some issues have been reported after upgrading to Microsoft.AspNetCore.OData 7.5.16. I considered unpublishing the article yesterday, but I think it's better to keep it up (with a warning) since it might help us know if there are more people experiencing issues. It's also possible that some people had already read it (I've seen it shared on Twitter).

@robertmclaws
Copy link
Collaborator Author

Another reason why I think you folks should pull this build: #2701

@mikepizzo
Copy link
Member

mikepizzo commented Aug 18, 2022 via email

@OData OData deleted a comment from mikepizzo Aug 18, 2022
@xuzhg
Copy link
Member

xuzhg commented Aug 18, 2022

Moved Newtonsoft logic to a separate extension is done at 8.x version. So, I am curious about the issue.

In the Web API 7.x repo, I bumped the newtosoft.json version to 13.0.1. That's the security vulnerabilities requirement.

I think it could be related to this line: https://github.com/OData/WebApi/blob/master/tools/WebStack.versions.settings.targets#L19, we should update the dependency version for the nuget package also.

@robertmclaws
Copy link
Collaborator Author

Other 7.5.16 issues: #2653

@habbes
Copy link
Contributor

habbes commented Aug 19, 2022

Other 7.5.16 issues: #2653

Strange. This one seems related to 7.5.15, the customer first reported experiencing the issue after migrating from 7.5.14 to 7.5.15

@robertmclaws
Copy link
Collaborator Author

I believe this is resolved now. Closing. Thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants