Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Allow nested sub-workflows #4477

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cylc/flow/workflow_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -1791,9 +1791,9 @@ def validate_source_dir(source, workflow_name):
cylc_run_dir = Path(get_cylc_run_dir())
if (os.path.abspath(os.path.realpath(cylc_run_dir))
in os.path.abspath(os.path.realpath(source))):
raise WorkflowFilesError(
f"{workflow_name} installation failed. Source directory "
f"should not be in {cylc_run_dir}")
LOG.warning(
f"{workflow_name} source found in {cylc_run_dir}. This is OK"
f" for installed sub-workflow definitions.")
check_flow_file(source, logger=None)


Expand Down
6 changes: 2 additions & 4 deletions tests/functional/cylc-install/02-failures.t
Original file line number Diff line number Diff line change
Expand Up @@ -213,16 +213,14 @@ rm -rf "${ALT_SOURCE}"
purge_rnd_workflow

# -----------------------------------------------------------------------------
# Test cylc install can not be run from within the cylc-run directory
# Test warning if cylc install is run from within the cylc-run directory

TEST_NAME="${TEST_NAME_BASE}-forbid-cylc-run-dir-install"
BASE_NAME="test-install-${CYLC_TEST_TIME_INIT}"
mkdir -p "${RUN_DIR}/${BASE_NAME}/${TEST_SOURCE_DIR_BASE}/${TEST_NAME}" && cd "$_" || exit
touch flow.cylc
run_fail "${TEST_NAME}" cylc install
contains_ok "${TEST_NAME}.stderr" <<__ERR__
WorkflowFilesError: ${TEST_NAME} installation failed. Source directory should not be in ${RUN_DIR}
__ERR__
grep_ok "WARNING - ${TEST_NAME} source found in ${RUN_DIR}. This is OK for installed sub-workflow definitions." "${TEST_NAME}.stderr"

cd "${RUN_DIR}" || exit
rm -rf "${BASE_NAME}"
Expand Down