diff options
205 files changed, 469 insertions, 191 deletions
diff --git a/doc/examples/autotools/project.conf b/doc/examples/autotools/project.conf index 6c1142340..49c22e925 100644 --- a/doc/examples/autotools/project.conf +++ b/doc/examples/autotools/project.conf @@ -1,8 +1,8 @@ # Unique project name name: autotools -# Required BuildStream format version -format-version: 18 +# Minimum required BuildStream version +min-version: 2.0 # Subdirectory where elements are stored element-path: elements diff --git a/doc/examples/composition/project.conf b/doc/examples/composition/project.conf index dc82df72b..7f5fbdac6 100644 --- a/doc/examples/composition/project.conf +++ b/doc/examples/composition/project.conf @@ -1,8 +1,8 @@ # Unique project name name: composition -# Required BuildStream format version -format-version: 18 +# Minimum required BuildStream version +min-version: 2.0 # Subdirectory where elements are stored element-path: elements diff --git a/doc/examples/developing/project.conf b/doc/examples/developing/project.conf index 3b0920991..0182d1d5c 100644 --- a/doc/examples/developing/project.conf +++ b/doc/examples/developing/project.conf @@ -1,8 +1,8 @@ # Unique project name name: developing -# Required BuildStream format version -format-version: 18 +# Minimum required BuildStream version +min-version: 2.0 # Subdirectory where elements are stored element-path: elements diff --git a/doc/examples/directives/project.conf b/doc/examples/directives/project.conf index c078a5af8..8cf4c42b5 100644 --- a/doc/examples/directives/project.conf +++ b/doc/examples/directives/project.conf @@ -1,8 +1,8 @@ # Unique project name name: directives -# Required BuildStream format version -format-version: 18 +# Minimum required BuildStream version +min-version: 2.0 # Subdirectory where elements are stored element-path: elements diff --git a/doc/examples/filtering/project.conf b/doc/examples/filtering/project.conf index 9a01a7515..cf7db0d87 100644 --- a/doc/examples/filtering/project.conf +++ b/doc/examples/filtering/project.conf @@ -1,8 +1,8 @@ # Unique project name name: filtering -# Required BuildStream format version -format-version: 18 +# Minimum required BuildStream version +min-version: 2.0 # Subdirectory where elements are stored element-path: elements diff --git a/doc/examples/first-project/project.conf b/doc/examples/first-project/project.conf index f66376146..d62fc6c12 100644 --- a/doc/examples/first-project/project.conf +++ b/doc/examples/first-project/project.conf @@ -1,8 +1,8 @@ # Unique project name name: first-project -# Required BuildStream format version -format-version: 25 +# Minimum required BuildStream version +min-version: 2.0 # Subdirectory where elements are stored element-path: elements diff --git a/doc/examples/flatpak-autotools/project.conf b/doc/examples/flatpak-autotools/project.conf index 1318014f9..08dc6ee32 100644 --- a/doc/examples/flatpak-autotools/project.conf +++ b/doc/examples/flatpak-autotools/project.conf @@ -1,5 +1,7 @@ name: flatpak-autotools +min-version: 2.0 + aliases: flathub: https://dl.flathub.org/ diff --git a/doc/examples/integration-commands/project.conf b/doc/examples/integration-commands/project.conf index c6c59906b..63d50264c 100644 --- a/doc/examples/integration-commands/project.conf +++ b/doc/examples/integration-commands/project.conf @@ -1,8 +1,8 @@ # Unique project name name: integration-commands -# Required BuildStream format version -format-version: 18 +# Minimum required BuildStream version +min-version: 2.0 # Subdirectory where elements are stored element-path: elements diff --git a/doc/examples/junction-includes/project.conf b/doc/examples/junction-includes/project.conf index e591b78b1..9d1e6f1e9 100644 --- a/doc/examples/junction-includes/project.conf +++ b/doc/examples/junction-includes/project.conf @@ -1,5 +1,5 @@ name: subproject -format-version: 18 +min-version: 2.0 element-path: elements aliases: diff --git a/doc/examples/junction-includes/subproject/project.conf b/doc/examples/junction-includes/subproject/project.conf index d9387f244..827e0fb4d 100644 --- a/doc/examples/junction-includes/subproject/project.conf +++ b/doc/examples/junction-includes/subproject/project.conf @@ -1,5 +1,5 @@ name: subproject -format-version: 18 +min-version: 2.0 element-path: elements aliases: diff --git a/doc/examples/junctions/autotools/project.conf b/doc/examples/junctions/autotools/project.conf index 216816335..8c0d0a337 100644 --- a/doc/examples/junctions/autotools/project.conf +++ b/doc/examples/junctions/autotools/project.conf @@ -1,8 +1,8 @@ # Unique project name name: autotools -# Required BuildStream format version -format-version: 18 +# Minimum required BuildStream version +min-version: 2.0 # Subdirectory where elements are stored element-path: elements diff --git a/doc/examples/junctions/project.conf b/doc/examples/junctions/project.conf index cb9a83716..1a9973004 100644 --- a/doc/examples/junctions/project.conf +++ b/doc/examples/junctions/project.conf @@ -1,8 +1,8 @@ # Unique project name name: junctions -# Required BuildStream format version -format-version: 18 +# Minimum required BuildStream version +min-version: 2.0 # Subdirectory where elements are stored element-path: elements diff --git a/doc/examples/overlaps/project.conf b/doc/examples/overlaps/project.conf index 297077220..c54f79cde 100644 --- a/doc/examples/overlaps/project.conf +++ b/doc/examples/overlaps/project.conf @@ -1,8 +1,8 @@ # Unique project name name: overlaps -# Required BuildStream format version -format-version: 18 +# Minimum required BuildStream version +min-version: 2.0 # Subdirectory where elements are stored element-path: elements diff --git a/doc/examples/running-commands/project.conf b/doc/examples/running-commands/project.conf index aafb6a9f2..eb9f4012b 100644 --- a/doc/examples/running-commands/project.conf +++ b/doc/examples/running-commands/project.conf @@ -1,8 +1,8 @@ # Unique project name name: running-commands -# Required BuildStream format version -format-version: 18 +# Minimum required BuildStream version +min-version: 2.0 # Subdirectory where elements are stored element-path: elements diff --git a/doc/examples/strict-mode/project.conf b/doc/examples/strict-mode/project.conf index ac73434c8..bd6836b44 100644 --- a/doc/examples/strict-mode/project.conf +++ b/doc/examples/strict-mode/project.conf @@ -1,8 +1,8 @@ # Unique project name name: strict-mode -# Required BuildStream format version -format-version: 18 +# Minimum required BuildStream version +min-version: 2.0 # Subdirectory where elements are stored element-path: elements diff --git a/src/buildstream/_frontend/app.py b/src/buildstream/_frontend/app.py index baf75c05d..8d4dd34b1 100644 --- a/src/buildstream/_frontend/app.py +++ b/src/buildstream/_frontend/app.py @@ -36,9 +36,10 @@ from .._exceptions import BstError, StreamError, LoadError, AppError from ..exceptions import LoadErrorReason from .._message import Message, MessageType, unconditional_messages from .._stream import Stream -from .._versions import BST_FORMAT_VERSION from ..types import _SchedulerErrorAction from .. import node +from .. import utils +from ..utils import UtilError # Import frontend assets from .profile import Profile @@ -357,18 +358,13 @@ class App: # # Args: # project_name (str): The project name, must be a valid symbol name - # format_version (int): The project format version, default is the latest version + # min_version (str): The minimum required version of BuildStream (default is current version) # element_path (str): The subdirectory to store elements in, default is 'elements' # force (bool): Allow overwriting an existing project.conf # target_directory (str): The target directory the project should be initialized in # def init_project( - self, - project_name, - format_version=BST_FORMAT_VERSION, - element_path="elements", - force=False, - target_directory=None, + self, project_name, min_version=None, element_path="elements", force=False, target_directory=None, ): if target_directory: directory = os.path.abspath(target_directory) @@ -378,6 +374,10 @@ class App: project_path = os.path.join(directory, "project.conf") + if min_version is None: + bst_major, bst_minor = utils.get_bst_version() + min_version = "{}.{}".format(bst_major, bst_minor) + try: if self._set_project_dir: raise AppError( @@ -394,7 +394,7 @@ class App: # If project name was specified, user interaction is not desired, just # perform some validation and write the project.conf node._assert_symbol_name(project_name, "project name") - self._assert_format_version(format_version) + self._assert_min_version(min_version) self._assert_element_path(element_path) elif not self.interactive: @@ -404,8 +404,8 @@ class App: ) else: # Collect the parameters using an interactive session - project_name, format_version, element_path = self._init_project_interactive( - project_name, format_version, element_path + project_name, min_version, element_path = self._init_project_interactive( + project_name, min_version, element_path ) # Create the directory if it doesnt exist @@ -429,8 +429,8 @@ class App: f.write( "# Unique project name\n" + "name: {}\n\n".format(project_name) - + "# Required BuildStream format version\n" - + "format-version: {}\n\n".format(format_version) + + "# Required BuildStream version\n" + + "min-version: {}\n\n".format(min_version) + "# Subdirectory where elements are stored\n" + "element-path: {}\n".format(element_path) ) @@ -827,20 +827,19 @@ class App: # Some validation routines for project initialization # - def _assert_format_version(self, format_version): - message = "The version must be supported by this " + "version of buildstream (0 - {})\n".format( - BST_FORMAT_VERSION - ) + def _assert_min_version(self, min_version): + bst_major, bst_minor = utils._get_bst_api_version() + message = "The minimum version must be a known version of BuildStream {}".format(bst_major) - # Validate that it is an integer + # Validate the version format try: - number = int(format_version) - except ValueError as e: - raise AppError(message, reason="invalid-format-version") from e + min_version_major, min_version_minor = utils._parse_version(min_version) + except UtilError as e: + raise AppError(str(e), reason="invalid-min-version") from e - # Validate that the specified version is supported - if number < 0 or number > BST_FORMAT_VERSION: - raise AppError(message, reason="invalid-format-version") + # Validate that this version can be loaded by the installed version of BuildStream + if min_version_major != bst_major or min_version_minor > bst_minor: + raise AppError(message, reason="invalid-min-version") def _assert_element_path(self, element_path): message = "The element path cannot be an absolute path or contain any '..' components\n" @@ -864,15 +863,21 @@ class App: # # Args: # project_name (str): The project name, must be a valid symbol name - # format_version (int): The project format version, default is the latest version + # min_version (str): The minimum BuildStream version, default is the latest version # element_path (str): The subdirectory to store elements in, default is 'elements' # # Returns: # project_name (str): The user selected project name - # format_version (int): The user selected format version + # min_version (int): The user selected minimum BuildStream version # element_path (str): The user selected element path # - def _init_project_interactive(self, project_name, format_version=BST_FORMAT_VERSION, element_path="elements"): + def _init_project_interactive(self, project_name, min_version=None, element_path="elements"): + + bst_major, bst_minor = utils._get_bst_api_version() + + if min_version is None: + min_version = "{}.{}".format(bst_major, bst_minor) + def project_name_proc(user_input): try: node._assert_symbol_name(user_input, "project name") @@ -881,9 +886,9 @@ class App: raise UsageError(message) from e return user_input - def format_version_proc(user_input): + def min_version_proc(user_input): try: - self._assert_format_version(user_input) + self._assert_min_version(user_input) except AppError as e: raise UsageError(str(e)) from e return user_input @@ -927,17 +932,21 @@ class App: project_name = click.prompt(self._content_profile.fmt("Project name"), value_proc=project_name_proc, err=True) click.echo("", err=True) - # Collect format version - click.echo(self._content_profile.fmt("Select the minimum required format version for your project"), err=True) - click.echo(self._format_profile.fmt("-----------------------------------------------------------"), err=True) + # Collect minimum BuildStream version + click.echo( + self._content_profile.fmt("Select the minimum required BuildStream version for your project"), err=True + ) + click.echo( + self._format_profile.fmt("----------------------------------------------------------------"), err=True + ) click.echo("", err=True) click.echo( self._detail_profile.fmt( w.fill( - "The format version is used to provide users who build your project " + "The minimum version is used to provide users who build your project " "with a helpful error message in the case that they do not have a recent " - "enough version of BuildStream supporting all the features which your " - "project might use." + "enough version of BuildStream to support all the features which your " + "project uses." ) ), err=True, @@ -946,19 +955,17 @@ class App: click.echo( self._detail_profile.fmt( w.fill( - "The lowest version allowed is 0, the currently installed version of BuildStream " - "supports up to format version {}.".format(BST_FORMAT_VERSION) + "The lowest version allowed is {major}.0, the currently installed version of BuildStream is {major}.{minor}".format( + major=bst_major, minor=bst_minor + ) ) ), err=True, ) click.echo("", err=True) - format_version = click.prompt( - self._content_profile.fmt("Format version"), - value_proc=format_version_proc, - default=format_version, - err=True, + min_version = click.prompt( + self._content_profile.fmt("Minimum version"), value_proc=min_version_proc, default=min_version, err=True, ) click.echo("", err=True) @@ -991,7 +998,7 @@ class App: self._content_profile.fmt("Element path"), value_proc=element_path_proc, default=element_path, err=True ) - return (project_name, format_version, element_path) + return (project_name, min_version, element_path) # diff --git a/src/buildstream/_frontend/cli.py b/src/buildstream/_frontend/cli.py index 44bb99f92..522f15115 100644 --- a/src/buildstream/_frontend/cli.py +++ b/src/buildstream/_frontend/cli.py @@ -7,10 +7,9 @@ import shutil import click from .. import _yaml from .._exceptions import BstError, LoadError, AppError -from .._versions import BST_FORMAT_VERSION from .complete import main_bashcomplete, complete_path, CompleteUnhandled from ..types import _CacheBuildTrees, _SchedulerErrorAction, _PipelineSelection -from ..utils import _get_compression, UtilError +from ..utils import UtilError ################################################################## @@ -414,12 +413,20 @@ def help_command(ctx, command): ################################################################## # Init Command # ################################################################## +def default_min_version(): + from .. import utils + + bst_major, bst_minor = utils._get_bst_api_version() + + return "{}.{}".format(bst_major, bst_minor) + + @cli.command(short_help="Initialize a new BuildStream project") @click.option("--project-name", type=click.STRING, help="The project name to use") @click.option( - "--format-version", - type=click.INT, - default=BST_FORMAT_VERSION, + "--min-version", + type=click.STRING, + default=default_min_version(), show_default=True, help="The required format version", ) @@ -433,7 +440,7 @@ def help_command(ctx, command): @click.option("--force", "-f", is_flag=True, help="Allow overwriting an existing project.conf") @click.argument("target-directory", nargs=1, required=False, type=click.Path(file_okay=False, writable=True)) @click.pass_obj -def init(app, project_name, format_version, element_path, force, target_directory): +def init(app, project_name, min_version, element_path, force, target_directory): """Initialize a new BuildStream project Creates a new BuildStream project.conf in the project @@ -442,7 +449,7 @@ def init(app, project_name, format_version, element_path, force, target_director Unless `--project-name` is specified, this will be an interactive session. """ - app.init_project(project_name, format_version, element_path, force, target_directory) + app.init_project(project_name, min_version, element_path, force, target_directory) ################################################################## @@ -1226,6 +1233,8 @@ def artifact_checkout(app, force, deps, integrate, hardlinks, tar, compression, When this command is executed from a workspace directory, the default is to checkout the artifact of the workspace element. """ + from .. import utils + if hardlinks and tar: click.echo("ERROR: options --hardlinks and --tar conflict", err=True) sys.exit(-1) @@ -1249,7 +1258,7 @@ def artifact_checkout(app, force, deps, integrate, hardlinks, tar, compression, else: location = tar try: - inferred_compression = _get_compression(tar) + inferred_compression = utils._get_compression(tar) except UtilError as e: click.echo("ERROR: Invalid file extension given with '--tar': {}".format(e), err=True) sys.exit(-1) diff --git a/src/buildstream/_project.py b/src/buildstream/_project.py index 9e5d92b7c..3527d211f 100644 --- a/src/buildstream/_project.py +++ b/src/buildstream/_project.py @@ -26,6 +26,7 @@ from pluginbase import PluginBase from . import utils from . import _site from . import _yaml +from .utils import UtilError from ._artifactelement import ArtifactElement from ._profile import Topics, PROFILER from ._exceptions import LoadError @@ -39,8 +40,6 @@ from ._elementfactory import ElementFactory from ._sourcefactory import SourceFactory from .types import CoreWarnings from ._projectrefs import ProjectRefs, ProjectRefStorage -from ._versions import BST_FORMAT_VERSION -from ._versions import BST_FORMAT_VERSION_MIN from ._loader import Loader from .element import Element from .types import FastEnum @@ -336,7 +335,7 @@ class Project: def _validate_node(self, node): node.validate_keys( [ - "format-version", + "min-version", "element-path", "variables", "environment", @@ -579,6 +578,72 @@ class Project: return tuple(default_targets) + # _validate_version() + # + # Asserts that we have a BuildStream installation which is recent + # enough for the project required version + # + # Args: + # config_node (dict) - YaML node of the configuration file. + # + # Raises: LoadError if there was a problem with the project.conf + # + def _validate_version(self, config_node): + + bst_major, bst_minor = utils._get_bst_api_version() + + # Use a custom error message for the absence of the required "min-version" + # as this may be an indication that we are trying to load a BuildStream 1 project. + # + min_version_node = config_node.get_scalar("min-version", None) + if min_version_node.is_none(): + p = config_node.get_provenance() + raise LoadError( + "{}: Dictionary did not contain expected key 'min-version'".format(p), + LoadErrorReason.INVALID_DATA, + # + # TODO: Provide a link to documentation on how to install + # BuildStream 1 in a venv + # + detail="If you are trying to use a BuildStream 1 project, " + + "please install BuildStream 1 to use this project.", + ) + + # Parse the project declared minimum required BuildStream version + min_version = min_version_node.as_str() + try: + min_version_major, min_version_minor = utils._parse_version(min_version) + except UtilError as e: + p = min_version_node.get_provenance() + raise LoadError( + "{}: {}\n".format(p, e), + LoadErrorReason.INVALID_DATA, + detail="The min-version must be specified as MAJOR.MINOR with " + + "numeric major and minor minimum required version numbers", + ) from e + + # Future proofing, in case there is ever a BuildStream 3 + if min_version_major != bst_major: + p = min_version_node.get_provenance() + raise LoadError( + "{}: Version mismatch".format(p), + LoadErrorReason.UNSUPPORTED_PROJECT, + detail="Project requires BuildStream {}, ".format(min_version_major) + + "but BuildStream {} is installed.\n".format(bst_major) + + "Please use BuildStream {} with this project.".format(min_version_major), + ) + + # Check minimal minor point requirement is satisfied + if min_version_minor > bst_minor: + p = min_version_node.get_provenance() + raise LoadError( + "{}: Version mismatch".format(p), + LoadErrorReason.UNSUPPORTED_PROJECT, + detail="Project requires at least BuildStream {}.{}, ".format(min_version_major, min_version_minor) + + "but BuildStream {}.{} is installed.\n".format(bst_major, bst_minor) + + "Please upgrade BuildStream.", + ) + # _load(): # # Loads the project configuration file in the project @@ -606,24 +671,8 @@ class Project: pre_config_node = self._default_config_node.clone() self._project_conf._composite(pre_config_node) - # Assert project's format version early, before validating toplevel keys - format_version = pre_config_node.get_int("format-version") - if format_version < BST_FORMAT_VERSION_MIN: - major, minor = utils.get_bst_version() - raise LoadError( - "Project requested format version {}, but BuildStream {}.{} only supports format version {} or above." - "Use latest 1.x release".format(format_version, major, minor, BST_FORMAT_VERSION_MIN), - LoadErrorReason.UNSUPPORTED_PROJECT, - ) - - if BST_FORMAT_VERSION < format_version: - major, minor = utils.get_bst_version() - raise LoadError( - "Project requested format version {}, but BuildStream {}.{} only supports up until format version {}".format( - format_version, major, minor, BST_FORMAT_VERSION - ), - LoadErrorReason.UNSUPPORTED_PROJECT, - ) + # Assert project's minimum required version early, before validating toplevel keys + self._validate_version(pre_config_node) self._validate_node(pre_config_node) diff --git a/src/buildstream/_versions.py b/src/buildstream/_versions.py index ad749865d..f97560b4d 100644 --- a/src/buildstream/_versions.py +++ b/src/buildstream/_versions.py @@ -17,21 +17,6 @@ # Authors: # Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> - -# The base BuildStream format version -# -# This version is bumped whenever enhancements are made -# to the `project.conf` format or the core element format. -# -BST_FORMAT_VERSION = 25 - -# The mimimum BuildStream format version supported -# -# This version is the minimum format version supported by the -# current buildstream version -# -BST_FORMAT_VERSION_MIN = 18 - # The base BuildStream artifact version # # The artifact version changes whenever the cache key diff --git a/src/buildstream/data/projectconfig.yaml b/src/buildstream/data/projectconfig.yaml index a2dc4ad9b..a2753c312 100644 --- a/src/buildstream/data/projectconfig.yaml +++ b/src/buildstream/data/projectconfig.yaml @@ -4,9 +4,6 @@ # General configuration defaults # -# Require format version 18 -format-version: 18 - # Elements are found at the project root element-path: . diff --git a/src/buildstream/exceptions.py b/src/buildstream/exceptions.py index 123e18d72..cc2bd6381 100644 --- a/src/buildstream/exceptions.py +++ b/src/buildstream/exceptions.py @@ -86,7 +86,7 @@ class LoadErrorReason(Enum): """ UNSUPPORTED_PROJECT = 7 - """BuildStream does not support the required project format version""" + """The project requires an incompatible BuildStream version""" UNSUPPORTED_PLUGIN = 8 """Project requires a newer version of a plugin than the one which was diff --git a/src/buildstream/testing/_sourcetests/mirror.py b/src/buildstream/testing/_sourcetests/mirror.py index de05b894c..69042747c 100644 --- a/src/buildstream/testing/_sourcetests/mirror.py +++ b/src/buildstream/testing/_sourcetests/mirror.py @@ -156,7 +156,7 @@ def test_mirror_from_includes(cli, tmpdir, datafiles, kind): config_project_dir = str(tmpdir.join("config")) os.makedirs(config_project_dir, exist_ok=True) - config_project = {"name": "config"} + config_project = {"name": "config", "min-version": "2.0"} _yaml.roundtrip_dump(config_project, os.path.join(config_project_dir, "project.conf")) extra_mirrors = {"mirrors": [{"name": "middle-earth", "aliases": {alias: [mirror_map + "/"],}}]} _yaml.roundtrip_dump(extra_mirrors, os.path.join(config_project_dir, "mirrors.yml")) @@ -199,7 +199,7 @@ def test_mirror_junction_from_includes(cli, tmpdir, datafiles, kind): config_project_dir = str(tmpdir.join("config")) os.makedirs(config_project_dir, exist_ok=True) - config_project = {"name": "config"} + config_project = {"name": "config", "min-version": "2.0"} _yaml.roundtrip_dump(config_project, os.path.join(config_project_dir, "project.conf")) extra_mirrors = {"mirrors": [{"name": "middle-earth", "aliases": {alias: [mirror_map + "/"],}}]} _yaml.roundtrip_dump(extra_mirrors, os.path.join(config_project_dir, "mirrors.yml")) diff --git a/src/buildstream/testing/_sourcetests/project/files/sub-project/project.conf b/src/buildstream/testing/_sourcetests/project/files/sub-project/project.conf index bbb8414a3..74cfd2583 100644 --- a/src/buildstream/testing/_sourcetests/project/files/sub-project/project.conf +++ b/src/buildstream/testing/_sourcetests/project/files/sub-project/project.conf @@ -1,4 +1,4 @@ # Project config for frontend build test name: subtest - +min-version: 2.0 element-path: elements diff --git a/src/buildstream/testing/_sourcetests/project/project.conf b/src/buildstream/testing/_sourcetests/project/project.conf index 05b68bfeb..22fe9477f 100644 --- a/src/buildstream/testing/_sourcetests/project/project.conf +++ b/src/buildstream/testing/_sourcetests/project/project.conf @@ -1,5 +1,6 @@ # Project config for frontend build test name: test +min-version: 2.0 element-path: elements aliases: alpine: https://bst-integration-test-images.ams3.cdn.digitaloceanspaces.com/ diff --git a/src/buildstream/testing/_sourcetests/track_cross_junction.py b/src/buildstream/testing/_sourcetests/track_cross_junction.py index 2477b37ee..2c4141936 100644 --- a/src/buildstream/testing/_sourcetests/track_cross_junction.py +++ b/src/buildstream/testing/_sourcetests/track_cross_junction.py @@ -68,7 +68,7 @@ def generate_project(tmpdir, name, kind, config=None): subproject_path = os.path.join(str(tmpdir.join(project_name))) os.makedirs(os.path.join(subproject_path, "elements")) - project_conf = {"name": name, "element-path": "elements"} + project_conf = {"name": name, "min-version": "2.0", "element-path": "elements"} project_conf.update(config) _yaml.roundtrip_dump(project_conf, os.path.join(subproject_path, "project.conf")) add_plugins_conf(subproject_path, kind) diff --git a/src/buildstream/testing/_yaml.py b/src/buildstream/testing/_yaml.py index ccf65a1ae..0a16f3226 100644 --- a/src/buildstream/testing/_yaml.py +++ b/src/buildstream/testing/_yaml.py @@ -9,6 +9,8 @@ def generate_project(project_dir, config=None): project_file = os.path.join(project_dir, "project.conf") if "name" not in config: config["name"] = os.path.basename(project_dir) + if "min-version" not in config: + config["min-version"] = "2.0" roundtrip_dump(config, project_file) diff --git a/src/buildstream/utils.py b/src/buildstream/utils.py index 997c073b9..9f7690f7f 100644 --- a/src/buildstream/utils.py +++ b/src/buildstream/utils.py @@ -580,17 +580,9 @@ def get_bst_version() -> Tuple[int, int]: ) try: - return (int(versions[0]), int(versions[1])) - except IndexError: - raise UtilError( - "Cannot detect Major and Minor parts of the version\n" - "Version: {} not in XX.YY.whatever format".format(__version__) - ) - except ValueError: - raise UtilError( - "Cannot convert version to integer numbers\n" - "Version: {} not in Integer.Integer.whatever format".format(__version__) - ) + return _parse_version(__version__) + except UtilError as e: + raise UtilError("Failed to detect BuildStream version: {}\n".format(e)) from e def move_atomic(source: Union[Path, str], destination: Union[Path, str], *, ensure_parents: bool = True) -> None: @@ -1591,3 +1583,46 @@ def _is_single_threaded(): return True time.sleep(wait) return False + + +# _parse_version(): +# +# Args: +# version (str): The file name from which to determine compression +# +# Returns: +# A 2-tuple of form (major version, minor version) +# +# Raises: +# UtilError: In the case of a malformed version string +# +def _parse_version(version: str) -> Tuple[int, int]: + + versions = version.split(".") + try: + major = int(versions[0]) + minor = int(versions[1]) + except (IndexError, ValueError): + raise UtilError("Malformed version string: {}".format(version),) + + return (major, minor) + + +# _get_bst_api_version(): +# +# Fetch the current BuildStream API version, this +# ensures that we get "2.0" for example when we are +# in a development stage leading up to 2.0. +# +# Returns: +# A 2-tuple of form (major version, minor version) +# +def _get_bst_api_version() -> Tuple[int, int]: + + bst_major, bst_minor = get_bst_version() + + if bst_major < 2: + bst_major = 2 + bst_minor = 0 + + return (bst_major, bst_minor) diff --git a/tests/artifactcache/config.py b/tests/artifactcache/config.py index a42d1e487..24d555860 100644 --- a/tests/artifactcache/config.py +++ b/tests/artifactcache/config.py @@ -116,6 +116,7 @@ def test_artifact_cache_precedence(tmpdir, override_caches, project_caches, user # Produce a fake user and project config with the cache configuration. user_config, project_config = configure_remote_caches(override_caches, project_caches, user_caches) project_config["name"] = "test" + project_config["min-version"] = "2.0" user_config_file = str(tmpdir.join("buildstream.conf")) _yaml.roundtrip_dump(user_config, file=user_config_file) @@ -179,6 +180,7 @@ def test_only_one(cli, datafiles, override_caches, project_caches, user_caches): # Produce a fake user and project config with the cache configuration. user_config, project_config = configure_remote_caches(override_caches, project_caches, user_caches) project_config["name"] = "test" + project_config["min-version"] = "2.0" cli.configure(user_config) @@ -226,15 +228,12 @@ def test_paths_for_artifact_config_are_expanded(tmpdir, monkeypatch, artifacts_c monkeypatch.setenv("HOME", str(tmpdir.join("homedir"))) + project_config = {"name": "test", "min-version": "2.0"} + user_config = {} if in_user_config: - user_config = {"artifacts": artifacts_config} - project_config = {"name": "test"} + user_config["artifacts"] = artifacts_config else: - user_config = {} - project_config = { - "name": "test", - "artifacts": artifacts_config, - } + project_config["artifacts"] = artifacts_config user_config_file = str(tmpdir.join("buildstream.conf")) _yaml.roundtrip_dump(user_config, file=user_config_file) diff --git a/tests/artifactcache/expiry/project.conf b/tests/artifactcache/expiry/project.conf index 18db7dab7..e70dae3c7 100644 --- a/tests/artifactcache/expiry/project.conf +++ b/tests/artifactcache/expiry/project.conf @@ -1,5 +1,6 @@ # Project config for cache expiry test name: test +min-version: 2.0 element-path: elements aliases: project_dir: file://{project_dir} diff --git a/tests/artifactcache/junctions/parent/base/project.conf b/tests/artifactcache/junctions/parent/base/project.conf index 951ea1a34..7e258e29f 100644 --- a/tests/artifactcache/junctions/parent/base/project.conf +++ b/tests/artifactcache/junctions/parent/base/project.conf @@ -1 +1,2 @@ name: base +min-version: 2.0 diff --git a/tests/artifactcache/junctions/parent/project.conf b/tests/artifactcache/junctions/parent/project.conf index 620fb42dc..30a3839a8 100644 --- a/tests/artifactcache/junctions/parent/project.conf +++ b/tests/artifactcache/junctions/parent/project.conf @@ -1 +1,2 @@ name: parent +min-version: 2.0 diff --git a/tests/artifactcache/project/project.conf b/tests/artifactcache/project/project.conf index 854e38693..5ba316874 100644 --- a/tests/artifactcache/project/project.conf +++ b/tests/artifactcache/project/project.conf @@ -1,4 +1,4 @@ # Project config for frontend build test name: test - +min-version: 2.0 element-path: elements diff --git a/tests/cachekey/cachekey.py b/tests/cachekey/cachekey.py index b669bacaa..08870f2a0 100644 --- a/tests/cachekey/cachekey.py +++ b/tests/cachekey/cachekey.py @@ -196,7 +196,7 @@ def test_cache_key_fatal_warnings(cli, tmpdir, first_warnings, second_warnings, # Builds project, Runs bst show, gathers cache keys def run_get_cache_key(project_name, warnings): - config = {"name": project_name, "element-path": "elements", "fatal-warnings": warnings} + config = {"name": project_name, "min-version": "2.0", "element-path": "elements", "fatal-warnings": warnings} project_dir = tmpdir.mkdir(project_name) project_config_file = str(project_dir.join("project.conf")) diff --git a/tests/cachekey/project/project.conf b/tests/cachekey/project/project.conf index 49726cdef..fb06907ed 100644 --- a/tests/cachekey/project/project.conf +++ b/tests/cachekey/project/project.conf @@ -1,2 +1,3 @@ # Project config for cache key test name: cachekey +min-version: 2.0 diff --git a/tests/elements/filter.py b/tests/elements/filter.py index 2f16270d8..3bc24c20a 100644 --- a/tests/elements/filter.py +++ b/tests/elements/filter.py @@ -197,6 +197,7 @@ def test_filter_track(datafiles, cli, tmpdir): project_config = { "name": "filter-track-test", + "min-version": "2.0", "element-path": "elements", } project_file = os.path.join(str(tmpdir), "project.conf") @@ -242,6 +243,7 @@ def test_filter_track_excepted(datafiles, cli, tmpdir): project_config = { "name": "filter-track-test", + "min-version": "2.0", "element-path": "elements", } project_file = os.path.join(str(tmpdir), "project.conf") @@ -286,6 +288,7 @@ def test_filter_track_multi_to_one(datafiles, cli, tmpdir): project_config = { "name": "filter-track-test", + "min-version": "2.0", "element-path": "elements", } project_file = os.path.join(str(tmpdir), "project.conf") @@ -332,6 +335,7 @@ def test_filter_track_multi(datafiles, cli, tmpdir): project_config = { "name": "filter-track-test", + "min-version": "2.0", "element-path": "elements", } project_file = os.path.join(str(tmpdir), "project.conf") @@ -392,6 +396,7 @@ def test_filter_track_multi_exclude(datafiles, cli, tmpdir): project_config = { "name": "filter-track-test", + "min-version": "2.0", "element-path": "elements", } project_file = os.path.join(str(tmpdir), "project.conf") diff --git a/tests/elements/filter/basic/project.conf b/tests/elements/filter/basic/project.conf index 418ed02c6..e0b487d01 100644 --- a/tests/elements/filter/basic/project.conf +++ b/tests/elements/filter/basic/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 element-path: elements plugins: - origin: local diff --git a/tests/format/assertion/project.conf b/tests/format/assertion/project.conf index 4c0016692..0a0e2eaeb 100644 --- a/tests/format/assertion/project.conf +++ b/tests/format/assertion/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: pony: diff --git a/tests/format/dependencies1/project.conf b/tests/format/dependencies1/project.conf index fcd60b6df..9a5f11ee1 100644 --- a/tests/format/dependencies1/project.conf +++ b/tests/format/dependencies1/project.conf @@ -1,3 +1,4 @@ # Basic project name: test +min-version: 2.0 element-path: elements diff --git a/tests/format/dependencies2/project.conf b/tests/format/dependencies2/project.conf index 2027cc27a..716db37ac 100644 --- a/tests/format/dependencies2/project.conf +++ b/tests/format/dependencies2/project.conf @@ -1,3 +1,4 @@ # Basic project configuration that doesnt override anything # name: pony +min-version: 2.0 diff --git a/tests/format/dependencies3/project.conf b/tests/format/dependencies3/project.conf index d9f7e08cb..8b361b03d 100644 --- a/tests/format/dependencies3/project.conf +++ b/tests/format/dependencies3/project.conf @@ -1 +1,2 @@ name: dup-dup-checker +min-version: 2.0 diff --git a/tests/format/include.py b/tests/format/include.py index c64753be5..12b043c8e 100644 --- a/tests/format/include.py +++ b/tests/format/include.py @@ -25,7 +25,7 @@ def test_include_project_file(cli, datafiles): def test_include_missing_file(cli, tmpdir): - tmpdir.join("project.conf").write('{"name": "test"}') + tmpdir.join("project.conf").write('{"name": "test", "min-version": "2.0"}') element = tmpdir.join("include_missing_file.bst") # Normally we would use dicts and _yaml.roundtrip_dump to write such things, but here @@ -48,7 +48,7 @@ def test_include_missing_file(cli, tmpdir): def test_include_dir(cli, tmpdir): - tmpdir.join("project.conf").write('{"name": "test"}') + tmpdir.join("project.conf").write('{"name": "test", "min-version": "2.0"}') tmpdir.mkdir("subdir") element = tmpdir.join("include_dir.bst") diff --git a/tests/format/include/conditional/project.conf b/tests/format/include/conditional/project.conf index cb54779d3..fbfc9f827 100644 --- a/tests/format/include/conditional/project.conf +++ b/tests/format/include/conditional/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: build_arch: diff --git a/tests/format/include/eventual_overrides/project.conf b/tests/format/include/eventual_overrides/project.conf index b32753625..20636c446 100644 --- a/tests/format/include/eventual_overrides/project.conf +++ b/tests/format/include/eventual_overrides/project.conf @@ -1 +1,2 @@ name: test +min-version: 2.0 diff --git a/tests/format/include/file/project.conf b/tests/format/include/file/project.conf index a7791a416..a71243f86 100644 --- a/tests/format/include/file/project.conf +++ b/tests/format/include/file/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 (@): - extra_conf.yml diff --git a/tests/format/include/file_with_subproject/project.conf b/tests/format/include/file_with_subproject/project.conf index a7791a416..a71243f86 100644 --- a/tests/format/include/file_with_subproject/project.conf +++ b/tests/format/include/file_with_subproject/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 (@): - extra_conf.yml diff --git a/tests/format/include/file_with_subproject/subproject/project.conf b/tests/format/include/file_with_subproject/subproject/project.conf index 7a6655421..4b423740d 100644 --- a/tests/format/include/file_with_subproject/subproject/project.conf +++ b/tests/format/include/file_with_subproject/subproject/project.conf @@ -1 +1,2 @@ name: test-sub +min-version: 2.0 diff --git a/tests/format/include/inner/project.conf b/tests/format/include/inner/project.conf index 8bdfc428a..12dcd52bc 100644 --- a/tests/format/include/inner/project.conf +++ b/tests/format/include/inner/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: (@): diff --git a/tests/format/include/junction/project.conf b/tests/format/include/junction/project.conf index 4836c5f8b..804374680 100644 --- a/tests/format/include/junction/project.conf +++ b/tests/format/include/junction/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 (@): - junction.bst:extra_conf.yml diff --git a/tests/format/include/junction/subproject/project.conf b/tests/format/include/junction/subproject/project.conf index 7a6655421..4b423740d 100644 --- a/tests/format/include/junction/subproject/project.conf +++ b/tests/format/include/junction/subproject/project.conf @@ -1 +1,2 @@ name: test-sub +min-version: 2.0 diff --git a/tests/format/include/junction_options/project.conf b/tests/format/include/junction_options/project.conf index 4836c5f8b..804374680 100644 --- a/tests/format/include/junction_options/project.conf +++ b/tests/format/include/junction_options/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 (@): - junction.bst:extra_conf.yml diff --git a/tests/format/include/junction_options/subproject/project.conf b/tests/format/include/junction_options/subproject/project.conf index 33ab0c8af..4d035b484 100644 --- a/tests/format/include/junction_options/subproject/project.conf +++ b/tests/format/include/junction_options/subproject/project.conf @@ -1,4 +1,5 @@ name: test-sub +min-version: 2.0 options: local_option: diff --git a/tests/format/include/junction_options_deep/project.conf b/tests/format/include/junction_options_deep/project.conf index 2525081ce..a114cb8e6 100644 --- a/tests/format/include/junction_options_deep/project.conf +++ b/tests/format/include/junction_options_deep/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 (@): - junction-1.bst:extra_conf.yml diff --git a/tests/format/include/junction_options_deep/subproject-1/project.conf b/tests/format/include/junction_options_deep/subproject-1/project.conf index f0cd28202..5a42d3191 100644 --- a/tests/format/include/junction_options_deep/subproject-1/project.conf +++ b/tests/format/include/junction_options_deep/subproject-1/project.conf @@ -1 +1,2 @@ name: test-sub-1 +min-version: 2.0 diff --git a/tests/format/include/junction_options_deep/subproject-2/project.conf b/tests/format/include/junction_options_deep/subproject-2/project.conf index d44ccd809..b64e3fa49 100644 --- a/tests/format/include/junction_options_deep/subproject-2/project.conf +++ b/tests/format/include/junction_options_deep/subproject-2/project.conf @@ -1,4 +1,5 @@ name: test-sub-2 +min-version: 2.0 options: local_option: diff --git a/tests/format/include/junction_options_element/project.conf b/tests/format/include/junction_options_element/project.conf index b32753625..20636c446 100644 --- a/tests/format/include/junction_options_element/project.conf +++ b/tests/format/include/junction_options_element/project.conf @@ -1 +1,2 @@ name: test +min-version: 2.0 diff --git a/tests/format/include/junction_options_element/subproject/project.conf b/tests/format/include/junction_options_element/subproject/project.conf index 33ab0c8af..4d035b484 100644 --- a/tests/format/include/junction_options_element/subproject/project.conf +++ b/tests/format/include/junction_options_element/subproject/project.conf @@ -1,4 +1,5 @@ name: test-sub +min-version: 2.0 options: local_option: diff --git a/tests/format/include/local_to_junction/project.conf b/tests/format/include/local_to_junction/project.conf index 4836c5f8b..804374680 100644 --- a/tests/format/include/local_to_junction/project.conf +++ b/tests/format/include/local_to_junction/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 (@): - junction.bst:extra_conf.yml diff --git a/tests/format/include/local_to_junction/subproject/project.conf b/tests/format/include/local_to_junction/subproject/project.conf index 7a6655421..4b423740d 100644 --- a/tests/format/include/local_to_junction/subproject/project.conf +++ b/tests/format/include/local_to_junction/subproject/project.conf @@ -1 +1,2 @@ name: test-sub +min-version: 2.0 diff --git a/tests/format/include/options/project.conf b/tests/format/include/options/project.conf index a7791a416..a71243f86 100644 --- a/tests/format/include/options/project.conf +++ b/tests/format/include/options/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 (@): - extra_conf.yml diff --git a/tests/format/include/overrides-junction/project.conf b/tests/format/include/overrides-junction/project.conf index d03bec634..da1d184ae 100644 --- a/tests/format/include/overrides-junction/project.conf +++ b/tests/format/include/overrides-junction/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 elements: junction: diff --git a/tests/format/include/overrides-junction/subproject/project.conf b/tests/format/include/overrides-junction/subproject/project.conf index 7a6655421..4b423740d 100644 --- a/tests/format/include/overrides-junction/subproject/project.conf +++ b/tests/format/include/overrides-junction/subproject/project.conf @@ -1 +1,2 @@ name: test-sub +min-version: 2.0 diff --git a/tests/format/include/overrides/project.conf b/tests/format/include/overrides/project.conf index fa3c75703..07a6bfe21 100644 --- a/tests/format/include/overrides/project.conf +++ b/tests/format/include/overrides/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 elements: junction: diff --git a/tests/format/include/overrides/subproject/project.conf b/tests/format/include/overrides/subproject/project.conf index 7a6655421..4b423740d 100644 --- a/tests/format/include/overrides/subproject/project.conf +++ b/tests/format/include/overrides/subproject/project.conf @@ -1 +1,2 @@ name: test-sub +min-version: 2.0 diff --git a/tests/format/include/recursive/project.conf b/tests/format/include/recursive/project.conf index a7791a416..a71243f86 100644 --- a/tests/format/include/recursive/project.conf +++ b/tests/format/include/recursive/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 (@): - extra_conf.yml diff --git a/tests/format/include/string/project.conf b/tests/format/include/string/project.conf index 6ee9988e9..1d011ee92 100644 --- a/tests/format/include/string/project.conf +++ b/tests/format/include/string/project.conf @@ -1,3 +1,4 @@ name: test +min-version: 2.0 (@): extra_conf.yml diff --git a/tests/format/include/sub-include/project.conf b/tests/format/include/sub-include/project.conf index 7f7df84c8..6e7fc95a2 100644 --- a/tests/format/include/sub-include/project.conf +++ b/tests/format/include/sub-include/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 elements: manual: diff --git a/tests/format/include_composition.py b/tests/format/include_composition.py index 4af6862fa..3224822af 100644 --- a/tests/format/include_composition.py +++ b/tests/format/include_composition.py @@ -11,7 +11,7 @@ from tests.testutils import dummy_context @contextmanager def make_includes(basedir): - _yaml.roundtrip_dump({"name": "test"}, os.path.join(basedir, "project.conf")) + _yaml.roundtrip_dump({"name": "test", "min-version": "2.0"}, os.path.join(basedir, "project.conf")) with dummy_context() as context: project = Project(basedir, context) loader = project.loader diff --git a/tests/format/invalid-keys/project.conf b/tests/format/invalid-keys/project.conf index c24f5789e..b4ea0966a 100644 --- a/tests/format/invalid-keys/project.conf +++ b/tests/format/invalid-keys/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: thingy: diff --git a/tests/format/junctions/bar/project.conf b/tests/format/junctions/bar/project.conf index f8ed6621d..42d288416 100644 --- a/tests/format/junctions/bar/project.conf +++ b/tests/format/junctions/bar/project.conf @@ -1 +1,2 @@ name: bar +min-version: 2.0 diff --git a/tests/format/junctions/base/project.conf b/tests/format/junctions/base/project.conf index 951ea1a34..7e258e29f 100644 --- a/tests/format/junctions/base/project.conf +++ b/tests/format/junctions/base/project.conf @@ -1 +1,2 @@ name: base +min-version: 2.0 diff --git a/tests/format/junctions/config-target/project.conf b/tests/format/junctions/config-target/project.conf index 4049c3739..d9e1d7a4f 100644 --- a/tests/format/junctions/config-target/project.conf +++ b/tests/format/junctions/config-target/project.conf @@ -1,3 +1,4 @@ name: config-target +min-version: 2.0 element-path: elements diff --git a/tests/format/junctions/config-target/subproject/project.conf b/tests/format/junctions/config-target/subproject/project.conf index 1097282c3..1529ece04 100644 --- a/tests/format/junctions/config-target/subproject/project.conf +++ b/tests/format/junctions/config-target/subproject/project.conf @@ -1,3 +1,4 @@ name: subproject +min-version: 2.0 element-path: elements diff --git a/tests/format/junctions/config-target/subproject/subsubproject/project.conf b/tests/format/junctions/config-target/subproject/subsubproject/project.conf index 9d75121a0..162143c80 100644 --- a/tests/format/junctions/config-target/subproject/subsubproject/project.conf +++ b/tests/format/junctions/config-target/subproject/subsubproject/project.conf @@ -1,3 +1,4 @@ name: subsubproject +min-version: 2.0 element-path: elements diff --git a/tests/format/junctions/conflict/project.conf b/tests/format/junctions/conflict/project.conf index 395bb8423..660ab4fa2 100644 --- a/tests/format/junctions/conflict/project.conf +++ b/tests/format/junctions/conflict/project.conf @@ -1 +1,2 @@ name: conflict +min-version: 2.0 diff --git a/tests/format/junctions/foo/project.conf b/tests/format/junctions/foo/project.conf index 5a240e3ed..43a09bb5e 100644 --- a/tests/format/junctions/foo/project.conf +++ b/tests/format/junctions/foo/project.conf @@ -1 +1,2 @@ name: foo +min-version: 2.0 diff --git a/tests/format/junctions/inconsistent-names/junctionA/junctionB/project.conf b/tests/format/junctions/inconsistent-names/junctionA/junctionB/project.conf index 2e96170f8..6bdff02c5 100644 --- a/tests/format/junctions/inconsistent-names/junctionA/junctionB/project.conf +++ b/tests/format/junctions/inconsistent-names/junctionA/junctionB/project.conf @@ -1,5 +1,8 @@ # Unique project name name: projectB +# Minimum required BuildStream version +min-version: 2.0 + # Subdirectory where elements are stored element-path: elements diff --git a/tests/format/junctions/inconsistent-names/junctionA/project.conf b/tests/format/junctions/inconsistent-names/junctionA/project.conf index 166c4b78c..8af914819 100644 --- a/tests/format/junctions/inconsistent-names/junctionA/project.conf +++ b/tests/format/junctions/inconsistent-names/junctionA/project.conf @@ -1,5 +1,8 @@ # Unique project name name: projectA +# Minimum required BuildStream version +min-version: 2.0 + # Subdirectory where elements are stored element-path: elements diff --git a/tests/format/junctions/inconsistent-names/project.conf b/tests/format/junctions/inconsistent-names/project.conf index 064bbc588..8eef10e76 100644 --- a/tests/format/junctions/inconsistent-names/project.conf +++ b/tests/format/junctions/inconsistent-names/project.conf @@ -1,5 +1,8 @@ # Unique project name name: inconsistent-names +# Minimum required BuildStream version +min-version: 2.0 + # Subdirectory where elements are stored element-path: elements diff --git a/tests/format/junctions/invalid/project.conf b/tests/format/junctions/invalid/project.conf index 38070bf71..ec193834a 100644 --- a/tests/format/junctions/invalid/project.conf +++ b/tests/format/junctions/invalid/project.conf @@ -1 +1,2 @@ name: invalid +min-version: 2.0 diff --git a/tests/format/junctions/missing-element/junctionA/junctionB/project.conf b/tests/format/junctions/missing-element/junctionA/junctionB/project.conf index 41b8d6c72..7d0310066 100644 --- a/tests/format/junctions/missing-element/junctionA/junctionB/project.conf +++ b/tests/format/junctions/missing-element/junctionA/junctionB/project.conf @@ -1 +1,2 @@ name: projectB +min-version: 2.0 diff --git a/tests/format/junctions/missing-element/junctionA/project.conf b/tests/format/junctions/missing-element/junctionA/project.conf index 5f6ab28a2..7a0f119c3 100644 --- a/tests/format/junctions/missing-element/junctionA/project.conf +++ b/tests/format/junctions/missing-element/junctionA/project.conf @@ -1 +1,2 @@ name: projectA +min-version: 2.0 diff --git a/tests/format/junctions/missing-element/project.conf b/tests/format/junctions/missing-element/project.conf index b32753625..20636c446 100644 --- a/tests/format/junctions/missing-element/project.conf +++ b/tests/format/junctions/missing-element/project.conf @@ -1 +1,2 @@ name: test +min-version: 2.0 diff --git a/tests/format/junctions/nested/project.conf b/tests/format/junctions/nested/project.conf index 551f51c6a..eba806781 100644 --- a/tests/format/junctions/nested/project.conf +++ b/tests/format/junctions/nested/project.conf @@ -1 +1,2 @@ name: nested +min-version: 2.0 diff --git a/tests/format/junctions/options-base/project.conf b/tests/format/junctions/options-base/project.conf index a98ebd5ed..58bfa55e5 100644 --- a/tests/format/junctions/options-base/project.conf +++ b/tests/format/junctions/options-base/project.conf @@ -1,4 +1,5 @@ name: options-base +min-version: 2.0 options: animal: type: enum diff --git a/tests/format/junctions/options-default/project.conf b/tests/format/junctions/options-default/project.conf index b9e58a582..c362c12b6 100644 --- a/tests/format/junctions/options-default/project.conf +++ b/tests/format/junctions/options-default/project.conf @@ -1 +1,2 @@ name: options-default +min-version: 2.0 diff --git a/tests/format/junctions/options-inherit/project.conf b/tests/format/junctions/options-inherit/project.conf index 1e0ea4464..b5680a792 100644 --- a/tests/format/junctions/options-inherit/project.conf +++ b/tests/format/junctions/options-inherit/project.conf @@ -1,4 +1,5 @@ name: options-inherit +min-version: 2.0 options: animal: type: enum diff --git a/tests/format/junctions/options/project.conf b/tests/format/junctions/options/project.conf index de53ae176..f191a50a9 100644 --- a/tests/format/junctions/options/project.conf +++ b/tests/format/junctions/options/project.conf @@ -1 +1,2 @@ name: options +min-version: 2.0 diff --git a/tests/format/junctions/toplevel/project.conf b/tests/format/junctions/toplevel/project.conf index 496c82128..d35b2b8f8 100644 --- a/tests/format/junctions/toplevel/project.conf +++ b/tests/format/junctions/toplevel/project.conf @@ -1 +1,2 @@ name: toplevel +min-version: 2.0 diff --git a/tests/format/list-directive-error-element/project.conf b/tests/format/list-directive-error-element/project.conf index b32753625..20636c446 100644 --- a/tests/format/list-directive-error-element/project.conf +++ b/tests/format/list-directive-error-element/project.conf @@ -1 +1,2 @@ name: test +min-version: 2.0 diff --git a/tests/format/list-directive-error-project/project.conf b/tests/format/list-directive-error-project/project.conf index 2d66408a8..cfeb30a4b 100644 --- a/tests/format/list-directive-error-project/project.conf +++ b/tests/format/list-directive-error-project/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 artifacts: (>): diff --git a/tests/format/list-directive-type-error/project.conf b/tests/format/list-directive-type-error/project.conf index 79f73402b..c25ef0713 100644 --- a/tests/format/list-directive-type-error/project.conf +++ b/tests/format/list-directive-type-error/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: arch: diff --git a/tests/format/option-arch-alias/project.conf b/tests/format/option-arch-alias/project.conf index 47f0945c9..46a7e127d 100644 --- a/tests/format/option-arch-alias/project.conf +++ b/tests/format/option-arch-alias/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: machine_arch: diff --git a/tests/format/option-arch-unknown/project.conf b/tests/format/option-arch-unknown/project.conf index 0827ec387..a72cba198 100644 --- a/tests/format/option-arch-unknown/project.conf +++ b/tests/format/option-arch-unknown/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: machine_arch: diff --git a/tests/format/option-arch/project.conf b/tests/format/option-arch/project.conf index 8b94232cf..c386c16b9 100644 --- a/tests/format/option-arch/project.conf +++ b/tests/format/option-arch/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: machine_arch: diff --git a/tests/format/option-bool/project.conf b/tests/format/option-bool/project.conf index a51c4fcbe..fac5b55ed 100644 --- a/tests/format/option-bool/project.conf +++ b/tests/format/option-bool/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: pony: diff --git a/tests/format/option-element-mask-invalid/project.conf b/tests/format/option-element-mask-invalid/project.conf index a3d381855..cabae029c 100644 --- a/tests/format/option-element-mask-invalid/project.conf +++ b/tests/format/option-element-mask-invalid/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: debug_elements: diff --git a/tests/format/option-element-mask/project.conf b/tests/format/option-element-mask/project.conf index ede07fbdd..a00d4555e 100644 --- a/tests/format/option-element-mask/project.conf +++ b/tests/format/option-element-mask/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: debug_elements: diff --git a/tests/format/option-enum-missing/project.conf b/tests/format/option-enum-missing/project.conf index d6cd7049a..fea674958 100644 --- a/tests/format/option-enum-missing/project.conf +++ b/tests/format/option-enum-missing/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: empty: diff --git a/tests/format/option-enum/project.conf b/tests/format/option-enum/project.conf index 0b8ea6d1e..6e471e6e2 100644 --- a/tests/format/option-enum/project.conf +++ b/tests/format/option-enum/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: brother: diff --git a/tests/format/option-exports/project.conf b/tests/format/option-exports/project.conf index e81a31347..e208536c7 100644 --- a/tests/format/option-exports/project.conf +++ b/tests/format/option-exports/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: diff --git a/tests/format/option-flags-missing/project.conf b/tests/format/option-flags-missing/project.conf index 6554022e4..79128819a 100644 --- a/tests/format/option-flags-missing/project.conf +++ b/tests/format/option-flags-missing/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: empty: diff --git a/tests/format/option-flags/project.conf b/tests/format/option-flags/project.conf index 1cab9e315..75aac7ad3 100644 --- a/tests/format/option-flags/project.conf +++ b/tests/format/option-flags/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: # Include an enum option here so we can compare it diff --git a/tests/format/option-list-directive/project.conf b/tests/format/option-list-directive/project.conf index 5b2b64fe8..588b3bcd6 100644 --- a/tests/format/option-list-directive/project.conf +++ b/tests/format/option-list-directive/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: shell_mount_devices: diff --git a/tests/format/option-os/project.conf b/tests/format/option-os/project.conf index 5edb5072f..db2da08d7 100644 --- a/tests/format/option-os/project.conf +++ b/tests/format/option-os/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: machine_os: diff --git a/tests/format/option-overrides/project.conf b/tests/format/option-overrides/project.conf index c8058f076..c9e73a190 100644 --- a/tests/format/option-overrides/project.conf +++ b/tests/format/option-overrides/project.conf @@ -2,6 +2,7 @@ # in the element overrides. # name: test +min-version: 2.0 options: arch: diff --git a/tests/format/options/compound-and-condition/project.conf b/tests/format/options/compound-and-condition/project.conf index 650d017bd..e4816596f 100644 --- a/tests/format/options/compound-and-condition/project.conf +++ b/tests/format/options/compound-and-condition/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: debug: diff --git a/tests/format/options/compound-or-condition/project.conf b/tests/format/options/compound-or-condition/project.conf index c59cc64f3..6841b79cc 100644 --- a/tests/format/options/compound-or-condition/project.conf +++ b/tests/format/options/compound-or-condition/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: debug: diff --git a/tests/format/options/deep-nesting/project.conf b/tests/format/options/deep-nesting/project.conf index d912cd19e..02bbdb3ff 100644 --- a/tests/format/options/deep-nesting/project.conf +++ b/tests/format/options/deep-nesting/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: pony: type: bool diff --git a/tests/format/options/invalid-condition/project.conf b/tests/format/options/invalid-condition/project.conf index b31f35c95..c2b3c240f 100644 --- a/tests/format/options/invalid-condition/project.conf +++ b/tests/format/options/invalid-condition/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: opt: diff --git a/tests/format/options/invalid-expression/project.conf b/tests/format/options/invalid-expression/project.conf index ee0147232..6a9af4ca4 100644 --- a/tests/format/options/invalid-expression/project.conf +++ b/tests/format/options/invalid-expression/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: opt: diff --git a/tests/format/options/invalid-name-dashes/project.conf b/tests/format/options/invalid-name-dashes/project.conf index 045ce564f..a554ed05f 100644 --- a/tests/format/options/invalid-name-dashes/project.conf +++ b/tests/format/options/invalid-name-dashes/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: name-with-dashes: diff --git a/tests/format/options/invalid-name-leading-number/project.conf b/tests/format/options/invalid-name-leading-number/project.conf index bb3e2ef6d..ec3e16999 100644 --- a/tests/format/options/invalid-name-leading-number/project.conf +++ b/tests/format/options/invalid-name-leading-number/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: 123number_is_first: diff --git a/tests/format/options/invalid-name-plus/project.conf b/tests/format/options/invalid-name-plus/project.conf index d62869e73..4f1c690fd 100644 --- a/tests/format/options/invalid-name-plus/project.conf +++ b/tests/format/options/invalid-name-plus/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: name_with_+: diff --git a/tests/format/options/invalid-name-spaces/project.conf b/tests/format/options/invalid-name-spaces/project.conf index 66931e28c..3c662ee81 100644 --- a/tests/format/options/invalid-name-spaces/project.conf +++ b/tests/format/options/invalid-name-spaces/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: name with spaces: diff --git a/tests/format/options/invalid-type/project.conf b/tests/format/options/invalid-type/project.conf index b4280cdb6..aa00f508a 100644 --- a/tests/format/options/invalid-type/project.conf +++ b/tests/format/options/invalid-type/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: opt: diff --git a/tests/format/options/invalid-variable-name-plus/project.conf b/tests/format/options/invalid-variable-name-plus/project.conf index 5652bb8b3..d4a4699de 100644 --- a/tests/format/options/invalid-variable-name-plus/project.conf +++ b/tests/format/options/invalid-variable-name-plus/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: pony: diff --git a/tests/format/options/invalid-variable-name-spaces/project.conf b/tests/format/options/invalid-variable-name-spaces/project.conf index 5115115bf..a89d8b5a6 100644 --- a/tests/format/options/invalid-variable-name-spaces/project.conf +++ b/tests/format/options/invalid-variable-name-spaces/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: pony: diff --git a/tests/format/options/nested-condition/project.conf b/tests/format/options/nested-condition/project.conf index 104b89571..b66f5b53f 100644 --- a/tests/format/options/nested-condition/project.conf +++ b/tests/format/options/nested-condition/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: debug: diff --git a/tests/format/options/simple-condition/project.conf b/tests/format/options/simple-condition/project.conf index b6bd29fb4..ab96936ef 100644 --- a/tests/format/options/simple-condition/project.conf +++ b/tests/format/options/simple-condition/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: opt: diff --git a/tests/format/options/undefined-variable/project.conf b/tests/format/options/undefined-variable/project.conf index d634ef0a4..a00d51a67 100644 --- a/tests/format/options/undefined-variable/project.conf +++ b/tests/format/options/undefined-variable/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 options: pony: diff --git a/tests/format/project-overrides/prepend-configure-commands/project.conf b/tests/format/project-overrides/prepend-configure-commands/project.conf index 439a21809..b6053feb7 100644 --- a/tests/format/project-overrides/prepend-configure-commands/project.conf +++ b/tests/format/project-overrides/prepend-configure-commands/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 # Test that prepending to configure-commands works elements: diff --git a/tests/format/project.py b/tests/format/project.py index 3d0931b86..c2e2f733f 100644 --- a/tests/format/project.py +++ b/tests/format/project.py @@ -175,6 +175,7 @@ def test_plugin_no_load_ref(cli, datafiles, ref_storage): # config = { "name": "test", + "min-version": "2.0", "ref-storage": ref_storage, "plugins": [{"origin": "local", "path": "plugins", "sources": {"noloadref": 0}}], } diff --git a/tests/format/project/default/project.conf b/tests/format/project/default/project.conf index fd3134c58..0409a6f91 100644 --- a/tests/format/project/default/project.conf +++ b/tests/format/project/default/project.conf @@ -2,3 +2,4 @@ # name: pony +min-version: 2.0 diff --git a/tests/format/project/duplicate-plugins/project.conf b/tests/format/project/duplicate-plugins/project.conf index 4b8f5be5f..a413e6137 100644 --- a/tests/format/project/duplicate-plugins/project.conf +++ b/tests/format/project/duplicate-plugins/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 plugins: - origin: local diff --git a/tests/format/project/element-path/project.conf b/tests/format/project/element-path/project.conf index 57e87de4f..1309fddbb 100644 --- a/tests/format/project/element-path/project.conf +++ b/tests/format/project/element-path/project.conf @@ -1,2 +1,3 @@ name: foo +min-version: 2.0 element-path: elements diff --git a/tests/format/project/empty-depends/project.conf b/tests/format/project/empty-depends/project.conf index b32753625..20636c446 100644 --- a/tests/format/project/empty-depends/project.conf +++ b/tests/format/project/empty-depends/project.conf @@ -1 +1,2 @@ name: test +min-version: 2.0 diff --git a/tests/format/project/emptyname/project.conf b/tests/format/project/emptyname/project.conf index 2c5cf0783..9db3c011d 100644 --- a/tests/format/project/emptyname/project.conf +++ b/tests/format/project/emptyname/project.conf @@ -2,3 +2,4 @@ # this one is an empty string # name: '' +min-version: 2.0 diff --git a/tests/format/project/invalid-yaml/project.conf b/tests/format/project/invalid-yaml/project.conf index 5f9282bbf..96181d9cc 100644 --- a/tests/format/project/invalid-yaml/project.conf +++ b/tests/format/project/invalid-yaml/project.conf @@ -2,6 +2,7 @@ # name: pony +min-version: 2.0 variables: sbindir: "%{bindir} diff --git a/tests/format/project/invalidname/project.conf b/tests/format/project/invalidname/project.conf index 3b064d7ec..34b65719e 100644 --- a/tests/format/project/invalidname/project.conf +++ b/tests/format/project/invalidname/project.conf @@ -2,3 +2,4 @@ # this one contains a space # name: Project Name +min-version: 2.0 diff --git a/tests/format/project/local-plugin/project.conf b/tests/format/project/local-plugin/project.conf index 97166e350..ccb6ef433 100644 --- a/tests/format/project/local-plugin/project.conf +++ b/tests/format/project/local-plugin/project.conf @@ -1,4 +1,5 @@ name: foo +min-version: 2.0 plugins: - origin: local path: plugins diff --git a/tests/format/project/missing-element/project.conf b/tests/format/project/missing-element/project.conf index b32753625..20636c446 100644 --- a/tests/format/project/missing-element/project.conf +++ b/tests/format/project/missing-element/project.conf @@ -1 +1,2 @@ name: test +min-version: 2.0 diff --git a/tests/format/project/missing-junction/project.conf b/tests/format/project/missing-junction/project.conf index b32753625..20636c446 100644 --- a/tests/format/project/missing-junction/project.conf +++ b/tests/format/project/missing-junction/project.conf @@ -1 +1,2 @@ name: test +min-version: 2.0 diff --git a/tests/format/project/overridepath/project.conf b/tests/format/project/overridepath/project.conf index ef1d01c59..640bff318 100644 --- a/tests/format/project/overridepath/project.conf +++ b/tests/format/project/overridepath/project.conf @@ -1,6 +1,7 @@ # A project configuration which overrides the sandbox PATH environment variable name: foo +min-version: 2.0 environment: PATH: /bin:/sbin diff --git a/tests/format/project/plugin-allowed/project.conf b/tests/format/project/plugin-allowed/project.conf index d49e40d48..3896b7bc2 100644 --- a/tests/format/project/plugin-allowed/project.conf +++ b/tests/format/project/plugin-allowed/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 plugins: - origin: local diff --git a/tests/format/project/plugin-forbidden/project.conf b/tests/format/project/plugin-forbidden/project.conf index 39cc3d65f..0211b2061 100644 --- a/tests/format/project/plugin-forbidden/project.conf +++ b/tests/format/project/plugin-forbidden/project.conf @@ -1,2 +1,3 @@ name: test +min-version: 2.0 diff --git a/tests/format/project/plugin-preflight-error/project.conf b/tests/format/project/plugin-preflight-error/project.conf index 20a234413..07d60daf2 100644 --- a/tests/format/project/plugin-preflight-error/project.conf +++ b/tests/format/project/plugin-preflight-error/project.conf @@ -1,6 +1,7 @@ # Basic project configuration that doesnt override anything # name: pony +min-version: 2.0 # Whitelist the local test Source "errorplugin" to be loaded # diff --git a/tests/format/project/project-from-subdir/project.conf b/tests/format/project/project-from-subdir/project.conf index fd3134c58..0409a6f91 100644 --- a/tests/format/project/project-from-subdir/project.conf +++ b/tests/format/project/project-from-subdir/project.conf @@ -2,3 +2,4 @@ # name: pony +min-version: 2.0 diff --git a/tests/format/project/refs-options/project.conf b/tests/format/project/refs-options/project.conf index a44806da0..35941efae 100644 --- a/tests/format/project/refs-options/project.conf +++ b/tests/format/project/refs-options/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 ref-storage: project.refs options: diff --git a/tests/format/project/unsupported/project.conf b/tests/format/project/unsupported/project.conf index ecd8e06cc..76528a493 100644 --- a/tests/format/project/unsupported/project.conf +++ b/tests/format/project/unsupported/project.conf @@ -1,3 +1,3 @@ # A project which requires a too new version of the format name: foo -format-version: 5000 +min-version: 2.900 diff --git a/tests/format/variables.py b/tests/format/variables.py index ecc1e2b12..81bda291b 100644 --- a/tests/format/variables.py +++ b/tests/format/variables.py @@ -74,7 +74,7 @@ def test_cyclic_variables(cli, datafiles): @pytest.mark.datafiles(os.path.join(DATA_DIR, "protected-vars")) def test_use_of_protected_var_project_conf(cli, datafiles, protected_var): project = str(datafiles) - conf = {"name": "test", "variables": {protected_var: "some-value"}} + conf = {"name": "test", "min-version": "2.0", "variables": {protected_var: "some-value"}} _yaml.roundtrip_dump(conf, os.path.join(project, "project.conf")) element = { @@ -91,7 +91,7 @@ def test_use_of_protected_var_project_conf(cli, datafiles, protected_var): @pytest.mark.datafiles(os.path.join(DATA_DIR, "protected-vars")) def test_use_of_protected_var_element_overrides(cli, datafiles, protected_var): project = str(datafiles) - conf = {"name": "test", "elements": {"manual": {"variables": {protected_var: "some-value"}}}} + conf = {"name": "test", "min-version": "2.0", "elements": {"manual": {"variables": {protected_var: "some-value"}}}} _yaml.roundtrip_dump(conf, os.path.join(project, "project.conf")) element = { diff --git a/tests/format/variables/cyclic_variables/project.conf b/tests/format/variables/cyclic_variables/project.conf index b32753625..20636c446 100644 --- a/tests/format/variables/cyclic_variables/project.conf +++ b/tests/format/variables/cyclic_variables/project.conf @@ -1 +1,2 @@ name: test +min-version: 2.0 diff --git a/tests/format/variables/defaults/project.conf b/tests/format/variables/defaults/project.conf index 2027cc27a..716db37ac 100644 --- a/tests/format/variables/defaults/project.conf +++ b/tests/format/variables/defaults/project.conf @@ -1,3 +1,4 @@ # Basic project configuration that doesnt override anything # name: pony +min-version: 2.0 diff --git a/tests/format/variables/missing_variables/project.conf b/tests/format/variables/missing_variables/project.conf index 2027cc27a..716db37ac 100644 --- a/tests/format/variables/missing_variables/project.conf +++ b/tests/format/variables/missing_variables/project.conf @@ -1,3 +1,4 @@ # Basic project configuration that doesnt override anything # name: pony +min-version: 2.0 diff --git a/tests/format/variables/overrides/project.conf b/tests/format/variables/overrides/project.conf index 2027cc27a..716db37ac 100644 --- a/tests/format/variables/overrides/project.conf +++ b/tests/format/variables/overrides/project.conf @@ -1,3 +1,4 @@ # Basic project configuration that doesnt override anything # name: pony +min-version: 2.0 diff --git a/tests/format/variables/protected-vars/project.conf b/tests/format/variables/protected-vars/project.conf index 5a240e3ed..43a09bb5e 100644 --- a/tests/format/variables/protected-vars/project.conf +++ b/tests/format/variables/protected-vars/project.conf @@ -1 +1,2 @@ name: foo +min-version: 2.0 diff --git a/tests/frontend/__init__.py b/tests/frontend/__init__.py index ad1f9ea92..65ecda3ef 100644 --- a/tests/frontend/__init__.py +++ b/tests/frontend/__init__.py @@ -6,5 +6,6 @@ from buildstream import _yaml # def configure_project(path, config): config["name"] = "test" + config["min-version"] = "2.0" config["element-path"] = "elements" _yaml.roundtrip_dump(config, os.path.join(path, "project.conf")) diff --git a/tests/frontend/buildcheckout.py b/tests/frontend/buildcheckout.py index 1aa9bbd01..96c96ccfe 100644 --- a/tests/frontend/buildcheckout.py +++ b/tests/frontend/buildcheckout.py @@ -1001,6 +1001,7 @@ def test_partial_artifact_checkout_fetch(cli, datafiles, tmpdir): project = str(tmpdir) project_config = { "name": "partial-artifact-checkout-fetch", + "min-version": "2.0", "element-path": "elements", } project_file = os.path.join(str(tmpdir), "project.conf") diff --git a/tests/frontend/completions/no-element-path/project.conf b/tests/frontend/completions/no-element-path/project.conf index e7e35e716..4090cce21 100644 --- a/tests/frontend/completions/no-element-path/project.conf +++ b/tests/frontend/completions/no-element-path/project.conf @@ -1,2 +1,3 @@ # Project config for frontend build test name: test +min-version: 2.0 diff --git a/tests/frontend/completions/project/project.conf b/tests/frontend/completions/project/project.conf index 854e38693..5ba316874 100644 --- a/tests/frontend/completions/project/project.conf +++ b/tests/frontend/completions/project/project.conf @@ -1,4 +1,4 @@ # Project config for frontend build test name: test - +min-version: 2.0 element-path: elements diff --git a/tests/frontend/completions/sub-folders/project.conf b/tests/frontend/completions/sub-folders/project.conf index 854e38693..5ba316874 100644 --- a/tests/frontend/completions/sub-folders/project.conf +++ b/tests/frontend/completions/sub-folders/project.conf @@ -1,4 +1,4 @@ # Project config for frontend build test name: test - +min-version: 2.0 element-path: elements diff --git a/tests/frontend/configurable_warnings.py b/tests/frontend/configurable_warnings.py index be0706360..e61db6c37 100644 --- a/tests/frontend/configurable_warnings.py +++ b/tests/frontend/configurable_warnings.py @@ -16,6 +16,7 @@ TOP_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "configuredw def get_project(fatal_warnings): return { "name": "test", + "min-version": "2.0", "element-path": "elements", "plugins": [ {"origin": "local", "path": "plugins", "elements": {"warninga": 0, "warningb": 0, "corewarn": 0,}} diff --git a/tests/frontend/configuredwarning/project.conf b/tests/frontend/configuredwarning/project.conf index c73d217b8..195ee176a 100644 --- a/tests/frontend/configuredwarning/project.conf +++ b/tests/frontend/configuredwarning/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 element-path: elements plugins: - origin: local diff --git a/tests/frontend/consistencyerror/project.conf b/tests/frontend/consistencyerror/project.conf index 524a32134..d28ba12df 100644 --- a/tests/frontend/consistencyerror/project.conf +++ b/tests/frontend/consistencyerror/project.conf @@ -1,6 +1,7 @@ # Basic project configuration that doesnt override anything # name: test +min-version: 2.0 # Whitelist the local test Sources # diff --git a/tests/frontend/cross_junction_workspace.py b/tests/frontend/cross_junction_workspace.py index 574de2bed..5e25d1fa8 100644 --- a/tests/frontend/cross_junction_workspace.py +++ b/tests/frontend/cross_junction_workspace.py @@ -13,8 +13,8 @@ def prepare_junction_project(cli, tmpdir): os.makedirs(str(main_project)) os.makedirs(str(sub_project)) - _yaml.roundtrip_dump({"name": "main"}, str(main_project.join("project.conf"))) - _yaml.roundtrip_dump({"name": "sub"}, str(sub_project.join("project.conf"))) + _yaml.roundtrip_dump({"name": "main", "min-version": "2.0"}, str(main_project.join("project.conf"))) + _yaml.roundtrip_dump({"name": "sub", "min-version": "2.0"}, str(sub_project.join("project.conf"))) import_dir = tmpdir.join("import") os.makedirs(str(import_dir)) diff --git a/tests/frontend/default-target/files/sub-project/project.conf b/tests/frontend/default-target/files/sub-project/project.conf index db76b5267..85e67e961 100644 --- a/tests/frontend/default-target/files/sub-project/project.conf +++ b/tests/frontend/default-target/files/sub-project/project.conf @@ -1,3 +1,3 @@ name: test-default-target-subproject - +min-version: 2.0 element-path: elements diff --git a/tests/frontend/default-target/project.conf b/tests/frontend/default-target/project.conf index 17937ed73..095c54610 100644 --- a/tests/frontend/default-target/project.conf +++ b/tests/frontend/default-target/project.conf @@ -1,3 +1,3 @@ name: test-default-target - +min-version: 2.0 element-path: elements diff --git a/tests/frontend/default_target.py b/tests/frontend/default_target.py index d2a75c961..bb7a49592 100644 --- a/tests/frontend/default_target.py +++ b/tests/frontend/default_target.py @@ -40,6 +40,7 @@ def test_default_target(cli, datafiles, operation, expected_state): # First, modify project configuration to set a default target project_conf = { "name": "test-default-target", + "min-version": "2.0", "element-path": "elements", "defaults": {"targets": ["dummy_stack.bst"]}, } @@ -102,6 +103,7 @@ def test_default_target_track(cli, tmpdir, datafiles): # Then, make it the default target project_conf = { "name": "test-default-target", + "min-version": "2.0", "element-path": "elements", "defaults": {"targets": [target]}, } @@ -131,6 +133,7 @@ def test_default_target_fetch(cli, tmpdir, datafiles): # Then, make it the default target project_conf = { "name": "test-default-target", + "min-version": "2.0", "element-path": "elements", "defaults": {"targets": [target]}, } @@ -157,6 +160,7 @@ def test_default_target_push_pull(cli, tmpdir, datafiles): # Set a default target project_conf = { "name": "test-default-target", + "min-version": "2.0", "element-path": "elements", "defaults": {"targets": [target]}, } diff --git a/tests/frontend/exceptions/project.conf b/tests/frontend/exceptions/project.conf index 2027cc27a..716db37ac 100644 --- a/tests/frontend/exceptions/project.conf +++ b/tests/frontend/exceptions/project.conf @@ -1,3 +1,4 @@ # Basic project configuration that doesnt override anything # name: pony +min-version: 2.0 diff --git a/tests/frontend/init.py b/tests/frontend/init.py index 78aa3eb19..db1b9c955 100644 --- a/tests/frontend/init.py +++ b/tests/frontend/init.py @@ -6,9 +6,24 @@ import pytest from buildstream.testing import cli # pylint: disable=unused-import from buildstream import _yaml +from buildstream import utils from buildstream._frontend.app import App from buildstream.exceptions import ErrorDomain, LoadErrorReason -from buildstream._versions import BST_FORMAT_VERSION + + +def get_default_min_version(): + bst_major, bst_minor = utils.get_bst_version() + + # For the version check, artificially set the version to at least + # version 2.0 + # + # TODO: Remove this code block after releasing 2.0 + # + if bst_major < 2: + bst_major = 2 + bst_minor = 0 + + return "{}.{}".format(bst_major, bst_minor) def test_defaults(cli, tmpdir): @@ -20,7 +35,7 @@ def test_defaults(cli, tmpdir): project_conf = _yaml.load(project_path) assert project_conf.get_str("name") == "foo" - assert project_conf.get_str("format-version") == str(BST_FORMAT_VERSION) + assert project_conf.get_str("min-version") == get_default_min_version() assert project_conf.get_str("element-path") == "elements" @@ -29,13 +44,13 @@ def test_all_options(cli, tmpdir): project_path = os.path.join(project, "project.conf") result = cli.run( - args=["init", "--project-name", "foo", "--format-version", "2", "--element-path", "ponies", project] + args=["init", "--project-name", "foo", "--min-version", "2.0", "--element-path", "ponies", project] ) result.assert_success() project_conf = _yaml.load(project_path) assert project_conf.get_str("name") == "foo" - assert project_conf.get_str("format-version") == str(2) + assert project_conf.get_str("min-version") == "2.0" assert project_conf.get_str("element-path") == "ponies" elements_dir = os.path.join(project, "ponies") @@ -68,7 +83,7 @@ def test_force_overwrite_project(cli, tmpdir): project_conf = _yaml.load(project_path) assert project_conf.get_str("name") == "foo" - assert project_conf.get_str("format-version") == str(BST_FORMAT_VERSION) + assert project_conf.get_str("min-version") == get_default_min_version() def test_relative_path_directory_as_argument(cli, tmpdir): @@ -82,7 +97,7 @@ def test_relative_path_directory_as_argument(cli, tmpdir): project_conf = _yaml.load(project_path) assert project_conf.get_str("name") == "foo" - assert project_conf.get_int("format-version") == BST_FORMAT_VERSION + assert project_conf.get_str("min-version") == get_default_min_version() assert project_conf.get_str("element-path") == "elements" @@ -97,10 +112,10 @@ def test_bad_project_name(cli, tmpdir, project_name): result.assert_main_error(ErrorDomain.LOAD, LoadErrorReason.INVALID_SYMBOL_NAME) -@pytest.mark.parametrize("format_version", [(str(-1)), (str(BST_FORMAT_VERSION + 1))]) -def test_bad_format_version(cli, tmpdir, format_version): - result = cli.run(args=["init", "--project-name", "foo", "--format-version", format_version, str(tmpdir)]) - result.assert_main_error(ErrorDomain.APP, "invalid-format-version") +@pytest.mark.parametrize("min_version", [("-1"), ("1.4"), ("2.900"), ("abc")]) +def test_bad_min_version(cli, tmpdir, min_version): + result = cli.run(args=["init", "--project-name", "foo", "--min-version", min_version, str(tmpdir)]) + result.assert_main_error(ErrorDomain.APP, "invalid-min-version") @pytest.mark.parametrize("element_path", [("/absolute/path"), ("../outside/of/project")]) @@ -124,7 +139,7 @@ def test_element_path_interactive(cli, tmp_path, monkeypatch, element_path): return DummyInteractiveApp(*args, **kwargs) def _init_project_interactive(self, *args, **kwargs): # pylint: disable=arguments-differ - return ("project_name", "0", element_path) + return ("project_name", "2.0", element_path) monkeypatch.setattr(App, "create", DummyInteractiveApp.create) @@ -136,5 +151,5 @@ def test_element_path_interactive(cli, tmp_path, monkeypatch, element_path): project_conf = _yaml.load(str(project_conf_path)) assert project_conf.get_str("name") == "project_name" - assert project_conf.get_str("format-version") == "0" + assert project_conf.get_str("min-version") == "2.0" assert project_conf.get_str("element-path") == element_path diff --git a/tests/frontend/interactive_init.py b/tests/frontend/interactive_init.py index c8f169000..b8cbe522f 100644 --- a/tests/frontend/interactive_init.py +++ b/tests/frontend/interactive_init.py @@ -1,23 +1,33 @@ import os import pexpect -from ruamel import yaml -from buildstream._versions import BST_FORMAT_VERSION +from buildstream import _yaml +from buildstream import utils from tests.testutils.constants import PEXPECT_TIMEOUT_SHORT def test_init(tmpdir): session = pexpect.spawn("bst", ["--no-colors", "init", str(tmpdir)], timeout=PEXPECT_TIMEOUT_SHORT) name = "test-project" - format_version = 24 + min_version = "2.0" element_path = "my-elements" + bst_major, bst_minor = utils.get_bst_version() + + # For the version check, artificially set the version to at least + # version 2.0 + # + # TODO: Remove this code block after releasing 2.0 + # + if bst_major < 2: + bst_major = 2 + bst_minor = 0 session.expect_exact("Project name:") session.sendline(name) - session.expect_exact("Format version [{}]:".format(BST_FORMAT_VERSION)) - session.sendline(str(format_version)) + session.expect_exact("Minimum version [{}.{}]:".format(bst_major, bst_minor)) + session.sendline(str(min_version)) session.expect_exact("Element path [elements]:") session.sendline(element_path) @@ -26,9 +36,7 @@ def test_init(tmpdir): session.close() # Now assert that a project.conf got created with expected values - with open(os.path.join(str(tmpdir), "project.conf")) as f: - project_conf = yaml.safe_load(f) - - assert project_conf["name"] == name - assert project_conf["format-version"] == format_version - assert project_conf["element-path"] == element_path + project_conf = _yaml.load(os.path.join(str(tmpdir), "project.conf")) + assert project_conf.get_str("name") == name + assert project_conf.get_str("min-version") == min_version + assert project_conf.get_str("element-path") == element_path diff --git a/tests/frontend/invalid_element_path/project.conf b/tests/frontend/invalid_element_path/project.conf index 7b09276e1..e752d22d5 100644 --- a/tests/frontend/invalid_element_path/project.conf +++ b/tests/frontend/invalid_element_path/project.conf @@ -1,4 +1,4 @@ # Project config for frontend build test name: test - +min-version: 2.0 elephant-path: elements diff --git a/tests/frontend/mirror.py b/tests/frontend/mirror.py index f71cb554d..848047ee8 100644 --- a/tests/frontend/mirror.py +++ b/tests/frontend/mirror.py @@ -41,6 +41,7 @@ def generate_element(output_file): def generate_project(): project = { "name": "test", + "min-version": "2.0", "element-path": "elements", "aliases": {"foo": "FOO/", "bar": "BAR/",}, "mirrors": [ @@ -95,6 +96,7 @@ def test_mirror_fetch_ref_storage(cli, tmpdir, datafiles, ref_storage, mirror): project = { "name": "test", + "min-version": "2.0", "element-path": "elements", "aliases": {alias: upstream_map + "/"}, "ref-storage": ref_storage, @@ -290,6 +292,7 @@ def test_mirror_git_submodule_fetch(cli, tmpdir, datafiles): mirror_map, _ = os.path.split(full_mirror) project = { "name": "test", + "min-version": "2.0", "element-path": "elements", "aliases": {alias: "http://www.example.com/"}, "mirrors": [{"name": "middle-earth", "aliases": {alias: [mirror_map + "/"],},},], @@ -361,6 +364,7 @@ def test_mirror_fallback_git_only_submodules(cli, tmpdir, datafiles): project = { "name": "test", + "min-version": "2.0", "element-path": "elements", "aliases": {alias: upstream_map + "/"}, "mirrors": [{"name": "middle-earth", "aliases": {alias: [mirror_map + "/"],}}], @@ -446,6 +450,7 @@ def test_mirror_fallback_git_with_submodules(cli, tmpdir, datafiles): project = { "name": "test", + "min-version": "2.0", "element-path": "elements", "aliases": {alias: upstream_map + "/"}, "mirrors": [{"name": "middle-earth", "aliases": {alias: [mirror_map + "/"],}}], diff --git a/tests/frontend/overlaps.py b/tests/frontend/overlaps.py index d734a3781..a45fc700d 100644 --- a/tests/frontend/overlaps.py +++ b/tests/frontend/overlaps.py @@ -14,7 +14,7 @@ DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "overlaps") def gen_project(project_dir, fail_on_overlap, use_fatal_warnings=True, project_name="test"): - template = {"name": project_name} + template = {"name": project_name, "min-version": "2.0"} if use_fatal_warnings: template["fatal-warnings"] = [CoreWarnings.OVERLAPS] if fail_on_overlap else [] else: diff --git a/tests/frontend/project/files/sub-project/project.conf b/tests/frontend/project/files/sub-project/project.conf index bbb8414a3..74cfd2583 100644 --- a/tests/frontend/project/files/sub-project/project.conf +++ b/tests/frontend/project/files/sub-project/project.conf @@ -1,4 +1,4 @@ # Project config for frontend build test name: subtest - +min-version: 2.0 element-path: elements diff --git a/tests/frontend/project/files/sub2-project/project.conf b/tests/frontend/project/files/sub2-project/project.conf index bbb8414a3..74cfd2583 100644 --- a/tests/frontend/project/files/sub2-project/project.conf +++ b/tests/frontend/project/files/sub2-project/project.conf @@ -1,4 +1,4 @@ # Project config for frontend build test name: subtest - +min-version: 2.0 element-path: elements diff --git a/tests/frontend/project/project.conf b/tests/frontend/project/project.conf index ed18221e4..c82f85bb6 100644 --- a/tests/frontend/project/project.conf +++ b/tests/frontend/project/project.conf @@ -1,6 +1,6 @@ # Project config for frontend build test name: test - +min-version: 2.0 element-path: elements fatal-warnings: diff --git a/tests/frontend/project_fail/project.conf b/tests/frontend/project_fail/project.conf index 854e38693..5ba316874 100644 --- a/tests/frontend/project_fail/project.conf +++ b/tests/frontend/project_fail/project.conf @@ -1,4 +1,4 @@ # Project config for frontend build test name: test - +min-version: 2.0 element-path: elements diff --git a/tests/frontend/pull.py b/tests/frontend/pull.py index 1845f320e..e38cd1bcb 100644 --- a/tests/frontend/pull.py +++ b/tests/frontend/pull.py @@ -312,6 +312,7 @@ def test_pull_missing_local_blob(cli, tmpdir, datafiles): project = str(tmpdir) project_config = { "name": "pull-missing-local-blob", + "min-version": "2.0", "element-path": "elements", } project_file = os.path.join(str(tmpdir), "project.conf") diff --git a/tests/frontend/push.py b/tests/frontend/push.py index c2f52c514..362084372 100644 --- a/tests/frontend/push.py +++ b/tests/frontend/push.py @@ -640,6 +640,7 @@ def test_push_after_rebuild(cli, tmpdir, datafiles): project, config={ "element-path": "elements", + "min-version": "2.0", "plugins": [{"origin": "local", "path": "plugins", "elements": {"randomelement": 0}}], }, ) diff --git a/tests/frontend/strict-depends/project.conf b/tests/frontend/strict-depends/project.conf index 627522526..1e02cb89a 100644 --- a/tests/frontend/strict-depends/project.conf +++ b/tests/frontend/strict-depends/project.conf @@ -1,2 +1,3 @@ name: test element-path: elements +min-version: 2.0 diff --git a/tests/frontend/track-cross-junction/subproject/project.conf b/tests/frontend/track-cross-junction/subproject/project.conf index b32753625..20636c446 100644 --- a/tests/frontend/track-cross-junction/subproject/project.conf +++ b/tests/frontend/track-cross-junction/subproject/project.conf @@ -1 +1,2 @@ name: test +min-version: 2.0 diff --git a/tests/frontend/track-optional-inline/project.conf b/tests/frontend/track-optional-inline/project.conf index 3f02c4718..47a2552c7 100644 --- a/tests/frontend/track-optional-inline/project.conf +++ b/tests/frontend/track-optional-inline/project.conf @@ -1,5 +1,5 @@ name: test - +min-version: 2.0 options: test: type: bool diff --git a/tests/frontend/track-optional-project-refs/project.conf b/tests/frontend/track-optional-project-refs/project.conf index 37fe02caa..3cb9bdc46 100644 --- a/tests/frontend/track-optional-project-refs/project.conf +++ b/tests/frontend/track-optional-project-refs/project.conf @@ -1,4 +1,5 @@ name: test +min-version: 2.0 ref-storage: project.refs diff --git a/tests/frontend/track.py b/tests/frontend/track.py index 07a89d428..2ebaae81f 100644 --- a/tests/frontend/track.py +++ b/tests/frontend/track.py @@ -144,7 +144,7 @@ def test_track_cross_junction(cli, tmpdir, datafiles, cross_junction, ref_storag # Generate project.conf # - project_conf = {"name": "test", "ref-storage": ref_storage} + project_conf = {"name": "test", "min-version": "2.0", "ref-storage": ref_storage} _yaml.roundtrip_dump(project_conf, os.path.join(project, "project.conf")) # diff --git a/tests/frontend/workspaced-build-dep/project.conf b/tests/frontend/workspaced-build-dep/project.conf index 48da02ff0..a4b4e7cca 100644 --- a/tests/frontend/workspaced-build-dep/project.conf +++ b/tests/frontend/workspaced-build-dep/project.conf @@ -1,8 +1,8 @@ # Unique project name name: test -# Required BuildStream format version -format-version: 18 +# Required BuildStream version +min-version: 2.0 # Subdirectory where elements are stored element-path: elements diff --git a/tests/frontend/workspaced-runtime-dep/project.conf b/tests/frontend/workspaced-runtime-dep/project.conf index 48da02ff0..a4b4e7cca 100644 --- a/tests/frontend/workspaced-runtime-dep/project.conf +++ b/tests/frontend/workspaced-runtime-dep/project.conf @@ -1,8 +1,8 @@ # Unique project name name: test -# Required BuildStream format version -format-version: 18 +# Required BuildStream version +min-version: 2.0 # Subdirectory where elements are stored element-path: elements diff --git a/tests/integration/project/project.conf b/tests/integration/project/project.conf index ddfe47b6d..d30996041 100644 --- a/tests/integration/project/project.conf +++ b/tests/integration/project/project.conf @@ -1,5 +1,6 @@ # Project config for frontend build test name: test +min-version: 2.0 element-path: elements aliases: alpine: https://bst-integration-test-images.ams3.cdn.digitaloceanspaces.com/ diff --git a/tests/internals/loader/onefile/project.conf b/tests/internals/loader/onefile/project.conf index afa0f5475..dc34380a4 100644 --- a/tests/internals/loader/onefile/project.conf +++ b/tests/internals/loader/onefile/project.conf @@ -1,2 +1,3 @@ # Basic project name: foo +min-version: 2.0 diff --git a/tests/internals/pluginloading/badversionelement/project.conf b/tests/internals/pluginloading/badversionelement/project.conf index 4f32752c3..bff73e251 100644 --- a/tests/internals/pluginloading/badversionelement/project.conf +++ b/tests/internals/pluginloading/badversionelement/project.conf @@ -1,4 +1,5 @@ name: pony +min-version: 2.0 element-path: elements plugins: diff --git a/tests/internals/pluginloading/badversionsource/project.conf b/tests/internals/pluginloading/badversionsource/project.conf index 58cf9c577..cd5b2dc82 100644 --- a/tests/internals/pluginloading/badversionsource/project.conf +++ b/tests/internals/pluginloading/badversionsource/project.conf @@ -1,4 +1,5 @@ name: pony +min-version: 2.0 element-path: elements plugins: diff --git a/tests/internals/pluginloading/customelement/project.conf b/tests/internals/pluginloading/customelement/project.conf index bdc909985..6a33cc504 100644 --- a/tests/internals/pluginloading/customelement/project.conf +++ b/tests/internals/pluginloading/customelement/project.conf @@ -1,4 +1,5 @@ name: pony +min-version: 2.0 element-path: elements plugins: - origin: local diff --git a/tests/internals/pluginloading/customsource/project.conf b/tests/internals/pluginloading/customsource/project.conf index 8205d185a..87d9b5d09 100644 --- a/tests/internals/pluginloading/customsource/project.conf +++ b/tests/internals/pluginloading/customsource/project.conf @@ -1,4 +1,5 @@ name: pony +min-version: 2.0 element-path: elements plugins: - origin: local diff --git a/tests/plugins/deprecationwarnings/project/project.conf b/tests/plugins/deprecationwarnings/project/project.conf index 18e368fe9..8a2536cab 100644 --- a/tests/plugins/deprecationwarnings/project/project.conf +++ b/tests/plugins/deprecationwarnings/project/project.conf @@ -1,8 +1,8 @@ # Unique project name name: deprecation-warnings -# Required BuildStream format version -format-version: 20 +# Required BuildStream version +min-version: 2.0 # Subdirectory where elements are stored element-path: elements diff --git a/tests/remoteexecution/project/files/sub-project/project.conf b/tests/remoteexecution/project/files/sub-project/project.conf index c4d876cc2..c8d9e327f 100644 --- a/tests/remoteexecution/project/files/sub-project/project.conf +++ b/tests/remoteexecution/project/files/sub-project/project.conf @@ -1,5 +1,6 @@ # Project config for frontend build test name: subtest +min-version: 2.0 element-path: elements diff --git a/tests/remoteexecution/project/project.conf b/tests/remoteexecution/project/project.conf index ddfe47b6d..d30996041 100644 --- a/tests/remoteexecution/project/project.conf +++ b/tests/remoteexecution/project/project.conf @@ -1,5 +1,6 @@ # Project config for frontend build test name: test +min-version: 2.0 element-path: elements aliases: alpine: https://bst-integration-test-images.ams3.cdn.digitaloceanspaces.com/ diff --git a/tests/sandboxes/missing-command/project.conf b/tests/sandboxes/missing-command/project.conf index b32753625..20636c446 100644 --- a/tests/sandboxes/missing-command/project.conf +++ b/tests/sandboxes/missing-command/project.conf @@ -1 +1,2 @@ name: test +min-version: 2.0 diff --git a/tests/sandboxes/missing-dependencies/project.conf b/tests/sandboxes/missing-dependencies/project.conf index 080ab758f..fee86b3f9 100755 --- a/tests/sandboxes/missing-dependencies/project.conf +++ b/tests/sandboxes/missing-dependencies/project.conf @@ -1,4 +1,4 @@ # Project config for missing dependencies test name: test - +min-version: 2.0 element-path: elements diff --git a/tests/sandboxes/project/project.conf b/tests/sandboxes/project/project.conf index ddfe47b6d..d30996041 100644 --- a/tests/sandboxes/project/project.conf +++ b/tests/sandboxes/project/project.conf @@ -1,5 +1,6 @@ # Project config for frontend build test name: test +min-version: 2.0 element-path: elements aliases: alpine: https://bst-integration-test-images.ams3.cdn.digitaloceanspaces.com/ diff --git a/tests/sourcecache/project/project.conf b/tests/sourcecache/project/project.conf index 728f3faa1..dde417f71 100644 --- a/tests/sourcecache/project/project.conf +++ b/tests/sourcecache/project/project.conf @@ -1,5 +1,6 @@ # Project config for frontend build test name: test +min-version: 2.0 element-path: elements diff --git a/tests/sources/bzr/project.conf b/tests/sources/bzr/project.conf index 04b84631f..08a9d60db 100644 --- a/tests/sources/bzr/project.conf +++ b/tests/sources/bzr/project.conf @@ -1,2 +1,3 @@ # Basic Project name: foo +min-version: 2.0 diff --git a/tests/sources/git/project-override/project.conf b/tests/sources/git/project-override/project.conf index 299992f15..01c901657 100644 --- a/tests/sources/git/project-override/project.conf +++ b/tests/sources/git/project-override/project.conf @@ -1,5 +1,6 @@ # Basic project name: foo +min-version: 2.0 sources: git: config: diff --git a/tests/sources/git/template/project.conf b/tests/sources/git/template/project.conf index afa0f5475..dc34380a4 100644 --- a/tests/sources/git/template/project.conf +++ b/tests/sources/git/template/project.conf @@ -1,2 +1,3 @@ # Basic project name: foo +min-version: 2.0 diff --git a/tests/sources/local/basic/project.conf b/tests/sources/local/basic/project.conf index afa0f5475..dc34380a4 100644 --- a/tests/sources/local/basic/project.conf +++ b/tests/sources/local/basic/project.conf @@ -1,2 +1,3 @@ # Basic project name: foo +min-version: 2.0 diff --git a/tests/sources/local/directory/project.conf b/tests/sources/local/directory/project.conf index afa0f5475..dc34380a4 100644 --- a/tests/sources/local/directory/project.conf +++ b/tests/sources/local/directory/project.conf @@ -1,2 +1,3 @@ # Basic project name: foo +min-version: 2.0 diff --git a/tests/sources/local/file-exists/project.conf b/tests/sources/local/file-exists/project.conf index afa0f5475..dc34380a4 100644 --- a/tests/sources/local/file-exists/project.conf +++ b/tests/sources/local/file-exists/project.conf @@ -1,2 +1,3 @@ # Basic project name: foo +min-version: 2.0 diff --git a/tests/sources/local/invalid-relative-path/project.conf b/tests/sources/local/invalid-relative-path/project.conf index afa0f5475..dc34380a4 100644 --- a/tests/sources/local/invalid-relative-path/project.conf +++ b/tests/sources/local/invalid-relative-path/project.conf @@ -1,2 +1,3 @@ # Basic project name: foo +min-version: 2.0 diff --git a/tests/sources/local/symlink/project.conf b/tests/sources/local/symlink/project.conf index afa0f5475..dc34380a4 100644 --- a/tests/sources/local/symlink/project.conf +++ b/tests/sources/local/symlink/project.conf @@ -1,2 +1,3 @@ # Basic project name: foo +min-version: 2.0 diff --git a/tests/sources/no-fetch-cached/project.conf b/tests/sources/no-fetch-cached/project.conf index af0cec15c..eeb00d432 100644 --- a/tests/sources/no-fetch-cached/project.conf +++ b/tests/sources/no-fetch-cached/project.conf @@ -1,5 +1,6 @@ # Project with local source plugins name: no-fetch-cached +min-version: 2.0 plugins: - origin: local diff --git a/tests/sources/patch/basic/project.conf b/tests/sources/patch/basic/project.conf index afa0f5475..dc34380a4 100644 --- a/tests/sources/patch/basic/project.conf +++ b/tests/sources/patch/basic/project.conf @@ -1,2 +1,3 @@ # Basic project name: foo +min-version: 2.0 diff --git a/tests/sources/patch/different-strip-level/project.conf b/tests/sources/patch/different-strip-level/project.conf index afa0f5475..dc34380a4 100644 --- a/tests/sources/patch/different-strip-level/project.conf +++ b/tests/sources/patch/different-strip-level/project.conf @@ -1,2 +1,3 @@ # Basic project name: foo +min-version: 2.0 diff --git a/tests/sources/patch/invalid-relative-path/project.conf b/tests/sources/patch/invalid-relative-path/project.conf index afa0f5475..dc34380a4 100644 --- a/tests/sources/patch/invalid-relative-path/project.conf +++ b/tests/sources/patch/invalid-relative-path/project.conf @@ -1,2 +1,3 @@ # Basic project name: foo +min-version: 2.0 diff --git a/tests/sources/patch/multiple-patches/project.conf b/tests/sources/patch/multiple-patches/project.conf index afa0f5475..dc34380a4 100644 --- a/tests/sources/patch/multiple-patches/project.conf +++ b/tests/sources/patch/multiple-patches/project.conf @@ -1,2 +1,3 @@ # Basic project name: foo +min-version: 2.0 diff --git a/tests/sources/patch/separate-patch-dir/project.conf b/tests/sources/patch/separate-patch-dir/project.conf index afa0f5475..dc34380a4 100644 --- a/tests/sources/patch/separate-patch-dir/project.conf +++ b/tests/sources/patch/separate-patch-dir/project.conf @@ -1,2 +1,3 @@ # Basic project name: foo +min-version: 2.0 diff --git a/tests/sources/previous_source_access/project.conf b/tests/sources/previous_source_access/project.conf index 5d50ec2c5..2d3bb1fb2 100644 --- a/tests/sources/previous_source_access/project.conf +++ b/tests/sources/previous_source_access/project.conf @@ -1,5 +1,6 @@ # Project with local source plugins name: foo +min-version: 2.0 element-path: elements diff --git a/tests/sources/project_key_test/project.conf b/tests/sources/project_key_test/project.conf index 97ab12c05..fb9ba1f88 100644 --- a/tests/sources/project_key_test/project.conf +++ b/tests/sources/project_key_test/project.conf @@ -1,4 +1,5 @@ name: key-test +min-version: 2.0 element-path: elements |