Endless componentWillUnmount loop with  when another update is triggered

Here's the reproduction, it's a plain create-react-app https://github.com/Prinzhorn/react-spring-will-unmount-bug/blob/master/src/App.js
Quick start
git clone git@github.com:Prinzhorn/react-spring-will-unmount-bug.git
cd react-spring-will-unmount-bug
npm i
npm start

Open your JavaScript console, run the example app and hit the button "Toggle Panel" twice. When the panel is closing you can see an endless loop of:
componentWillUnmount
componentDidMount
render
componentWillUnmount
componentDidMount
render
componentWillUnmount
componentDidMount
render
componentWillUnmount
componentDidMount
render

(it's not actually endless, React will kill it after 1000 runs).
If you remove line 33 this.props.onDataChange('bar'); the endless loop is gone, however the lifecycle hooks are still not correct
render
componentWillUnmount <--- triggered when the animation starts
componentDidMount
componentWillUnmount <--- triggered when the animation ends with no render call in-between

Details
I have a side-panel in my app with some settings (text inputs and such). I want to save the changes once the panel is closed, that's why I pass the updated data to a central store from inside componentWillUnmount. However, the panel(s) are controlled by a react-spring <Transition> which does weird things. The updated data will cause the <Transition> (or the containing component) to re-render but always with an empty array (since the panel is currently closing). But it is still causing the to-be-removed panel to be mounted/unmounted endlessly.

Something is super fishy with the lifecycle hooks. Here's what happens when I keep smashing the Toggle Panel button with line 33 removed
http://www.prinzhorn.me/vokoscreen-2018-06-28_12-22-37.mp4
I don't think they should stack/queue up like that.

Looks like some discussion regarding the second issue is already happening in #134, so we should focus on the endless loop in this issue.

It looks like it pushes the same key for all elements, can that be?

It looks like it pushes the same key for all elements, can that be?

What is pushing keys to where? If I log panel and keys here they're always 0 during the endless loop
https://github.com/Prinzhorn/react-spring-will-unmount-bug/blob/0108dbe61927d164e001876e91ae342970d8c5d6/src/App.js#L90-L94

This part
let keys = [];
if (this.state.showPanel) {
  panel.push(({ x }) => (
    <Panel
      key="the-best-panel"
      style={{ transform: x.interpolate(x => `translate3d(${x},0,0)`) }}
      data={this.state.data}
      onDataChange={this.handleDataChange}
    />
  ));
  keys.push('the-best-panel');
}

return (
  <Transition native keys={keys} from={{ x: '-100%' }} enter={{ x: '0%' }} leave={{ x: '-100%' }}>
    {panel}
  </Transition>
);

I found going back to v4 helped. Whilst v4 doesn't seem to be able to do the no-key feature, this worked just fine:
<Transition
    keys={showLogo ? "logo" : id}
    from={{ opacity: 0 }}
    enter={{ opacity: 1 }}
    leave={{ opacity: 0 }}
  >
    {showLogo
      ? styles => <Logo key="logo" style={styles} />
      : styles => (

            ...

        )}
</Transition>

@Prinzhorn could you map this into a codesandbox? A lot of issues crept up while i was away, would make it easier on my part to get on top of it all. :-)

@Prinzhorn i've looked through it, it's a bug in your code. First, you shouldn't use transition for a sidebar, it's a basic spring you're looking for. But since you do, you actually mount and unmount that bar on every change of this.state.showPanel. The infinite loop that's now caused is also in your app, you call this.props.onDataChange('bar') in componentWillUnmount, which then calls setState.
Here's a fixed example:
import React, { Component } from 'react'
import { Transition, animated } from 'react-spring'
import logo from './logo.svg'
import './App.css'

class Panel extends Component {
  constructor(props) {
    super(props)
    this.state = { value: props.data }
  }

  handleChange = e => this.setState({ value: e.target.value })

  componentDidMount() {
    console.log('componentDidMount')
  }

  componentDidUpdate() {
    console.log('componentDidUpdate')
  }

  componentWillUnmount() {
    console.log('componentWillUnmount')
  }

  render() {
    console.log('render')
    return (
      <animated.div style={this.props.style} className="panel">
        <input
          type="text"
          value={this.state.value}
          onChange={this.handleChange}
        />
      </animated.div>
    )
  }
}

class App extends Component {
  state = { showPanel: false, data: 'foo' }

  togglePanel = () =>
    this.setState(prevState => ({ showPanel: !prevState.showPanel }))

  handleDataChange = data => this.setState({ data })

  render() {
    return (

          <button onClick={this.togglePanel}>Toggle Panel</button>

        <Transition
          native
          from={{ x: '-100%' }}
          enter={{ x: '0%' }}
          leave={{ x: '-100%' }}>
          {this.state.showPanel &&
            (({ x }) => (
              <Panel
                style={{
                  transform: x.interpolate(x => `translate3d(${x},0,0)`)
                }}
                data={this.state.data}
                onDataChange={this.handleDataChange}
              />
            ))}
        </Transition>

    )
  }
}

export default App

But like i said, i wouldn't cause the Sidebar to re-instanciate, it isn't good for performance. Better use Spring and maybe switch it off (display: none) when it's out, but you should let critical components always linger around in react and the dom in general because the cost of causing a full nested tree re-do is expensive.

@will-stone would you open a new issue with an isolated csb example? until now i can't see a problem in transition, it behaves as it should. i'd need an example to look into it.

@drcmda thank you very much for taking the time to take a closer look. I have to take a closer look at your proposed solution but two things from the top of my head:

I'm not actually using this for a single sidebar. In reality the sidebar can be navigated and have nested children (similar to a navigation context in an app). That means there is a stack of open panels and a back-button, which pops one off the stack. Hence the use of <Transition> and not <Spring> (the nested panels/cards are stacked on top of each other and popping them fast gives the nice Transition effect). The example is just the minimal code the reproduce the issue.
The proposed solution does not use componentWillUnmount but I deliberately put the onDataChange in there. It's the exact moment I want the data to be passed to the parent. As I said the side-panel contains text inputs and controlled inputs need a corresponding state. I hold this state as low as possible right on the panel. However, once the panel is closed I need to notify the parent of the new data, it does not need them any sooner. In your case you are passing the data up for every keystroke. How will I know when the nested panel is closed? Using componentWillUnmount sounds like the perfect place for what I want to achieve and it makes it completely transparent to the parent. If I turn the control upside down then the parent would need to hold the state for every single controlled input in every single nested panel and thus needs to know about the panels implementation details.

@Prinzhorn  I'd put the sidebar into a normal spring, a button controls its visible state, similar to this demo: https://codesandbox.io/embed/zl35mrkqmm
As for the rest, could you make a demo without any animation? children notifying their parents is usually not a good idea, unless you do it with context, but setStating into the parent in the middle of an unmount is probably going to be problematic. The infinite loop i debugged in your example stemmed from that.
If you can, codesandbox would make this quick and painless on my side.

I'd put the sidebar into a normal spring, a button controls its visible state

like I said there is not a single sidebar. I'll try to put a demo up.

As for the rest, could you make a demo without any animation?

That would be my exact demo but just remove the <Transition> and render the panel(s) directly. That's kind of the selling point of <Transition> for me that you can just wrap some existing children which would otherwise enter/leave without a transition. I'll try to make a demo which better showcases what I'm doing.

children notifying their parents is usually not a good idea

It was my understanding that this in the primary way to pass data with plain React (pass a function down using props which the children can use to pass data back up). The new Context API merely makes this more comfortable by skipping a few intermediate parents and making it less verbose to pass things up and down, it's still the same thing. I am in fact using context and don't notify the parent directly, the parent just happens to consume it. If you abstract this away using something like Redux it gets worse because you can pass data to a parent without knowing it (all you do is update the store and don't care who's watching it).

setStating into the parent in the middle of an unmount is probably going to be problematic

React itself guarantees that componentWillUnmount is only ever triggered once. From the name componentWillUnmount I also thought it would not be in the middle of an unmount but before.
I can try to move the notification code to some other place, e.g. the button click handler. But since the button click triggers the unmounting it will likely still happen synchronously within the same tick so I don't gain anything.
Thanks again for taking the time. Maybe I'm using the <Transition> API wrong but I'll try to put a demo up which resembles what I'm actually doing.

I've created a more realistic test case. It is a bit more complex but we have already established that the issue can be reproduced with the basic test case in my first post. This demo shows a use-case that cannot trivially be replaced with a <Spring> without re-implementing most of the <Transition> logic.
So let's say in my App I have an article object. An article has a text body, a title, a meta description, a background color, some fonts, a header image and a lot more. I store these in a single object which is synced with a database. This article being edited is available throughout the app via context, a redux state or whatever you prefer. The demo uses a plain state.article at the App.js level. I have a side panel where all these attributes of the article can be edited in a nicely organized fashion. The side panel itself has a navigation context and a back button to hierarchically organize all of the article details that can be edited. Every side-panel is independent of each other and knows about the current article object. Again, this could be a context, a redux store or for simplicity it's just an article props. Every panel (and other parts of the app) are free to mutate the article object and pass it to the context, store or whatever (in the demo it is passed using this.props.onArticleChange). It then periodically gets synced to the server.
The demo shows three things that can be edited which are organized hiercharchically to demonstrate why I use <Transition>. <Transition> gives me the nice transitions I want, even when smashing the back-button multiple times (e.g. when you navigate to root->meta->title and hit back two times). What you suggested was that I could use <Spring> and just hide every panel without actually destroying it. But that defeats the purpose. Some panels make network requests or open WebSockets. I need to create/destroy them the same way I would if I would not use transitions at all. For that reason I need a reliable componentWillUnmount behavior (regardless of the endless loop we are discussing here, the lifecycle methods are also called multiple times in an unexpected way).
Uncomment line 65 in App.js for the endless loop.
https://codesandbox.io/embed/r1o71p7x1m?module=%2Fsrc%2FApp.js

I tracked it for a while, i am still stuck - relying on lifecylces/componentWillUnmount to communicate back to the parent which then calls setState is extremely unconventional. If you find another solution for that your problem is fixed.
There's something in transition that clones a leaving transition with a new key. "metadata" gets renamed to "metadata_" for instance. This has to be done, the old key can't be used lest the same object re-appears and stops the old one from transitioning out. This is probably what's causing the loop, but on react-springs side, what it does is fine. It's the componentWillUnmount thing that shouldn't be done.

@drcmda thanks again. I do have very specific thoughts about that but I don't have time today to look into it. I'm sure we can find a clean way to handle that.

This has to be done, the old key can't be used lest the same object re-appears and stops the old one from transitioning out.

I think it all boils down to this sentence. The fundamental question is if this assumption/behavior is correct. Is there really an "old" and a "new" one?
Let's say a child with key K is rendered while a previous child with key K is transitioning-out. Should we really render a new element or is this fundamentally just a case of passing the right props to the existing child and changing the animation (which I assume is handled by spring)? Since we're already relying on keys and keys are used to identify things it seems odd that we now have two object which were originally given the same key by the user of <Transition>.

I render [A, B, C]
They all transition-in
Later I render [A, B]
C starts to transition-out (it's still mounted and componentWillUnmount hasn't fired)
During the transition I render [A, B, C] again
C, which is currently transitioning-out, stops half-way and does the transition-in animation. This is something that <Transition> doesn't have to care about in detail, it just changes the prop on the <Spring> that wraps C.
We end up with the same thing being rendered as after 2. has finished. From the perspective of C nothing really happened (not even componentDidUpdate if native is used) since it has never actually been unmounted.

All that <Transition> would really do is delegate to <Spring> and then actually unmount a component in onRest if the direction was out. It think if we key the <Spring> with the key of the child it wraps that React will handled most of the nitty-gritty for us.
All that being said, I haven't seen the react-spring code and maybe I'm missing something.

@drcmda Apologies for taking so long to set this up but here's my sandbox of this issue: https://codesandbox.io/s/1vjk1jn4ll
In the Logo component, you can see that the animation stops at the end (using animation-fill-mode = forwards). However there is a flash of its initial state as it fades out because it has been remounted.

And here's the working comparison when using v4 of React-Spring: https://codesandbox.io/s/pw318qn21x

@will-stone yes, i see, that's unfortunate. The re-keying essentially re-mounts your Logo component which prompts the browser to run the css animation again. v4 didn't re-key, but then again, it couldn't guarantee an uninterrupted fade-out if an element with the same key entered again.
I would like to support both, guaranteed exit without remount. But this isn't trivial - i'll need some time to get this right.

Thanks @drcmda I ended-up making the animation return to the start as a sort of hack. In the end, I preferred that animation, anyway, as it worked well with the website: https://will-stone.github.io/SpotSpot/

Looks nice, but i can see now how Transition should support it - the css thing is a pretty serious strike against the current model.

@Prinzhorn @will-stone could you guys try 5.4.2-beta? I implemented the key-deriving part from scratch and now it doesn't re-key exit transitions.

I guess i just release and close this

@drcmda Looks good to me. Thanks!

@drcmda thanks, the endless loop is gone! Now the only thing that is left is the fact that componentWillUnmount fires twice because a second component is instantiated (that's what happens in my local project). However, looking at my codesandbox it looks like now other things are broken: components are no longer unmounted after the transition has ended
Steps to reproduce

https://codesandbox.io/s/r1o71p7x1m
Click "Meta Data"
Click "Title"
Click "Back"
The "Title" Panel is still in the DOM even though the only key that was rendered was "metadata" (see console: Rendering nested panels: metadata and it was Rendering nested panels: metadata, title before)

I think before continuing we need tests for Transition (independent from #102, these wouldn't test the animations itself but how the lifecycle methods behave).

@Prinzhorn this could be a react error, update to react 16.4. They had a bug before where getDerivedStateFrom props isn't consistently called. I've seen the effect of it before, elements stay put after the exit phase. After the update this shouldn't happen.

tried it, yep, they're gone now.

maybe I'm doing something wrong, I'm not used to CodeSandBox. I've changed the dependency to 16.4.1 and to make sure it worked I render React.version in the title of the app. However, the panel is still there? https://codesandbox.io/s/r1o71p7x1m

react-dom is still on 16.3.1 in that box.


Adds [signature::Signer] compatibility wrappers

This adds rsa and ecdsa wrappers to provide pgp operations with a key kept in an external storage.

This is a very rough first cut, but I'd love to know if this is something we could add here.
Thanks!


Path Errors & Crashing

O/S : VM X64 - Debian 11 - Clean Install using sid repo.
Successful build and install of 862947b
When Embroidermodder is launched there are Path Errors
Cannot locate: :/help
Cannot locate: :/samples
Cannot locate: :/translations
After that it opens and looks ok, I pulled the submodules so i clicked on help and got this error
Error -- KIO Client
The file or folder //usr/bin/help/doc-index.html does not exist
If i select a .dst to open Embroidermodder crashes as soon as the file is selected.
davie@debian:~$ embroidermodder
Reading Settings...
LayoutState NOT restored! Setting Default Layout...
language: default
CmdPrompt Constructor
CmdPromptInput Constructor
CmdPromptHistory Constructor
CmdPromptSplitter Constructor
CmdPromptHandle Constructor
CmdPromptHandle Constructor
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
QLayout: Attempting to add QLayout "" to PropertyEditor "", which already has a layout
javaLoadCommand(about)
QIODevice::read (QFile, "/usr/bin/commands/about/about.js"): device not open
javaLoadCommand(exit)
QIODevice::read (QFile, "/usr/bin/commands/exit/exit.js"): device not open
Creating All Actions...
QObject::connect: No such slot MainWindow::stub_implement()
QObject::connect:  (sender name:   'layerselector')
QObject::connect: No such slot MainWindow::stub_implement()
QObject::connect:  (sender name:   'colorselector')
QObject::connect: No such slot MainWindow::stub_implement()
QObject::connect:  (sender name:   'linetypeselector')
QObject::connect: No such slot MainWindow::stub_implement()
QObject::connect:  (sender name:   'lineweightselector')
QObject::connect: No such slot MainWindow::stub_implement()
QObject::connect:  (sender name:   'hidealllayers')
QObject::connect: No such slot MainWindow::stub_implement()
QObject::connect:  (sender name:   'showalllayers')
QObject::connect: No such slot MainWindow::stub_implement()
QObject::connect:  (sender name:   'freezealllayers')
QObject::connect: No such slot MainWindow::stub_implement()
QObject::connect:  (sender name:   'thawalllayers')
QObject::connect: No such slot MainWindow::stub_implement()
QObject::connect:  (sender name:   'lockalllayers')
QObject::connect: No such slot MainWindow::stub_implement()
QObject::connect:  (sender name:   'unlockalllayers')
MainWindow createAllMenus()
MainWindow createFileMenu()
MainWindow createEditMenu()
MainWindow createViewMenu()
MainWindow createSettingsMenu()
MainWindow createWindowMenu()
MainWindow createHelpMenu()
MainWindow createAllToolbars()
MainWindow createFileToolbar()
MainWindow createEditToolbar()
MainWindow createViewToolbar()
MainWindow createZoomToolbar()
MainWindow createPanToolbar()
MainWindow createIconToolbar()
MainWindow createHelpToolbar()
MainWindow createLayerToolbar()
MainWindow createPropertiesToolbar()
MainWindow createTextToolbar()
MainWindow createPromptToolbar()
MainWindow::updateMenuToolbarStatusbar()
MainWindow::hideUnimplemented()
MainWindow::resizeEvent()
MainWindow::openFile()
Qt: Session management error: networkIdsList argument is NULL
MainWindow::findMdiWindow(/home/davie/logo-369.dst)
View toggleRuler()
View toggleReal()
SelectBox setColors()
SelectBox setColors()
MdiWindow sizeHint()
MdiWindow onWindowActivated()
StatusBarButton toggleGrid()
activeView()
View toggleGrid()
StatusBarButton toggleRuler()
activeView()
View toggleRuler()
MainWindow::updateMenuToolbarStatusbar()
MainWindow::hideUnimplemented()
MdiWindow loadFile()
ext: dst
Segmentation fault
davie@debian:~$

The current last commit resolves the can't find assets errors.

This is resolved now: however the pattern does not show in the window so I'll open a new issue.


Set Minimum Y Value on Raw Run Time Graphs to Reflect Actual Data Minimum

See https://github.com/PragTob/benchee_html/issues/7
Hello @PragTob I have been looking through the plot.ly documentation and it appears that y0 is meant to be as an alternative to y -- which accepts the array of run time data -- and thus will not fit this solution. The next best option I have found is a range layout setting. Implementing this setting to satisfy the requirements of this issue requires using it's minimum and maximum values and then applying the arithmetic in the original issue post to get a revised minimum value for the y axis. I have done this in my pull request in the javascript assets.

Let me know if you want me to proceed with writing a test. If I were to do so would I be testing the generated html files (I guess actually the benchee.js file)?

:wave:
The tests look at the generated HTML but it's hard to guess with the JS. We might want to/need to add js tests but that's obviously to big for this ticket :) So, no test should be good enough here. I also have a plan to add wallaby testing. Should put that into an issue.
Also apparently github is case sensitive so it needs to be @PragTob :D
I'll check this branch out and see how the results look like :)
Thanks a lot for digging into this! :tada:

Can we make the value of the "base" y axis show up in the bottom left? Or some sort of hint that we don't start at 0? Right now people could still mistake it. I mean, with the hovering it's easy to discover but if we just had another indicator for the base line I think it'd be clearer :)

I've been looking at a couple ways to do this and would love some feedback about which approach would be better suited for this feature:

The first thing I tried was to manually add a 0 value to the y axis. After looking at the y axis documentation for ticks I realized that if y0 is set,  dtick must also be set to determine the spacing between ticks. This would result in having arbitrary (uniformly spaced) values  along the y axis since the y0 is not necessarily a round number. Another way to use ticks to get a y0 label is to manually set each tick. This issue I see here is that this would require writing a robust function for calculating each tick based on the maximum and minimum y value that is well tested and handles any pair of min/max values and results in a well laid out graph. This is definitely doable but may be in the scope of another pr.
A second approach I have taken is trying to use an annotation. Annotations allow arbitrary one off notes about the data but I am having issues aligning the actual annotation with the other y axis labels. Right now I am using the following annotation and get an annotation that shifts the axis over. Were there to be a logical place to put this annotation that doesn't obfuscate the graph but still informs the user that it does not start at 0 that could be a good solution to this problem.

annotations: [{ x: 0, y: minY, text: parseInt(minY), showarrow: false, xref: "x", yref: "y", xshift: -25 }]

@PragTob @devonestes I would appreciate any feedback here! Thanks for your time reviewing this pr and answering my questions!

@kinson the shown approach (I think it's the second one you mentioned) looks good enough for me :) The first indeed sounds to complicated imo. Thanks for taking all the time to research this and put time into this!

I just updated it to include the shown approach. Since this change displaces the y axis a little bit, should this something that could be disabled with a flag? Here is a screenshot again of the resulting graph with this most recent commit

@kinson thanks a ton! Phew... I know I have a lot of configuration options but I really don't want to have it :D So, honestly - until someone complains I'd keep it. And if someone complains we could look again if we could find another way to circumvent this problem. And only then would I add an option :)
So, I'm gonna hit merge :rocket:

@PragTob & @devonestes thanks for your guidance on this!


Unsupport chinese ？

Dupe of #7.
See https://github.com/mscodemonkey/Sketch-Find-And-Replace/issues/27 for image.

I close this one -> #7
Helps wanted.
Who can create a Sketch doc in chinese for us ?


Update Compose Navigation version to 2.6.0

What does this PR do?
This PR updates Compose Navigation library to the stable 2.6.0 version.
Review checklist (to be filled by reviewers)

[ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
[ ] Make sure you discussed the feature or bugfix with the maintaining team in an Issue
[ ] Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

Codecov Report

Merging #1542 (7f82deb) into develop (a0b843c) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop    #1542      +/-   ##
===========================================
+ Coverage    83.41%   83.42%   +0.01%
===========================================
  Files          438      438
  Lines        14872    14877       +5
  Branches      2242     2246       +4
===========================================
+ Hits         12405    12411       +6
  Misses        1881     1881
+ Partials       586      585       -1

Impacted Files
Coverage Δ

...oid/rum/tracking/NavigationViewTrackingStrategy.kt
86.49% <100.00%> (+0.98%)
:arrow_up:

... and 17 files with indirect coverage changes


Improved python virtualenv creation

Handle the strange way that setuptools replaces dashes in egg-info directory names
Handle the lack of virtualenv and its installation and pip upgrade (to use no-cache)
Added example python tgz application

@aicamargo @danrjohnson @cswingler @stahs
@jdcasale - once this is merged the new version will handle your linked in poller deploys

this has changed more, can I get some extra eyes on it.
The biggest change is a move from installing requirements via a pip hack, to using the setup.py install with a specific .pypirc file that will be created by chef for each app.
@aicamargo @danrjohnson @cswingler @stahs @ccstolley @jdcasale


Cache Becomes Stale

The username and userid cache becomes stale whenever there's a user change. These changes include

A new user joins the server
A user leaves the server
A user changes their name

This issue is noted and will be fixed at some future date. It is not in the scope of the push for version 1.0 as a bot restart will fix this.

This is old, as its now up to the end user to maintain this. Closed.


no attribute connect

Hello please i have question im trying to use your code to get data from my GW10K-ET but when i try to run inverter_check.py and set ip address of my goodwe i get python error
 inverter = asyncio.run(goodwe.connect(IP_ADDRESS, FAMILY, COMM_ADDR, TIMEOUT, RETRIES))                            ^^^^^^^^^^^^^^ AttributeError: partially initialized module 'goodwe' has no attribute 'connect' (most likely due to a circular import)

Hey, did you manage to solve this and?

do not create a file goodwe.py, since it then has the same name as the module you want to import.
Use any other name.
can be closed now.


Build Failed : Duplicate class com.google.common.util.concurrent.ListenableFuture found in modules guava-26.0-android.jar

Build Log
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> 1 exception was raised by workers:

java.lang.RuntimeException: Duplicate class com.google.common.util.concurrent.ListenableFuture found in modules guava-26.0-android.jar (com.google.guava:guava:26.0-android) and listenablefuture-1.0.jar (com.google.guava:listenablefuture:1.0)

  Go to the documentation to learn how to Fix dependency resolution errors.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 7s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

Dependencies in use:
cached_network_image: ^2.3.2+1
calendar_time: ^1.0.1
cloud_firestore: ^0.14.1+2
connectivity: ^0.4.9+3
cupertino_icons: ^1.0.0
firebase_auth: ^0.18.1+1
firebase_core: ^0.5.0
fluttertoast: ^7.1.1
grouped_list: ^3.5.0
images_picker: ^0.0.3
intl: ^0.16.1
sticky_grouped_list: ^1.2.0

@abhidiwakar I don't know.you should run example to test this plugin

you can try adding this into app/build.gradle dependencies
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'

what is the solution for this


question about FPGA performance

Could you please explain how Xilinx FPGAs could achieve higher raw performance than Nvidia GPUs for HPCG ?

Floating point operations with FPGAs are computed using DSP blocks. In current generation devices, it takes 8 DSP blocks to compute a fused MAC operation (2 arithmetic operations). There are 9024 DSPs on a U280 device.  2∗9024/8= 2256 ops per cycle. To exploit the HBM memory of the devices, we run the design at a maximum of 225Mhz. This means the peak double precision floating point performance is 507.6 GFLOPS. The HPCG benchmark is a memory bound problem. We exploit custom memory structures to keep data on chip, to maximise reuse. Results of individual kernels are streamed to the next kernel on chip without going back to HBM where possible.
An upcoming academic paper will include a fuller description of the work.

Look forward to your paper. Thanks.


[BUG_FROM_UNITY_CSI_DRIVER]: Block volume disconnected from server

Bug Description
We recently had an issue with a block volume connected through the Dell CSI Unity Driver. A server node (lyp-kub-apps-05) lost the connection with our array.

As describe in the below screenshot, the IQN of the lyp-kub-apps-05 seems to be switched from iqn.1993-08.org.debian:lyp-kub-apps-05 to iqn.1993-08.org.debian:01:af5bfaf245 to and lost there ISCSI path.

Logs
The pods couldn't be able to connect the device as described below :
Warning  FailedMount             3m56s                kubelet                  MountVolume.MountDevice failed for volume "k8s-prod-990efe9c09" : rpc error: code = Internal desc =  runid=519 Unable to find device after multiple discovery attempts: [registered multipath device not found]

So, i've deleted the daemonset Pods "csi-unity-node-X", and finded the below error from the lyp-kub-apps-05' deamonset. This node was allowed in the access nodes from the Array. In fine, i've recreated the node in the array and it works now
Can we organize a troubleshooting meeting session in order to diagnose this strange behavior happened?
Screenshots
No response
Additional Environment Information
No response
Steps to Reproduce
It happened after new Block CSI PVC creation
Expected Behavior
Creation of PVC without error
CSM Driver(s)
CSI Driver for Unity v2.4.0
Installation Type
Helm chart
Container Storage Modules Enabled
No response
Container Orchestrator
Kubernetes v1.22.5
Operating System
Ubuntu 20.04

@piedai, can you share the logs from the driver container of the crashing instance  ?
thx.

Hi @coulof
Thanks for your feedback, the stdout of the Linux command as asked :
root@lyp-kub-apps-05:/home/myuser# multipath -ll
mpathc<PHONE_NUMBER>5f15100ce56e263d15a2663) dm-5 DGC,VRAID
size=8.0G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| |- 33:0:0:1 sdi 8:128 active ready running
| `- 34:0:0:1 sdh 8:112 active ready running
`-+- policy='round-robin 0' prio=10 status=enabled
  |- 35:0:0:1 sdg 8:96  active ready running
  `- 36:0:0:1 sdj 8:144 active ready running
mpathb<PHONE_NUMBER>5f15100770ce263651c8661) dm-4 DGC,VRAID
size=10G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| |- 33:0:0:0 sdd 8:48  active ready running
| `- 34:0:0:0 sdc 8:32  active ready running
`-+- policy='round-robin 0' prio=10 status=enabled
  |- 35:0:0:0 sde 8:64  active ready running
  `- 36:0:0:0 sdf 8:80  active ready running
root@lyp-kub-apps-05:/home/myuser# blkid
/dev/sda2: UUID="54170c20-fe73-443e-a560-43002bdc467a" TYPE="ext4" PARTUUID="c74a12d6-1692-42c8-8c1e-483865896d9a"
/dev/sda3: UUID="F3L1JP-p4Zz-eWkk-AFHj-v3aT-IAKS-2433KO" TYPE="LVM2_member" PARTUUID="ac59941b-f7b0-4144-9217-cc05fac071cb"
/dev/sdb: UUID="pQuP0w-eSql-ezeU-VVD0-V3MV-Zv0v-I2T6QX" TYPE="LVM2_member"
/dev/mapper/system--vg-var+lib+containerd: UUID="2e082284-7165-4b50-9e66-b99520ec2956" TYPE="xfs"
/dev/mapper/system--vg-var+lib+docker: UUID="2d5af695-95e3-4304-b332-bae0ce750705" TYPE="xfs"
/dev/mapper/system--vg-var+lib+kubelet: UUID="60336888-d616-431c-b63a-c7ad8a47fd01" TYPE="xfs"
/dev/mapper/ubuntu--vg-ubuntu--lv: UUID="9d19ccdf-a11c-468f-8f92-9256757b28f7" TYPE="ext4"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/loop7: TYPE="squashfs"
/dev/sda1: PARTUUID="cce379a1-44fd-4ff9-9556-a1e0fd71c166"
/dev/loop8: TYPE="squashfs"
/dev/loop9: TYPE="squashfs"
/dev/loop10: TYPE="squashfs"
/dev/sdf: UUID="626f8d1b-6b3a-4a5e-9774-9f49b8b5fcf0" TYPE="ext4"
/dev/sdc: UUID="626f8d1b-6b3a-4a5e-9774-9f49b8b5fcf0" TYPE="ext4"
/dev/mapper/mpathb: UUID="626f8d1b-6b3a-4a5e-9774-9f49b8b5fcf0" TYPE="ext4"
/dev/mapper/mpathc: UUID="bb6775e3-b17c-47db-94ec-02d5abd18a15" TYPE="ext4"

@Prabhu-Dell can you have a look at this defect? Thank you!

@Prabhu-Dell please update. Thanks

/sync

link: 19484

@piedai Is this issue resolved? Are you still seeing this issue in your environment?


nil check before size > 0 fixes #1949

CR this, please @javisantana . You can check #1949 for the error it fixes in public views with named tables.

Frontend tests were OK :+1: (details)

:es:
as a side comment, we really need to add tests for vizjson, specially for https://github.com/CartoDB/cartodb/issues/963


az cosmosdb cassandra table create command is in preview

This command group az cosmosdb cassandra is under preview. When we can expect GA version of this? May be it will helpuful if it is mentioned in doc what is current version of command group either Preview or GA.

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

ID: 02f15e72-f5d8-b270-66a6-ad75a6766ff8
Version Independent ID: d4736bea-3a9c-b9f4-defe-e9dfc3696167
Content: az cosmosdb cassandra
Content Source: latest/docs-ref-autogen/cosmosdb/cassandra.yml
Service: cosmos-db
GitHub Login: @rloutlaw
Microsoft Alias: routlaw

route to appropriate team

route to appropriate team

Hey @RajTechcafe I believe your cli module is not updated. The latest module doesn't have this command in preview mode. I believe it has been out of preview for months. Please update your cli client. Please reopen this issue if you still have any further questions.


TextFieldValue: Add 'onchange' event to the event stream.

What's the problem?
As of the moment , we can't use jQuery.ui.datepicker and Bacon.$.textFieldValue on the same input element as follows:
var dateinput = $("#date")
dateinput.datepicker()
Bacon.$.textFieldValue(dateinput).onValue(function(){
     // something
});

... simply because textFieldValue does not listen to 'change' events on the text input, and fails to notice as the datepicker modifies the value of the input element.
The proposal
The problem above can be easily fixed by adding 'change' event to this line:
events = element.asEventStream("keyup input")

The fix above also will increase the interoperability with libraries other than jQuery.ui.

0.4.12 is out. thanks!


Question/Feature: Multilayer bars

I try to implement a sub bar "Reboot to...". So the idea would be to open a new bar to be able to boot into Windows or to Bios.
  {
    "label": "Reboot to...",
    "exec": "/usr/bin/nwg-bar nwg-bar -t /home/asbachb/.config/nwg-bar/bar-reboot.json -s /home/asbachb/.config/nwg-bar/style-reboot.css",
    "icon": "/usr/share/nwg-bar/images/system-reboot.svg"
  },

I tried it this way, but the new bar is not showing up.

Just one instance of nwg-bar is allowed at a time. See: https://github.com/nwg-piotr/nwg-bar/blob/194bfce1c24165009e800985474db1e50b0af23c/main.go#L78


[HIGH] Functionalities_Cartography

Open/Display Cartography Tab (Click on coverage cart : filters are prefilled)

[ ] Add functionality in ARA
[ ] Add NRT

Moved to another project


test_models: support for running on any route

Does this work?

Not a fan of losing parallel running. Can we make this work with pytest instead of unittest?

Should work now without losing any test_models functionality. Made a new file to interface with test_models so there's no difference in behavior. Also made TestCarModel a base class, as the parameterize decorator modifies the original class and removes all its functions, so we couldn't make a test case/suite out of it.


Adding base functionality

This patch series will eventually contain all the work to get the base functionality working. Once this is merged in, we'll have a 1.0 release on our hands!

[x] Leverage node
[x] Document changes
[x] Write tests
[x] Script up cloning repositories
[x] Script up creating logs
[ ] Script up gource API calls
[ ] Script up ffmpeg gif API calls
[ ] nice to have Script up wiring up configurations

With #3 happening, I'm going to revisit this and breakdown the remaining work in additional PRs rather than a whole big one.
Before I merge this in though, I'm going to clean up some of the work here so it's not 18F or other company specific.


Improve the GUI

What does this suggestion do to pi-ware?
Will make users love the application more!
Why should we add this?
Makes it a better and more professional app

could you make a descriptor as to how we should do that? like a drawing of what an improved gui would look like.

like a base for us to go off on

SURE!

thanks

np
Den tis 26 juli 2022 kl 21:03 skrev gl91306 @.***>:

thanks
—
Reply to this email directly, view it on GitHub
https://github.com/piware14/pi-ware/issues/65#issuecomment-1195869734,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AT2IQPUHT2DQQQICJRP6LXLVWAY7DANCNFSM54JGCKHA
.
You are receiving this because you authored the thread.Message ID:
@.***>

closed for now


Regenerating track1 computer-vision for api-version 3.0

Uses the existing track1 versioning scheme for cognitive, not the revised versioning. We'll be using the new versioning scheme when we move to track2. Ref: https://github.com/Azure/azure-sdk-for-java/pull/11152

/check-enforcer reset

/check-enforcer evaluate

/check-enforcer reset

/check-enforcer evaluate

The package is released: https://search.maven.org/artifact/com.microsoft.azure.cognitiveservices/azure-cognitiveservices-computervision/1.0.4-beta/jar


[Bug]: Custom SAML2.0 doesn't show MFA popup

Before you file a bug report

[X] I have checked the issue tracker and have not found an issue that matches the one I'm filing.
[X] This issue is not a troubleshooting question. Troubleshooting questions go here: https://forum.mattermost.com/c/trouble-shoot/16.
[X] This issue is not a feature request. You can request features and make product suggestions here: https://mattermost.com/suggestions/.
[X] This issue doesn't reproduce on web browsers (such as in Chrome). If it does, issue reports go to the Mattermost Server repository.
[X] This issue reproduces on the most recent stable version, or the most recent prerelease version of the Mattermost Desktop App.
[X] I have read the contribution guidelines.

Mattermost Desktop Version
5.3.1
Operating System
macOS Ventura 13.2.1 Apple Silicon M2
Mattermost Server Version
7.9.1
Steps to reproduce
Add the Mattermost server to AWS Identity Center as a custom SAML2.0 application.
Open the Mattermost client on macOS and click on the SAML login button.
Enter the username and click on next.
Enter the password and click on next.
Wait for the popup that prompts you to choose your MFA device.
Select the MFA device and get logged in.
Expected behavior
As soon as I type in my username and password, I'll get prompted for my already added MFA devices. I can choose one and proceed.
Observed behavior
As soon as I type in my username and password, the page is loading but I get no MFA device prompt (pop up).
Log Output
[2023-05-08 11:33:44.763] [info]  {TEAMNAME}___TAB_MESSAGING timeout expired will show the browserview

Additional Information
In the browser version it works just perfectly, but in the client I think the popup gets surpressed.
I don't know if the log output helps.

@itsmichaelk When you say MFA device are you referring to a physical security key (eg. YubiKey)?
If so, there is a fix for the App Store app here: https://github.com/mattermost/desktop/pull/2710
As for the DMG app, Electron does not show a popup for a security key on macOS for some reason, and they don't give us a hook into the process to allow us to pop one, however, the key will still work.
Hope that helps :)

@devinbinnie thanks for your answer!
Yup, I was talking about a physical security key (YubiKey).
I just downloaded the DMG app and tried it - I get no popup (as you already said) but the MFA token is accepted and I get redirected to Mattermost.
Sadly every Mac in our company is using the AppStore version.. so we just have to wait for an update?
Thanks in advance!


Update the "totals areas"

Task description
As we are going to need some changes in the totals area at the top of the account pages in related to the hiding the shielded balance in #160 and the coming delegation updates, we need to make some general updates to the totals areas.
All the changes to both the totals area of the general account page and the account specific totals area can be seen in Flow 9 in Figma.
Each screen has a small description of the specific scenario.
Notes:

When an account is a baker, it will say "Stake with baker 'bakerID'" in the totals area. In the future, when an account can delegate an amount, this string can be "Delegation with baker 'bakerID'". It might not matter now, so this can be disregarded for now if it makes no difference for how it's implemented.

Verified. However, one bug was documented and needs to be fixed.
Versions

Software Version: Testnet 2.0
OS: iOS 14.8
Browser: N/A
Mobile device: iPhone SE


Custom preprocessors fail

I am working on in a stack project using haskell-ghc-mod. It works great in all files that do not use a custom preprocessor like so:
{-# OPTIONS_GHC -F -pgmF htfpp #-}
module Foo where

-- ...

This results in:
could not execute: htfpp

htfpp is in the path and I can not see any other reason why this does not work?

Sorry about taking so long to answer, I kind of missed this issue.
Only thing I can think of is that your PATH isn't picked up by Atom. Try adding full path to directory containing htfpp executable to 'Additional Path Directories' in haskell-ghc-mod settings.

Closing due to inactivity.


Add option to specify strand direction for dupradar script

Add command line option to dupradar.r script.
Check values validity and pass to analyzeDuprates function.
Update other command line arguments (indexes).
Translation and use of nextflow pipeline variables (forward_stranded, reverse_stranded, and unstranded) for dupradar.r script.

Great! Thanks for this - I didn't realise that dupRadar took a strandedness option. When we first wrote this script the pipeline didn't support different modes, which is why it was hardcoded.


Fix OfferContainer grid to match figma design

[x]  Fix the CardList grid to match figma design

✅


Fix bullet titles and add anchors

This PR makes the newsletter content pass the tests described here and then adds those tests to the makefile.  By putting those bullet titles all on one line, they're automatically turned into anchors by a plugin added in a previous PR.
In a final commit, several anchors are manually added.  Content in the not-yet-added topics branches refers to those anchors.

Forced pushed edits for @jnewbery feedback (thanks!)


Merge develop to master

Merge develop to master

@JvnSlv tested the widget_toolkit packages and gave a green light to proceed.
@StanevPrime


Make TaskLevel immutable

Make TaskLevel immutable, moving the mutating part up to Action, which now knows what the last task it logged was.
Also adds some tests that use hypothesis. This slows the test suite a bit (~0.4s on my laptop), because although it looks like I'm adding two tests I'm actually adding two hundred. I'm happy to ditch hypothesis and rewrite them the normal way.
Although not strictly necessary for the parsing work I have planned in #188, this at least helps my thinking about the problem.

Huh. Why is Python 3 test run so much faster?

I'm happy to use hypothesis, it's a useful tool and I want to learn more about using it... and eliot is a good place to try it.

My guess is the slowdown is because the tests run with coverage tracking, and it's probably better implemented in Python 3. So disabling coverage testing would also make hypothesis have less of an impact, but lose information...
In practice is the test suite is fast enough that I don't care, but this might come up as an issue elsewhere.

I've renamed next to next_sibling.
Alas, I also discovered that TaskLevel as PClass isn't ordered. I've added tests & basic comparison methods, as well as filed tobgu/pyrsistent#45. Please take a look.

PClass being non-ordered is deliberate, to be compatible with Python 3.

That seems like a non sequitur to me, but perhaps best discussed on the linked issue.

OK, there's a bunch of minor comments; address to your best judgement and then merge.


Testing for Beta2 coverage demo_nodes_cpp parameter tools are not working correctly on Windows

I am running the parameter nodes in demo_nodes_cpp and under connext they are not working correctly on Windows. They appear to be hanging. The events executables provide some output after the Ctrl-C but not the full equivalent of the fastrtps runs. I've waited 30+ seconds and it still responds quickly immediately after the Ctrl-C.
Output of events after Ctrl-C:

Async version:

Simple set and get just hangs:

For reference fastrtps running the same sample in the same workspace:

I can get the following errors if I run parameter_list side by side simultaneously. This might be the different impelementations. Did we ever homogenize the parameter implementation?
C:\dev\ros2>ros2 run demo_nodes_cpp list_parameters
RTI Data Distribution Service Evaluation License issued to OSRF - OSRF01<EMAIL_ADDRESS>For non-production use only.
Expires on 05-may-2018 See www.rti.com for more information.
PRESParticipant_getLocalOrRemoteParticipantShmemTransportCompatibility:!goto key remoteParticipant
PRESPsService_linkToLocalWriter:!getLocalOrRemoteParticipantShmemTransportCompatibility
PRESPsService_onLinkToLocalEndpointEvent:!create linkToLocalWriter
PRESParticipant_getLocalOrRemoteParticipantShmemTransportCompatibility:!goto key remoteParticipant
PRESPsService_linkToLocalWriter:!getLocalOrRemoteParticipantShmemTransportCompatibility
PRESPsService_onLinkToLocalEndpointEvent:!create linkToLocalWriter
PRESParticipant_getLocalOrRemoteParticipantShmemTransportCompatibility:!goto key remoteParticipant
PRESPsService_linkToLocalWriter:!getLocalOrRemoteParticipantShmemTransportCompatibility
PRESPsService_onLinkToLocalEndpointEvent:!create linkToLocalWriter
signal_handler(2)

ros2param has a different error:
C:\dev\ros2>ros2 run demo_nodes_cpp ros2param list add_two_ints_server
RTI Data Distribution Service Evaluation License issued to OSRF - OSRF01<EMAIL_ADDRESS>For non-production use only.
Expires on 05-may-2018 See www.rti.com for more information.
Timed out trying to list parameters: 10 seconds

C:\dev\ros2>

I tried to run all executables you mentioned (parameter_events, parameter_events_async, set_and_get_parameters, list_parameters) with Connext and all of them worked fine for me. I used a from-source build from on of the Jenkins nodes.
Please try to reproduce the problem from a fresh build and provide more information.

Closing this as I can't reproduce today with an updated tree.


Backend now updates values properly with the SAMs branch on the frontend

The last commits have most likely broken some frontend API calls in RoomAPI, as they don't return Responses anymore but concrete classes. We have to investigate and ensure they still work before merging this branch.
Maybe it is also worth rebasing and squashing due to the sheer amount of commits regarding the average method.
The last 2 commits closes #95 and #96 .

Just as @JeremybellEU said, the frontend has totally broke.
We can't send messages and there is no song playing in a room (it is in the overview,but not in the actual room), therefore I can't check SAMs and likeing.
Are you going to fix this or do we need to take a look on how we're gonna fix this as a team?

(No, seriously :wink: )

It all works and the code seems correct.

Yes looks good, merging!


Parsing JSON response

Hi need to extract the API key from my response so that I can chain some HTTP requests. e.g.
{
"APIKey": "98cab291-cc3a-ffc5-fc13-55ca591b42b7",
"ValidUntil": "/Date(1472126955624)/"
}

I can't seem to see how to do this from the docs.

Have you tried out jq?

Yes, thats what I’m using now. Was rather hoping to do it in one place rather than having to pipe to another util.
Thanks.

On 25 Aug 2016, at 14:16, Ian Cordasco<EMAIL_ADDRESS>wrote:
Have you tried out jq https://stedolan.github.io/jq/?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/jkbrzt/httpie/issues/513#issuecomment-242381618, or mute the thread https://github.com/notifications/unsubscribe-auth/AAh5hx4WeH1-f8OG34nqC0vgx8U3Wk3wks5qjZWegaJpZM4JtBcy.

@carlskii a feature like this is out of the scope of an HTTP client, but luckily we have the wonderful Unix pipes and jq as @sigmavirus24 points out.

but how i can ignore "curl" which is few MB only and i installed httpie which 69MB.. then after that, i found myself still depending on other 3rd party CLI (.i.e "jq") ?


🙈 Add .coverage* to .gitignore

Is the project generating anything other than .coverage?

.coverage* files are being created when running coverage locally. It's because coverage is configured with
https://github.com/fastapi/fastapi/blob/75705617a66300847436e39ba703af1b8d109963/pyproject.toml#L177-L178
The proper way to handle these files is to run coverage combine after running the tests.

Thanks! :cake: :coffee:


Allow subtyping of strings via Regex

Not sure  what the declaration syntax would look like, but maybe something like:
 var x: string</(a|b)*/>;

Examples:
x = "ab";            // good
x = "aaabbbbb" // good.
x = "abc"           // error
x = bar              // error, requires refinement

// good
if (bar.match(/(a|b)*/)) {
  x = bar
}{

https://github.com/facebook/flow/issues/4654

Duplicate of https://github.com/facebook/flow/issues/4654
/cc @vkurchatkin


Limit the amount of data request can receive

We're ran into an issue where someone passed a 250MB file through request causing node to memleak and die.
It would be great to have a limit that say something like: after you read more than 2MB die somehow.

Use the event handlers instead of the callback and implement that logic yourself:
// pseudo code
var req = request('http://get-something-large')
var length = 0
req.on('data', function (chunk) {
  length += chunk.length
  if (lenght > 250MB) req.abort()
})

The callback handler tries to buffer the entire response body in memory, so it's important to remove your callback handler function.

It would be great if there would be an easier way. What I'm trying to do is find the final destination for tracking links (eg bit.ly, affiliate links, etc). This final URL might be hidden behind 5-6 redirects and doesn't work with HEAD.
I'm NOT trying to download files. In fact worst case scenario I want to parse a bit of HTML.
But this means someone can send me a link which takes me to a 250MB file and DoS my whole server. I

Check out this issue then https://github.com/request/request/issues/1851


added croatian translations

Q
A

Bug fix?
no

New feature?
no

BC breaks?
no

Deprecations?
no

Related tickets
/

License
MIT

Thank you, Antonio!


Censored Chemistry Data Functionality

I am too much of an amateur to provide a meaningful, constructive issue.  However, I prefer python for analysis, and the functionality of your package is pretty nice. I am using survival analysis to accommodate for nondetects in water chemistry data. I would like to see more functions like the ones provided in the R package NADA, specifically the cenfit and cendiff functions, where there is greater flexibility for left-censored data.  Maximum Likelihood Estimation techniques would be awesome, as well as Bayesian estimates.  The NADA scripts are based mostly off of work by a former U.S. Geological Survey employee named Dennis Helsel.  I apologize for being so vague, and for using your script issues as a comment board.  Thank you for your work!

Hey @inkenbrandt,
We do support the kaplan-meier based inference for left-censored data, but I'm not sure we'll extend it to MLE or Bayesian approaches.
from lifelines import KaplanMeierFitter
D = [4,2,1,4,5,2,1,2]
C = [0,1,0,1,1,1,0,1]
kmf =
kmf = KaplanMeierFitter()
kmf.fit(D, C, left_censorship=True)
kmf.cumulative_density_

Thanks CamDavidsonPilon!


updated currency to be handled in more transparent way

Fix broken Travis test

Current coverage is 95.46% (diff: 100%)

No coverage report found for master at 00bbe07.

Powered by Codecov. Last update 00bbe07...7f2d433

if you ask about templatetag than nowhere, just prepared to use if anyone wants it. It you asked about setting value, that  we do send it to PayPal.


Unhandled exception when dash in event name

Please confirm the following

[X] I agree to follow this project's code of conduct.
[X] I have checked the current issues for duplicates.
[X] I understand that ansible-rulebook is open source software provided for free and that I might not receive a timely response.

Bug Summary
An unexpected exception is thrown when using a dash (minus) as part of the condition string:
condition: event.payload.vendor-product.rule == "Test"
Environment
__version__ = '0.12.0'
  Executable location = /root/eda-venv/bin/ansible-rulebook
  Drools_jpy version = 0.3.0
  Java home = /etc/alternatives/jre
  Java version = 17.0.7
  Python version = 3.9.14 (main, Jan  9 2023, 00:00:00) [GCC 11.3.1 20220421 (Red Hat 11.3.1-2)]

Steps to reproduce
Trivial to reproduce:
# cat rulebook.yml
---
- name: Listen for events on a webhook
  hosts: all
  sources:
    - ansible.eda.webhook:
        host: <IP_ADDRESS>
        port: 5000
  rules:
    - name: Check performance events
      condition: event.payload.vendor-product.rule == "Test"
      action:
        run_playbook:
          name: action.yml
# ansible-rulebook --inventory inventory.yml --rulebook rulebook.yml
2023-04-24 09:27:28,539 - ansible_rulebook.cli - ERROR - Unexpected exception
Traceback (most recent call last):
  File "/root/eda-venv/lib64/python3.9/site-packages/ansible_rulebook/condition_parser.py", line 320, in parse_condition
    return condition.parseString(condition_string, parse_all=True)[0]
  File "/root/eda-venv/lib64/python3.9/site-packages/pyparsing/core.py", line 1141, in parse_string
    raise exc.with_traceback(None)
pyparsing.exceptions.ParseException: Expected end of text, found '.'  (at char 28), (line:1, col:29)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/eda-venv/lib64/python3.9/site-packages/ansible_rulebook/cli.py", line 223, in main
    asyncio.run(app.run(args))
  File "/usr/lib64/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib64/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/root/eda-venv/lib64/python3.9/site-packages/ansible_rulebook/app.py", line 71, in run
    startup_args.rulesets = load_rulebook(
  File "/root/eda-venv/lib64/python3.9/site-packages/ansible_rulebook/app.py", line 171, in load_rulebook
    rulesets = rules_parser.parse_rule_sets(data, variables)
  File "/root/eda-venv/lib64/python3.9/site-packages/ansible_rulebook/rules_parser.py", line 72, in parse_rule_sets
    rules=parse_rules(rule_set.get("rules", {}), variables),
  File "/root/eda-venv/lib64/python3.9/site-packages/ansible_rulebook/rules_parser.py", line 143, in parse_rules
    condition=parse_condition(rule["condition"]),
  File "/root/eda-venv/lib64/python3.9/site-packages/ansible_rulebook/rules_parser.py", line 177, in parse_condition
    return rt.Condition("all", [parse_condition_value(condition)])
  File "/root/eda-venv/lib64/python3.9/site-packages/ansible_rulebook/condition_parser.py", line 324, in parse_condition
    raise ConditionParsingException(msg)
ansible_rulebook.exception.ConditionParsingException: Error parsing: event.payload.vendor-product.rule == "Test". Expected end of text, found '.'  (at char 28), (line:1, col:29)

Actual results
Unexcepted exception.
Expected results
No exception.
Additional information
While the code will likely be easy to fix I think the documentation should already at this point provide instruction how vendors should setup "namespace" for their products. I've now seen one project to use a generic condition name (event.payload.<rule-name> e.g. event.payload.lifecycle) while another tried to create a namespace with event.payload.project-component.rule type approach.
Since in most enterprises where only one port is expected for each service (such as EDA) instead of a separate port for each event source there needs to a way how to avoid overalapping names with different vendors and event sources. Perhaps we should a have separate doc issue for this.
Thanks.

would event.payload['vendor-product'].rule == "Test" or event.payload['vendor-product']['rule'] == "Test" work?

Hello. There are some constraints for event keys that are not properly documented yet. The way to deal this kind of situation would be to use a source filter to transform the incoming events. For this specific case, we already provide a source filter that replaces dashes to underscores:
https://github.com/ansible/event-driven-ansible/blob/main/extensions/eda/plugins/event_filters/dashes_to_underscores.py
Related with: https://issues.redhat.com/browse/AAP-11514

FWIW, we'll tweak the "pcp-pmie" JSON field name that triggered this issue to split it up into {"pcp":{"pmie":{ ... }}} - on discussing with @myllynen we think this will be a cleaner approach in general anyway.


ContentType relations

Hey, i created a ContentType class which parse a plain content type "text/xml".
With it we can extract the parts type/specific+subtype;params from the content type
and check if the content type has a relation to another one.
application/gml+xml belongs to application/xml
So we can support application/xml and every specific xml format like

application/gml+xml
application/example+xml
will be supported as well.

This looks certainly useful. 👍
I have a couple of questions though:

How does it improve the way GeoRocket handles Content-Types at the moment? I haven't had a problem importing XML files yet. Which client produces application/gml+xml?
Is the terminology correct? https://en.wikipedia.org/wiki/Media_type specifies other terms for the individual parts of the media type.
There is no library handling media types yet? I'd rather use a library than reinvent the wheel.

How about this?
boolean belongsTo(String contentType, String type, String subtype) {
    return contentType.startsWith(type + "/") &&
        (contentType.endsWith("/" + subtype) || contentType.endsWith("+" + subtype));
}

Alternatively, if you want to make sure only valid content type are accepted you could use this:
boolean belongsTo(String contentType, String type, String subtype) {
    Pattern p = Pattern.compile(type + "/(\\w+\\+)?" + subtype);
    return contentType.matches(p);
}

You may have to improve the regex so that parameters and trees are handled correctly.

How does it improve the way GeoRocket handles Content-Types at the moment? I haven't had a problem importing XML files yet. Which client produces application/gml+xml?

I had the problem that one client included the charset parameter and the simple string comparison did not match the right content type. That is the reason i want to replace the switch case with an better way. You are right, we should use a supported library for this. I will look for one.

Is the terminology correct? https://en.wikipedia.org/wiki/Media_type specifies other terms for the individual parts of the media type.

From the http terminology a content type is a mime "Multipurpose Internet Mail Extensions" rfc2045
src: https://tools.ietf.org/html/rfc7231#section-<IP_ADDRESS>
The RFC 7231 contains a short definition.

media-type = type "/" subtype *( OWS ";" OWS parameter )
type       = token
subtype    = token
[...]
parameter      = token "=" ( token / quoted-string )

src: https://tools.ietf.org/html/rfc7231#section-<IP_ADDRESS>
It is common to specify the specific types for application/xml
by prefix the subtype with the spefic type for your own (xml) sub format like gml.
See: http://www.iana.org/assignments/media-types/media-types.xhtml
But the specific type is a part of the subtype.
I got the name "specific type" from Stefan Tilkov's Book "REST und HTTP".
RFC 6838 which obsulates RFC 4288 and 2048 (part of the Multipurpose Internet Mail Extensions) introduce the method as a "structured syntax specifier suffix".

[...]
Similarly, the final "+" in a subtype name introduces a structured
syntax specifier suffix.  Structured syntax suffix requirements are
specified in Section 4.2.8.

src: https://tools.ietf.org/html/rfc6838#section-4.2

There is no library handling media types yet? I'd rather use a library than reinvent the wheel.

👍 I always find libraries which are a part of a framework.

Let's discuss this in depth the day after tomorrow when we meet in person.

Superseded by #50


plex webhooks to sync watchstates across both servers

i think the plex webhooks should be looked into a bit more for the watch state syncing of the plex server.
seems the webhook events could push when:
Media starts playing (media.play). An appropriate poster is attached.
 A poster is also attached to this event.
https://support.plex.tv/hc/en-us/articles/115002267687
having something like this would allow Shoko to update its watchstates in an alternative way. dont know if its better than the system we have now but...
plus you could also build it into the Shoko v2 Client with latest plex usage too. (or merged general usage)

There, is already basic syncing for watched syncing, http://shoko:port/plex/ Though, actually grabbing episode information from this API isn't the best, as that can depend on how well it matches.
I am looking for better ways to expand PlexWebhook.cs as that's where most of the plex stuff is actually housed as of right now.
We also have a bit better intergration which is in current master, which includes bi-directional syncing of plex, effectively if watched on either side it will propogate to either shoko or plex itself.

Further thoughts on the following events:

media.play
media.pause
media.resume
media.stop

Other than approxinating the time that was played, (kinda hard as I have seen cases where the hook was delayed by 5-10 min) I don't see much of a use.
Though adding usage of media.rate would be nice.

isnt this mosty done @Cazzar ?

i guess it is missing sending scobbling to trakt maybe.

This should be considered feature-complete as of now.


Bytecode weaving temporarily broken in compile from source artemis-odb.

@junkdog said: bytecode weaving [in artemis-odb] is borked atm due to structural changes to BaseSystem classes, but the main artemis module is intact.
https://gitter.im/junkdog/artemis-odb
Workaround: Use repo 0.9.1-SNAPSHOT until it gets fixed.

fixed in https://github.com/junkdog/artemis-odb/commit/f89a99a045a6c28a7d4d8b5c3f8a910b27510dcd

@junkdog :cookie:


Please add Hue e27 W&C Ambiance BT variant

Hi,
please add lamp, it's product ID is4090431p9. I have seen you've already added 40903x 40905x, 40906x :)

Thanks a lot! You're doing a great job

Hi @ech0-sj and thanks for your request, I have added it to our to do list.

Now in test version.
https://homey.app/sv-se/app/com.philips.hue.zigbee/Philips-Hue-ZigBee/test/


ROCm on a Steam Deck would be appreciated

Got my Steam Deck todsay and the first thing I did with it was this

Python 3.10.2 (main, Jan 15 2022, 19:56:27) [GCC 11.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import torch
if torch.cuda.is_available() and torch.version.hip:
...     print('We have ROCm')
... else:
...     print('CPU Only')
...
"hipErrorNoBinaryForGpu: Unable to find code object for all current devices!"
Aborted (core dumped)
(134)(deck@steamdeck ~)$

Are we going to get HIP / ROCm for the Steam Deck?
CC https://github.com/pytorch/pytorch/issues/85909

The HSA_OVERRIDE_GFX_VERSION=10.3.0 hack mentioned several times in issues here (see https://github.com/RadeonOpenCompute/ROCm/issues/1797) appears to work on the steam deck, at least to the point of creating tensors and matmul on gpu completing successfully. When I tried this hack on other APUs I was limited to the dedicated VRAM carved out for graphics, which is 1G on the steamdeck by default, and can be raised to 4G
Personally I'm interested in trying the various APUs for inference workloads too but from comments on other issues it seems unlikely that official support is coming anytime soon.

This is not an issue. I am encouraging users to use https://github.com/RadeonOpenCompute/ROCm/discussions/1836 instead. Please migrate the discussion to the forums.

@kyflores, do you mind sharing how you were able to increase the VRAM to 4G (or point me towards the resources that you used to figure it out)? Thanks :)

Closing this ticket.  As saadrahim indicated, "This is not an issue. I am encouraging users to use https://github.com/ROCm/ROCm/discussions/1836 instead. Please migrate the discussion to the forums."


Chart HTML Legend

Summary
The goal for this PR is to add HTML category legend to pie charts (and basis for others) that can be spaced properly.
(Internal for Opendatasoft only) Associated Shortcut ticket: sc-40435.
Changes
Although it doesn't make for the most minimal PR, I changed the markup quite a bit for the following reasons:

Changed figure and div so that figure only has one figcaption.
The figcaption and the canvas are now the only elements gooing vertical/horizontal.
Changed layout to flex since I didn't any other possible layout than vertical for now.
Moved the category legend to auto-grid for having both alignment and auto-wrap without having to distinguish alignment. With flex it was necessary to specify a flex basis and not practical to center.
Tried to remove as many class prefix as possible, since they aren't required with scoping.

Some of these change should break snapshots a bit in the Studio (markup name change), but ideally shouldn't change Chromatic snapshots.
Breaking Changes
describe the changes that are not backward compatible
Changelog
short sentence to serve as a public changelog:
For a bug: "We fixed a bug in the Map component: Middle-Earth's vector tiles are now available."
For a new feature: "In the Map component: It's now possible to display the route of Frodo's journey from Hobbiton to Mount Doom."
Open discussion
describe implementation points that you would like to discuss if any
describe functional behaviour that you would like to discuss if any
To be tested
points that may not be obviously related to the changes but are impacted
special cases that are not widely known
Review checklist

[ ] Description is complete
[ ] 2 reviewers (1 if trivial)
[ ] Tests coverage has improved
[ ] Code is ready for a release on NPM

I added the padding, a comment for future note about not displaying chartJS legend, removed top in positions, but left left since it used by maps.


Added missing space in error message

... which lead to "Please set your system touse a UTF-8 locale."
By the way: Is it by purpose that sentences end with double spaces?

Good catch! I didn't see that error message much, haha.
Yes, mostly. When I wrote this I was in a period when that was important to me, especially in code. IIRC I even made vim handle that for me, and the () motions handles text better when there are two spaces. However, I was probably not ultra consistent with it and it's not as important to me anymore.
Anyways, I'd like to merge this, but please follow the commit convention of wow [...]. It's a big part of the fun with this project! :dog:

I totaly see how this is essential. I created a new pullrequest (#52), so I will close this one.


Information about variables set when using this task

When reading https://docs.microsoft.com/en-us/azure/devops/pipelines/apps/mobile/app-signing?view=azure-devops&tabs=apple-install-during-build it is documented that the task sets the variable APPLE_CERTIFICATE_SIGNING_IDENTITY is set. "In the Signing identity field, enter $(APPLE_CERTIFICATE_SIGNING_IDENTITY). This variable is automatically set by the Install Apple Certificate task for the certificate you selected."
It would be very helpful if documentation for this, and all, tasks would include variables they set.

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

ID: 6e4f249c-c229-4a5c-7970-4e566026b560
Version Independent ID: 7062bdf1-7b38-b42b-e117-c3041e09aae7
Content: Install Apple Certificate task - Azure Pipelines
Content Source: docs/pipelines/tasks/utility/install-apple-certificate.md
Product: devops
Technology: devops-cicd-tasks
GitHub Login: @vijayma
Microsoft Alias: vijayma

Thanks for letting us know. This issue is fixed in our new task reference here (under the Settable Variables section):
https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/install-apple-certificate-v2?view=azure-pipelines#requirements
Please check it out and let us know what you think. Thank you.


 I can't even git clone the repository 🙄
% git clone https://github.com/madsjulia/Mads.jl
Cloning into 'Mads.jl'...
remote: Enumerating objects: 1051, done.
remote: Counting objects: 100% (1051/1051), done.
remote: Compressing objects: 100% (898/898), done.
remote: Total 1051 (delta 185), reused 693 (delta 112), pack-reused 0
Receiving objects: 100% (1051/1051), 65.99 MiB | 4.75 MiB/s, done.
Resolving deltas: 100% (185/185), done.
error: unable to create symlink examples/svr/svr.jl: File name too long
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

So, the problem is that the file examples/model_analysis/models/internal-polynomial.jl is a symlink whose target is what should've been the content of a regular file.  In the end, the resolution should be the same as for #89: resolve symlink before attempting to read it.

Ah, duplicate of #87 😅


Location event is not firing.

Uodate Location event not firing.
Android 6.0, API 23.

Solve the problem by just restarting emulator.


Add cray module to compile Ior check on Pilatus

I add a fix for the Ior checks on Pilatus, that takes into account the recent change on the user environment.

The build was successful, however the CI failed on Pilatus during the runtime with the following error:
aborting job:
application called MPI_Abort(MPI_COMM_WORLD, -1) - process 0
MPICH Notice [Rank 8] [job id 12187.0] [Fri May 12 13:21:04 2023] [nid001142] - Abort(-1) (rank 8 in comm 0): application called MPI_Ab
ort(MPI_COMM_WORLD, -1) - process 8

I have managed to run successfully on the system with my local clone of the repository, though.


Should Keep Pressing CMD + DELETE still delete lines?

VSCode Version: 1.7.2 (1.7.2)
OS Version: OSX El capitan 10.11.5 (15F34)

Steps to Reproduce:

Write some lines
Press CMD + DELETE and keep pressing both keys

Result expected:
Should keep deleting lines
Result observed: The cursor stops at the beginning of the line.
Not really sure if this is a VSCode issue, or if that's expected, but in SublimeText for example that result is observed

Related Stack Exchange question: http://apple.stackexchange.com/questions/261905/upgraded-to-sierra-cannot-delete-multiple-lines

@alfonsoperez Pressing ctrl+backspace on Windows works for me:

@rebornix Can you please check on OSX?

It doesn't do that on OSX for me :(

Any update on this?

I have just tried it on a mac mini in the office.
cmd + delete is bound to the command deleteAllLeft (i.e. it is not word deletion as I originally thought).
The command is currently implemented to only delete to the left, it doesn't handle in any way the case where the cursor sits at column 1.

Oh, I see... I missed that fact from your example, yes, the equivalent in OSX would be to hold the  option key, and the behaviour is the same

@alexandrudima I took at stab at at #28392 , what do you think?

@alfonsoperez I've assigned the PR for reviewing to @rebornix , he adopted the deleteAllLeft command.

Here I added a duplicated ( :( ) for this one: https://github.com/Microsoft/vscode/issues/53021

@BrodaNoel my PR just got merged last week, so I would expect this feature to be rolled out soon

This appears to be implemented now, so I'm going to close the issue.


MARP-929 Use workflow version 4

Hi @ivy-rew
I just applied the workflow v4 for this item. It will be consistent with other items.


The extension is not working

Hi,
The extension was working perfect yesterday, but today is not working on mac.
What should I do?

The video Url look like this: https://app.pluralsight.com/ilx/video-courses/a5358191-d8ee-496d-8fb7-b871d3bbc720/ef2ae631-87f1-4a03-8e4d-19d941f4f549/f09490be-a978-43f9-835a-06cb627c54bd

Then the reason is same as what was mentioned in above issue
You can try out the things I mentioned in that thread
Closing this issue for now, since its already being tracked in the issue mentioned above

but the thread above since two days and the extension was working by me yesterday?

@AbdulAzizSabra

These changes are rolled out incrementally
Your region probably didn't received this feature 2 days ago


[Feat][UI] hide "see more review" text on review modal at professor and course pages

Context

hide "see more reviews" text on review modal at professor and course pages
the default behavior of this button is:

after user clicks the "see more reviews" button, they are brought to the respective Course/Professor page depending on which review they are reading

code: src/common/components/ReviewModal/ReviewModal.tsx#L72-L80

i would like to do this issue!


fix - Use project dir instead of project path

In composite build scenario, the project path is not based on the build tree root. Besides, the .getBuildTreePath() is not available before Gradle 8.3, we use the project dir to identify a Gradle project instead. The project dir is used in dependency resolution.

Fix the point 2 in https://github.com/microsoft/build-server-for-gradle/pull/154#issuecomment-2219647109

// cc @Tanish-Ranjan, @Arthurm1

So project.getPath() is not unique when using included builds?  We might need to also look at what goes into gradleSourceSet.setDisplayName.  It might be better to do in the action after full retrieval.  Maybe set display name to full path and then pare it down to differences in the build action?
I did something similar here.  I can look to reproduce in another PR?

So project.getPath() is not unique when using included builds?

No they are not. In the sample project that I referenced, both project path is :.

It might be better to do in the action after full retrieval. Maybe set display name to full path and then pare it down to differences in the build action?
I did something similar here. I can look to reproduce in another PR?

Sure, feel free to address it in another PR if you want :)

So project.getPath() is not unique when using included builds?

It won't. Any information that comes from the project will be stripped down to the rootProject. SourceSetsModelBuilder considers the project it receives in the buildAll parameter, to be the root project. This is why we had to resort to BuildActions in #154, as it contains the complete information of the project hierarchy. It queries for each sub project in the build. This is where the SourceSetsModelBuilder starts building the requested model unaware of the entire project hierarchy and thinks the sub project we are querying is actually the root project.
Now because of the way model builders work we cannot rely on hierarchical information from it, such as project path.
Hope I explained it well. Please ask any questions if you have queries.

Another solution is to get the build tree path by casting the Project to DefaultProject, and call getIdentityPath(). But that is an internal API, and since the project dir works fine for now, we can use project dir currently.
Just to share this information in case we need to revisit this problem in the future.


double * not supported with cffi or ctypes?

I'd like to call compiled function that takes an array as a one of the arguments from within nopython mode, but I can't get it to work by prototyping it either using ctypes or ffi.  It appears that numba doesn't support double * either with ctypes or ffi?  I've tried hack-ish fixes like the ones suggested here but they don't seem to work for me.  I'm using numba 0.21.   What I'd like to do is define the function prototype to take double *, and then pass it a "numpy array" in nopython mode and have that work.  Any suggestions?

I'm not sure it will work, but have you tried passing myarray.ctypes.data?

Whilst it's possible to make this work (demonstrated in the branch at https://github.com/gmarkall/numba/commits/arrays_to_ptrs ), I'm not sure if this is desirable, because it seems to differ from the normal Python semantics. For example, when I pass a numpy array of float32 to a cffi function that takes a float* parameter, I get an error like:
TypeError: initializer for ctype 'float *' must be a cdata pointer, not numpy.ndarray

@timothydmorton is there an example of something like this working in normal Python code that you can share that Numba does not compile?

Just to help clarify any further discussion, here are examples of two versions of a function that I've been experimenting with, one which works in Python and one which works in a jitted function:
from numba import cffi_support, jit
import numpy as np
import cffi

# Create the vectormaths module

defs = "void vsSin(int n, float* x, float* y);"
source = """\
void vsSin(int n, float* x, float* y) {
    int i;
    for (i=0; i<n; i++)
        y[i] = sin(x[i]);
}"""

ffi = cffi.FFI()
ffi.set_source('vectormaths', source)
ffi.cdef(defs, override=True)
ffi.compile()

# Import the compiled module

import vectormaths
cffi_support.register_module(vectormaths)
vsSin = vectormaths.lib.vsSin

# Method 1, works in Python, passes numpy arrays using casts.
# Pro: it actually works in Python
# Cons: it's a bit fiddly, may be difficult to support ffi.cast in Numba well

def python_version(x):
    y = np.empty_like(x)
    vsSin(len(x), ffi.cast('float *', x.ctypes.data),
        ffi.cast('float *', y.ctypes.data))
    return y

x = np.arange(10).astype(np.float32)
python_y = python_version(x)

# Method 2, works in Numba (depends on the arrays_to_ptrs branch):
# Pros: It can be made to work in Numba, code a bit cleaner
# Con: doesn't actually work without the @jit decorator

@jit(nopython=True)
def numba_version(x):
    y = np.empty_like(x)
    vsSin(len(x), x, y)
    return y

x = np.arange(10).astype(np.float32)
numba_y = numba_version(x)

# These two versions do produce the same thing
assert np.all(python_y == numba_y)

Upon a bit of further experimentation: a more generic (and possibly easier to support in Numba) version that works in Python is to use the from_buffer method:
# Method 3, works in Python, passes numpy arrays using a buffer.

def python_version(x):
    y = np.empty_like(x)
    vsSin(len(x), ffi.from_buffer(x), ffi.from_buffer(y))
    return y

I started a discussion on the python-cffi mailing list about implementing support for passing buffer objects to pointer parameters in cffi, so that potentially if we chose to implement passing arrays to double* arguments (for example), it could be consistent with uses of cffi in normal Python code: https://groups.google.com/forum/#!topic/python-cffi/xEz7OxjA1O8

According to the response I received on the mailing list, the solution that we should use is to construct arguments to pointers is to call ffi.from_buffer(ary) - so I will try to support that (i.e. Method 3 will work in both normal Python and Numba-jitted code, and Method 2 will not be supported).
I don't want to diverge from normal Python semantics in jitted code, even if it does allow the code to be written a bit more cleanly - we have one example where this is the case already (handling of members of structured arrays) and it's quite annoying to disable Numba's jit for debugging purposes only to find that the code doesn't run at all in normal Python.

This is now fixed with support for cffi's from_buffer().


chore: linting

Description
Problem: Golangci-lint masked real issues because it fired only on diffs.
Soulution: don't fire the linter only on diffs, lint, then merge after linting.

Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...

[ ] included the correct type prefix in the PR title
[ ] added ! to the type prefix if API or client breaking change
[ ] added appropriate labels to the PR
[ ] targeted the correct branch (see PR Targeting)
[ ] provided a link to the relevant issue or specification
[ ] added a changelog entry to CHANGELOG.md
[ ] included comments for documenting Go code
[ ] updated the relevant documentation or specification
[ ] reviewed "Files changed" and left comments if necessary
[ ] confirmed all CI checks have passed

Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...

[ ] confirmed the correct type prefix in the PR title
[ ] confirmed all author checklist items have been addressed
[ ] reviewed state machine logic
[ ] reviewed API design and naming
[ ] reviewed documentation is accurate
[ ] reviewed tests and test coverage
[ ] manually tested (if applicable)

I'll add a changelog to this

#1649 should have most of the linting covered (but not the changes to CI)
Feel free to close (or open an issue if you still have unaddressed concerns)


fabric.mod.json version isnt being updated

for some reason each release shows 1.0.0 in the file. perhaps it would be good to use a variable to set this.

is there a specifically automatic way of doing this or should I just be doing it manually each update?

I use
  "version": "${version}",

in my file and update that in the gradle.properties file

I also have that

I think its because it relies on gradle.properties


fixing copy to clipboard to use single-click

This change instantiates the ZeroClipboard object when the page is loaded rather than dynamically after the copy button has been created.  Once the button is created, we set the data on it for copy.  This solves an issue ZeroClipboard has with late binding to dynamically generated elements.

:+1: Excellent

:+1:


Flyway migration failed because of gseadmin's lack of SUPER privileges

Description
I'm running flyway docker image so that it can migrate my local database, but i'm getting error while execution of  v8_normalisation version. as described in logging section.
Troubleshooting Details
This error is solved if the log-bin-trust-function-creators mysql config is set to 1. But in the database configuration file located at docker-compose/mysql.cnf has this config set correctly, so i guess that this configuration is not being applied. If i run inside of gse-database manually the command SET GLOBAL log_bin_trust_function_creators = 1 error is resolved.
 TO 'gseadmin'@'%';

Run gse-migration image;

Flyway Server Logging
2023-08-16 15:31:20 Flyway Community Edition 9.21.1 by Redgate
2023-08-16 15:31:20 See release notes here: https://rd.gt/416ObMi
2023-08-16 15:31:20
2023-08-16 15:31:20 Database: jdbc:mysql://gse-database:3306/gse (MySQL 8.0)
2023-08-16 15:31:20 Schema history table gse.flyway_schema_history does not exist yet
2023-08-16 15:31:20 Successfully validated 11 migrations (execution time 00:00.092s)
2023-08-16 15:31:20 Creating Schema History table gse.flyway_schema_history ...
2023-08-16 15:31:24 Current version of schema gse: << Empty Schema >>
2023-08-16 15:31:24 Migrating schema gse to version "0 - init"
2023-08-16 15:31:36 WARNING: DB: Integer display width is deprecated and will be removed in a future release. (SQL State:  - Error Code: 1681)
2023-08-16 15:31:36 WARNING: DB: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous. (SQL State:  - Error Code: 3719)
2023-08-16 15:31:36 WARNING: DB: 'utf8mb3_bin' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead. (SQL State:  - Error Code: 3778)
2023-08-16 15:31:36 Migrating schema gse to version "1 - analysis"
2023-08-16 15:31:44 Migrating schema gse to version "2 - topics"
2023-08-16 15:31:50 Migrating schema gse to version "3 - normalisation"
2023-08-16 15:32:28 Migrating schema gse to version "4 - procedures"
2023-08-16 15:32:29 Migrating schema gse to version "5 - views"
2023-08-16 15:32:31 Migrating schema gse to version "6 - optimisations"
2023-08-16 15:32:52 Migrating schema gse to version "7 - naming"
2023-08-16 15:33:03 Migrating schema gse to version "8 - statistics"
2023-08-16 15:34:16 ERROR: Migration of schema gse to version "8 - statistics" failed! Please restore backups and roll back database and code!
2023-08-16 15:34:17 ERROR: Migration V8__statistics.sql failed
2023-08-16 15:34:17 -----------------------------------
2023-08-16 15:34:17 SQL State  : HY000
2023-08-16 15:34:17 Error Code : 1419
2023-08-16 15:34:17 Message    : (conn=626) You do not have the SUPER privilege and binary logging is enabled (you might want to use the less safe log_bin_trust_function_creators variable)
2023-08-16 15:34:17 Location   : sql/V8__statistics.sql (/flyway/sql/V8__statistics.sql)
2023-08-16 15:34:17 Line       : 134
2023-08-16 15:34:17 Statement  : CREATE TRIGGER language_progress_insert
2023-08-16 15:34:17 BEFORE INSERT ON language_progress
2023-08-16 15:34:17 FOR EACH ROW
2023-08-16 15:34:17 BEGIN
2023-08-16 15:34:17     CALL is_past_or_present(NEW.checkpoint);
2023-08-16 15:34:17 END
2023-08-16 15:34:17
2023-08-16 15:34:17 Caused by: Migration V8__statistics.sql failed
2023-08-16 15:34:17 -----------------------------------
2023-08-16 15:34:17 SQL State  : HY000
2023-08-16 15:34:17 Error Code : 1419
2023-08-16 15:34:17 Message    : (conn=626) You do not have the SUPER privilege and binary logging is enabled (you might want to use the less safe log_bin_trust_function_creators variable)
2023-08-16 15:34:17 Location   : sql/V8__statistics.sql (/flyway/sql/V8__statistics.sql)
2023-08-16 15:34:17 Line       : 134
2023-08-16 15:34:17 Statement  : CREATE TRIGGER language_progress_insert
2023-08-16 15:34:17 BEFORE INSERT ON language_progress
2023-08-16 15:34:17 FOR EACH ROW
2023-08-16 15:34:17 BEGIN
2023-08-16 15:34:17     CALL is_past_or_present(NEW.checkpoint);
2023-08-16 15:34:17 END
2023-08-16 15:34:17
2023-08-16 15:34:17 Caused by: java.sql.SQLTransientConnectionException: (conn=626) You do not have the SUPER privilege and binary logging is enabled (you might want to use the less safe log_bin_trust_function_creators variable)
2023-08-16 15:34:17 Caused by: org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException: You do not have the SUPER privilege and binary logging is enabled (you might want to use the less safe log_bin_trust_function_creators variable)
2023-08-16 15:34:17 Caused by: java.sql.SQLException: You do not have the SUPER privilege and binary logging is enabled (you might want to use the less safe log_bin_trust_function_creators variable)
2023-08-16 15:34:17 A Flyway report has been generated here: /flyway/report.html

Hi @Eddyhanderson
Thank you for the report,
We provide a custom MySQL configuration file that is added to the database service via a bind mount. All these settings are applied by default in docker-compose, so you should realistically never encounter this error in deployment.
But that does not mean that said error may not occur while testing locally, which I think was your case, as evidenced by the log format and messages.  Make sure that your local installation of MySQL also uses this setting. Now that you have brought this to my attention, I do think that the README should be updated to include mentions of this setting.


Change config.AppConfig to an interface

Most of galaxy currently relies on config.AppConfig, which is directly
tied to the vmap implementation, which isn't needed for a consistent
store like consul.
Change the one public field, Name, to a getter method
Convert all the galaxy code to use the interface

Cherry-picking this from the consul branch, so we can make sure galaxy still runs with this interface in place.

:+1:


enhance cgroup support

Add a possibility to:

Set a cgroup name for a service,

Set a cgroup name prefix for services that don't have an explicit cgroup
name set by the previous feature.
This allows defining, for example, a root "services" cgroup, under which
children cgroups for particular services are kept,

Add a service to a controller without needing to set any of its settings,

Keep a service cgroup when it becomes empty (for example to keep between
service restarts some cgroup settings that were set outside OpenRC).

These functionalities allow configuration of a service cgroup name for v1
controllers and v2 (unified) hierarchy; the service name in the "openrc"
hierarchy is not affected by these settings.
The default values are set in a way so not to result in any change of
services cgroup behavior unless specifically configured in a different way
by an user.

I'm open to having a prefix, but I don't think we should allow the cgroup name to be configurable. It would bee very easy for users to end up with collisions.
Also, I'm curious why you want to add a service to a controller without changing any of its settings?

I'm open to having a prefix, but I don't think we should allow the cgroup name to be configurable.
It would bee very easy for users to end up with collisions.

It is not a problem if two services end with the same cgroup name, since this setting is only used
for particular controllers like "cpu" or "pids" -  the service name in the "openrc" hierarchy is not affected by this setting.
In fact, placing two services in an one cgroup will allow them to share things like io limits without needing to place them both in an intermediate cgroup.

Also, I'm curious why you want to add a service to a controller without changing any of its settings?

I have a centralized script where all the cgroups settings are configured (not only for services).
Truth is, I could ask OpenRC to set a some random setting in each controller and then override it anyway but this way looks neater (we also have something similar already for a "cpuacct" controller).

Rebased this pull request onto current master.
Just as it is in the case of #182 I have OpenRC with this change deployed for few months already on
few machines without any issues and also this is a backward-compatible change: nothing changes for
existing OpenRC setups, unless a user specifically starts to make use of new functionalities added by
it.

Rebased this pull request onto current master.

Rebased this pull request onto current master.

@maciejsszmigiero question on this PR.
Does this clean up properly if the user modifies the cgroup name while the service is running?
E.g. these steps
0. Service is not yet started.

modify /etc/conf.d/bar set the cgroup_name to a specific value, e.g. bar
start service bar
modify /etc/conf.d/bar set the cgroup_name to a different specific value, e.g. baz
stop or restart the service

Does it correctly use the bar cgroup for stopping, then baz for starting up again? Does the old cgroup get cleaned up?

@robbat2 I guess by "clean up properly" you mean whether all tasks in the old cgroup will get killed in your scenario (rather than just the pid monitored by start-stop-daemon, which is a separate thing from cgroups).
Currently, this isn't the case.
Since likely this isn't the answer you were expecting I will modify this PR to store the current cgroup name using service_set_value to maintain its consistency between start and stop operations.


Align With Hyperledger Wallets

https://github.com/hyperledger/aries-rfcs/tree/master/concepts/0050-wallets
https://github.com/hyperledger/aries-rfcs/tree/master/concepts/0051-dkms

Seems our of scope for this spec... but https://hyperledger-indy.readthedocs.io/projects/sdk/en/latest/docs/design/011-wallet-query-language/README.html
defines a wallet query language... that operates on encrypted tags... similar to the concept of encrypted indexes in EDVs.

Yes, I've got an implementation of WQL in there. I'm not quite sure how to reconcile the simple named tags with tag-value pairs yet.
I agree there's some crossover with secure data vaults but I'm leaving that for later if there's some compatibility gains to be made.
Regarding the layering, this library would need direct access to the KMS, assuming it performs the encryption and decryption operations. So I'm assuming D and E are inverted at the moment, or at least side-by-side, and the concrete wallet implementation would consist of one or more data vaults instantiated with KMS references.

@andrewwhitehead yes, D + E could be siblings... one might ask a KMS to help you decrypt encrypted chunks, or authenticate to the encrypted chunk provider, but in both cases the "wallet software / agent software" is doing that work.... I layered them like that because I assumed the strongest case where the KMS is required to help authenticate the wallet to the storage provider, and to decrypt its contents.


Add m2cgen for transpiling ML models into .NET

Machine Learning/m2cgen - https://github.com/BayesWitnesses/m2cgen

m2cgen is a lightweight library with command line interface which allows to transpile trained machine learning models into a native code of C# / F# / Visual Basic programming language. Examples of generated code can be found here.

Thanks a lot for merging!