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

Yoda 1.9.5 [draft] #533

Draft
wants to merge 55 commits into
base: release-1.9
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
34df8fe
Add integr. tests for counting user connections
stsnel Jul 19, 2024
30480b7
Integration tests: enable running subset
stsnel Jul 19, 2024
5b8e4b2
Fix call to deposit create
claravox Jul 22, 2024
1ce1642
YDA-5393: Remove iiCopyFolderToVault
claravox Jul 22, 2024
16704da
YDA-5778: Disallow folders with apostrophes
claravox Jul 19, 2024
ed7604f
YDA-5393: refactor copy to vault with irsync
claravox Jun 17, 2024
eef54ae
YDA-5393: reorder end of copy to vault
claravox Jun 20, 2024
6811673
YDA-5778: Folder with apostrophe api tests
claravox Jul 19, 2024
faf838f
YDA-5835: fix zone selection in transform script
stsnel Jul 23, 2024
db0f578
YDA-5747: give readers access to vault package
claravox Jul 30, 2024
a2a43bf
YDA-5775: fix data request internal error
leonidastri Aug 1, 2024
f7608d8
Add basic integration tests util.group
stsnel Aug 1, 2024
370dd3a
YDA-5863: fix log messages schema transformation
stsnel Aug 1, 2024
e654d82
YDA-5747: script for granting read members access to vault packages
claravox Aug 2, 2024
42dd5bc
YDA-5864: ignore deleted users in schema transf.
stsnel Aug 2, 2024
9609b49
YDA-5711: use DAP expiry date notification configuration
leonidastri Aug 6, 2024
b310e6f
Add tool for editing vault metadata
stsnel Jul 5, 2024
e93427a
Add integration tests latest vault metadata
stsnel Aug 6, 2024
eaac619
YDA-5859: prevent unrecoverable error when creating DataCite JSON wit…
lwesterhof Aug 7, 2024
26a7d1b
YDA-5859: remove empty objects from metadata
lwesterhof Aug 7, 2024
654300f
YDA-5859: use assertDictEqual when comparing dictionaries in test cases
lwesterhof Aug 7, 2024
b5b7ce8
YDA-5808: add all the versions of data package to vault space
kaur16 Aug 9, 2024
99c7d0a
YDA-5857: add user metadata indicating user is invited in SRAM
lwesterhof Aug 8, 2024
7c08c97
YDA-5857: return SRAM invitation status in groups API
lwesterhof Aug 8, 2024
e0172ea
Add missing priv group type managed via group manager
lwesterhof Aug 13, 2024
fcb97ae
API tests: ensure privileged users have access to privilege groups
lwesterhof Aug 13, 2024
6605e7c
YDA-5865: handle invalid UTF-8 sequence in file
kaur16 Aug 13, 2024
de372a5
YDA-5857: sync SRAM invitation status
lwesterhof Aug 13, 2024
e997808
YDA-5728: reduce queries for category statistics from O(n²) to O(1)
lwesterhof Aug 15, 2024
9a799a3
YDA-5912: add support for msi_atomic_apply_metadata_operations
lwesterhof Aug 21, 2024
42052c6
YDA-5866 fix rev creation job stopping on error
FuHsinyu Aug 23, 2024
261a8ff
YDA-5912: improve error handling in apply_atomic_operations
lwesterhof Aug 23, 2024
1b0eef9
YDA-5929: add parameter to update one publication
stsnel Aug 26, 2024
af3aa91
Integration tests: add util.data_object.to_from_id
stsnel Aug 26, 2024
d195260
Schemas: Fix dag-0 typos
claravox Aug 28, 2024
1fd7b92
YDA-5924: Copytovault: check if in research space
claravox Aug 27, 2024
9834e59
UI Tests: Fix failing publication test
claravox Aug 28, 2024
91f791b
YDA-5939: fix publication fail on third+ version
claravox Sep 3, 2024
8cc2bb6
Log: write stdout option
claravox Sep 4, 2024
c49c616
YDA-5892: delete revision avu for data objects in trash
leonidastri Sep 25, 2024
b7b96a8
YDA-5951 add transformation default-3 ISNI and Scopus ID
leonidastri Sep 26, 2024
b912d77
YDA-5942: improve messages CSV group import
leonidastri Oct 1, 2024
7125337
Schema transformation utils: add missing description and copyright no…
lwesterhof Oct 1, 2024
e2d6acb
YDA-5829: troubleshooting tool for published data packages
FuHsinyu Oct 23, 2024
f5deb3e
YDA-5829: Unicode landing page comparison
claravox Oct 28, 2024
0e2ec77
CI: fix integration/API tests for 1.9 RC versions
stsnel Dec 3, 2024
9bb667e
YDA-5241 Add vault stat microservice
stsnel Apr 12, 2024
ab484ba
Add file checksum and dir list integration tests
stsnel Jul 4, 2024
86d4c11
YDA-5737: Add data transfer page UI tests
leonidastri Jun 25, 2024
db3e2f8
Fix Data Transfer UI tests after latest changes
leonidastri Jul 9, 2024
6982c18
CI: upgrade UU MSVC for rc-1.9.5
stsnel Dec 5, 2024
7aba7b5
YDA-6040: add portal info API tests
stsnel Dec 5, 2024
52e5570
CI: install any new portal dependencies if needed
stsnel Dec 5, 2024
9fedc09
CI: Ignore all API/UI test code for Python 2 lint
stsnel Dec 5, 2024
0a8c09a
Backport fix for edit-vault-metadata.py
stsnel Dec 16, 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
15 changes: 14 additions & 1 deletion .github/workflows/api-and-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
# For other branches, we use the Docker setup of the development branch.
- name: Determine Yoda repository branch
run: |
if [ "${{ steps.extract_branch.outputs.branch }}" = "release-1.9" ]; then
if [ "${{ steps.extract_branch.outputs.branch }}" = "release-1.9" ] || [[ "${{ steps.extract_branch.outputs.branch }}" == rc-1.9.* ]]; then
echo "branch=release-1.9" >> $GITHUB_OUTPUT
else
echo "branch=development" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -74,12 +74,19 @@ jobs:
docker exec provider.yoda sh -c "set -x ; cd /etc/irods/yoda-ruleset && sudo -u irods git checkout ${{ steps.extract_branch.outputs.branch }} && sudo -u irods python -m pip --no-cache-dir install --user -r /etc/irods/yoda-ruleset/requirements.txt && sudo -u irods make && sudo -u irods make install"
docker exec provider.yoda sh -c "set -x ; sudo -u irods /var/lib/irods/irodsctl restart"

- name: Upgrade UU microservices for testing the RC version of Yoda 1.9.5
if: github.event.pull_request.head.ref == 'rc-1.9.5'
shell: bash
run: |
docker exec provider.yoda sh -c 'set -x ; sudo yum remove -y irods-uu-microservices ; sudo wget https://github.com/UtrechtUniversity/irods-uu-microservices/releases/download/v1.2.0/irods-uu-microservices-4.2.12_1.2.0-0.rpm ; sudo rpm -ivh irods-uu-microservices-4.2.12_1.2.0-0.rpm'

- name: Pull and install latest version of portal
shell: bash
run: |
cd yoda/docker/compose
docker exec portal.yoda sh -c 'set -x ; cd /var/www/yoda && git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" && git pull'
docker exec portal.yoda sh -c 'set -x ; cd /var/www/yoda && git checkout ${{ steps.extract_branch.outputs.branch }} || git checkout development'
docker exec portal.yoda sh -c 'set -x ; cd /var/www/yoda && . venv/bin/activate && venv/bin/pip3 install -r requirements.txt'
docker exec portal.yoda sh -c 'set -x ; cd /var/www/yoda && git status'
docker exec portal.yoda sh -c 'set -x ; touch /var/www/yoda/*.wsgi'

Expand Down Expand Up @@ -118,6 +125,12 @@ jobs:
run: |
docker exec provider.yoda sh -c 'set -x ; cat /var/lib/irods/log/rodsLog*'


- name: Output web server logs
if: failure()
run: |
docker exec portal.yoda sh -c 'set -x ; for log in error_log portal_access.log ; do echo "${log}:" ; cat "/var/log/httpd/$log" ; echo; done'

