Skip to content

[improvement](build) Fully exclude OBS/COS deps via --exclude-{obs,cos}-dependencies - #66564

Open
zhiqiang-hhhh wants to merge 1 commit into
apache:masterfrom
zhiqiang-hhhh:feat/disable-huaweicloud
Open

[improvement](build) Fully exclude OBS/COS deps via --exclude-{obs,cos}-dependencies#66564
zhiqiang-hhhh wants to merge 1 commit into
apache:masterfrom
zhiqiang-hhhh:feat/disable-huaweicloud

Conversation

@zhiqiang-hhhh

@zhiqiang-hhhh zhiqiang-hhhh commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

What

Turn the existing --exclude-obs-dependencies and --exclude-cos-dependencies build flags into a full exclusion of the respective cloud provider (Huawei OBS / Tencent COS): when passed, nothing from that provider is resolved, compiled, or bundled into the FE binary.

Why

The two flags were introduced in #58071 as a scope=provided downgrade. That only kept the jars out of the shipped artifact — Maven still resolved and downloaded them at build time. In particular com.huaweicloud:hadoop-huaweicloud:3.1.1-hw-46 is published only on Huawei's own Maven repo (repo.huaweicloud.com). Environments that cannot or must not reach it (corporate proxies blocking the host, or compliance constraints forbidding Huawei/Tencent artifacts) still could not build the FE, because resolution was unconditional. The flags now do what their names imply.

How

Active-by-default Maven profiles obs / cos, deactivated via -Ddisable.obs=true / -Ddisable.cos=true, wrap every touch point:

  • fe-core: the fe-filesystem-obs / fe-filesystem-cos test couplings.
  • hadoop-deps: the hadoop-huaweicloud dependency and the Huawei OBS Maven repository.
  • fe-filesystem: the fe-filesystem-obs / fe-filesystem-cos modules (which transitively pull the Huawei / Tencent SDKs).

build.sh maps --exclude-obs-dependencies-Ddisable.obs=true and --exclude-cos-dependencies-Ddisable.cos=true (replacing the old *.dependency.scope=provided mapping), and drops the corresponding provider from both the -pl reactor list and the filesystem plugin packaging loop, so the reactor and the dist layout stay consistent when a provider is excluded.

Behaviour

  • Default builds are unchanged — the profiles are active unless a flag is passed.
  • sh build.sh --fe --exclude-obs-dependencies builds the FE with no Huawei artifact resolved and no OBS code compiled or bundled; same for --exclude-cos-dependencies and Tencent COS.

Testing

  • mvn help:active-profiles on fe-core, fe-filesystem, and hadoop-deps: obs/cos active by default, and absent with -Ddisable.obs=true / -Ddisable.cos=true.
  • Confirmed fe-core has no compile-time import of the OBS/COS provider classes (loaded via SPI/reflection), so compile and test-compile stay green when the profiles are off.
  • xmllint on all changed poms and bash -n build.sh pass.

🤖 Generated with Claude Code

@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?

