Update clues dependency (#3933)

Pull in fix for double hashing some values

----

#### Does this PR need a docs update or release note?

- [ ]  Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [x]  No

#### Type of change

- [ ] 🌻 Feature
- [x] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [x] 🤖 Supportability/Tests
- [ ] 💻 CI/Deployment
- [x] 🧹 Tech Debt/Cleanup

#### Issue(s)

* #3895

#### Test Plan

- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
This commit is contained in:
ashmrtn 2023-07-28 13:46:49 -07:00 committed by GitHub
parent e0368ba45a
commit f672325193
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 11 additions and 22 deletions

View File

@ -6,7 +6,7 @@ replace github.com/kopia/kopia => github.com/alcionai/kopia v0.12.2-0.2023071323
require ( require (
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0
github.com/alcionai/clues v0.0.0-20230630194723-e24d7940e07a github.com/alcionai/clues v0.0.0-20230728164842-7dc4795a43e4
github.com/armon/go-metrics v0.4.1 github.com/armon/go-metrics v0.4.1
github.com/aws/aws-sdk-go v1.44.311 github.com/aws/aws-sdk-go v1.44.311
github.com/aws/aws-xray-sdk-go v1.8.1 github.com/aws/aws-xray-sdk-go v1.8.1

View File

@ -53,8 +53,8 @@ github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1o
github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4= github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4=
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8= github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8=
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo= github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo=
github.com/alcionai/clues v0.0.0-20230630194723-e24d7940e07a h1:mtJyeK/FhArTn06M5Lfgxk/GWnu8yqCGNN1BY16vjaA= github.com/alcionai/clues v0.0.0-20230728164842-7dc4795a43e4 h1:husF7eAYw2HEzgjfAmNy+ZLzyztJV2SyoUngSUo829Y=
github.com/alcionai/clues v0.0.0-20230630194723-e24d7940e07a/go.mod h1:MLEWSZ0cjEMg6hiGCRvE7AtrOhs7deBcm7ZrJBpfGRM= github.com/alcionai/clues v0.0.0-20230728164842-7dc4795a43e4/go.mod h1:MLEWSZ0cjEMg6hiGCRvE7AtrOhs7deBcm7ZrJBpfGRM=
github.com/alcionai/kopia v0.12.2-0.20230713235606-4c85869e9377 h1:w50/aVU+zRP5lvE86TSSCCYrrEyuXOlJA06R5RdTS8Y= github.com/alcionai/kopia v0.12.2-0.20230713235606-4c85869e9377 h1:w50/aVU+zRP5lvE86TSSCCYrrEyuXOlJA06R5RdTS8Y=
github.com/alcionai/kopia v0.12.2-0.20230713235606-4c85869e9377/go.mod h1:WH725ws0BYpZpTkVh4uqFHHPiiJuirl1Cm73jv5RYyA= github.com/alcionai/kopia v0.12.2-0.20230713235606-4c85869e9377/go.mod h1:WH725ws0BYpZpTkVh4uqFHHPiiJuirl1Cm73jv5RYyA=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=

View File

@ -78,6 +78,10 @@ func (u SafeURL) Format(fs fmt.State, _ rune) {
fmt.Fprint(fs, u.Conceal()) fmt.Fprint(fs, u.Conceal())
} }
func (u SafeURL) PlainString() string {
return u.URL
}
// String complies with Stringer to ensure the Conceal() version // String complies with Stringer to ensure the Conceal() version
// of the url is printed anytime it gets transformed to a string. // of the url is printed anytime it gets transformed to a string.
func (u SafeURL) String() string { func (u SafeURL) String() string {

View File

@ -563,8 +563,8 @@ func (b bulletf) String() string {
// observe progress bar. Logged values should only use // observe progress bar. Logged values should only use
// the fmt %v to ensure Concealers hide PII. // the fmt %v to ensure Concealers hide PII.
func plainString(v any) string { func plainString(v any) string {
if ps, ok := v.(clues.PlainStringer); ok { if c, ok := v.(clues.Concealer); ok {
return ps.PlainString() return c.PlainString()
} }
return fmt.Sprintf("%v", v) return fmt.Sprintf("%v", v)

View File

@ -107,10 +107,6 @@ var (
// interface compliance required for handling PII // interface compliance required for handling PII
_ clues.Concealer = &RestoreConfig{} _ clues.Concealer = &RestoreConfig{}
_ fmt.Stringer = &RestoreConfig{} _ fmt.Stringer = &RestoreConfig{}
// interface compliance for the observe package to display
// values without concealing PII.
_ clues.PlainStringer = &RestoreConfig{}
) )
func (rc RestoreConfig) marshal() string { func (rc RestoreConfig) marshal() string {

View File

@ -501,7 +501,7 @@ func suffixed(target, input string) bool {
// Printers and PII control // Printers and PII control
// ---------------------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------------------
var _ clues.PlainConcealer = &Filter{} var _ clues.Concealer = &Filter{}
var safeFilterValues = map[string]struct{}{"*": {}} var safeFilterValues = map[string]struct{}{"*": {}}

View File

@ -54,10 +54,6 @@ var (
// interface compliance required for handling PII // interface compliance required for handling PII
_ clues.Concealer = &Elements{} _ clues.Concealer = &Elements{}
_ fmt.Stringer = &Elements{} _ fmt.Stringer = &Elements{}
// interface compliance for the observe package to display
// values without concealing PII.
_ clues.PlainStringer = &Elements{}
) )
// Elements are a PII Concealer-compliant slice of elements within a path. // Elements are a PII Concealer-compliant slice of elements within a path.

View File

@ -120,10 +120,6 @@ type Path interface {
// is appropriately hidden from logging, errors, and other outputs. // is appropriately hidden from logging, errors, and other outputs.
clues.Concealer clues.Concealer
fmt.Stringer fmt.Stringer
// In the rare case that the path needs to get printed as a plain string,
// without obscuring values for PII.
clues.PlainStringer
} }
// interface compliance required for handling PII // interface compliance required for handling PII

View File

@ -153,9 +153,6 @@ type (
// Primarily to ensure that root- or mid-tier scopes (such as folders) // Primarily to ensure that root- or mid-tier scopes (such as folders)
// cascade 'Any' matching to more granular categories. // cascade 'Any' matching to more granular categories.
setDefaults() setDefaults()
// Scopes need to comply with PII printing controls.
clues.PlainConcealer
} }
// scopeT is the generic type interface of a scoper. // scopeT is the generic type interface of a scoper.
scopeT interface { scopeT interface {

View File

@ -341,7 +341,7 @@ func selectorAsIface[T any](s Selector) (T, error) {
// Stringers and Concealers // Stringers and Concealers
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
var _ clues.PlainConcealer = &Selector{} var _ clues.Concealer = &Selector{}
type loggableSelector struct { type loggableSelector struct {
Service service `json:"service,omitempty"` Service service `json:"service,omitempty"`