Skip to content

Remove option buildtest build --disable-executor-check #1500

@shahzebsiddiqui

Description

@shahzebsiddiqui

@Mariamajib i am assigning this task to you

TODO

  • Remove option from argparse file https://github.com/buildtesters/buildtest/blob/devel/buildtest/cli/__init__.py
  • Remove option from bash completion script
  • Remove logic for validation in config.py
    def validate(self, validate_executors=True, moduletool=None):
    """This method validates the site configuration with schema and checks executor setting.
    Args:
    validate_executors (bool): Check executor settings. This is the default behavior but can be disabled
    moduletool (bool, optional): Check whether module system (Lmod, environment-modules) match what is specified in configuration file. Valid options are ``Lmod``, ``environment-modules``
    """
    logger.debug(f"Loading default settings schema: {DEFAULT_SETTINGS_SCHEMA}")
    config_schema = load_schema(DEFAULT_SETTINGS_SCHEMA)
    logger.debug(
    f"Validating configuration file with schema: {DEFAULT_SETTINGS_SCHEMA}"
    )
    custom_validator(recipe=self.config, schema=config_schema)
    logger.debug("Validation was successful")
    if validate_executors:
    self._executor_check()
    if (
    self.target_config.get("moduletool") != "N/A"
    and self.target_config.get("moduletool") != moduletool
    ):
    raise ConfigurationError(
    self.config,
    self.file,
    f"There is a module tool mismatch, we have detected '{moduletool}' but configuration property 'moduletool' specifies '{self.target_config['moduletool']}'",
    )
  • Remove logic in main.py

    buildtest/buildtest/main.py

    Lines 125 to 128 in 1f63db4

    validate_executors = True
    # if buildtest build --disable-executor-check is specified store the value
    if hasattr(args, "disable_executor_check"):
    validate_executors = args.disable_executor_check
    and remove variable in method invocation
    configuration.validate(validate_executors, moduletool=system.system["moduletool"])

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions