Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8fac144
fix description of `backup-modules`
Flamefire Feb 16, 2024
d57c251
replace `'` with `"` for `printf` to have bash replace a variable
branfosj Feb 22, 2024
9d601e6
Merge pull request #4461 from branfosj/module_syntax
ocaisa Feb 22, 2024
3a7b3eb
Use cp -dR instead of cp -a for shell script extraction
akesandgren Feb 23, 2024
17f4b1d
fix link to documentation in close_pr message
migueldiascosta Feb 26, 2024
0f18f73
tests: Adjust test of EXTRACT_CMDS for .sh files to match the change …
akesandgren Feb 26, 2024
3d5ce39
Merge pull request #4456 from Flamefire/fix-backup-module-doc
boegel Feb 27, 2024
e636530
Merge pull request #4466 from migueldiascosta/update_close_pr_link
boegel Feb 27, 2024
8128fb1
Merge pull request #4465 from akesandgren/use_cp-dR_not-cp-a
boegel Feb 27, 2024
0b00fcb
Merge branch 'develop' into 5.0.x
boegel Feb 29, 2024
07d06af
fix test_github_merge_pr by using more recent easyconfigs PR
boegel Mar 1, 2024
ff4ff49
update easyblocks for toy extensions to make sure that asynchronous i…
boegel Mar 1, 2024
cb69056
add workaround for 404 error when installing packages in CI workflow …
boegel Mar 1, 2024
2266b71
append to `APT_PKGS` instead of overwriting it
branfosj Mar 1, 2024
05ab883
missing space
branfosj Mar 1, 2024
2e3d2ec
Merge pull request #4472 from boegel/fix_ci_apptainer
branfosj Mar 1, 2024
337cdda
Merge branch 'develop' of https://github.com/easybuilders/easybuild-f…
branfosj Mar 1, 2024
035699c
Merge pull request #4470 from boegel/fix_test_github_merge_pr
branfosj Mar 1, 2024
e330850
add workaround for 404 error when installing packages in CI workflow …
boegel Mar 2, 2024
1bbd3b6
Merge branch '5.0.x' of github.com:easybuilders/easybuild-framework i…
boegel Mar 2, 2024
4419025
Merge branch '5.0.x' of github.com:easybuilders/easybuild-framework i…
boegel Mar 2, 2024
128505f
Merge pull request #4471 from boegel/run_async_test_fix_workdir
branfosj Mar 2, 2024
fc9e616
Merge branch '5.0.x' of github.com:easybuilders/easybuild-framework i…
boegel Mar 2, 2024
cb51e86
Merge branch '5.0.x' of github.com:boegel/easybuild-framework into 5.0.x
boegel Mar 2, 2024
849ffed
Merge pull request #4469 from boegel/5.0.x
branfosj Mar 2, 2024
0637f1f
Merge branch '5.0.x' into sync-pr-4248
lexming Mar 6, 2024
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
14 changes: 11 additions & 3 deletions .github/workflows/container_tests_apptainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,18 @@ jobs:
- name: install OS & Python packages
run: |
# for building CentOS 7 container images
sudo apt-get install rpm
sudo apt-get install dnf
APT_PKGS="rpm dnf"
# for modules tool
sudo apt-get install lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev
APT_PKGS+=" lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev"

# Avoid apt-get update, as we don't really need it,
# and it does more harm than good (it's fairly expensive, and it results in flaky test runs)
if ! sudo apt-get install $APT_PKGS; then
# Try to update cache, then try again to resolve 404s of old packages
sudo apt-get update -yqq || true
sudo apt-get install $APT_PKGS
fi

# fix for lua-posix packaging issue, see https://bugs.launchpad.net/ubuntu/+source/lua-posix/+bug/1752082
# needed for Ubuntu 18.04, but not for Ubuntu 20.04, so skipping symlinking if posix.so already exists
if [ ! -e /usr/lib/x86_64-linux-gnu/lua/5.2/posix.so ] ; then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ jobs:
echo "Not testing with '${module_syntax}' as module syntax with '${EASYBUILD_MODULES_TOOL}' as modules tool"
continue
fi
printf '\n\n=====================> Using $module_syntax module syntax <=====================\n\n'
printf "\n\n=====================> Using $module_syntax module syntax <=====================\n\n"
export EASYBUILD_MODULE_SYNTAX="${module_syntax}"
export TEST_EASYBUILD_MODULE_SYNTAX="${EASYBUILD_MODULE_SYNTAX}"

Expand Down
2 changes: 1 addition & 1 deletion easybuild/tools/filetools.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
# tar.Z: using compress (LZW), but can be handled with gzip so use 'z'
'.tar.z': "tar xzf %(filepath)s",
# shell scripts don't need to be unpacked, just copy there
'.sh': "cp -a %(filepath)s .",
'.sh': "cp -dR %(filepath)s .",
}

