☂ CSS Formatter

Description
This issue will act as the hub for tracking the CSS formatter as it gets built out. Listed here are all of the different pieces that will need to be implemented to get "complete" support in place. For the most part, this means compatibility with Prettier, and the implementations will inevitably take on the same shape, but we are not currently aiming for perfect parity with Pretttier, as their implementation and tests lean heavily into PostCSS and other facets that we are not yet ready to support.
How to Contribute
Everyone is welcome to contribute pieces here! If you'd like to tackle something, please leave a comment below this issue for which item(s) of the checklist below you'd like to pick up. We will create a separate issue and assign it to you to simplify tracking.

[!NOTE]
In order to have the issue assigned to you, you must comment on this issue.

When choosing an item to work on, there are often various pieces that will fit together or be dependent on each other, like attribute_selector requires attribute_name, attribute_matcher, and attribute_matcher_value to be implemented at the same time to get full support.
Also, please only pick a single piece or group to work on at a time, and try to have time available to work on the piece when you select it so that we can keep progressing quickly. If you need any help or have any questions about how to implement formatting in Biome, feel free to ask in the dev-formatter channel in Discord.
Testing
We don't currently have Prettier tests for the CSS formatter, again because much of Prettier's implementation focuses on supporting PostCSS, beyond just standard CSS that Biome supports currently. Instead, please add spec tests under crates/biome_css_formatter/test/specs/css for the feature you are working on. For the most part, Prettier's CSS tests do provide a lot of coverage and examples to pull from.
Node Checklist
The CSS Parser is still in progress, so the set of nodes that need to be formatted is constantly changing. All of the current nodes have been implemented, but as new ones are added, they will need to be formatted as well. Since it's moving so quickly, the list won't be updated here. Instead, there are a number of other general things that need support, listed below.
Once the parser reaches a mostly complete and stable state, we will flesh out the list of remaining types that need formatting support and add them here.
Features and bug fixes
These are features, bug fixes, and other adjustments that need to be made to the formatter to get closer to parity with Prettier.

[x] Enforce consistent quoting for attribute values (like [type=text] becomes [type="text"]) (#1321)
[x] Enforce lowercase for all keywords and type selectors (units like 5PX become 5px, at-rules like @MEDIA become @media, types like DIV become div, etc.) (#1354)

Formatting Infrastructure
Listed here are various things that are ready to be implemented or fixed that apply to the CSS formatter in general.

[ ] Comment Placement
[x] Configuration option for quoteStyle (single vs double, like JS) (#1384)
[x] Range formatting (might already be handled, but should be tested) (#1363)
[x] Cursor formatting (handled by the LSP)
[ ] Handle biome ignore: format suppression comments in appropriate places

Testing:

[ ] Add usable Prettier tests (ignoring postcss syntax)

Releasability
These tasks need to be completed for the CSS formatter to be "publicly available" and on-par with the JS formatter.

[x] Support CSS files in the playground
[x] Support CSS configuration options in the playground
[x] Enable/remove the can_format_css_yet flag from biome_service.

I'm picking up attribute_selector, attribute_name, attribute_matcher, and attribute_matcher_value next.

Is this the first step in implementing a CSS linter?

Is this the first step in implementing a CSS linter? Or could that be worked on in parallel? (the parser code seems pretty fleshed out already to my naked eye)

The issue is only related to CSS formatting. I believe that the linter and formatter can work in parallel.
Meanwhile, the parser is still under development (the cst nodes aren't stable and can be changed).
Any help is welcome!

Agreed, the parser is pretty far along, but there will be many changes before it can effectively lint full CSS files (for example, we're adding parsing for exact properties now, and each one will have a new node type, so writing lints for them now would require rewriting them entirely later on).

what are your plans/thoughts about SCSS?

It's unlikely that we'll add any non-standard CSS dialects in the short term. SCSS and other dialects like Less and even PostCSS end up diverging pretty far from standard CSS and require very different parsing to handle all of their extensions to the language syntax (e.g., mixins in sass and less, @value in postcss, and so on). Additionally, these dialects have different behavior and rules for the same syntax that ends up being added in future CSS specifications, which makes it more difficult to support them all at the same time.
We may consider adding some support in the future, but for the forseeable future we will be focusing on supporting all of latest, standard CSS.

@faultyserver Fair enough, I think it's good to focus on standard CSS first. Also IMHO SCSS will eventually become redundant (once nested CSS is widely supported and many other cool features coming after CSS houdini experiments)

I doubt it will become redundant any time fast, nesting is a small part of the capabilities of sass. (Extending, mixins, functions, arrays, maps)
Scss is the most used SCSS tooling (49% in The State of Frontend 2022) and would definitely be worth supporting. Frameworks like NextJS support this by default and I believe SASS has a public parser which could be utilised?

@faultyserver Fair enough, I think it's good to focus on standard CSS first. Also IMHO SCSS will eventually become redundant (once nested CSS is widely supported and many other cool features coming after CSS houdini experiments)

I doubt it will become redundant any time soon, nesting is a small part of the capabilities of sass. (Extending, mixins, functions, arrays, maps)
Sass is the most used CSS tooling (49% in The State of Frontend 2022 - the results of 2023 are not out yet) and would definitely be worth supporting. Frameworks like NextJS support this by default and I believe sass has a public parser which could be utilised?

There is work being done to add functions and mixins to CSS too: https://github.com/w3c/csswg-drafts/issues/9350

@faultyserver Fair enough, I think it's good to focus on standard CSS first. Also IMHO SCSS will eventually become redundant (once nested CSS is widely supported and many other cool features coming after CSS houdini experiments)

I doubt it will become redundant any time soon, nesting is a small part of the capabilities of sass. (Extending, mixins, functions, arrays, maps)
Sass is the most used CSS tooling (49% in The State of Frontend 2022 - the results of 2023 are not out yet) and would definitely be worth supporting. Frameworks like NextJS support this by default and I believe sass has a public parser which could be utilised?

There is work being done to add functions and mixins to CSS too: w3c/csswg-drafts#9350

Correct there is some work being done for functions and mixins (again not all sass features yet), how long till this draft becomes reality and how long till the adoption is reasonable? Might take 2-3 years. Houdini currently has 73%.

BTW if sass is not supported why in documentation css super languages are mentioned?
--css-formatter-enabled=<true|false> — Control the formatter for CSS (and its super languages) files.

BTW if sass is not supported why in documentation css super languages are mentioned? --css-formatter-enabled=<true|false> — Control the formatter for CSS (and its super languages) files.

Maybe they will? 👀

In my opinion, no amount of new CSS features will be enough to replace Sass completely. For me, Sass is more useful for having a modular code structure. It is like a missing piece between the CSS and the bundler. Although Tailwind and other no-CSS libraries are quite popular lately, I think Sass is still the best tool for anyone writing their own design system.
But I understand it expands the scope a lot. So maybe it can be added as a plugin later (not sure if plugin system will support this), or it can have a minimal set of features (quotes, spacing, no prettier compatibility).

In my opinion, no amount of new CSS features will be enough to replace Sass completely. For me, Sass is more useful for having a modular code structure. It is like a missing piece between the CSS and the bundler. Although Tailwind and other no-CSS libraries are quite popular lately, I think Sass is still the best tool for anyone writing their own design system.
But I understand it expands the scope a lot. So maybe it can be added as a plugin later (not sure if plugin system will support this), or it can have a minimal set of features (quotes, spacing, no prettier compatibility).

Just curious, what parts of Sass are you using, or what makes it the best for someone writing their own design system?

The facts that Sass is adopting standard CSS nesting rules, and that functions/mixins are coming to CSS are good reasons enough to focus only on CSS.
Then you have PostCSS to cover everything else.
Because how everything is evolving, I think biome should only cover CSS.

In my opinion, no amount of new CSS features will be enough to replace Sass completely. For me, Sass is more useful for having a modular code structure. It is like a missing piece between the CSS and the bundler. Although Tailwind and other no-CSS libraries are quite popular lately, I think Sass is still the best tool for anyone writing their own design system.
But I understand it expands the scope a lot. So maybe it can be added as a plugin later (not sure if plugin system will support this), or it can have a minimal set of features (quotes, spacing, no prettier compatibility).

It was mostly a scope decision. Writing a CSS recoverable parser isn't an easy task, so we wanted to be realistic and start small. We will consider SASS down the line once our base CSS parser is more stable.

can we add support for emotion or styled component?

@conioX that's called embedded formatting, which is tracked in a separate issue

@conioX that's called embedded formatting, which is tracked in a separate issue

Where is it being tracked?

@conioX that's called embedded formatting, which is tracked in a separate issue

Where is it being tracked?

A quick issue search finds https://github.com/biomejs/biome/issues/3334.

I saw that recently biome added support for CSS, does that mean SCSS is also supported
@ematipico

@ashishsurya No, CSS is supported, SCSS isn't.

@ashishsurya No, CSS is supported, SCSS isn't.

Is that on the way or still in the Roadmap? @matthiask

@ashishsurya It's not on the roadmap yet. We would consider it once CSS parser is stable enough.

@ashishsurya It's not on the roadmap yet. We would consider it once CSS parser is stable enough.

Would love that, don't see scss usage lowering any time soon.

Would love that, don't see scss usage lowering any time soon.

SCSS usage is already lowering right now.
Looking at the last 5 years of usage, it reached its peak in 2017 and usage remained plateaued until early 2023. It's been declining ever since.
Most of SCSS's features are either already widely supported in CSS. Some have been subsumed by newer more powerful CSS features. The majority of new projects don't need to reach for SCSS any more, and legacy projects are migrating away from it to speed up build times.
The last niche advantages of SCSS appear to be conditionals, loops, and mixins. But all 3 of them have current workarounds today and active css extension proposals getting worked out with current and future concerns in mind.
Those that would be working on adding new major features to SCSS are focussing instead on adding those features to CSS instead.

SCSS usage is already lowering right now.

No it's not

As @KurtGokhan mentioned;

In my opinion, no amount of new CSS features will be enough to replace Sass completely. For me, Sass is more useful for having a modular code structure. It is like a missing piece between the CSS and the bundler. Although Tailwind and other no-CSS libraries are quite popular lately, I think Sass is still the best tool for anyone writing their own design system.
But I understand it expands the scope a lot. So maybe it can be added as a plugin later (not sure if plugin system will support this), or it can have a minimal set of features (quotes, spacing, no prettier compatibility).

SCSS usage is already lowering right now.

No it's not

It actually is. Long winded explanation in this expanding section
You've made a few statistics mistakes.

You're using npmtrends.com which is fine, but you need to zoom out to see the trend properly. Set it as far out as you can.
You need to look at more than just the sass package, you also need to add node-sass to the graph to get the real historical usage. https://npmtrends.com/node-sass-vs-sass

just remember to zoom out again, they don't include the zoom levels in their urls

You'll need to switch the y-axis from linear to logarithmic. npmtrends doesn't do this, but npmcharts does. Here's a link here: https://npmcharts.com/compare/sass,node-sass?interval=90&start=5000&log=true

Why? Because popularity works on a logarithmic scale. It's much harder for a project with only 1 million total downloads to get to 2 million total downloads then it is for a project to get from 10 million total downloads to 11 million total downloads. Even though the difference between both pairs of numbers is 1 million, the additional growth is 100% vs 10%.
Note, I've set the interval to 90 days to smooth out the weird stuff that happens during the xmas holidays.

You need to add both curves together to get the real usage curve. That real curve is what we're looking at going forwards.

You'll have to do this in your head, but with only 2 curves it's easy. If you've never added curves together, it works like this: https://profmattstrassler.com/wp-content/uploads/2013/09/sumtwocurves0.png.

Now we need to look at the tangent along the curve.

If this seems confusing or you need a calculus refresher, watch this video: https://www.khanacademy.org/math/ap-calculus-ab/ab-differentiation-1-new/ab-2-1/v/derivative-as-slope-of-curve. We're interested in how much the growth is changing time.

What we can see is that the growth was small, then it accelerated a lot, and then it decelerated a lot but is still moving up ever so slightly.
So this means that scss usage is still going up right? No, it specifically means that downloads are going up, there is a difference. Since there's no official usage stats, we've been looking at downloads this whole time to try and glean the usage. When a person install scss, the download counter ticks up. But that's not the only time it ticks up. There's a whole bunch of github actions and other ci/cd jobs downloading scss that we need to consider. If every single developer stopped installing scss today, then tomorrow's download stats would still be higher, because we didn't alter or disable all those ci/cd jobs that are still getting triggered when people make other changes to their projects as well.
So putting it all together, we need to add curves in a logarithmic scale and take a ci/cd bias into account to see if the usage is growing or shrinking. We can see by eye that it's shrinking. But looking at the numbers to confirm, the curve of the sass library for the last year has 5.33% growth, plus the curve of the node-sass library for the last month has -14.76% growth for a total growth of -9.43%. Then that number gets even smaller when we remember that we need to subtract all the ci/cd jobs downloading it.

Conclusion: SCSS usage is falling.

In my opinion, no amount of new CSS features will be enough to replace Sass completely.

What if the features you use overlap?
What would be the purpose of using Sass at that point?

For me, Sass is more useful for having a modular code structure.

Sass and modular code are unrelated to each other. You can have non-modular sass, modular sass, non-modular css, and modular css. You just use your filesystem and your import method of choice. (e.g. Sass' @use and CSS' @import)

I think Sass is still the best tool for anyone writing their own design system. [...]
For big organisations working with design systems it's still a good choice as a tool between CSS & the bundler. e.g. Maps, sets, functions, mixins, looping.

Well my dinner's ready now so I'll have to rush past the rest of this.
Most designs systems written a few years ago used scss because its maps/sets/functions/mixins/loops were the best way to do what we wanted, which was making certain tasks easily and programmatically tweakable. For example:

Make a bunch of shades of certain colors
Create a typographic scale
Make a named set of viewport size based modifiers.

But now, we have better ways:

We can use custom properies and oklch() to make our shades (or you can use postcss if you want to both use modern relative color syntax and support older browsers).
We can use clamp(), em/rem, and viewport units to make a better more fluid typographic scales.
We can use intrinsic design principles and container queries rather than the outdated notion of sm, md, lg, xl modifiers.

There's a lot more I could write about not needing to design things using techniques built on assumptions that no longer hold true, but I'm getting quite hungry now.

New to this thread but just wanted to express interest in scss support for a different reason: legacy projects.
"One toolchain for your web project" hopefully doesn't have to mean "One toolchain for your new web project".
I'm not a frontend dev, I do mostly backend and devops, but I often help other teams with tooling, configuration, and standardization. So far I love biome for new projects, but it's not a drop in replacement for existing tooling and configuration in every existing project yet. I'd love to bring biome into every project, new and old.
I think plugins would be a fine solution as well, once we have them.
Anyway I appreciate all the work being done on biome and the care being put into making it great. Thank you!

New to this thread but just wanted to express interest in scss support for a different reason: legacy projects.
"One toolchain for your web project" hopefully doesn't have to mean "One toolchain for your new web project".
I'm not a frontend dev, I do mostly backend and devops, but I often help other teams with tooling, configuration, and standardization. So far I love biome for new projects, but it's not a drop in replacement for existing tooling and configuration in every existing project yet. I'd love to bring biome into every project, new and old.
I think plugins would be a fine solution as well, once we have them.
Anyway I appreciate all the work being done on biome and the care being put into making it great. Thank you!

👏🏻👏🏻👏🏻

SCSS support will be greatly appreciated

@spartanatreyu For me the question is not if css can do everything that sass can do, but if it should all the time.
I like to keep heavy fluid calculations and other stuff abstracted away in the build/on the server with easy to use helpers, and use new css features only where it makes sense to use them. Why should i deliver hundreds of extra kilobytes to the browser, when i don't have to.
Sure css is not as ressource intensive as js, but it still uses resources. And the last design system i saw, which solely relied on css vars, had 300kb of core css vars and their sematic remapping, this is insane.
It depends on the use case at the end. Just wanted to point out, there are more reasons, why you'd want to use sass instead of css.

@jens-struct focussing on CSS is almost never where we should be focussing our attention when it comes to peering through the lens of performance improvements since there's  usually something else having a greater impact.

Why should i deliver hundreds of extra kilobytes to the browser/user, when i don't have to.
Sure css is not as ressource intensive as js, but it still uses resources. And the last design system i saw, which solely relied on css vars, had 300kb of core css vars and their semantic remapping, this is insane.

I'm guessing just by you mentioning 300kb of core css vars that this was a design based on openprops?
When it comes to 300kb of custom properties, there's a few possibilities that come to my mind. It's either:

It's 300kb of predefined values AKA a design system meant to give a design consistency (e.g. All spacing is a multiple of 4px, all shadows are actually fit in dark mode and are not just inverted colors, etc...). An interesting effect of these design systems is that since they're just a few named values and variations on those named values, they have a lot of redundant information making them highly compressible. (e.g. Minified Open Props is 370kb but over the wire is compressed down to 6-ish kb, and you can always choose to use less of it instead of importing everything)
There's something else embedded in the css. Probably an inlined base64'd background image. Just be aware that the base64 encoding actually increases filesizes by 33%. So just pull those images out and send them over the wire with a HTTP1 > web server.
or, it's somehow a lot of disjointed custom properties. If you've got 300kb of it, then it's probably a bunch of old code that was only used during the initial iterative/experimental process of creating the design in the first place. Once that process crystalizes into a final design, that old code can be cleaned up. If that's too annoying to do by hand, you can always put it through a tool like PurgeCSS.
or, it's somehow a lot of @property declarations to restrict values. I'm not sure why anyone would want to make 300kb of these unless they were making something like a web builder app, in which case you probably wouldn't want to use scss since it wouldn't be able to make use of @property anyway.

If your hesitation is instead towards having custom properties instead of scss variables because they're precomputed, it's worth pointing out:
Since Custom Properties are computed at runtime, they're not beholden to the requirements of static analysis. This means they can be granted greater power than SCSS variables could ever be granted (e.g. cascading, types, and all that follows from them) and you're trading that precompute for that extra power.
But if your hesitation is instead towards having custom properties instead of scss variables because they result in more calculations, it's worth pointing out:
Custom properties can often describe things in a more performant way than the equivalent SCSS. For example: CSS would use animation: [...] var(-t) [...] for the duration of an animation and set the value of -t in the :root psuedo-class which gets overridden to 0s in a @media (prefers-reduced-motion) block. The equivalent SCSS would likely have * { animation-duration: none !important; } which now forces the browser to walk the entire DOM tree to figure out which animations to halt when it instead could have just used the smaller custom property cascade tree that the browser already maintains when using custom properties.

@spartanatreyu thanks for your answer.

focussing on CSS is almost never where we should be focussing our attention when it comes to peering through the lens of performance improvements since there's usually something else having a greater impact.

Oh, this is simply not true, in most cases. First, if you take performance seriously it is not only about optimizing the things that have the greatest impact, but things that have an impact in comparison to effort and improvement potential. Secondly, depending on your frontend architecture, CSS can be the single blocking ressource for the critical rendering path, which makes it normally a quite important ressource to optimize.

I'm guessing just by you mentioning 300kb of core css vars that this was a design based on openprops?

Not at all, i'm talking about a recent example i came across about a common architectural design token pattern (in the context of design systems), where you have core design tokens, like a complete color palette. And then remap some of these core design tokens (which are not meant to be ever used directly) to semantic design tokens (which are meant to be used directly). Doing this kind of stuff in the browser has no value to the user or the functionality of the frontend. It is just bloating the delivered CSS. But this is just one example.
And it's ok, there is no wrong way here, as nobody knows all the reasons, why someone in a specific project, with specific constraints and specific goals, has very valid reasons to use Sass as an extension to CSS for some things. But this github issue is about Sass support for biome, so lets not hijack this issue with subjective opinions based on your own experience on why Sass shouldn't be used at all anymore.
Don't get me wrong, CSS vars are great. You can even generate CSS vars with sass. It is not about one or the other, but choosing the right tool for a specific problem, depending on the context.  Lets leave this choice to the biome users, if it at some points supports Sass. Thanks!

Just wondering, will CSS formatting also include CSS-in-JS in TS? e.g.
const myStyles = css`
   .foo { color: red; }
`

@kurtextrem That is a separate issue, see #3334


Handle last_applied

Currently, last_applied is not persisted, and applied is not passed to Config after node crash.
Ref: https://github.com/tikv/raft-rs/blob/master/src/config.rs#L43-L47
Question: Is there a better way than updating last_applied every time whenever log entry is persisted?
Investigate how other implementations handle this.

I believe that saving the last_applied every time is not the correct approach.
It would be better for the administrator to investigate the logs manually and utilize the last_applied when rebootstrapping the cluster. Therefore, I will close this issue


luci-mod-network: fix xhtml markup

fix markup in interfaces.js (#4980)

Signed-off-by: Dirk Brenken<EMAIL_ADDRESS>

Could you also fix the few translations that have already been made?

Thanks.


Prerender renders a ui-router to a white blank page

I have been trying to get my website prerendered with prerender.io. The problem, as mentioned, the webpage, which contains ui-router, is rendered to be a blank page.
I'm pretty sure that it has something to do with phantomjs and ui-router, because extending the rendering time doesn't help.
My ui-view stays blank just like the one below.
<div ui-view></div>

I found a topic that might be related to this problem. https://github.com/ariya/phantomjs/issues/12568

I don't think ui-router would break anything unless there was some kind of parse error or syntax error. Can you share a URL with me at<EMAIL_ADDRESS>and I'll see if I can get some logs to help dig into the issue?

@thoop I did send you an email.

It turned out to be that I was wrong. The problem is not with "ui-router" but "ocLazyLoad".
The following code is where the problem resides:
resolve:
  lazyLoad: ($ocLazyLoad, $q) ->
    # dependencies list
    scripts = defaultScripts.concat([
      'public/css/login.css?v=<#_VERSION_#>'
      ])

    # noraml way to load dependencies
    $ocLazyLoad.load scripts
    .then ->
      # load finished!
      ...

The code above doesn't work, and here is the error:
TypeError: Cannot read property '1' of null

And if I change the code above to something without "ocLazyLoad" it just works fine, as the code below (use head.js):
resolve:
  lazyLoad: ($ocLazyLoad, $q) ->
    # dependencies list
    scripts = defaultScripts.concat([
      'public/css/login.css?v=<#_VERSION_#>'
      ])

    # alternative way to load dependencies
    (do (scripts) ->
      $q (resolve, reject) ->
        head.load.apply this, scripts.concat ->
          resolve()
    ).then ->
      # load finished!
      ...

So, here I am now ...

Interesting. Thanks for that! Do you know what line of code was causing that error inside ocLazyLoad?

The full error is:
TypeError: Cannot read property '1' of null
    at buildElement (...oclazyload/dist/ocLazyLoad.js:149:79)
    at loading (...oclazyload/dist/ocLazyLoad.js:208:29)
    at Object.m [as forEach] (...angular/angular.min.js:7:322)
    at ocLazyLoad.provider.$get.cssLoader (...oclazyload/dist/ocLazyLoad.js:207:21)
    at ocLazyLoad.provider.$get.filesLoader (...oclazyload/dist/ocLazyLoad.js:292:13)
    at Object.ocLazyLoad.provider.$get.load (...oclazyload/dist/ocLazyLoad.js:579:13)
    at ...oclazyload/dist/ocLazyLoad.js:428:42
    at Object.m [as forEach] (...angular/angular.min.js:7:322)
    at Object.ocLazyLoad.provider.$get.load (...oclazyload/dist/ocLazyLoad.js:426:23)
    at Object.t.state.resolve.lazyLoad

Around ocLazyLoad.js:149, I see:
if(!uaCssChecked) {
  var ua = navigator.userAgent.toLowerCase();

  // iOS < 6
  if(/iP(hone|od|ad)/.test(navigator.platform)) {
    var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
    var iOSVersion = parseFloat([parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)].join('.'));
    useCssLoadPatch = iOSVersion < 6;
  } else if(ua.indexOf("android") > -1) { // Android < 4.4
    var androidVersion = parseFloat(ua.slice(ua.indexOf("android") + 8));
    useCssLoadPatch = androidVersion < 4.4;
  } else if(ua.indexOf('safari') > -1 && ua.indexOf('chrome') == -1) {
    var safariVersion = parseFloat(ua.match(/version\/([\.\d]+)/i)[1]);
    useCssLoadPatch = safariVersion < 6;
  }
}

And I used this user agent to test the page:
Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.0.0 (development) Safari/538.1 Prerender (+https://github.com/prerender/prerender)

Looks like it's from this line:
var safariVersion = parseFloat(ua.match(/version\/([\.\d]+)/i)[1]);

That regex doesn't work with our user agent (same with chrome but they ignore chrome there)

So, What's your suggestion then ? Should I report this to ocLazyLoad repo?

@thoop and @phizaz Add this script to your index.html to fix this issue.

<script type="text/javascript">
    function setUserAgent(window, userAgent) {
        if (window.navigator.userAgent != userAgent) {
            var userAgentProp = { get: function () { return userAgent; } };
            try {
                Object.defineProperty(window.navigator, 'userAgent', userAgentProp);
            } catch (e) {
                window.navigator = Object.create(navigator, {
                    userAgent: userAgentProp
                });
            }
        }
    }
    if(navigator.userAgent.indexOf('Prerender') !== -1) {
        setUserAgent(window, navigator.userAgent + 'chrome');
    }
</script>
<!--Prerender User Agent Fix End -->

@mosiac Thanks a lot, that solves my problem beautifully.

I have exactly the same issue, but the code snippet didn't help me.
Which version of ocLazyLoad were you using? @phizaz

i have the same issue and UI Router return blank page for me ., how you work around i did not use any ocLazyLoad .


HassOS Beta

How do I install the HassOS Beta Version?
Add-on Store

There are several versions of the addon available:**

It should be showing up now. I had an error in the config.

No Integration sensors available with the Beta Version?

Nothing changed there. Check your HA logs to see if the integration needs to be reconfigured.

Nothing changed there. Check your HA logs to see if the integration needs to be reconfigured.

I removed and re-added the integration but it's still the same.
Also, can't figure out why the following automation executes every 1 minute, seems like Person Motion in stuck, it's now 3:15pm and still shows detected from since 12:54pm.
alias: Frigate - Notify Detected Object On Porch
description: Object detection notification from Frigate
trigger:
  - platform: mqtt
    topic: frigate/events
condition:
  - condition: template
    value_template: >-
      {{ as_timestamp(now()) -
      as_timestamp(states.binary_sensor.front_door.last_changed) > 60 }}
  - condition: template
    value_template: >-
      {{
      (as_timestamp(now())-as_timestamp(state_attr('automation.frigate_notify_detected_object_on_porch','last_triggered')
      | default(0)) | int > 60) }}
  - condition: template
    value_template: '{{ not ''steps'' in trigger.payload_json[''after''][''current_zones''] }}'
  - condition: template
    value_template: '{{ not ''south_side'' in trigger.payload_json[''after''][''camera''] }}'
action:
  - service: notify.group
    data:
      message: >-
        A {{trigger.payload_json["after"]["label"]}} was detected on the
        {{trigger.payload_json["after"]["camera"]}} camera.
      data:
        photo:
          - url: >-
              hassos_url/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/snapshot.jpg
            caption: >-
              'A {{trigger.payload_json["after"]["label"]}} was detected at the
              Front {{trigger.payload_json["after"]["entered_zones"]}}'.
  - delay:
      seconds: 20
  - service: notify.group
    data:
      message: Video of {{trigger.payload_json["after"]["label"]}}" detected.
      data:
        video:
          - url: >-
              hassos_url/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/{{trigger.payload_json["after"]["camera"]}}/clip.mp4
            timeout: 1000
            caption: >-
              'Video of {{trigger.payload_json["after"]["label"]}}" detected at
              the Front {{trigger.payload_json["after"]["entered_zones"]}}'.
mode: single
initial_state: true

It should be showing up now. I had an error in the config.

FYI, beta 0.11.0 seems to be much more stable, no errors in logs even with hardware acceleration enabled.

Have you taken a look at the debug view? Frigate tracks stationary objects and sends an update message for them every minute. Sounds like something is being tracked.

Have you taken a look at the debug

Seems to be working as intended, or maybe I'm lookin at it wrong.

Here's the automation:-
alias: Frigate - Notify Detected Object On Porch
description: Object detection notification from Frigate
trigger:
  - platform: mqtt
    topic: frigate/events
condition:
  - condition: template
    value_template: >-
### Cancel if the front door was open recently - means we are going out.
      {{ as_timestamp(now()) -
      as_timestamp(states.binary_sensor.front_door.last_changed) > 60 }}
  - condition: template
    value_template: >-
### Cancel if this automation ran within the last min.
      {{
      (as_timestamp(now())-as_timestamp(state_attr('automation.frigate_notify_detected_object_on_porch','last_triggered')
      | default(0)) | int > 60) }}
  - condition: template
### Avoid triggering for the following zones.
    value_template: '{{ not ''steps'' in trigger.payload_json[''after''][''current_zones''] }}'
  - condition: template
    value_template: '{{ not ''south_side'' in trigger.payload_json[''after''][''camera''] }}'
action:
  - service: notify.group
    data:
      message: >-
        A {{trigger.payload_json["after"]["label"]}} was detected on the
        {{trigger.payload_json["after"]["camera"]}} camera.
      data:
        photo:
          - url: >-
              http://hass_url/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/snapshot.jpg
            caption: >-
              'A {{trigger.payload_json["after"]["label"]}} was detected at the
              Front {{trigger.payload_json["after"]["entered_zones"]}}'.
  - delay:
      seconds: 20
  - service: notify.group
    data:
      message: Video of {{trigger.payload_json["after"]["label"]}}" detected.
      data:
        video:
          - url: >-
              http://hass_url/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/{{trigger.payload_json["after"]["camera"]}}/clip.mp4
            timeout: 1000
            caption: >-
              'Video of {{trigger.payload_json["after"]["label"]}}" detected at
              the Front {{trigger.payload_json["after"]["entered_zones"]}}'.
mode: single
initial_state: true

Motion Masks

Zones

Front Door

Porch

Steps

Person Object Mask

Here are the latest events:-

What I notice, is when the automation is triggered by an object, it executes as expected, but then continues to fire every minute sending an image with no specified object until I restart Frigate.

then continues to fire every minute sending an image with no specified object until I restart Frigate

This is expected behavior when tracking stationary objects. If you look at the debug view when this is happening, you should see a bounding box for the stationary object.

Click on the camera to view the live stream and then select debug in the top right. Below the stream you have some options to turn on bounding boxes, etc.

Click on the camera to view the live stream and then select debug in the top right. Below the stream you have some options to turn on bounding boxes, etc.

Got it, I could be wrong, but could it be the time in the zone below is what may have been triggering the event, I adjusted the zone, but won't know the effects for sure until tomorrow AM.
Old Zone

New Zone

Any idea how I can troubleshoot the issue with the missing sensors?, I removed and re-added the integration a couple times with the same result.
Sensors Currently Available

Any chance of detecting packages/box only if in configured zone's for X amount of time?

New error on live stream.
Error from stream worker: Error opening stream (ERRORTYPE_2, No such file or directory) ccab4aaf-frigate-fa-beta

Any chance of detecting packages/box only if in configured zone's for X amount of time?

The model doesn't support packages, but custom models in Frigate+ will.
Some sensors are sent via MQTT, so make sure that is still working properly between HA and Frigate.

could it be the time in the zone below is what may have been triggering the event

You should definitely add a motion mask over the timestamp if you haven't already, but motion and zones have nothing to do with each other. Zones are only applicable to objects.

but custom models in Frigate+ will
👍

Some sensors are sent via MQTT

MQTT seems to be working.
{
  "frontdoor": {
    "camera_fps": 5,
    "process_fps": 5,
    "skipped_fps": 0,
    "detection_fps": 0,
    "pid": 221,
    "capture_pid": 226
  },
  "south_side": {
    "camera_fps": 5.1,
    "process_fps": 5.1,
    "skipped_fps": 0,
    "detection_fps": 0,
    "pid": 225,
    "capture_pid": 229
  },
  "detectors": {
    "coral": {
      "inference_speed": 55.4,
      "detection_start": 0,
      "pid": 217
    }
  },
  "detection_fps": 0,
  "service": {
    "uptime": 311,
    "version": "0.11.0-cbf26e0",
    "storage": {
      "/media/frigate/recordings": {
        "total": 235535.3,
        "used": 63994.4,
        "free": 161940.5,
        "mount_type": "ext4"
      },
      "/media/frigate/clips": {
        "total": 235535.3,
        "used": 63994.4,
        "free": 161940.5,
        "mount_type": "ext4"
      },
      "/tmp/cache": {
        "total": 4095,
        "used": 56.4,
        "free": 4038.5,
        "mount_type": "tmpfs"
      },
      "/dev/shm": {
        "total": 4095,
        "used": 1.3,
        "free": 4093.7,
        "mount_type": "tmpfs"
      }
    },
    "temperatures": {}
  }
}

You should definitely add a motion mask

Motion mask already exist.

Any idea why the automation below is still being executed?
Debug

Motion Masks

Zones

Any idea why I keep getting the following error?
Timeout error fetching information from http://ccab4aaf-frigate-fa-beta:5000/api/stats:

The integration looks like it's set up to point to the full access beta addon. If you have switched the the stable version of the addon, you need to remove and reconfigure the integration to update the url.
For inference speeds, lower is better. Those speeds look like USB2 speeds. Is it plugged into a USB3 port?

I am still using the bata version.
Frigate NVR (Full Access) Beta (0.11.0
Hostname ccab4aaf-frigate-fa-beta

The integration looks like it's set up to point to the full access beta addon.

Errors still persist, and I am still using the Full Access Beta version.
Also, I stopped receiving video with the automation below, I only receive the photo, any ideas?
Automation Action
action:
  - service: notify.group
    data:
      message: >-
        A {{trigger.payload_json["after"]["label"]}} was detected on the
        {{trigger.payload_json["after"]["camera"]}} camera.
      data:
        photo:
          - url: >-
              http://hass_url/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/snapshot.jpg
            caption: >-
              'A {{trigger.payload_json["after"]["label"]}} was detected at the
              Front {{trigger.payload_json["after"]["entered_zones"]}}'.
  - delay:
      seconds: 30
  - service: notify.group
    data:
      message: Video of {{trigger.payload_json["after"]["label"]}}" detected.
      data:
        video:
          - url: >-
              http://hass_url/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/{{trigger.payload_json["after"]["camera"]}}/clip.mp4
            timeout: 1000
            caption: >-
              'Video of {{trigger.payload_json["after"]["label"]}}" detected at
              the Front {{trigger.payload_json["after"]["entered_zones"]}}'.

LOGS
Logger: homeassistant.components.telegram_bot
Source: components/telegram_bot/__init__.py:798
Integration: Telegram bot (documentation, issues)
First occurred: March 12, 2022, 9:12:22 AM (85 occurrences)
Last logged: 8:55:11 AM

Can't send file with kwargs: {'message': 'Video of person" detected.', 'url': 'http://usidsr.easterndns.com:8123/api/frigate/notifications/1647468709.715787-tsefen/porch/clip.mp4', 'timeout': 1000, 'caption': '\'Video of person" detected at the Front [\'Porch\']\'.'}
Can't send file with kwargs: {'message': 'Video of person" detected.', 'url': 'http://usidsr.easterndns.com:8123/api/frigate/notifications/1647473117.722614-dmizdl/porch/clip.mp4', 'timeout': 1000, 'caption': '\'Video of person" detected at the Front [\'Porch\']\'.'}
Can't send file with kwargs: {'message': 'Video of person" detected.', 'url': 'http://usidsr.easterndns.com:8123/api/frigate/notifications/1647516870.548805-2cmi1j/porch/clip.mp4', 'timeout': 1000, 'caption': '\'Video of person" detected at the Front [\'Porch\']\'.'}
Can't send file with kwargs: {'message': 'Video of person" detected.', 'url': 'http://usidsr.easterndns.com:8123/api/frigate/notifications/1647518692.463201-3wb45u/porch/clip.mp4', 'timeout': 1000, 'caption': '\'Video of person" detected at the Front [\'Door\']\'.'}
Can't send file with kwargs: {'message': 'Video of person" detected.', 'url': 'http://usidsr.easterndns.com:8123/api/frigate/notifications/1647521677.710851-p4nfxt/porch/clip.mp4', 'timeout': 1000, 'caption': '\'Video of person" detected at the Front [\'Porch\']\'.'}

Nothing changed there. Check your HA logs to see if the integration needs to be reconfigured.

So, I did a fresh install and still don't see the sensors. any idea what the issue may be?
MQTT Raw / formatted JSON
{
  "porch_01": {
    "camera_fps": 5.1,
    "process_fps": 5.1,
    "skipped_fps": 0,
    "detection_fps": 0,
    "pid": 222,
    "capture_pid": 226
  },
  "south_side": {
    "camera_fps": 5,
    "process_fps": 5,
    "skipped_fps": 0,
    "detection_fps": 0,
    "pid": 224,
    "capture_pid": 227
  },
  "detectors": {
    "coral": {
      "inference_speed": 19.86,
      "detection_start": 0,
      "pid": 217
    }
  },
  "detection_fps": 0,
  "service": {
    "uptime": 263021,
    "version": "0.11.0-cbf26e0",
    "storage": {
      "/media/frigate/recordings": {
        "total": 235535.3,
        "used": 42590.8,
        "free": 183344.1,
        "mount_type": "ext4"
      },
      "/media/frigate/clips": {
        "total": 235535.3,
        "used": 42590.8,
        "free": 183344.1,
        "mount_type": "ext4"
      },
      "/tmp/cache": {
        "total": 4095,
        "used": 72.3,
        "free": 4022.7,
        "mount_type": "tmpfs"
      },
      "/dev/shm": {
        "total": 4095,
        "used": 1.3,
        "free": 4093.7,
        "mount_type": "tmpfs"
      }
    },
    "temperatures": {}
  }
}

Specifically which sensors are not working?

Pretty much all the system (nvr) sensors as mentioned above and listed below, except for the following 2.

sensor.frigate_nvr_cpu_percent
sensor.frigate_nvr_memory_percent
binary_sensor.frigate_nvr_running
sensor.frigate_nvr_version
sensor.frigate_nvr_newest_version
binary_sensor.frigate_nvr_update_available

I don't think the frigate integration provides those sensors. Are those created by the supervisor for addons?

I don't think the frigate integration provides those sensors. Are those created by the supervisor for addons?

I'm not sure, I assume they were created by the integration, but they all disappeared after upgrading.

I would look in the supervisor logs. The integration doesn't create them.

Not much pertaining to Frigate in the Supervisor Logs, except for a few entries about Frigate having full access.

All I know is that the integration doesn't create those sensors. I have never seen sensors like that because I do not run HassOS.

All I know is that the integration doesn't create those sensors.

They are indeed created by HA Supervisor, and was all disabled, not sure why, but they are all back up and running after manually re-enabling them.

So, I still can't figure out why the below send video action in my automation don't work, I tried reaching the url from the error log directly, but got the message below, could it be an issue with the ID?
Automation Action That Works
  - service: notify.group
    data_template:
      message: Some Message.
      data:
        photo:
          - url: >-
              http://<IP_ADDRESS>:8123/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/snapshot.jpg
            caption: >-
              'A {{trigger.payload_json["after"]["label"]}} was detected at the
              Front {{trigger.payload_json["after"]["entered_zones"]}}'.

Automation Action that Don't Work
  - delay:
      seconds: 45
  - service: notify.group
    data_template:
      message: Video of {{trigger.payload_json["after"]["label"]}}" detected.
      data:
        video:
          - url: >-
              http://<IP_ADDRESS>:8123/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/{{trigger.payload_json["after"]["camera"]}}/clip.mp4
            timeout: 5000
            caption: >-
              'Video of {{trigger.payload_json["after"]["label"]}}" detected at
              the Front {{trigger.payload_json["after"]["entered_zones"]}}'.

Error Log
Logger: homeassistant.components.telegram_bot
Source: components/telegram_bot/__init__.py:809
Integration: Telegram bot ([documentation](https://www.home-assistant.io/integrations/telegram_bot), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+telegram_bot%22))
First occurred: April 27, 2022, 8:09:39 PM (22 occurrences)
Last logged: 5:47:44 PM

Can't send file with kwargs: {'message': 'Video of person" detected.', 'url': 'http://<IP_ADDRESS>:8123/api/frigate/notifications/1651261173.422286-hnxrtc/porch_01/clip.mp4', 'timeout': 5000, 'caption': '\'Video of person" detected at the Front []\'.'}
Can't send file with kwargs: {'message': 'Video of person" detected.', 'url': 'http://<IP_ADDRESS>:8123/api/frigate/notifications/1651261366.842301-994nok/porch_01/clip.mp4', 'timeout': 5000, 'caption': '\'Video of person" detected at the Front [\'Porch\']\'.'}
Can't send file with kwargs: {'message': 'Video of person" detected.', 'url': 'http://<IP_ADDRESS>:8123/api/frigate/notifications/1651262777.82933-75r8o4/porch_01/clip.mp4', 'timeout': 5000, 'caption': '\'Video of person" detected at the Front [\'Steps\', \'Porch\']\'.'}
Can't send file with kwargs: {'message': 'Video of person" detected.', 'url': 'http://<IP_ADDRESS>:8123/api/frigate/notifications/1651267569.036967-z1wjxi/porch_01/clip.mp4', 'timeout': 5000, 'caption': '\'Video of person" detected at the Front [\'Steps\', \'Porch\']\'.'}
Can't send file with kwargs: {'message': 'Some Message.', 'url': 'http://<IP_ADDRESS>:8123/api/frigate/notifications/1651268803.686459-pcti8t/south_side/clip.mp4', 'timeout': 5000, 'caption': '\'Video of person" detected on the South Side Camera.\''}

Message after try to access the video directly
URL:- http://<IP_ADDRESS>:8123/api/frigate/notifications/1651261173.422286-hnxrtc/porch_01/clip.mp4
Meg: Could not create clip from recordings for porch_01.
*Files In Folder

This is a known issue with the initial beta. It will be fixed when an official beta comes out for 0.11.0.

This is a known issue with the initial beta. It will be fixed when an official beta comes out for 0.11.0.

Just saw that Frigate+ is available, are there definitions for the various options/abilities listed?
Upload & annotate
Frigate integration
Support open source Frigate
Access to custom models

I'm not sure what's happening, but since I updated to 0.11.0-beta2, and then reverted back to 0.11.0-beta, frigate seems to have stopped storing events, but snapshots exist for the entity in the integration, and automations with sending snapshots still work.
Last few stored events May 19th

Last snapshot in integration May 23rd

The database updates for beta 2 are not backwards compatible. You will either need to restore your old database file or delete the database file and let it get recreatead.

Would the old database still exist in the addon?, and if so, where would it be located?

The old database would only exist if you have backups somewhere.

I have complete HA Backups, but that will restore the complete system which
I would prefer not to do ATM, how do I delete and rebuild the database?
On Tue, May 24, 2022, 6:32 AM Blake Blackshear @.***>
wrote:

The old database would only exist if you have backups somewhere.
—
Reply to this email directly, view it on GitHub
https://github.com/blakeblackshear/frigate-hass-addons/issues/67#issuecomment-1135741701,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AG5FP2KAUDOWVELVYFOUX5TVLSV2FANCNFSM5O7K24LQ
.
You are receiving this because you modified the open/close state.Message
ID: @.***>

This is a known issue with the initial beta. It will be fixed when an official beta comes out for 0.11.0.

Video clips in notifications now work in "0.11.0-beta3", but the Web UI / Dashboard is Blank.

@blakeblackshear
Beta4 isn't showing up in HA Add-On Store or as an update.


Switch to ES6 compatible markdown library

[HMR][Svelte] Unrecoverable error in : next update will trigger a full reload
error shows in dev tools
goes away when removing all references to snarkdown from Component.svelte
This hasn't felt right for a while, time to investigate better ways of rendering markdown, preferably in SSR phase.

so I misunderstood the problem slightly, snarkdown is ES module compatible https://github.com/developit/snarkdown
but my wrapper wasn't.
I think it now is, however I still get the error "Cannot find package 'snarkdown' imported from..." on the server, because I removed snarkdown copy from the deployment.
To replicate locally I have to rename/delete the node_modules/snarkdown folder before running node build because of course it can find it otherwise!

so I misunderstood the problem slightly, snarkdown is ES module compatible https://github.com/developit/snarkdown
but my wrapper wasn't.
I think it now is, however I still get the error "Cannot find package 'snarkdown' imported from..." on the server, because I removed snarkdown copy from the deployment.
To replicate locally I have to rename/delete the node_modules/snarkdown folder before running node build because of course it can find it otherwise!

sveltekit itself uses marked, mdsvex uses remark.
snarkdown is fastest in benchmarks but more limited, e.g. tables


Building Smart Apps with Azure Machine Learning - application.ts needs to add "Data source URL" in globalParameters

Building Smart Apps with Azure Machine Learning workshop: https://github.com/MSFTImagine/computerscience/blob/master/Workshop/4. Machine Learning/Azure Machine Learning HOL (Node).md
In Exercise 6, Step 17 - some code is given for application.ts file. The Data source URL is not given and the server responds Bad Argument to requests. I have fixed the code in my local machine and this seems to work.
submitGrid() {
...

        const url = 'web_url';
        /** The Data source URL needs to be added */
        let request = { ...
            },
            globalParameters: {
                "Data source URL": url
            }
        };
}

Hi Salman,
The instructions in the lab Exercise 5 Step 7, tell you where to retrieve the URL you should specify as the web url and API Key.  Then in Exercise 6 Step 18 they tell you do update those values.  I just ran through the lab myself and it seems to be working as long as you copy over that URL and API key.  Hope that helps! Susan


pull request for e2e test at 12/23/2016 18:56:13

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Updates

Docs Build status updates of commit 224de45:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/voice-commands/voicecommand-design-guidelines.md
:bulb:Suggestion
View
Details

docs/skills/design-principles.md
:white_check_mark:Succeeded
View

docs/skills/get-user-profile-context.md
:white_check_mark:Succeeded
View

docs/voice-commands/deep-link-into-your-app-from-cortana.md
:white_check_mark:Succeeded
View

docs/voice-commands/dynamically-modify-voice-command-definition-vcd-phrase-lists.md
:white_check_mark:Succeeded
View

docs/voice-commands/interact-with-a-background-app-in-cortana.md
:white_check_mark:Succeeded
View

docs/voice-commands/launch-a-background-app-with-voice-commands-in-cortana.md
:white_check_mark:Succeeded
View

docs/voice-commands/launch-a-foreground-app-with-voice-commands-in-cortana.md
:white_check_mark:Succeeded
View

docs/voice-commands/support-natural-language-voice-commands-in-cortana.md
:white_check_mark:Succeeded
View

docs/voice-commands/vcd.md
:white_check_mark:Succeeded
View

docs/voice-commands/voicecommand-design-guidelines.md

Line 125: [Suggestion] Link 'https://msdn.microsoft.com/en-us/windows/uwp/controls-and-patterns/tiles-and-notifications-app-assets' contains locale code 'en-us'. For localizability, remove 'en-us' from links to most Microsoft sites. NOTE: This Suggestion will become a Warning on 12/20/2019.

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Backport to opendistro-1.0

opendistro-for-elasticsearch/security pull request intake form
Please provide as much details as possible to get feedback/acceptance on your PR quickly

Category: (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation)

Github Issue # or road-map entry, if available:

Description of changes:

Why these changes are required?

What is the old behavior before changes and new behavior after changes? (Please add any example/logs/screen-shot if available)

Testing done: (Please provide details of testing done: Unit testing, integration testing and manual testing)

TO-DOs, if any: (Please describe pending items and provide Github issues# for each of them)

Is it backport from master branch? (If yes, please add backport PR # and commits #)
Cherry-pick: commit d031626b73c871de3b214f412c49e0bf479896e4
commit d17ecb323100a48efd1e2c70ae94fee390bae154

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Please include cherry pick info both in commit message and PR.

Please include cherry pick info both in commit message and PR.
Done

Please include cherry pick info both in commit message and PR.

Done


ARROW-10109: [Rust] Add support to the C data interface for primitive types and utf8

This PR is a proposal to add support to the C data interface by implementing the necessary functionality to both consume and produce structs with its ABI and lifetime rules.
This is for now limited to primitive types and strings (utf8), but it is easily generalized for all types whose data is encapsulated in ArrayData (things with buffers and child data). For types where this does not happen (such as StructArray, DictionaryArray and ListArray, where data also resides on their specific struct implementations instead of ArrayData), I believe that more work is needed. IMO we should strive to have all data in ArrayData, as it makes it significantly easier to export it via the C Data Interface, as well as understanding what they physically contain.
Some design choices:

import and export does not care about the type of the data that is in memory (previously BufferData, now Bytes) - it only cares about how they should be converted from and to ArrayData to the C data interface.
import wraps incoming pointers on a struct behind an Arc, so that we thread-safely refcount them and can share them between buffers, arrays, etc.
export places Buffers in private_data for bookkeeping and release them when the consumer releases it via release.

I do not expect this PR to be easy to review, as it is touching sensitive (aka unsafe) code. However, based on the tests I did so far, I am sufficiently happy to PR it. I tried to comment as much as possible, which I will continue to do so in the following commits.
This PR has three main parts:

Addition of an ffi module that contains the import and export functionality
Add some helpers to import and export an Array from C Data Interface
A crate to test this against Python/C++'s API

It also does a small refactor of BufferData, renaming it to Bytes (motivated by the popular bytes crate), and moving it to a separate file.
What is tested:

round-trip Python -> Rust -> Python (new separate crate, arrow-c-integration)
round-trip Rust -> Python -> Rust  (new separate crate, arrow-c-integration)
round-trip Rust -> Rust -> Rust

What is not tested yet:

memory allocation counts (I am still trying to find a way of doing this in Rust)

Things to do:

[ ] CI for the Python tests: it requires different compilation flags, which requires compiling the whole thing. I excluded it from the workspace as it does not behave well with rust-analyzer, but we need to add it to the CI nevertheless.
[ ] Add more comments
[ ] Add more tests
[ ] Extend for all types that only use buffers
[ ] Error on types that are not supported

Finally, this PR has a large contribution of @pitrou , that took a lot of his time to explain to me how the C++ was doing it and the main things that I had to worry about here.

Thanks @jorgecarleitao this is really interesting. I've had a first pass through to get familiar with this and I will try building locally sometime this weekend hopefully.

memory allocation counts (I am still trying to find a way of doing this in Rust)

Just FTR, in C++ we have a global function that returns the number of currently Arrow-allocated bytes. This helps us write crude resource allocation tests (here through the Python wrapper pyarrow.get_total_allocated_bytes):
https://github.com/apache/arrow/blob/master/python/pyarrow/tests/test_cffi.py#L116-L131
Another possibility would be to use the callback facility on your Bytes object to check that the destructor was called at some point.

Some changes since last time:

added a small tool to verify memory allocations and verified no leaks
added the test that @pitrou suggested to verify that we call the c++'s release.

The tool counts all memory allocations and deallocations, like in C++. It is used as a test at the end of all tests, as a final validation that the test suite does not leak.
I've placed it behind a feature gate as it current only works in single-threaded programs. Suggestions are welcomed to improve it further.
I think that this is now ready to review.

@nevi-me , @andygrove @pitrou @alamb , I have rebased this PR.
I need your guidance here:

is this something that we still want to pursue, or should we close this? If open:
Currently the memory track is done with a feature gate. This is faster, but requires a new compilation to run the tests with that feature gate.
Currently it tests memory leaks via a test at the end of all tests (and under the feature gate). This covers all tests implicitely, but tests that panic are intrinsically leaky and thus there is a non-trivial interaction between tests and the memory check test.
The integration test with Python/C++ requires another compilation, with other compiler flags, which is an extra CI burden.

Some ideas:

Refactor the memory test check to be on a per-test basis, so that we do not have interactions between tests. The positive is that we won't get tests interactions. The downside is that we need to be explicit in performing the memory check on each test we want.
Make the allocation/deallocation outside the feature gate. This may make the code slower (I need to profile) as we need to handle an thread-atomic lock of a counter, but it significantly reduces the complexity around CI (no need to re-compile with a different feature gate).
Make the Python/C++ tests use C++ libs and headers instead of running against pyarrow. This is something that I do not know how to do, so it will take me some time.

I made the following changes:

Made the allocation counter a AtomicIsize and removed it from the feature gate
Added CI
Renamed the crate interacting with Python to arrow-pyarrow-integration-testing

The CI will likely fail, as I will need to fiddle with it. There will be some spam. Sorry guys!

Codecov Report

Merging #8401 (e0b1fe4) into master (be13bf5) will decrease coverage by 0.11%.
The diff coverage is 70.53%.

@@            Coverage Diff             @@
##           master    #8401      +/-   ##
==========================================
- Coverage   84.43%   84.32%   -0.12%
==========================================
  Files         178      189      +11
  Lines       44144    45186    +1042
==========================================
+ Hits        37275    38104     +829
- Misses       6869     7082     +213

Impacted Files
Coverage Δ

rust/arrow/src/array/array.rs
83.49% <0.00%> (-7.04%)
:arrow_down:

rust/arrow/src/error.rs
5.00% <0.00%> (-0.27%)
:arrow_down:

rust/arrow/src/bytes.rs
54.05% <54.05%> (ø)

rust/arrow/src/ffi.rs
70.61% <70.61%> (ø)

rust/arrow/src/array/ffi.rs
88.63% <88.63%> (ø)

rust/arrow/src/buffer.rs
98.21% <100.00%> (+2.56%)
:arrow_up:

rust/arrow/src/memory.rs
100.00% <100.00%> (ø)

rust/datafusion/src/logical_plan/builder.rs
85.09% <0.00%> (-2.48%)
:arrow_down:

rust/datafusion/src/logical_plan/plan.rs
81.56% <0.00%> (-1.72%)
:arrow_down:

rust/datafusion/src/physical_plan/planner.rs
77.45% <0.00%> (-0.62%)
:arrow_down:

... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be13bf5...9569214. Read the comment docs.

@kszucs , I am trying to fix the Dev / Source Release and Merge Sctript, but I have been unable: I do not understand what I need to do besides what I already did.
From what I understood, this script is used to replace versions throughout the project. I added a new section for the new crate, but I can't find understand why is the test failing.

@alamb @pitrou , @paddyhoran @andygrove , the integration with CI is in place, the tests pass, and all comments from @alamb and @pitrou were addressed. If anyone wants to take a final pass, please let me know, otherwise, for me this is ready to merge.

I merged this and marked all associated issues as resolved.
We can now FFI to and from c++ and pyarrow 🎉

Wahoo! This is a great milestone! You could announce it on the ML.


[Bug] [Process Instance] task_instance time and process_instance time is different

Search before asking

[X] I had searched in the issues and found no similar issues.

What happened
The time difference between the task t_ds_task_instance and t_ds_process_instance in the database is 13 hours, and it is indeed the same in the ui.
What you expected to happen
the task t_ds_task_instance and t_ds_process_instance in the database will be the same
How to reproduce
My server is in China, the time zone is set to Asia/Shanghai, and the related configuration of ds is also the same

Anything else
version 2.0.9
Version
dev
Are you willing to submit PR?

[ ] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Got it. But I can't reproduce it.I will try it again tomorrow

SELECT
u.id,
u.start_time task_start_time,u.end_time as task_end_time,
t.start_time process_start_time,t.end_time as process_end_time,
t.name process_name,
SUBSTRING(t.name, 17, 14) as prcoss_name_time
from t_ds_task_instance u
INNER JOIN t_ds_process_instance t
on  u.process_instance_id = t.id
ORDER BY u.id desc

SELECT u.id, u.start_time task_start_time,u.end_time as task_end_time, t.start_time process_start_time,t.end_time as process_end_time, t.name process_name, SUBSTRING(t.name, 17, 14) as prcoss_name_time from t_ds_task_instance u INNER JOIN t_ds_process_instance t on u.process_instance_id = t.id ORDER BY u.id desc

SQL is right. Have you check your mysql's timezone?

i use sql  " SHOW GLOBAL VARIABLES LIKE 'time_zone'   " to  check mysql's timezone,the result is  "system"
No time zone configuration found in my.conf file
Using the date +%Z command returns CST.
------------------ 原始邮件 ------------------
发件人: @.>;
发送时间: 2023年7月26日(星期三) 上午9:03
收件人: @.>;
抄送: @.>; @.>;
主题: Re: [apache/dolphinscheduler] [Bug] [Process Instance] task_instance time and process_instance time is different (Issue #14632)
SELECT u.id, u.start_time task_start_time,u.end_time as task_end_time, t.start_time process_start_time,t.end_time as process_end_time, t.name process_name, SUBSTRING(t.name, 17, 14) as prcoss_name_time from t_ds_task_instance u INNER JOIN t_ds_process_instance t on u.process_instance_id = t.id ORDER BY u.id desc
SQL is right. Have you check your mysql's timezone?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

i use sql  " SHOW GLOBAL VARIABLES LIKE 'time_zone'   " to  check mysql's timezone,the result is  "system" No time zone configuration found in my.conf file  Using the date +%Z command returns CST.
…
------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年7月26日(星期三) 上午9:03 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [apache/dolphinscheduler] [Bug] [Process Instance] task_instance time and process_instance time is different (Issue #14632) SELECT u.id, u.start_time task_start_time,u.end_time as task_end_time, t.start_time process_start_time,t.end_time as process_end_time, t.name process_name, SUBSTRING(t.name, 17, 14) as prcoss_name_time from t_ds_task_instance u INNER JOIN t_ds_process_instance t on u.process_instance_id = t.id ORDER BY u.id desc SQL is right. Have you check your mysql's timezone? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

In this website. https://www.jb51.net/article/271660.htm.  I think your timezone config is simliar to the screenshot.
Maybe you can resolve your problem by using his solution.

thanks ,the problem is resolved.

thanks ,the problem is resolved.
Nice! 😁


Keycloak does not survive Docker Container restart

Describe the bug
This bug occurs sometimes. If you stop the Docker container running Keycloak and start it again, there is a chance to run in an infinite reboot loop.
To Reproduce
Steps to reproduce the behavior:

Start DIVA using our up_core.sh script
Stop the Keycloak container
Start the Keycloak container
See error

Expected behavior
Keycloak should boot without any error.
Your environment(please complete the following information):

Docker/Docker Compose version 3.9
DIVA version 2.2.0

The problem occurs only when container is restarted after Keycloak was interrupted at startup. Then the container must be removed/recreated. I just added the --force-recreate option to the startup script. Another solution could be to create own KC image and remove /opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json on each container start. But it's overhelming to provide own KC image just because of this Impurity.


[WIP] Project: Add back the PSCI fixup function

Nexus 5X firmware states psciv0.2 support, but bringing up secondary cores via psci seems to be broken here. For now there's no point in adding the patch


Support listening to cloud events in knative

This is a feature request...
Looking at the recent knative integration (#119) - this works great for actions listening to HTTP requests as it proxies between the HTTP request and the expected Web Action parameters/response.
This work could be extended to support listening to Cloud Events on Knative. This would allow those actions to be connected to knative event sources.
Digging around in how Cloud Event receivers work - they use an SDK which just listens on a HTTP port for the incoming events and decodes to an object, e.g.
https://github.com/knative/eventing-sources/blob/master/cmd/event_display/main.go
We can just import the CloudEvents JS SDK to handle the HTTP transport and proxy the events to the handler functions. https://github.com/cloudevents/sdk-javascript

CloudEvents JS SDK now has an example of using it to decode events:
https://github.com/cloudevents/sdk-javascript#receiving-events


Incorrect type when preprocessed is used?

Hi there! I don't know if this is a bug, but I was wondering why preprocess creates a very different type then without it. Here is my example.
I was wondering why role accepts e.g. 'ADMIN', but why status doesn't accept ['ACTIVE'] and is unknown instead.

I'm not an expert but using z.effect seems to fix the issue
export const usersFilterSchema = z.object({
  role: z.enum(["USER", "ADMIN"]).nullable().default(null),
  status: z.effect(userStatusSchema, { type: 'preprocess', transform: stringToArrayQuery })
});


Calculate artifact size for build (file container) artifacts

This adds the total artifact size (at the time of upload) to a property on the build artifact. This will allow the UI to show the total build artifact size without having to load the artifact.
Tested a local build of the agent to verify no change in behavior and that the calculated size was correct.
Example REST response with the new artifactsize property:
{
  "count": 1,
  "value": [
    {
      "id": 3,
      "name": "executable",
      "resource": {
        "type": "Container",
        "data": "#/15/executable",
        "properties": {
          "localpath": "C:\\OpenSource\\azure-pipelines-agent\\_layout\\_work\\1\\s\\Source\\Timely.Main\\bin\\",
          "artifactsize": "3467173"
        },
    }
  ]
}

@joshmgross minor comment, please take a look.


Website

nav bar, smooth scroll, anchor points added

I'm accepting this pull request. I'm going to continue my commits in the main branch since the website structure is done. Thanks for contributing!


WIP master <- develop

Merge the develop branch into the master branch and deploy

Build log
Preview build with this PR (c2d3eb791b675e71a315f46cf70a75d56f5a4227)

more info:cloud: Storage Free space -690731981 B      -4.29%:open_file_folder: 61.47 MiB  CI_WORK/GitHubActions/roki-web


Localization: first class citizen

Hi,
I am not sure if you have already tackled this topic: translations.
The world has seen some CMSs in the past where the ability to translate things was just added later via plugins etc., which quite often resulted in clumsy development experience (e.g. interop with other addons etc.) and UX for the content authors.
For sure there are others which integrate translatable content very well.
I just wanted to wake your awareness on this topic, because I believe it will be useful feature.
Cheers

Hi @bumbus do you have some examples of good implementations to share? Thanks.

Hi @leandrocp ,
Even though this is an old issue, it's still open, so I thought I might chime in. I've been using the Apostrophe 3 CMS (apostrophecms.com), which is Vue-based (I believe), very flexible and open-source. It has excellent localisation built in, though it does use a module to provide the actual functionality, (localization). Once all the locales are defined in a configuration file, every content type which is authored in one language, will show as not having a translation into the other ones configured, and the user will be prompted to make the necessary translation, and subsequently every time further edits are made to the document. The project documentation is good, and their screenshots do a good job of illustrating the process: dynamic i10n.
For all developer-created modules, static localisation  to strings used in the admin interface are made in JSON files, one per language.
I haven't used any others, so it's difficult to say if it's clumsy as the OP states, but it has worked well for my customer's simple needs. The project's CMS is used by Michelin, who reportedly use it on 400 of their various sites, so it stands to reason that they find it usable.
I can easily create a simple repository if you wanted to audition it yourself.
Hope that helps

It certainly helps! Thanks for sharing such detailed feedback, I'll look into that.


Fix regex in dependency script

See https://github.com/HoGentTIN/elnx-ha/pull/1

fixed in d407288


Issues about Plugin-specific Manual Translations

According to the tutorial, I made specific translation texts for several plugins. When using specific translations, these plugins do not always show the translated texts. After multiple runs, these texts are sometimes shown as translations and sometimes as original texts.
As you can see from the screenshot, the text in the text box and the text in the drop-down list are shown in different languages.

Wow, someone actually using this feature. 👍
I will investigate why this is not behaving as expected.

Does this work as expected?
XUnity.AutoTranslator-BepIn-5x-4.12.1.zip

Does this work as expected?
XUnity.AutoTranslator-BepIn-5x-4.12.1.zip
(edit: updated link)

It does work in a sense, for the part on the screenshot, but a drop-down box of another plugin is still the same as before.
When using a specific translation, the text on some components will never be translated, and other texts sometimes show the translated texts and sometimes show the original texts.
The two pictures show how it works when the same translation texts are using as specific translation and non-specific translation.

That would be because all standard UI extensions are actually handled by a different mod:

HS2API for HS2
AIAPI (I think) for AI Shoujo
etc...

So you would have to also make a plugin translation folder for that plugin.
This translation plugin has no way of knowing that it was actually Material Editor that caused AIAPI to generate custom UI.

That would be because all standard UI extensions are actually handled by a different mod:

HS2API for HS2
AIAPI (I think) for AI Shoujo
etc...

So you would have to also make a plugin translation folder for that plugin.
This translation plugin has no way of knowing that it was actually Material Editor that caused AIAPI to generate custom UI.

Many thanks.This is really helpful.By putting translated text under the AIAPI folder, some plugins are indeed translated.


Webpacker prep

Without these changes it's difficult to switch between the webpacker branch and current master branch, which is a pain.
These changes won't harm the current branch, and will simplify adding webpacker later if we do so.


Add page linking to videos produced using Sanchez

(basically, all of Carl's work)

https://github.com/nullpainter/sanchez/wiki/Showcase


Exception in server tick loop

According to your testing, does the issue occur with ONLY Immersive Portals mod?
Yes
Forge Version
40.1.18
ImmersivePortals Version
1.4.11-mc1.18.2
Latest Log
https://gist.github.com/M3hdiPG/a58de6650e18ff844064c44f37dbc37c
Crash Report (if applicable)
https://gist.github.com/M3hdiPG/b34cdbeab7da3bdba40b79c4c379f62b
Steps to Reproduce
The error happens when a player joins the server
What You Expected
I expected to join the server and that everything goes well
What Happened Instead
the server crashes as soon as i join the serer
Additional Details
No response
Please Read and Confirm The Following

[X] I have confirmed this bug can be replicated without the use of Optifine.
[X] I have confirmed the details provided in this report are concise as possible and does not contained vague information (ie. Versions are properly recorded, answers to questions are clear).
[X] I have confirmed this does not happen on the fabric version (If it does please report to here instead).
[X] I have confirmed this issue is unique and has not been reported already.

According to your testing, does the issue occur with ONLY Immersive Portals mod?
Yes

Shows log with hundreds of other mods...
Anyway, their is an issue not caused by immptl not allowing you to join: You're simply reaching the maximum size of the connection sync package. This is due to having so many mods. It's a vanilla limitation, nothing I can deal with. You can try a mod increasing that limit, though I wont guaranty it to work with immptl.
About the crash: No support with that, I'm having no time to support Hybrids (Magma). If you can reproduce this on a Forge Server feel free to reopen this issue.


Genre tab doesn't even open

The genre doesn't even open at all when opening the extension. Just shows the sources data. Changing the month just breaks it and shows this error.

Is it possible to have a extract to playnite.log?
This file is in folder %AppData%\Playnite (or in Playnite folder if portable installation).


fix: upcoming transaction total displaces money moves icon (#2327)

GitHub Issue (if applicable): #2327
Trello Link (if applicable):
Explanation of Bugfix/Feature/Modification:
The budget feature "Show upcoming transaction total" was displacing the new Money Moves icon.
I have modified the code to place the upcoming total after the Money Moves icon, and tweaked the stylesheet to keep the icon in the correct place.

Before

After

LGTM!


[FEAT] Error Popup Window on Compilation Fail

Add a Error Popup Window on Compilation Fail to make it clear to beginners that an exe cant be executed if the compilation has failed ;)

At first glance this seems to be NOT trivial to implement...

Improved messages for invalid compilers. That should be enough


"Too deep recursion while parsing"

Receiving a "Too deep recursion while parsing" (kranium.js) on the Android simulator.  Runs quite smoothly on the iPhone.
http://i.imgur.com/LNDAs.png
Host: Mac OSX 10.7
Titanium: 1.7.5
Android SDK: 2.3.3 (API 10, Rev 2.)

I'll have to look into this. The error you mention usually goes away when we add <property name="ti.android.threadstacksize" type="int">32768</property> to tiapp.xml, but that does not seem to be the case here.
Also, could you please try Ti SDK 1.7.3. I think Appcelerator made som changes in 1.7.5 which weren't meant to go live until 1.8, but still did. When 1.8 goes live, Kranium has to be slightly rebuilt since they've made their module sandboxing stricter.
Cheers

Unfortunately, I just nuked my dev box that had 1.7.3 :/.  I'll report back with some results when I try adding the property tag to tiapp.xml.  Thanks for your help!

I added the property tag on a 1.7.5 SDK build.  It's "running", but getting weird errors on bootup and on the Backbone tab and jade tab:
http://imgur.com/a/p5DDb
I'd assume it's due to the "restricted sandboxing", as you referred it to.
Host: Mac OSX 10.7
Titanium: 1.7.5 SDK
Android SDK: 2.3.3 (API 10, Rev 2.)
I'm also receiving an error on a 1.7.2 SDK build.
http://i.imgur.com/iXYTL.png
Host: Mac OSX 10.7
Titanium: 1.7.5
Android SDK: 2.3.3 (API 10, Rev 2.)
I'd test it on the 1.7.3 build, but I can't seem to find the SDK url for that version...


Crossfade at the end of the loop of audio file

Hi,
In WASAPI Exclusive mode, I wanted to crossfade the audio file while it is looping in a selected region, where the audio has to fadeout before it reaches the end the region and fades in when it gets looped back,
so that no click gets generated,
My question is when an music file is looped in a region how this can be achieved  using a single audio object, because WASAPI (Exclusive mode) doesn't allows another audio object to be created

WASAPI exclusive mode means only one application can open the device - that's not a limitation of NAudio.
The way to get what you want is to implement your own custom ISampleProvider that fades in and out the audio as it loops and use that to feed the output device. I'm afraid there isn't a ready-made class in NAudio that does that, but you could use the FadeInOutSampleProvider code as inspiration for how to write your own version of this.


Fix doc-gen-job so that it has 3 retries before failing.

Currently doc-gen-job will occasionally fail because of a race condition when updating the document job. This change will cause it to retry upto 3 times before eventually failing.

Where do this process usually fail? Do you have a few recent examples of failure?

@pedroerp See this example : https://app.circleci.com/pipelines/github/facebookincubator/velox/39127/workflows/57072bb5-84c5-473f-8be3-4be40f7e824e/jobs/265050

I haven't looked through the cci docs in a bit but in gha I would set it up in a way that the doc gen job would be canceled as soon as a new one is started on main (as the results are now invalid anyway). That way the race condition shouldn't be happening any more and we can skip the retires.

@assignUser I wonder if something like that is possible in CCI. Let me go through their docs..

@assignUser I wonder if something like that is possible in CCI. Let me go through their docs..

accepting to unblock. We can do this as a follow up.


New version: ArtifexSoftware.GhostScript version 10.01.1

Pull request has been created with Komac v1.6.0 :rocket:
Microsoft Reviewers: Open in CodeFlow

Automatic Validation ended with:

Hi @superusercode,
The installation isn't unattended:

Is there an installer switch to bypass this and have it install automatically?


Pipe first has higher priority than !

let a = "foo"
let x = !a->Js.String.includes("f") // doesn't compile (a should be a bool)
let x = !(a->Js.String.includes("f")) // compiles

That seems like a regression from the original syntax

Yes, this is currently the case. I'll look into this.

Same goes for object access:
let timezone = Intl.DateTimeFormat.make()->Intl.DateTimeFormat.resolvedOptions["timeZone"]

Still on my TODO-list 😅

According to the language, which operator should have more preference?
pipe (or) not ?

@ryyppy @cristianoc @IwanKaramazow
OCaml throws an error


Plugin doesn't play short audio files

I don't know, what's the threshold here, probably a few seconds: If I play mp3s which are just a second long, they won't play at all.
Note: There is no error, in fact, the result from await player.play(fileUrl); is even 1, it simply stays silent.

Confirming same bug. Or is it intentional?

Certainly not intentional. Please try with different audio format and devices (android, ios, emulators) and share the results so we can investigate further.

sorry it took me so long. i have investigated a bit more and it seems like it doesn't have to do anything with the duration of the file. now it looks more like the file url can not be dynamic.
the reason i assumed it's the duration, is just because i had a lot of very short files. to just make sure it works, i put a url from a sample audio file somewhere on the internet. because that one was longer in duration and i didn't see any other possible issue with the code, i assumed it must be duration (still not 100% sure it's not, but 90%) as it was the only noteworthy difference i was able to see. it's all rather confusing to me.
i'll give some sample code, but here is also some additional info: it actually works (!!) flawlessly on Android. it does not work on iOS (neither simulator, nor device).
here is some sample code to explain what's going on:
IconButton(
  icon: Icon(Icons.volume_up,
      color: Theme.of(context).textTheme.title.color,
      size: 26.0),
  onPressed: () async {
    String foo =
        "https://d39yykiboizsia.cloudfront.net/audio/he/kfar.mp3";
    String bar =
        "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3";
    String foobar =
        "https://d39yykiboizsia.cloudfront.net/audio/$languageKey/$soundFile";

    print("languageKey $languageKey");
    print("soundFile $soundFile");

    print("foo $foo"); // https://d39yykiboizsia.cloudfront.net/audio/he/kfar.mp3
    print("bar $bar"); // https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3
    print("foobar $foobar"); // https://d39yykiboizsia.cloudfront.net/audio/he/kfar.mp3
   // thus foo == foobar, but it still only foo will actually play a sound on iOS

    await audioPlayer.setReleaseMode(ReleaseMode.STOP);

    audioPlayer.setUrl(foo); // will work perfectyl also on iOS
    audioPlayer.setUrl(bar); // will work perfectyl also on iOS (why i thought it's the duration)
    audioPlayer.setUrl(foobar); // will not work on iOS, although the value is the exact same as the one of foo

    await audioPlayer.release();
    await audioPlayer.seek(Duration(milliseconds: 0));
    await audioPlayer.resume();
  },
)

can be closed. my issue was that somehow foobar had a whitespace (i believe) at the end due to soundFile. fixed by adding a .trim(). sorry and thank you!
// note: i did not see the whitespace at any point of time. not sure what the proper debugging command in dart is to print objects / strings properly to the console, but print() doesn't seem to do a good job with this.


The link in the Windows Server Core vs Nanoserver section is broken

I tried clicking on the link presented in this section:

And it brought me to a 404.
Link is: https://github.com/dotnet/dotnet-docker/blob/main/src/sdk/2.1/nanoserver-1809/amd64/Dockerfile

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

ID: c1a1a7bd-e5cd-aa5a-c21a-196cfbce495c
Version Independent ID: c89f33c7-6572-38ad-6a53-9cb6ed610c1d
Content: Windows Container Base Images
Content Source: virtualization/windowscontainers/manage-containers/container-base-images.md
Product: windows-server
Technology: windows-containers
GitHub Login: @v-susbo
Microsoft Alias: v-susbo

Fixed, thanks.

We hugely appreciate your contribution, feedback, and support to our technical documentation.
We’ve phased out GitHub Issues on this repository as the feedback mechanism for content and have replaced it with a new feedback system. For more information see, Content User Feedback. As part of this rollout, we are migrating your issue where our team will use your comments to improve the documentation experience. Unfortunately, this does mean you won't be able to access this issue after the migration is complete.
All issues will be migrated by Thursday 29th August 2024.
Once again, thank you for your valuable feedback, we hope you’ll continue to contribute using our new feedback system.


Does not work in Opera

The title says it all.
When you select something the yellow marker does not appear.

Probably, the problem was in demo. Fixed, try it

It works.
Sorry my bad, I tested it on the website http://mashajs.com/
Should have tested it with the files of github, thanks :)


Too many failed when add clue

Describe the bug
Too many failed when add clue, there are so many trace are missing
Screenshots

Additional context
Add any other context about the problem here.
 pinpoint_add_clue#-1 failed. Reason: #-1 is not alive,paramet
 pinpoint_add_clue#-1 failed. Reason: #-1 is not alive,paramet
 pinpoint_add_clues#-1 failed.Reason #-1 is not alive,paramete
 pinpoint_add_clue#-1 failed. Reason: #-1 is not alive,paramet
 pinpoint_add_clue#-1 failed. Reason: #-1 is not alive,paramet
 pinpoint_add_clues#-1 failed.Reason #-1 is not alive,paramete
 pinpoint_add_clue#-1 failed. Reason: #-1 is not alive,paramet

Reason
If a parent trace is ending:

all related child trace could failed when end_trace .
and  Pinpoint_start_trace by this parent trace could be failed. Here, it returns  -1 (Invalid trace id)

So , you should check reason why parent trace is ending !


refactor/config: refactor config types/files

This gathers a bunch of config-handling stuff which was spread across multiple files into one place, changes some of the types to have more descriptive names, makes their APIs a bit more sane, and makes it possible to write tests with multiple crust instances with on-disc config files.

Moving config to common may not be the right thing. Common is only meant for things that are needed by more than one (isolated top level) modules (barring tests). So pls retain config defs within main module

Closing because this will be made obsolete by the move to futures/tokio.


hann function

Hi! I don't know which one of you is right, but your hann window is not matching Librosa's hann window.
import numpy as np
import librosa
import matplotlib.pyplot as plt

w = librosa.filters.get_window("hann", 2048, fftbins = False)
w[:10]
w[-10:]
array([0.00000000e+00, 2.35539484e-06, 9.42155716e-06, 2.11984204e-05,
       3.76858736e-05, 5.88837614e-05, 8.47918841e-05, 1.15409998e-04,
       1.50737813e-04, 1.90774999e-04])
array([1.90774999e-04, 1.50737813e-04, 1.15409998e-04, 8.47918841e-05,
       5.88837614e-05, 3.76858736e-05, 2.11984204e-05, 9.42155716e-06,
       2.35539484e-06, 0.00000000e+00])

Apparently the fix would be to introduce the b term below:
/// Standard Hann window
pub fn hann<T>(npoints: usize) -> Vec<T>
where
    T: Sample,
{
    let mut window = vec![T::zero(); npoints];
    let pi2 = T::coerce(2.0) * T::PI;
    let np_f = T::coerce(npoints);
    let a = T::coerce(0.5);
    let b = T::coerce(1.0);
    for (x, item) in window.iter_mut().enumerate() {
        let x_float = T::coerce(x);
        *item = a - a * (pi2 * x_float / (np_f - b)).cos();
    }
    window
}

test result:
fn get_window_test() {
    let a = get_window::<f64>(2048, WindowFunction::Hann);
    println!("{:?}", &a[0..10]);
    println!("{:?}", &a[a.len()-10..]);
}

[0.0, 2.355394838837732e-6, 9.421557163713512e-6, 2.11984204002702e-5, 3.768587359187503e-5, 5.8883761400674306e-5, 8.479188410903671e-5, 0.0001154099976216072, 0.00015073781346730541, 0.0001907749988023788]
[0.0001907749988023788, 0.00015073781346730541, 0.0001154099976216072, 8.479188410903671e-5, 5.8883761400674306e-5, 3.768587359187503e-5, 2.11984204002702e-5, 9.421557163713512e-6, 2.355394838837732e-6, 0.0]

This difference is on purpose, because Rubato only uses even length windows. When making a window of length N, I actually make it length N+1 and then skip the last element which is anyway just a zero that doesn't contribute anything useful. But I keep the first element which is also zero. This puts the window center on one of the elements, instead of in between two.
The results of your funcion, as it is now, is similar to calling librosa.filters.get_window("hann", 2048, fftbins = True).
Thank you!

Maybe it would be helpful to add a comment to the code documenting this?


Service Fabric REST API - method 'Deploy Service Package To Node' results in serialization error 500

I am trying to use REST API method Deploy Service Package To Node. When request is sent to cluster, I got error

The remote server returned an error: (500) SerializationError.

URI and body of the request has been built with following approach.
string uri = string.Format( "https://{0}/Nodes/{1}/$/DeployServicePackage?api-version={2}&timeout={3}",
		this.ClusterConnection, nodeName, apiVersion, timeout );

// Request body
dynamic jsonBody = new JObject();
jsonBody.ServiceManifestName = this.ServiceManifestName;
jsonBody.ApplicationTypeName = this.ApplicationTypeName;
jsonBody.ApplicationTypeVersion = this.ApplicationTypeVersion;
jsonBody.NodeName = nodeName;

// Serialize body.
string body = JsonConvert.SerializeObject( jsonBody );

// Invoke request
InvokePost( uri, body );

I have used similar approach with other Service Fabric REST API request Provision Application Type which is executed successfully. Debugging the URI and parameters did not reveal anything when I compared the failing and successful requests.
Failing request - Deploy Service Package To Node:
URI:
https://mycluster.westeurope.cloudapp.azure.com:19080/Nodes/_nt1vm_2/$/DeployServicePackage?api-version=6.0&timeout=60
Body:
{
"ServiceManifestName": "MyContainerPkg",
"ApplicationTypeName": "MyContainer",
"ApplicationTypeVersion": "1.0.0",
"NodeName": "_nt1vm_2"
}

Successful request - Provision Application Type:
URI:
https://mycluster.westeurope.cloudapp.azure.com:19080/ApplicationTypes/$/Provision?api-version=6.2&timeout=60
Body:
{
  "Kind": "ImageStorePath",
  "ApplicationTypeBuildPath": "MyContainer",
  "ApplicationPackageCleanupPolicy": "Automatic"
}

Is there anything special that I have misunderstood from the reference Deploy Service Package To Node?
Another question: why parameter 'nodeName' is given both in path and body? Path/query parameters listed in Deploy Service Package To Node vs. body parameters listed in DeployServicePackageToNodeDescription

Some more information:
I have uploaded the manifest files to Image Store, and provisioned the application type using the REST API. I can create application using REST API method Create Application, so the manifest files should be OK. There are set of parameters in the application manifest files, which are set ParameterList given in ApplicationDescription.
The values given in body parameters of Deploy Service Package To Node do match to the app. type that is provisioned to the cluster. Values of ServiceManifestName, ApplicationTypeName and ApplicationTypeVersion are same as set in manifest files and as visible in SF Explorer, and value of NodeName parameter is set to a node name read from the cluster with GetNodeInfoList API.
The package is quite big, and thus I would use to Deploy Service Package To Node, for the reasons described in the reference:

this API provides a way to download code packages including the container images on a specific node outside of the normal application deployment and upgrade path. This is useful for the large code packages and container images to be present on the node before the actual application deployment and upgrade, thus significantly reducing the total time required for the deployment or upgrade

Any ideas what could cause my problem with the "serialization error" ?
How could I debug this more in detail?

Hi @vipul-modi
Any thoughts on who can help out on this topic from Service Fabric's side?

It is a bug in our code that is not handling empty “PackageSharingPolicyInfo” correctly. We will fix it in the next iteration. In the mean time, could you try creating the body with “PackageSharingPolicyInfo” (with “PackageSharingScope” to “None”).

Hi @MattiKiiskinen
Kindky retry the workaround and re-open if still needed


fix possible panic of slice index out of range

Please provide a description for what this PR is for.
when slice index out of range len(gs.Listeners), we should append until length is big enough to store a new value, but not just append only once,  this may cause panic due to index out of range, for example, index is 10, and len(gs.Listeners) is 1.
And to help us figure out who should review this PR, please
put an X in all the areas that this PR affects.
[ ] Configuration Infrastructure
[ ] Docs
[ ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure
Pull Request Attributes
Please check any characteristics that apply to this pull request.
[ ] Does not have any user-facing changes. This may include CLI changes, API changes, behavior changes, performance improvements, etc.

@gy95: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Rerun command

release-notes_istio
1fdcd8e2f2282b7df94a56bf19178729853d501d
link
/test release-notes_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/test release-notes_istio


Table is wrongly adding checkbox padding header on re-rendering

On a table with column selection disable, the first render works as expected, but when the state is updated and the table is force to re-render, checkbox padding header appears when it shouldn't:

Steps to Reproduce

Render a table with:

      options={{
        download: false,
        filter: true,
        print: false,
        responsive: 'scroll',
        **selectableRows**: false,
        sort: true,
        ...

Trigger state update
Checkbox padding th will appear.

I'm using:
"@material-ui/core": "^4.1.3",
"@material-ui/icons": "^4.2.1",
"mui-datatables": "^2.5.1",
"react": "^16.8.6",
...
Same behavior happens in the previous version too.

Adding fixedHeader: true to the table options seems to fix the issue. But I don't think that this is to be the expected behavior, nevertheless because fixedHeader default value is true.

Ok, my fault, selectableRows: false instead of selectableRows: 'none'.


how many epochs needed

I have trained your model from the scratch, but at the first 7 epochs (up to now), the images generated are strange, very different from the target images, and i cannot see any tissue structure, is that right?

Hi, the model's convergence behavior may depend on the data you are using. If the loss doesn't converge as the epoch increase, please try to adjust the hyper-parameters, such as learning rate. Please also ensure the data preparation is correct, as DuDoRNet also involves FT and FFT transformation that needs to match the input data.

Hi, the model's convergence behavior may depend on the data you are using. If the loss doesn't converge as the epoch increase, please try to adjust the hyper-parameters, such as learning rate. Please also ensure the data preparation is correct, as DuDoRNet also involves FT and FFT transformation that needs to match the input data.