fix(makedata): shorten the DC_MAXCELLS_WEBEDIT description to fit var_desc #346

Merged
allan merged 1 commits from fix/makedata-vardesc-length into feat/release-7.18 2026-10-19 13:39:03 +00:00
Collaborator

What

MPE_CONFIG.VAR_DESC is varchar(300), but the description written for DC_MAXCELLS_WEBEDIT is 336 characters. The insert truncates it, the truncation raises a WARNING, the WARNING sets SYSCC, and makedata aborts on &syscc ne 0 immediately after %mpe_makedata():

WARNING: Character expression will be truncated when assigned to character column var_desc.
ERROR: Execution terminated by an ABORT CANCEL statement

settings.sas is written later in the same service, so a deploy from scratch ends with no control library and no settings.sas at all.

Why it has gone unnoticed

The SAS test suite reuses whatever DC library is already on the estate, so a working estate keeps passing. The first time this bites is a teardown and rebuild.

Change

The description is shortened to 201 characters, in both places it is written:

  • sas/sasjs/macros/mpe_makedata.sas - new installs
  • sas/sasjs/db/migrations/20261003_row_and_cell_limits.sas - existing installs

var_desc is user-visible in the DC settings screens, so the rationale the text carried (a wide table is expensive long before it is tall - 250 rows of a 1000 column table is a quarter of a million cells) moves to a SAS comment above each insert rather than being dropped.

No schema change, so nothing to migrate.

Note for later: the DC_MAXOBS_WEBEDIT description in mpe_makedata.sas is 296 characters - four to spare.

Provenance

Found while testing #345 on a real Viya estate with a full teardown and rebuild (delete the appLoc, sasjs cb, chunk deploy, makedata, then the suite). The defect is on main - it arrived with 3de6655 in v7.17.0, not with this release batch - but #345 cannot be freshly deployed without it.

Verification

Teardown and rebuild on a real Viya estate:

step before after
makedata aborts: "Err during VIYA1337 build", no settings.sas written completes, zero warnings
SAS test suite 50/59 produced results, 42 passed, 14 produced no result 59/59 pass
## What `MPE_CONFIG.VAR_DESC` is `varchar(300)`, but the description written for `DC_MAXCELLS_WEBEDIT` is 336 characters. The insert truncates it, the truncation raises a WARNING, the WARNING sets `SYSCC`, and `makedata` aborts on `&syscc ne 0` immediately after `%mpe_makedata()`: ``` WARNING: Character expression will be truncated when assigned to character column var_desc. ERROR: Execution terminated by an ABORT CANCEL statement ``` `settings.sas` is written later in the same service, so a deploy from scratch ends with no control library and no `settings.sas` at all. ## Why it has gone unnoticed The SAS test suite reuses whatever DC library is already on the estate, so a working estate keeps passing. The first time this bites is a teardown and rebuild. ## Change The description is shortened to 201 characters, in both places it is written: - `sas/sasjs/macros/mpe_makedata.sas` - new installs - `sas/sasjs/db/migrations/20261003_row_and_cell_limits.sas` - existing installs `var_desc` is user-visible in the DC settings screens, so the rationale the text carried (a wide table is expensive long before it is tall - 250 rows of a 1000 column table is a quarter of a million cells) moves to a SAS comment above each insert rather than being dropped. No schema change, so nothing to migrate. Note for later: the `DC_MAXOBS_WEBEDIT` description in `mpe_makedata.sas` is 296 characters - four to spare. ## Provenance Found while testing #345 on a real Viya estate with a full teardown and rebuild (delete the appLoc, `sasjs cb`, chunk deploy, `makedata`, then the suite). The defect is on `main` - it arrived with 3de6655 in v7.17.0, not with this release batch - but #345 cannot be freshly deployed without it. ## Verification Teardown and rebuild on a real Viya estate: | step | before | after | |---|---|---| | `makedata` | aborts: "Err during VIYA1337 build", no `settings.sas` written | completes, zero warnings | | SAS test suite | 50/59 produced results, 42 passed, 14 produced no result | 59/59 pass |
hermes left a comment
Author
Collaborator

Reviewed the full diff at c1e188d (2 SAS files, +3/-7) and the PR body's numeric claims.

  • PR body: both length figures are wrong. The pre-change DC_MAXCELLS_WEBEDIT description is 336 characters, not 334 (parsed from the !! concatenations at base 026930d; identical in both writers), and DC_MAXOBS_WEBEDIT is 296 characters in sas/sasjs/macros/mpe_makedata.sas:77, not "exactly 300" - it has 4 characters of headroom, so the "no headroom at all" note would mislead whoever edits it next. Correct both figures in the body.
  • sas/sasjs/macros/mpe_makedata.sas:89 and sas/sasjs/db/migrations/20261003_row_and_cell_limits.sas:107: the shortened text drops the rationale the old var_desc carried ("a wide table is expensive long before it is tall - 250 rows of a 1000 column table is a quarter of a million cells"). var_desc is user-visible in the DC settings screens, and that explanation now exists nowhere in tracked source outside the cypress mock. Suggest keeping it as a SAS comment above the insert instead of losing it.

No blocking issues.

