Repository navigation
SWF(bug): render same-named Magic MDK result views apart, write documents under their planned file name, refuse a nil QueryResult rendering - #2492
Merged
Conversation
…part, write documents under their planned names Co-Authored-By: jason.han <hanhuijun@gmail.com>
…tes documents to their planned files Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
Author
|
Rest of the gate, run locally: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What and why
Three review findings on the
QVTS::QueryResultview work merged in #2116, each fixed at its cause with a test that fails without the fix.1. Magic MDK: views of one declared name were all laid out as the first
Run query over a subject whose queries share a last name (
P::Rows,Q::Rows) writes two views that are both namedRowsResult::rows.Engine.renderViewsparsed every written view into one model and rendered each by name, so both were rendered from the first.ResultViewEndToEndTest.viewsOfOneNameAreRenderedAsTheirOwnAnswers— the second rendered view showedP::Rows's header and rows.Engine.renderViewspartitions the views (distinctlyNamed) so that no parsed model holds two views of one declared name, and renders each view against the model that holds its own source. Differently named views are still parsed together.2. Magic MDK: a rendered document was not written where its sibling documents link it
Render document… named the output from the qualified name (
QVTSDemo.MassReport.md) and ignoredRenderedDocument.fileName, the name the service plans and other documents link (QVTSDemo-MassReport.md), so links between documents rendered into one folder did not resolve.ResultViewEndToEndTest.documentsLinkingEachOtherAreWrittenWhereTheirLinksPoint.DocumentRendererwrites a document underRenderedDocument.fileName(), and refuses a planned name that is empty,.,..or contains a path separator. A result view is still named by its qualified name.3.
docir.QueryResult(nil)dereferenced a nil renderingTestQueryResultRefusesNilRendering(panicked before the fix);TestQueryResultOfZeroRenderingholds the empty case.docir.QueryResultreturns(*Document, error)and answers a nil rendering with a typed*docir.Errorof the new kindErrorMissingRendering. Its two callers (internal/frontend/grpc/resultview.go,internal/frontend/repl/docrender.go) propagate the error.No generated files are touched: no baselines, goldens, protobuf output or expectation files.
How it was verified
On the pushed head
4a6ffc2f40(a merge ofdevelopbd572ad9d1):gofmt -l .empty,go build ./...,go vet ./...,make lint,make changelog-checkgo test ./internal/doc/... ./internal/frontend/...mvn -f client/java/pom.xml install -DskipTests, thenmvn -f editors/mdk/pom.xml verifyunder JDK 17: 92 plugin tests and 24 bridge tests passThe full
go test ./...with the downloaded corpora and the tools tests are running on this head now; results follow in a comment.Checklist
make testandmake lintpass locally —make lintpasses; the full suite is running (see above)editors/mdk/README.md,docs/internals/design/mdk-plugin.md)changes/unreleased/mdk-result-view-names.fixed.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved — none movedF4,K5) in the body, docs, or changelogLink to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/1cb9400fae2e41888d76085f38572ba4
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/1cb9400fae2e41888d76085f38572ba4?variant=devin
Requested by: @HuiJun
🟢 Devin Review found nothing to fix · View findings · Follow Devin's work