Make confined_target_dirs optional field in the MIRROR_SCHEMA
See original GitHub issueDescription of issue or feature request:
I was thinking about why confined_target_dirs
is not an optional field in the MIRROR_SCHEMA.
https://github.com/theupdateframework/tuf/blob/fdccb8dc0bf34e2b016ce20f1570e582dcd459e7/tuf/formats.py#L408
Given that ['']
matches everything and []
matches nothing this API can be confusing and lead to a mistake.
For me, it sounds more logical to not provide confined_target_dirs
list at all if I want to accept queries for all targets for that mirror and provide a list of confined_target_dirs
if it’s otherwise.
Current behavior:
confined_target_dirs
is a mandatory field in the MIRROR_SCHEMA.
Expected behavior:
confined_target_dirs
to be an optional field in the MIRROR_SCHEMA.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to parse XML files with optional fields in ADF?
I have a XML file where we need flattening. The problem is some fields in the XML are optional(as per XSD). The field...
Read more >Phing User Guide
Phing is used to "compile" the XML metadata into PHP arrays that can be processed without overhead by PHP scripts. Of course, XML...
Read more >Domain XML format - Libvirt
0 optional migratable attribute may be used to explicitly request such features to be removed from (on) or kept in (off) the virtual...
Read more >Administration Guide: SUSE Manager 4.1
OPTIONAL : Complete the SSL fields if your repository requires client certificate authentication. 6. Click [Create Repository] .
Read more >HIBERNATE - Relational Persistence for Idiomatic ... - JBoss.org
Declare accessors and mutators for persistent fields (optional) ... First, we'll create a simple console-based Hibernate application.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For backwards compatibility, we can make it optional for now, then remove it in a future major version release.
Do you @mnm678 and @trishankatdatadog think we can change the API for
confined_target_dirs
key in the MIRROR_SCHEMA? Instead of using['']
to allow all targets that we can change the documentation and check that ifconfined_target_dirs
does exist for MIRROR_SCHEMA and if it doesn’t it means that all targets are allowed.Of course, it’s good if we don’t remove the checks if
confined_target_dirs
is[]
because of possible clients using it the older way.