Page MenuHomeSoftware Heritage

Grant permission to eLife accounts to deposit
Closed, MigratedEdits Locked

Description

  • in staging (collection created, user created) [1]
  • in production (T3356#66615)

[1]

swhdeposit@deposit:~$ swh deposit admin \
  --config-file /etc/softwareheritage/deposit/server.yml \
  --platform production \
    user create \
    --collection elife \
    --username elife-production
Create collection 'elife'.
Collection 'elife' created.
Create user 'elife-production'.
User 'elife-production' created.

Event Timeline

moranegg created this task.

Heads up, only the "usual" information, provider_url and domain are missing:

swh-deposit=> select username, d.* from deposit_client d inner join auth_user a on a.id = d.user_ptr_id where username='elife-production';
     username     | user_ptr_id | collections | provider_url | domain
------------------+-------------+-------------+--------------+--------
 elife-production |          10 | {9}         |              |

swh-deposit=> select * from deposit_collection where id=9;
 id | name
----+-------
  9 | elife
(1 row)

Cheers,

I'll get back to you with info for provider_url and domain.
Can you copy here the Ipol information?

Can you copy here the Ipol information?

Here you go:

swh-deposit=> select username, d.* from deposit_client d inner join auth_user a on a.id = d.user_ptr_id where username='ipol';
 username | user_ptr_id | collections |       provider_url       | domain
----------+-------------+-------------+--------------------------+---------
 ipol     |           7 | {6}         | https://doi.org/10.5201/ | doi.org
(1 row)

swh-deposit=> select * from deposit_collection where id=6;
 id | name
----+------
  6 | ipol
(1 row)

Are we matching the create-origin with provider_url or domain?

The doi.org domain for IPOL is not a good match, because many publishers using DOIs will have this same domain (eLife might use also DOIs for origins).
I need to check with Jose-Luis if 10.5201 stable.

eLife will be using Stencila hub urls as origins: https://elife.stencila.io/article-61523/
We can use https://elife.stencila.io/ as provider url
We can use elife.stencila as the domain.

  • is the origin checked with the domain when using create-origin?

Staging information updated.

swh-deposit=> update deposit_client set provider_url='https://elife.stencila.io/', domain='elife.stencila' where user_ptr_id=10;
UPDATE 1
swh-deposit=> select username, d.* from deposit_client d inner join auth_user a on a.id = d.user_ptr_id where username='elife-production';
     username     | user_ptr_id | collections |        provider_url        |     domain
------------------+-------------+-------------+----------------------------+----------------
 elife-production |          10 | {9}         | https://elife.stencila.io/ | elife.stencila
(1 row)

Are we matching the create-origin with provider_url or domain?
is the origin checked with the domain when using create-origin?

I'll need to check the code because I no longer recall the details there.
What i recall is that those information we updated are only used as fallback if it's not provided properly with the new tags create-origin (and add-to-origin).

After some discussion through email, i see that a last successful run got done on staging [1].

[1] https://webapp.staging.swh.network/browse/origin/directory/?origin_url=https://elife.stencila.io/article-30274/

[2] Db entry:

swh-deposit=> select * from deposit where client_id=10;
-[ RECORD 1 ]--+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
id             | 325
reception_date | 2021-06-03 16:35:59.918572+00
complete_date  | 2021-06-03 16:35:59.918132+00
external_id    |
swhid          | swh:1:dir:94e7c616aeed2f14f7a5b6a62990e3cc5d00bfe4
status         | done
client_id      | 10
collection_id  | 9
parent_id      |
status_detail  |
swhid_context  | swh:1:dir:94e7c616aeed2f14f7a5b6a62990e3cc5d00bfe4;origin=https://elife.stencila.io/article-30274/;visit=swh:1:snp:a5e6394e5aa72ef9c66b508c58a115d2a080fba8;anchor=swh:1:rev:8e9014770b148a1ace086e058e88018932b0aaa2;path=/
check_task_id  | 22783195
load_task_id   | 22783196
origin_url     | https://elife.stencila.io/article-30274/

Things are going the right way.

moranegg changed the task status from Open to Work in Progress.Jun 11 2021, 5:01 PM
moranegg moved this task from Backlog to In progress on the SWORD deposit board.

Waiting for response from eLife about additional metadata files:

  • AUTHORS
  • LICENSE
  • README

production

  • Role swh.deposit.api added to the user elife-production in keycloak
  • Collection added to the deposit [1]
  • Deposit client information configured [2]

[1]

swhdeposit@moma:~$ swh deposit admin \
>   --config-file /etc/softwareheritage/deposit/server.yml \
>   --platform production \
>     user create \
>     --collection elife \
>     --username elife-production
Create collection 'elife'.
Collection 'elife' created.
Create user 'elife-production'.
User 'elife-production' created.

[2]

softwareheritage-deposit=> select username, d.* from deposit_client d inner join auth_user a on a.id = d.user_ptr_id where username='elife-production';
+------------------+-------------+-------------+----------------------------+----------------+
|     username     | user_ptr_id | collections |        provider_url        |     domain     |
+------------------+-------------+-------------+----------------------------+----------------+
| elife-production |           8 | {7}         | https://elife.stencila.io/ | elife.stencila |
+------------------+-------------+-------------+----------------------------+----------------+
(1 row)

Time: 18.249 ms