Skip to content

B #8194: Read READ_LENGTH in market_mad/s3/import - #8196

Closed
trukhinyuri wants to merge 2 commits into
OpenNebula:masterfrom
trukhinyuri:fix/s3-import-read-length
Closed

trukhinyuri wants to merge 2 commits into
OpenNebula:masterfrom
trukhinyuri:fix/s3-import-read-length

Conversation

@trukhinyuri

@trukhinyuri trukhinyuri commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fixes #8194.

  • In src/market_mad/remotes/s3/import, read MARKETPLACE/TEMPLATE/READ_LENGTH (with a fallback to MARKETPLACE/TEMPLATE/READx_LENGTH) so the configured S3 chunk size is honored during marketplace image imports.

Branches to which this PR applies

  • master
  • one-7.0

  • Check this if this PR should not be squashed

Read MARKETPLACE/TEMPLATE/READ_LENGTH (with fallback to READx_LENGTH) in
src/market_mad/remotes/s3/import so the configured S3 chunk size is applied
during marketplace imports.

Signed-off-by: Iurii Trukhin <yuri@trukhin.com>
Copilot AI balanced review requested due to automatic review settings October 14, 2026 17:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused change correctly satisfies issue #8194 without introducing unresolved problems.

0 open findings

What changed in this PR

Corrects S3 marketplace imports to honor the configured chunk size while retaining backward compatibility.

Changes:

  • Reads READ_LENGTH first.
  • Falls back to legacy READx_LENGTH.
File Description
src/​market_mad/​remotes/​s3/​import Corrects chunk-size template lookup.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

When READ_LENGTH converts to zero, IO#read(0) keeps returning an empty
string and the importer repeatedly uploads empty parts. Negative values
raise ArgumentError after S3 setup.

Reject non-positive values before creating the S3 client. Keep the
default chunk size, legacy READx_LENGTH fallback and existing positive
integer conversion.

Signed-off-by: Iurii Trukhin <yuri@trukhin.com>

Copy link
Copy Markdown
Contributor Author

Could a maintainer approve the Smoke Tests and Check Protected Files runs for 723cad7? The update rejects non-positive read lengths before S3 client creation.

@rsmontero

Copy link
Copy Markdown
Member

merged as per 88bb097

@rsmontero rsmontero closed this Nov 2, 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.

market_mad/s3/import reads READx_LENGTH instead of READ_LENGTH from marketplace template

4 participants