https://linen.dev logo
Join Discord
Powered by
# mirrord-dev
  • m

    meowchinist

    04/04/2024, 4:16 PM
    I vaguely remember issues with
    0.0.0.0
    address
  • a

    Aviram Hassan

    04/04/2024, 4:20 PM
    at this point I think this is test issue
  • a

    Aviram Hassan

    04/04/2024, 4:22 PM
    ok its not
  • a

    Aviram Hassan

    04/04/2024, 4:22 PM
    but wtf
  • m

    meowchinist

    04/04/2024, 4:22 PM
    ?
  • a

    Aviram Hassan

    04/04/2024, 4:31 PM
    still fails 😭
  • m

    meowchinist

    04/04/2024, 4:32 PM
    only the integration?
  • m

    meowchinist

    04/04/2024, 4:32 PM
    I tried searching for why we did this, but can't find it
  • a

    Aviram Hassan

    04/04/2024, 4:32 PM
    like
  • a

    Aviram Hassan

    04/04/2024, 4:32 PM
    it's not even for listening socket, it's for connection
  • a

    Aviram Hassan

    04/04/2024, 4:32 PM
    the connection isn't the remote one somehow
  • a

    Aviram Hassan

    04/04/2024, 4:32 PM
    can't understand how the f it affects 😐
  • i

    infiniteregrets

    05/13/2024, 5:14 PM
    I am looking for some rusty/functional ideas to refactor a bit of my code. I have a vector of Strings and I would like do some checks and if it doesnt satisfy i wanna return None and if it does I'd like to mutate it. What is the best way to frame this in more sort of a functional style I cant seem to find a way to return on failure of a condition with chaining of map, filter etc..
    Copy code
    rs
    fn parse_item_struct(item: syn::ItemStruct) -> Option<PartialType> {
        let mut docs = docs_from_attributes(item.attrs);
    
        if docs.is_empty() {
            return None;
        }
    
        for doc in docs.iter_mut() {
            // removes docs that we don't want in `configuration.md`
            if doc.contains(r"<!--${internal}-->") {
                return None;
            }
    
            // `trim` is too aggressive, we just want to remove 1 whitespace
            if doc.starts_with(' ') {
                doc.remove(0);
            }
        }
    
        docs.push("\n".to_string());
    
        let fields = item
            .fields
            .into_iter()
            .filter_map(PartialField::new)
            .collect::<BTreeSet<_>>();
    
        // We only care about types that have docs.
        (!fields.is_empty()).then(|| PartialType {
            ident: item.ident.to_string(),
            docs: docs,
            fields,
        })
    }
    concerned part:
    Copy code
    rs
        let mut docs = docs_from_attributes(item.attrs);
    
        if docs.is_empty() {
            return None;
        }
    
        for doc in docs.iter_mut() {
    
            if doc.contains(r"<!--${internal}-->") {
                return None;
            }
    
            if doc.starts_with(' ') {
                doc.remove(0);
            }
        }
    
        docs.push("\n".to_string());
  • i

    infiniteregrets

    05/13/2024, 5:16 PM
    would love any ideas, i can use filter to remove any docs that are internal but I cant find a way to exit out of the function with a None
  • m

    meowchinist

    05/13/2024, 5:21 PM
    https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.try_collect
  • m

    meowchinist

    05/13/2024, 5:21 PM
    or one of the others
    try_
    in iterator?
  • i

    infiniteregrets

    05/13/2024, 5:27 PM
    I see yeah I think this is it
  • i

    infiniteregrets

    05/13/2024, 5:27 PM
    Thanks
  • i

    infiniteregrets

    06/14/2024, 3:33 PM
    is the multiline progress still an issue? progress switched to indicatif, but does it work when you have a line with multiple
    \n
    ?
  • i

    infiniteregrets

    06/14/2024, 3:34 PM
    i fixed the issue with termspin here: https://github.com/tamasfe/termspin/pull/2/files
  • i

    infiniteregrets

    06/14/2024, 3:35 PM
    so i believe if we have a deployment warning, it can be propapagted through the same function which reports to cli and json
  • i

    infiniteregrets

    06/14/2024, 4:15 PM
    also fixed the oversized lines in relation to tty size. I am referring to this piece of code here - the ide message and cli message being duplicated and multiple prints:
    Copy code
    rs
    progress.print( "When targeting multi-pod deployments, mirrord impersonates the first pod in the deployment.");
            progress.print("Support for multi-pod impersonation requires the mirrord operator, which is part of mirrord for Teams.");
            progress.print("You can get started with mirrord for Teams at this link: https://mirrord.dev/docs/overview/teams/");
    https://github.com/metalbear-co/mirrord/blob/acf6539aa22ee690e64a061dc8a4893279778c45/mirrord/cli/src/connection.rs#L116 if anyone's interested to look into this, hmu
  • w

    waveywaves.

    11/27/2024, 12:47 PM
    https://github.com/metalbear-co/mirrord/pull/2939 opened my first draft PR to mirrord for a very small change. This is my very first Rust contribution 🀩
  • w

    waveywaves.

    01/27/2025, 6:52 PM
    This is ready for review (took 2 months because I forgot about it)
  • w

    waveywaves.

    02/11/2025, 7:00 AM
    https://github.com/metalbear-co/mirrord.dev/pull/402 typo in docs
  • w

    waveywaves.

    03/10/2025, 7:24 AM
    hi mirrord devs, is this a good representation of how the operator works wrt to orchestrating kafka topics for queue_splitting ? https://cdn.discordapp.com/attachments/950020391684952125/1348557224422670406/Screenshot_2025-03-10_at_12.52.13_PM.png?ex=67cfe549&is=67ce93c9&hm=74c94bc9ca92c17128e1ceca877c69b3b35c5b0ef704f741bca3c7d7d5b085ac&
  • a

    Aviram Hassan

    03/10/2025, 7:27 AM
    why is there a kubectl port forward?
  • a

    Aviram Hassan

    03/10/2025, 7:28 AM
    but in general yes πŸ™‚
  • w

    waveywaves.

    03/10/2025, 7:39 AM
    this specific example has a UI for the producer where the user can send messages, the UI can be accessed with port-forwarding
  • use `mirrord port-forward` πŸ™‚
    a

    Aviram Hassan

    03/10/2025, 7:46 AM
    use
    mirrord port-forward
    πŸ™‚
    w
    g
    • 3
    • 32