Skip to content

Feature/server/v0.1.14 self#933

Closed
bombomla wants to merge 2 commits into
alibaba:mainfrom
bombomla:feature/server/v0.1.14-self
Closed

Feature/server/v0.1.14 self#933
bombomla wants to merge 2 commits into
alibaba:mainfrom
bombomla:feature/server/v0.1.14-self

Conversation

@bombomla
Copy link
Copy Markdown

Summary

  • What is changing and why?

Testing

  • Not run (explain why)
  • Unit tests
  • Integration tests
  • e2e / manual verification

Breaking Changes

  • None
  • Yes (describe impact and migration path)

Checklist

  • Linked Issue or clearly described motivation
  • Added/updated docs (if needed)
  • Added/updated tests (if needed)
  • Security impact considered
  • Backward compatibility considered

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions
Copy link
Copy Markdown
Contributor

⚠️ This PR has no labels. Please add one based on the changes.

Changed directories: Dockerfile-ingress-noroot、components、downloaded_config.json、downloaded_readme.md、server、test_download.txt.

📋 Recommended labels (based on changed files):

  • component/ingress ⬅️
  • component/server ⬅️

Other available labels:

  • bug - Something isn't working
  • dependencies - Pull requests that update a dependency file
  • documentation - Improvements or additions to documentation
  • feature - New feature or request
  • packages - Changes for package, image and configuration

💡 Tip: Use feature for new functionality or improvements, bug for fixes.

cc @bombomla

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 432e2de89d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread server/Dockerfile-noroot
Comment on lines +35 to +37
COPY src ./src
COPY LICENSE README.md README_zh.md example.config.toml example.config.zh.toml \
example.config.k8s.toml example.config.k8s.zh.toml example.batchsandbox-template.yaml ./
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Fix invalid server paths in non-root Dockerfile

This Dockerfile copies src and several example.* files from the server/ root, but those paths do not exist in this repository (server/ contains opensandbox_server/ and examples under opensandbox_server/examples/). As written, image builds fail during COPY before runtime, so the new non-root server image cannot be produced.

Useful? React with 👍 / 👎.

Comment on lines +77 to +79
# Convert to cores (e.g., 0.25)
cores = scaled_millicores / 1000
return f"{cores:.3g}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Clamp scaled CPU requests to Kubernetes-valid precision

When a CPU limit is small (for example 1m), this branch converts the scaled value to cores and can emit values below 0.001 CPU (for example 0.00025). Kubernetes rejects CPU quantities with precision finer than 1m, so workloads with low CPU limits can now fail admission even though the original limit was valid.

Useful? React with 👍 / 👎.

Comment thread Dockerfile-ingress-noroot
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.24.0 AS builder
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use a Go 1.25+ builder for ingress non-root image

components/ingress/go.mod declares go 1.25.0, but this Dockerfile pins the builder to golang:1.24.0; that causes go mod download/go build in this build stage to fail on the module minimum Go version check. As a result, the newly added non-root ingress image definition is not buildable.

Useful? React with 👍 / 👎.

if scaled_amount >= 1:
if scaled_amount == int(scaled_amount):
return f"{int(scaled_amount)}{unit}"
return f"{scaled_amount:.0f}{unit}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve fractional memory when scaling requests

This formatting rounds scaled memory to a whole unit whenever the scaled value is >= 1 (for example, scaling 5Gi by 0.25 yields 1Gi instead of 1.25Gi), which materially deviates from the documented fraction behavior and can over- or under-request memory depending on the input. That distorts scheduling and quota behavior compared to the intended 25% request rule.

Useful? React with 👍 / 👎.

return f"{scaled_cores:.3g}"

# Handle memory with units (e.g., "512Mi", "1Gi", "1024Ki")
memory_match = re.match(r'^(\d+(?:\.\d+)?)(Ki|Mi|Gi|Ti|Pi|Ei)$', value_str)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Parse decimal-SI memory units when scaling requests

The scaler only matches binary memory suffixes (Ki..Ei), so valid Kubernetes decimal-SI values like 2G or 512M bypass scaling and are returned unchanged. After this commit, those requests stay equal to limits while other memory formats are reduced to 25%, creating inconsistent scheduling/quota behavior for equivalent inputs.

Useful? React with 👍 / 👎.

@Pangjiping Pangjiping closed this May 25, 2026
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.

3 participants