Reviewed the full diff at c1e188d (2 SAS files, +3/-7) and the PR body's numeric claims. - PR body: both length figures are wrong. The pre-change DC_MAXCELLS_WEBEDIT description is 336 characters, not 334 (parsed from the !! concatenations at base 026930d; identical in both writers), and DC_MAXOBS_WEBEDIT is 296 characters in sas/sasjs/macros/mpe_makedata.sas:77, not "exactly 300" - it has 4 characters of headroom, so the "no headroom at all" note would mislead whoever edits it next. Correct both figures in the body. - sas/sasjs/macros/mpe_makedata.sas:89 and sas/sasjs/db/migrations/20261003_row_and_cell_limits.sas:107: the shortened text drops the rationale the old var_desc carried ("a wide table is expensive long before it is tall - 250 rows of a 1000 column table is a quarter of a million cells"). var_desc is user-visible in the DC settings screens, and that explanation now exists nowhere in tracked source outside the cypress mock. Suggest keeping it as a SAS comment above the insert instead of losing it. No blocking issues.
hermes added 1 commit 2026-10-19 12:22:19 +00:00
fix(makedata): shorten the DC_MAXCELLS_WEBEDIT description to fit var_desc
Lighthouse Checks / lighthouse (pull_request) Successful in 20m46s
Build / Build-and-ng-test (pull_request) Successful in 5m23s
Build / Build-and-test-development (pull_request) Successful in 30m13s
a51d9e5574
MPE_CONFIG.VAR_DESC is varchar(300), but the description written for
DC_MAXCELLS_WEBEDIT is 336 characters, so the insert truncates it.  The
truncation raises a WARNING, which sets SYSCC, and makedata aborts on
`&syscc ne 0` immediately after %mpe_makedata():

    WARNING: Character expression will be truncated when assigned to
      character column var_desc.
    ERROR: Execution terminated by an ABORT CANCEL statement

The abort happens before the settings job is written, so a fresh deploy
ends with no control library and no settings.sas at all.  It goes
unnoticed because the SAS test suite reuses whatever library is already
on the estate - the first time it bites is a deploy from scratch.

The description is shortened to 201 characters in both places it is
written - mpe_makedata (new installs) and the 20261003 row/cell limits
migration (existing installs).  The rationale it carried is user-visible
help text, so it moves to a SAS comment above each insert rather than
being dropped.

Verified on a real Viya estate, deploying from scratch:
  - before: makedata aborted, "Err during VIYA1337 build", no settings.sas
  - after:  makedata completed with zero warnings, and the SAS test suite
            then ran 59/59 green
hermes force-pushed fix/makedata-vardesc-length from c1e188d066 to a51d9e5574 2026-10-19 12:22:19 +00:00 Compare
Author
Collaborator

Both figures corrected in the body, thank you - I had reconstructed them by hand rather than parsing the concatenations: 336 not 334, and DC_MAXOBS_WEBEDIT is 296 with 4 to spare, so the "no headroom" note is gone.

The rationale now lives as a SAS comment above each insert in both writers rather than being dropped - agreed that var_desc is user-visible, and the text was worth keeping somewhere tracked.

Pushed as a51d9e5 (amended, force-push with lease). sasjs lint reports no warnings for either file, and the build is clean.

Both figures corrected in the body, thank you - I had reconstructed them by hand rather than parsing the concatenations: 336 not 334, and DC_MAXOBS_WEBEDIT is 296 with 4 to spare, so the "no headroom" note is gone. The rationale now lives as a SAS comment above each insert in both writers rather than being dropped - agreed that var_desc is user-visible, and the text was worth keeping somewhere tracked. Pushed as a51d9e5 (amended, force-push with lease). `sasjs lint` reports no warnings for either file, and the build is clean.
hermes left a comment
Author
Collaborator

Re-reviewed the full diff at a51d9e5 (2 SAS files, +7/-9) against the prior review at c1e188d; also re-parsed the PR body's numeric claims.

  • Both prior findings are addressed: the rationale now lives in a SAS comment above each insert (mpe_makedata.sas:79, 20261003_row_and_cell_limits.sas:100), and the body's figures match what I parse from the tree (336 pre-change, 296 for DC_MAXOBS_WEBEDIT, 201 post-change vs the varchar(300) limit).
  • The two writers agree character-for-character on the shortened description, and no third writer or test asserts the old text.

No blocking issues.

Re-reviewed the full diff at a51d9e5 (2 SAS files, +7/-9) against the prior review at c1e188d; also re-parsed the PR body's numeric claims. - Both prior findings are addressed: the rationale now lives in a SAS comment above each insert (mpe_makedata.sas:79, 20261003_row_and_cell_limits.sas:100), and the body's figures match what I parse from the tree (336 pre-change, 296 for DC_MAXOBS_WEBEDIT, 201 post-change vs the varchar(300) limit). - The two writers agree character-for-character on the shortened description, and no third writer or test asserts the old text. No blocking issues.
allan merged commit 3d21a0134c into feat/release-7.18 2026-10-19 13:39:03 +00:00
allan deleted branch fix/makedata-vardesc-length 2026-10-19 13:39:03 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dc/dc#346