Destroy app often requires marathon service restart

We've used Marathon for a while now, but since 0.8.0 and 0.8.1 came out, we have experienced the following bug with both versions.
After having manually started (PUT) and destroyed (DELETE) an app multiple times (5-10), Marathon reports the app as started, the PUT succeeded, while the app doesn't show up in the Marathon Web UI nor gets scheduled in Mesos (by looking at its web ui). Note that starting an app with a different id works fine.
This behavior is very consistent for an app that is in development mode which you restart with a different code base fast say within 1min of shutting the previous instance down.
The only solution is to manually restart the Marathon service. Sometimes, we even need to clean up the zookeeper state using zookeeper-client.
What can we do to prevent this?
Thanks

Hi @doctapp,
thanks for reporting this. Unfortunately, I could not reproduce that so far on the current master.
I used the following app definition:
{
  "id" : "app",
  "cmd" : "python -m SimpleHTTPServer $PORT",
  "ports" : [ 0 ],
  "cpus" : 0.1,
  "mem" : 32,
  "instances" : 1,
  "healthChecks" : [ {
    "protocol" : "HTTP",
    "portIndex" : 0,
    "path" : "/",
    "gracePeriodSeconds" : 5,
    "intervalSeconds" : 5,
    "maxConsecutiveFailures" : 3
  } ]
}

I repeated the following the requests 50x sequentially fast after each other, irrespective of the resulting status code:
PUT http://<IP_ADDRESS>:8080/v2/apps/app
DELETE http://<IP_ADDRESS>:8080/v2/apps/app

I tried the same with waiting fall all deployments finishing in between.
After every test run, I was able to destroy all ups with the API and creating the app anew. I didn't have to restart marathon.
Do my attempts to reproduce the problem look reasonable or would you suggest something else?
Can you send us your log files for the time in which the error occurred? Maybe together with stack traces of a broken marathon (jstack or kill -3)?

I can consistently reproduce this with your example. Here's the script I'm running:
---deploy.sh---
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
NAME=test-marathon
MARATHON=http://myserver:8080
pushd $DIR/.. > /dev/null
case $1 in
start)
JSON=$(cat << EOF
{
"id" : "$NAME",
"cmd" : "python -m SimpleHTTPServer $PORT",
"ports" : [ 0 ],
"cpus" : 0.1,
"mem" : 32,
"instances" : 1,
"healthChecks" : [ {
"protocol" : "HTTP",
"portIndex" : 0,
"path" : "/",
"gracePeriodSeconds" : 5,
"intervalSeconds" : 5,
"maxConsecutiveFailures" : 3
} ]
}
EOF
)
echo "$JSON" | http "$MARATHON/v2/apps"
;;
    stop)
        http DELETE $MARATHON/v2/apps/$NAME
        ;;

    *)
        echo $"Usage: $0 {start|stop}"
        exit 1

esac
popd > /dev/null
---deploy.sh---
Here's the script execution history:
---command.log---
~/dev$ ./deploy.sh start
HTTP/1.1 201 Created
Cache-Control: no-cache, no-store, must-revalidate
Content-Type: application/json
Expires: 0
Location: http://myserver:8080/v2/apps/test-marathon
Pragma: no-cache
Server: Jetty(8.y.z-SNAPSHOT)
Transfer-Encoding: chunked
{
"args": null,
"backoffFactor": 1.15,
"backoffSeconds": 1,
"cmd": "python -m SimpleHTTPServer ",
"constraints": [],
"container": null,
"cpus": 0.1,
"dependencies": [],
"deployments": [
{
"id": "84623c6d-8f6d-40bc-afca-e6ca3df22991"
}
],
"disk": 0.0,
"env": {},
"executor": "",
"healthChecks": [
{
"command": null,
"gracePeriodSeconds": 5,
"intervalSeconds": 5,
"maxConsecutiveFailures": 3,
"path": "/",
"portIndex": 0,
"protocol": "HTTP",
"timeoutSeconds": 20
}
],
"id": "/test-marathon",
"instances": 1,
"labels": {},
"maxLaunchDelaySeconds": 3600,
"mem": 32.0,
"ports": [
0
],
"requirePorts": false,
"storeUrls": [],
"tasks": [],
"tasksHealthy": 0,
"tasksRunning": 0,
"tasksStaged": 0,
"tasksUnhealthy": 0,
"upgradeStrategy": {
"maximumOverCapacity": 1.0,
"minimumHealthCapacity": 1.0
},
"uris": [],
"user": null,
"version": "2015-03-20T18:28:03.924Z"
}
~/dev$ ./deploy.sh stop
HTTP/1.1 200 OK
Cache-Control: no-cache, no-store, must-revalidate
Content-Type: application/json
Expires: 0
Pragma: no-cache
Server: Jetty(8.y.z-SNAPSHOT)
Transfer-Encoding: chunked
{
"deploymentId": "782c80ad-a24f-4787-bf07-a9edc0d3699d",
"version": "2015-03-20T18:28:21.689Z"
}
~/dev$ ./deploy.sh start
HTTP/1.1 201 Created
Cache-Control: no-cache, no-store, must-revalidate
Content-Type: application/json
Expires: 0
Location: http://myserver:8080/v2/apps/test-marathon
Pragma: no-cache
Server: Jetty(8.y.z-SNAPSHOT)
Transfer-Encoding: chunked
{
"args": null,
"backoffFactor": 1.15,
"backoffSeconds": 1,
"cmd": "python -m SimpleHTTPServer ",
"constraints": [],
"container": null,
"cpus": 0.1,
"dependencies": [],
"deployments": [
{
"id": "2a21b007-dabe-4c2a-b3c9-66ad02bd7301"
}
],
"disk": 0.0,
"env": {},
"executor": "",
"healthChecks": [
{
"command": null,
"gracePeriodSeconds": 5,
"intervalSeconds": 5,
"maxConsecutiveFailures": 3,
"path": "/",
"portIndex": 0,
"protocol": "HTTP",
"timeoutSeconds": 20
}
],
"id": "/test-marathon",
"instances": 1,
"labels": {},
"maxLaunchDelaySeconds": 3600,
"mem": 32.0,
"ports": [
0
],
"requirePorts": false,
"storeUrls": [],
"tasks": [],
"tasksHealthy": 0,
"tasksRunning": 0,
"tasksStaged": 0,
"tasksUnhealthy": 0,
"upgradeStrategy": {
"maximumOverCapacity": 1.0,
"minimumHealthCapacity": 1.0
},
"uris": [],
"user": null,
"version": "2015-03-20T18:28:33.207Z"
}
~/dev$ ./deploy.sh stop
HTTP/1.1 200 OK
Cache-Control: no-cache, no-store, must-revalidate
Content-Type: application/json
Expires: 0
Pragma: no-cache
Server: Jetty(8.y.z-SNAPSHOT)
Transfer-Encoding: chunked
{
"deploymentId": "1bf57b60-5b05-48a3-b9bc-3695fa45679a",
"version": "2015-03-20T18:28:42.471Z"
}
~/dev$ ./deploy.sh start
HTTP/1.1 504
Cache-Control: no-cache, no-store, must-revalidate
Content-Type: application/json
Expires: 0
Pragma: no-cache
Server: Jetty(8.y.z-SNAPSHOT)
Transfer-Encoding: chunked
{
"message": "Failed to wait for future within timeout"
}
~/dev$ ./deploy.sh start
HTTP/1.1 201 Created
Cache-Control: no-cache, no-store, must-revalidate
Content-Type: application/json
Expires: 0
Location: http://myserver:8080/v2/apps/test-marathon
Pragma: no-cache
Server: Jetty(8.y.z-SNAPSHOT)
Transfer-Encoding: chunked
{
"args": null,
"backoffFactor": 1.15,
"backoffSeconds": 1,
"cmd": "python -m SimpleHTTPServer ",
"constraints": [],
"container": null,
"cpus": 0.1,
"dependencies": [],
"deployments": [],
"disk": 0.0,
"env": {},
"executor": "",
"healthChecks": [
{
"command": null,
"gracePeriodSeconds": 5,
"intervalSeconds": 5,
"maxConsecutiveFailures": 3,
"path": "/",
"portIndex": 0,
"protocol": "HTTP",
"timeoutSeconds": 20
}
],
"id": "/test-marathon",
"instances": 1,
"labels": {},
"maxLaunchDelaySeconds": 3600,
"mem": 32.0,
"ports": [
0
],
"requirePorts": false,
"storeUrls": [],
"tasks": [],
"tasksHealthy": 0,
"tasksRunning": 0,
"tasksStaged": 0,
"tasksUnhealthy": 0,
"upgradeStrategy": {
"maximumOverCapacity": 1.0,
"minimumHealthCapacity": 1.0
},
"uris": [],
"user": null,
"version": "2015-03-20T18:29:04.090Z"
}
~/dev$ ./deploy.sh stop
HTTP/1.1 404 Not Found
Cache-Control: no-cache, no-store, must-revalidate
Content-Type: application/json
Expires: 0
Pragma: no-cache
Server: Jetty(8.y.z-SNAPSHOT)
Transfer-Encoding: chunked
{
"message": "App '/test-marathon' does not exist"
}
~/dev$ ./deploy.sh start
HTTP/1.1 201 Created
Cache-Control: no-cache, no-store, must-revalidate
Content-Type: application/json
Expires: 0
Location: http://myserver:8080/v2/apps/test-marathon
Pragma: no-cache
Server: Jetty(8.y.z-SNAPSHOT)
Transfer-Encoding: chunked
{
"args": null,
"backoffFactor": 1.15,
"backoffSeconds": 1,
"cmd": "python -m SimpleHTTPServer ",
"constraints": [],
"container": null,
"cpus": 0.1,
"dependencies": [],
"deployments": [],
"disk": 0.0,
"env": {},
"executor": "",
"healthChecks": [
{
"command": null,
"gracePeriodSeconds": 5,
"intervalSeconds": 5,
"maxConsecutiveFailures": 3,
"path": "/",
"portIndex": 0,
"protocol": "HTTP",
"timeoutSeconds": 20
}
],
"id": "/test-marathon",
"instances": 1,
"labels": {},
"maxLaunchDelaySeconds": 3600,
"mem": 32.0,
"ports": [
0
],
"requirePorts": false,
"storeUrls": [],
"tasks": [],
"tasksHealthy": 0,
"tasksRunning": 0,
"tasksStaged": 0,
"tasksUnhealthy": 0,
"upgradeStrategy": {
"maximumOverCapacity": 1.0,
"minimumHealthCapacity": 1.0
},
"uris": [],
"user": null,
"version": "2015-03-20T18:29:34.195Z"
}
---command.log---
As soon as I hit the "message": "Failed to wait for future within timeout", Marathon accepts the job (same output as regular run), but does not run them nor show them in it's UI. Deleting the job always fails with the "message": "App '/test-marathon' does not exist".
I've looked at the /var/log/upstart/marathon.log, but it only contains the following:
run_jar --zk zk://myserver:2181/marathon --master zk://myserver:2181/mesos
run_jar --zk zk://myserver:2181/marathon --master zk://myserver:2181/mesos
Do you need more info?

