Skip to content

Commit 0ebb8df

Browse files
committed
document error conditions in deploy functions
1 parent 41576de commit 0ebb8df

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/deploy/mod.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,13 @@ pub async fn check_setup(profile: &ProfileConfig) -> Result<()> {
114114

115115
/// Deploy and upload all components of all challenges in `build_results`.
116116
///
117+
/// # Errors
118+
/// If any challenge deployment(s) error, the first error will be
119+
/// returned.
120+
///
117121
/// # Panics
118-
/// The attempt to write challenge info may panic if the md_lock
119-
/// is already held by the current thread when acquiring the lock.
120-
/// This should never actually happen because the lock isn't held
121-
/// across an await point.
122+
/// Acquiring the mutex lock should never actually happen because the lock
123+
/// isn't held across an await point.
122124
pub async fn deploy_challenges(
123125
profile_name: &str,
124126
build_results: &[(&ChallengeConfig, BuildResult)],
@@ -146,6 +148,12 @@ pub async fn deploy_challenges(
146148
}
147149

148150
/// Deploy / upload all components of a single challenge.
151+
///
152+
/// # Errors
153+
/// The first error is returned from (in order):
154+
/// 1. kubernetes manifest application
155+
/// 2. asset uploads
156+
/// 3. updating challenge info in the frontend application
149157
async fn deploy_single_challenge(
150158
profile_name: &str,
151159
chal: &ChallengeConfig,

0 commit comments

Comments
 (0)