Page MenuHomePhabricator

[identity] let clap handle parsing env var to vec
ClosedPublic

Authored by varun on Mar 5 2024, 3:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 10, 12:16 PM
Unknown Object (File)
Thu, Oct 10, 12:16 PM
Unknown Object (File)
Thu, Oct 10, 12:15 PM
Unknown Object (File)
Thu, Oct 10, 11:33 AM
Unknown Object (File)
Sep 7 2024, 11:05 AM
Unknown Object (File)
Sep 6 2024, 11:55 PM
Unknown Object (File)
Sep 6 2024, 11:55 PM
Unknown Object (File)
Sep 6 2024, 10:41 PM
Subscribers

Details

Summary

rather than split the string ourselves, we can let clap handle this

Depends on D11250

Test Plan

tested on staging -- origins were parsed correctly and validated, only the listed origins were allowed

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

varun requested review of this revision.Mar 5 2024, 3:52 PM
bartek added inline comments.
services/identity/src/config.rs
110–111 ↗(On Diff #37868)

We shouldn't have to clone when we only want a slice.

Also, not sure if my suggestion works without doing .map(|s| vec_to_allow_origin(s.as_slice()))

192 ↗(On Diff #37868)

Technically we should use slices

This revision is now accepted and ready to land.Mar 6 2024, 3:55 AM