Skip to content

Support deprecation of attributes and attribute values#390

Open
khsa1 wants to merge 7 commits intounstablefrom
deprecation-checks
Open

Support deprecation of attributes and attribute values#390
khsa1 wants to merge 7 commits intounstablefrom
deprecation-checks

Conversation

@khsa1
Copy link
Copy Markdown
Contributor

@khsa1 khsa1 commented May 9, 2021

Based on issue #381. We just need to add a deprecated option to the option that has been deprecated/removed. Either a string or a list can be passed in. Then once it has been removed add a second element to the string, i.e.:

ompt_source: {
...
'deprecated': {'download-tr4': '2.29.1'},
'deprecated': {'download-tr4': ['2.29.1']},
'deprecated': {'download-tr4': ['2.29.1', '']},
'deprecated': {'download-tr4': ['2.29.1', <removed tau version>]},
...
}

Base automatically changed from sane-dependencies to unstable July 27, 2021 00:48
@zbeekman
Copy link
Copy Markdown
Member

Failing on installation with:

[TAU] An unexpected IndexError exception was raised:
[TAU] 
[TAU] string index out of range
[TAU] 
[TAU] Traceback (most recent call last):
[TAU]   File 
[TAU]     "/home/runner/taucmdr/system/../packages/taucmdr/cf/software/tau_installation.py",
[TAU]      line 993, in install
[TAU]     self.tau_version = self.get_version(os.path.join(self.install_prefix, 
[TAU]     'include/TAU.h.default'))
[TAU] TypeError: get_version() takes 1 positional argument but 2 were given
[TAU] 
[TAU] During handling of the above exception, another exception occurred:
[TAU] 
[TAU] Traceback (most recent call last):
[TAU]   File "/home/runner/taucmdr/system/configure", line 216, in <module>
[TAU]     sys.exit(main(sys.argv[1:]))
[TAU]   File "/home/runner/taucmdr/system/configure", line 203, in main
[TAU]     tau_prefix = _configure_minimal(args)
[TAU]   File "/home/runner/taucmdr/system/configure", line 174, in 
[TAU]     _configure_minimal
[TAU]     tau.install()
[TAU]   File 
[TAU]     "/home/runner/taucmdr/system/../packages/taucmdr/cf/software/tau_installation.py",
[TAU]      line 999, in install
[TAU]     if not all([os.path.exists(path[1]) for path in err.args[0]]):
[TAU]   File 
[TAU]     "/home/runner/taucmdr/system/../packages/taucmdr/cf/software/tau_installation.py",
[TAU]      line 999, in <listcomp>
[TAU]     if not all([os.path.exists(path[1]) for path in err.args[0]]):
[TAU] IndexError: string index out of range
[TAU] 
[TAU] This is a bug in TAU Commander.
[TAU] Please send '/home/runner/.local/taucmdr/debug_log' to 
[TAU]     <support@paratools.com> for assistance.
[TAU] 
[TAU] XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
make: *** [install] Error 156
Makefile:178: recipe for target 'install' failed

debugging now.

zbeekman added a commit that referenced this pull request Mar 11, 2026
Adopt the approach from PR #390 (by Samuel Khuvis): model attribute
definitions can include a 'deprecated' key mapping values to
(deprecated_version, removed_version) tuples keyed to upstream TAU
versions. Experiment.verify() checks all component attributes against
the installed TAU version and raises ConfigurationError for removed
values or logs a warning for deprecated ones.

Applied to ompt_source: download-tr4 and download-tr6 marked as
deprecated in TAU 2.29.1 and removed in TAU 2.32.

Also adds TauInstallation.get_tau_version() for reading the upstream
TAU version from installed headers, and stores tau_version in
experiment records.

Bug fixes vs original PR #390: Python 3 .items(), correct variable
references, proper error handling in get_tau_version(), returns
version tuple for comparison.

Co-authored-by: Samuel Khuvis <samuel.khuvis@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants