Skip to content

CDRIVER-2813 Remove ENABLE_EXTRA_ALIGNMENT (CXX-3260) #1364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .evergreen/config_generator/components/funcs/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class Compile(Function):
},
include_expansions_in_env=[
'branch_name',
'BSON_EXTRA_ALIGNMENT',
'BSONCXX_POLYFILL',
'build_type',
'COMPILE_MACRO_GUARD_TESTS',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# Only LIBMONGOC_DOWNLOAD_VERSION needs to be updated when pinning to an unreleased commit.
# If pinning to an unreleased commit, create a "Blocked" JIRA ticket with
# a "depends on" link to the appropriate C Driver version release ticket.
MONGOC_VERSION_MINIMUM = '57bffac11fde38d1ce097bb22fb5322a6114d644' # CXX-3103: bump to 2.0.0 once released.
MONGOC_VERSION_MINIMUM = 'f1e2b54090ea28b169b7d9949bd318615188d81d' # CXX-3103: bump to 2.0.0 once released.


class InstallCDriver(Function):
Expand Down
74 changes: 25 additions & 49 deletions .evergreen/config_generator/components/integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,70 +24,60 @@
LINUX_MATRIX = [
# Linux x86_64 (full).
# RHEL 8 x86_64: 4.0+.
('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']),
('rhel80', None, ['Debug'], ['shared', 'static'], [11, 17], [None], ['plain', ], [False], ['4.0', ], ['single', 'replica', 'sharded']), # CSFLE: 4.2+.
('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']),
('rhel80', None, ['Debug'], ['shared', 'static'], [11, 17], [None], ['plain', ], ['4.0', ], ['single', 'replica', 'sharded']), # CSFLE: 4.2+.

# Linux ARM64 (full).
# Linux ARM64: 4.4+.
('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']),
('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']),

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

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

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

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

]

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

MONGOCRYPTD_MATRIX = [
('rhel80', None, ['Debug'], ['shared'], [11], [None], ['crypt'], [False], ['latest'], ['replica']),
('ubuntu2004-arm64', None, ['Debug'], ['shared'], [11], [None], ['crypt'], [False], ['latest'], ['replica']),
('rhel8-power', None, ['Debug'], ['shared'], [11], [None], ['crypt'], [False], ['latest'], ['replica']),
('rhel8-zseries', None, ['Debug'], ['shared'], [11], [None], ['crypt'], [False], ['latest'], ['replica']),
('macos-14-arm64', None, ['Debug'], ['shared'], [11], [None], ['crypt'], [False], ['latest'], ['replica']),
('macos-14', None, ['Debug'], ['shared'], [11], [None], ['crypt'], [False], ['latest'], ['replica']),
('windows-vsCurrent', 'vs2022x64', ['Debug'], ['shared'], [11], [None], ['crypt'], [False], ['latest'], ['replica']),
]

EXTRA_ALIGNMENT_MATRIX = [
('rhel80', None, ['Debug'], ['shared'], [11], [None], ['csfle'], [True], ['latest'], ['replica']),
('ubuntu2004-arm64', None, ['Debug'], ['shared'], [11], [None], ['csfle'], [True], ['latest'], ['replica']),
('rhel8-power', None, ['Debug'], ['shared'], [11], [None], ['csfle'], [True], ['latest'], ['replica']),
('rhel8-zseries', None, ['Debug'], ['shared'], [11], [None], ['csfle'], [True], ['latest'], ['replica']),
('macos-14-arm64', None, ['Debug'], ['shared'], [11], [None], ['csfle'], [True], ['latest'], ['replica']),
('macos-14', None, ['Debug'], ['shared'], [11], [None], ['csfle'], [True], ['latest'], ['replica']),
('windows-vsCurrent', 'vs2022x64', ['Debug'], ['shared'], [11], [None], ['csfle'], [True], ['latest'], ['replica']),
('rhel80', None, ['Debug'], ['shared'], [11], [None], ['crypt'], ['latest'], ['replica']),
('ubuntu2004-arm64', None, ['Debug'], ['shared'], [11], [None], ['crypt'], ['latest'], ['replica']),
('rhel8-power', None, ['Debug'], ['shared'], [11], [None], ['crypt'], ['latest'], ['replica']),
('rhel8-zseries', None, ['Debug'], ['shared'], [11], [None], ['crypt'], ['latest'], ['replica']),
('macos-14-arm64', None, ['Debug'], ['shared'], [11], [None], ['crypt'], ['latest'], ['replica']),
('macos-14', None, ['Debug'], ['shared'], [11], [None], ['crypt'], ['latest'], ['replica']),
('windows-vsCurrent', 'vs2022x64', ['Debug'], ['shared'], [11], [None], ['crypt'], ['latest'], ['replica']),
]

