Repository navigation
fix(web): stamp the target's appLoc into the app streamed to a SASjs target - #1555
Merged
Merged
Conversation
…target For a SASjs Server target the web app is copied to services/<streamWebFolder> verbatim, so the <sasjs> tag keeps whatever appLoc the frontend was built with - "/Public/app/dc" in the project this was found on. Served from AppStream the app gets no appLoc from its URL, so a deployment to any other appLoc had it calling services on the default one. On a fresh deployment to /Public/app/dc477 the deploy screen's BROWSE posted to /Public/app/dc/services/admin/makedata, which is configured, and answered "DIRLIST and WRITECHECK are only available until DC is configured" while the appLoc it was deployed to had never been touched. Viya and SAS9 already rewrite the tag (updateSasjsTag over the parsed HTML); the SASjs branch now does the same on the copied index.html. Verified by deploying the DC estate to /Public/app/dc477 with this CLI: the deployed services/web/index.html carries apploc="/Public/app/dc477", and BROWSE on that deployment lists folders instead of calling the default appLoc.
Coverage ratchetCompared against the baseline published for the base commit bb30198.
No metric is below the base. |
allanbowe
approved these changes
Nov 5, 2026
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.
For a
SASjsServer target the streamed app is copied verbatim, so the<sasjs>tag keeps whatever appLoc the frontend was built with. Served from AppStream the app gets no appLoc from its URL either - so a deployment to any appLoc but the frontend's default has it calling services on the default one.Reproduced on sas.4gl.io
Deployed a Data Controller estate to
/Public/app/dc477and clicked BROWSE on the deploy screen. With the browser instrumented, the request went to the default appLoc:and came back with that appLoc's refusal, while
/Public/app/dc477had never been touched. The deployed file confirmed it:The change
createWebAppServices(the compile step that materialises the streamed app) already parses the index and rewrites the tag for Viya and SAS9 viaupdateSasjsTag. TheSASjsbranch now does the same, on the copy it has just made:updateSasjsTagsetsappLocandserverTypefrom the target, so the value deployed and the value the app calls cannot disagree.Verification
npx jest src/commands/web: 36 passing across the seven suites; the new case builds a web folder withappLoc="/Public/app/default", streams it to a SASjs target at/Public/app/AnotherLocand asserts the copy carries the target's appLoc. It fails if the stamping is removed (checked)./Public/app/dc477, the servedservices/web/index.htmlcarriesapploc="/Public/app/dc477"and BROWSE on that deployment lists folders (DC620298,DC620385,DC627259) instead of calling the default appLoc.Related but separate: #1554 (the worker script's own URL) - that one is about a stale worker serving a previous build's runtime.