Skip to content

Fix specifications offset warnings and parameterize sendUsage#12619

Open
hardikkaurani wants to merge 2 commits into
appwrite:mainfrom
hardikkaurani:fix-specifications-offset-warnings
Open

Fix specifications offset warnings and parameterize sendUsage#12619
hardikkaurani wants to merge 2 commits into
appwrite:mainfrom
hardikkaurani:fix-specifications-offset-warnings

Conversation

@hardikkaurani

Copy link
Copy Markdown

Fixes #12227

What does this PR do?

  • Resolves array offset warnings on null when reading database specifications (e.g. runtimeSpecification and buildSpecification) which could be null for existing or unmigrated resources.
  • Corrects sendUsage in the Builds worker to receive dynamically adjusted memory and CPU limits instead of trying to look up the specifications statically.

@greptile-apps

greptile-apps Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

  • Adds safer fallbacks when function and site runtime/build specifications are missing or null.
  • Updates build usage reporting to receive the computed CPU and memory limits directly.
  • Keeps build telemetry aligned with adjusted compute limits after minimum-memory handling.

Confidence Score: 5/5

The changes are narrowly scoped to null-safe specification handling and usage reporting parameter flow.

No code issues were identified in the reviewed changes, and the implementation aligns computed resource limits with the usage telemetry path.

T-Rex T-Rex Logs

What T-Rex did

  • Compared the before and after null-runtime-spec behavior, noting that the warnings total dropped from 3 to 0 and that a default spec (cpus=0.5, memory=512) is returned with HTTP 200 when runtimeSpecification is null or absent.
  • Verified the harness preserved the before/after artifacts at the requested paths and did not perform a full app HTTP boot due to repository dependency weight.
  • Reviewed the details in the later artifact proofs, observing the before state with the Undefined array key warning and baseline values, and the after state with 0 head warnings and updated spec and usage values.
  • Confirmed that the artifacts in proof 1 include command, working directory, full stdout/stderr captures, and exit codes, providing reliable run evidence.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (2): Last reviewed commit: "Update build.cpus and build.memory spans..." | Re-trigger Greptile

Comment thread src/Appwrite/Platform/Modules/Functions/Workers/Builds.php
@ChiragAgg5k ChiragAgg5k changed the base branch from 1.9.x to main June 23, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Sites deployment succeeds but accessing the site returns no available server in Appwrite 1.9.0

1 participant