@zhiqiang-hhhh
zhiqiang-hhhh force-pushed the feat/disable-huaweicloud branch from 1c700d5 to 52d3bc4 Compare August 7, 2026 02:02
@zhiqiang-hhhh zhiqiang-hhhh changed the title [feature](build) Add --disable-huaweicloud build option [improvement](build) Fully exclude OBS/COS deps via --exclude-{obs,cos}-dependencies Aug 7, 2026
@zhiqiang-hhhh
zhiqiang-hhhh marked this pull request as ready for review August 7, 2026 02:04
@zhiqiang-hhhh

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 28675 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 52d3bc4906eb601192dbf29851af2bf325a5caae, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17579	3956	3900	3900
q2	1985	316	199	199
q3	10297	1380	770	770
q4	4691	466	331	331
q5	7520	861	548	548
q6	200	168	130	130
q7	760	814	594	594
q8	10126	1649	1575	1575
q9	5921	4052	4033	4033
q10	6783	1614	1340	1340
q11	516	350	326	326
q12	740	559	442	442
q13	18125	3308	2676	2676
q14	263	257	247	247
q15	q16	737	728	660	660
q17	1175	932	914	914
q18	6541	5641	5610	5610
q19	1587	1222	1148	1148
q20	768	687	595	595
q21	5847	2487	2343	2343
q22	424	344	294	294
Total cold run time: 102585 ms
Total hot run time: 28675 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4288	4179	4173	4173
q2	274	314	198	198
q3	4578	4963	4371	4371
q4	2165	2249	1410	1410
q5	4183	4077	4097	4077
q6	230	170	124	124
q7	1660	1560	1379	1379
q8	2764	2099	2050	2050
q9	7287	7217	7193	7193
q10	4290	4232	3882	3882
q11	535	401	401	401
q12	725	725	491	491
q13	3115	3556	2888	2888
q14	310	319	285	285
q15	q16	686	726	645	645
q17	1300	1278	1267	1267
q18	12051	10963	11866	10963
q19	1161	1154	1126	1126
q20	2209	2194	1936	1936
q21	5714	4770	4503	4503
q22	500	445	407	407
Total cold run time: 60025 ms
Total hot run time: 53769 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 166517 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 52d3bc4906eb601192dbf29851af2bf325a5caae, data reload: false

query5	4320	592	448	448
query6	482	214	209	209
query7	4950	615	342	342
query8	328	167	145	145
query9	8800	3983	3999	3983
query10	453	344	299	299
query11	5775	2167	2006	2006
query12	154	95	97	95
query13	1260	590	428	428
query14	6060	4303	3976	3976
query14_1	3765	3784	3780	3780
query15	207	198	177	177
query16	999	502	455	455
query17	1123	713	569	569
query18	2496	476	346	346
query19	215	199	153	153
query20	105	102	114	102
query21	234	158	140	140
query22	12940	13048	12839	12839
query23	15912	15053	14655	14655
query23_1	14700	14779	14716	14716
query24	7474	1713	1250	1250
query24_1	1259	1236	1240	1236
query25	555	440	389	389
query26	1350	352	230	230
query27	2558	596	368	368
query28	4538	2038	2021	2021
query29	1088	629	509	509
query30	345	275	224	224
query31	1170	1115	1075	1075
query32	102	58	59	58
query33	509	302	241	241
query34	1154	1160	648	648
query35	736	742	640	640
query36	768	786	683	683
query37	153	104	88	88
query38	1828	1773	1667	1667
query39	833	820	783	783
query39_1	788	805	785	785
query40	251	163	141	141
query41	65	63	62	62
query42	94	92	91	91
query43	319	320	274	274
query44	1421	772	766	766
query45	185	174	167	167
query46	1023	1135	741	741
query47	1522	1552	1491	1491
query48	407	379	299	299
query49	579	408	288	288
query50	1109	424	339	339
query51	10606	10846	10598	10598
query52	86	90	74	74
query53	260	278	194	194
query54	268	229	226	226
query55	77	70	67	67
query56	307	318	276	276
query57	1032	1011	927	927
query58	277	282	262	262
query59	1535	1608	1403	1403
query60	297	265	263	263
query61	150	154	148	148
query62	391	321	265	265
query63	234	205	208	205
query64	2853	1014	869	869
query65	3893	3786	3816	3786
query66	1797	465	365	365
query67	28000	28092	27916	27916
query68	3086	1553	1037	1037
query69	388	317	275	275
query70	842	821	803	803
query71	383	351	301	301
query72	3013	2595	2445	2445
query73	886	815	420	420
query74	4634	4488	4280	4280
query75	2372	2365	2013	2013
query76	2332	1168	763	763
query77	357	379	301	301
query78	11135	11116	10521	10521
query79	1422	1173	770	770
query80	1261	549	453	453
query81	518	324	291	291
query82	633	174	142	142
query83	363	331	297	297
query84	274	164	133	133
query85	947	621	512	512
query86	400	234	217	217
query87	1978	1965	1807	1807
query88	3695	2779	2817	2779
query89	385	314	280	280
query90	1890	195	196	195
query91	203	187	167	167
query92	64	61	55	55
query93	1711	1560	1061	1061
query94	707	346	312	312
query95	794	510	578	510
query96	1001	780	360	360
query97	2465	2518	2362	2362
query98	198	189	188	188
query99	733	737	615	615
Total cold run time: 252668 ms
Total hot run time: 166517 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 23.61 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 52d3bc4906eb601192dbf29851af2bf325a5caae, data reload: false

query1	0.01	0.01	0.00
query2	0.10	0.05	0.04
query3	0.25	0.13	0.13
query4	1.60	0.13	0.13
query5	0.25	0.23	0.22
query6	1.16	0.76	0.80
query7	0.04	0.01	0.01
query8	0.06	0.04	0.04
query9	0.38	0.30	0.31
query10	0.54	0.59	0.53
query11	0.19	0.13	0.12
query12	0.18	0.14	0.14
query13	0.46	0.45	0.46
query14	1.00	0.99	0.98
query15	0.59	0.58	0.58
query16	0.30	0.33	0.32
query17	1.06	1.04	1.12
query18	0.21	0.20	0.19
query19	1.99	1.86	1.90
query20	0.01	0.01	0.01
query21	15.45	0.22	0.13
query22	4.82	0.05	0.05
query23	16.15	0.30	0.12
query24	2.93	0.41	0.30
query25	0.11	0.04	0.04
query26	0.73	0.20	0.14
query27	0.04	0.03	0.04
query28	3.56	0.85	0.34
query29	12.50	4.14	3.26
query30	0.27	0.15	0.15
query31	2.77	0.57	0.31
query32	3.22	0.59	0.51
query33	3.10	3.16	3.15
query34	15.64	3.90	3.26
query35	3.21	3.19	3.21
query36	0.54	0.42	0.42
query37	0.08	0.07	0.06
query38	0.06	0.04	0.04
query39	0.04	0.03	0.03
query40	0.18	0.15	0.15
query41	0.09	0.04	0.03
query42	0.03	0.02	0.03
query43	0.04	0.04	0.03
Total cold run time: 95.94 s
Total hot run time: 23.61 s

yiguolei
yiguolei previously approved these changes Aug 7, 2026
@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage `` 🎉
Increment coverage report
Complete coverage report

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 0.00% (0/538) 🎉
Increment coverage report
Complete coverage report

@CalvinKirs CalvinKirs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The current implementation does not fully exclude the provider-specific dependencies yet:

  1. fe/fe-connector/fe-connector-paimon/pom.xml still unconditionally declares com.huaweicloud:hadoop-huaweicloud and the Huawei Maven repository. Since the Paimon connector is
    included in the default FE reactor, --exclude-obs-dependencies may still resolve Huawei artifacts.

  2. fe/be-java-extensions/preload-extensions/pom.xml still unconditionally declares com.qcloud.cos:hadoop-cos. --fe enables BE Java extensions and includes preload- extensions, so --exclude-cos-dependencies may still resolve Tencent COS artifacts.

Could you move these dependencies, together with the Huawei repository, into the corresponding obs/cos profiles?

Defining the profiles only in fe/pom.xml would not be sufficient because these dependencies and nested modules are declared in their respective child POMs. The module-specific
profiles and the build.sh reactor/module list need to remain consistent.

It would also be good to verify the full dependency tree, rather than only checking active profiles, and confirm that no com.huaweicloud or com.qcloud.cos artifacts are present
when the corresponding exclusion flag is enabled.

…s}-dependencies

Turn the existing `--exclude-obs-dependencies` / `--exclude-cos-dependencies`
flags from a scope=provided downgrade (which still resolved the jars from
their remote repositories, only skipping the bundling step) into a full
exclusion: the dependencies are no longer resolved, compiled, or bundled.

This is driven by active-by-default Maven profiles (`obs` / `cos`, deactivated
via -Ddisable.obs=true / -Ddisable.cos=true) that wrap every touch point:

