Failure to configure Local Repositories correctly and in detail #142

Closed
opened 2024-05-22 15:22:51 +02:00 by william · 7 comments

I've set up the extensions-website on a LAN for my own use only, and can access the web pages via 192.168.5.109:8111, but I can't get it to recognize it properly when I try to add a Repository in the latest beta version of blender 4.2alpha.
Info Log.
sync: invalid manifest (Error at index 1: key “archive_hash” invalid: Must use a prefix in [“sha256”], found 'fakehash') reading 'http://192.168.5.109:8111'!

I've set up the extensions-website on a LAN for my own use only, and can access the web pages via 192.168.5.109:8111, but I can't get it to recognize it properly when I try to add a Repository in the latest beta version of blender 4.2alpha. Info Log. sync: invalid manifest (Error at index 1: key “archive_hash” invalid: Must use a prefix in [“sha256”], found 'fakehash') reading 'http://192.168.5.109:8111'!

Can you share the result of /api/v1/swagger?

For reference you can compare the result with the official site:
https://extensions.blender.org/api/v1/swagger/#/extensions/

Also you will want to include /api/v1/ to your url (just see what blender itself uses and copy it)

Can you share the result of <your-server>/api/v1/swagger? For reference you can compare the result with the official site: https://extensions.blender.org/api/v1/swagger/#/extensions/ Also you will want to include /api/v1/ to your url (just see what blender itself uses and copy it)
Author

"default swagger.png" is 'http://192.168.5.109:8111/api/v1/swagger/#/extensions/' default page.
"new error.png" is I got a new error after pasting the new URL into the input box.

"default swagger.png" is 'http://192.168.5.109:8111/api/v1/swagger/#/extensions/' default page. "new error.png" is I got a new error after pasting the new URL into the input box.
Author

Thank you for your hard work and that of the other developers!

I tried to enter more parameters to the "extensions_retrieve" page form by using the “Try it out” button, with "blender_version"="4.2.0" and "platform"="windows-amd64"

After clicking the Execute button, a comparison between the generated “Response headers” content and the content on “extensions.blender.org/api/v1/swagger/” revealed some missing items.->"miss_item.png"

Thank you for your hard work and that of the other developers! I tried to enter more parameters to the "extensions_retrieve" page form by using the “Try it out” button, with "blender_version"="4.2.0" and "platform"="windows-amd64" After clicking the Execute button, a comparison between the generated “Response headers” content and the content on “extensions.blender.org/api/v1/swagger/” revealed some missing items.->"miss_item.png"
Owner

If I understand correctly, you are trying to use a development instance of the extensions-website locally.
It looks like you've used the ./manage.py generate_fake_data command that populated your local db with some fake data, including the entries with fakehash.

We probably should improve the quality of the garbage data this command puts in the db to make this end-to-end testing easier.
Until this is done, you can clean up the db by removing (or renaming for a backup) the db.sqlite3 file in the root of your website checkout, and then running the commands from README.md, but skipping the generate_fake_data one.

This will result in an empty extensions repository. You should be able to use the website to upload your test extensions.

Alternatively, you can update the data using /admin/ page of the website (username admin, password admin) by setting statuses of all extensions to something other than Approved.

Hope this helps!

If I understand correctly, you are trying to use a development instance of the extensions-website locally. It looks like you've used the `./manage.py generate_fake_data` command that populated your local db with some fake data, including the entries with `fakehash`. We probably should improve the quality of the garbage data this command puts in the db to make this end-to-end testing easier. Until this is done, you can clean up the db by removing (or renaming for a backup) the `db.sqlite3` file in the root of your website checkout, and then running the commands from README.md, but skipping the generate_fake_data one. This will result in an empty extensions repository. You should be able to use the website to upload your test extensions. Alternatively, you can update the data using `/admin`/ page of the website (username `admin`, password `admin`) by setting statuses of all extensions to something other than `Approved`. Hope this helps!
Author

Thank you for patiently answering my questions. :)
After following your method, Blender can now synchronize the extension repository with the local URL!
Sync complete info.png

Thank you for patiently answering my questions. :) After following your method, Blender can now synchronize the extension repository with the local URL! ![Sync complete info.png](/attachments/34c4e063-58af-41d0-96e9-b69a821dc9ac)
Owner

From your screenshot I see that the only version is in "Awaiting review" status - it's likely that the extension is not listed because of this.

Generally, using admin it's possible to arrive at a logically inconsistent state of the data, and some combinations of object statuses that you can set manually won't be possible in a real workflow. If you want to emulate the real workflow, please create a moderator user (assign moderators group in admin › Authentication and authorization › Users) and use the approval queue UI.

One other potential reason is that currently we use an in-memory cache of the home page, so you would have to either wait for 1 minute to see the recent updates, or to restart the dev server. We may get rid of this cache in the future if the production performance will be acceptable.

From your screenshot I see that the only version is in "Awaiting review" status - it's likely that the extension is not listed because of this. Generally, using admin it's possible to arrive at a logically inconsistent state of the data, and some combinations of object statuses that you can set manually won't be possible in a real workflow. If you want to emulate the real workflow, please create a moderator user (assign moderators group in admin › Authentication and authorization › Users) and use the approval queue UI. One other potential reason is that currently we use an in-memory cache of the home page, so you would have to either wait for 1 minute to see the recent updates, or to restart the dev server. We may get rid of this cache in the future if the production performance will be acceptable.
Author

Sorry! I deleted the post because I didn't refresh to see your reply!

Sorry! I deleted the post because I didn't refresh to see your reply!
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: infrastructure/extensions-website#142
No description provided.