Fix permissions in example configs #579

Open
opened 2023-08-08 17:28:51 +00:00 by fyrchik · 1 comment

According to YAML spec octal numbers should start with '0o' (see "changes in version 1.2): https://yaml.org/spec/1.2.2/ext/changes/

Viper supports 1.2 (via go-yaml.v3) but currently violates the spec because of the backwards compatibility:
f6f7691b1f/resolve.go (L233)
f6f7691b1f/resolve.go (L200)

There is not much we could do for validation (viper "just reads" the yaml, all conversions are done afterwards), but we can at least fix the example: either use 0o644 or '0644'.

This could've been such a tasty bug during some future updrade, lucky for us our deployments use string currently.

According to YAML spec octal numbers should start with '0o' (see "changes in version 1.2): https://yaml.org/spec/1.2.2/ext/changes/ Viper supports 1.2 (via go-yaml.v3) but currently violates the spec because of the backwards compatibility: https://github.com/go-yaml/yaml/blob/f6f7691b1fdeb513f56608cd2c32c51f8194bf51/resolve.go#L233 https://github.com/go-yaml/yaml/blob/f6f7691b1fdeb513f56608cd2c32c51f8194bf51/resolve.go#L200 There is not much we could do for validation (viper "just reads" the yaml, all conversions are done afterwards), but we can at least fix the example: either use `0o644` or `'0644'`. This could've been such a tasty bug during some future updrade, lucky for us our deployments use `string` currently.
fyrchik added the
frostfs-node
good first issue
P3
triage
labels 2023-08-08 17:28:51 +00:00
Poster
Owner

Actually, I believe '0o644' is the only future-proof valid option now, unless we cast it to string on our side.

Actually, I believe '0o644' is the only future-proof valid option now, unless we cast it to string on our side.
fyrchik added this to the vNext milestone 2023-08-10 08:01:34 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#579
There is no content yet.