Skip to content

[branch-4.1](docker) pass env options through doris-compose up - #64623

Merged
hello-stephen merged 2 commits into
apache:branch-4.1from
selectdb-robot:ai/doris-26392-compose-env
Jul 22, 2026
Merged

[branch-4.1](docker) pass env options through doris-compose up#64623
hello-stephen merged 2 commits into
apache:branch-4.1from
selectdb-robot:ai/doris-26392-compose-env

Conversation

@selectdb-robot

Copy link
Copy Markdown

Summary

  • Add the missing --env option to doris-compose up on branch-4.1.
  • Pass user-provided environment variables through Cluster.new and merge them into container envs.
  • Keep ENABLE_STORAGE_VAULT detection using the parsed env list.

Testing

  • python3 -m py_compile docker/runtime/doris-compose/command.py docker/runtime/doris-compose/cluster.py
  • uv run --no-project ... python3 docker/runtime/doris-compose/doris-compose.py up --help

Links

  • Jira: DORIS-26336
  • Jira: DORIS-26392

@selectdb-robot
selectdb-robot requested a review from yiguolei as a code owner June 18, 2026 00:15
@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?

@selectdb-robot

Copy link
Copy Markdown
Author

Close per release triage request. Related Jira comments for this PR have been removed, and the affected Jira items will be re-triaged before any further action.

@hello-stephen

Copy link
Copy Markdown
Contributor

branch-4.1 已在 2026-07-22 的内部全量回归再次稳定复现该问题。

  • 触发提交:fd47cde7672d232ffd877fd9a019449d1ac94df2
  • 编译:#203670 四套编译均 SUCCESS
  • Docker Case:http://172.20.48.17:8111/buildConfiguration/Doris_Doris_x64_branch41_Regression_Docker_Case/203696
  • 当前失败:21 个 docker suite,均在启动集群前失败
  • 原始根因:docker/runtime/doris-compose/command.py:683 直接读取 args.env,但 branch-4.1 的 UpCommand 未定义 --env,报 AttributeError: Namespace object has no attribute env,随后出现 meta file ... not exists

本 PR 的 --env 参数、Cluster 透传和容器 env 合并正好覆盖该根因。请优先 review/合入;关联 Jira DORIS-26392 将补充本次完整 case 清单和 4.1.4 版本。

@hello-stephen
hello-stephen requested a review from wyxxxcat July 22, 2026 06:38
@hello-stephen

Copy link
Copy Markdown
Contributor

skip buildall


instance_id = getattr(args, 'instance_id', None)
cluster_snapshot = getattr(args, 'cluster_snapshot', '')
env = getattr(args, 'env', []) or []

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

doris: #65142

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

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

Copy link
Copy Markdown
Contributor

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

@hello-stephen
hello-stephen merged commit bfd67dd into apache:branch-4.1 Jul 22, 2026
29 of 30 checks passed
yiguolei pushed a commit that referenced this pull request Jul 23, 2026
### What problem does this PR solve?

TeamCity S3 Docker build #203806 reran branch-4.1 after #64623 and
exposed the next first error shared by all 192 failed suites:

```text
NameError: name 'external_ms_cluster' is not defined
```

This is a partial-backport gap. branch-4.1 already contains the
`--external-ms` argument and passes `external_ms_cluster` to
`Cluster.new`, but missed the corresponding local-variable assignment
from #57236.

Jira: DORIS-26392  
Build: http://172.20.48.17:8111/build/203806  
Reference: #57236

### What is changed?

Initialize `external_ms_cluster` from `args.external_ms` before the
cloud/non-cloud branch.

This PR intentionally does not backport the full multi-cluster feature
or add new validation behavior. It only restores the missing assignment
while preserving the existing branch-4.1 behavior.

### Check List

- [x] Diff against branch-4.1 is exactly one added line.
- [x] `git diff --check`
- [x] `python3 -m py_compile docker/runtime/doris-compose/command.py
docker/runtime/doris-compose/cluster.py`
- [x] AST check confirms the variable is bound before `Cluster.new` uses
it.
- [ ] After merge, rerun branch-4.1 Compile and S3 Docker; all #203806
occurrences must create their clusters and reach their own assertions.
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. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants