Address the 404 errors in swagger checks #15204
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
Troubleshooting schema failures due to a recent DAB change, the output is swamped by:
...and other similar output. This is not the actual error. No. @TheRealHaoLiu recently identified this, but in doing so I'm not sure if anyone even looked at the actual problem. This PR isn't addressing that problem. This is only trying to cut through the weeds that blocks our view of the problem.
A sample output from #15202 in the swagger check gives 46,969 lines. There's some noisy setup (which we have other solutions for), but then about 10% of the way in, it's this same error for the entire rest of the output. But this is a suppressed error, given as a warning.
Here is a sample output of the current problem, after accomplishing this fix:
https://gist.github.com/AlanCoding/fb44e008939875b9434117c7632ba4aa
ISSUE TYPE
COMPONENT NAME
ADDITIONAL INFORMATION
What is going on here?
All tests are transactional. I'm aware we have a "piggyback" method to identify URLs in other tests and use them in later schema tests. Problem is that any objects that might have played a role won't exist... because the transactions of the prior tests are over.
Exasperated, I use their hook to identify that the call is only for schema generation to give any available object. This also requires creating an object of every type where the queryset requires looking up a parent object.
This also requires a supporting DAB change which does basically the same thing.