Skip to content

Commit

Permalink
Fix len (#415)
Browse files Browse the repository at this point in the history
* Fix len

* Use newer version of toolchain
  • Loading branch information
ianoc authored Oct 29, 2024
1 parent 3fd50d0 commit 2dd2c08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Install Protoc
uses: arduino/setup-protoc@v1
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions-rs/toolchain@v1
Expand Down
13 changes: 4 additions & 9 deletions app/pusher_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ async fn main() -> Result<(), anyhow::Error> {
let tmp_config = tempfile::NamedTempFile::new()?;
config.write_file(tmp_config.path())?;
let config_path: PathBuf = tmp_config.path().to_path_buf();
let (config_sha, config_sha_len) = Sha256Value::from_path(&config_path).await?;
let config_sha_printed = format!("sha256:{}", config_sha);
manifest.config.digest = config_sha_printed.clone();
let (config_sha, config_len) = Sha256Value::from_path(&config_path).await?;
manifest.update_config(config_sha, config_len);
let config_sha_printed = manifest.config.digest.clone();

let mut local_digests: HashMap<String, PathBuf> = HashMap::default();
for local_data in upload_metadata.layer_configs.iter() {
Expand Down Expand Up @@ -247,12 +247,7 @@ async fn main() -> Result<(), anyhow::Error> {
Ok(true) => Ok(ActionsTaken::default()),
Err(e) => Err(e),
Ok(false) => destination_registry
.upload_blob(
&config_path,
&config_sha_printed,
config_sha_len.0 as u64,
None,
)
.upload_blob(&config_path, &config_sha_printed, config_len.0 as u64, None)
.await
.map(|_| ActionsTaken::default()),
}
Expand Down

0 comments on commit 2dd2c08

Please sign in to comment.