Hi @doctapp,
thanks for your investigation&report. That's really great.
At first sight, that looks pretty similar to what I did, though. I will look at it again on Monday.
I only tried to reproduce it on master so far. I'll check with 0.81. If you want, you can also check it with the master version.
Marathon logs a lot more. The location depends on your setup. Maybe grep /var/log for marathon.

Hi @doctapp,
I tried to reproduce your problem with my local development setup. Do you have a complicated setup? I changed your script slightly by quoting the $PORT variable reference (otherwise the dynamically allocated port is not used and the health check fails).
I used Marathon version 0.8.1. Unfortunately, I could not reproduce your error.
Maybe you can avoid the problem by using another request pattern. If your app definition changes between the restarts, you can just use a PUT request for the new app definition and the deployment will start.
If your app definition does not change but the version changes implicitly (because the new software version is fetched or startup or something like that), you can use a POST /v2/apps/{appId}/restart request.

I retried this morning and got this:
~/dev$ ./deploy-test.sh start
HTTP/1.1 409 Conflict
Cache-Control: no-cache, no-store, must-revalidate
Content-Type: application/json
Expires: 0
Pragma: no-cache
Server: Jetty(8.y.z-SNAPSHOT)
Transfer-Encoding: chunked
{
"deployments": [],
"message": "App is locked by one or more deployments. Override with the option '?force=true'. View details at '/v2/deployments/<DEPLOYMENT_ID>'."
}
Once Marathon restarted, I corrected the $PORT (which is ok for other scripts!) and I could no longer reproduce the problem. Our apps didn't use health, so that must be the problem. Therefore, I'll use health for my apps, but this behavior should be documented or somehow prevented.
Thanks for your help!
Martin

You are welcome.

I just want to say that  I have met many times.
But I have no idea how to solve it.
Only clear the zookeeper state and  loose many information.


fix(deps): update bcprov-jdk15on to bcprov-jdk18on

Issue
https://gravitee.atlassian.net/browse/APIM-4028
Description
The library https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk15on has been moved to https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk18on
The library https://mvnrepository.com/artifact/org.bouncycastle/bcpkix-jdk15on has been moved to
https://mvnrepository.com/artifact/org.bouncycastle/bcpkix-jdk18on
Additional context
The main goal of this task is to update the library and resolve vulnerability issues:
https://security.snyk.io/vuln/SNYK-JAVA-ORGBOUNCYCASTLE-6084022

Gravitee.io Automatic Deployment
🚀 A prerelease version of this package has been published on Gravitee's private artifactory, you can:

use it directly by updating your project with version: 5.8.2-apim-4028-update-to-bcprov-jdk18on-SNAPSHOT
download it from Artifactory here

:tada: This PR is included in version 5.9.1 :tada:
The release is available on:

5.9.1
GitHub release

Your semantic-release bot :package::rocket:


Support for web application routing

Is there an existing issue for this?

[X] I have searched the existing issues

Description
Web app routing is a preview feature that seems to be a good option for managing ingress.  The support for web app routing is added to underlying terraform resources version 3.30, around November 2022.
New or Affected Resource(s)/Data Source(s)
azurerm_kubernetes_cluster
Potential Terraform Configuration
given the `web_app_routing` block only support a single attribute `dns_zone_id`, we could elevate the value as a top level variable.

variable "web_app_rounting_dns_zone_id" {
  type = string
  default = ""
  ...
}
...
resource "azurerm_kubenetes_cluster" {
  ...
  dynamic "web_app_routing" {
    for_each = var.web_app_routing_dns_zone_id != "" ? ["dns_zone_id"] : []
    content {
      dns_zone_id = var.web_app_routing_dns_zone_id
    }
  }
  ...
}

References

Azure documentation https://learn.microsoft.com/en-us/azure/aks/web-app-routing?tabs=without-osm
terraform resource documentation https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/kubernetes_cluster#web_app_routing
terraform resource support for web app routing: https://github.com/hashicorp/terraform-provider-azurerm/pull/18667

Thanks @rjsigma for opening this issue, I think we can arrange that in our next release.

@lonegunmanb thanks for the very prompt response. Would you have an ETA for the next release? This will help us plan our work.


Buggy gradient in Firefox PDF viewer

Firefox PDF viewer (Mac & PC) isn't render gradients correctly in 2 ways:

When gradients are translated
When gradients have a stop with opacity

For example, in the browser demo, compare between Chrome & FF:
// create a document and pipe to a blob
var doc = new PDFDocument();
var stream = doc.pipe(blobStream());

function renderGradCircle(x, y, color1, opacity1, color2, opacity2) {
    var grad;

    doc.save()
        .translate(x, y);

    grad = doc.linearGradient(0, 0, 100, 0);
    grad.stop(0, color1, opacity1);
    grad.stop(1, color2, opacity2);

    doc.circle(50, 50, 50)
       .fill(grad);

    doc.restore();
}

// 1
renderGradCircle(0, 100, [255, 0, 0], 1, [0, 0, 255], 1);

// 2 - same as 1, but translated horizontally
renderGradCircle(100, 100, [255, 0, 0], 1, [0, 0, 255], 1);

// 3 - same as 1, but with opacity < 1 for one gradient stop
renderGradCircle(0, 200, [255, 0, 0], 1, [0, 0, 255], 0.2);

// 4 - same as 3, but translated horizontally
renderGradCircle(100, 200, [255, 0, 0], 1, [0, 0, 255], 0.2);

// end and display the document in the iframe to the right
doc.end();
stream.on('finish', function() {
  iframe.src = stream.toBlobURL('application/pdf');
});

This is likely entirely on Firefox's end. However, I've noticed that adjusting the renderGradCircle function to directly adjust the coordinates of the circle and gradient solve the gradient:
function renderGradCircle(x, y, color1, opacity1, color2, opacity2) {
    var grad;

    doc.save();

    grad = doc.linearGradient(x, y, x + 100, y);
    grad.stop(0, color1, opacity1);
    grad.stop(1, color2, opacity2);

    doc.circle(x + 50, y + 50, 50)
       .fill(grad);

    doc.restore();
}

Please report a bug with http://github.com/mozilla/pdf.js if you haven't already. PDF gradients are a bit weird so it is possible we're doing something strange here, but it works in other pdf viewers as you said, so I think something is up on their end.


Mode is always "Replace" on new line

OS: Windows 7x64
platformio-ide-teminal: 2.2.2
Shell: C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe
After the terminal is opened the default mode is Replace. When changing to Insert mode the mode changes back to Replace on the next line.

This is no longer occuring.
Currently using atom 1.12.7, I might have been using 1.12.6 when I opened this issue.


[ BUG ] Static rendering when exporting results in empty html files (Bad for SEO)

Describe the bug
When exporting app with static rendering, html files have an empty body content in dist folder
To Reproduce
Steps to reproduce the behavior:

