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

chore: set safer bash config #626

Merged
merged 2 commits into from
Sep 1, 2023
Merged

chore: set safer bash config #626

merged 2 commits into from
Sep 1, 2023

Conversation

madwort
Copy link
Contributor

@madwort madwort commented Jul 28, 2023

No description provided.

@madwort
Copy link
Contributor Author

madwort commented Jul 28, 2023

it seems that Test we can build PyPI package was silently failing, now loudly fails thanks to this change.

@madwort
Copy link
Contributor Author

madwort commented Jul 28, 2023

this is failing because the test is attempting to use pydantic-2 and pipeline only supports pydantic-1 - see opensafely-core/pipeline#159

@madwort madwort force-pushed the madwort/safer-bash branch from b3d4f31 to 1152721 Compare August 23, 2023 09:36
@madwort
Copy link
Contributor Author

madwort commented Aug 23, 2023

rebased on pydantic-2 - now blocked by the colima issue #641

@madwort madwort force-pushed the madwort/safer-bash branch 2 times, most recently from 3354a9b to a2a9378 Compare August 30, 2023 16:18
justfile Outdated Show resolved Hide resolved
* this grep was verifying there was at least one non-test, *not* that
  there were no tests
Comment on lines +149 to +152
if unzip -Z -1 dist/*.whl | grep -q "^tests"; then
echo "Built wheel contains tests!"
exit 1
fi
Copy link
Contributor Author

@madwort madwort Sep 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tom@MadBook3 just-and-shell-tests % unzip -Z -1 does-not-contain-tests.zip | grep "^tests"
tom@MadBook3 just-and-shell-tests % unzip -Z -1 contains-tests.zip | grep "^tests"
tests/
tests/file3
tom@MadBook3 just-and-shell-tests % cat not-in-list.sh
#!/bin/bash
set -euo pipefail

if unzip -Z -1 contains-tests.zip | grep -q "^tests"; then
  echo "contains tests"
else
  echo "does not contain tests"
fi

if unzip -Z -1 does-not-contain-tests.zip | grep -q "^tests"; then
  echo "contains tests"
else
  echo "does not contain tests"
fi
tom@MadBook3 just-and-shell-tests % ./not-in-list.sh
contains tests
does not contain tests

@madwort madwort merged commit f848e98 into main Sep 1, 2023
12 checks passed
@madwort madwort deleted the madwort/safer-bash branch September 1, 2023 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants