Cuda Version Compatibility

Hello, I notice that in your readme the cuda version is 11.6, so on my platform is 11.4, does it work for the code too?

Hi Charles,
I tested the code on several systems. I am quite confident that it will work. Make sure to install the correct dependencies.
Let me know if you need help!
Best,
Jonas


prevent float usage which fails to compile for cosmwasm

Feature Summary
Support cosmwasm.
Proposal
I used ibc-rs, and in latest version I get
12:54AM DBG invalid tx code=2 log="failed to execute message; message index: 0: Error calling the VM: Error compiling Wasm: Could not compile: WebAssembly translation error: Error in middleware Gatekeeper: Float operator detected: F64Load { memarg: MemoryImmediate { align: 3, offset: 0, memory: 0 } }. The use of floats is not supported.: create wasm contract failed" module=state
12:54AM INF executed block height=159 module=state num_invalid_txs=1 num_valid_txs=0

when it is part of contract.
I see old Cargo.lock
 "tendermint 0.31.1",
 "tendermint-light-client-verifier 0.31.1",
 "tendermint-proto 0.31.1",
 "dyn-clone",
 "erased-serde",
 "ibc-proto 0.30.0",
 "ics23 0.9.0",
 "ibc 0.41.0",

new
 "tendermint 0.32.2",
 "tendermint-light-client-verifier 0.32.2",
 "tendermint-proto 0.32.2",
 "ics23 0.10.1",
 "ibc-derive 0.1.0",
 "ibc-proto 0.32.0",
 "ics23 0.10.1",
informalsystems-pbjson

Also I found f64 usage in this repo when not needed.
So I do not use any things changed directly, and yet get issues.
Run
https://github.com/CosmWasm/cosmwasm/blob/main/packages/check/README.md
in CI.
I did not yet found root cause so.
Thing happend from 0.41 release inclusive and  before 0.43. I was able to upload contract.
I think not only cw wasmd will be such, but wasm-08 too.

I am trying to strip contract, if that works.

Okey, it was PrefixedDenom

pub(crate) fn calculate_block_delay(
    delay_period_time: &Duration,
    max_expected_time_per_block: &Duration,
) -> u64 {
    if max_expected_time_per_block.is_zero() {
        return 0;
    }

    FloatCore::ceil(delay_period_time.as_secs_f64() / max_expected_time_per_block.as_secs_f64())
        as u64
}

So such code if it runs in ics wasm-08 likely will not work.

I stably reproduce on my contact, but failed to repro on small contract. When I copy paste PrefixedDenom instead of ref,  check passes.

All contracts (1) passed checks!
bash-5.1$ nix run github:informalsystems/cosmos.nix#cosmwasm-check /home/dz/github.com/ComposableFi/composable/code/target/wasm32-unknown-unknown/cosmwasm-contracts/cw_xc_gateway.wasm
Available capabilities: {"stargate", "cosmwasm_1_1", "iterator", "staking", "cosmwasm_1_2"}

/home/dz/github.com/ComposableFi/composable/code/target/wasm32-unknown-unknown/cosmwasm-contracts/cw_xc_gateway.wasm: failure
Error compiling Wasm: Could not compile: WebAssembly translation error: Error in middleware Gatekeeper: Float operator detected: F64Load { memarg: MemoryImmediate { align: 3, offset: 8, memory: 0 } }. The use of floats is not supported.

Passes: 0, failures: 1
bash-5.1$ nix run github:informalsystems/cosmos.nix#cosmwasm-check /home/dz/github.com/ComposableFi/composable/code/target/wasm32-unknown-unknown/cosmwasm-contracts/cw_xc_gateway.wasm
Available capabilities: {"stargate", "cosmwasm_1_2", "iterator", "staking", "cosmwasm_1_1"}

/home/dz/github.com/ComposableFi/composable/code/target/wasm32-unknown-unknown/cosmwasm-contracts/cw_xc_gateway.wasm: pass

All contracts (1) passed checks!

The only differnece, I copied PrefixedDenom to our code. We use Channel/Port/Connect-Id, but when adding PrefixedDenom ref it breaks wasm.... Magic.

Added cw-check example https://github.com/dzmitry-lahoda-forks/ibc-rs/tree/dz/9/ci/cw-check . It still may be usefull to do this to ensure it can run in wasm hosts with no floats support (blockchains).

https://medium.com/cosmwasm/debugging-floating-point-generation-in-rust-wasm-smart-contract-f47d833b5fba
so ideally ibc-rs and its deps not to use usize

Thank you for bringing this to our attention! Very subtle...

this so works only on wasm https://github.com/chipshort/wasm-float-transpiler, not riskv or bpf or native float free.

Fixed in #894


Minor cleanup

The changes are good. But could you please re-create the pull request for the dev branch? Thanks a lot!


Pipeline stucks in "Scheduling"

Installed on EKS, Kubernetes 1.26, 4x t3.large instances, arroyo-0.5.
values.yaml:
outputDir: "/tmp/arroyo-test"

volumes:
  - name: checkpoints
    hostPath:
      path: /tmp/arroyo-test
      type: DirectoryOrCreate

volumeMounts:
  - name: checkpoints
    mountPath: /tmp/arroyo-test

Logs:
deployment.apps/arroyo-controller:
2023-08-21T09:49:59.016441Z  INFO arroyo_controller::states: starting state machine job_id="job_wHHzn9Ezp7"
2023-08-21T09:49:59.017458Z  INFO arroyo_controller::states: state transition job_id="job_wHHzn9Ezp7" from="Created" to="Compiling" duration_ms=0
2023-08-21T09:49:59.048036Z  INFO arroyo_controller::states::compiling: Compiling pipeline job_id="job_wHHzn9Ezp7" hash="kl7rbew88rogxeqk"
2023-08-21T09:49:59.048262Z  INFO arroyo_controller::compiler: Compiling remotely on http://arroyo-compiler:9000
2023-08-21T09:49:59.048363Z  INFO arroyo_controller::compiler: digraph {
    0 [ label = "finnhub_0:WebsocketSource<wss://ws.finnhub.io/?token=...>" ]
    1 [ label = "watermark_1:Watermark" ]
    2 [ label = "sink_web_2:WebSink" ]
    3 [ label = "fused_3:expression<sql_fused<value_project,value_project>:Record>" ]
    0 -> 1 [ label = "() → finnhub :: ArroyoJsonRoot" ]
    3 -> 2 [ label = "() → generated_struct_5412302300650363671" ]
    1 -> 3 [ label = "() → finnhub :: ArroyoJsonRoot" ]
}

2023-08-21T09:50:44.708458Z  INFO arroyo_controller::states: state transition job_id="job_wHHzn9Ezp7" from="Compiling" to="Scheduling" duration_ms=45690
2023-08-21T09:58:22.867727Z  INFO arroyo_controller::states: starting state machine job_id="job_37XrqB8Fd4"
2023-08-21T09:58:22.868857Z  INFO arroyo_controller::states: state transition job_id="job_37XrqB8Fd4" from="Created" to="Compiling" duration_ms=0
2023-08-21T09:58:22.891353Z  INFO arroyo_controller::states::compiling: Compiling pipeline job_id="job_37XrqB8Fd4" hash="yolstlaxxnxwf88j"
2023-08-21T09:58:22.891399Z  INFO arroyo_controller::compiler: Compiling remotely on http://arroyo-compiler:9000
2023-08-21T09:58:22.891520Z  INFO arroyo_controller::compiler: digraph {
    0 [ label = "finnhub_0:WebsocketSource<wss://ws.finnhub.io/?token=...>" ]
    1 [ label = "watermark_1:Watermark" ]
    2 [ label = "sink_web_2:WebSink" ]
    3 [ label = "fused_3:expression<sql_fused<value_project,value_project>:Record>" ]
    0 -> 1 [ label = "() → finnhub :: ArroyoJsonRoot" ]
    3 -> 2 [ label = "() → generated_struct_5412302300650363671" ]
    1 -> 3 [ label = "() → finnhub :: ArroyoJsonRoot" ]
}

2023-08-21T09:58:37.024947Z  INFO arroyo_controller::states: state transition job_id="job_37XrqB8Fd4" from="Compiling" to="Scheduling" duration_ms=14156
2023-08-21T10:00:44.750722Z ERROR arroyo_controller::states: retryable state error job_id="job_wHHzn9Ezp7" state="Scheduling" error_message="timed out while waiting for job to start" error="timed out after 600s while waiting for worker startup" retries=3
2023-08-21T10:08:37.068349Z ERROR arroyo_controller::states: retryable state error job_id="job_37XrqB8Fd4" state="Scheduling" error_message="timed out while waiting for job to start" error="timed out after 600s while waiting for worker startup" retries=3

replicaset.apps/arroyo-worker-job-zgfuyex3ab-1:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/main.rs:16:73
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/main.rs:16:73
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: JoinError::Panic(Id(1), ...)', src/main.rs:66:21

Hi @juchiast thanks for checking out Arroyo!
In Kubernetes, we use a very small worker image (built by this Dockerfile) which is responsible for downloading the pipeline binary from S3 or the filesystem and starting it. That (not very clear) error message is saying that it failed to find the binary.
I believe the issue here is with your helm configuration. You've configured everything to use local paths (/tmp/arroyo-test) which will work when running everything on a single node (like in minikube) but not on a distributed cluster.
Instead you will need to configure an S3 bucket to store the pipeline artifacts, like in https://doc.arroyo.dev/deployment/kubernetes#example-eks-configuration.
Happy to help you synchronously on Discord as well if that's easier!

Thanks! I suggest adding to the docs so that users will know local config won't work when running on EKS.
Btw, I had to manually set K8S_WORKER_SERVICE_ACCOUNT_NAME env var of arroyo-controller to make it work with s3.


SliverAppBar flexibleSpace with height depending on children

I have a SliverAppBar with a flexibleSpace that holds information that will change in height. I simply want my AppBar to determine it's height at runtime rather than the static expandedHeight option. Do I really need to calculate the height of this widget before I pass it to the flexibleSpace? Or is there a built in method to allow the SliverAppBar to determine that on it's own?

Have you managed to achieve this somehow, @adriancmurray?

@noordawod I did a complete redesign of my app since I wanted to implement this feature so I ended up not needing it.

Alright, cool, thanks.

I would like if there was an option to set a fixed height for the AppBar.

Did you try to get an answer on StackOverflow?

Yes, but when I'm using a SliverAppBar, I can not set the height of it to a fixed size, or to use SliverAppBar's children's (title) size.
And the PreferredSize used inside a Sliver does not force the child (SliverAppBar) to stick to the height I want.

@vinicioslc @noordawod did you guys figure out away to do this? I have a text widget that could be very long. I am setting it as the background so I need the expandableHeight to be whatever the height the text widget is.

No, unfortunately.

@javierforero @noordawod im using this  package for now https://pub.dev/packages/flutter_sticky_header and its highly customizable

@javierforero see my comment

@vinicioslc   https://pub.dev/packages/flutter_sticky_header
this library use Flutter SDK version >=1.5.9-pre.94 <2.0.0, but i don't want to downgrade version. so, what can i do?

@singlakaran
Learn about dependency overrides: https://dart.dev/tools/pub/pubspec#dependencies

I've been able to get something that works for me by using SliverAppBar with a combination FlexibleSpaceBar with title padding and a bottom widget to set the overall height.
SliverAppBar(
      pinned: true,
      flexibleSpace: FlexibleSpaceBar(
        titlePadding: EdgeInsets.only(top: 70),
        title: Column(
          children: <Widget>[
            Text("Row 1", style: Theme.of(context).textTheme.display3),
            Text("Row 2", style: Theme.of(context).textTheme.display2),
            Text("Row 3", style: Theme.of(context).textTheme.display1),
          ],
        ),
        centerTitle: true,
      ),
      bottom: PreferredSize(
        preferredSize: Size.fromHeight(200),
        child: Container(),
      ),
    );

Really need this one, any updates?

Need this feature +1

I temporarily solved the problem ،
We need to reach a specific widget length on the screen, but the problem is that this widget must be displayed on the screen in order to be able to get a length.
All that I did was I display this widget for a fraction of a second and then get a length and then hide again from the screen and give that length to sliverAppBar
As shown in the following example ،
import 'package:flutter/material.dart';
class HomeScreen extends StatefulWidget {
@override
_HomeScreenState createState() => _HomeScreenState();
}
class _HomeScreenState extends State {
final GlobalKey _flexibleSpaceBarKey = GlobalKey();
Size sizeFlexibleSpaceBar;
bool _visible = true;
getSizeAndPosition() {
RenderBox _cardBox = _flexibleSpaceBarKey.currentContext.findRenderObject();
sizeFlexibleSpaceBar = _cardBox.size;
}
@override
void initState() {
super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) => getSizeAndPosition());
Future.delayed(Duration(microseconds: 1)).then((value) {
setState(() {
_visible = false;
});
});
}
Widget _copyFlexibleSpaceBar() {
return Visibility(
visible: _visible,
child: Column(
key: _flexibleSpaceBarKey,
children: [
Image.network('..'),
SizedBox(
height: 10,
),
Text('sliverAppBar')
],
),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: Column(
children: [
_copyFlexibleSpaceBar(),
if (!_visible)
Expanded(
child: NestedScrollView(
headerSliverBuilder: (BuildContext c, bool isInner) {
return [
SliverAppBar(
expandedHeight: sizeFlexibleSpaceBar.height,
flexibleSpace: FlexibleSpaceBar(
background: Column(
children: [
Image.network('..'),
SizedBox(
height: 10,
),
Text('sliverAppBar')
],
),
),
)
];
},
body: Column(children: [],),
),
),
],
),
);
}
}

@NaimAbb
Nice solution! By the way, you can add Opacity to the mix with a value of 0.0 so that it won't be drawn to screen, but will still be laid out and rendered so the height will be resolved.

@noordawod
Opacity hides the content but keeps space, and this will make the interface look ugly, so I used Visibility to hide the content completely.

@NaimAbb as long as it works, then kudos! Thanks for sharing.

I also need this feature. Here is my use design: https://photos.app.goo.gl/D3PSEXR5L35ZkFqPA
As you can see, most of the features like snapping, and expanding/collapsing is already done by the SliverAppBar, however, I can not calculate the height of my appBar(which is not necessarely an appBar, it is just a widget basically).
So, any tips?

I also need this feature. Here is my use design: https://photos.app.goo.gl/D3PSEXR5L35ZkFqPA
As you can see, most of the features like snapping, and expanding/collapsing is already done by the SliverAppBar, however, I can not calculate the height of my appBar(which is not necessarely an appBar, it is just a widget basically).
So, any tips?

So need this. Any update?

I used a combination of NestedScrollView and CustomScrollView achieve a dynamic header height. The documentation has a starting example here: https://api.flutter.dev/flutter/widgets/NestedScrollView-class.html
Be sure to use the absorber widget or else the body will extend under the header.

i really need this feature, i wasted 6 hours with this problem.
Fortunately I decided using the NestedScrollView, but I didn't like it...

Need this badly

Guys this has been opened since 2018.
Without this there is no way for us to build SliverAppBar(s) with dynamic height.
The workarounds are mostly really painful or inefficient.

After long struggle, I find a way to solve my problem of SliverAppbar dynamic height
I use NestedScrollView as it's my requirement and for Header, I use a SliverStickyHeader
SliverStickyHeader has also provider List and Grid Delegate as well.
Scaffold(
  body: SafeArea(
    child: NestedScrollView(
      headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
        return <Widget>[
          SliverStickyHeader(
            sticky: false,
            header: Padding(
              padding: const EdgeInsets.all(8.0),
              child: Column(
                children: [
                  TextField(
                    decoration: InputDecoration(
                        hintText: 'Search', prefixIcon: Icon(Icons.search)),
                  ),
                  Container(
                    height: kToolbarHeight,
                    child: ListView.builder(
                      scrollDirection: Axis.horizontal,
                      itemBuilder: (context, i) {
                        return Center(
                          child: Container(
                            padding: EdgeInsets.all(8.0),
                            margin: EdgeInsets.symmetric(horizontal: 4.0),
                            decoration: BoxDecoration(
                              color: Theme.of(context)
                                  .primaryColor
                                  .withOpacity(0.5),
                              borderRadius: BorderRadius.circular(25.0),
                            ),
                            child: Row(
                              children: [
                                Text(
                                  'Tag $i',
                                  style: TextStyle(
                                    color: Colors.white,
                                  ),
                                ),
                                SizedBox(width: 8.0),
                                CircleAvatar(
                                  radius: 25.0 / 2,
                                  child: Icon(Icons.close),
                                )
                              ],
                            ),
                          ),
                        );
                      },
                    ),
                  ),
                ],
              ),
            ),
          )
        ];
      },
      body: ListView.builder(itemBuilder: (context, i) {
        return ListTile(
          leading: CircleAvatar(child: Text('$i')),
          title: Text('Appbar with dynamic height'),
        );
      }),
    ),
  ),
);

Any update on this?

Any update on this?

@mashahbazi big thank you for posting a workaround in a box, but after my best attempt to port it to flutter 2.8.1 I'm getting Renderflex overflow errors. I wonder if this is my error, or if flutter changed something.

Any update on this?

up

up

we are still waiting for this 😞

It is May 2022 and this is still an issue.
The best solution I found is to calculate the exact height of the flexibleSpace by adding up all the widgets it contains (widget height, padding, SizedBox, ...).
For example to calculate the height of a Text widget : https://stackoverflow.com/a/60065737
The problem is that every time you add a new widget in the flexibleSpace, you have to update the sum result.

up

Current SliverAppBar API depends on flexibleSpace being a PreferredSizeWidget so I don't think It will be possible to redesign it in a non-intrusive way to support this case.
However, SliverAppBar is built upon SliverPersistentHeader which can be extended to accommodate such (and, possibly, any) use-case. Below, a simple implementation that uses child's intrinsic height as maxExtent.
class CustomSliverPersistentHeader extends SingleChildRenderObjectWidget {
  const CustomSliverPersistentHeader({super.key, required super.child});

  @override
  RenderObject createRenderObject(BuildContext context) => _RenderCustomSliverPersistentHeader();
}

class _RenderCustomSliverPersistentHeader extends RenderSliverPinnedPersistentHeader {
  @override
  double get maxExtent => child!.getMaxIntrinsicHeight(constraints.crossAxisExtent);

  @override
  double get minExtent => 0;
}

And a dartpad with a working example. Notice, that CustomSliverPersistentHeader needs to be paired with OverflowBox and ClipRect to achieve the desired layout behavior.
This approach can be used to implement basically any layout requirements (which shows the amazing flexibility of Flutter layout architecture!). Unfortunately, implementing your own RenderObjects is quite error-prone and may require a deeper understanding of what can go wrong (above implementation is quite naive and I'm sure there's a ton of edge-cases when it'll go bonkers).
The requirements here can be drastically different, so i think that creating a Widget-level solution won't be doable without introducing unreasonable complexity. Maybe documenting RenderSliver*PersistentHeader and including an example similar to the above would be enough. It should be also linked in the SliverAppBar/SliverPersistentHeader docs to increase discoverability.

It has been 4 years that we are looking for this kind of feature ?
so is it impossible to make it for google ?

up

Any updates?

up

Up

Almost 5 years and still waiting

Up

up?

up

Hi guys! I was struggling with the same issue and discovered this widget (SliverToBoxApdater) that allows you to convert any widget into a sliver, so you can use this instead of SliverAppBar and achieve the dynamic height.

+1

I used the extended_sliver package's ExtendedSliverAppbar widget. It helped me with dynamic height
ExtendedSliver

why are obvious things ignored?  just now switching to slivers, this is the first thing I needed.

late answer, but I also had the same requirement for a dynamic height sliver app bar. I finally found a workaround which was working for nearly every situation I needed by faking a sliverappbar, calculating its size and then displaying a real sliverapp bar (so I get access to its cool animations).  Needs to be called after the last frame has been rebuild
    // otherwise this will throw an error
    WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
      if (_childKey.currentContext == null) return;
      setState(() {
        _height = (_childKey.currentContext!.findRenderObject()! as RenderBox).size.height;
      });
    });
  }

  @override
  Widget build(BuildContext context) {
    //Needed to lay out the flexibleSpace the first time, so we can calculate its intrinsic height
    if (_height == 0) {
      return SliverToBoxAdapter(
        child: Stack(
            children: [
              Padding(
                // Padding which centers the flexible space within the app bar
                padding: EdgeInsets.symmetric(vertical: MediaQuery.paddingOf(context).top / 2),
                child: Container(key: _childKey, child: widget.flexibleSpace ?? SizedBox(height: kToolbarHeight)),
              ),
              Positioned.fill(
                // 10 is the magic number which the app bar is pushed down within the sliver app bar. Couldnt find exactly where this number
                // comes from and found it through trial and error.
                top: 10,
                child: Align(
                  alignment: Alignment.topCenter,
                  child: AppBar(
                    backgroundColor: Colors.transparent,
                    elevation: 0,
                    leading: widget.leading,
                    actions: widget.actions,
                  ),
                ),
              )
            ],
          ),
      );
    }

    return SliverAppBar(
      leading: widget.leading,
      automaticallyImplyLeading: widget.automaticallyImplyLeading,
      title: widget.title != null ? InvisibleExpandedHeader(child: widget.title!) : null,
      actions: widget.actions,
      bottom: widget.bottom,
      elevation: widget.elevation,
      scrolledUnderElevation: widget.scrolledUnderElevation,
      shadowColor: widget.shadowColor,
      surfaceTintColor: widget.surfaceTintColor,
      forceElevated: widget.forceElevated,
      backgroundColor: widget.backgroundColor,
      foregroundColor: widget.foregroundColor,
      iconTheme: widget.iconTheme,
      actionsIconTheme: widget.actionsIconTheme,
      primary: widget.primary,
      centerTitle: widget.centerTitle,
      excludeHeaderSemantics: widget.excludeHeaderSemantics,
      titleSpacing: widget.titleSpacing,
      collapsedHeight: widget.collapsedHeight,
      floating: widget.floating,
      pinned: widget.pinned,
      snap: widget.snap,
      stretch: widget.stretch,
      stretchTriggerOffset: widget.stretchTriggerOffset,
      onStretchTrigger: widget.onStretchTrigger,
      shape: widget.shape,
      toolbarHeight: widget.toolbarHeight,
      expandedHeight: _height,
      leadingWidth: widget.leadingWidth,
      toolbarTextStyle: widget.toolbarTextStyle,
      titleTextStyle: widget.titleTextStyle,
      systemOverlayStyle: widget.systemOverlayStyle,
      forceMaterialTransparency: widget.forceMaterialTransparency,
      clipBehavior: widget.clipBehavior,
      flexibleSpace: FlexibleSpaceBar(background: widget.flexibleSpace),
    );
  }
}

late answer, but I also had the same requirement for a dynamic height sliver app bar. I finally found a workaround which was working for nearly every situation I needed by faking a sliverappbar, calculating its size and then displaying a real sliverapp bar (so I get access to its cool animations).  Needs to be called after the last frame has been rebuild
    // otherwise this will throw an error
    WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
      if (_childKey.currentContext == null) return;
      setState(() {
        _height = (_childKey.currentContext!.findRenderObject()! as RenderBox).size.height;
      });
    });
  }

  @override
  Widget build(BuildContext context) {
    //Needed to lay out the flexibleSpace the first time, so we can calculate its intrinsic height
    if (_height == 0) {
      return SliverToBoxAdapter(
        child: Stack(
            children: [
              Padding(
                // Padding which centers the flexible space within the app bar
                padding: EdgeInsets.symmetric(vertical: MediaQuery.paddingOf(context).top / 2),
                child: Container(key: _childKey, child: widget.flexibleSpace ?? SizedBox(height: kToolbarHeight)),
              ),
              Positioned.fill(
                // 10 is the magic number which the app bar is pushed down within the sliver app bar. Couldnt find exactly where this number
                // comes from and found it through trial and error.
                top: 10,
                child: Align(
                  alignment: Alignment.topCenter,
                  child: AppBar(
                    backgroundColor: Colors.transparent,
                    elevation: 0,
                    leading: widget.leading,
                    actions: widget.actions,
                  ),
                ),
              )
            ],
          ),
      );
    }

    return SliverAppBar(
      leading: widget.leading,
      automaticallyImplyLeading: widget.automaticallyImplyLeading,
      title: widget.title,
      actions: widget.actions,
      bottom: widget.bottom,
      elevation: widget.elevation,
      scrolledUnderElevation: widget.scrolledUnderElevation,
      shadowColor: widget.shadowColor,
      surfaceTintColor: widget.surfaceTintColor,
      forceElevated: widget.forceElevated,
      backgroundColor: widget.backgroundColor,
      foregroundColor: widget.foregroundColor,
      iconTheme: widget.iconTheme,
      actionsIconTheme: widget.actionsIconTheme,
      primary: widget.primary,
      centerTitle: widget.centerTitle,
      excludeHeaderSemantics: widget.excludeHeaderSemantics,
      titleSpacing: widget.titleSpacing,
      collapsedHeight: widget.collapsedHeight,
      floating: widget.floating,
      pinned: widget.pinned,
      snap: widget.snap,
      stretch: widget.stretch,
      stretchTriggerOffset: widget.stretchTriggerOffset,
      onStretchTrigger: widget.onStretchTrigger,
      shape: widget.shape,
      toolbarHeight: widget.toolbarHeight,
      expandedHeight: _height,
      leadingWidth: widget.leadingWidth,
      toolbarTextStyle: widget.toolbarTextStyle,
      titleTextStyle: widget.titleTextStyle,
      systemOverlayStyle: widget.systemOverlayStyle,
      forceMaterialTransparency: widget.forceMaterialTransparency,
      clipBehavior: widget.clipBehavior,
      flexibleSpace: FlexibleSpaceBar(background: widget.flexibleSpace),
    );
  }
}

this worked very well!

ExtendedSliver

Thx @SynSzakala This was really helpful. <3
I did some small adjustments for it to not break when over-scrolling on iOS, and Written this:
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';

enum SliverToBoxPersistentHeaderBehaviour {
  pinned,
  floating,
}

class SliverToBoxPersistentHeader extends SingleChildRenderObjectWidget {
  final SliverToBoxPersistentHeaderBehaviour scrollBehaviour;

  const SliverToBoxPersistentHeader({
    super.key,
    required super.child,
    this.scrollBehaviour = SliverToBoxPersistentHeaderBehaviour.floating,
  });

  @override
  RenderObject createRenderObject(BuildContext context) {
    switch (scrollBehaviour) {
      case SliverToBoxPersistentHeaderBehaviour.pinned:
        return _RenderSliverPinnedPersistentHeader();
      case SliverToBoxPersistentHeaderBehaviour.floating:
        return _RenderSliverFloatingPersistentHeader(
          showOnScreenConfiguration:
              const PersistentHeaderShowOnScreenConfiguration(),
        );
    }
  }
}

class _RenderSliverPinnedPersistentHeader
    extends RenderSliverPinnedPersistentHeader {
  @override
  double get maxExtent =>
      child!.getMaxIntrinsicHeight(constraints.crossAxisExtent);

  @override
  double get minExtent => maxExtent;
}

class _RenderSliverFloatingPersistentHeader
    extends RenderSliverFloatingPersistentHeader {
  _RenderSliverFloatingPersistentHeader({
    required super.showOnScreenConfiguration,
  });

  @override
  double get maxExtent =>
      child!.getMaxIntrinsicHeight(constraints.crossAxisExtent);

  @override
  double get minExtent => maxExtent;
}

There is also the RenderSliverScrollingPersistentHeader that has a different stretch behaviour... but for this usecase it is no different than RenderSliverFloatingPersistentHeader.

ExtendedSliver

Thx @SynSzakala This was really helpful. <3
I did some small adjustments for it to not break when over-scrolling on iOS, and Written this:
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';

enum SliverToBoxPersistentHeaderBehaviour {
  pinned,
  floating,
}

class SliverToBoxPersistentHeader extends SingleChildRenderObjectWidget {
  final SliverToBoxPersistentHeaderBehaviour scrollBehaviour;

  const SliverToBoxPersistentHeader({
    super.key,
    required super.child,
    this.scrollBehaviour = SliverToBoxPersistentHeaderBehaviour.floating,
  });

  @override
  RenderObject createRenderObject(BuildContext context) {
    switch (scrollBehaviour) {
      case SliverToBoxPersistentHeaderBehaviour.pinned:
        return _RenderSliverPinnedPersistentHeader();
      case SliverToBoxPersistentHeaderBehaviour.floating:
        return _RenderSliverFloatingPersistentHeader(
          showOnScreenConfiguration:
              const PersistentHeaderShowOnScreenConfiguration(),
        );
    }
  }
}

class _RenderSliverPinnedPersistentHeader
    extends RenderSliverPinnedPersistentHeader {
  @override
  double get maxExtent =>
      child!.getMaxIntrinsicHeight(constraints.crossAxisExtent);

  @override
  double get minExtent => maxExtent;
}

class _RenderSliverFloatingPersistentHeader
    extends RenderSliverFloatingPersistentHeader {
  _RenderSliverFloatingPersistentHeader({
    required super.showOnScreenConfiguration,
  });

  @override
  double get maxExtent =>
      child!.getMaxIntrinsicHeight(constraints.crossAxisExtent);

  @override
  double get minExtent => maxExtent;
}

There is also the RenderSliverScrollingPersistentHeader that has a different stretch behaviour... but for this usecase it is no different than RenderSliverFloatingPersistentHeader.

I've created a package that can help with this very well: https://pub.dev/packages/intrinsic_size_builder
Greatly simplifies:

SliverAppBars with dynamically sized flexibleSpace
SliverAppBars with dynamically sized bottom
Including when the flexibleSpace has a widget which can resized itself, like an Image.network, that has a different size when loading

Checkout the examples, they specifically targets the issue OP describes.

I just discovered that Flutter 3.24 now has PinnedHeaderSliver
It solved my problem :)

Expanded(child: SizedBox.shrink()),

Thanks @mashahbazi . This is the part that I needed to get it working for me.


Make lemming dataplane gnmi use the SAI API

sorry about the size of this, it was smallest i could do get to the tests passing

summary of changes: simplified the dpb.Route message and changed sysrib to use it
modified the reconcilers package to call the sai API.

still a little more work to remove engine entirely and change the directory structure a bit

i haven't seen any flakiness with the tests now.


chore(deps): upgrade dev dependencies

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-dev-dependencies-2.x" workflow

⚪ Backport skipped
The pull request was not backported as there were no branches to backport to. If this is a mistake, please apply the desired version labels or run the backport tool manually.
Manual backport
To create the backport manually run:
backport --pr 1805

Questions ?
Please refer to the Backport tool documentation


Alignment to LibGDX 1.9.7

Updated the pom.xml pointing to LibGDX 1.9.7
Updated "new FrameBuffer" to "FrameBuffer.createFrameBuffer" to meet LibGDX 1.9.7 API

As it was reverted in 1.9.8 - closing without merge. But anyway, thanks for the contribution! 👍


ActionType - NamedPipeEvents

Product group tells me MDE collects of ActionType "NamedPipeEvents" - this type of events is not mentioned in docs or in the portal.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: c292f6dc-0eca-e5d1-04f3-d29adeb5c77f
Version Independent ID: f75be752-3169-cf4f-3e9b-9d5115d2c352
Content: DeviceEvents table in the advanced hunting schema
Content Source: microsoft-365/security/defender/advanced-hunting-deviceevents-table.md
Product: m365-security
Technology: m365d
GitHub Login: @schmurky
Microsoft Alias: maccruz

