Skip to content

OpenConceptLab/ocl_online#881 | A write to an organization saves only what it changes - #1131

Open
paynejd wants to merge 4 commits into
OpenConceptLab/ocl_issues-2888-banner-uploadfrom
OpenConceptLab/ocl_online-881-org-saves
Open

paynejd wants to merge 4 commits into
OpenConceptLab/ocl_issues-2888-banner-uploadfrom
OpenConceptLab/ocl_online-881-org-saves

Conversation

@paynejd

@paynejd paynejd commented Dec 4, 2026

Copy link
Copy Markdown
Member

Ref OpenConceptLab/ocl_online#881. Stacked on #1129, which goes first.

  • Edits of an organization's own fields, overview, logo, extras and members save the fields they change, when, and (all but members) by whom. The new save_only does it, then reads the row back, so the response shows the organization as it is.
  • A logo upload does the same for an organization, a person, a source or a collection.
  • Joining or leaving an organization saves nothing else about the person.
  • A person's or organization's repositories follow its active status when a save includes that status.
  • With MinIO, the address of a logo or banner uses MINIO_EXTERNAL_ENDPOINT when it's set, as signed downloads do.

There's no migration and no new setting.

Tests: all pass, 4,308 without Elasticsearch and 815 with it, and pylint -j0 core/ exits 0.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AaZ4qWierCikGzbXQj3GN3

paynejd and others added 4 commits December 4, 2026 04:58
… what it changes

Edits of an organization's fields, overview, logo, extras and members save the fields they change (save_only). So does
a logo upload, for an organization, a person, a source or a collection, and it records who did it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWierCikGzbXQj3GN3
…ories follow its status only when that's saved

A save that names other fields leaves the repositories' status as it is. Editing an organization's extras records who
did it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWierCikGzbXQj3GN3
…IO_EXTERNAL_ENDPOINT

The address of a logo or banner is on the endpoint that browsers reach, as signed downloads already are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWierCikGzbXQj3GN3
…ves nothing else about the person

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWierCikGzbXQj3GN3
@paynejd

paynejd commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

Reviews: two Codex passes for defects (codex-cli 0.171.0), a Codex check of the commits made after them, a simplification review and a review of the access rules. The first pass led to 2943a31. Two P1s are declined, with the reasons on the ticket. Nothing was cut, and the last check is clean. The findings and answers are on OpenConceptLab/ocl_online#881.

@paynejd
paynejd requested a review from snyaggarwal December 4, 2026 10:10

@snyaggarwal snyaggarwal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approve. Merge order: after #1129, on which it's stacked (and so after #1116).

With the banner checkpoint: the overview serializer now asks set_banner only when overview is in the request, so a PATCH without it is a no-op and is never refused. That fixes the FC.1 case raised on #1116. Saving only overview means a concurrent rename or logo upload can't write back an older overview, which takes care of #1116's F1.2. An overview edit racing a banner removal can still keep the banner it loaded (#1116's F1.1, accepted). set_banner_image in #1129 still saves the row it loaded under its lock, so a full save there is correct.

Other checks

  • save_only saves the given fields plus updated_at (and updated_by when given), then reloads the row. The organization's own update drops public_access when it's the value it loaded, so an access change saved meanwhile stays. Tested for every organization route, and for joining and leaving.
  • propagate_owner_status returns early only when update_fields excludes is_active. soft_delete, undelete and deactivate do full saves, so status still propagates (tested both ways).
  • upload_base64_logo has one caller, BaseLogoView, which is updated. Repository logo saves now write only logo_path.
  • The MinIO change makes public_url_for agree with signed downloads. It also makes #1129's exact-address check consistent within one setup.

Already raised and answered on the ticket, and I agree: F1.2 (two concurrent edits of different extras), F1.3 (joining or leaving updates only the time), F1.6 (MinIO addresses of earlier uploads; no release has banner uploads).

Nit: the MinIO address fix is outside this PR's title. One line in the description would help whoever reads the release notes.

This branch has not been deployed

No deployments
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