Clone the base project according to documentation
git clone https://github.com/mrzachnugent/react-native-reusables.git
cp -R react-native-reusables/packages/templates/starter-base/ ./my-project
cd my-project && npm install && npx expo install --fix
npx expo export --platform web
go to dist folder
see that index.html body is empty (it shouldn't)

Expected behavior
generated html files should have a body content like expo base template
Screenshots
If applicable, add screenshots to help explain your problem.
Platform (please complete the following information):

Type: Build
OS: Windows 11

Hey @qhoarau , unless something has changed recently that I’m unaware of, this seems to be the expected behavior.

"a single index.html in the output folder and has no statically indexable HTML." - https://docs.expo.dev/distribution/publishing-websites/

When you create a new expo project, and run the same command, do you get the same results?

It is the expected behavior if the key web.output = single.
But in the default project when we clone the starter-base https://github.com/mrzachnugent/react-native-reusables.git, web.output is set to "static" which should generate an html files for each page and it does BUT the body inside those html files is empty and need rehydration (not good for SEO).
When I build with a brand new expo project with web.output = static, I do get all the html files and the body inside those html files are not empty and filled with the expected content.
I can't really tell why, i'm not experienced enough.


Fixing TransactionTooLarge on Android N

Hey!
As mentionend in #101 this library causes crashes on Android N (and above) due to parcelling too much data in onSaveInstanceState().
This PR fixes the crash by saving the bitmap into a temporary file instead.
If you have any feedback, suggestions or want any changes, feel free to contact me.
Cheers

Hi @joekoe92
SInce issue is not resolved.i am facing issue on android N
And why its not merged in master?


Expand JDBC test coverage - XA

Follows https://github.com/apache/camel-quarkus/issues/4596.
It would be nice to cover support of XA transactions - ideally something like the JmsArtemisXATest.

Similar test already exists in JTA test module - https://github.com/apache/camel-quarkus/blob/main/integration-tests/jta/src/test/java/org/apache/camel/quarkus/component/jta/it/JtaTest.java#L151


ability to exclude subjects by terms in field

want to exclude geographic and genre_form term types from subjects. subjects should include everything else. in metadata display

related to https://github.com/dulibrarytech/digitaldu-frontend/issues/338

This update allows the assignment multiple fields to one display field
The required "Topics" fields can be assigned individually, omitting the ones to be 'excluded' from the display


How Zilch should look like

The syntax is basically the identity of the programming language, what people see before they even try to use/learn it.
Most people just don't learn some because of how horrible they might look like when you don't know them (yep, I'm looking at you Haskell :eyes:).
While I don't like that at all (I mean, if you're only looking for "beautiful" programming languages, you'll most likely never find good ones), I still believe that a good looking programming language makes it easier to learn (see how people prefer Java to Scala?).

Onto the more complicated stuff now.
The first version of Zilch should include at least those features:

first-class monomorphic kinds (type and functions of type) and polymorphic types (also maybe HKTs?)
user-defined enums (like in ATS or Rust, tho in the former it's called a datatype) and records (with dot-syntax)
every variable is immutable (because I don't kinda need mutable states for now, but this will be revisited in a future version; mutable states also complicate the type system envisionned)
a Foreign Function Interface (FFI) for statically linked functions
type-classes and named (this might not be needed for the first version) implementation blocks (with a special wildcard-syntax)
pattern matching

And some examples of the grammar (most of the types written can be infered, but they are put to see how the syntax may look like at its worst):
Enumerations and records
enum maybe(a: type) ≔
  nothing()
  just(a)

enum either(a: type, b: type) ≔
  left(a)
  right(b)

record point ≔
  x: u64
  y: u64

def origin: point ≔ { x ≔ 0, y ≔ 0 }

Type-classes and implementation blocks
class functor(f: type → type) ≔
  def{a: type, b: type} map(f: a → b, x: f a): f b

impl{c: type} either_leftFunctor: functor(either(·, c)) ≔
  def map(f, x) ≔ case x of
    left(e)  → left(f e)
    right(c) → right(c)

functor(either(·, c)) is equivalent (and, in fact, is desugared internaly) to functor(Λ(x₀) either(x₀, c))
The name of the implementation is used as a mean of disambiguation when multiple instances overlap

Static import of `puts`  with alias
foreign import "stdio.h"
  "puts" as c_puts: ptr char → ()

The alias is unnecessary when it is named the same (e.g. "puts" as puts)

Functions calls with one argument do not need parentheses (same applies to type constructors and enum variants).
The examples above use the unicode syntax, but those symbols can be replaced with their ASCII counterparts:

Unicode
ASCII

≔
:=

→
->

·
_

The officially used file extension for Zilch source code is .z.

This syntax does not really please me anymore, there are some details which are a bit too heavy on the syntax.
I'll be reworking it, trying at first to remove any space-sensitive syntax (in a similar fashion than ATS2 most probably), and then maybe include some space-sensitive aspects to make it more readable/user-friendly.
The goal is mostly to have an easy-to-use and beautiful grammar, while still being pretty easy to parse (efficiency is a concern here, but not too much).

Enumerations and records
enum maybe(a : type) :=
  just(a)
  nothing()

record point :=
  _x : u64
  _y : u64

def p : point :=
  { _x := 0, _y := 3 }

Type-classes and implementation blocks
class functor(f : type -> type) :=
  def map<a b : type>(f : a -> b, x : f(a)) : f(b)

impl<a : type> eitherLeftFunctor : functor(either(_, a)) :=
  def map(f, x) := case x of
    left(e)  -> left(f e)
    right(x) -> right(x)

Static import of `puts` with alias
foreign import "stdio.h"
  "puts" as c_puts: ptr char -> ()

Infix operator definition
#[inline, infixl 0]
def ($)<a b : type>(f : a -> b, x : a) : b := f(x)

Type alias definition
alias endo(a : type) := a -> a


Added Sprite Event Handler tutorial + demo

Description
Added a tutorial md for Sprite Event Handler, with example code
Fixes # (issue)
tag change for Key Callback md is still not currently pulled.
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Documentation (update or new)

How Has This Been Tested?
The tutorial is based on experience prior and during making the demonstration. Documentation was looked up to better explain the structure of the topic.
Testing Checklist:

[ ] Tested in latest Chrome
[ ] Tested in latest Safari
[ ] Tested in latest Firefox

Checklist:

[ ] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have requested a review from ... on the Pull Request

 Sprite Event Handler - Tutorial

 Sprite Event Handler - Tutorial


Fix MemoryStarved ITs

Rewrite MemoryConsumingIterator's method to compute the amount of memory to consume, so that:

The implementation is more comprehensible
Replace exception with bounds checking
Avoid allocating more than necessary (a single byte is sufficient)
The log message includes the amount of used memory detected
The waiting message appears, even when memory was allocated, because that's the behavior
Give the GC more time to detect the changed GC condition before trying to detect the low memory condition

Also, remove hard-coded comments for size of heap and incorrect interval frequency, and increase the configured free memory threshold, so that the memory percentage isn't so low, it doesn't get lower than the minimum that G1GC needs to do its job by default on a 256K VM.
This fixes #3868
Also include trivial fixes:

Fix deprecation warning issues for getSplitCreationTime by making impl class deprecated instead of suppressing the interface deprecation, and use regular deprecations, not forRemoval=true, which complicates the way deprecations get inherited (see comments on #3977)
Remove unused Logger

These changes finished a build with the full ITs, and these tests did not fail... they didn't even flake. They seem to pass consistently now with these changes.

As I mentioned here, I think the deprecation changes should be removed from this PR and included in a new PR that also includes the forRemoval annotations on the Deprecated annotations in the Property class. Having this a separate PR would allow us to discuss the merits of forRemoval and hopefully put this issue to rest.

I created #4032 for the forRemoval stuff.


feat: jump to CW 2.x

I can see the ideas behind the code but let's convert it to the new form of serialization with the old one as fallback. That way we'll be able to just remove this module after all active contracts have been migrated and without significant added cost at that.

Thanks for the review!
Unfortunately, we need amounts represented as strings on the wire to stay for the lifetime of the protocol. This type, CoinDTO, is used in API, hence due to JS limitations we should keep it in quoted form.
On the other side, the other place Amount, u128, is used in Coin. That type is serialized only when stored. Therefore we will provide a fallback deserialization for the next release until all stored amounts get transformed from quoted to unquoted form.


Add LLaVA support

candle-llava
implement LLaVA using candle
This example is from candle-llava
The code is based on https://github.com/haotian-liu/LLaVA, Hence the llava-hf version of config may perform differently.
The llava-hf models contain tokenizer.json, so if you want pure-rust experience, I suggest you to use llava-hf version.
model zoo

liuhaotian/LLaVA
llava-hf

Right now I have tested on liuhaotian/llava-v1.6-vicuna-7b and llava-hf/llava-v1.6-vicuna-7b-hf. The memory use might have room for optimization.
Haven't support Mistral yet

@chenwanqq did you have to write torch.nonzero? This is super cool!

@chenwanqq did you have to write torch.nonzero? This is super cool!

Nah.. I just have a thought...

Oh, ok. I'm testing my phi3v implementation, and it uses torch.nonzero, so if you had a working implementation, that'd be great!

Oh, ok. I'm testing my phi3v implementation, and it uses torch.nonzero, so if you had a working implementation, that'd be great!

Ok! I will learn how to do it, but it may take some time. I might have a ‘rest’ recently to deal with my full-time work😭

Nice! I have a CPU impl here if it's helpful: https://github.com/EricLBuehler/mistral.rs/blob/c740f20e7b2885f5234e91e3638629f72c90a1c2/mistralrs-core/src/vision_models/phi3.rs#L355-L382. Great job with this PR!

Thanks!

@chenwanqq did you have to write torch.nonzero? This is super cool!

After read the docs I found the CUDA implementation of nonzero is not 'that' difficult...🧐 There is an 1-D example from Nvidia employee.Nvidia developer forum.  As for metal, I don't have a Mac device so..


Add a formatter function for value

Ben,
Thanks for your work on this library!
My pie chart has values which are actually dollars. I want to show the values as inner labels, and I need to include the dollar sign on the values - so I added in an optional function which the user can supply to format values before they're rendered.
I also found the file didn't minimise for me, so I reset the UMD pattern stuff back to the same as per the link in the comment - not sure if you had changed it from that for a reason, or whether you hadn't updated to the latest UMD pattern?
Cheers,
Darren.

Hi @dbruning - sorry, don't know how I missed your commit. This is a good addition!
For the UMD, I just swiped it from a pre-existing pattern that accommodated the various environments. I'm not sure that's related the minimization problem...
But I'll take a look at this this weekend. Thanks!

Hey @dbruning - I (finally) got around to looking at this. I think I'm going to do something a little different, however: I'm going to add a single labels.formatter option that's called for both outer and inner labels, and passed the context info. That way, users can override all labels regardless of location or type via a single function.
I'm working on 0.1.7 - I'll try to get it out the door today.


[v9.0.2] Atomik clone - lots of logo picture html while only 1 image present

After cloning the Atomik theme and changing the template of the nav bar, I see lots of logo picture tags in the html while there's only 1 image present. That is if I edit the logo area and remove the logo image, they disappear. If I then add 1 logo image, all of them are added in the html. Any idea how to delete them?

That's because this is not an  element, it's a  element. Picture elements define different images (different  elements) that are used at different screen sizes. Only the image required by the current screen size is loaded.
The  elements that comes last inside the  element is the fallback image for browsers that don't support
These min-width sizes you see are all defined in the theme's page_theme.php file.
If you don't define any, then the code will just output a normal  element instead of an  element.
It has been working this way since concrete 5.7 I believe.

I didn't know it did that. I have to regrettably admit I didn't even know the 'scrset' even existed. Geez, how far has the web gone... :)


#1862 Introduce RBAC for Keptn services

Open points:

[ ] Do not assign cluster-admin rights to installer
[ ] Define tasks for upgrader

Codecov Report

Merging #1894 into master will decrease coverage by 0.05%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #1894      +/-   ##
==========================================
- Coverage   32.21%   32.16%   -0.06%
==========================================
  Files          99       99
  Lines        7673     7683      +10
==========================================
- Hits         2472     2471       -1
- Misses       4883     4894      +11
  Partials      318      318

Impacted Files
Coverage Δ

api/handlers/configure.go
12.98% <0.00%> (+0.27%)
:arrow_up:

cli/cmd/install.go
23.15% <0.00%> (-1.22%)
:arrow_down:

shipyard-service/main.go
9.13% <0.00%> (+0.15%)
:arrow_up:

distributor/cmd/main.go
57.77% <0.00%> (-1.12%)
:arrow_down:

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 72a4c11...757d5f9. Read the comment docs.


[84] Adding a feed dictionary to map_rows

A feed dictionary is critical when working with pre-existing models.

This works, but when working with existing models, there seems to be some serious memory leaks. This is going to be addressed in a separate PR.


Unify codestyle and add docs about it

The codebase has many, many different kinds of codestyle, which we need to unify.

probably best would be to apply fixes with one PR... psr2 or something.
like symfony/laravel has.
maybe even use some free automation tools, which would check each PR for code styles

Hmm... Personally, I hate PSR-2(and its usage of the braces in newlines) and I created my own. But I was too lazy to write it down to something like Codesniffer.

Reopened for the task of document everything. :)


Parallelized Integration Tests

Since my previous PR #55 I've created test classes for all of the expensive integration tests. Here are some things in particular to note:

I removed parallel method execution from the integration tests for the following reasons:

When running the tests in parallel, the logging output that ends up in the failsafe-reports directory is mostly empty (i.e. the only thing in the output.txt file for multiple tests is "Stopping Jenkins"). Disabling parallel methods makes these much more complete.
The test methods are still independent of each other otherwise.
With the way most setup is in the @BeforeClass init method for each IT, there is very little to be gained in time saved by running these actual test methods in parallel.

Testing that the snapshot was created is the longest process to test, and brings the amount of time to execute the tests on my system from ~2 minutes to ~3 minutes.
Now that it's basically empty, I converted the ComputeEngineCloudIT to the ComputeClientIT with just one test and re-enabled that test.
There are probably ways to consolidate some of the repeated setup logic in each class but I haven't pursued this yet.
These changes don't cover the windows integration tests. I think this is already too big of a PR, and I'd rather make that a separate change.

I will fix this

Great work! A few in-line comments.


[gardening] Remove empty anonymous namespace.

Not sure how this got in there...

@swift-ci smoke test and merge


TDD project

TDD project
In this PR me @GedeonTS and my partner @kwambiee  we :

created test with respec_mocks for the methods below:
[ ] factorial
[ ] reverse
[ ] fizzBuzz
then created :
[ ] a class called Solver.
[ ] a method called factorial that takes one argument, an integer N, and returns the factorial for that number. The factorial is the multiplication of all integers from 1 to N and has the special case that the factorial of 0 is 1. This method only accepts 0 and positive integers, so if a negative integer is given it should raise an exception.
[ ] a method called reverse that takes one argument, a string word, and returns word reversed (e.g. if word is "hello" it returns "olleh").
[ ] a method called fizzbuzz that takes one argument, an integer N, and returns a string. The returned string is constructed following these rules:
[ ] When N is divisible by 3, return "fizz".
[ ] When N is divisible by 5, return "buzz".
[ ] When N is divisible by 3 and 5, return "fizzbuzz".
[ ] Any other case, return N as a string (e.g. say N is 7 then return "7").
[ ] Remember to start with tests for all of the methods described above. Your commit history should prove that you have used TDD.

Your review is welcome! :smile:

Thanks @Lordkaito !


Undocumented: Goby's modules can be new

Actually, I found the undocumented behavior some months ago, and the st0012 and I left this as is by now.
Goby's modules can be instantiated:
#Goby
module Foo
end

Foo.new       # modules can be instantiated in Goby
#» <Instance of: Foo>

# of course inheritance of modules is prohibited
class Bar < Foo
end
#» InternalError: Module inheritance is not supported: Foo

Of course this is prohibited in Ruby.
But I think the behavior suggests using modules more frequent rather than inheritance so I prefer to it.
Just close the issue if this is OK > @st0012
If not, let get started a discussion.

I think this should be prohibited because it'll be very confusing for the users who read the code later, and this violate Goby's "explicit" principle.


add school iesevilla.edu.co

@gaso First stage of verification passed, official domain is iesevilla.edu.co as far as I verified. This is just an informational note. Pull request is still in the review. I appreciate your patience while waiting for the final decision.

@gaso Thank you for your patience while waiting for a review and processing your request. Pull request merged.


Accessibility Audit: Bulk upload patient user flows

Background
The SimpleReport team performs quarterly accessibility audits as a proactive approach to ensure our products comply with Section 508 of the Rehabilitation Act.
Action requested
Use Axe DevTools to perform an accessibility audit of the bulk patient upload user flow. Do the page scan as well as any relevant guided tests.
Pages to visit:

/app/upload-patients

Use cases to test:

successful bulk upload (inc success toast)
bulk upload produces validation messages
bulk upload produces error toast

Acceptance Criteria
Full audit completed and tickets created for any accessibility violations.
Additional context
See ticket from previous audit #5781

No issues found


One hot encode vs embedding

I noticed in the paper you mentioned the input is one hot encoded user / item vectors connect to a fully connected layer to get user / item latent vector. But in your Keras code you did embedding directly on user / item to get their latent vector. Can you please explain to us what is the difference here? Thanks in advance!

If you implement Embedding function in Keras like this: https://github.com/hexiangnan/neural_collaborative_filtering/blob/4aab159e81c44b062c091bdaed0ab54ac632371f/MLP.py#L66 you will see input_dim, output_dim, input_length.
For example, you have totally 5 users, your current userID is 3, and your Embedding layer has 2 neurons, so input_dim=5, output_dim=2, and input_length=1(since we are only using userID as feature, and input shape(None, 1)). As a result, in your input layer [0 1 0 0 0] will be input for Embedding layer, and output will be like this [0.1231 -0.12414](Embedding function includes one-hot encoding with input_dim and embedding operation)

Thanks for clarifying! Closing this issue now.


feat(gateway): add upgrade and version

AXE-6063

Codecov Report
Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 98.02%. Comparing base (ae1b9b8) to head (d57dacc).

Files with missing lines
Patch %
Lines

contracts/axelar-gateway/src/contract.rs
0.00%
8 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #32      +/-   ##
==========================================
- Coverage   98.47%   98.02%   -0.45%
==========================================
  Files          24       24
  Lines        1767     1775       +8
==========================================
  Hits         1740     1740
- Misses         27       35       +8

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


HSTS Support

I think HSTS headers should be added by deafult when using now. They should be opt in (in production mode) otherwise.

Hey @dav-is. thanks for the reference to hsts. We have enabled it by default for HTTPS sites. If some one does not indent to turn it on for some reason, we have added it to config file.
...
hsts: {
    enabled: true,
    // mageAge: Must be at least 18 weeks to be approved by Google, but we are setting it to 1 year
    maxAge: 31536000,
    // Must be enabled to be approved by Google
    includeSubDomains: true,
    preload: false,
},
...


Wrong date gets selected when giving a string value

<vaadin-date-picker label="Birthday" value="2000-01-01"></vaadin-date-picker> results in

Mac Chrome / Pacific time zone

As a workaround you can also provide the time like done here: https://github.com/vaadin/vaadin-date-picker/commit/d9f3a24bd5b7ef01488f7b4da7a3895793b2faf1
This issue should be resolved with the upcoming change of using a String value instead of Date, see https://github.com/vaadin/vaadin-date-picker/issues/51#issuecomment-187733692.

resolved by #69

Hi I am doing this:

But allways the Day is a day less :(, example:
if I do this in the script:
var fechaConvertidaTimePicker = new Date(this.valorFecha);
var year = fechaConvertidaTimePicker.getFullYear();
var month= fechaConvertidaTimePicker.getMonth();
var day= fechaConvertidaTimePicker.getDate();
The var: day is a day less than wich I selected :( I don't understand why :(

HI @MarcosGalaviz
I don’t see any vaadin-date-picker specific code in your script. What does this.valorFecha refer to? Is it string, and what is its value?

Sorry I think I write wrong my message, this is de code where I call the web component:
 <vaadin-date-picker label="Pick a date" value={{valorFecha}} id="time"></vaadin-date-picker>
then this.valorFecha is the binding between the web component and this porperty:
 valorFecha: {             type: String,             value:''         }
And then I have this code just to check the value and I dont understand why the day is always a day less:
var fechaConvertidaTimePicker = new Date(this.valorFecha);         var year = fechaConvertidaTimePicker.getFullYear();         var mes = fechaConvertidaTimePicker.getMonth();         var dia = fechaConvertidaTimePicker.getDate();
I just did this to "fix" the problem adding one day to the variable:
var dia = fechaConvertidaTimePicker.getDate()+1;
Thanks a lot for your help

Hi @MarcosGalaviz,
I think the cause here is that Date object methods are returning date in your local timezone.
Vaadin DatePicker gives you value as an ISO string, like '2000-01-01'. But, new Date('2000-01-01').getDate(); would return Dec 31 1999 if you live in western hemisphere. This is because Date constructor considers ISO string date as at UTC midnight, but methods like getDate() return values in local time, where it's not midnight of a new day yet.
Please try to use getUTCFullYear(), getUTCMonth(), getUTCDate(), that should solve the mismatch.
Given that the date picker's value is always ISO string (except for empty string), you can reliably parse it without invoking the confusing Date at all, like this:
var parts = /^(\d{4}|[-+]\d{6})-(\d{2})-(\d{2})$/.exec(this.datePickerValue);
if (parts) {
  var year = parseInt(parts[1], 10);
  var month = parseInt(parts[2], 10) - 1;
  var date = parseInt(parts[3], 10);
}


About the reid model of the vehicle

First of all, thank you very much for your contribution in the field of re-identification!
I had some problems when using your model. When I read the vehicle model into it, some tensor size mismatch problems were displayed. When training vehicle data, what should you do for the ViT backbone? What modifications were made?

I think your config file is wrong. It should be like this:
Resized position embedding: %s to %s torch.Size([197, 768]) torch.Size([257, 768])


Improve style

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (8f8949d) 100.00% compared to head (8cfc3e7) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #346   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           41        41
  Lines         1663      1694   +31
  Branches       339       339
=========================================
+ Hits          1663      1694   +31

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Need to bump up version for Mock devices too

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

...
...
...
...

Expected behavior
A clear and concise description of what you expected to happen.
Log Output
If applicable, add logs to help explain your problem.
Server (please complete the following information):

Shifu Version: [e.g. v0.0.5]
Kubernetes distro [e.g. K8s, K3s]
Version [e.g. v1.24.0]
CPU Architecture [e.g. amd64, arm64w]

Additional context
Add any other context about the problem here.

Fixed in https://github.com/Edgenesis/shifu/pull/240


Animation support

is it possible to add animation by filling the progress bar starting from 0 to current value ?

Hi!
Same animation as when the value is changing? (for the moment if you set the origianl value to 0 and then to your value, it will do the trick normally)


HLS (.m3u8) working fine in 3.2.2, but not in 3.3

Just a heads up that the new 'stable' 3.2 release broke my HLS stream. The index.m3u8 somehow loads too slow to be played... Reverting to 3.2.2 'fixed' it for me. I don't have time to troubleshoot, but maybe this already helps.

Hey there,
Thanks for the report, I'll run some checks on it when I can.
What kind of input was the stream? I assume you meant the HLS output being
slow.
With kind regards,
Balder Viëtor
Head of Testing
MistServer
On Fri, Dec 22, 2023 at 3:44 PM jorbig @.***> wrote:

Just a heads up that the new 'stable' 3.2 release broke my HLS stream. The
index.m3u8 somehow loads too slow to be played... Reverting to 3.2.2
'fixed' it for me. I don't have time to troubleshoot, but maybe this
already helps.
—
Reply to this email directly, view it on GitHub
https://github.com/DDVTECH/mistserver/issues/184, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAN2RJDFKZGNUQ7F75UZI5DYKWMDTAVCNFSM6AAAAABA75KQAWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA2TIMBSGIZTGMY
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Yes, the output file: hls/livestream/index.m3u8 downloads eventually, but after something like 10 seconds. Which makes it unplayable. The input is an AAC audio only stream of 32 kbps,

Same issue after updating to 3.4. Rolled back to 3.2.2 once again.

For me I am not being able to stream WHIP from OBS, it gets hung up on "receiving data"

I'll double-check the audio only streams. We did change quite a bit to the HLS code in this version. So chances are we fixed and then broke it. Sorry about that!
For WHIP I would recommend setting the WebRTC protocol to bind to <IP_ADDRESS> to force it to IPv4. Chances are it's trying to bind an IPv6 port and I'm actually not sure if we accept WHIP over IPv6 in the current builds. A tutorial on that subject is described here as well.


[BEAM-14455] Add UUID to sub-schemas for PythonExternalTransform

Python SDK creates customized schema object name based on UUID suffix so it's not enough to only add UUID to top-level schema. We also need to add UUIDs to sub-component schemas.

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Choose reviewer(s) and mention them in a comment (R: @username).
[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI.

R: @chamikaramj

Thanks. LGTM.


Is there a way to query the server application name / version?

I have some dependencies on rabbitmq3.6.1+. This means I can't use older versions of rabbitmq. Is there a way I can query if I'm using the correct version of rabbitmq?
I tried connection.Major and connection.Minor - but those only give me the AMQP version. Is there a way to figure out the server name/version? I'm not sure if this is even possible - so thought I'd post here.

Connection context has vendor information but that is a free form string. You probably want to use https://github.com/michaelklishin/rabbit-hole and specifically the overview and node list endpoints.
Please post questions to rabbitmq-users.

Thanks!


Clarify PagerDuty integration instructions

This confused me when setting up PagerDuty I accidentally created a Service API key.  Not an integration key as is required.  Hoping this helps others!

These changes look good to me. @nathanielc What do you think?

Thanks @jeremyd!


Add etherscan-api-key flag

The etherscan-api-key flag is missing, which leads to an error when you copy paste the commands without including it

@all-contributors add @beskay for maintenance


Save eval_metrics in BlueCast instance

Codecov Report
Patch coverage: 100.00% and project coverage change: +0.01% :tada:

Comparison is base (1a79dec) 92.78% compared to head (ec8be99) 92.79%.
 Consider uploading reports for the commit be65c04 to get more accurate results

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #19      +/-   ##
==========================================
+ Coverage   92.78%   92.79%   +0.01%
==========================================
  Files          35       35
  Lines        1399     1401       +2
==========================================
+ Hits         1298     1300       +2
  Misses        101      101

Flag
Coverage Δ

pytest
92.79% <100.00%> (+0.01%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed
Coverage Δ

bluecast/blueprints/cast.py
82.14% <100.00%> (+0.21%)
:arrow_up:

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Fix OADP-3960: Split labels avoiding label key exceed allowed 63 chars

This PR should fix https://issues.redhat.com/browse/OADP-3960 by adding another label containing the namespace, while removing the namespace from the label key.
Summary: Right now the operator labels the "cloud-credentials"-secret like <namespace>.dataprotectionapplication=<name>. If the operator is deployed in a namespace with more than 37 characters, the operation will fail, as the label key exceeds the allowed 63 char length limit.

Both namespace-name and label-key may contain up to 63 chars [1].
".dataprotectionapplication" spends 26 chars.

[1] https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set

/ok-to-test

/retest

  Event: Unable to attach or mount volumes: unmounted volumes=[applog], unattached volumes=[kube-api-access-brbkh applog]: timed out waiting for the condition, Type: Warning, Count: 1, Src: {Pod mysql-persistent todolist-1-9hlmh f15e212e-cec2-487c-a2f0-43224044c350 v1 40682 }, Reason: FailedMount

https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_oadp-operator/1392/pull-ci-openshift-oadp-operator-master-4.13-e2e-test-aws/1792617560445816832#1:build-log.txt%3A1362
/retest
/lgtm

/retest

/retest

/cherry-pick oadp-1.4


[Automated] Update eventing-istio-eventing-kafka-broker nightly (#151)

Update eventing-kafka-broker nightly
Signed-off-by: Knative Automation<EMAIL_ADDRESS>

OCF Webhook is merging this PR


baudline exits with BadWindow

Environment
Windows build number: Microsoft Windows [Version 10.0.22000.194]
Your Distribution version: Release:        21.04
Your WSLg version: 1.0.26

Steps to reproduce
Download and extract baudline from e.g. https://www.baudline.com/baudline_1.08_linux_x86_64.tar.gz
(see https://www.baudline.com/download.html for instructions from author if needed).
Expected behavior
baudline application executes without errors and displays windows.
Actual behavior
$ ./baudline
could not open 10x20 font
could not open 5x7 font
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  3 (X_GetWindowAttributes)
  Resource id in failed request:  0x0
  Serial number of failed request:  532
  Current serial number in output stream:  533

(application exits)
It's possible there is some simple workaround, but I'm not quite sure what the actual issue is, nor familiar with X/weston/etc.
The application did work when I was using vcxsrv.

The error from Baudline is telling you that it is searching for a hardcoded / failback fixed size font 10x20 and 5x7, and that it is unable to work without them, so it closes down.
The problem is with wslg, which uses custom Linux distribution to run modified xorg server within wayland. Apparently is comes with very reduced font set, with respect to normal Linux distribution.
You can list the installed fonts by typing
xlsfonts
Probably fonts 20x20 and 5x7 will not be on the list, so this is the reason why Baudline fails to start correctly.
But if you install additional fonts on your Linux distribution withing wslg, for example xorg-x11-fonts-core these are not passed on  / registered properly in the X11 server. So the list of fonts resulting from xlsfonts command remain the same.
So your bug is actually a variation of "Fonts installed but not available"
https://github.com/microsoft/wslg/issues/310

thanks @dpeterc I can confirm it seems to be the same issue.

I can confirm that installing xfonts-base on the default Ubuntu WSLg installation, then terminating and restarting WSL will allow baudline to work.

This was fixed with https://github.com/microsoft/wslg/pull/824.
I am on Windows 11 Insider, I am not sure what version of Windows you need but it works at the time of writing.


help - how to check if a StateChart is in a specific state?

hello, love your state machine asset, but how to check if a StateChart is in a specific state in code?
for example:
if body == player and player.state_chart.current_state == "idle":
i tried looking at the manual, but im still pretty novice lol
any info much appreciated!

The idea behind this library is that you wouldn't need to do such checks in your code anymore.  If you want to run code only in specific states then the plan would be to connect this state's state_processing or state_physics_processing signal to a function. The library will then run this function every frame for as long as the state is active.
If this doesn't work for you,  I'd like to know more about your use case, so I can make a better suggestion.

The idea for my particular situation was for another Area2D checking to see if the player was in a particular state_chart before applying some logic. I know I could do this with a bool as well (setting it true inside a certain state and then turning it false when exiting and then checking player.bool), but I just thought there might be an alternative method for checking if state_chart.current_state == "Movement": would be a cool feature too.

The thing is that a state chart can be in multiple different states at the same time, so such a property would need to return an array. Also to produce it, one would need to walk down the whole state chart and collect all currently active states.
However you can ask each state whether it is currently active,  so if you really want to you could use a scene unique node to access the state you are interested in (https://docs.godotengine.org/en/stable/tutorials/scripting/scene_unique_nodes.html)  and then ask the state whether it is active. E.g
var state = %SomeState
if state.active:
    # do things

However you say that another area outside of the entity needs to know this. In this case I wonder whether it would be a good idea if the area knows about how your entity is tracking state internally. This would tightly couple the area to some implementation detail of your entity that is controlled by the state chart. I'd probably use the state_entered / state_exited events and then add/remove the entity to/from a group (https://docs.godotengine.org/en/stable/tutorials/scripting/groups.html) and let the area only check the group. This way your area doesn't need to know about state charts and if you decide to reorganize your states later it will still work.

I think that helps and are reasonable solutions. Thank you for the responses


test: bump kubernetes version to v1.22.4 and remove v1.19

Signed-off-by: Anish Ramasekar<EMAIL_ADDRESS>
Reason for Change:

Bumps to kubernetes version v1.22.4 for 1.22
1.19 is EOL, so removing 1.19 tests

Requirements

[x] squashed commits
[ ] included documentation
[ ] added unit tests and e2e tests (if applicable).

Issue Fixed:

Does this change contain code from or inspired by another project?

[ ] Yes
[ ] No

If "Yes," did you notify that project's maintainers and provide attribution?
Special Notes for Reviewers:

Codecov Report

Merging #729 (71df1e7) into master (7e3bd77) will not change coverage.
The diff coverage is n/a.


Gaze cursor not reappearing

Describe the bug
When starting the app the gaze cursor is visible, when the hands appear in the line-of-sight the normal hand cursors appear.
But then when taking my hands behind my back again the gaze cursor does not reappear.
To reproduce
Create a normal Hololens 2 app with OpenXR and using the eyegaze cursor also as an input (NOT the head cursor)
Expected behavior
When the Hololens doesn't recognize my hands anymore it should switch to back to the gaze-cursor.
This was still the behavior during MRTK 2.5 and when using older versions of Unity. (Previous app of mine still has the desired behaviour)
Screenshots
https://user-images.githubusercontent.com/59868550/129758501-905b098d-9414-4dd6-948c-3e8f1cbe1fbe.mp4
Here a video on the behavior, please watch with sound as I'm further explaining the issue.
Your setup (please complete the following information)

Unity Version [2020.3.16f1 & 2020.3.6f1]
MRTK Version [2.7.2]
OpenXR Plugin  [1.2.8]
Mixed Reality OpenXR Plugin [1.0.1]

Target platform (please complete the following information)

HoloLens 2

Additional context
Add any other context about the problem here.

Hi @Spoon2311 thank you for your Gaze Cursor issue submission. The scenario that you described is now expected behavior, as we are trying to match the HoloLens 2 Shell behavior.
You can enable/disable the Gaze cursor using PointerUtils.cs.
You can use the "SetGazePointerBehavior" class from lines 218-236 in PointerUtils.cs to enable or disable the Gaze pointer at runtime. With the "Set[input type]RayPointerBehavior" classes, you can use the PointerBehavior Enum to enable or disable the pointers at runtime by passing the proper PointerBehavior Enum value for disabling or enabling the pointers.
I am going to close this issue, but please feel free to re-open it if you need more information.


ENH: Improve runtime of the re-sampling

Currently, the runtime is less than ideal. I think its possible to improve the speed by cythonizing the loop in https://github.com/zoj613/pyloras/blob/b896367dac4e970bb31d2b4cac69fe26f7627a2d/pyloras/_loras.py#L163-L177
and maybe also rewriting https://github.com/zoj613/pyloras/blob/b896367dac4e970bb31d2b4cac69fe26f7627a2d/pyloras/_loras.py#L184 in Cython.
I will need to first profile and determine where the most time is spent.

Seems like 98% of the runtime (at least for the exapmple in the README) is spend computing the TSNE embedding. Not sure if this is even worth it anymore. Maybe it might make a difference if the dataset is large.


Fix rooty water missing texture

Fixes #105 by removing the rooty water mixin, which Dynamic Trees has now built in.

Ok, fixed! I must have overlooked it.

This is released in 1.15.2. Apologies for the delay in getting this out.


Complex examples

[x] Move current examples to example-simple.json
[x] Create example-complex.json

See also #11.

Friction log for working on prompt-name

Boy is it annoying to write in JSON, even with schema completion!
It's really confusing when to use var vs retrieve, and how to do the naming scheme.
It feels weird to have a prefix for var but not for store (and also store really should

things to do to improve it:

[ ] Allow let to take a map of properties and values to set at once (so you can set store iwthin sub-expressions)
[ ] Allow template to directly fetch things from env and store
[ ] array should be able to return its last item


Supercollective stats now include sub collectives

Though it's definitely slower than before. We should cache this better.

Did you test how much slower this is for opensource collective?

Keep in memory the list of ids so that we don't have to compute them again
(since we do multiple calls to get total backers, total donations, etc.)
On Tue, Oct 25, 2016 at 8:34 PM asood123<EMAIL_ADDRESS>wrote:

@asood123 commented on this pull request.
In server/models/Group.js
https://github.com/OpenCollective/opencollective-api/pull/650#pullrequestreview-5714760
:

@@ -220,6 +221,22 @@ export default function(Sequelize, DataTypes) {
},

 instanceMethods: {

 getSuperCollectiveGroupsIds() {

   if (!this.isSupercollective) return Promise.resolve([this.id]);

   if (this.superCollectiveGroupsIds) return Promise.resolve(this.superCollectiveGroupsIds);

What's this supposed to do?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/OpenCollective/opencollective-api/pull/650#pullrequestreview-5714760,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAEidhMYoDObkIqTIZ90_6aZQ1ZYbdFJks5q3kvEgaJpZM4KgQ-F
.


Custom templates

Open tasks:

Switch to portable template engine (StringTemplate is .NET 4.5 only)
Implement templates with fallbacks and support for fragments
Stabilize template models

Hi,
Any ideas on how to progress on this?
Our most pressing need is to add our auth tokens into the the Angular 2 templates but we also make other changes to the generated client code and I'm sure there are a lot of other ideas.
While there might be a way to generalize this it might be simpler to read the templates runtime so that we can replace them locally? Better of course would be a place to put custom templates which would be discovered by the client and we can pick which one to use.

The main problem is to stabilize the template model so that there are no breaking changes between releases... another problem is that the current template engine is not flexible enough and not a PCL library... Do you know a good template engine?

Unfortunately I've only ever worked with Codesmith (commercial product) and the T4 templates in VS. I don't know if the T4 templates are flexible enough but I think they might be.

What do you mean with "read the templates runtime"?

I mean that ideally I would like modify (edit/download/etc) a template while executing NSwagStudio. Today I believe you have to compile the templates as part of our release process. I understand I could include my own templates into a custom build but a more flexible approach would be great.

Yes, the templates are embedded resources in the DLL... The goal is to still have them embedded but can be replaced by the caller on a partial template basis... to achieve this, the templates must be split out into multiple smaller/partial templates and the models must be improved so that they are more stable...

... and it seems that I have to implement an own template engine which satisfies all my requirements...

Ouch, building YATE (yet another template engine) sounds painful. I would really recommend looking at for example T4 (since this is already .Net). There is a lot of excellent tooling out there that could help people to create and contribute templates on their own.
What are some of the key requirements you think warrants the effort of rolling your own?

I'll see if I can get some time this weekend to create a POC for T4...

Yes, I need PCL (Portable Class Library) Profile 259 support and a good syntax for code templates... (i.e. razor is not possible because it only works with HTML output)

... I don't think that running T4 templates in code is supported in PCL libs..

Unfortunately I have no experience with the new PCLs, a quick google shows that it seems possible with some caveat (see the comments at http://stackoverflow.com/questions/20180184/access-to-a-types-supported-in-pcl-from-a-t4-template)

Ok it seems that T4 would work.. however I think you cannot load a T4 from an external file - the T4 must be part of the project so that it is compiled together with the project...
http://stackoverflow.com/questions/4781608/running-a-t4-template-using-c-sharp

You're right. I have some ideas I'd like to try to work around that. But even if that can't be solved T4 might be a good choice if you are considering replacing the current solution.

Yes, if I migrate all templates, it must be the best solution... otherwise it is not worth the effort... and injecting custom partial templates is a must...

Ok, all templates have been migrated to t4... Now i have to replace all dynamic models with model classes...

Hello,
Any news on making the templates injectable ?
I had a look a the code but I don't see how to use custom T4 templates after compiling sources.

Is something like this fine?
public class TemplateFactory
{
	public virtual ITemplate<TTemplateModel> Create<TTemplateModel>()
	{
		...
	}
}

Then you can inherit from TemplateFactory and return different templates for the TTemplateModel you want to override and return base.

I customized all the templates and at the moment I have to recompile the whole project and copy the dlls again to the output folder even for minor template changes.
I guess the best solution would be to have the templates in a separate file and that one can change them without recompiling the whole nswag project.  But I doubt this is possible as T4 it is auto-generating the cs file based on the tt file.
I wonder if this is possible with Razor. It seems to be used by Autorest.
With what you suggest we could plug a custom Dll for the templates. So when changing a template one only has to recompile the custom dll and not the whole Nswag project.  I would be nice already.

The problem with Razor is that it is meant for HTML output and generating other code is very ugly... I was looking for a good template render engine (PCL) but could not find an existing one. This is why it we now use T4 (but which is compile only).
I think I will add these extension points so that you can implement your own template... but it will take a moment because it takes lot of changes and exposes a lot of public API which have to be stabilized first...

In the next version (v5) you can provide your own ITemplateFactory (see TemplateFactory branch) and overwrite templates if needed (just inherit from DefaultTemplateFactory and return base.CreateTemplate to provide the default template)

Improved model classes:

https://github.com/NJsonSchema/NJsonSchema/commit/db66b3514002f47d3534185dbf7d7cccb8b87f66
https://github.com/NSwag/NSwag/commit/2fb429f5374271bc226193b9e88689824ea33fc0

Added more typed models: https://github.com/NSwag/NSwag/commit/703cfeee214c14c2e2dcb988614a38159d93cb30
Now all models are typed... Next: Stabilize the models so

All models are now public and the templates can be overridden... However there might be some breaking changes there as we are consolidating the interface.
New issue: https://github.com/NSwag/NSwag/issues/262

I cannot find any documentation on how I can overwrite the templates. Can you provide us with some details? Or is this not relevant for he current version of NSwag or NswagStudio?

See https://github.com/RicoSuter/NSwag/wiki/Templates

ok, thanks, as far as I can understand, this is only available for the models and not for the typescript clients
or am I missing something?

See https://github.com/RicoSuter/NSwag/wiki/Templates

I am also trying to override C# client templates. The link you provided has no real useful information on the steps needed to override templates. Could you provide some kind of guidance?

I’ve updated the wiki

@RicoSuter
BTW now it is possible to use Razor as template engine. It is simple as:
using System;
using JetBrains.Annotations;
using NJsonSchema.CodeGeneration;
using NJsonSchema.CodeGeneration.TypeScript.Models;
using RazorEngineCore;

namespace NSwag.RazorTemplateExample
{
    internal class RazorTemplateFactory : ITemplateFactory
    {
        private readonly ITemplateFactory _baseFactory;
        private readonly RazorEngineCompiledTemplate _interface;

        public RazorTemplateFactory([NotNull] ITemplateFactory baseFactory)
        {
            _baseFactory = baseFactory ?? throw new ArgumentNullException(nameof(baseFactory));

            var templateStore = typeof(ApiToolsController).Assembly;

            var src = templateStore.ReadEmbeddedResource("Templates.Interface.cshtml");
            var razorEngine = new RazorEngine();
            _interface = razorEngine.Compile(src, builder =>
            {
                builder.AddAssemblyReference(typeof(ClassTemplateModel).Assembly);
            });
        }

        public ITemplate CreateTemplate(string language, string template, object model)
        {
            if (language == "TypeScript" && template == "Interface")
            {
                return new RazorTemplate(_interface, model);
            }

            return _baseFactory.CreateTemplate(language, template, model);
        }

        private class RazorTemplate : ITemplate
        {
            private readonly RazorEngineCompiledTemplate _source;
            private readonly object _model;

            public RazorTemplate(RazorEngineCompiledTemplate source, object model)
            {
                _source = source;
                _model = model;
            }

            public string Render() => _source.Run(_model);
        }
    }
}

Sample template:
@using NJsonSchema.CodeGeneration.TypeScript.Models
@model ClassTemplateModel
@{
    var export = Model.ExportTypes ? "export " : "";
    var keyword = Model.HasInheritance ? "interface " : "type ";
    var suffix = Model.HasInheritance ? " {" : " = {";
}
@if (Model.HasDescription)
{
    @:/** @Model.Description */
}
@export@keyword@Model.ClassName@Model.Inheritance@suffix
@foreach (var prop in Model.Properties)
{
    if (prop.HasDescription)
    {
        @:  /** @prop.Description */
    }
    var ro = prop.IsReadOnly ? "readonly " : "";
    var opt = prop.IsOptional ? "?" : "";
    @:  @ro@prop.InterfaceName@opt: <EMAIL_ADDRESS>}
@if (Model.HasIndexerProperty)
{
    @:  [key: string]: @Model.IndexerPropertyValueType;
}
};

Using Razor can improve performance and developer experience since Razor has fantastic support in Visual Studio.


changed home page

still trying to get the hang of the merging stuff but I just changed some colors around on the home page; going to be experimenting with the pi tomorrow to see if I can get the camera running on there

too many conflicts, resolve and submit fresh PR.


added removeFeature call, it fires update event and allows to get kno…

It doesn't fire any events when the polygon was cut.
I've added removeFeature call and it solves the problem, I've tried to fire this.map.fire(Constants.events.UPDATE)  but "update" event includes both a feature after cutting and a feature before cutting.

Thanks for PR. But it doesn't fix this issue. I fix this issue in another way. Please try it and feel free to create more PRs.


Write speeds not affected by write chunk size

Answering these questions before submitting your bug report will help us give
you a quicker answer.  Thank you!
If one or more of these questions are not applicable, feel free to remove them.
Does this issue affect the google-cloud-cpp project?
If the problem is with the service exposed by the google-cloud-cpp APIs
instead of the client libraries you may consider opening a support request
instead.  The google-cloud-cpp developers cannot help you troubleshoot
problems with the service itself.
What component of google-cloud-cpp is this related to?
Remove the ones that do not apply.

Cloud Storage.

What version of google-cloud-cpp are you using?
0.15.0
Please include the output from git rev-parse HEAD if you are compiling from
source, or the version number from the applicable */version.h file.
What compiler and version are you using?
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/opt/foo/libexec/gcc/x86_64-pc-linux-gnu/9.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/tmp.kmkSDUDFn8/build/../gcc-9.1.0/configure --prefix=/opt/foo--enable-languages=c,c++ --disable-multilib --enable-shared --enable-lto --enable-threads=posix --with-arch=haswell --with-tune=skylake
Thread model: posix
gcc version 9.1.0 (GCC)
Please include the output of g++ -v or the equivalent command-line flag.
What operating system and version are you using?
Centos 7
If you are using a Linux distribution include the name and version of the
distribution too.
What were you trying to do?
Trying to write a file a to cloud storage using ObjectWriteStream
What did you expect to see?
I expect to see above 100 MB/s transfer rates using the ObjectWriteStream since I can easily reproduce way higher transfer rates with iperf3. I am also able to reproduce 200 MB/s download speed easily between a google compute node and cloud storage.
What did you see instead?
I see only up to 30 MB/s upload rate regardless of how many bytes are being written at once when I do stream->write(char*, bytes). I expect to see a sweet spot with a good choice of bytes but that is not the case. I am able to achieve a much higher download rate by chunking appropriately.
Anything else you would like us to know?
Looking at the source code I notice that the payload is being copied as a std::string which at first glance seems to suggest some unnecessary copying? Perhaps one could use a std::string_view instead? Another question is whether or not you guys intend on switching to HTTP2 which should have better performance as well.

Thank you for filing a detailed report.

I am able to achieve a much higher download rate by chunking appropriately.

This is normal, GCS is much faster at downloading vs. uploading.

I see only up to 30 MB/s upload rate regardless of how many bytes are being written at once when I do stream->write(char*, bytes).

How big of a range did you use?  We recommend really big chunks for high throughput, previous experiments (see #2657) suggest that using 16MiB chunks for large files gets you about 50MiB/s, which is consistent with what other folks get, for example:
https://medium.com/google-cloud/google-cloud-storage-large-object-upload-speeds-7339751eaa24

I expect to see a sweet spot with a good choice of bytes but that is not the case.

Note that multiples of 256KiB are sort of ideal from a buffer management perspective.

Looking at the source code I notice that the payload is being copied as a std::string which at first glance seems to suggest some unnecessary copying? Perhaps one could use a std::string_view instead?

Unfortunately we want/need to support C++11 users.  There is an open bug (#2664) to optimize this path, but the memory bandwidth of that additional copy is not the limiting factor here.

Another question is whether or not you guys intend on switching to HTTP2 which should have better performance as well.

No such plans at the moment.  There is ongoing work to parallelize uploads for large files, I realize that is not going to help you though.
Let me know if you have any further questions.

That makes sense. Thank you.


Iframe adjustments

Acceptance criteria

Publisher can add an optional description for the iframe
Publisher can add an optional call to action for the iframe (one link)
Publisher can add an optional ingress for the iframe

Note
The new options should only be applied for the Topic page template

Due to layout requirements we would need to add a (optional) descriptive/caption text field under iframe, to provide a description of the content to appear below the video/iframe component
We also need a (optional) call to action placed in iframe component to appear below the video/iframe component. See this page:
https://energyvision.app.radix.equinor.com/careers/apprentices

@BirteThornquist  I can add the fields in Sanity, but let's see how it should look like in the web tomorrow aka Envis day

Need to align with @BirteThornquist for this one.

We want to test the last alternative design in Figjam for this.

I added an ingress, a capture text and a CTA for the iFrame component, find the design here

All the fields will be optional.

Keep in mind that the iframe is used on the news article and event templates as well as the topic pages.

@BirteThornquist  Let's fine tune the spacings tomorrow

@wenche LGTM! Please review @nicholas-haggerty @meols

@BirteThornquist looks good to me.


[2.0]Lost whitespace in

Vue.js version
2.0.0-beta.5
Reproduction Link

https://jsbin.com/guyudu/edit?html,js,output
Steps to reproduce
template

  This is correct.

    1. Hello
    2. Vue

  This is incorrect. Lost whitespace

      1. Hello
      2. Vue

What is Expected?
        1. Hello
        2. Vue

What is actually happening?
     1. Hello 2. Vue

 as an immidiate child of a  tag is rendered as a block element, in the second example it acts as a regular inline element since it's wrapped with a  tag - that has nothing to do with vuejs


Create Hello.txt

@jike-org Hey! :)
Hey! It's Ty, the creator of Informant.
Can you please delete this fork! 😅
I've been trying to ping you but you must have mentions turned off or something.
I'll be giving you a free key for the full version of Informant!
I just don't want anyone taking this source code and making malicious copies of Informant.
Thanks!
– Ty

I am no longer open-sourcing this application.
Please delete this repository! I will be sure to give you a free license of the paid version of Informant!
– Ty
@jike-org


Terminate CDP server without an error when it gets a connection close

Description
Currently, when a tab in Chrome DevTools is closed, the error occurs such as:
DEBUGGER: Debugger can attach via TCP/IP (<IP_ADDRESS>:12345)
DEBUGGER: With Chrome browser, type the following URL in the address-bar:

   devtools://devtools/bundled/inspector.html?ws=<IP_ADDRESS>:12345

DEBUGGER: wait for debugger connection...
DEBUGGER: Connected.
DEBUGGER: ReaderThreadError: Unsupported: 8
["/Users/s15236/workspace/debug/lib/debug/server_cdp.rb:61:in `extract_data'",
 "/Users/s15236/workspace/debug/lib/debug/server_cdp.rb:103:in `block in process'",
 "/Users/s15236/workspace/debug/lib/debug/server_cdp.rb:102:in `loop'",
 "/Users/s15236/workspace/debug/lib/debug/server_cdp.rb:102:in `process'",
 "/Users/s15236/workspace/debug/lib/debug/server.rb:69:in `block (3 levels) in activate'",
 "/Users/s15236/workspace/debug/lib/debug/server.rb:212:in `setup_interrupt'",
 "/Users/s15236/workspace/debug/lib/debug/server.rb:67:in `block (2 levels) in activate'",
 "/Users/s15236/workspace/debug/lib/debug/server.rb:359:in `block (2 levels) in accept'",
 "/Users/s15236/.rbenv/versions/2.6.8/lib/ruby/2.6.0/socket.rb:809:in `block (2 levels) in accept_loop'",
 "/Users/s15236/.rbenv/versions/2.6.8/lib/ruby/2.6.0/socket.rb:806:in `each'",
 "/Users/s15236/.rbenv/versions/2.6.8/lib/ruby/2.6.0/socket.rb:806:in `block in accept_loop'",
 "/Users/s15236/.rbenv/versions/2.6.8/lib/ruby/2.6.0/socket.rb:804:in `loop'",
 "/Users/s15236/.rbenv/versions/2.6.8/lib/ruby/2.6.0/socket.rb:804:in `accept_loop'",
 "/Users/s15236/workspace/debug/lib/debug/server.rb:357:in `block in accept'",
 "/Users/s15236/.rbenv/versions/2.6.8/lib/ruby/2.6.0/socket.rb:781:in `tcp_server_sockets'",
 "/Users/s15236/workspace/debug/lib/debug/server.rb:338:in `accept'",
 "/Users/s15236/workspace/debug/lib/debug/server.rb:48:in `block in activate'"]
DEBUGGER: Disconnected.

It would be nice if CDP server exit without errors.

is it correct fix or ad-hoc fix?

I think it's the correct fix. When the opcode is 8, it means a connection close.
FYI: https://datatracker.ietf.org/doc/html/rfc6455#section-5.2

Ok, another point is, exiting is correct or not. For example, it is one option to continue the debuggee.

For example, it is one option to continue the debuggee.

I see. That may be useful.
In node.js, if a tab is closed, debuggee also quit. That's why I thought that finishing it is the correct way, though.

There are 3 options:
(1) exit the debuggee too
(2) continue the debuggee (same as gdb, remote rdbg, ...) -> detach
(3) back to the rdbg REPL (and wait for the input)
To debug the server process, (2) seems nice and after detaching, it is convenient if we can attach again.

All right, let me implement it. Thanks 👍

@ko1 san, could you check this one?


Bug with queryset results on base model where child model has a custom primary key

There is currently a bug when inheriting from a PolymorphicModel with a custom primary key. For example, with the following models:
class CustomPkBase(ShowFieldTypeAndContent, PolymorphicModel):
    b = models.CharField(max_length=1)

class CustomPkInherit(CustomPkBase):
    custom_id = models.AutoField(primary_key=True)
    i = models.CharField(max_length=1)

The following code results in a queryset that is missing items:
CustomPkBase.objects.create(b='b')
CustomPkInherit.objects.create(b='b', i='i')
print(len(CustomPkBase.objects.all())) # expected: 2; actual value: 1

This pull request adds tests in the first commit (which fail), and then fixes those tests in the second commit. I believe that this pull request fixes #66.

Thanks for looking into this!


Rest API Url Rule setting

What steps will reproduce the problem?
If I config url rule in this way, the rest api works.
I can access the api by
get http://api.shyclouds.com/frontend/web/dealer/view?access-token=<my_auth_token>
post http://api.shyclouds.com/frontend/web/dealer/view with username and password
'urlManager' => [
            'enablePrettyUrl' => true,
            'enableStrictParsing' => false, //使用restful时候，此参数必须为false，否则会404
            'showScriptName' => false,
            'rules' => [
                [
                    'class' => 'yii\rest\UrlRule',
                    'controller' => 'dealer',
                ],

            ],
        ],

What is the expected result?
but I wanna access the dealer/view in the way
post http://api.shyclouds.com/frontend/web/dealer
get http://api.shyclouds.com/frontend/web/dealer/(my_auth_token)
What do you get instead?
according to the documentation:http://www.yiiframework.com/doc-2.0/guide-rest-routing.html
I try the url rule:
'urlManager' => [
            'enablePrettyUrl' => true,
            'enableStrictParsing' => false, //使用restful时候，此参数必须为false，否则会404
            'showScriptName' => false,
            'rules' => [
                [
                    'POST dealer' => 'dealer/index',
                    'GET dealer/<access-token:\w+>' => 'dealer/view',
                ],
            ],
        ],

I got error message said "Setting unknown property: yii\web\UrlRule::POST dealer"
If I set the url rules as follow
'urlManager' => [
            'enablePrettyUrl' => true,
            'enableStrictParsing' => false, //使用restful时候，此参数必须为false，否则会404
            'showScriptName' => false,
            'rules' => [
                'POST dealer' => 'dealer/index',
                'GET dealer/<access-token:\w+>' => 'dealer/view',
            ],
        ],

I got error message "Not Found (#404)"
Additional info
http://www.yiiframework.com/doc-2.0/guide-rest-routing.html
I think you should add an example how to use the url rule:
[
    'PUT,PATCH users/<id>' => 'user/update',
    'DELETE users/<id>' => 'user/delete',
    'GET,HEAD users/<id>' => 'user/view',
    'POST users' => 'user/create',
    'GET,HEAD users' => 'user/index',
    'users/<id>' => 'user/options',
    'users' => 'user/options',
]

Q
A

Yii version
2

PHP version
7.0.7

Operating system
centos 7 x64

the first config should already give you what you want. Note that the controller names are pluralized automatically:  http://api.shyclouds.com/frontend/web/dealer ->  http://api.shyclouds.com/frontend/web/dealers
see http://www.yiiframework.com/doc-2.0/guide-rest-quick-start.html#trying-it-out

First, by the configuration 1, when I access dealer/view by
http://api.shyclouds.com/frontend/web/dealers/xxxxxxx       (xxxxxxx is token)
or
http://api.shyclouds.com/frontend/web/dealer/xxxxx             (xxxxxxx is token)
I got 404 not  found error
Secondly, how to use the configuration 2?
[
    'PUT,PATCH users/<id>' => 'user/update',
    'DELETE users/<id>' => 'user/delete',
    'GET,HEAD users/<id>' => 'user/view',
    'POST users' => 'user/create',
    'GET,HEAD users' => 'user/index',
    'users/<id>' => 'user/options',
    'users' => 'user/options',
]

putting the token into the URL is not a good idea, it should be sent via reqular auth methods such as HTTP Basic or Bearer auth. Please use the form for such questions.

according to the document (http://www.yiiframework.com/doc-2.0/guide-rest-authentication.html), there are three way to do the authentication. I just used second way.
I agree with you, it is not a good idea. but there must be a way to solve this problem


Best way to handle CKErrorLimitExceeded in CloudKit modification operations

According to Apple's docs:

To ensure the speed of fetching and saving records, the server may reject large operations. When this occurs, a block reports the CKErrorLimitExceeded error. Your app should handle this error, and refactor the operation into multiple smaller batches.

(Emphasis mine.)
Such refactoring is complicated by CloudKit features like atomic commits, and is thus very application-specific.
This applies to at least CKModifyRecordsOperation (but could theoretically apply to other operations that take multiple items for input, such as the other CKModify* operations, CKMarkNotificationsReadOperation, etc).
I noticed that you have BatchedCloudKitOperation for fetch operations (CKFetchNotificationChangesOperation / CKFetchRecordChangesOperation), which is fantastic. But what would be the best way to handle the other side of this - for batched modifications - when the server returns an error of CKErrorLimitExceeded and the client needs to handle refactoring the operation into smaller batches? (Presumably including preserving order.)

Hi @swiftlyfalling - thanks for the excellent feedback & question.
First off, the BatchedCloudKitOperation class only supports usage with CKFetchNotificationChangesOperation and CKFetchRecordChangesOperation, as these are the only two CKOperation classes which have support for receiving moreComing and resultsList. So... I guess it's for when the client asks for potentially lots of data, and it will receive it in batches. I think I could definitely make the names clearer for this. For CKModifyRecordsOperation, where the client is sending potentially large amounts of data to the server, I guess this class won't be relevant currently.
However, we should still be able to handle this error type. It just might be a bit tricky, as CloudKit doesn't give you any indication of what a smaller batch size should be. And it might be a bit fiddly too. So, lets look at CKModifyRecordsOperation as an example. Our basic strategy will be to:

Add an error handler for this code, inside the error handler, we'll capture (unowned) the operation.
Bisect the data being sent, into left and right halves. The left is the first half, and we want to send it first.
Create a new operation, configured as the current operation. Set the left half of data on it.
Implement the configure block (which will be applied when new attempts are made) for the right half.
a. In this block, apply the suggested configuration
b. Set the right half of the data
c. Add the left half operation as a dependency.
Add the left half operation as a child operation of the current operation (recall that CloudKitOperation inherits from GroupOperation so it has its own queue, and you can add operations to it.
Return the error response (the new configure block)

let operation = CloudKitOperation { CKModifyRecordsOperation() } // etc
// etc further configuration of the operation such as container etc

operation.setErrorHandlerForCode(.LimitExceeded) { [unowned operation] (error, log, suggested) -> (delay: Delay?, configure: OPRCKOperation<CKModifyRecordsOperation> -> Void)? in

    // What we need to do is retry the operation but with "smaller batches"
    // But how do we handle this?

    // First, we can log that we've got an error
    log.warning("Received CloudKit error Limit Exceeded: \(error)")

    // We should return an ErrorResponse?, which is a tuple, with an
    // Delay? and a configuration block. The configuration block is applied
    // to a new instance of the CKModifyRecordsOperation.

    // The strategy will be to half the recordsToSave (and any other
    // properties being sent). We'll send the first half in a new
    // CloudKitOperation, which we'll make a dependency of the
    // current operation which we will modify & retry.

    // Create a new operation to bisect the data
    let left = CloudKitOperation { CKModifyRecordsOperation() }

    // Update config
    left.container = operation.container
    left.database = operation.database // etc

    // Set the data to the first half of the data
    // This could probably be better!
    let rightRecordsToSave: [CKRecord]? = .None
    if let recordsToSave = operation.recordsToSave {
        left.recordsToSave = Array(recordsToSave.prefixUpTo(recordsToSave.count/2))
        rightRecordsToSave = Array(recordsToSave.suffixFrom(recordsToSave.count/2))
    }

    let configure = { toConfigure in

        // Apply the suggested configuration (will include the database, container etc)
        suggested.configure(toConfigure)

        // Set the properties on the retried operation, to the right half
        toConfigure.recordsToSave = rightRecordsToSave

        // Add the left half as a dependency of the right half,
        // this is to ensure a consistent ordering.
        toConfigure.addDependency(left)
    }

    // Add the left half as a child of the original operation
    operation.addOperation(left)

    // Return the error response
    return (suggested.delay, configure)
}

This strategy is certainly a bit fiddly. And it will probably require a bit of fiddling to get it working correctly. One thing I can see immediately, is that we need to set the error handlers on the new operation of the left half.
But, what is quite nice about this, is that we add as a child a new CloudKitOperation and then depend on that to succeed before doing the left half. And this divide and conquer approach should work multiple times assuming that the error handler can be re-applied.
Will obviously need looking at more once I've got v2.10 done.

@danthorpe , thank you for the suggestions (and the framework). Am fiddling around with your suggestion.
One other concern with the way things are currently structured is how to properly handle CKErrorPartialFailure. I opened a new issue for that: #290

Okay great. Yeah, come back at me with ideas too, and we can improve this. I'm not currently using the CloudKit stuff in my day-to-day work, so I'm a little bit off the boil on some of the nitty-gritty. But, I'm really pleased with the abstractions here, so, I'm eager to fix any practical issues or limitations with it :)

Is there any easy way that I'm missing to apply the suggested.configure block to the new ("left") operation? That would remove a whole bunch of code simply setting left.bla = operation.bla.

Also, just to confirm Apple's recommendation for adjusting the batch size in response to CKErrorLimitExceeded:

The general guideline we give developers to handle this error is simply divide the number of items in your batch by half and issue two operations instead of one.
And recursively do that if those operations encounter the same error again.

Source: WWDC 2015: CloudKit Tips and Tricks (Session 715) (Video) (Transcript)

Hey @swiftlyfalling - sorry - I didn't understand your comment, 2nd previous comment here?

Oh @swiftlyfalling I see, sorry - yes, you can do this:
left.addConfigureBlock { suggested.configure($0) }

This is a public API on RepeatedOperation which lets you add (FIFO style) configuration block which then get applied to the target operation before they are executed.

@danthorpe, that addConfigureBlock API is exactly what I was looking for. Perfect!
In regards to supporting CKErrorLimitExceeded, I'm not sure it should be handled by default by CloudKitOperation.
While Apple's recommendation is to split the recordsToSave and recordIDsToDelete in half, there is no guarantee that this can be done safely by the framework with a simple bisection. There are cases where a simple bisection can directly result in failures to save records.
For example:

An app could submit a CKModifyRecordsOperation that contains a set of recordsToSave that include CKReferences (references to other CKRecords). This will work, regardless of the order of the CKRecords in the recordsToSave array, as long as all the CKReferences in each CKRecord are either:
(a) already stored on the server
(b) exist in the recordsToSave array (i.e. in the same transaction).
If you do a simple bisection, you run the risk of splitting the record pointed to by a CKRecord's CKReference into a later operation (since the original order in the recordsToSave array is irrelevant as they are all in the same original transaction), which will cause saving the CKRecords containing those CKReferences to fail.

That said, the simple bisection method can be useful in some cases, so I think it makes sense to add - just maybe as a separate new BatchedCloudKitModifyOperation(?) class (with documentation about the limits involving transactions with records containing CKReferences).

@swiftlyfalling yeah, the way that I would do it, is similar to how the current error handler works - it requires an optional response, but it provides a suggested response.
So, the suggested response would be the result of the bisection (i.e. it would contain the left and right array of the batched properties to save). The framework consumer can implement this, and inspect the suggestion, and make adjustments as needed. All you'd need to do is return the left & the right - and the framework will take that and deal with the dependencies and other configuration stuff.

Thinking about this more, there is potentially a less-simple bisection algorithm that helps handle the first CKReference-related failure case above.
It would involve ensuring a sort of topological sorting of recordsToSave where:

All CKRecords that are referenced by a CKReference come before the item that references them.
Unless there is a circular reference (which CloudKit explicitly allows), in which case all applicable CKRecords must be in the same CKModifyRecordsOperation.
Or unless the CKRecord pointed to by a CKReference does not exist in the recordsToSave array, in which case it is safe to ignore. (As it is either already on the server, being handled by a prior Operation, or will fail just like the original operation would have)

Or, in other words, CKReferences are considered a back-reference - a directed edge from vertex u (target of CKReference) -> vertex v (the CKRecord containing the CKReference). Assuming vertex u is present in the recordsToSave, u comes before v in the ordering.
So basically, all records except those involved in circular references loops / directed cycles can be ordered as above and bisected. All records that are involved in circular reference loops / directed cycles need to be in the same operation.
Apple explicitly allows circular references:

It is permissible to create circular owning references for a set of records.

Source: CKReference Class Reference
So nothing prevents you from having:
CKRecordA["b"] -> CKRecordB
CKRecordB["c"] -> CKRecordC
CKRecordC["a"] -> CKRecordA
or:
CKRecordA["b"] -> CKRecordB
CKRecordB["c"] -> CKRecordC
CKRecordB["a"] -> CKRecordA
CKRecordC["a"] -> CKRecordA
Of course, theoretically, there still could be a set of CKRecords in a directed cycle that results in CKErrorLimitExceeded. So if the framework's bisection attempt fails to split the recordsToSave at all, it would need to stop trying, and give the framework consumer an opportunity to handle the error.

@danthorpe, re: your suggestion above
Are you saying that if the framework consumer does not implement this new handler, that CloudKitOperation would not attempt bisection?
(To clarify: I don't think the framework should attempt any sort of manipulation of the input to a CKModify operation by default. Only if explicitly opted-into by the framework consumer.)

Also, just like the CKErrorPartialFailure case, this could presumably apply (at a minimum) to any CKOperations that take a set of input for modification:
the recordsToSave and recordIDsToDelete for CKModifyRecordsOperation
the recordZonesToSave and recordZoneIDsToDelete for CKModifyRecordZonesOperation
the subscriptionsToSave and subscriptionIDsToDelete for CKModifySubscriptionsOperation
the notificationIDs for CKMarkNotificationsReadOperation
i.e. All specified input parameters for the operations above may need to be bisected in response to CKErrorLimitExceeded (or otherwise handled).

Yes - exactly, it would be an error handler which does most of the heavy lifting for you. You still need to opt-in, and you need to confirm the bisect data, but it would basically do everything else for you.

@swiftlyfalling - sorry, only just read your previous comment about ensuring that the bisecting is "valid" - makes a lot of sense. This is something that could be looked at after the infrastructure for providing the suggested bisecting is done. So, to start with, I will look at just doing the simple option. And refine it later.

@danthorpe I stumbled on your code snippet above posted just over four years ago and used it to solve a CKModifyRecordsOperation .LimitExceeded problem of my own. Many thanks!!!


Close file handle

This open file handle causes problems on large datasets

FYI in v1.1.3 which is published on gopkg is a bit behind.. see - https://github.com/src-d/go-siva/blob/v1.1.3/cmd/siva/pack.go#L140


Cypress - add debugging info to workflow

Another attempt at addressing sporadic github actions cypress failures.
This is either a waiting problem, or a caching problem, but one that doesn't seem to happen outside github actions (from what I can tell).
Trying to add a bit more output to tell what's happening,
and busting the cache, by renaming it.

Merging together with https://github.com/ansible/ansible-hub-ui/pull/453.
#453 fixes the rq vs click version issue,
#452 busts the old cache so that the change applies to master as well, and adds more debug info


suspicious code warning about "use strict" after comment

In a google-internal app, code like this:
// @fileoverview blah blah blah
"use strict";

produces
WARNING - Suspicious code. Is there a missing '+' on the previous line?
"use strict";
^
This stackoverflow thread (which links to specs) indicates that it's legal to have comments before the "use strict";
http://stackoverflow.com/questions/31412978/can-comments-come-before-use-strict

I can't reproduce this.

I think I confused myself with a different issue.  I'm gonna close this and only reopen it once I have a reproduction case.  Sorry for wasting your time.  :(

// @fileoverview blah blah blah

It's possible that the issue is that comment - but having the '+' error with it is very strange. However I would expect a warning along the lines of "attempt to use a JSDoc annotation outside of a JSDoc comment block" as that comment should have started with "/** @fileoverview"

I think we warn if you start your comment with /* instead of /** but
not if you start it with // :(