Skip to content

Commit cb36287

Browse files
cacama-valvatadetjensrobert
authored andcommitted
cleaning up & addressing robert's feedback in the old branch/PR
1 parent cbe9e94 commit cb36287

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/asset_files/rcds.yaml.j2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ points: {% for pts in options.points %}
1818
min: {{ pts.min }}
1919
max: {{ pts.max }}
2020
{% endfor %}
21-
# TODO
21+
# TODO: templatize the deploy section
2222
deploy:
2323
# control challenge deployment status explicitly per environment/profile
2424
testing:
@@ -31,6 +31,7 @@ profiles: {% for prof in options.profiles %}
3131
frontend_url: {{ prof.frontend_url }}
3232
frontend_token: {{ prof.frontend_token }}
3333
challenges_domain: {{ prof.challenges_domain }}
34+
# TODO: kubeconfig
3435
kubecontext: {{ prof.kubecontext }}
3536
s3:
3637
bucket_name: {{ prof.s3_bucket_name }}

src/init/mod.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,7 @@ pub fn interactive_init() -> inquire::error::InquireResult<InitVars> {
6161

6262
let options = InitVars {
6363
flag_regex: {
64-
//TODO:
65-
// - also provide regex examples in help
66-
// - is this even a good idea to have the user provide the regex
67-
// - what kind of regex is being validated and accepted
64+
//TODO: what flavor of regex is being validated and accepted
6865
inquire::Text::new("Flag regex:")
6966
.with_help_message("This regex will be used to validate the individual flags of your challenges later.")
7067
.with_placeholder(example_values::FLAG_REGEX)
@@ -101,7 +98,6 @@ pub fn interactive_init() -> inquire::error::InquireResult<InitVars> {
10198
.prompt()?
10299
},
103100

104-
// TODO: would the cluster not use a token of some sort?
105101
registry_cluster_pass: {
106102
inquire::Password::new("Container registry 'cluster' password:")
107103
.with_help_message("The password to the 'cluster' user account")
@@ -126,7 +122,6 @@ pub fn interactive_init() -> inquire::error::InquireResult<InitVars> {
126122
.with_placeholder(example_values::POINTS_DIFFICULTY)
127123
.prompt()?
128124
},
129-
// TODO: support static-point challenges
130125
min: {
131126
inquire::CustomType::<u64>::new("Minimum points:")
132127
.with_error_message("Please type a valid number.") // default parser calls std::u64::from_str
@@ -310,7 +305,7 @@ pub fn blank_init() -> InitVars {
310305

311306
pub fn example_init() -> InitVars {
312307
return InitVars {
313-
flag_regex: String::from(example_values::FLAG_REGEX), // TODO: do that wildcard in the most common regex flavor since Rust regex supports multiple styles
308+
flag_regex: String::from(example_values::FLAG_REGEX),
314309
registry_domain: String::from(example_values::REGISTRY_DOMAIN),
315310
registry_build_user: String::from(example_values::REGISTRY_BUILD_USER),
316311
registry_build_pass: String::from(example_values::REGISTRY_BUILD_PASS),

0 commit comments

Comments
 (0)