@Rvvhub They are not available right now but it is currently being worked on to be available in the next couple of months. Kindly check back with us then.

@Rvvhub Hope this comment is helpful for you. If you see a documentation update is required, please feel free to open an issue for the same. We proceed here to close it. Thanks for taking out some time to open the issue. Appreciate and encourage you to do the same in future also.


Dart-analyzer: Excessive static warning while getter access

According Dart specification "16.18.1 Getter Access and Method Extraction":
"Evaluation of a property extraction i of the form e.m proceeds as follows:
...
Let T be the static type of e. It is a static type warning if T does not have
a method or getter named m unless either:
• T or a superinterface of T is annotated with an annotation denoting a
constant identical to the constant @proxy defined in dart:core."
const myProxy = proxy;

@myProxy class C {
}

main() {
  C c = new C();
  print(identical(myProxy, proxy)); // prints true
  c.m; // static warning
}

Dart analyzer produces [warning] The getter 'm' is not defined for the class 'C'. According the spec (see above) it should not
dartanalyzer version 1.12.0-dev.5.10

This is a duplicate of https://github.com/dart-lang/sdk/issues/15467.


Translate the ReadMe into English

Is your feature request related to a problem? Please describe.
The ReadMe is in Chinese. Most of people who are not Chinese don't speak it.
Describe the solution you'd like
It'd be nice to translate it into English.
Describe alternatives you've considered
Learning Chinese is not an alternative.

My english is poor, you can use google translate.

All my English replies are also translated by Google

I'm very surprised. I have read somewhere that English is learned in China since primary school.
Do you have any friends who know English enough to translate it properly?

, so even if I provide an English readme, I still use it, which makes no difference.

It is still better than nothing. Though may make sense to keep both variants near each other, so people speaking both languages can fix the defects of machine translation.


Addition of VarStore merging capabilities

Hello,
As per https://github.com/guillaume-be/rust-bert/issues/258, I am unsure if it is currently possible to load multiple pre-trained models into a given VarStore. A possibility would be for the user to add unique prefixes for each of the models pretrained weights and then use consecutive load_partial calls. This has the drawback of losing the validation or the weights names performed during a standard load in a VarStore.
I have created a draft implementation allowing to take multiple VarStore and merging them into a single one for further training by passing them to an optimizer. This allows the following:
let vs_1 = VarStore::new(Device::Cpu);
let _ = vs_1.root().entry("key_1").or_zeros(&[3, 1, 4]);
let _ = vs_1.root().entry("key_2").or_zeros(&[1, 5, 9]);

let vs_2 = VarStore::new(Device::Cpu);
let _ = vs_2.root().entry("key_3").or_zeros(&[2, 4, 4]);
let _ = vs_2.root().entry("key_4").or_zeros(&[5, 2, 3]);

let merged_vs = VarStore::from_existing(vec![vs_1, vs_2]);

The method would look as follows: https://github.com/LaurentMazare/tch-rs/compare/main...guillaume-be:master
If you are supportive of the idea I'd be happy to open a PR to bring these changes to the main branch. Please let me know if there would be another preferred way to load multiple models into a single VarStore for combine optimization.
Thank you!

Hi,
This sounds reasonable to me, I indeed don't think that there is a very good way to do this at the moment.
If the main goal is passing all weights to an optimizer, an alternative could be to tweak the optimizer side to allow for this, but maybe there is also some upside in being able to store all the combined variables in a single file in the end.
Some nitpicking:

Re naming, maybe merge or combine instead of from_existing?
Instead of taking a slice that must have the same length as the var-store vec, it might be better to take a Vec<(VarStore, Option<&str>)> or something like this?

If the main goal is passing all weights to an optimizer, an alternative could be to tweak the optimizer side to allow for this, but maybe there is also some upside in being able to store all the combined variables in a single file in the end.

This would indeed be beneficial.  The use case that prompted this was related to combining two pre-trained models into a new model, training on a specific task, and then ideally writing the new model out.  If the new model could be written and loaded as a single artifact , it would provide a nice ease of use win.


Fix horizontal scrolling being inverted on non-Apple platforms

Closes: #5167

Tested on:

[x] Windows
[x] Android
[ ] Linux (wayland/X11?)
[ ] iPadOS/iOS (just to confirm it's the same as macOS)

Checked linux. On x11 I can't get horizontal scroll to work at all on touchpad, on wayland the direction is more correct with this change and follows the system-wide "natural scrolling" settings.

Would've appreciated adding a description explaining the forward direction with this change, as I've had a hard time understanding how this is more correct when it's flipping everything (but macOS) to match what o!f "wants".
Coming from a questioning I had, now with this PR, scrolling right on Windows (non-natural) sends a negative ScrollDelta value, while scrolling up sends a positive ScrollDelta value. Both directions are supposed to be considered for increasing UX-wise, and this means that every implementation of OnScroll with similar purposes will now have to consider flipping the X delta to achieve expectations.
I believe SDL and Android are rather more correct here, while macOS is broken for doing the opposite and ScrollContainer flipping the direction of the X delta as well to satisfy macOS.
Alternative solution that would avoid the above concern would be to do the complete opposite, by flipping the X value in macOS (and iOS as well?) to match all other platforms (both precision-scroll handler and SDL handler), and change ScrollContainer to not flip the X delta during OnScroll (only flip Y delta).
As an aside, I would generally recommend documenting the scroll directions and their respective +/- signs in ScrollEvent.ScrollDelta, as-is there's no place where it is explained what the consumer can expect when scrolling in a specific direction.

This change works correctly on macOS precision/non-precision, windows non-precision. I'm pretty confident with the direction.
One thing to note is that we will still need to add shift-scroll support for windows scroll wheel direction override. It turns out this doesn't seems to be handled at an OS level as far as I can tell (someone please confirm as I don't have a native windows installation to 101% confirm at the moment).

One thing to note is that we will still need to add shift-scroll support for windows scroll wheel direction override. It turns out this doesn't seems to be handled at an OS level as far as I can tell (someone please confirm as I don't have a native windows installation to 101% confirm at the moment).

I know that it's not implemented at OS level, but did attach a debugger to lazer just in case, and indeed SHIFT has no effect on the scroll messages sent to the window (besides bit2 being set when SHIFT is held).

One thing to note is that we will still need to add shift-scroll support for windows scroll wheel direction override. It turns out this doesn't seems to be handled at an OS level as far as I can tell (has been confirmed). And if this holds correct, we need to decide whether to implement this before the events are sent to drawables, or just at ScrollContainer:

Would go with altering scroll before event is sent, mainly for consistency with macOS's behaviour, and to allow providing X delta values to controls which require it without handling ShiftPressed for each case.

Just to double-confirm intent here: we're all aware that this is technically a consumer breaking change (because it's changing as to which half of the X axis is considered positive), yes? And we're fine with going through with it anyway? It probably needs a breaking change note anyway.
Incidentally, the only game-side usage of ScrollDelta.X is the editor, and the behaviour there appears to be more correct with this change applied, so maybe not really that huge of a deal.

I've updated the PR description with the breaking change notice.
As can be seen from the title of this PR, I think this is less of a change and more of a fix. If you look at it from the perspective of macOS, ScrollContainer, and the osu! editor, nothing has changed.

I still believe this will be a nuisance when writing "increase/decrease" scroll implementations for UI controls, but I sound like a broken record at this point, and I suppose this is not that big of a deal, for now at least.

Think it's probably fine to get this in without testing i(Pad)OS.


Apply relaton-index information across all relaton-data-* repositories

Can we apply this across all the relaton-data-* repositories? Ultimately we want to offer all this information through relaton.org.
Originally posted by @ronaldtse in https://github.com/relaton/relaton-oasis/issues/4#issuecomment-1396595148

Done.


[SUGGESTION] Start implementing new components in TypeScript

Start implementing new components in TypeScript
Rewrite key files such as Global.js in TypeScript

@AUBGTheHUB/nosyncdev I am pinning this issue since we agreed we should start writing our components in typescript. Best of luck!


2553

brother can you plz give us video How to install

This is just using the Parcel web extension build out of the box, see if you can get that working: https://parceljs.org/recipes/web-extension/

not work

@live-industrial @msfrisbie i have same issues I am encountering an issue where I cannot receive any data in my server at localhost:1234


Use peerStore event to determine if identify is done & Auto-subscribe

bors merge

bors retry

bors merge

bors merge

bors merge

bors merge


Terminal takes 3.5s to load user data and be functional

Windows Terminal version
No response
Windows build number
Win32NT  10.0.25236.0 Microsoft Windows NT 10.0.25236.0
Other Software
No response
Steps to reproduce
Open your terminal
Few characteristics:

I have a professional (work account) added into my system

Expected Behavior
Be usable within reasonable time, like any other useful terminal, with a loading time at least under 250ms.
Actual Behavior
It takes ALWAYS more than 2 seconds to be ready.

It looks like this message is coming from PowerShell. If you switch your "Default Profile" to "Command Prompt," do you see the same delay?

Switching to Windows Console Host solves the loading time issue;
https://support.microsoft.com/en-us/windows/command-prompt-and-windows-powershell-for-windows-11-6453ce98-da91-476f-8651-5c14d5777c20

At the risk of sounding like a form letter...
You are reporting a message that came from PowerShell. If you change your Default Profile to Command Prompt, are you seeing the same delay?
If not: this is an issue with PowerShell.
If so: that is surprising, because Command Prompt does not produce a message indicating its startup duration.

@DHowett by changing the Default Profile to Command Prompt, I DO NOT see the same delay (as shown in the previous message);
Anyway, changing the default profile by the developer settings is a temporary fix, as I have restarted my machine, and the CMD started again to show the same delay.
Could be also a bug from window settings side?
 There's two axes at play here:

The default terminal ("Windows Console Host" (conhost) vs "Windows Terminal")
The shell being launched (cmd, powershell, pwsh, wsl, whatever.)

PowerShell is the shell that prints out that "loading profiles took forever" message. PowerShell consistently starts slower than CMD.
Then there's the Terminal vs conhost. Conhost definitely starts faster than Terminal, but typically not more than a few hundred ms. Terminal and conhost don't care which application is run inside them. Notably, however, if you just run the Terminal directly, it'll default to some version of PowerShell. This can be changed in the Terminal settings.
Does that make more sense?


Wifi not working in rpi0 image using an edimax usb dongle.

I am trying to get resinos running on a pi0.
I followed the instructions from the getting started page...
Getting Started on the Raspberry Pi 1
I used rdt to configure the image.
Upon flashing and a subsequent boot.
All I am getting is...
wlan0 is not ready.

But when I use the downloaded image from resinio's dashboard,
everything just works and the device is added to the dashboard.
What gives?
thank you!

@sirvon Sorry for this late reply. For whatever reason we missed this issue. Did you manage to find anything about this problem?


test: Improve tests of router contract.

Description
Implement and improve tests of router contract.
File: test/router/router.cairo.
Acceptance criteria

Unit tests (nominal and failure) are implemented and passing.

Hi, @sparqet . I will love to work on this.

Sure !

Hi @sparqet
Does this include adding a test for the exchange_router file as well? or strictly add more test to the router file.

Hi ! Just add for router file, there will be another issue for exhange_router

Alright.

Hey @sparqet, I would like to work on it

Hi @sparqet is this still open for collaboration?
If so I would love to work on this!


chore: Upgrade Yarn; fix nightly build

Closes #353
Basically followed steps by @koistya in #354 PR, but I also had to add explicit pnp requirement in .yarnrc file and -j unlimited argument in package.json for yarn run start and yarn run build commands.

@andrewstec cool, thank you!


How to implement network with shared-weight layer like in cxxnet?

in symbol.bind, give the same weight and grad array to different names.

see https://github.com/dmlc/mxnet/issues/557

#557 is exact what I want. Thank you all.


No error reported when set "colocate_with" = ""

Steps to reproduce the behavior (Required)

CREATE TABLE t_1 (
id int(18),
value varchar(20)
)
ENGINE=OLAP
DUPLICATE KEY(id)
COMMENT "OLAP"
DISTRIBUTED BY HASH(id) BUCKETS 3
PROPERTIES (
"replication_num" = "1",
"storage_format" = "v2",
"colocate_with" = ""
);
2.SHOW PROC '/colocation_group';

Expected behavior (Required)
report error
Real behavior (Required)
| GroupId              | GroupName| TableIds| BucketsNum | ReplicationNum | DistCols| IsStable |
|<PHONE_NUMBER>30 | 193116_       | 390728 | 3                     | 1                          | int(11)   |true         |
StarRocks version (Required)

You can get the StarRocks version by executing SQL select current_version()
2.0

We should not report error, just ignore this property. Because the user can remove the table from the colocate group by setting this attribute to empty.

@gengjun-git
Please assign it to yourself, if you were going to handle this issue.

@gengjun-git Please assign it to yourself, if you were going to handle this issue.

OK


Beta documentation for Consistent Reads from Cache

Document https://github.com/kubernetes/enhancements/issues/2340

/cc @wojtek-t @ah8ad3 @p0lyn0mial @deads2k

/sig api-machinery

Hi @serathius,
Reaching out from the Docs team, just checking in as we approach Docs Freeze on Tuesday July 30th 18:00 PDT. This documentation appears to still be under review. To meet the Docs Freeze, this PR must have a technical review as well as lgtm and approve labels applied, without any unaddressed comments or concerns from SIG Docs. The status of this enhancement is marked as at risk for docs freeze.
The most recent unaddressed comments are the following:
https://github.com/kubernetes/website/pull/46912#discussion_r1650085298
https://github.com/kubernetes/website/pull/46912#discussion_r1650666567
Thank you!
Daniel

Hello @serathius,
v1.31 Doc Lead here.  This PR has been marked as as risk for Doc Freeze:
The Doc Reviewers have given feedback on them, however, an update is yet to be made on it, based on feedback.
Please note that the Doc freeze deadline is tomorrow, and if the PR is not merged by tomorrow, you will need to file an exception or this enhancement will be removed from this release. Thank you!

Feature was not accepted to Beta.

We managed to snuck in https://github.com/kubernetes/kubernetes/pull/126469

/lgtm
/approve
:crossed_fingers: hoping there's no snags here

lgtm

lgtm


fix: pass cfg_RescaleMultiplier onto denoise_latents frontend UI graphs

What type of PR is this? (check all applicable)

[ ] Refactor
[ ] Feature
[x] Bug Fix
[ ] Optimization
[ ] Documentation Update
[ ] Community Node Submission

Have you discussed this change with the InvokeAI team?

[ ] Yes
[x] No, because: The fix seemed obvious

Have you updated all relevant documentation?

[ ] Yes
[x] No

Description
On most graphs (except buildLinearTextToImageGraph) the cfg_RescaleMultiplier was not passed onto denoise_latents.  This resulted in the UI setting CFG Rescale Multiplier not affecting the images generated. Also, as reported in issue #5348, it had the effect of fast image generation if the setting was changed as it was not passed onto the graph so not considered as changed in the cached data.
buildLinearTextToImageGraph already worked as expected.
Existing graphs already had cfg_rescale_multiplier passed to the CoreMetadataNode but just not to the denoise_latents.
Graphs updated are:

buildCanvasImageToImageGraph
buildCanvasSDXLImageToImageGraph
buildCanvasSDXLTextToImageGraph
buildCanvasTextToImageGraph
buildLinearImageToImageGraph
buildLinearSDXLImageToImageGraph
buildLinearSDXLTextToImageGraph

Some other graphs (canvas in and out painting) also use cfg_scale but had no traces of cfg_RescaleMultiplier.  I have * NOT * changed any of these as I was not sure if they should have it or not as I have little experience of in and out painting. These graphs also do not use the CoreMetadataNode like the others so this was another reason that made me doubt changing them.  Here is a list of those graphs in case they should be changed.

buildCanvasInpaintGraph
buildCanvasOutpaintGraph
buildCanvasSDXLInpaintGraph
buildCanvasSDXLOutpaintGraph