# Uncomment section below when needed for debugging.
#
# - name: Setup tmate session for debugging
Expand Down
49 changes: 25 additions & 24 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,31 @@
# Import all modules containing rules into the package namespace,
# so that they become visible to iRODS.

from browse import *
from folder import *
from groups import *
from json_datacite import *
from json_landing_page import *
from mail import *
from meta import *
from meta_form import *
from provenance import *
from research import *
from resources import *
from schema import *
from schema_transformation import *
from schema_transformations import *
from vault import *
from datacite import *
from epic import *
from publication import *
from policies import *
from replication import *
from revisions import *
from settings import *
from notifications import *
from integration_tests import *
from browse import *
from folder import *
from groups import *
from json_datacite import *
from json_landing_page import *
from mail import *
from meta import *
from meta_form import *
from provenance import *
from research import *
from resources import *
from schema import *
from schema_transformation import *
from schema_transformations import *
from publication_troubleshoot import *
from vault import *
from datacite import *
from epic import *
from publication import *
from policies import *
from replication import *
from revisions import *
from settings import *
from notifications import *
from integration_tests import *

# Import certain modules only when enabled.
from .util.config import config
Expand Down
4 changes: 2 additions & 2 deletions browse.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def transform(row):
if sort_on == 'modified':
cols = ['COLL_NAME', 'COLL_PARENT_NAME', 'MIN(COLL_CREATE_TIME)', 'ORDER(COLL_MODIFY_TIME)']
else:
cols = ['ORDER(COLL_NAME)', 'COLL_PARENT_NAME' 'MIN(COLL_CREATE_TIME)', 'MAX(COLL_MODIFY_TIME)']
cols = ['ORDER(COLL_NAME)', 'COLL_PARENT_NAME', 'MIN(COLL_CREATE_TIME)', 'MAX(COLL_MODIFY_TIME)']
where = "COLL_PARENT_NAME like '{}%%' AND COLL_NAME like '%%{}%%'".format("/" + zone + "/home", search_string)
elif search_type == 'metadata':
if sort_on == 'modified':
Expand Down Expand Up @@ -310,7 +310,7 @@ def _filter_vault_deposit_index(row):

:param row: row of results data from GenQuery, containing collection name (COLL_NAME)

:returns: boolean value that indicated whether row should be displayed
:returns: boolean value that indicates whether row should be displayed
"""
# Remove ORDER_BY etc. wrappers from column names.
x = {re.sub('.*\((.*)\)', '\\1', k): v for k, v in row.items()}
Expand Down
10 changes: 8 additions & 2 deletions datarequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,10 @@ def datarequest_owner_get(ctx, request_id):
+ JSON_EXT)

# Get and return data request owner
return jsonutil.read(ctx, file_path)['owner']
try:
return jsonutil.read(ctx, file_path)['owner']
except Exception:
return None


def datarequest_is_reviewer(ctx, request_id, pending=False):
Expand Down Expand Up @@ -1046,7 +1049,10 @@ def api_datarequest_get(ctx, request_id):
datarequest_action_permitted(ctx, request_id, ["PM", "DM", "DAC", "OWN"], None)

# Get request type
datarequest_type = type_get(ctx, request_id).value
try:
datarequest_type = type_get(ctx, request_id).value
except Exception as e:
return api.Error("datarequest_type_fail", "Error: {}".format(e))

# Get request status
datarequest_status = status_get(ctx, request_id).value
Expand Down
9 changes: 5 additions & 4 deletions deposit.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,16 @@


@api.make()
def api_deposit_copy_data_package(ctx, reference):
def api_deposit_copy_data_package(ctx, reference, deposit_group):
"""Create deposit collection and copies selected datapackage into the newly created deposit

:param ctx: Combined type of a callback and rei struct
:param reference: Data Package Reference (UUID4)
:param ctx: Combined type of a callback and rei struct
:param reference: Data Package Reference (UUID4)
:param deposit_group: Deposit group to copy to

:returns: Path to created deposit collection or API error
"""
result = deposit_create(ctx)
result = deposit_create(ctx, deposit_group)
if result["deposit_path"] == "not_allowed":
return api.Error('not_allowed', 'Could not create deposit collection.')

Expand Down
Loading
Loading