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

1287 remote rsd search (RSD v3) #1356

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open

Conversation

dmijatovic
Copy link
Contributor

@dmijatovic dmijatovic commented Nov 28, 2024

Search for software in multiple RSD instances

Closes #1287

Changes proposed in this pull request:

  • rsd administrators can specify the instance name to be used as "label" for the software from this instance. New section "RSD info" is created for this purpose. Initially the default "Not defined" value is added to rsd_info table.
  • rsd_info table/endpoint is created to store the info about rsd instance. Basic endpoint information and remote_name property is inserted in the table. remote_name prop is used in aggregated_software_overview.
  • rsd admin can add remote RSD to be included in software search on software overview page.
  • all users can search and filter software in all defined RSD instances from the software overview page.
  • the "remote" software opens in the new tab and the "local" software opens in the same tab. The remote software has "opens in new tab" icon at the top right of the card
  • if at least one remote RSD is defined, the additional filter is shown on the software overview page.
  • global search includes remote software. Under the software name the domain name is shown to indicate "remote" source
  • upgraded all dependencies to latest version: MUI v5.16.4 and React v19. React upgrade to v19 is commited as "BREAKING CHANGE" and will result in major version bump of RSD images to v3.0.0

How to test:

  • make start to build and generate test data
  • navigate to software overview page and confirm that no RSD hosts filter is present (no remotes are defined yet).
  • login as rsd-admin, navigate to Rsd info page. Change remote_name to your liking. At some other values. You can read this values from the api at: /api/v1/rsd_info
  • navigate to Remotes page (Admin section)
  • add Helmholtz remote: https://helmholtz.software/
  • add RSD Saas remote: https://research-software-directory.org/
  • add RSD dev remote: https://research-software.dev/ . RSD dev is updated to this PR version to return RSD remote name. This suggestion is shown in the form of the icon (see last image).
  • try to add not existing RSD remote. The validation should raise error and prevent you from adding invalid remote.
  • run scrapers manually or wait for scrapers to run. You can stop & restart RSD to see the logs docker compose down & docker compose up
  • after scrapers run examine the software overview. It should include software from remote RSD's too.
  • you can also filter all software, including remote software. The counts shown in the filters should reflect all software including remote software.
  • confirm that additional filter is shown on the software overview page and you can use filter.
  • confirm that local software is open in the same tab and remote software in the new tab.
  • navigate to highlights page and confirm that additional filter "RSD Hosts" is not shown on the page and that filtering works properly

Example rsd info section

image

Example add remote RSD

image

Example remotes overview

image

Example software overview cards (showing source, remote icon and the additional filter)

image

Example software overview list (with source)

image

Example suggested remote RSD name (based on info received from remote)

image

Example global search includes domain for the remotes

image

PR Checklist:

  • Increase version numbers in docker-compose.yml
  • Link to a GitHub issue
  • Update documentation
  • Tests

@dmijatovic dmijatovic force-pushed the 1287-remote-rsd-search branch 4 times, most recently from d464617 to 0820384 Compare December 2, 2024 10:46
@dmijatovic dmijatovic force-pushed the 1287-remote-rsd-search branch 3 times, most recently from 624569c to 958b429 Compare December 6, 2024 08:56
@dmijatovic dmijatovic marked this pull request as ready for review December 6, 2024 12:25
@jmaassen
Copy link
Member

jmaassen commented Dec 9, 2024

The fetching of the remote RSD name seems to be a bit buggy?

When I add the dev server URL, the remote RSD name does not show up automatically. Instead I have to click the "remote control icon" first. Why not fetch it and allow the admin to change it later?

Screenshot_2024-12-09_11-02-57

After fetching the name, the text box containing it seems messed up? Also, the save icon is still disabled.

Screenshot_2024-12-09_11-02-16

When clicking on the name text box, it is cleaned up, but the save is still disabled.

Screenshot_2024-12-09_11-03-51

Clicking on the update interval or URL box activates the save button.

@ewan-escience ewan-escience removed their request for review December 9, 2024 10:32
@jmaassen
Copy link
Member

jmaassen commented Dec 9, 2024

When selecting by keyword, the selected keyword does not always show up. For example, when harvesting from the RSD SAAS and Helmholtz RSD, selecting "3D" works as expected:

Screenshot 2024-12-09 at 11-37-49 Software Research Software Directory

However, if I select "Data Analysis" instead, the filter works as expected, but isn't shown in the sidebar:

Screenshot 2024-12-09 at 11-36-37 Software Research Software Directory

All others I've tried seem to work as expected, so I'm not sure what the problem is with this one?

@dmijatovic dmijatovic force-pushed the 1287-remote-rsd-search branch from 899a3a1 to 31a253e Compare December 9, 2024 16:21
@dmijatovic
Copy link
Contributor Author

@jmaassen Well spotted! I have fixed both remarks. I did force push so please remote old branch and pull again.

@dmijatovic dmijatovic force-pushed the 1287-remote-rsd-search branch 2 times, most recently from 98b8734 to 6dc2778 Compare December 13, 2024 09:24
@cmeessen
Copy link
Contributor

When adding research-software.dev as a remote I get this error message:

grafik

@dmijatovic
Copy link
Contributor Author

When adding research-software.dev as a remote I get this error message:

grafik

@cmeessen Thanks for notifying us. It seems that rsd-dev api failed for uknown reason. I restarted docker-compose and the rsd-dev is working now.

Copy link
Collaborator

@ewan-escience ewan-escience left a comment

Choose a reason for hiding this comment

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

Nice work, I have some comments on the database setup.

database/025-rsd-info.sql Show resolved Hide resolved
database/025-rsd-info.sql Outdated Show resolved Hide resolved
.env.example Outdated Show resolved Hide resolved
@cmeessen
Copy link
Contributor

Using the global search does not include the results from remote RSDs.

@dmijatovic dmijatovic force-pushed the 1287-remote-rsd-search branch from f33951c to 3354d83 Compare January 10, 2025 20:20
@jmaassen
Copy link
Member

jmaassen commented Jan 13, 2025

When looking at the NWO website, I noticed that they used the following method for indicating that clicking on a tile leads to an external website:

Screenshot 2025-01-13 at 10-58-24 Klimaatonderzoek NWO

So a similar "exit" icon that we discussed during out meeting last friday. They do highlight this icon by surrounding it using a colored box.

@dmijatovic dmijatovic force-pushed the 1287-remote-rsd-search branch 3 times, most recently from 1e54718 to 1940141 Compare January 17, 2025 16:04
dmijatovic and others added 12 commits January 21, 2025 14:24
feat: add remote_rsd_name env variable to communicate RSD name to remotes
fix: keywords filter variation of the same value
docs: upgrade docusaurus to v3.6 and use rspack to speedup compilation
deployment: update docker-compose.yml file of deployment to include RSD_REMOTE_NAME env variable
chore: upgrade next to the latest version
chore: upgrade dnd-kit to latest major versions and fix errors
…it and e2e tests

chore: upgrade e2e libraries (playwright)
@dmijatovic dmijatovic force-pushed the 1287-remote-rsd-search branch from e869677 to 40da42e Compare January 21, 2025 13:25
@dmijatovic dmijatovic force-pushed the 1287-remote-rsd-search branch from 40da42e to 6ee4dc6 Compare January 21, 2025 13:34
@dmijatovic dmijatovic changed the title 1287 remote rsd search 1287 remote rsd search (RSD v3) Jan 21, 2025
Copy link
Collaborator

@ewan-escience ewan-escience left a comment

Choose a reason for hiding this comment

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

  1. When there are no entires in rsd_info (because they were directly deleted in the database), the Add button is not there.
  2. I would also make the remote_name entry fully mutable (don't disable the slider and delete button).
  3. The database enforces the label of remote_rsd to be of at least length 3, but the frontend form doesn't show this.
  4. The software overview page doesn't handle a missing remote_name gracefully: it shows a blank entry in the filter and when you click on it, it shows nothing with a null in the URL bar in the sources parameter.

database/025-rsd-info.sql Show resolved Hide resolved
deployment/docker-compose.yml Show resolved Hide resolved
documentation/docs/03-rsd-instance/01-getting-started.md Outdated Show resolved Hide resolved
documentation/docs/03-rsd-instance/03-administration.md Outdated Show resolved Hide resolved
@jmaassen
Copy link
Member

The new tab to add RSD info has different capitalization from the others. It uses "Rsd" instead of "RSD":

Screenshot 2025-01-22 at 10-38-49 Rsd info Admin page Research Software Directory

@jmaassen
Copy link
Member

Once the remote_name property is set, it cannot be unset, only changed. While this is not necessarily a problem, the behavior of the tab is a bit strange.

Initially the value is set:

Screenshot 2025-01-22 at 10-46-35 Rsd info Admin page Research Software Directory

I select it:

Screenshot_2025-01-22_10-52-06

Press delete. The value is deleted:

Screenshot_2025-01-22_10-51-57

Navigate away from the box, the value is restored (which is okay):

Screenshot 2025-01-22 at 10-46-35 Rsd info Admin page Research Software Directory

Next time I click on the value, it is highlighted dark red:

Screenshot_2025-01-22_10-51-33

If I navigate away the highlight disappears. Next selection works normally:

Screenshot 2025-01-22 at 10-46-35 Rsd info Admin page Research Software Directory

@jmaassen
Copy link
Member

During testing of the RSD info tab, I somehow lost the rights to add key value pairs:

Screenshot 2025-01-22 at 11-08-02 Rsd info Admin page Research Software Directory

results in:

Screenshot 2025-01-22 at 11-08-11 Rsd info Admin page Research Software Directory

This could only be resolved by signing out and signing in again.

I cannot reproduce this behavior however....

@jmaassen
Copy link
Member

When I change a value in the RSD info tab, while it it red, it appears to be stored but isn't.

I start with a valid value:

Screenshot 2025-01-22 at 11-23-58 Rsd info Admin page Research Software Directory

Then select and delete it:

Screenshot_2025-01-22_11-24-05

The value is restored:

Screenshot 2025-01-22 at 11-23-58 Rsd info Admin page Research Software Directory

When I click it, the value turns read. I change it:

Screenshot_2025-01-22_11-24-38

The value seems stored:

Screenshot 2025-01-22 at 11-25-51 Rsd info Admin page Research Software Directory

However, when I click and delete it again, the original value is restored, not the changed one:

Screenshot_2025-01-22_11-25-59
Screenshot_2025-01-22_11-26-09
Screenshot 2025-01-22 at 11-32-14 Rsd info Admin page Research Software Directory

@jmaassen
Copy link
Member

The technical documentation for the RSD info tab is still missing I think?

… value

docs: update documentation to new rsd info approach about remotes.
@dmijatovic dmijatovic force-pushed the 1287-remote-rsd-search branch from 1eac6b1 to de7a65b Compare January 23, 2025 14:47
Copy link

Copy link

Copy link

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.

Options for federation of multiple RSDs
4 participants