# fmt: on
# pylint: enable=line-too-long


ALL_MATRIX = LINUX_MATRIX + MACOS_MATRIX + WINDOWS_MATRIX + MONGOCRYPTD_MATRIX + EXTRA_ALIGNMENT_MATRIX
ALL_MATRIX = LINUX_MATRIX + MACOS_MATRIX + WINDOWS_MATRIX + MONGOCRYPTD_MATRIX


def tasks():
for distro_name, compiler, build_types, link_types, cxx_standards, polyfills, with_csfles, with_extra_aligns, mongodb_versions, topologies in ALL_MATRIX:
for build_type, link_type, cxx_standard, polyfill, with_csfle, with_extra_align, mongodb_version, topology in product(
build_types, link_types, cxx_standards, polyfills, with_csfles, with_extra_aligns, mongodb_versions, topologies,
for distro_name, compiler, build_types, link_types, cxx_standards, polyfills, with_csfles, mongodb_versions, topologies in ALL_MATRIX:
for build_type, link_type, cxx_standard, polyfill, with_csfle, mongodb_version, topology in product(
build_types, link_types, cxx_standards, polyfills, with_csfles, mongodb_versions, topologies,
):
distro = find_large_distro(distro_name)

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

if with_extra_align:
name += '-extra_alignment'
tags += ['extra_alignment']

name += f'-{mongodb_version}-{topology}'
tags += [mongodb_version, topology]

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

updates = []
icd_vars = {}
compile_vars = {'ENABLE_TESTS': 'ON'}
compile_vars = {'ENABLE_TESTS': 'ON', 'RUN_DISTCHECK': 1}
test_vars = {'MONGOCXX_TEST_TOPOLOGY': topology}

if with_extra_align:
icd_vars |= {'BSON_EXTRA_ALIGNMENT': 1}
compile_vars |= {'BSON_EXTRA_ALIGNMENT': 1}
else:
compile_vars |= {'RUN_DISTCHECK': 1}

if with_csfle != 'plain':
test_vars |= {'TEST_WITH_CSFLE': 'ON'}

Expand Down Expand Up @@ -155,15 +135,12 @@ def tasks():
commands += [
Setup.call(),
StartMongod.call(mongodb_version=mongodb_version, topology=topology),
] + [
InstallCDriver.call(vars=icd_vars | ({'SKIP_INSTALL_LIBMONGOCRYPT': 1} if with_extra_align else {})),
] + [
InstallCDriver.call(vars=icd_vars),
InstallUV.call(),
Compile.call(polyfill=polyfill, vars=compile_vars),
FetchDET.call(),
RunKMSServers.call(),
] + [
Test.call(vars=test_vars | ({'use_mongocryptd': True} if with_csfle == 'crypt' else {}))
Test.call(vars=test_vars | ({'use_mongocryptd': True} if with_csfle == 'crypt' else {})),
]

# PowerPC and zSeries are limited resources.
Expand Down Expand Up @@ -191,11 +168,10 @@ def variants():
]

matrices = [
('linux', '.linux !.mongocryptd !.extra_alignment', LINUX_MATRIX),
('macos', '.macos !.mongocryptd !.extra_alignment', MACOS_MATRIX),
('windows', '.windows !.mongocryptd !.extra_alignment', WINDOWS_MATRIX),
('linux', '.linux !.mongocryptd', LINUX_MATRIX),
('macos', '.macos !.mongocryptd', MACOS_MATRIX),
('windows', '.windows !.mongocryptd', WINDOWS_MATRIX),
('mongocryptd', '.mongocryptd', MONGOCRYPTD_MATRIX),
('extra_alignment', '.extra_alignment', EXTRA_ALIGNMENT_MATRIX),
]

for name, filter, matrix in matrices:
Expand Down
20 changes: 5 additions & 15 deletions .evergreen/config_generator/components/sanitizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# pylint: disable=line-too-long
# fmt: off
MATRIX = [
('rhel80', ['asan', 'ubsan'], ['shared', 'static'], [False, True], ['4.0', '8.0', 'latest'], ['single', 'replica', 'sharded']),
('rhel80', ['asan', 'ubsan'], ['shared', 'static'], ['4.0', '8.0', 'latest'], ['single', 'replica', 'sharded']),
]
# fmt: on
# pylint: enable=line-too-long
Expand All @@ -35,9 +35,9 @@ def tasks():
cc_compiler = f'/opt/mongodbtoolchain/v4/bin/{compiler}'
cxx_compiler = f'/opt/mongodbtoolchain/v4/bin/{compiler}++'

