Skip to content

[fix](docker) Fix doris-compose up without env argument - #65142

Merged
liaoxin01 merged 1 commit into
apache:masterfrom
wyxxxcat:fix_docker_case_env
Jul 8, 2026
Merged

[fix](docker) Fix doris-compose up without env argument#65142
liaoxin01 merged 1 commit into
apache:masterfrom
wyxxxcat:fix_docker_case_env

Conversation

@wyxxxcat

@wyxxxcat wyxxxcat commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary: In 4.1.2-tmp-rc03 release regression, Docker Case and S3 Docker Case failed broadly during docker-compose cluster startup. The storage vault snapshot change reads args.env in doris-compose.py up to check ENABLE_STORAGE_VAULT, but the affected release branch can run with an argparse Namespace that does not define env. This causes AttributeError: 'Namespace' object has no attribute 'env' before the test cluster is created, blocking docker-based regression suites.

This change reads the optional env argument with getattr(args, 'env', None) once and reuses that value for both ENABLE_STORAGE_VAULT parsing and Cluster.new(). When the argument is absent, the default behavior is unchanged: no extra environment variables are passed and storage vault remains disabled.

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@wyxxxcat

wyxxxcat commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

run buildall

@deardeng deardeng left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@wyxxxcat

wyxxxcat commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

/review

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label Jul 2, 2026
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Static review completed for PR 65142.

Scope: one Docker runtime helper change in docker/runtime/doris-compose/command.py. The patch fixes up callers whose argparse Namespace lacks env by reading it through getattr once and reusing the same value for storage-vault detection and Cluster.new().

Checkpoint conclusions:

  • Goal/test proof: The code addresses the Namespace compatibility failure. I verified the changed Python files compile with python3 -m py_compile docker/runtime/doris-compose/command.py docker/runtime/doris-compose/cluster.py docker/runtime/doris-compose/doris-compose.py; full docker runtime/regression tests were not run because this checkout lacks .worktree_initialized, thirdparty/installed, and local runtime imports are missing filelock/jsonpickle.
  • Scope/focus: The change is small and limited to optional env propagation in new-cluster creation.
  • Concurrency/lifecycle/transactions/persistence/protocol: Not applicable; this does not add concurrency, lifecycle ownership, transaction behavior, persistent format changes, or FE/BE protocol changes.
  • Config/session compatibility: Cluster.get_env_value() already tolerates None, Node.docker_env() ignores missing/empty env lists, and user envs still override generated node envs when present.
  • Parallel paths/coverage: Existing-cluster up does not consume args.env, and no optimizer/rewrite paths are touched.
  • Observability/performance: No new observable behavior or hot-path work.

User focus: no additional user-provided review focus.

Subagent conclusions:

  • optimizer-rewrite: no optimizer/rewrite candidates; the change does not touch planner, join, aggregate, or semantic rewrite paths.
  • tests-session-config: no tests/session/config candidates; static syntax validation passed, with runtime validation limited by missing local dependencies noted above.

No inline review comments are needed.

@liaoxin01
liaoxin01 merged commit ab044d6 into apache:master Jul 8, 2026
36 checks passed
yiguolei pushed a commit that referenced this pull request Jul 13, 2026
)

### What problem does this PR solve?

Issue Number: N/A

Related PR: #64995

Problem Summary:

Pick master commit `73c481f65848ed5f449fad2ac9e7c59cf54bcf9e` to
`branch-4.1` to support file cache write index only in cloud mode.

Adaptations for `branch-4.1`:
- Keep the existing `IndexFileWriter` constructor shape on `branch-4.1`.
- Drop the unused master-only `row_binlog_segment_writer.h` include.

Validation note:
- The docker regression was run with an uncommitted local workaround
following #65142, because `branch-4.1` does not have that docker-compose
fix yet.

### Release note

Support file cache write index only in cloud mode.

### Check List (For Author)

- Test <!-- At least one of them must be included. -->
    - [x] Regression test
    - [x] Unit Test
    - [x] Manual test (add detailed scripts or steps below)
    - [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
        - [ ] Previous test can cover this change.
        - [ ] No code files have been changed.
        - [ ] Other reason <!-- Add your reason?  -->

Manual test:
- `git diff --check upstream/branch-4.1...HEAD`
- `./run-be-ut.sh --run --filter=CloudFileCacheWriteIndexOnly* -j100`
- `./build.sh --be --fe --cloud -j100`
- `docker build -f docker/runtime/doris-compose/Dockerfile -t
bh-cluster-2 .`
- `./run-regression-test.sh --run -d
regression-test/suites/cloud_p0/cache/write_index_only -g docker
-runMode=cloud -dockerSuiteParallel 1`

- Behavior changed:
    - [ ] No.
    - [x] Yes. Support file cache write index only in cloud mode.

- Does this need documentation?
    - [x] No.
- [ ] Yes. <!-- Add document PR link here. eg:
apache/doris-website#1214 -->

### Check List (For Reviewer who merge this PR)

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
wyxxxcat added a commit to wyxxxcat/doris that referenced this pull request Jul 13, 2026
Problem Summary: In 4.1.2-tmp-rc03 release regression, Docker Case and
S3 Docker Case failed broadly during docker-compose cluster startup. The
storage vault snapshot change reads `args.env` in `doris-compose.py up`
to check `ENABLE_STORAGE_VAULT`, but the affected release branch can run
with an argparse `Namespace` that does not define `env`. This causes
`AttributeError: 'Namespace' object has no attribute 'env'` before the
test cluster is created, blocking docker-based regression suites.

This change reads the optional `env` argument with `getattr(args, 'env',
None)` once and reuses that value for both `ENABLE_STORAGE_VAULT`
parsing and `Cluster.new()`. When the argument is absent, the default
behavior is unchanged: no extra environment variables are passed and
storage vault remains disabled.
wyxxxcat added a commit to wyxxxcat/doris that referenced this pull request Jul 14, 2026
Problem Summary: In 4.1.2-tmp-rc03 release regression, Docker Case and
S3 Docker Case failed broadly during docker-compose cluster startup. The
storage vault snapshot change reads `args.env` in `doris-compose.py up`
to check `ENABLE_STORAGE_VAULT`, but the affected release branch can run
with an argparse `Namespace` that does not define `env`. This causes
`AttributeError: 'Namespace' object has no attribute 'env'` before the
test cluster is created, blocking docker-based regression suites.

This change reads the optional `env` argument with `getattr(args, 'env',
None)` once and reuses that value for both `ENABLE_STORAGE_VAULT`
parsing and `Cluster.new()`. When the argument is absent, the default
behavior is unchanged: no extra environment variables are passed and
storage vault remains disabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/4.1.x dev/4.1.x-conflict reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants