Skip to content

Commit

Permalink
Merge branch 'issue3185' of https://github.com/djmitche/taskwarrior i…
Browse files Browse the repository at this point in the history
…nto issue3185
  • Loading branch information
djmitche committed Dec 27, 2023
2 parents 14dc40b + ec5332c commit b055c1b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 14 deletions.
10 changes: 5 additions & 5 deletions doc/man/task-sync.5.in
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ periodically, such as via
Taskwarrior provides several options for synchronizing your tasks:

- To a server specifically designed to handle Taskwarrior data.
- To a cloud service such as GCP or AWS.
+ To a cloud storage provider. Currently only GCP is supported.
- To a local, on-disk file.

.SS Sync Server
Expand Down Expand Up @@ -74,12 +74,12 @@ Configure Taskwarrior with these details:

To synchronize your tasks to GCP, use the GCP Console to create a new project,
and within that project a new Cloud Storage bucket. The default settings for
the bucket are adequete.
the bucket are adequate.

Authenticate to the project with
Authenticate to the project with:

gcloud config set project $PROJECT_NAME
gcloud auth application-default login
$ gcloud config set project $PROJECT_NAME
$ gcloud auth application-default login

Then configure Taskwarrior with:

Expand Down
2 changes: 1 addition & 1 deletion taskchampion/docs/src/encryption.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Encryption is not used for local (on-disk) sync, but is used for all cases where
## Key Derivation

The client derives the 32-byte encryption key from the configured encryption secret using PBKDF2 with HMAC-SHA256 and 100,000 iterations.
The salt value depends on the implemenation of the protocol, as described in subsequent chapters.
The salt value depends on the implementation of the protocol, as described in subsequent chapters.

## Encryption

Expand Down
2 changes: 1 addition & 1 deletion taskchampion/docs/src/object-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ TaskChampion also supports use of a generic key-value store to synchronize repli

In this case, the salt used in key derivation is the SHA256 hash of the string "TaskChampion".

The details of the mapping from this protocol to keys an values are private to the implementation.
The details of the mapping from this protocol to keys and values are private to the implementation.
Other applications should not access the key-value store directly.
9 changes: 3 additions & 6 deletions taskchampion/taskchampion/src/server/cloud/gcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ impl Service for GcpService {
if existing_value.is_some() {
return Ok(false);
}
// Generation 0 indicates that the upload should succeed only if the object does not
// exist.
// Generation 0 indicates that the object does not yet exist.
0
} else {
get_res?.generation
Expand Down Expand Up @@ -290,7 +289,6 @@ mod tests {
return;
};

// Clean up.
svc.del(&pfx("testy")).unwrap();
}

Expand All @@ -308,8 +306,8 @@ mod tests {
// And another object that should not be included in the list.
svc.put(&pfx("xxx"), b"data").unwrap();

let got_names: Vec<_> = svc.list(&pfx("pp-")).collect::<Result<_>>().unwrap();
let mut got_names: Vec<_> = got_names.into_iter().map(|oi| oi.name).collect();
let got_objects: Vec<_> = svc.list(&pfx("pp-")).collect::<Result<_>>().unwrap();
let mut got_names: Vec<_> = got_objects.into_iter().map(|oi| oi.name).collect();
got_names.sort();
assert_eq!(got_names, names);

Expand Down Expand Up @@ -361,7 +359,6 @@ mod tests {
return;
};

// Create the existing file, with two generations.
svc.put(&pfx("testy"), b"foo1").unwrap();
assert!(!svc
.compare_and_swap(&pfx("testy"), None, b"bar".to_vec())
Expand Down
2 changes: 1 addition & 1 deletion taskchampion/taskchampion/src/server/cloud/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ impl<SVC: Service> CloudServer<SVC> {
.collect::<Result<Vec<_>>>()
}

/// Determine the snapshot urgency. This is done probabalistically:
/// Determine the snapshot urgency. This is done probabilistically:
/// - High urgency approximately 1% of the time.
/// - Low urgecny approximately 10% of the time.
fn snapshot_urgency(&self) -> Result<SnapshotUrgency> {
Expand Down

0 comments on commit b055c1b

Please sign in to comment.