- fe-core: the fe-filesystem-obs / fe-filesystem-cos test couplings.
- hadoop-deps: the hadoop-huaweicloud dependency and the Huawei OBS repository.
- fe-filesystem: the fe-filesystem-obs / fe-filesystem-cos modules.
- fe-connector-paimon: the runtime hadoop-huaweicloud dependency (OBSFileSystem
  for obs:// warehouses) and the Huawei OBS repository.
- preload-extensions: the com.qcloud.cos:hadoop-cos dependency (BE CosN access).

build.sh maps the flags to -Ddisable.obs=true / -Ddisable.cos=true and drops
the corresponding fe-filesystem provider from both the -pl reactor list and the
plugin packaging loop, so the build stays consistent when a provider is excluded.

Default builds are unchanged (profiles active unless the flag is passed).

Verified with `mvn dependency:tree` across fe-core, fe-connector-paimon,
preload-extensions and hadoop-deps: no com.huaweicloud / com.qcloud.cos artifact
resolves anywhere in the reactor when the corresponding flag is enabled.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@zhiqiang-hhhh

Copy link
Copy Markdown
Contributor Author

run buildall

@github-actions github-actions Bot removed the approved Indicates a PR has been approved by one committer. label Aug 7, 2026
@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 28767 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit a3536a54198ed2a8bdc7ba35e8d3469eeb3209b7, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17698	3949	3944	3944
q2	2028	338	195	195
q3	10322	1355	789	789
q4	4680	472	347	347
q5	7572	844	559	559
q6	182	171	134	134
q7	769	818	601	601
q8	9317	1554	1528	1528
q9	5296	4070	4025	4025
q10	6757	1615	1355	1355
q11	510	381	336	336
q12	732	565	445	445
q13	18059	3227	2748	2748
q14	257	259	230	230
q15	q16	742	733	664	664
q17	946	914	1032	914
q18	6545	5651	5593	5593
q19	1169	1297	1094	1094
q20	797	716	584	584
q21	5527	2575	2380	2380
q22	418	350	302	302
Total cold run time: 100323 ms
Total hot run time: 28767 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4262	4215	4190	4190
q2	278	321	203	203
q3	4523	4915	4407	4407
q4	2146	2246	1407	1407
q5	4208	4081	4104	4081
q6	221	174	128	128
q7	1692	1591	1424	1424
q8	2446	2325	2123	2123
q9	7414	7427	7535	7427
q10	4303	4225	3825	3825
q11	558	401	380	380
q12	706	714	502	502
q13	3258	3538	2853	2853
q14	304	315	284	284
q15	q16	693	704	629	629
q17	1330	1274	1264	1264
q18	12287	11092	11839	11092
q19	1157	1144	1240	1144
q20	2234	2249	1931	1931
q21	5539	4885	4796	4796
q22	539	501	417	417
Total cold run time: 60098 ms
Total hot run time: 54507 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 158754 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit a3536a54198ed2a8bdc7ba35e8d3469eeb3209b7, data reload: false

query5	4307	592	452	452
query6	472	235	218	218
query7	4976	598	341	341
query8	325	160	144	144
query9	8772	4004	4008	4004
query10	453	359	304	304
query11	5863	2187	1984	1984
query12	156	97	92	92
query13	1238	639	472	472
query14	6055	4261	3961	3961
query14_1	3789	3787	3782	3782
query15	202	199	181	181
query16	993	481	447	447
query17	946	689	551	551
query18	2438	483	342	342
query19	210	189	149	149
query20	106	103	104	103
query21	231	161	140	140
query22	13052	12904	12754	12754
query23	15893	15202	14643	14643
query23_1	15473	15147	15140	15140
query24	7819	1736	1239	1239
query24_1	1244	1254	1242	1242
query25	560	445	393	393
query26	1317	364	219	219
query27	2575	590	382	382
query28	4576	2062	2022	2022
query29	1084	634	537	537
query30	329	241	215	215
query31	1159	1098	1029	1029
query32	110	61	54	54
query33	517	303	236	236
query34	1182	1116	643	643
query35	721	734	623	623
query36	773	780	687	687
query37	164	109	89	89
query38	1832	1789	1684	1684
query39	830	821	804	804
query39_1	783	770	792	770
query40	244	158	134	134
query41	62	64	60	60
query42	92	91	87	87
query43	312	313	274	274
query44	1401	765	763	763
query45	178	169	163	163
query46	1023	1121	717	717
query47	1577	1555	1481	1481
query48	413	419	298	298
query49	571	394	312	312
query50	1031	430	323	323
query51	10676	10484	10725	10484
query52	85	85	74	74
query53	268	291	203	203
query54	281	239	261	239
query55	76	69	67	67
query56	310	280	288	280
query57	1021	1004	961	961
query58	269	244	251	244
query59	1506	1581	1330	1330
query60	321	266	249	249
query61	155	153	150	150
query62	391	327	273	273
query63	232	191	207	191
query64	2890	1037	846	846
query65	3817	3822	3839	3822
query66	1860	486	358	358
query67	20198	20119	19928	19928
query68	3038	1627	1053	1053
query69	412	298	259	259
query70	876	753	791	753
query71	354	339	319	319
query72	3006	2694	2371	2371
query73	831	777	398	398
query74	4638	4501	4279	4279
query75	2380	2337	1991	1991
query76	2315	1171	734	734
query77	342	390	279	279
query78	11279	11278	10629	10629
query79	1348	1144	751	751
query80	1188	539	466	466
query81	495	326	274	274
query82	613	176	136	136
query83	375	313	298	298
query84	321	156	135	135
query85	1004	624	549	549
query86	371	242	216	216
query87	1998	1959	1842	1842
query88	3681	2813	2793	2793
query89	392	312	283	283
query90	1783	197	197	197
query91	204	194	170	170
query92	61	60	56	56
query93	1688	1514	1064	1064
query94	632	360	278	278
query95	792	504	467	467
query96	989	805	336	336
query97	2462	2451	2377	2377
query98	196	196	181	181
query99	739	724	615	615
Total cold run time: 245718 ms
Total hot run time: 158754 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 23.72 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit a3536a54198ed2a8bdc7ba35e8d3469eeb3209b7, data reload: false

query1	0.01	0.00	0.01
query2	0.09	0.05	0.05
query3	0.25	0.14	0.13
query4	1.60	0.14	0.13
query5	0.23	0.22	0.22
query6	1.15	0.81	0.82
query7	0.04	0.02	0.00
query8	0.06	0.04	0.04
query9	0.38	0.32	0.31
query10	0.54	0.55	0.57
query11	0.19	0.14	0.13
query12	0.18	0.14	0.14
query13	0.47	0.45	0.46
query14	1.01	0.99	0.99
query15	0.60	0.59	0.57
query16	0.34	0.33	0.31
query17	1.07	1.10	1.08
query18	0.20	0.20	0.19
query19	1.99	1.97	1.86
query20	0.02	0.01	0.01
query21	15.46	0.21	0.13
query22	4.92	0.06	0.05
query23	16.11	0.30	0.12
query24	2.92	0.43	0.33
query25	0.12	0.05	0.05
query26	0.75	0.20	0.16
query27	0.04	0.04	0.03
query28	3.57	0.79	0.33
query29	12.46	4.03	3.20
query30	0.27	0.15	0.17
query31	2.77	0.53	0.31
query32	3.22	0.58	0.49
query33	3.17	3.15	3.17
query34	15.49	3.92	3.27
query35	3.19	3.24	3.21
query36	0.53	0.43	0.41
query37	0.08	0.07	0.06
query38	0.05	0.04	0.04
query39	0.03	0.04	0.02
query40	0.17	0.15	0.15
query41	0.08	0.03	0.03
query42	0.04	0.03	0.03
query43	0.04	0.04	0.03
Total cold run time: 95.9 s
Total hot run time: 23.72 s

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 0.00% (0/66) 🎉
Increment coverage report
Complete coverage report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants