Skip to content

Conversation

@cslzchen
Copy link
Collaborator

Purpose

Reference PR for merge develop into VRL feature branch

Ostap-Zherebetskyi and others added 30 commits April 3, 2025 14:04
double-quote-string-fixer
## Purpose
When user has a deleted node where he is the only admin, osf admin can't gdpr delete this user because of this error


## Changes
Ignore this message for deleted nodes. Added a test

## Ticket
https://openscience.atlassian.net/browse/ENG-7557
[ENG-7792] Remove unused tests to speed up CI
…Admin App (#11105)

## Purpose
Implement Force Archive for admin UI based on `osf/management/commands/force_archive.py`

## Changes
BE:
1. remove globals from force archive management command to make it thread-safe (usable in views)
2. Implement CheckArchiveStatusRegistrationsView and ForceArchiveRegistrationsView
3. RestartStuckRegistrationsView is replaced with ForceArchiveRegistrationsView

FE:
1. Added Check archive status button
2. Added Force Archive button
3. Updated Restart Stuck Registration button (now it'll open the same modal as Force Archive to choose parameters but dry-mode is not available)

## QA Notes
- Check archive status is displayed if node is registration
- Force Archive button is displayed if registration is not archived and not stuck
- Restart/Remove Stuck Registration are displayed if registration is not archived and stuck

## Ticket
https://openscience.atlassian.net/browse/ENG-7270
## Purpose
`Preprint` inherits from `VersionedGuidMixin` that inherits from `GuidMixin` thus `coerce_guid` tries to fetch guid from `guids` attribute instead of `versioned_guids`

## Changes
Added if statement

## Ticket
https://openscience.atlassian.net/browse/ENG-7798
## Purpose
Fix bug with citations for a new preprint version.
The problem was in the process of creating a version of the preprint, so also added the manage command to fix already created versions

## Changes
Fix bug with citations for a new preprint version

## Ticket
https://openscience.atlassian.net/browse/ENG-7263
…n_callbacks

[ENG-7740] Upgrade Archiver Callbacks
## Purpose
Fix preprint updating

## Changes
Add a manage command to fix why_no_data and has_data_links for broken preprints due to an unknown bug on FE (Futa described it in the comments to the ticket)

## Ticket
https://openscience.atlassian.net/browse/ENG-7503
## Purpose
clean up code we don't need anymore (and avoid error messages when CenterForOpenScience/SHARE#859 )

## Changes
contains #11012
…h date uploaded) via the admin app (#11097)

## Purpose
Add "Create new version 1" button on admin UI

## Changes
- Add button to admin UI
- Extend existing preprint versioning functionality
- Move permission validation logic from serializer to model level to keep everything in one place
    - add required_permission decorator (with ignore_permission functionality) that checks if user has enough permission to call method

## QA Notes
Expected behavior:
1. Admin goes the preprint admin page
2. Clicks "Create new version 1", a modal asking to choose date will be displayed
3. If date is valid and file versions exists:
    - a new version 1 will be created
    - admin user will be redirected to v1
    - optionally, admin user can make new preprint published by clicking "Make published" button

(!) Preprint guid should point to the latest version, not the newly created one.
(!) Admin should be able to create new versions of a preprint even if  they are not a contributor.

## Ticket
https://openscience.atlassian.net/browse/ENG-7716
<!-- Before submit your Pull Request, make sure you picked
     the right branch:

     - For hotfixes, select "master" as the target branch
     - For new features, select "develop" as the target branch
     - For release feature fixes, select the relevant release branch (release/X.Y.Z) as the target branch -->
## Purpose
fix for non-contributor admin

## Changes
- add ignore_permission to set_license
- prevent creating new preprint version when serializer raises error

https://openscience.atlassian.net/browse/ENG-7716
## Purpose
Fix the errors in the management command

## Changes
Remove useless parameter



## Ticket
https://openscience.atlassian.net/browse/ENG-7263
…h date uploaded) via the admin app (#11118)

## Purpose
improve exception handling and minor fixes

## Changes
- improve exception handling
- supplemental node permission error
- set subjects from relationship to keep valid hierarchy
- ignore unfinished/unpublished versions

## Ticket
https://openscience.atlassian.net/browse/ENG-7716
## Purpose
Fix's a 502 that happened when the permission's class hit a NoneType target id

## Changes
- improves tests
- adds validation for target ids

## Ticket
https://openscience.atlassian.net/browse/ENG-7810
… provider moderators (#11116)

## Purpose
fix preprint visibility for admin reviewer

## Ticket
https://openscience.atlassian.net/browse/ENG-7811
## Purpose
fix broken users

## Changes
- do not unregister users when deactivate spam

## QA Notes
How I was able to recreate it:
In admin go to managment commands -> Ban spam users by regular expression and ban some users (Actually there may be other ways to recreate it using spam feature in different ways like management commands, scheduled spam checks and so on). They will become unregistered, disabled and confirmed. Then we can reactivate account in admin to make it enabled but not registered

## Ticket
https://openscience.atlassian.net/browse/ENG-7704
## Purpose
Admins should be able to see number of messages that each admin sent to the same user

## Changes
Added contact property, added a test and fixed existing ones
Contacts are ordered alphabetically
Additional scope: this property was added in export files as well

## Ticket
https://openscience.atlassian.net/jira/software/c/projects/ENG/boards/145
…ssref (#11121)

## Purpose
Admins should be able to resync preprints without minted doi with Crossref instead of all preprints.

## Changes
1. Added check mark for syncing only preprints without minted DOI. Fixed text coloring that has red background and red text color
2. Improved retry functionality for sync_identifier_doi task
3. Created a new celery task to resync preprints missing DOI and after that exclude all preprints from identifiers queryset

## Ticket
https://openscience.atlassian.net/browse/ENG-7879
## Purpose
Share update is not called when user withdrawals preprint and updates `date_withdrawn` and `withdrawal_justification` fields

## Changes
Updated SEARCH_UPDATE_FIELDS, added a test

## Ticket
https://openscience.atlassian.net/browse/ENG-5037
ihorsokhanexoft and others added 13 commits May 2, 2025 10:25
## Purpose
This isn't actual solution, just a way to handle error as it isn't reproducible locally, potentially because of smtp that is not used locally

## Changes
Added exception handler, swapped sync call for async version

## Ticket
https://openscience.atlassian.net/browse/ENG-6206
…opes (#11126)

## Purpose
Allow more scopes for application write PAT, but remove it from admin scope.

## Changes
- changes scope composition to add write_application to `FULL_WRITE`
- adds tests `test_application_detail_scopes.py`
- improves `test_application_detail.py` and fixes url validation issues.

## Side Effects
Fixing the some of the Application Detail view tests (spliting them up into more atomic tests in the process), relvealed a additional issue with application attribute url length maxuims being poorly validated. This comment explain more: https://github.com/CenterForOpenScience/osf.io/pull/11126/files#r2074027385 

## Ticket
https://openscience.atlassian.net/browse/ENG-7921
## Purpose
Admins should be able to remove collections options without any restrictions

## Changes
Removed validation

## Ticket
https://openscience.atlassian.net/browse/ENG-7871
…ve preprint provider. (#11131)

## Purpose
Show only relevant groups for preprint provider

## Ticket
https://openscience.atlassian.net/browse/ENG-7928
## Purpose
Add search by ORCID field to users search admin page

## Ticket
https://openscience.atlassian.net/browse/ENG-4673
## Purpose

Revert async function that causes 502
@cslzchen
Copy link
Collaborator Author

cslzchen commented May 19, 2025

Ah, the conflicts comes from #11032

# api/share/utils.py
<<<<<<< develop
=======
def sharev2_push_url():
    return f'{settings.SHARE_URL}api/v2/normalizeddata/'

>>>>>>> feature/verified-resource-linking

Note: this can be removed

# api_tests/share/_utils.py
<<<<<<< develop
=======
                    # for legacy sharev2 support:
                    _rsps.add(responses.POST, sharev2_push_url(), status=200)
                    _rsps.add(responses.GET, re.compile(gv_url()), status=200, body='{}')
>>>>>>> feature/verified-resource-linking
                    yield _rsps
...
<<<<<<< develop
=======
    _legacy_push_calls = []
    _gv_links_calls = []
>>>>>>> feature/verified-resource-linking
...

Note: remove lines with `sharev2_push_url` and `_legacy_push_calls`

<<<<<<< develop
    assert len(_trove_ingest_calls) == count
    assert len(_trove_supp_ingest_calls) == count * _trove_supplementary_count_per_item
=======
        elif _call.request.url.startswith(settings.GRAVYVALET_URL):
            _gv_links_calls.append(_call)
        else:
            _legacy_push_calls.append(_call)
    assert len(_trove_ingest_calls) == count
    assert len(_trove_supp_ingest_calls) == count * _trove_supplementary_count_per_item
    assert len(_legacy_push_calls) == count
    assert len(_gv_links_calls) == (count if expect_gv_call else 0)
>>>>>>> feature/verified-resource-linking

Note: remove lines with `_legacy_push_calls`
# api_tests/share/test_share_node.py
<<<<<<< develop
        with expect_ingest_request(mock_share_responses, node._id, count=2):
=======
        mock_share_responses.replace(responses.POST, sharev2_push_url(), status=500)
        mock_share_responses.add(responses.POST, sharev2_push_url(), status=200)
        with expect_ingest_request(mock_share_responses, node, count=2):
>>>>>>> feature/verified-resource-linking
...
<<<<<<< develop
        with expect_ingest_request(mock_share_responses, node._id, count=5):  # tries five times
=======
        mock_share_responses.replace(responses.POST, sharev2_push_url(), status=500)
        with expect_ingest_request(mock_share_responses, node, count=5):  # tries five times
>>>>>>> feature/verified-resource-linking
...
<<<<<<< develop
        with expect_ingest_request(mock_share_responses, node._id):
=======
        mock_share_responses.replace(responses.POST, sharev2_push_url(), status=400)
        with expect_ingest_request(mock_share_responses, node):
>>>>>>> feature/verified-resource-linking

Note: remove lines with sharev2_push_url; for expect_ingest_request calls keep the ones with node and remove those with node._id

@cslzchen cslzchen changed the title [ENG-8045] Reference PR [ENG-8045] Reference PR for reviewing merge conflicts May 19, 2025
@cslzchen cslzchen merged commit 21657bb into feature/verified-resource-linking May 20, 2025
23 checks passed
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.

10 participants