Skip to content

swap indexd for syfon#11

Merged
matthewpeterkort merged 4 commits into
developmentfrom
migrate/syfon
May 5, 2026
Merged

swap indexd for syfon#11
matthewpeterkort merged 4 commits into
developmentfrom
migrate/syfon

Conversation

@matthewpeterkort
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bba51b0761

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +38 to +39
access_id = access_method.get("access_id") or access_method.get("type")
if not access_id:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Handle access_url-only methods without forging access_id

This path treats type as a fallback access_id and then calls /objects/{id}/access/{access_id}; for valid DRS objects that provide a direct access_url but no access_id, that call will fail (typically 404) even though a usable URL already exists in the object. This turns otherwise retrievable files into hard failures, so the code should use the existing access_url when present instead of fabricating an access_id from type.

Useful? React with 👍 / 👎.

Comment on lines +34 to +37
source_access_url = access_methods[0].get("access_url") or {}
source_url = source_access_url.get("url")
if not source_url:
raise HTTPException(status_code=500, detail=f"Could not find source URL within {source_record}")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Select a usable access method instead of hard-coding index 0

The redirect builder assumes access_methods[0] contains an access_url for the source OME-TIFF and returns 500 if it does not; with multi-method DRS objects, the first entry is not guaranteed to be the one with the needed URL, so valid objects can fail purely due to method ordering. Iterating methods to find a matching source URL (or deriving from signed access response) avoids these false failures.

Useful? React with 👍 / 👎.

@matthewpeterkort matthewpeterkort requested a review from bwalsh May 5, 2026 20:08
Copy link
Copy Markdown
Collaborator

@bwalsh bwalsh left a comment

Choose a reason for hiding this comment

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

LGTM

@matthewpeterkort matthewpeterkort merged commit c4c5055 into development May 5, 2026
1 check passed
@matthewpeterkort matthewpeterkort deleted the migrate/syfon branch May 5, 2026 21:42
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.

2 participants