Skip to content

Commit 4de8e00

Browse files
author
Hamza Ech-chadli
committed
[GR-69079] Deprecate ignore_suite_commit_info flag/option in favor of capture_suite_commit_info
PullRequest: mx/1972
2 parents 49fde66 + 5f4eef2 commit 4de8e00

File tree

8 files changed

+42
-43
lines changed

8 files changed

+42
-43
lines changed

ci.jsonnet

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ local with(platform, java_release, timelimit="15:00") = {
8686

8787
bench_test:: self.with_name("bench-test") + {
8888
run: [
89-
[mx, "benchmark", "--results-file", "bench-results.json", "--ignore-suite-commit-info=mx", "test"],
89+
[mx, "benchmark", "--results-file", "bench-results.json", "test"],
9090
],
9191
teardown: [
9292
["bench-uploader.py", "bench-results.json"],
@@ -98,7 +98,7 @@ local with(platform, java_release, timelimit="15:00") = {
9898
[mx, "build"],
9999
],
100100
run: [
101-
[mx, "benchmark", "--ignore-suite-commit-info=mx", "jmh-dist:*"],
101+
[mx, "benchmark", "jmh-dist:*"],
102102
['set-export', 'PYTHONPATH', '${PWD}/src:${PYTHONPATH}'],
103103
["python3", path("tests/jmh_filtering_tests.py")],
104104
]
@@ -255,7 +255,6 @@ local with(platform, java_release, timelimit="15:00") = {
255255
with(common.windows_amd64, self.primary_jdk_version).fetchjdk_test,
256256
with(common.linux_amd64, self.primary_jdk_version).bisect_test,
257257
with(common.windows_amd64, self.primary_jdk_version).gate,
258-
with(common.darwin_amd64, self.primary_jdk_version, timelimit="25:00").gate,
259258
with(common.darwin_aarch64, self.primary_jdk_version).gate,
260259
with(common.linux_amd64, self.primary_jdk_version).bench_test,
261260
with(common.linux_amd64, self.primary_jdk_version).jmh_test,
@@ -268,7 +267,6 @@ local with(platform, java_release, timelimit="15:00") = {
268267

269268
with(common.linux_amd64, self.secondary_jdk_version).gate,
270269
with(common.windows_amd64, self.secondary_jdk_version).gate,
271-
with(common.darwin_amd64, self.secondary_jdk_version, timelimit="25:00").gate,
272270
with(common.darwin_aarch64, self.secondary_jdk_version).gate,
273271
],
274272
builds: [remove_mx_from_packages(b) for b in builds],

ci/common.jsonnet

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,7 @@ local common_json = import "../common.json";
363363
pcre2: '==10.37',
364364
gnur: '==4.0.3-gcc4.8.5-pcre2',
365365
} + if (std.objectHasAll(self, 'os_distro') && self['os_distro'] == 'ol' && std.objectHasAll(self, 'os_distro_version') && self['os_distro_version'] == '9') then {curl: '==7.78.0'} else {curl: '==7.50.1'}
366-
else if (self.os == "darwin" && self.arch == "amd64") then {
367-
'pcre2': '==10.37',
368-
} else {},
366+
else {},
369367
environment+:
370368
if (self.os == "linux" && self.arch == "amd64") then {
371369
TZDIR: '/usr/share/zoneinfo',
@@ -376,25 +374,14 @@ local common_json = import "../common.json";
376374
GNUR_HOME_BINARY: '/cm/shared/apps/gnur/4.0.3_gcc4.8.5_pcre2-10.37/R-4.0.3',
377375
FASTR_RELEASE: 'true',
378376
}
379-
else if (self.os == "darwin" && self.arch == "amd64") then {
380-
FASTR_FC: '/cm/shared/apps/gcc/8.3.0/bin/gfortran',
381-
FASTR_CC: '/cm/shared/apps/gcc/8.3.0/bin/gcc',
382-
TZDIR: '/usr/share/zoneinfo',
383-
PKG_INCLUDE_FLAGS_OVERRIDE : '-I/cm/shared/apps/pcre2/pcre2-10.37/include -I/cm/shared/apps/bzip2/1.0.6/include -I/cm/shared/apps/xz/5.2.2/include -I/cm/shared/apps/curl/7.50.1/include',
384-
PKG_LDFLAGS_OVERRIDE : '-L/cm/shared/apps/bzip2/1.0.6/lib -L/cm/shared/apps/xz/5.2.2/lib -L/cm/shared/apps/pcre2/pcre2-10.37/lib -L/cm/shared/apps/curl/7.50.1/lib -L/cm/shared/apps/gcc/10.2.0/lib -L/usr/lib',
385-
FASTR_RELEASE: 'true',
386-
} else {},
377+
else {},
387378
downloads+:
388379
if (self.os == "linux" && self.arch == "amd64") then {
389380
BLAS_LAPACK_DIR: { name: 'fastr-403-blas-lapack-gcc', version: '4.8.5', platformspecific: true },
390381
F2C_BINARY: { name: 'f2c-binary', version: '7', platformspecific: true },
391382
FASTR_RECOMMENDED_BINARY: { name: 'fastr-recommended-pkgs', version: '16', platformspecific: true },
392383
}
393-
else if (self.os == "darwin" && self.arch == "amd64") then {
394-
BLAS_LAPACK_DIR: { name: "fastr-403-blas-lapack-gcc", version: "8.3.0", platformspecific: true },
395-
F2C_BINARY: { name: 'f2c-binary', version: '7', platformspecific: true },
396-
FASTR_RECOMMENDED_BINARY: { name: 'fastr-recommended-pkgs', version: '16', platformspecific: true },
397-
} else {},
384+
else {},
398385
catch_files+: if (self.os != "windows" && self.arch == "amd64") then [
399386
'GNUR_CONFIG_LOG = (?P<filename>.+\\.log)',
400387
'GNUR_MAKE_LOG = (?P<filename>.+\\.log)',
@@ -550,7 +537,6 @@ local common_json = import "../common.json";
550537

551538
linux_amd64_ubuntu: linux + amd64 + ubuntu22 + { os_distro:: "ubuntu", os_distro_version:: "22" },
552539

553-
darwin_amd64: darwin + amd64,
554540
darwin_aarch64: darwin + aarch64,
555541

556542
windows_amd64: windows + amd64,
@@ -581,7 +567,6 @@ local common_json = import "../common.json";
581567

582568
linux_amd64_ubuntu: self.bare.linux_amd64_ubuntu + common,
583569

584-
darwin_amd64: self.bare.darwin_amd64 + common,
585570
darwin_aarch64: self.bare.darwin_aarch64 + common,
586571

587572
windows_amd64: self.bare.windows_amd64 + common,

common.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"Jsonnet files should not include this file directly but use ci/common.jsonnet instead."
55
],
66

7-
"mx_version": "7.64.0",
7+
"mx_version": "7.64.2",
88

99
"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
1010
"jdks": {
@@ -45,16 +45,16 @@
4545

4646
"oraclejdk24": {"name": "jpg-jdk", "version": "24", "build_id": "jdk-24.0.1+9", "platformspecific": true, "extrabundles": ["static-libs"]},
4747

48-
"oraclejdk25": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+37", "platformspecific": true, "extrabundles": ["static-libs"]},
48+
"oraclejdk25": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25.0.1+8", "platformspecific": true, "extrabundles": ["static-libs"]},
4949
"graalvm-ee-25-ea": {"name": "graalvm-jdk", "version": "25.0.0", "ea": "36", "platformspecific": true },
5050

51-
"oraclejdk-latest": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+37", "platformspecific": true, "extrabundles": ["static-libs"]},
52-
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-25+37-jvmci-25.1-b07", "platformspecific": true },
53-
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-25+37-jvmci-25.1-b07-debug", "platformspecific": true },
54-
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-25+37-jvmci-25.1-b07-sulong", "platformspecific": true },
55-
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-25+37-jvmci-25.1-b07", "platformspecific": true },
56-
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-25+37-jvmci-25.1-b07-debug", "platformspecific": true },
57-
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-25+37-jvmci-25.1-b07-sulong", "platformspecific": true }
51+
"oraclejdk-latest": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25.0.1+8", "platformspecific": true, "extrabundles": ["static-libs"]},
52+
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-25.0.1+8-jvmci-25.1-b08", "platformspecific": true },
53+
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-25.0.1+8-jvmci-25.1-b08-debug", "platformspecific": true },
54+
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-25.0.1+8-jvmci-25.1-b08-sulong", "platformspecific": true },
55+
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-25.0.1+8-jvmci-25.1-b08", "platformspecific": true },
56+
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-25.0.1+8-jvmci-25.1-b08-debug", "platformspecific": true },
57+
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-25.0.1+8-jvmci-25.1-b08-sulong", "platformspecific": true }
5858
},
5959

6060
"eclipse": {

src/mx/_impl/mx.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1615,6 +1615,7 @@ def __init__(self, mxDir, primary, internal, importing_suite, load, vc, vc_dir,
16151615
self.vc = vc
16161616
self.vc_dir = vc_dir
16171617
self.ignore_suite_commit_info = False
1618+
self.capture_suite_commit_info = False
16181619
self._preload_suite_dict()
16191620
self._init_imports()
16201621
self.removed_dists = []
@@ -1926,7 +1927,8 @@ def _load_suite_dict(self):
19261927
'externalProjects',
19271928
'groupId',
19281929
'release',
1929-
'ignore_suite_commit_info'
1930+
'ignore_suite_commit_info',
1931+
'capture_suite_commit_info'
19301932
]
19311933
if self._preloaded_suite_dict is None:
19321934
self._preload_suite_dict()
@@ -2045,7 +2047,8 @@ def _load_metadata(self):
20452047
scmDict = self._check_suiteDict('scm')
20462048
self.developer = self._check_suiteDict('developer')
20472049
self.url = suiteDict.get('url')
2048-
self.ignore_suite_commit_info = suiteDict.get('ignore_suite_commit_info', False)
2050+
self.ignore_suite_commit_info = suiteDict.get('ignore_suite_commit_info')
2051+
self.capture_suite_commit_info = suiteDict.get('capture_suite_commit_info', False)
20492052
if not _validate_absolute_url(self.url, acceptNone=True):
20502053
abort(f'Invalid url in {self.suite_py()}')
20512054
self.defaultLicense = suiteDict.get(self.getMxCompatibility().defaultLicenseAttribute())

src/mx/_impl/mx_benchmark.py

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3934,10 +3934,24 @@ def commit_info(prefix, mxsuite):
39343934

39353935
standard.update(commit_info("", mx.primary_suite()))
39363936
for mxsuite in mx.suites():
3937-
ignored = mxBenchmarkArgs.ignore_suite_commit_info
3938-
if (ignored and mxsuite.name in ignored) or mxsuite.ignore_suite_commit_info or mxsuite.foreign:
3937+
captured = mxBenchmarkArgs.capture_suite_commit_info
3938+
3939+
if mxsuite.ignore_suite_commit_info is not None:
3940+
if mxsuite.ignore_suite_commit_info != mxsuite.capture_suite_commit_info:
3941+
log_deprecation(
3942+
f"Suite '{mxsuite.name}' uses the deprecated 'ignore_suite_commit_info' (value: {mxsuite.ignore_suite_commit_info}) configuration entry in its suite.py.\n"
3943+
f"Please keep using only 'capture_suite_commit_info' (value: {mxsuite.capture_suite_commit_info})."
3944+
)
3945+
else:
3946+
mx.abort(
3947+
f"Suite '{mxsuite.name}' sets both 'ignore_suite_commit_info' (deprecated, value: {mxsuite.ignore_suite_commit_info}) and 'capture_suite_commit_info' (value: {mxsuite.capture_suite_commit_info}) in its suite.py.\n"
3948+
f"This is a configuration conflict. Please remove 'ignore_suite_commit_info' and keep only 'capture_suite_commit_info'."
3949+
)
3950+
3951+
if mxsuite.foreign:
39393952
continue
3940-
standard.update(commit_info(mxsuite.name + ".", mxsuite))
3953+
if (captured and mxsuite.name in captured) or mxsuite.capture_suite_commit_info:
3954+
standard.update(commit_info(mxsuite.name + ".", mxsuite))
39413955
triggering_suite = self.triggeringSuite(mxBenchmarkArgs)
39423956
if triggering_suite:
39433957
mxsuite = mx.suite(triggering_suite)
@@ -4054,8 +4068,8 @@ def benchpoints(self, args):
40544068
"results_file", nargs="?", default=None,
40554069
help="path to benchmark results json file to modify")
40564070
parser.add_argument(
4057-
"--ignore-suite-commit-info", default=None, type=lambda s: s.split(","),
4058-
help="A comma-separated list of suite dependencies whose commit info must not be included.")
4071+
"--capture-suite-commit-info", default=None, type=lambda s: s.split(","),
4072+
help="A comma-separated list of suite dependencies whose commit info must be included.")
40594073
parser.add_argument(
40604074
"--extras", default=None, help="One or more comma separated key:value pairs to add to the results file. Takes precedence over the keys defined in MX_BENCHMARK_EXTRAS in case of duplicates.")
40614075
parser.add_argument(
@@ -4125,8 +4139,8 @@ def benchmark(self, mxBenchmarkArgs, bmSuiteArgs, returnSuiteAndResults=False):
41254139
"--triggering-suite", default=None,
41264140
help="Name of the suite that triggered this benchmark, used to extract commit info.")
41274141
parser.add_argument(
4128-
"--ignore-suite-commit-info", default=None, type=lambda s: s.split(","),
4129-
help="A comma-separated list of suite dependencies whose commit info must not be included.")
4142+
"--capture-suite-commit-info", default=None, type=lambda s: s.split(","),
4143+
help="A comma-separated list of suite dependencies whose commit info must be included.")
41304144
parser.add_argument(
41314145
"--extras", default=None, help="One or more comma separated key:value pairs to add to the results file. Takes precedence over the keys defined in MX_BENCHMARK_EXTRAS in case of duplicates.")
41324146
parser.add_argument(

src/mx/_impl/ps_poller.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ def _parse_args(args):
5656

5757

5858
def _start_target_process(target_cmd):
59-
print(f"Starting and attaching to command: \"{' '.join(target_cmd)}\"")
6059
return subprocess.Popen(target_cmd, start_new_session=True)
6160

6261

src/mx/mx_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# The version must be updated for every PR (checked in CI) and the comment should reflect the PR's issue
2-
version = "7.64.2" # GR-71010 MX_BENCHMARK_EXTRAS support
2+
version = "7.65.0" # GR-69079: opt-in instead of opt-out for commit info in mx benchmark data

tests/code_owners_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ def test_codeowners_json_output():
788788
".mx_vcs_root": "",
789789
"unittest": {
790790
"mx.unittest": {
791-
"suite.py": """suite = { "mxversion": "7.4.0", "name": "unittest", "ignore_suite_commit_info": True}""",
791+
"suite.py": """suite = { "mxversion": "7.4.0", "name": "unittest" }""",
792792
},
793793
},
794794
}

0 commit comments

Comments
 (0)