Skip to content

Commit 197e279

Browse files
authored
CDRIVER-2813 Remove ENABLE_EXTRA_ALIGNMENT (CXX-3260) (#1364)
* Set MONGOC_VERSION_MINIMUM to f1e2b540 * Partially revert 0ca160d by removing bsoncxx::aligned_storage<T>
1 parent 5859e06 commit 197e279

File tree

16 files changed

+169
-2069
lines changed

16 files changed

+169
-2069
lines changed

.evergreen/config_generator/components/funcs/compile.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ class Compile(Function):
1717
},
1818
include_expansions_in_env=[
1919
'branch_name',
20-
'BSON_EXTRA_ALIGNMENT',
2120
'BSONCXX_POLYFILL',
2221
'build_type',
2322
'COMPILE_MACRO_GUARD_TESTS',

.evergreen/config_generator/components/funcs/install_c_driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# Only LIBMONGOC_DOWNLOAD_VERSION needs to be updated when pinning to an unreleased commit.
1515
# If pinning to an unreleased commit, create a "Blocked" JIRA ticket with
1616
# a "depends on" link to the appropriate C Driver version release ticket.
17-
MONGOC_VERSION_MINIMUM = '57bffac11fde38d1ce097bb22fb5322a6114d644' # CXX-3103: bump to 2.0.0 once released.
17+
MONGOC_VERSION_MINIMUM = 'f1e2b54090ea28b169b7d9949bd318615188d81d' # CXX-3103: bump to 2.0.0 once released.
1818

1919

2020
class InstallCDriver(Function):

.evergreen/config_generator/components/integration.py

Lines changed: 25 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -24,70 +24,60 @@
2424
LINUX_MATRIX = [
2525
# Linux x86_64 (full).
2626
# RHEL 8 x86_64: 4.0+.
27-
('rhel80', None, ['Debug'], ['shared', 'static'], [11, 17], [None], ['plain', 'csfle'], [False], [ '4.2', '4.4', '5.0', '6.0', '7.0', '8.0', 'latest'], ['single', 'replica', 'sharded']),
28-
('rhel80', None, ['Debug'], ['shared', 'static'], [11, 17], [None], ['plain', ], [False], ['4.0', ], ['single', 'replica', 'sharded']), # CSFLE: 4.2+.
27+
('rhel80', None, ['Debug'], ['shared', 'static'], [11, 17], [None], ['plain', 'csfle'], [ '4.2', '4.4', '5.0', '6.0', '7.0', '8.0', 'latest'], ['single', 'replica', 'sharded']),
28+
('rhel80', None, ['Debug'], ['shared', 'static'], [11, 17], [None], ['plain', ], ['4.0', ], ['single', 'replica', 'sharded']), # CSFLE: 4.2+.
2929

3030
# Linux ARM64 (full).
3131
# Linux ARM64: 4.4+.
32-
('ubuntu2004-arm64', None, ['Debug'], ['shared', 'static'], [11, 17], [None], ['plain', 'csfle'], [False], ['4.4', '5.0', '6.0', '7.0', '8.0', 'latest'], ['single', 'replica', 'sharded']),
32+
('ubuntu2004-arm64', None, ['Debug'], ['shared', 'static'], [11, 17], [None], ['plain', 'csfle'], ['4.4', '5.0', '6.0', '7.0', '8.0', 'latest'], ['single', 'replica', 'sharded']),
3333

3434
# Linux Power.
3535
# RHEL 8 Power: 4.2+.
36-
('rhel8-power', None, ['Debug'], ['shared'], [11], [None], ['csfle'], [False], ['latest'], ['replica']),
36+
('rhel8-power', None, ['Debug'], ['shared'], [11], [None], ['csfle'], ['latest'], ['replica']),
3737

3838
# Linux zSeries.
3939
# RHEL 8 zSeries: 5.0+.
40-
('rhel8-zseries', None, ['Debug'], ['shared'], [11], [None], ['csfle'], [False], ['latest'], ['replica']),
40+
('rhel8-zseries', None, ['Debug'], ['shared'], [11], [None], ['csfle'], ['latest'], ['replica']),
4141
]
4242

4343
MACOS_MATRIX = [
4444
# MacOS ARM64 (shared only, no extra alignment, min-max-latest).
4545
# MacOS ARM64: 6.0+.
46-
('macos-14-arm64', None, ['Debug'], ['shared'], [11, 17], [None], ['plain', 'csfle'], [False], ['6.0', '8.0', 'latest'], ['single', 'replica', 'sharded']),
46+
('macos-14-arm64', None, ['Debug'], ['shared'], [11, 17], [None], ['plain', 'csfle'], ['6.0', '8.0', 'latest'], ['single', 'replica', 'sharded']),
4747

4848
# MacOS x86_64 (shared only, C++11 only, no extra alignment, min-max-latest).
4949
# MacOS x86_64: 4.2+.
50-
('macos-14', None, ['Debug'], ['shared'], [11], [None], ['plain', 'csfle'], [False], ['4.2', '8.0', 'latest'], ['single', 'replica', 'sharded']),
50+
('macos-14', None, ['Debug'], ['shared'], [11], [None], ['plain', 'csfle'], ['4.2', '8.0', 'latest'], ['single', 'replica', 'sharded']),
5151

5252
]
5353

5454
WINDOWS_MATRIX = [
5555
# Windows x86_64 (min-max-latest).
5656
# Windows x86_64: 4.2+.
57-
('windows-vsCurrent', 'vs2022x64', ['Debug'], ['shared'], [11, 17], [None], ['plain', 'csfle'], [False], ['4.2', '8.0', 'latest'], ['single', 'replica', 'sharded']),
57+
('windows-vsCurrent', 'vs2022x64', ['Debug'], ['shared'], [11, 17], [None], ['plain', 'csfle'], ['4.2', '8.0', 'latest'], ['single', 'replica', 'sharded']),
5858
]
5959

6060
MONGOCRYPTD_MATRIX = [
61-
('rhel80', None, ['Debug'], ['shared'], [11], [None], ['crypt'], [False], ['latest'], ['replica']),
62-
('ubuntu2004-arm64', None, ['Debug'], ['shared'], [11], [None], ['crypt'], [False], ['latest'], ['replica']),
63-
('rhel8-power', None, ['Debug'], ['shared'], [11], [None], ['crypt'], [False], ['latest'], ['replica']),
64-
('rhel8-zseries', None, ['Debug'], ['shared'], [11], [None], ['crypt'], [False], ['latest'], ['replica']),
65-
('macos-14-arm64', None, ['Debug'], ['shared'], [11], [None], ['crypt'], [False], ['latest'], ['replica']),
66-
('macos-14', None, ['Debug'], ['shared'], [11], [None], ['crypt'], [False], ['latest'], ['replica']),
67-
('windows-vsCurrent', 'vs2022x64', ['Debug'], ['shared'], [11], [None], ['crypt'], [False], ['latest'], ['replica']),
68-
]
69-
70-
EXTRA_ALIGNMENT_MATRIX = [
71-
('rhel80', None, ['Debug'], ['shared'], [11], [None], ['csfle'], [True], ['latest'], ['replica']),
72-
('ubuntu2004-arm64', None, ['Debug'], ['shared'], [11], [None], ['csfle'], [True], ['latest'], ['replica']),
73-
('rhel8-power', None, ['Debug'], ['shared'], [11], [None], ['csfle'], [True], ['latest'], ['replica']),
74-
('rhel8-zseries', None, ['Debug'], ['shared'], [11], [None], ['csfle'], [True], ['latest'], ['replica']),
75-
('macos-14-arm64', None, ['Debug'], ['shared'], [11], [None], ['csfle'], [True], ['latest'], ['replica']),
76-
('macos-14', None, ['Debug'], ['shared'], [11], [None], ['csfle'], [True], ['latest'], ['replica']),
77-
('windows-vsCurrent', 'vs2022x64', ['Debug'], ['shared'], [11], [None], ['csfle'], [True], ['latest'], ['replica']),
61+
('rhel80', None, ['Debug'], ['shared'], [11], [None], ['crypt'], ['latest'], ['replica']),
62+
('ubuntu2004-arm64', None, ['Debug'], ['shared'], [11], [None], ['crypt'], ['latest'], ['replica']),
63+
('rhel8-power', None, ['Debug'], ['shared'], [11], [None], ['crypt'], ['latest'], ['replica']),
64+
('rhel8-zseries', None, ['Debug'], ['shared'], [11], [None], ['crypt'], ['latest'], ['replica']),
65+
('macos-14-arm64', None, ['Debug'], ['shared'], [11], [None], ['crypt'], ['latest'], ['replica']),
66+
('macos-14', None, ['Debug'], ['shared'], [11], [None], ['crypt'], ['latest'], ['replica']),
67+
('windows-vsCurrent', 'vs2022x64', ['Debug'], ['shared'], [11], [None], ['crypt'], ['latest'], ['replica']),
7868
]
7969

8070
# fmt: on
8171
# pylint: enable=line-too-long
8272

8373

84-
ALL_MATRIX = LINUX_MATRIX + MACOS_MATRIX + WINDOWS_MATRIX + MONGOCRYPTD_MATRIX + EXTRA_ALIGNMENT_MATRIX
74+
ALL_MATRIX = LINUX_MATRIX + MACOS_MATRIX + WINDOWS_MATRIX + MONGOCRYPTD_MATRIX
8575

8676

8777
def tasks():
88-
for distro_name, compiler, build_types, link_types, cxx_standards, polyfills, with_csfles, with_extra_aligns, mongodb_versions, topologies in ALL_MATRIX:
89-
for build_type, link_type, cxx_standard, polyfill, with_csfle, with_extra_align, mongodb_version, topology in product(
90-
build_types, link_types, cxx_standards, polyfills, with_csfles, with_extra_aligns, mongodb_versions, topologies,
78+
for distro_name, compiler, build_types, link_types, cxx_standards, polyfills, with_csfles, mongodb_versions, topologies in ALL_MATRIX:
79+
for build_type, link_type, cxx_standard, polyfill, with_csfle, mongodb_version, topology in product(
80+
build_types, link_types, cxx_standards, polyfills, with_csfles, mongodb_versions, topologies,
9181
):
9282
distro = find_large_distro(distro_name)
9383

@@ -106,10 +96,6 @@ def tasks():
10696
name += '-csfle'
10797
tags += ['csfle']
10898

109-
if with_extra_align:
110-
name += '-extra_alignment'
111-
tags += ['extra_alignment']
112-
11399
name += f'-{mongodb_version}-{topology}'
114100
tags += [mongodb_version, topology]
115101

@@ -119,15 +105,9 @@ def tasks():
119105

120106
updates = []
121107
icd_vars = {}
122-
compile_vars = {'ENABLE_TESTS': 'ON'}
108+
compile_vars = {'ENABLE_TESTS': 'ON', 'RUN_DISTCHECK': 1}
123109
test_vars = {'MONGOCXX_TEST_TOPOLOGY': topology}
124110

125-
if with_extra_align:
126-
icd_vars |= {'BSON_EXTRA_ALIGNMENT': 1}
127-
compile_vars |= {'BSON_EXTRA_ALIGNMENT': 1}
128-
else:
129-
compile_vars |= {'RUN_DISTCHECK': 1}
130-
131111
if with_csfle != 'plain':
132112
test_vars |= {'TEST_WITH_CSFLE': 'ON'}
133113

@@ -155,15 +135,12 @@ def tasks():
155135
commands += [
156136
Setup.call(),
157137
StartMongod.call(mongodb_version=mongodb_version, topology=topology),
158-
] + [
159-
InstallCDriver.call(vars=icd_vars | ({'SKIP_INSTALL_LIBMONGOCRYPT': 1} if with_extra_align else {})),
160-
] + [
138+
InstallCDriver.call(vars=icd_vars),
161139
InstallUV.call(),
162140
Compile.call(polyfill=polyfill, vars=compile_vars),
163141
FetchDET.call(),
164142
RunKMSServers.call(),
165-
] + [
166-
Test.call(vars=test_vars | ({'use_mongocryptd': True} if with_csfle == 'crypt' else {}))
143+
Test.call(vars=test_vars | ({'use_mongocryptd': True} if with_csfle == 'crypt' else {})),
167144
]
168145

169146
# PowerPC and zSeries are limited resources.
@@ -191,11 +168,10 @@ def variants():
191168
]
192169

193170
matrices = [
194-
('linux', '.linux !.mongocryptd !.extra_alignment', LINUX_MATRIX),
195-
('macos', '.macos !.mongocryptd !.extra_alignment', MACOS_MATRIX),
196-
('windows', '.windows !.mongocryptd !.extra_alignment', WINDOWS_MATRIX),
171+
('linux', '.linux !.mongocryptd', LINUX_MATRIX),
172+
('macos', '.macos !.mongocryptd', MACOS_MATRIX),
173+
('windows', '.windows !.mongocryptd', WINDOWS_MATRIX),
197174
('mongocryptd', '.mongocryptd', MONGOCRYPTD_MATRIX),
198-
('extra_alignment', '.extra_alignment', EXTRA_ALIGNMENT_MATRIX),
199175
]
200176

201177
for name, filter, matrix in matrices:

.evergreen/config_generator/components/sanitizers.py

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# pylint: disable=line-too-long
2323
# fmt: off
2424
MATRIX = [
25-
('rhel80', ['asan', 'ubsan'], ['shared', 'static'], [False, True], ['4.0', '8.0', 'latest'], ['single', 'replica', 'sharded']),
25+
('rhel80', ['asan', 'ubsan'], ['shared', 'static'], ['4.0', '8.0', 'latest'], ['single', 'replica', 'sharded']),
2626
]
2727
# fmt: on
2828
# pylint: enable=line-too-long
@@ -35,9 +35,9 @@ def tasks():
3535
cc_compiler = f'/opt/mongodbtoolchain/v4/bin/{compiler}'
3636
cxx_compiler = f'/opt/mongodbtoolchain/v4/bin/{compiler}++'
3737

38-
for distro_name, sanitizers, link_types, with_extra_aligns, mongodb_versions, topologies in MATRIX:
39-
for sanitizer, link_type, with_extra_align, mongodb_version, topology in product(
40-
sanitizers, link_types, with_extra_aligns, mongodb_versions, topologies
38+
for distro_name, sanitizers, link_types, mongodb_versions, topologies in MATRIX:
39+
for sanitizer, link_type, mongodb_version, topology in product(
40+
sanitizers, link_types, mongodb_versions, topologies
4141
):
4242
distro = find_large_distro(distro_name)
4343

@@ -50,10 +50,6 @@ def tasks():
5050
name += f'-{link_type}'
5151
tags += [link_type]
5252

53-
if with_extra_align:
54-
name += f'-extra_alignment'
55-
tags += ['extra_alignment']
56-
5753
name += f'-{mongodb_version}-{topology}'
5854
tags += [mongodb_version, topology]
5955

@@ -62,7 +58,7 @@ def tasks():
6258
for key, value in [('cc_compiler', cc_compiler), ('cxx_compiler', cxx_compiler)]]
6359

6460
icd_vars = {'SKIP_INSTALL_LIBMONGOCRYPT': 1}
65-
compile_vars = {'ENABLE_TESTS': 'ON'}
61+
compile_vars = {'ENABLE_TESTS': 'ON', 'RUN_DISTCHECK': 1}
6662
test_vars = {
6763
'MONGOCXX_TEST_TOPOLOGY': topology,
6864
'example_projects_cc': 'clang',
@@ -72,12 +68,6 @@ def tasks():
7268
if link_type == 'static':
7369
updates.append(KeyValueParam(key='USE_STATIC_LIBS', value='1'))
7470

75-
if with_extra_align:
76-
icd_vars |= {'BSON_EXTRA_ALIGNMENT': 1}
77-
compile_vars |= {'BSON_EXTRA_ALIGNMENT': 1}
78-
else:
79-
compile_vars |= {'RUN_DISTCHECK': 1}
80-
8171
commands = [expansions_update(updates=updates)] if updates else []
8272

8373
match sanitizer:

.evergreen/config_generator/components/valgrind.py

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# fmt: off
2424
MATRIX = [
2525
# min-max-latest
26-
('rhel80', None, ['shared'], [False, True], ['4.0', '8.0', 'latest'], ['single', 'replica', 'sharded']),
26+
('rhel80', None, ['shared'], ['4.0', '8.0', 'latest'], ['single', 'replica', 'sharded']),
2727
]
2828
# fmt: on
2929
# pylint: enable=line-too-long
@@ -32,9 +32,9 @@
3232
def tasks():
3333
res = []
3434

35-
for distro_name, compiler, link_types, with_extra_aligns, mongodb_versions, topologies in MATRIX:
36-
for link_type, with_extra_align, mongodb_version, topology in product(
37-
link_types, with_extra_aligns, mongodb_versions, topologies
35+
for distro_name, compiler, link_types, mongodb_versions, topologies in MATRIX:
36+
for link_type, mongodb_version, topology in product(
37+
link_types, mongodb_versions, topologies
3838
):
3939
distro = find_large_distro(distro_name)
4040

@@ -47,16 +47,12 @@ def tasks():
4747
name += f'-{link_type}'
4848
tags += [link_type]
4949

50-
if with_extra_align:
51-
name += f'-extra_alignment'
52-
tags += ['extra_alignment']
53-
5450
name += f'-{mongodb_version}-{topology}'
5551
tags += [mongodb_version, topology]
5652

5753
updates = [KeyValueParam(key='build_type', value='Debug')]
5854
icd_vars = {'SKIP_INSTALL_LIBMONGOCRYPT': 1}
59-
compile_vars = {'ENABLE_TESTS': 'ON'}
55+
compile_vars = {'ENABLE_TESTS': 'ON', 'RUN_DISTCHECK': 1}
6056
test_vars = {
6157
'MONGOCXX_TEST_TOPOLOGY': topology,
6258
'TEST_WITH_VALGRIND': 'ON',
@@ -67,12 +63,6 @@ def tasks():
6763
if link_type == 'static':
6864
updates.append(KeyValueParam(key='USE_STATIC_LIBS', value='1'))
6965

70-
if with_extra_align:
71-
icd_vars |= {'BSON_EXTRA_ALIGNMENT': 1}
72-
compile_vars |= {'BSON_EXTRA_ALIGNMENT': 1}
73-
else:
74-
compile_vars |= {'RUN_DISTCHECK': 1}
75-
7666
commands = [expansions_update(updates=updates)] if updates else []
7767

7868
commands += [

.evergreen/generated_configs/functions.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ functions:
264264
CXX: ${cxx_compiler}
265265
include_expansions_in_env:
266266
- branch_name
267-
- BSON_EXTRA_ALIGNMENT
268267
- BSONCXX_POLYFILL
269268
- build_type
270269
- COMPILE_MACRO_GUARD_TESTS
@@ -398,7 +397,7 @@ functions:
398397
type: setup
399398
params:
400399
updates:
401-
- { key: mongoc_version_minimum, value: 57bffac11fde38d1ce097bb22fb5322a6114d644 }
400+
- { key: mongoc_version_minimum, value: f1e2b54090ea28b169b7d9949bd318615188d81d }
402401
- command: subprocess.exec
403402
type: setup
404403
params:

0 commit comments

Comments
 (0)