Skip to content

Remove deprecated pict from user profile - #5538

Open
VeryMilkyJoe wants to merge 6 commits into
developfrom
WPB-20532-remove-deprecated-pict-from-user-profile
Open

VeryMilkyJoe wants to merge 6 commits into
developfrom
WPB-20532-remove-deprecated-pict-from-user-profile

Conversation

@VeryMilkyJoe

@VeryMilkyJoe VeryMilkyJoe commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Starting with V18, UserProfile does not contain profilePict anymore, while for older versions the old schema will still be produced.

Todo:

  • Add a test verifying, that we do not get a UserProfile json containing profilePict.in newer versions.
  • Update swagger docs?

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@VeryMilkyJoe
VeryMilkyJoe requested a review from a team as a code owner September 11, 2026 14:13
@VeryMilkyJoe
VeryMilkyJoe force-pushed the WPB-20532-remove-deprecated-pict-from-user-profile branch from 2599f55 to c61509b Compare September 14, 2026 11:08
@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Sep 14, 2026
@VeryMilkyJoe
VeryMilkyJoe force-pushed the WPB-20532-remove-deprecated-pict-from-user-profile branch from c61509b to 81d2a73 Compare September 14, 2026 15:17
Starting with V18, UserProfile does not contain profilePict anymore,
while for older versions the old schema will still be produced.
@VeryMilkyJoe
VeryMilkyJoe force-pushed the WPB-20532-remove-deprecated-pict-from-user-profile branch from 81d2a73 to c75fe89 Compare September 14, 2026 15:31
@VeryMilkyJoe VeryMilkyJoe added the ready-for-review looking actively for reviewer label Sep 14, 2026
@VeryMilkyJoe
VeryMilkyJoe requested review from a team as code owners September 14, 2026 15:37
:> "users"
:> QualifiedCaptureUserId "uid"
:> GetUserVerb
:> GetUserVerb 'V18

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.

I was wrong when we talked earlier: v18 has already been finalized, so you can't change it any more. Please 's/v17/v18/g && s/v18/v19/g' everywhere.

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.

Also, shouldn't you not have a version here, given that the instance you want to match isn't instance ToSchema (Versioned 'V18 UserProfile), but instance ToSchema UserProfile?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Isn't it the former I want to match?
I defined the toSchema instance as e.g. instance ToSchema (Versioned 'V18 UserProfile) or am I misunderstanding you?

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.

Sorry again, I saw the instance ToSchema UserProfile where that you didn't delete, and failed to see the V18 one.

So now that I squinted a little more at it everything makes sense, except that maybe the ToSchema UserProfile instance is redundant? And I wonder if I would prefer to keep UserProfile and remove V18-UserProfile, making the route look like before? after all it's not only v18, it's just everything from now on.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, that sounds very reasonable, thank you for the suggestion!

Comment thread integration/test/Test/User.hs

@fisx fisx 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.

One more nit that you can consider, but I think it's ready to merge as it is! 馃憤

case mVersion of
Just v
| v > V18 -> pure noPict
_ -> const noPict .= (field "picture" schema <|> pure noPict)

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.

I just realized that const noPict generates the wrong FromJSON instance: it reads the field, but ignores its contents and puts in noPict.

We're only interested in ToJSON really, and the pict field hasn't been used in forever. But I think it's a nice puzzle to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist ready-for-review looking actively for reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants