Skip to content

The default coll parameter to assets is the database name#6176

Merged
acwhite211 merged 12 commits intoproductionfrom
issue-6160
Apr 18, 2025
Merged

The default coll parameter to assets is the database name#6176
acwhite211 merged 12 commits intoproductionfrom
issue-6160

Conversation

@acwhite211
Copy link
Copy Markdown
Member

@acwhite211 acwhite211 commented Jan 29, 2025

Fixes #6160

The default coll parameter to assets is the database name. This is determined when calling the /context/attachment_settings.json API endpoint, which call the assets_gw app view function get_settings. When setting the default coll parameter, it should be the database name in the settings, not a random collection name.

Checklist

  • Self-review the PR after opening it to make sure the changes look good and
    self-explanatory (or properly documented)

Testing instructions

  • Open assets page for an instances with attachments on the attachments server
  • See that all the attachments are fetched successfully

@acwhite211 acwhite211 marked this pull request as ready for review February 24, 2025 15:13
@acwhite211 acwhite211 requested a review from a team February 24, 2025 15:13
Triggered by 8dd149a on branch refs/heads/issue-6160
@CarolineDenis CarolineDenis requested review from a team and sharadsw February 24, 2025 17:07
Copy link
Copy Markdown
Contributor

@pashiav pashiav left a comment

Choose a reason for hiding this comment

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

  • See that all the attachments are fetched successfully

When uploading attachments, it gets interrupted and there is this weird timer:

issue-6160:
https://sp7demofish2924-issue-6160.test.specifysystems.org/specify/attachments/import/9

Screen.Recording.2025-02-24.at.1.23.33.PM.mov

production:
https://sp7demofish2924-production.test.specifysystems.org/specify/attachments/import/10

Screen.Recording.2025-02-24.at.1.24.07.PM.mov

Would this be considered to be within scope for this PR?

@pashiav pashiav requested a review from a team February 24, 2025 19:34
@acwhite211
Copy link
Copy Markdown
Member Author

There might be an issue with how this PR works on the test-panel. It seems to work locally. I'll investigate

@CarolineDenis CarolineDenis added this to the 7.10.3 milestone Mar 12, 2025
@CarolineDenis CarolineDenis requested a review from pashiav March 26, 2025 14:03
@acwhite211
Copy link
Copy Markdown
Member Author

The asset upload should work on the test panel now 👍

Copy link
Copy Markdown
Contributor

@pashiav pashiav left a comment

Choose a reason for hiding this comment

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

  • See that all the attachments are fetched successfully

Looks good!

Issue from #6176 (review):

When uploading attachments, it gets interrupted and there is this weird timer:

✅ Fixed! Attachment upload working as expected.

@pashiav pashiav requested a review from a team April 14, 2025 14:16
Copy link
Copy Markdown
Collaborator

@combs-a combs-a left a comment

Choose a reason for hiding this comment

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

  • See that all the attachments are fetched successfully

image

Trying this on the test panel with the database from the original issue, looks like coll is being set to sp7demofish in both production and here. Is this just a test panel issue?

I am having some issues recreating the issue itself--the first 2 pictures, I uploaded myself on production and have no issues there or here with fetching. Their filename is the GUID and it matches, but for the others, it seems that the filename doesn't match. Not sure if that's the root cause, but since the pictures also use sp7demofish as coll, I'm not sure.

image

@github-project-automation github-project-automation Bot moved this from 📋Back Log to Dev Attention Needed in General Tester Board Apr 14, 2025
@CarolineDenis CarolineDenis requested a review from a team April 15, 2025 13:57
@acwhite211
Copy link
Copy Markdown
Member Author

acwhite211 commented Apr 16, 2025

Looks like when running entomologiamnrj_2025_02_10, the test-panel is configuring the asset server collection parameter to the default sp7demofish. This is just due to entomologiamnrj_2025_02_10 not being on the test-assets server.

Try testing this PR on sp7demofish. I'll setup a correctly configured test-panel instance for another database.

EDIT: Looks like sp7demofish is the only one directory on the test-asset server populated with files, so sp7demofish is the only database that can be used on the test panel to test this PR.

@acwhite211 acwhite211 requested a review from combs-a April 17, 2025 04:32
Copy link
Copy Markdown
Collaborator

@combs-a combs-a left a comment

Choose a reason for hiding this comment

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

  • See that all the attachments are fetched successfully

Testing it on test panel w/ sp7demofish_eu--while the thumbnails were fetched regardless of branch, there was an error on production but not in this branch. Looks like it's working from what I can tell.

@acwhite211 acwhite211 merged commit 7709e75 into production Apr 18, 2025
12 checks passed
@github-project-automation github-project-automation Bot moved this from Dev Attention Needed to ✅Done in General Tester Board Apr 18, 2025
@acwhite211 acwhite211 deleted the issue-6160 branch April 18, 2025 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅Done

Development

Successfully merging this pull request may close these issues.

Wrong param in asset URL creation in SP7

5 participants