Skip to content

Fix image deploy#105

Closed
afbase wants to merge 3 commits into
blacksky-algorithms:mainfrom
afbase:fix-image-deploy
Closed

Fix image deploy#105
afbase wants to merge 3 commits into
blacksky-algorithms:mainfrom
afbase:fix-image-deploy

Conversation

@afbase

@afbase afbase commented May 14, 2025

Copy link
Copy Markdown
Collaborator

Summary

  1. update rsky-pds dockerfile to optimize layering trick the @TheRipperoni suggested
  2. update rsky-pds dockerfile to use a debian running image inspired by the rust dockerhub documentation
  3. fix the cid package dependency mismatch in firehose:
❯  cargo check -p rsky-firehose
    Checking rsky-firehose v0.2.0 (/Users/clint/src/bsky-code/rsky/rsky-firehose)
error[E0308]: mismatched types
   --> rsky-firehose/src/main.rs:146:88
    |
146 | ...                   let record_reader = Cursor::new(car_blocks.get(&cid).unwrap());
    |                                                                  --- ^^^^ expected `&CidGeneric<64>`, found `&Cid<64>`
    |                                                                  |
    |                                                                  arguments to this method are incorrect
    |
note: two different versions of crate `cid` are being used; two types coming from two different versions of the same crate are different types even if they look the same
   --> /Users/clint/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cid-0.11.1/src/cid.rs:70:1
    |
70  | pub struct Cid<const S: usize> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is the found type `cid::cid::Cid`
    |
   ::: /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cid-0.10.1/src/cid.rs:67:1
    |
67  | pub struct Cid<const S: usize> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is the expected type `CidGeneric`
    |
   ::: rsky-firehose/src/main.rs:5:5
    |
5   | use libipld::Cid;
    |     ------- one version of crate `cid` used here, as a dependency of crate `libipld_core`
6   | use rsky_lexicon::app::bsky::feed::like::Like;
    |     ------------ one version of crate `cid` used here, as a dependency of crate `rsky_lexicon`
    = help: you can use `cargo tree` to explore your dependency tree
note: method defined here
   --> /Users/user/.rustup/toolchains/nightly-2025-01-03-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/collections/hash/map.rs:897:12
    |
897 |     pub fn get<Q: ?Sized>(&self, k: &Q) -> Option<&V>
    |            ^^^

For more information about this error, try `rustc --explain E0308`.
error: could not compile `rsky-firehose` (bin "rsky-firehose") due to 1 previous error

Changes

  • Feature implementation
  • Bug fix

afbase added 3 commits May 14, 2025 16:30
…libipld.

2. update pds dockerfile to borrow layering trick
3. tweak the workflow file for better description

@rudyfraser rudyfraser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for those specific versions for Multihash and cid? Just wanna make sure I understand why we can't be on the latest version of those crates

@afbase

afbase commented May 15, 2025

Copy link
Copy Markdown
Collaborator Author

Any reason for those specific versions for Multihash and cid? Just wanna make sure I understand why we can't be on the latest version of those crates

there is a dependency issue mismatch as libipld refers to older versions of cid and multihash. an ipld maintainer mentioned ipld-core is the library to migrate to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants