INTEGRATION [PR#6121 > development/9.4] š use SUR date instead of the infostore one to have an update LastModā¦#6136
Conversation
ā¦ified date Issue: CLDSRV-878
Call UtilizationService.getUtilizationMetrics for capacity.xml on the HEAD and LIST routes, mirroring the existing pattern from GET. This ensures Last-Modified is derived from SUR metrics (not stale metadata) on all three routes. Fall back to new Date() when metrics are unavailable (404) or absent. Also use new Date() as the fallback in GET instead of the stored LastModified value. Issue: CLDSRV-878
Move the shared UtilizationService call pattern (bucket key derivation, 404 warn/fallback, error logging) into a single fetchCapacityMetrics helper in utils.js, used by GET, HEAD, and LIST routes. Issue: CLDSRV-878
Issue: CLDSRV-878
ā¦into w/9.2/bugfix/CLDSRV-878/use-sur-date
ā¦date' into w/9.3/bugfix/CLDSRV-878/use-sur-date
ā¦date' into w/9.4/bugfix/CLDSRV-878/use-sur-date
ā 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
| bucketMetrics = { date: new Date() }; | ||
| } | ||
|
|
||
| const modified = bucketMetrics.date; |
There was a problem hiding this comment.
buildVeeamFileData uses bucketMetrics.date (which is new Date()) as the modified value for system.xml requests (line 288). In the old code, getFileToBuild returned the stored LastModified from the capability data (e.g. the date when system.xml was last PUT), and that was used as the Last-Modified header.
Now getFileToBuild no longer returns LastModified in the value object (line 211), and it is deleted from the source before buildVeeamFileData can access it. This means every GET/HEAD of system.xml returns the current time as Last-Modified, which:
- Breaks If-Modified-Since caching for system.xml
- Is inconsistent with LIST (list.js:130) which still uses the stored file.LastModified for system.xml
Consider capturing the stored LastModified before calling getFileToBuild and using it for system.xml instead of bucketMetrics.date.
ā Claude Code
Review by Claude Code |
This pull request has been created automatically.
It is linked to its parent pull request #6121.
Do not edit this pull request directly.
If you need to amend/cancel the changeset on branch
w/9.4/bugfix/CLDSRV-878/use-sur-date, please follow thisprocedure:
git fetch git checkout w/9.4/bugfix/CLDSRV-878/use-sur-date # <amend or cancel the changeset by _adding_ new commits> git push origin w/9.4/bugfix/CLDSRV-878/use-sur-datePlease always comment pull request #6121 instead of this one.