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

pull from devel to master to create Release 3.24.1 #325

Merged
merged 13 commits into from
Oct 4, 2024
Merged
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
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Referenced from:
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
1 change: 0 additions & 1 deletion .github/workflows/perlbrew.sha256

This file was deleted.

10 changes: 4 additions & 6 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
# singularity so that paths used are misleading/unclear


- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: "Install OS dependencies"
run: |
Expand All @@ -94,7 +94,7 @@ jobs:
echo DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$(id -u)/bus" >> $GITHUB_ENV

- name: "Cache Singularity images"
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.SINGULARITY_CACHEDIR }}
key: ${{ runner.os }}-singularity
Expand Down Expand Up @@ -134,18 +134,16 @@ jobs:

- name: "Cache Perl"
id: cache-perl
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.PERL_CACHE }}
key: ${{ runner.os }}-${{ matrix.perl }}-perl

- name: "Install Perlbrew"
if: steps.cache-perl.outputs.cache-hit != 'true'
run: |
curl -sSL https://install.perlbrew.pl -o perlbrew.sh
sha256sum -c .github/workflows/perlbrew.sha256
export PERLBREW_ROOT=${{ env.PERL_CACHE }}
sh perlbrew.sh
./scripts/install_perlbrew.sh

source ${{ env.PERL_CACHE }}/etc/bashrc
perlbrew available
Expand Down
15 changes: 15 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
Unreleased

Release 3.24.1 (2024-10-04)

- Fix handling of undefined data release strategy
- Improve error handling when listing collections (add early returns).
- Move Perlbrew install to a script so that it can be used by both
GitHub Actions and Docker.
- Added .github/dependabot.yml file to auto-update GitHub actions
- Following a release on 07/09/2024, see https://metacpan.org/dist/App-perlbrew/changes
the checksum of the script served by https://install.perlbrew.pl had changed.
https://install.perlbrew.pl is a redirect to raw
https://github.com/gugod/App-perlbrew/blob/master/perlbrew-install, so
the change originates from GitHub and can be trusted. Our CI flow compares
the checksum of the downloaded script to the expected value. We now store
an updated expected checksum value, which corresponds to the latest release.

Release 3.24.0 (2024-09-02)

- populate_wtsi_irods_groups now sets ss_<STUDY_ID>_human group membership if
Expand Down
3 changes: 2 additions & 1 deletion bin/populate_wtsi_irods_groups.pl
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ sub _uid_to_irods_uid {
@members = map { _uid_to_irods_uid($_) }
map { @{ $group2uids->{$_} || [$_] } } @dags;
}
elsif ($study->data_release_strategy ne $MANAGED_TYPE) {
elsif (defined $study->data_release_strategy and
$study->data_release_strategy ne $MANAGED_TYPE) {
@members = @public;
}
else {
Expand Down
44 changes: 21 additions & 23 deletions lib/WTSI/NPG/iRODS/BatonClient.pm
Original file line number Diff line number Diff line change
Expand Up @@ -918,37 +918,35 @@ sub _list_collection {
my $response = $self->communicate($spec);
$self->validate_response($response);

my @all_specs;
if ($response->{error}) {
if ($response->{error}->{code} == $ITEM_DOES_NOT_EXIST) {
return (undef, undef);
}

if ($response->{error} &&
$response->{error}->{code} == $ITEM_DOES_NOT_EXIST) {
@all_specs = (undef, undef);
$self->logconfess('Error listing collection: ', $self->encode($response));
}
else {
my @object_specs;
my @collection_specs;

if (!exists $response->{contents}) {
$self->logconfess('The returned path spec did not have ',
'a "contents" key: ', $self->encode($response));
}
my @object_specs;
my @collection_specs;

my @contents = @{delete $response->{contents}};
push @collection_specs, $response;
if (!exists $response->{contents}) {
$self->logconfess('The returned path spec did not have ',
'a "contents" key: ', $self->encode($response));
}

foreach my $path (@contents) {
if (exists $path->{data_object}) {
push @object_specs, $path;
}
else {
push @collection_specs, $path;
}
}
my @contents = @{delete $response->{contents}};
push @collection_specs, $response;

@all_specs = (\@object_specs, \@collection_specs);
foreach my $path (@contents) {
if (exists $path->{data_object}) {
push @object_specs, $path;
}
else {
push @collection_specs, $path;
}
}

return @all_specs;
return (\@object_specs, \@collection_specs);
}

# Return two arrays of path specs, given a collection path to recurse
Expand Down
12 changes: 12 additions & 0 deletions scripts/install_perlbrew.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

set -ex

PERLBREW_ROOT=${PERLBREW_ROOT:-"/app/perlbrew"}
export PERLBREW_ROOT

PERLBREW_SHA256="8f254651d2eee188199b3355228eb67166974716081b794ca93b69c8f949c38d"
curl -sSL https://install.perlbrew.pl -o ./perlbrew.sh
sha256sum ./perlbrew.sh | grep "$PERLBREW_SHA256"
/bin/bash ./perlbrew.sh
rm ./perlbrew.sh
1 change: 1 addition & 0 deletions scripts/perlbrew.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8f254651d2eee188199b3355228eb67166974716081b794ca93b69c8f949c38d perlbrew.sh