for distro_name, sanitizers, link_types, with_extra_aligns, mongodb_versions, topologies in MATRIX:
for sanitizer, link_type, with_extra_align, mongodb_version, topology in product(
sanitizers, link_types, with_extra_aligns, mongodb_versions, topologies
for distro_name, sanitizers, link_types, mongodb_versions, topologies in MATRIX:
for sanitizer, link_type, mongodb_version, topology in product(
sanitizers, link_types, mongodb_versions, topologies
):
distro = find_large_distro(distro_name)

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

if with_extra_align:
name += f'-extra_alignment'
tags += ['extra_alignment']

name += f'-{mongodb_version}-{topology}'
tags += [mongodb_version, topology]

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

icd_vars = {'SKIP_INSTALL_LIBMONGOCRYPT': 1}
compile_vars = {'ENABLE_TESTS': 'ON'}
compile_vars = {'ENABLE_TESTS': 'ON', 'RUN_DISTCHECK': 1}
test_vars = {
'MONGOCXX_TEST_TOPOLOGY': topology,
'example_projects_cc': 'clang',
Expand All @@ -72,12 +68,6 @@ def tasks():
if link_type == 'static':
updates.append(KeyValueParam(key='USE_STATIC_LIBS', value='1'))

if with_extra_align:
icd_vars |= {'BSON_EXTRA_ALIGNMENT': 1}
compile_vars |= {'BSON_EXTRA_ALIGNMENT': 1}
else:
compile_vars |= {'RUN_DISTCHECK': 1}

commands = [expansions_update(updates=updates)] if updates else []

match sanitizer:
Expand Down
20 changes: 5 additions & 15 deletions .evergreen/config_generator/components/valgrind.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# fmt: off
MATRIX = [
# min-max-latest
('rhel80', None, ['shared'], [False, True], ['4.0', '8.0', 'latest'], ['single', 'replica', 'sharded']),
('rhel80', None, ['shared'], ['4.0', '8.0', 'latest'], ['single', 'replica', 'sharded']),
]
# fmt: on
# pylint: enable=line-too-long
Expand All @@ -32,9 +32,9 @@
def tasks():
res = []

for distro_name, compiler, link_types, with_extra_aligns, mongodb_versions, topologies in MATRIX:
for link_type, with_extra_align, mongodb_version, topology in product(
link_types, with_extra_aligns, mongodb_versions, topologies
for distro_name, compiler, link_types, mongodb_versions, topologies in MATRIX:
for link_type, mongodb_version, topology in product(
link_types, mongodb_versions, topologies
):
distro = find_large_distro(distro_name)

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

if with_extra_align:
name += f'-extra_alignment'
tags += ['extra_alignment']

name += f'-{mongodb_version}-{topology}'
tags += [mongodb_version, topology]

updates = [KeyValueParam(key='build_type', value='Debug')]
icd_vars = {'SKIP_INSTALL_LIBMONGOCRYPT': 1}
compile_vars = {'ENABLE_TESTS': 'ON'}
compile_vars = {'ENABLE_TESTS': 'ON', 'RUN_DISTCHECK': 1}
test_vars = {
'MONGOCXX_TEST_TOPOLOGY': topology,
'TEST_WITH_VALGRIND': 'ON',
Expand All @@ -67,12 +63,6 @@ def tasks():
if link_type == 'static':
updates.append(KeyValueParam(key='USE_STATIC_LIBS', value='1'))

if with_extra_align:
icd_vars |= {'BSON_EXTRA_ALIGNMENT': 1}
compile_vars |= {'BSON_EXTRA_ALIGNMENT': 1}
else:
compile_vars |= {'RUN_DISTCHECK': 1}

commands = [expansions_update(updates=updates)] if updates else []

commands += [
Expand Down
3 changes: 1 addition & 2 deletions .evergreen/generated_configs/functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ functions:
CXX: ${cxx_compiler}
include_expansions_in_env:
- branch_name
- BSON_EXTRA_ALIGNMENT
- BSONCXX_POLYFILL
- build_type
- COMPILE_MACRO_GUARD_TESTS
Expand Down Expand Up @@ -398,7 +397,7 @@ functions:
type: setup
params:
updates:
- { key: mongoc_version_minimum, value: 57bffac11fde38d1ce097bb22fb5322a6114d644 }
- { key: mongoc_version_minimum, value: f1e2b54090ea28b169b7d9949bd318615188d81d }
- command: subprocess.exec
type: setup
params:
Expand Down
Loading