Related Tickets & Documents

Related Issue #
Closes #5348

QA Instructions, Screenshots, Recordings

Merge Plan
This PR can be merged when approved.

Added/updated tests?

[ ] Yes
[x] No : I don't think there are any tests for this

[optional] Are there any post deployment tasks we need to perform?

I have very little experience with Invoke frontend coding so please review carefully.  I have done some basic testing and this does seem to fix the issue for me.

Oooh, thanks for digging into this issue. I think we should use the same option on all denoising nodes, including canvas. @blessedcoolant can you advise?
PS: The canvas images don't have metadata bc I haven't gotten around to adding it, and usually those images are just smooshed up into a canvas output where a single metadata object doesn't make sense.


Fix image generation endpoint path

The endpoint path for the dalle script was modified in this commit and doesn't match the OpenAI API specifications. This pull request corrects the path.

Thank you. Made the change locally since it’s easier to test and package and will release a new version shortly.


Incorrect NEM VWP

shows $452 should be ~$170/MWh

@chienleng I suspect this is an FE issue - just checked and the fueltech totals are correct and unit tests are passing

@nc9 will take a look.

hi @nik, the Av.Value is calculated using the demand.power series in the 7d.json. I think the issue is with the demand.power.history.data. They seem a bit too low. The other regions looked fine, just the NEM region.
Can you check the au.nem.demand history.data values?

accidentally closed thinking this was the BE VWP issue!


flutter run -d flutter-tester quits after 2 frames

This is another go at #16963! When running using the flutter-tester device it's still quitting while I'm attached to the debugger if I don't hit a breakpoint or something.
To repro run flutter run -d flutter-tester --start-paused then connect to observatory and send a resume (or open in browser and type continue). The device will quit. Here's the output from the terminal:
dantup-macbookpro:flutter_hello_world dantup$ flutter run -d flutter-tester --start-paused
Launching lib/main.dart on Flutter test device in debug mode...
Skipping compilation. Fingerprint match.
Syncing files to device Flutter test device...               2.0s

🔥  To hot reload your app on the fly, press "r". To restart the app entirely, press "R".
An Observatory debugger and profiler on Flutter test device is available at: http://<IP_ADDRESS>:50967/
For a more detailed help message, press "h". To quit, press "q".
Lost connection to device.
StreamSink is closed and adding to it is an error.
  See http://dartbug.com/29554.
#0      _StreamSinkImpl._reportClosedSink (dart:_http/http_impl.dart:537:31)
#1      _StreamSinkImpl.add (dart:_http/http_impl.dart:542:7)
#2      _WebSocketImpl.add (dart:_http/websocket_impl.dart:1203:11)
#3      WebSocketClient.post (dart:vmservice_io/server.dart:78:18)
#4      VMService._eventMessageHandler (dart:_vmservice:245:16)
#5      VMService._removeClient (dart:_vmservice:219:7)
#6      Client.close (dart:_vmservice/client.dart:37:13)
#7      new WebSocketClient.<anonymous closure> (dart:vmservice_io/server.dart:26:29)
#8      _RootZone.runUnary (dart:async/zone.dart:1381:54)
#9      _FutureListener.handleValue (dart:async/future_impl.dart:129:18)
#10     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:633:45)
#11     Future._propagateToListeners (dart:async/future_impl.dart:662:32)
#12     Future._completeWithValue (dart:async/future_impl.dart:477:5)
#13     Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:507:7)
#14     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#15     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#16     _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:113:13)
#17     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:166:5)

In my real test, I'm using flutter run -machine but the results are the same; I trie to ensure the app is still running after 10 seconds (to ensure it was launched correctly), but it's not.

Is this still an issue?

Nope, it's good now 👍


rounding of floats

Hi @mikaelvesavuori!
When looking at the logic and trying to mimic it, I noticed that rounding is taking place at each iteration of the composite SLA instead of at the end, as well as it's actually not rounding but cutting (99.956 becomes 99.95 and not 99.96).
Since I'm no domain expert, this may be how it's done. Just wanted to check with you that it's intentional.

Hey!
Yes, that's a good catch. I'll set a single use of .toPrecision(5) at the end instead, which I think should do the trick. I'll also correct you that both .toFixed() and .toPrecision() will round numbers.
Tests don't show much meaningful difference (had to update a single digit in a test, so seems to work as expected). I'll check in the new revised logic now.

You are most likely correct, noticed the issue when replicating the logic and noted that I was off by one in this test: https://github.com/mikaelvesavuori/slamax/blob/main/tests/takesCustomInputs.test.ts

That case should be taken care of, so closing. Thanks for feedback leading to a better product!


[ActiveJob] Cannot use queue_as for select queue, only sidekiq options are supported (first run)

Hi :wave:
looks like sidekiq-cron works "okayish" with ActiveJob. It detects and runs jobs:)
There are 2 problems I'm running into

here only sidekiq options are fetched on init, if sidekiq options change later on, this will not be fetched
When some of the options change, for example queue, it will be only overwritten if passed by args see here.

No code here supports ActiveJob configuration.
Is this more of a bug and PRs to get better ActiveJob is welcome or there's something wrong I'm doing?
Repro is very minimal
  foobar:
    cron: "*/5 * * * *"
    class: "FooBar"

  class FooBar < ApplicationJob
    queue_as :low

    def perform

Hey @arathunku 👋
In #424 we are discussing some changes to properly use AJ. Do you think those changes can help with this issue too?

I've seen the issue but decided to open a new issue because I found no need for any global options nor active_job: true. Detection of ActiveJob jobs by is_active_job? works for enquing jobs and so far, I've only found the two missing parts documented above.
I prefer to see options on "job" level as much as possible, where you'd usually make a change and follow the same patterns both for non-cron-job Jobs and normal background jobs.
For CronJobs, we also set up additional defaults via:
  class SetupCronJobDefaults
    def self.setup_for_all
      ConfigLoader.load("sidekiq-cron.yml").each do |(_name, job)|
        klass = Sidekiq::Cron::Support.constantize(job.fetch("class", job["klass"]))
         .....
      end
    end
  end

This is executed before config is loaded.
So that nobody needs to remember about some incantation for every job definition.

Ok @arathunku! yeah that seems quite different to "global" defaults. I'm happy to review PRs to make it easy to use under AJ. Feel free to send a proposal.


Reset the Consumer group offset of the Kafka Enabled Azure Eventhub?

It will be helpful to add the behavior of the offset reset of the Consumer group of  Kafka Enabled Azure Eventhub.
For native Kafka, we have plenty of docs out in public forums or post. But there is no single document I could not find resetting the Consumer group of  Kafka Enabled Azure Eventhub. First of all I am not sure whether eventhub support this feature. If yes, how to do we that?
The steps mentioned for native Kafka does not supported by Azure EventHub, since Kafka based Consumer group in Azure eventhub is auto created (FAQ). As soon as Consumer stops/shutdown, Consumer group is STABLE till SessionTimoutMs. After this period elapse Consumer group disappears. So there is no chance of accessing the Consumer group in case to reset the offset.

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 71a374cd-8f43-29d0-ef90-d083720bc9ab
Version Independent ID: 3038b5e3-487e-f4ad-c071-9d575cbbce01
Content: Frequently asked questions - Azure Event Hubs for Apache Kafka
Content Source: articles/event-hubs/apache-kafka-frequently-asked-questions.yml
Service: event-hubs
GitHub Login: @v-hearya

@ksdvishnukumar
Thanks for your feedback! We will investigate and update as appropriate.

@spelluru
Could you please review add comments on this, update as appropriate.

@kasun04 - could you please review and respond as soon as possible? Thank you!
@SaibabaBalapur-MSFT - please assign the issue to @kasun04.

@ksdvishnukumar
Thank you for bringing this to our attention.
I've delegated this to content author @kasun04, who will review it and offer their insightful opinions.

Thanks and appreciate @Naveenommi-MSFT to assigning in to respective team/team member @kasun04 to look in to it.
It rally helps to get a details sooner.

Hi Team,
Seems we are good to close this ticket. I found that, even though Kafka Consumer group CLI with describe args reports that consumer group does not exists, still with Offset reset allows to do that.
Below is the reference for the same.


Update NuGet feed to use msft_consumption

This change is needed because the team owning these repositories opted to replace them (all downstream consumers are broken) instead of renaming them and placing the new feed at the same address (all downstream consumers would work without alteration).

msft_consumption is not a viable feed.


CON-1889 Added some typography adjustments to the Product page

Coverage increased (+0.02%) to 21.285% when pulling b34476ef0939abb4813e7ca908cdd2d14ddfbc0c on CON-1889 into 8e486bc8f1eb04586bc4b2876be9b9d96eb93b31 on master.

Coverage increased (+0.02%) to 21.285% when pulling 14ebe7b6b00391400c0c4942df4bebfdd8f51ab8 on CON-1889 into 8e486bc8f1eb04586bc4b2876be9b9d96eb93b31 on master.

Coverage increased (+0.02%) to 21.306% when pulling 6c6b0ed405ab1e235ed094a3442d2218118af794 on CON-1889 into dbe14f1448a1fcae56a75d76a903a0fe7ccf8a4b on master.


When using ocdev component or ocdev application it defaults to get

Current behavior:
▶ ./ocdev application
The current application is: nodeapp

Intended behavior:
Perform application operations

Usage:
  ocdev application [flags]
  ocdev application [command]

Aliases:
  application, app

Available Commands:
  create      Create an application
  delete      Delete the given application
  get         Get the active application
  list        Lists all the applications
  set         Set application as active

Flags:
  -h, --help    help for application
  -q, --short   If true, display only the application name

Global Flags:
  -v, --verbose   Verbose output

Use "ocdev application [command] --help" for more information about a command.

It should be outputting help, but instead, this defaults to the "get" command.

@kadel I see. Closing.


Put output document CSS into a shared stylesheet

Parse it as SCSS
@aduggin

Fixup commit will need rebased

Does the job :+1:

Ready for merge @aduggin !

This is now redundant


docs(readme): note that travis only builds linux clients

Needs a rebase

related: https://github.com/deis/workflow/issues/118

no rebase required :trollface:


Redundant Self broken for Active Record Concerns

# /app/models/concerns/lat_lng.rb
module LatLng
  extend ActiveSupport::Concern

  def lat
    coordinates.try(:[], 1)
  end

  def lat=(coordinate)
    self.coordinates = [] if coordinates.nil?
    self.coordinates[1] = coordinate
  end

  def lng
    coordinates.try(:[], 0)
  end

  def lng=(coordinate)
    self.coordinates = [] if coordinates.nil?
    self.coordinates[0] = coordinate
  end
end

$ rubocop app/models/concerns/lat_lng.rb produces:
app/models/concerns/lat_lng.rb:10:5: C: Redundant self detected.
    self.coordinates[1] = coordinate
    ^^^^^^^^^^^^^^^^
app/models/concerns/lat_lng.rb:19:5: C: Redundant self detected.
    self.coordinates[0] = coordinate

But its wrong. The self is required there! coordinates is a property of the model that includes LatLng

Similar but slightly different issue https://github.com/bbatsov/rubocop/issues/1933

Have you tried removing self.? What happens when you test/run the code?

Yes it of course does not work without self.
class Address
  includes LatLng
  #....
end

a = Address.new
a.lat = 34

Is how it's used. Without the self then puts a.lat would be nil.

That sounds strange to me because the following stand-alone program prints 34 when I run it:
require 'active_support'
require 'active_support/core_ext/object/try'

# /app/models/concerns/lat_lng.rb
module LatLng
  extend ActiveSupport::Concern

  def lat
    coordinates.try(:[], 1)
  end

  def lat=(coordinate)
    self.coordinates = [] if coordinates.nil?
    coordinates[1] = coordinate
  end

  def lng
    coordinates.try(:[], 0)
  end

  def lng=(coordinate)
    self.coordinates = [] if coordinates.nil?
    coordinates[0] = coordinate
  end
end

class Address
  include LatLng

  attr_accessor :coordinates
end

a = Address.new
a.lat = 34

puts a.lat

This is as expected because a.lat = 34 calls LatLng#lat=, and when coordinates[1] = coordinate is evaluated, coordinates is evaluated first before #[]= is called on that object. If there's no local variable with the same name, coordinates will be called on the current object (implicit self).

We also work extensively with ActiveSupport::Concern in our models.  I have only found a problem removing self when self. when the invocation was to an attribute dynamically populated (via method_missing) and the call collides with a reserved keyword.  The reason there is obvious.  But otherwise, rubocop suggests the correct action.

It is important to note that Rubocop only registers an offense on the redundant usages of self., not every self.. Refer to the example posted by @jonas054. (Setting an attribute needs the self. prefix to avoid declaring a new local variable.)
The RedundantSelf cop supports auto-correcting your code. Please try auto-correct and report if there is still an issue.


Configurable peers

Includes both, the changes on hydra-node to allow to ModifyPeers, and an interface to it in the hydra-tui to add/remove peers.
When we opened & reviewed this PR, we decided to close it and not merge it to master. See closing comment for details.

We have had a discussion on the configurable peers and while it is really at a point where we could merge this.. the overall UX and goal of the story is not where @abailly and me feel it should be going.
It's a bit sad, but we decided to park this for now. Keep it on a branch, demo it, but not merge and release it on 0.7.0.
Some details on what was lacking in the approach (not the implementation)

If the connection between two nodes (A and B) is only specified from one direction (e.g. A -> B)

Node B does see the incoming connection and reports a PeerConnected

This is exactly the wrong way around, if at all node A should see B connected as messages sent from A would reach B, but not the other way around

Changing this is not trivial. We drew some things on Miro today (evolved to the drawing below) and no simple / clear solution is evident.

It's complicated to improve because our use of the ouroboros-network and basically treating each connection unidirectional, not really taking advantage of TCP connections.

We started discussing how we imagine the two peers needing to be configured and realized that it actually does not solve the initial user journey. All nodes need to have connection info of all the other anyways eventually.

The problem within this is not the non-interactivity: whether to do it via command line, config file or via API makes not much difference. In fact, configuring a process via an API is even more annoying than changing some config its command line.


error while running examples

The U array in plot_timeseries(T, X, U) is empty (U=[])
the simulate_and_animate function is returning:
T = [0.0]
X = [[0.0, 0.0, -7.37344695478681e-05, -0.000171805470714]]
U = []

Error while running:
$ python3 pid_traj.py
/double_pendulum/lib/python3.10/site-packages/double_pendulum/simulation/simulation.py:1063: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  plt.show()
Traceback (most recent call last):
  File "/double_pendulum/examples/ideal/pid_traj.py", line 60, in <module>
    plot_timeseries(T, X, U,
  File "/double_pendulum/lib/python3.10/site-packages/double_pendulum/utils/plotting.py", line 213, in plot_timeseries
    T[: len(U)], np.asarray(U).T[0, : len(T)], label=r"$u_1$", color="blue"
IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed

Hi @varunvenna ,
the problem is that your matplotlib is using a non-GUI backend (see the warning after your command). If you would like to see the animation switch to a gui backend e.g. with
import matplotlib
matplotlib.use('TkAgg')
If you want to simulate the double pendulum without animation you can use the sim.simulate(...) function which is commented below the sim.simulate_and_animate(...) function in the pid_traj.py script you are testing.

okay. thank you!
The problem is resolved by just installing python3-tk
sudo apt-get install python3-tk


make update_market calls consistent across repo

we have 2 update methods for the market.  some times we use self.update_market(market_deltas) (e.g. in redeem_withdraw_shares) and sometimes we use self.market_state.apply_delta(market_deltas) (e.g. in open_borrow).
we should always use self.update_market() since it is doing the same thing with additional checks.
note that update_market()  checks for market not equal to zero, which can happen for certain things like removing liquidity, so we'll have to figure that out.

Closing since we will be rewriting the sim repo from scratch