ZIPPED_PATCH_EXTS = ('.bz2', '.gz', '.xz')
Expand Down
3 changes: 1 addition & 2 deletions easybuild/tools/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -1371,8 +1371,7 @@ def close_pr(pr, motivation_msg=None):
if not reopen:
msg += "\nPlease don't hesitate to reopen this PR or add a comment if you feel this contribution is still "
msg += "relevant.\nFor more information on our policy w.r.t. closing PRs, see "
msg += "https://easybuild.readthedocs.io/en/latest/Contributing.html"
msg += "#why-a-pull-request-may-be-closed-by-a-maintainer"
msg += "https://docs.easybuild.io/contributing/#contributing_review_process_why_pr_closed_by_maintainer"
post_comment_in_issue(pr, msg, account=pr_target_account, repo=pr_target_repo, github_user=github_user)

if dry_run:
Expand Down
3 changes: 2 additions & 1 deletion easybuild/tools/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ def override_options(self):
None, 'store_true', False),
'allow-use-as-root-and-accept-consequences': ("Allow using of EasyBuild as root (NOT RECOMMENDED!)",
None, 'store_true', False),
'backup-modules': ("Back up an existing module file, if any. Only works when using --module-only",
'backup-modules': ("Back up an existing module file, if any. "
"Auto-enabled when using --module-only or --skip",
None, 'store_true', None), # default None to allow auto-enabling if not disabled
'backup-patched-files': ("Create a backup (*.orig) file when applying a patch",
None, 'store_true', False),
Expand Down
2 changes: 1 addition & 1 deletion test/framework/filetools.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def test_extract_cmd(self):
('test.txz', "unset TAPE; unxz test.txz --stdout | tar x"),
('test.iso', "7z x test.iso"),
('test.tar.Z', "tar xzf test.tar.Z"),
('test.foo.bar.sh', "cp -a test.foo.bar.sh ."),
('test.foo.bar.sh', "cp -dR test.foo.bar.sh ."),
# check whether extension is stripped correct to determine name of target file
# cfr. https://github.com/easybuilders/easybuild-framework/pull/3705
('testbz2.bz2', "bunzip2 -c testbz2.bz2 > testbz2"),
Expand Down
15 changes: 9 additions & 6 deletions test/framework/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -4905,26 +4905,29 @@ def test_github_merge_pr(self):
self.assertEqual(stderr.strip(), expected_stderr)
self.assertTrue(stdout.strip().endswith(expected_stdout), "'%s' ends with '%s'" % (stdout, expected_stdout))

# full eligible merged PR, default target branch
# full eligible merged PR, default target branch;
# note: we frequently need to change to a more recent PR here,
# to avoid that this test starts failing because commit status is set to None for old commits
del args[-1]
args[1] = '17065'
# easyconfig PR for EasyBuild v4.8.2
args[1] = '19105'

stdout, stderr = self._run_mock_eb(args, do_build=True, raise_error=True, testing=False)

expected_stdout = '\n'.join([
"Checking eligibility of easybuilders/easybuild-easyconfigs PR #17065 for merging...",
"Checking eligibility of easybuilders/easybuild-easyconfigs PR #19105 for merging...",
"* targets develop branch: OK",
"* test suite passes: OK",
"* last test report is successful: OK",
"* no pending change requests: OK",
"* approved review: OK (by SebastianAchilles)",
"* milestone is set: OK (4.7.1)",
"* milestone is set: OK (4.9.0)",
"* mergeable state is clean: PR is already merged",
'',
"Review OK, merging pull request!",
'',
"[DRY RUN] Adding comment to easybuild-easyconfigs issue #17065: 'Going in, thanks @boegel!'",
"[DRY RUN] Merged easybuilders/easybuild-easyconfigs pull request #17065",
"[DRY RUN] Adding comment to easybuild-easyconfigs issue #19105: 'Going in, thanks @boegel!'",
"[DRY RUN] Merged easybuilders/easybuild-easyconfigs pull request #19105",
])
expected_stderr = ''
self.assertEqual(stderr.strip(), expected_stderr)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def run_async(self, thread_pool):
cmd = f"echo 'no sources for {self.name}'"

return thread_pool.submit(run_shell_cmd, cmd, asynchronous=True, env=os.environ.copy(),
fail_on_error=False, task_id=task_id)
fail_on_error=False, task_id=task_id, work_dir=os.getcwd())

def postrun(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion test/framework/sandbox/easybuild/easyblocks/t/toy.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def run_async(self, thread_pool):
cmd = compose_toy_build_cmd(self.cfg, self.name, self.cfg['prebuildopts'], self.cfg['buildopts'])
task_id = f'ext_{self.name}_{self.version}'
return thread_pool.submit(run_shell_cmd, cmd, asynchronous=True, env=os.environ.copy(),
fail_on_error=False, task_id=task_id)
fail_on_error=False, task_id=task_id, work_dir=os.getcwd())

def postrun(self):
"""
Expand Down