8 bit Winograd Convolution?

Is it possible to implement Winograd Convolution with 8 bit weights and activations? The intermediate transformations cause overflows which results in the loss of accuracy of the overall CNN. Is anyone aware of research implementing Winograd in low precision domains?

There are a couple of ways to think about this. I will assume you are using 8-bit integers and not 8-bit floating point numbers.
For deployment, the network weights are constant,  so the winograd components can be computed offline in high precision, then quantized to 8-bits and stored. Because the Winograd components over-determine the raw weights, they actually contain more information than the raw weights.
The downside is that the winograd components use more memory than the raw weights. F(2x2, 3x3) filter transforms expands the raw weights by a factor of 1.78X, F(4x4, 3x3) by 4X.
Typically 8-bit activations are computed using full-precision multiplication and 32-bit accumulation, so that there is no precision loss during the computation. Then the 32-bit results are quantized to 8-bits before the next stage of computation.
So you could also apply the winograd transform to 32-bit activations before quantizing to 8-bits. If you were to do this, you would probably fuse the multiplications stage, inverse winograd transform, bias, activation, forward winograd transform, and quantization stages into a single operation.
The downside of this approach is that activations are stored in the winograd domain, which represents an expansion of the raw activations. The smaller the tile size, the bigger the expansion. F(2x2,3x3) expands raw activations by 4X, F(4x4,3x3) by 2.25X.
Another possibility is to quantize the activations to even less than 8-bit precision, so that when you perform the Winograd transform, the result uses no more than 8-bits. This probably works well in some applications at least, as there are research results showing accurate classification using low-precision activations.
Another possibility is to use 1-D Winograd transform, call it F(2x1, 3x3) or F(4x1, 3x3). This effectively turns a 2-D direct convolution into a 1-D direct convolution nested inside of a 1-D Winograd transform. The arithmetic complexity reduction is less, but so is the precision loss and activation and weight expansion. Also the computational intensity is higher, because the multiplications can be computed as matrix multiplications nested inside of a 1-D direct convolution. Additionally this might map to tensor core style arithmetic better than even 2-D direct convolution does. Also the 1-D Winograd transforms have even better data locality than the 2-D Winograd transforms, which are in turn better than the large tile FFT method.
As an aside, I would like to point out that the effect of locality on the minimum workspace size is missing from recent analyses of fast algorithms for convnets, even though our original publication exploited Winograd locality to fit the entire working set in the GPU's small shared memory space. Obviously small-tile convolutions make possible instruction schedules that have fewer cache misses than large-tile (FFT) convolution algorithms do.
I hope this gives you some ideas!

@andravin @manojrohit
Thank you very much for your advice.I have done int8 winograd F(2,3) in arm platform,In my implement,It is faster than fp32 winograd F(6,3) in most cases,and it is in a opensource project : )
ncnn int8 pr
naive c code

Thank you for sharing the code @BUG1989. Any comments about accuracy degradation?

@manojrohit
In my project.The int8 winograd F(2,3) has the same accuracy as original int8 conv3x3s1

Another thing to try with int8 winograd is to quantize each of the winograd components separately.
This might be helpful when the input to the convolutional layer is the output of a ReLU activation. In that case, the input is nonnegative, so the winograd component with input transform [0,1,1,0] is also nonnegative. The other winograd components, with input transforms [0,1,-1,0], [1,0,-1,0], and [0,-1,0,1], are signed with expected mean of zero (you might have a sign flip in any of these components depending on how you compute transform).
You probably capture an extra bit of dynamic range if you map the [0,1,1,0] components to an unsigned int8 with range [0,255] and the other components to a signed int with range [-128,127]. You just have to be careful to scale the components appropriately when performing the inverse transform.


Thrust float

Change thrust from a uint16_t to a float to allow negative values
Remove limit on thrust values
Use Float32MultiArray instead of GenericLogMessage to allow easier plotting (in rqt_plot for example)

Depends on bitcraze/crazyflie-firmware#161 and PSVL/lps-ros#1

Those changes look good to me. I will need to wait for the other two dependent changes in order to merge it though (I added a comment/question in the firmware pull request regarding that change).
Thanks!
Wolfgang

The PR bitcraze/lps_ros#7 is dependent of this. As far as I can tell it is the last dependency for this PR. As soon as this PR is merged I will be able to merge bitcraze/lps_ros#7

That switch loses the time information of the header. Without the time, it will be difficult to plot data correctly (the main feature of the timestamp is that you can select the on-board timestamp, allowing to get clean plots over time for the various logging variables).
Would it help to change https://github.com/whoenig/crazyflie_ros/blob/master/crazyflie_driver/msg/GenericLogData.msg#L2 to Float32MultiArray instead for plotting?

Ah that's a good point. I don't have time to work on this these days, so I'll close this PR until I get a chance to look at this again.


[Logging v2] Not selecting Outputs or Cluster Outputs the Edit as YAML generates null from Create Flow

Rancher version v2.5-head (10/07/2020) 60d3ff3
If we don't select an Output or a ClusterOutput the array is left empty (or commented) If we then click Create there's an error in the UI
Only add globalOutputRefs or localOutputRefs if one was selected in the UI form. (Or include them commented.)
Steps to Reproduce

Install Rancher v2.5+
Navigate to Dashboard
Install the rancher-logging chart
Navigate to Output and add an Output
Navigate to Flows and start adding a flow from Edit as Form
Select only the Output and Leave the ClusterOutput empty
Click Edit as YAML
Leave the generate YAML untouched and click Create

Flow.logging.banzaicloud.io "testflow1" is invalid: spec.globalOutputRefs: Invalid value: "null": spec.globalOutputRefs in body must be of type array: "null"

There's no longer an Edit as YAML button so I can't reproduce this.

Closing, this feature is no longer in the UI.


Cannot load materials example

When I try to open them, I get these errors:

could not parse file: 80004005
error #1035: Could not read ZIP file

I read them with the lib3mf_reader_readfromfileutf8 function. Any idea?

Ok, it works with the dodeca_chain_loop, but not pyramid, for instance.

I want to create a multi  .3mf shape, I used the "Cube" code and created some kind of a loop to create multiple mesh objects but my code is not outputting anything. Since there should be one  for different parts, do I have to create multiple  tags? I don't see the command for it.

@phaazon we just rebuilt our materials examples directory; can you check the files there and reconfirm?

Hello,
I worked on that in a company I left more than a year ago. Sorry. :/


fix: include header and body for transferSize value

Include the transferred header + body size when calculating the transferSize value for a given network request.

NOTE: No explicit testing is necessary as there is a dedicated test validating the transferred sizes of the response.

:broken_heart: Tests Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS

Expand to view the summary

Build stats

Start Time: 2022-09-27T18:35:54.794+0000

Duration: 9 min 5 sec

Test stats :test_tube:

Test
Results

Failed
1

Passed
196

Skipped
2

Total
199

Test errors
Expand to view the tests failures
Test / network cached resource timings – network cached resource timings

Expand to view the error details
 null

Expand to view the stacktrace
 TypeError: Cannot read properties of null (reading 'wait')
    at /var/lib/jenkins/workspace/nt-rum_elastic-synthetics_PR-615/src/github.com/elastic/synthetics/__tests__/plugins/network.test.ts:277:21
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (/var/lib/jenkins/workspace/nt-rum_elastic-synthetics_PR-615/src/github.com/elastic/synthetics/__tests__/plugins/network.test.ts:275:15)

Steps errors
Expand to view the steps failures

Runs the tests

Took 2 min 58 sec . View more details here
Description: ./node_modules/.bin/jest --ci --reporters=default --reporters=jest-junit

:robot: GitHub comments
Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

/test : Re-trigger the build.


Add isPathSupportedByRegisteredFileSystems api

We would like to add API isPathSupportedByRegisteredFileSystems to verify if
a given path is supported by registered file systems. This functionality is
necessary to ensure that in Gluten scan operators can fallback appropriately
when encountering paths not supported by the registered file systems in Velox.
Since this new API is intended for validation, it will not trigger any side
effects such as instantiating the file system or throwing exceptions.

cc @majetideepak , could you please help to review? Thanks.


Day 456

Good morning! Here's your coding interview problem for today.
This problem was asked by Amazon.
You are given a list of data entries that represent entries and exits of groups of people into a building. An entry looks like this:
{"timestamp":<PHONE_NUMBER>, count: 3, "type": "enter"}
This means 3 people entered the building. An exit looks like this:
{"timestamp":<PHONE_NUMBER>, count: 2, "type": "exit"}
This means that 2 people exited the building. timestamp is in Unix time.
Find the busiest period in the building, that is, the time with the most people in the building. Return it as a pair of (start, end) timestamps. You can assume the building always starts off and ends up empty, i.e. with 0 people inside.

Identical to Day 171: https://github.com/vaskoz/dailycodingproblem-go/issues/356


Error Code P3006 with Error Code: P1014

Bug description
Hi there, I'd like to add a new column to my User model but when I want to migrate dev, it gives me this error:
Error: P3006

Migration `20230621052236_product_purchase_purchaseproduct` failed to apply cleanly
to the shadow database.
Error code: P1014
Error:
The underlying table for model `users` does not exist.

I have a  @@map(name: "users")  for my User model.
How to reproduce

Expected behavior
No response
Prisma information
generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

model User {
  id              String            @id @default(cuid())
  bio             String?
  name            String?
  phone           String?
  email           String?           @unique
  createdAt       DateTime          @default(now()) @map(name: "created_at")
  updatedAt       DateTime          @updatedAt @map(name: "updated_at")
  posts           Post[]
  likes           Like[]
  emailVerified   DateTime?
  image           String?
  accounts        Account[]
  sessions        Session[]
  purchases       Purchase[]
  products        Product[]
  PurchaseProduct PurchaseProduct[]

  @@map(name: "users")
}

model Account {
  id                String  @id @default(cuid())
  userId            String
  type              String
  provider          String
  providerAccountId String
  refresh_token     String? @db.Text
  access_token      String? @db.Text
  expires_at        Int?
  token_type        String?
  scope             String?
  id_token          String? @db.Text
  session_state     String?
  user              User    @relation(fields: [userId], references: [id], onDelete: Cascade)

  @@unique([provider, providerAccountId])
}

model Session {
  id           String   @id @default(cuid())
  sessionToken String   @unique
  userId       String
  expires      DateTime
  user         User     @relation(fields: [userId], references: [id], onDelete: Cascade)
}

model VerificationToken {
  identifier String
  token      String   @unique
  expires    DateTime

  @@unique([identifier, token])
}

model Post {
  id        String   @id @default(cuid())
  title     String?
  content   String
  published Boolean  @default(true)
  author    User     @relation(fields: [authorId], references: [id], onDelete: Cascade, onUpdate: Cascade)
  // likes     Int?     @default(0)
  // replies   Int?     @default(0)
  authorId  String
  slug      String
  createdAt DateTime @default(now()) @map(name: "created_at")
  updatedAt DateTime @updatedAt @map(name: "updated_at")
  likes     Like[]
  parentId  String?
  parent    Post?    @relation("PostReplies", fields: [parentId], references: [id], onDelete: Cascade, onUpdate: Cascade)
  replies   Post[]   @relation("PostReplies")
  category  Int
}

model Like {
  id        String   @id @default(cuid())
  createdAt DateTime @default(now()) @map(name: "created_at")
  authorId  String
  author    User     @relation(fields: [authorId], references: [id], onDelete: Cascade, onUpdate: Cascade)
  postId    String
  post      Post     @relation(fields: [postId], references: [id], onDelete: Cascade, onUpdate: Cascade)
}

model Product {
  id              String            @id @default(cuid())
  name            String
  features        Int
  price           Int
  priceDiscount   Int
  createdAt       DateTime          @default(now()) @map(name: "created_at")
  updatedAt       DateTime          @updatedAt @map(name: "updated_at")
  creatorId       String
  creator         User              @relation(fields: [creatorId], references: [id], onDelete: Cascade, onUpdate: Cascade)
  purchaseProduct PurchaseProduct[]
}

model Purchase {
  id            String            @id @default(cuid())
  createdAt     DateTime          @default(now()) @map(name: "created_at")
  purchaserId   String
  purchaser     User              @relation(fields: [purchaserId], references: [id], onDelete: Cascade, onUpdate: Cascade)
  products      PurchaseProduct[]
  transactionId String
  status        String
}

model PurchaseProduct {
  id            String   @id @default(cuid())
  name          String
  features      Int
  price         Int
  priceDiscount Int
  createdAt     DateTime @default(now()) @map(name: "created_at")
  updatedAt     DateTime @updatedAt @map(name: "updated_at")
  productId     String
  product       Product  @relation(fields: [productId], references: [id])
  purchaseId    String
  purchase      Purchase @relation(fields: [purchaseId], references: [id], onDelete: Cascade, onUpdate: Cascade)
  purchaserId   String
  purchaser     User     @relation(fields: [purchaserId], references: [id], onDelete: Cascade, onUpdate: Cascade)
}

Here is my migration SQL:
-- CreateTable
CREATE TABLE "Product" (
    "id" TEXT NOT NULL,
    "name" TEXT NOT NULL,
    "features" INTEGER NOT NULL,
    "price" INTEGER NOT NULL,
    "priceDiscount" INTEGER NOT NULL,
    "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updated_at" TIMESTAMP(3) NOT NULL,
    "creatorId" TEXT NOT NULL,

    CONSTRAINT "Product_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "Purchase" (
    "id" TEXT NOT NULL,
    "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "purchaserId" TEXT NOT NULL,
    "transactionId" TEXT NOT NULL,
    "status" TEXT NOT NULL,

    CONSTRAINT "Purchase_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "PurchaseProduct" (
    "id" TEXT NOT NULL,
    "name" TEXT NOT NULL,
    "features" INTEGER NOT NULL,
    "price" INTEGER NOT NULL,
    "priceDiscount" INTEGER NOT NULL,
    "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updated_at" TIMESTAMP(3) NOT NULL,
    "productId" TEXT NOT NULL,
    "purchaseId" TEXT NOT NULL,
    "purchaserId" TEXT NOT NULL,

    CONSTRAINT "PurchaseProduct_pkey" PRIMARY KEY ("id")
);

-- AddForeignKey
ALTER TABLE "Product" ADD CONSTRAINT "Product_creatorId_fkey" FOREIGN KEY ("creatorId") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Purchase" ADD CONSTRAINT "Purchase_purchaserId_fkey" FOREIGN KEY ("purchaserId") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "PurchaseProduct" ADD CONSTRAINT "PurchaseProduct_productId_fkey" FOREIGN KEY ("productId") REFERENCES "Product"("id") ON DELETE RESTRICT ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "PurchaseProduct" ADD CONSTRAINT "PurchaseProduct_purchaseId_fkey" FOREIGN KEY ("purchaseId") REFERENCES "Purchase"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "PurchaseProduct" ADD CONSTRAINT "PurchaseProduct_purchaserId_fkey" FOREIGN KEY ("purchaserId") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;

Environment & setup

OS: Windows 10
Database: PostgreSQL
Node.js version: v18.14.2

Prisma Version
    "@prisma/client": "^5.0.0",
  "prisma": "^5.0.0",

I tried upgrading to 5.0 from 4.15 for both packages in order to solve this error.

The error message indicates that when executing<PHONE_NUMBER>2236_product_purchase_purchaseproduct it tries to reference a table users that does not exist. Do you have earlier/previous migrations that indeed do a CREATE TABLE "users"? If not, the error message is fully correct.

The error message indicates that when executing the migration<PHONE_NUMBER>2236_product_purchase_purchaseproduct it tries to reference a table users that does not exist. (We can see in the SQL you shared above, that it indeed tries to create foreign keys that reference that table.)
Do you have earlier/previous migrations that indeed do a CREATE TABLE "users"? If not, the error message is fully correct and your migration history is somehow messed up.

Yes, I did have an init migration with CREATE TABLE "users".
-- CreateTable
CREATE TABLE "users" (
    "id" TEXT NOT NULL,
    "bio" TEXT,
    "name" TEXT,
    "email" TEXT,
    "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updated_at" TIMESTAMP(3) NOT NULL,
    "emailVerified" TIMESTAMP(3),
    "image" TEXT,

    CONSTRAINT "users_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "Account" (
    "id" TEXT NOT NULL,
    "userId" TEXT NOT NULL,
    "type" TEXT NOT NULL,
    "provider" TEXT NOT NULL,
    "providerAccountId" TEXT NOT NULL,
    "refresh_token" TEXT,
    "access_token" TEXT,
    "expires_at" INTEGER,
    "token_type" TEXT,
    "scope" TEXT,
    "id_token" TEXT,
    "session_state" TEXT,

    CONSTRAINT "Account_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "Session" (
    "id" TEXT NOT NULL,
    "sessionToken" TEXT NOT NULL,
    "userId" TEXT NOT NULL,
    "expires" TIMESTAMP(3) NOT NULL,

    CONSTRAINT "Session_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "VerificationToken" (
    "identifier" TEXT NOT NULL,
    "token" TEXT NOT NULL,
    "expires" TIMESTAMP(3) NOT NULL
);

-- CreateTable
CREATE TABLE "Post" (
    "id" TEXT NOT NULL,
    "title" TEXT,
    "content" TEXT NOT NULL,
    "published" BOOLEAN NOT NULL DEFAULT true,
    "authorId" TEXT NOT NULL,
    "slug" TEXT NOT NULL,
    "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updated_at" TIMESTAMP(3) NOT NULL,
    "parentId" TEXT,
    "category" INTEGER NOT NULL,

    CONSTRAINT "Post_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "Like" (
    "id" TEXT NOT NULL,
    "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "authorId" TEXT NOT NULL,
    "postId" TEXT NOT NULL,

    CONSTRAINT "Like_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE UNIQUE INDEX "users_email_key" ON "users"("email");

-- CreateIndex
CREATE UNIQUE INDEX "Account_provider_providerAccountId_key" ON "Account"("provider", "providerAccountId");

-- CreateIndex
CREATE UNIQUE INDEX "Session_sessionToken_key" ON "Session"("sessionToken");

-- CreateIndex
CREATE UNIQUE INDEX "VerificationToken_token_key" ON "VerificationToken"("token");

-- CreateIndex
CREATE UNIQUE INDEX "VerificationToken_identifier_token_key" ON "VerificationToken"("identifier", "token");

-- AddForeignKey
ALTER TABLE "Account" ADD CONSTRAINT "Account_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Session" ADD CONSTRAINT "Session_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Post" ADD CONSTRAINT "Post_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Post" ADD CONSTRAINT "Post_parentId_fkey" FOREIGN KEY ("parentId") REFERENCES "Post"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Like" ADD CONSTRAINT "Like_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Like" ADD CONSTRAINT "Like_postId_fkey" FOREIGN KEY ("postId") REFERENCES "Post"("id") ON DELETE CASCADE ON UPDATE CASCADE;

Hmm, there goes my theory. Can you maybe share a zipped up version of your prisma/migrations folder and a full copy of your schema? That would allow us to reproduce this ourselves.
(I now also notice that the error message you are getting is probably different from what a migration file that references a non existent table would be getting.)

Hmm, there goes my theory. Can you maybe share a zipped up version of your prisma/migrations folder and a full copy of your schema? That would allow us to reproduce this ourselves.
(I now also notice that the error message you are getting is probably different from what a migration file that references a non existent table would be getting.)

It is alright @janpio, thanks for replying!
FYI, I tried changing the latest migration SQL file from REFERENCES "users"("id") to REFERENCES "User"("id") but to no avail.
Please find attached the whole prisma folder which includes /migrations and also my full schema:
prisma.zip
I am using railway's managed PostgreSQL instance (in case it somehow did had any effect)
Thanks once again!

Hi, @janpio sorry for bugging you.
Is everything alright for my schema files?

Looks like it to me, but we will only really know when someone has the time to reproduce this problem.

Looks like it to me, but we will only really know when someone has the time to reproduce this problem.

I see, thanks for having a look at my files.
Is there a possible workaround for me to add more fields to my schema without using migrate?

Okay, so downloading your schema and migrations history, I can reproduce the p1014

This is because your init migration is called just that: init. migrate dev is just not picking it up. Migrations are expected to run in order based on when they were created and therefore your init migration needs to have some sort of date representation that is older than product_purchase_purchaseproduct

@SyahmiRafsan Although this is marked as a confirmed bug now, there is nothing really wrong: You can just give your init migration a different name by renaming that folder, for example, 0_init - and you should be good.
But of course we could improve that behavior, and for example warn about the migration without a leading number that would lead to it being applied last.

I experienced the problem too. to fix it, I deleted my migrations folder, then made a new one with  npx prisma migrate dev, wouldn't  recommend if your in prod though

I experienced the problem too. to fix it, I deleted my migrations folder, then made a new one with npx prisma migrate dev, wouldn't recommend if your in prod though

I was coming to comment on the same thing. after a thousand failed attempts. delete the migrations folder. execute

npx prism migrate developer

generate npx prism

and this in production. Of course I have a dev branch that has all the migration files.
Conclusion: npx prism deploy not working

Another potential issue. I was getting the "The underlying table for model _prisma_migrations does not exist". I was trying to change the permissions for that table for RLS in another migration. I commented that statement and running migrate dev again told me the 0_Init could not be implemented. I copied the SQL code into a DB Client and it marked that I had a weird char in the SQL. I guess by mistake a modified the Init SQL without realising it and my local migrations were not running. My bad on this but hopefully it could help others.

Okay, so downloading your schema and migrations history, I can reproduce the p1014
This is because your init migration is called just that: init. ~migrate dev is just not picking it up~¹. Migrations are expected to run in order based on when they were created and therefore your init migration needs to have some sort of date representation that is older than product_purchase_purchaseproduct
¹ I went back and checked this and it is being picked up, it's just sorted after the migration that depends on it which effectively yields the same result

If you decide to manually change the name of any migration, remember that you'll need to change it both in your filesystem and in the database, within _prisma_migrations


New installation guide for Debian 11 with PHP 8.2

Describe the Bug
There is the installation guide written by othlanalikhan which installs it with PHP 7.4.
I've wrote a new guide which is heavily based on this but helps install PHP8.2 and then BookStack.
The link is here : https://jardin.icamole.fr/books/bookstack/page/installation
I thought it may be useful for the community.
Have a nice day !
Steps to Reproduce
All the guide can be found in the following link : https://jardin.icamole.fr/books/bookstack/page/installation
Expected Behaviour
Since PHP7.x has been deprecated, I thought maybe a Debian guide with PHP8.2 could be interesting.
Screenshots or Additional Context
No response
Browser Details
No response
Exact BookStack Version
v23.02.1
PHP Version
8.2
Hosting Environment
Debian with a new installation guide :)

Great work!
I used the original Debian guide as well to set it up BookStack on Devuan Daedalus (Debian 12 Bookworm equivalent) with PHP 8.2 except leaving the systemd parts out, it worked really well.

Thanks @armando-femat! This prompted me to clean up this community guides area, moving most of the current guides to a "Old Guides" section to indicate they're no longer current, and have added your guide to the existing list.
Done within fd535968b92128efc466258b8d4e6c3f35c41b44, will push changes live later today.


Custom certificates are not propagated to rancher-agent hosts

Rancher Version:
1.1.4
Docker Version:
1.12.1
OS and where are the hosts located? (cloud, bare metal, etc):
Ubuntu 14.04, Open Nebula 5.02
Setup Details: (single node rancher vs. HA rancher, internal DB vs. external DB)
HA Rancher
Environment Type: (Cattle/Kubernetes/Swarm/Mesos)
Cattle
Steps to Reproduce:

Create a HA setup with a custom certificate (I self signed and provided this cert to the HA setup, I did not use the 'self-signed' option)
Create a custom host
Spawn the host with:
sudo docker run -e CATTLE_HOST_LABELS='HOSTSIZE=small' -v /var/lib/docker/ca.crt:/var/lib/rancher/etc/ssl/ca.crt -d --privileged -e CA_FINGERPRINT="1F:2E:4B:81:46:C7:BF:6F:A4:0C:59:B2:78:51:20:30:7D:A5:7E:C5" -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.0.2 url_with_token

Results:
Agent will get in an endless INFO: Starting agent for xxx
Expected:
I get a host!
The issue is my custom certificate is not being placed in rancher-agent-state, and the curl request in run_bootstrap is failing because the certificate is missing. You can see here:
https://github.com/rancher/rancher/blob/master/agent/run.sh#L135
that the custom cert is lost at this stage, and because volumes are inherited from rancher-agent-state, my custom certs are not present when rancher-agent is trying to curl the bootstrap script.

Well, if I overwrite /var/lib/rancher/etc/ssl/ca.crt on the host machine, it works. This is somewhat inconsistent with the docs which state to use -v however in docker run.

@Chris7 can you share with me the link to the docs where -v is suggested for the certificate?

I misread, I assumed the section here would apply equally to hosts: http://docs.rancher.com/rancher/v1.2/en/installing-rancher/installing-server/basic-ssl-config/

I think this specifically is what you were looking to do: http://docs.rancher.com/rancher/v1.2/en/installing-rancher/installing-server/basic-ssl-config/#adding-hosts


Link on README led to 404

Fixing link on readme

@kyprifog Could you sign CLA please?

@googlebot I signed it!


Define schema alteration management

Under the system component, define a DalSchemaAlteration service with all of the corresponding codegen definitions (store, types, ...); consider omitting envoy at this stage.
In addition to the service, we should add rest logic also.
The service provides the standard CRUD operations over alterations.
We can add additional functions the pkg/dal package could utilize (I'm quite sure we can get away with just CRUD).
Core-type fields
These fields must be present; you may add others if you see fit (such as timestamps).

AlterationID uint64: the field denotes the entire alteration and the same value is shared by all operations in the same alteration.
OperationID uint64: the field denotes a single operation inside the entire alteration and is always unique
Operation string: the field denotes what this bit of the alteration performs.
Optimally, this would be some enum field.
Params JSON: cookie-cutter field for all parameters the system would need to perform an alteration

for today: start working and complete it

Base prepared; to add along the way:

extra functions when needed
RBAC (might need some extra brains on this)
consider event buss


Playing through loopback adapter bad distortion

Hi,
I grabbed your wire.py example and made a small change where during the callback I am running some code.
def callback(indata, outdata, frames, time, status):
    if status:
        print(status)
    global tail
    rear = np.hstack((tail, indata[:frames - 3, 1] *-1))
    tail = indata[frames -3:, 1] *-1
    outdata[:] = np.stack((indata[:,0], rear), axis = 1)

If I output the above to my headphones from what I can hear seems normal, but what I want to do is output to a loopback adapter to record.
When I record from the loopback the distortion is terrible and can tell straight away as soon as I started I get system messages about the buffers.
I am confused why playing out to a loopback should make any difference to what seems to be working headphones.
I can use a loopback that way with the wire.py example?

... but what I want to do is output to a loopback adapter to record.

Why do you need a loopback adapter for recording? Why not just record the data you already have?
See examples/rec_unlimited.py for how to record some data.

When I record from the loopback the distortion is terrible and can tell straight away as soon as I started I get system messages about the buffers.

What messages?

I am confused why playing out to a loopback should make any difference to what seems to be working headphones.

What loopback device are you using?
What are the max/min values of the signals you are handling?

I can use a loopback that way with the wire.py example?

I don't know, you would have to provide a bit more information about what you are using and how.

I am grabbing the mic processing and passing through with wire.py but have a simple alg to inverse and delay the right channel by 3 samples.
It plays back to a loopback so it can be used as a alsa-source once more but with the alg audio modifications.
Mesages are te usual buffer ones from.
    if status:
        print(status)

snd_aloop standard kernel module
I just don't understand why there is any difference playing to any sink but from my usb soundcard to loopback there is?

Messages are the usual buffer ones from and strange as only when connected on a loopback.

This is indeed strange.
But as long as those messages appear, you should expect audible artifacts.
Did you try larger block sizes and latencies?
What are the max/min values of the signals you are handling?

No but I will and see if I can get max/min values but it may be something weird with the Pi I2S mic driver.
https://github.com/opencardev/snd-i2s_rpi
As I know its MSB/LSB the wrong way round so the samples are quiet.
Thanks will get back to you.


bug fix be core at insert invalid json to JSONB column

Proposed changes
Issue Number: close #14685
Problem summary
Describe your changes.
Checklist(Required)

Does it affect the original behavior:

[ ] Yes
[x] No
[ ] I don't know

Has unit tests been added:

[x] Yes
[ ] No
[ ] No Need

Has document been added or modified:

[ ] Yes
[ ] No
[x] No Need

Does it need to update dependencies:

[ ] Yes
[x] No

Are there any changes that cannot be rolled back:

[ ] Yes (If Yes, please explain WHY)
[x] No

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 34.72 seconds
load time: 434 seconds
storage size:<PHONE_NUMBER>3 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221130025736_clickbench_pr_55179.html


Call python3 to execute XCTest's build_script.py.

A workaround for the fact that fixing this in XCTest's repository (https://github.com/apple/swift-corelibs-xctest/pull/441) is blocked on XCTest's CI being broken for unrelated reasons (and ones which I cannot reproduce locally).

@swift-ci please test


Enhance "subctl uninstall ..." to remove the rules in "raw" table

What would you like to be added:
As part of https://github.com/submariner-io/submariner/issues/1899, we will now be programming new iptable rules in the "raw" table. We should enhance "subctl uninstall  ..." command to delete these rules while uninstalling submariner from the cluster.

It turns out to be a regression in Kernel and the associated changes are now reverted in RHEL/CoreOS platforms. So no changes are required in Submariner.


fix: collect prior output from attached containers

When attaching to a docker container, specify logs=True in order to
receive the output the container has generated prior to it being
attached.
Issue #, if available:
Related to #1551
PR #1552 switched to using Docker API for attaching to containers. However, it is invoked with logs=False so that only the output generated by the container after attaching is collected. This means that some initial output may get lost.
Description of changes:
Specify logs=True when attaching to a container to ensure the complete output is collected.
Checklist:

[ ] Write Design Document (Do I need to write a design document?)
[ ] Write unit tests
[ ] Write/update functional tests
[ ] Write/update integration tests
[ ] make pr passes
[ ] Write documentation

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@setrofim Can you be more specific on the output that is lost? I am not sure what you are referring to.

@jfuss The output between when the container is stared by the container_manager  inside invoke() and is attached to inside wait_for_logs(). Not much happens between these two points, but it  seems that occasionally, the attach happens too late, and we miss output from some of our lambdas, resulting in intermittent failures (basically, the same symptoms as in  #1551, but due to a different timing issue). Setting logs=True ensures that we collect output from the start of the container, regardless of the timing of the attach().

@setrofim Makes sense. I don't know if we really want to do logs=True. I took this from another PR I had open for warm containers #1305. In that case, we actually do not want all the logs from the container.
I initially made the change in #1552 thinking the bug was within our attach implementation and could instead just use dockers. As you and @thomas-fossati have pointed out, this is actually not the case. Instead of just introducing another failure/case into the mix, I am going to revert the #1552 PR so it does not get released. I want to do a little deeper understanding of these things to make a better call on next steps.
Really appreciate the dive you guys have done here! It is very helpful.

FWIW, I have submitted a PR to docker with a proposed fix for this on their end: https://github.com/docker/docker-py/pull/2467

@setrofim That is awesome! I think the part we are missing is timestamp information, so we can either tell docker-py to filter logs or do it ourselves. It looks like this should be possible, given the attach() method is a wrapper around logs(). So maybe the right thing here is to actually update to logs=True now and just fix the timestamp related concern when we finish up the 'warm container' pr.
Sorry thinking out loud/as I type.


Implement shim_url

Adjusted #3032 according to @Liamolucko's comment: https://github.com/rustwasm/wasm-bindgen/pull/3032#issuecomment-1396290519.
This is now only implemented for the web and no-modules targets, all other's return None.
Replaces #3032.

Similarly to #3168 should I return a Result instead of an Option?

Rebased after #3272 and #3279.
@Liamolucko friendly ping.

Rebased after #3329.

I think the better way to implement this are shim format-specific getters. For example, es_module_shim_url(), instead of shim_format() and shim_url().
The main reason is that supporting multiple shim formats are a maintenance burden for other crates. Therefore, other crates may decide to only support a single format and tell their users to simply use that.  This could lead to conflicts when a user wants to use multiple independent crates as dependencies. Even if crates want to support multiple shim formats, they need rather complex tests and CI to prevent breakage of lesser used formats. Shim format-specific getters avoids this complexity and help to create a compatible, healthy ecosystem around wasm-bindgen.
Also, some formats may be unsuitable for some purposes. For example, can the shim of the bundler target, that statically imports the Wasm module, be used with an existing memory instance? What about future targets that may not use JS shims at all? Adding an ES module shim that provides the existing interface allows new targets without breaking existing crates.
es_module_shim_url() would return import.meta.url on targets that use an ES shim natively. Otherwise, an extra ES shim would be included like a linked module. This ES shim is able to implement to use import.meta.url again (even with --split-linked-modules unset, import.meta.url will return a data URL that works fine).
More format-specific getters could be added for other formats (like nomodules_shim_url()), but I don't think this is needed. ES modules are the standardized feature to compose JS code, that works on browsers and servers. (Firefox 111 now supports ES modules in workers.) Also, their location can be discovered reliably with import.meta.url, so es_module_shim_url() prevents breakage of linked modules when used in Web Workers. On the other hand, is there any case where a nomodules shim is preferred?

Adding an ES module shim that provides the existing interface allows new targets without breaking existing crates.

Isn't this solved by using #[non_exhaustive]? Or is there something incompatible with shim_url and it returning a String?

(Firefox 111 now supports ES modules in workers.) ...
On the other hand, is there any case where a nomodules shim is preferred?

See #3355, but generally I'm in favor of deprecating when we reach that point.

Isn't this solved by using #[non_exhaustive]? Or is there something incompatible with shim_url and it returning a String?

The problem is that existing crates (without updates) will compile with #[non_exhaustive], but they are unable to correctly use the shim if they don't understand the format. This is the same problem like when they get the UnsupportedTargetError. This can be prevented by supporting multiple shims, so the shim with the interface expected by the caller can be returned.

That's a really good point actually. I would like to suggest to merge shim_url and shim_format in one function instead of introducing multiple functions for each shim. @Liamolucko WDYT?

That's a really good point actually. I would like to suggest to merge shim_url and shim_format in one function instead of introducing multiple functions for each shim. @Liamolucko WDYT?

That sounds great, assuming I understood you properly!
To be clear, do you mean something like:
fn shim_url(format: ShimFormat) -> String { ... }

Which then returns the URL of a shim with the format you passed in?
Just double-checking because what you're describing also sounds kinda like:
fn shim() -> (String, ShimFormat) { ... }

Which I wouldn't be particularly in favour of.

I was actually suggesting:
fn shim() -> Shim { ... }

enum Shim {
	EsModule { url: String },
	NoModules { url: Option<String>, global_name: String },
	...
}

// or maybe:
struct Shim {
	url: Option<String>,
	format: ShimFormat,
}

But your suggestion with passing in the format might be better if we want to support getting multiple shims? Or we could return a Vec?
Personally, if we go the route of wanting to support multiple shims I would prefer returning a Vec, making multiple calls to find the available shim you are looking for sounds a bit awful.

Ah, I see, you were talking about @lukaslihotzki's comment that crates would break when they didn't understand the shim format. I thought you were talking about their suggestion to support multiple shims.
I don't think that combining shim_url and shim_format addresses the problem as I understood it. It stops crates from mistakenly ignoring shim_format and assuming that the shim is a particular format, but I think the problem @lukaslihotzki was getting at was that if you want to use a crate that relies on shim_url, you simply can’t if you’re using a target without a shim or a new shim format which the crate hasn’t added support for yet.
Supporting multiple shims solves that, since the crate can pick whatever shim it likes, and doesn't have to worry about what shim the current target is using, if it even has one.
I do think that moving to an enum like that is an improvement if we stick to the one-shim approach, but I'm now leaning more towards having multiple shims here as well as in linked modules. @lukaslihotzki makes a good point that it makes it a lot easier for crates to be target-agnostic, and makes it possible for this feature to work on —-target bundler at all.
As for how that would actually work, the version of shim_url I semi-proposed wouldn't be querying a list of existing shims, it would be generating the shim, in a similar fashion to link_to! generating linked modules. I think it would actually have to be a macro to do that, not a function, but at the time I was just trying to check what you were saying and didn't stop to think 'wait, how?' Or it could be multiple functions like @lukaslihotzki is proposing.
So, there wouldn't be a problem of needing multiple calls to 'find' a shim like you were describing.

Thanks, I see what I misunderstood here.
I'm starting to question the multiple shims approach. The advantage of having multiple shims is that a library maintainer doesn't have to think about what shim the user currently uses, but gets whatever they desire. This actually comes with an overhead though, multiple shims have to be bundled into the application. But of course supporting each shim separately comes with a higher maintenance burden for a library maintainer.
Not that I'm against the idea of multiple shims, but I think it's a choice users should be able to make. For example I don't use a bundler and I don't have any snippets either. I have a single JS file that I can minimize and serve and that's it, I don't want to buy into the overhead the bundler target brings with it.
Also I'm not sure how this is supposed to work with the no-modules target, when I use the no-modules target I do it for compatibility purposes, an underlying library can't just use the web target, that would break my build, I want it to use what I use, if it doesn't support it then I have to fix the library or get another. Even if we deprecate the no-modules target, not all future targets will be compatible with each other.
So the conclusion I'm coming to while I'm writing this is that it's an interesting idea that we could support importing any desired shim, but my use-case still requires the current approach of requesting the currently used shim and act appropriately.

I would also like to understand exactly how the bundler target works, I mentioned before that I have no clue of the JS ecosystem, I don't know what Webpack is and I've never used a bundler before. Taking a brief look at this stuff, it seems quite straightforward to me, they bundle all the files together, probably doing minimization at the same point too.
My understanding is that the bundler target doesn't work without actually using a bundler on the generated files, so how exactly would that work if a user uses the web target but a library pulls in the bundler target shim? Apologies for the naivety on this topic.

This actually comes with an overhead though, multiple shims have to be bundled into the application.

The overhead should be small, because shims are usually much smaller than the Wasm module. For wasm-audio-worklet (very small app), the shim size is 17% of the Wasm size (both compressed). In a more interesting project that uses winit and wgpu, the shim is only 1.5% of the Wasm. Also, the size of extra shims can be optimized by sharing code between them. ES module shims (like bundler and web) can import each other. no-modules shims cannot import, but they can be imported. Such optimizations can be implemented transparently at any time in wasm-bindgen.

Not that I'm against the idea of multiple shims, but I think it's a choice users should be able to make. For example I don't use a bundler and I don't have any snippets either. I have a single JS file that I can minimize and serve and that's it, I don't want to buy into the overhead the bundler target brings with it.

There is no overhead if you request the shim url of the native format of your target. If your manual build setup does not support linked modules, omit --split-linked-modules. wasm-bindgen could return the requested shim as data URL, possibly with code sharing where possible, if that is implemented. A larger shim is better than a broken product, and nothing prevents you from requesting the native format for optimal size.

Also I'm not sure how this is supposed to work with the no-modules target, when I use the no-modules target I do it for compatibility purposes, an underlying library can't just use the web target.

If a library creates an audio worklet and uses the ES module shim in there, that should work fine even if --target no-modules is set, for example. Could you explain in which case it wouldn't work?

I want it to use what I use, if it doesn't support it then I have to fix the library or get another.

You can still change the library or choose another to match your native format. The difference with multiple shims is that users aren't forced to do it, if they accept the usually very low overhead. Also they can still do it at later time when their product works, but the shim size needs to be optimized.

The overhead should be small, because shims are usually much smaller than the Wasm module. For wasm-audio-worklet (very small app), the shim size is 17% of the Wasm size (both compressed). In a more interesting project that uses winit and wgpu, the shim is only 1.5% of the Wasm.

I don't disagree that the overhead is small, I would still prefer not to pay for it.

Also, the size of extra shims can be optimized by sharing code between them. ES module shims (like bundler and web) can import each other. no-modules shims cannot import, but they can be imported. Such optimizations can be implemented transparently at any time in wasm-bindgen.

That would be really nice but I'm concerned with this idea of "future optimization", wasm-bindgen doesn't have the maintenance capacity for this at all, imho.
In any case, I agree that whatever overhead I was talking about is negligible and I'm happy to accept it for a better feature.

There is no overhead if you request the shim url of the native format of your target. If your manual build setup does not support linked modules, omit --split-linked-modules. wasm-bindgen could return the requested shim as data URL, possibly with code sharing where possible, if that is implemented. A larger shim is better than a broken product, and nothing prevents you from requesting the native format for optimal size.

I agree, but that requires an API that actually can request the native format, the API we were discussing above might suggest that we can't:
fn shim_url(format: ShimFormat) -> String { ... }

If a library creates an audio worklet and uses the ES module shim in there, that should work fine even if --target no-modules is set, for example. Could you explain in which case it wouldn't work?

Audio worklets support both, but web workers don't, on Firefox they don't support ES modules (the web target).
But that is not the whole story, yes, Firefox will support it eventually, and then we can drop this point too. But what about future targets? Let's say the component model is introduced, we will need a new target for that, maybe that will only be supported on some browsers, or maybe only in the window but not in workers, or any other scenario.
This idea of making multiple shims available on demand only works if all targets are actually compatible with each other, which they are definitely not right now and we can't predict that new targets will be in the future.

You can still change the library or choose another to match your native format. The difference with multiple shims is that users aren't forced to do it, if they accept the usually very low overhead. Also they can still do it at later time when their product works, but the shim size needs to be optimized.

I agree. I want to emphasize I'm not against the idea of having multiple shims, but it doesn't work for all use-cases and I want to make sure we support at least the native approach!

Audio worklets support both, but web workers don't, on Firefox they don't support ES modules (the web target).

No, audio worklets do not support importScript. They only support ES import by design (not by missing browser implementation). Your point is exactly the reason why we do need multiple shims. So a web worker crate that wants to support Firefox can request the no-modules shim, while an audio crate can request the ES module shim, and everything works. The same reasoning applies to future targets.

I agree, but that requires an API that actually can request the native format

If you are the application developer, then you should know your target and choose the appropriate format. If you develop an independent library, you have to choose a format suitable for most of your users and suggest to use a corresponding target to your library users. The library users that choose a different format regardless will prefer a larger product compared to a broken product.
If a library developer wants to provide different native formats, we could add a macro like any_shim!(EsModule, NoModules) that would return one of the specified formats (preferring native), but I think app and library developers will happily accept the overhead if that helps to reduce complexity.

Okay I'm starting to see the issue here.
I was under the assumption that the proposal is to expose multiple shims to make it irrelevant for library developers which shim they pick compared to which shim the user picked.
But the suggestion was actually to let library developer be able to pick the shim they need, the one that actually works for whatever is being done despite the target the user picks.
Now the feature actually makes sense to me :sweat_smile:!

No, audio worklets do not support importScript.

You can still use audio worklets on Firefox with the no-modules target by not using importScript(), but by just getting the shim and pasting it inside the module used in addModule(). But web workers on Firefox just don't support ES modules in any way, unless you transform them to classic JS course.
But absolutely, multiple shims would solve that problem much better, now that I understand the proposal it makes perfect sense.

If you are the application developer, then you should know your target and choose the appropriate format. If you develop an independent library, you have to choose a format suitable for most of your users and suggest to use a corresponding target to your library users. The library users that choose a different format regardless will prefer a larger product compared to a broken product.
If a library developer wants to provide different native formats, we could add a macro like any_shim!(EsModule, NoModules) that would return one of the specified formats (preferring native), but I think app and library developers will happily accept the overhead if that helps to reduce complexity.

I agree that this is how it will likely play out anyway.

So, after (hopefully) finally understanding the full picture here, I'm also strongly in favor of supporting multiple shims.
As far as I can tell I also agree with @Liamolucko that this will probably be a macro, so I'm gonna skip on discussing the APIs we suggested above and I guess we will discuss this again when we have some implementation to look at or in https://github.com/rustwasm/wasm-bindgen/pull/3034.
About #3168 and #3247, I have some concerns and arguments why we should still merge them, more or less as-is.
I'm gonna start with that if we still want to support querying native modules in a macro, like any_shim!(EsModule, NoModules) (by @lukaslihotzki), we will still need something like shim_url and shim_format. But it could be argued they should be hidden as an implementation detail.
I am also concerned about the timeline here, this will take a long time to develop and to get right. Comparatively shim_url and shim_format are small and not much can go wrong here.
The main argument against it, which would be that we encourage libraries to depend on these features which could be harmful in the long run, is something that I now understand. This wouldn't be a problem if we could remove them again in a version bump, but I can only assume that this isn't going to happen anytime soon. But I also don't think it's a huge deal and I'm not sure how harmful this can really be. Wasm and browsers are a moving target and libraries have to update and adjust anyway.
I do still think though that combining shim_url and shim_format could alleviate at least some of the concerns though. At least nobody is gonna just use shim_url without thinking about the format.

What's needed to move this forward? I'm wanting to use an AudioWorkletProcessor but it's not as easy as I was expecting. This seems like it will remove some of the boilerplate that I need.

#[wasm_bindgen]
extern "C" {
	type Meta;
	#[wasm_bindgen(js_namespace = import, js_name = meta)]
	static META: Meta;
	#[wasm_bindgen(method, getter)]
	fn url(this: &Meta) -> String;
}

let shim_url: String = META.url();

Is what you can use now, though it won't work with the no-modules target.
I will close this PR as its no longer planned. Not only do we plan to #3355 but now all browsers support ES modules in audio worklets.


fix: reconnect options

What type of PR is this?

[ ] bug
[ ] feature
[ ] enhancement

What problem(s) does this PR solve?
Issue(s) number:
Description:
How do you solve it?
Special notes for your reviewer, ex. impact of this fix, design document, etc:

fix #263


Improvements to model fields and properties

Background
Niall has helped us improve the fields associated with the Experiment class - e.g. adding Temperature, thermal management etc. It would be useful to review other models (and Experiment again) to ensure the fields and properties are as suitable as possible.
Tasks
We should engage with Niall and other researchers specifically to give suggestions on this.

Now covered in more recent issues inc. #180


Japanese web pages not rendered properly by static Mac binary

<EMAIL_ADDRESS>commented:

Which version of PhantomJS are you using?
1.3.0
What steps will reproduce the problem?

Download the static Mac build of 1.3 (http://code.google.com/p/phantomjs/downloads/detail?name=phantomjs-1.3.0-macosx-static-x86.zip&can=2&q=)

Load the test URL below with phantomjs.
http://masonmark.com/stuff/euc/

There's a test script to do this and output the results here:
https://gist.github.com/1260734

See whether the page has Japanese text in it, or jumbled garbage text instead,

(The test script will print the output to the console, write it to a file, and render it as an image, for easy verification.)
What is the expected output? What do you see instead?
The page should contain Japanese text. But instead it contains garbage text.
Which operating system are you using?
Mac OS X 10.7.1
Did you use binary PhantomJS or did you compile it from source?
This problem only exists for me with the binary. When I compile it from source, the problem is gone, and Japanese text correctly appears in script output, web page content, and rendered image.
Please provide any additional information below.
The gist above also includes sample output to illustrate the problem. I have not tested on Windows or Linux.

Disclaimer:
This issue was migrated on 2013-03-15 from the project's former issue tracker on Google Code, Issue #249.
:star2:   6 people had starred this issue at the time of migration.

PhantomJS 2.0 on Linux renders the test case at http://masonmark.com/stuff/euc/ correctly.  I am going to leave this open until someone gets a chance to test it on OSX.

v2.0 (built from source) doesn't work on Ubuntu 12.04.

Ok, got it to work on Ubuntu 12.04. I was just missing a font. Installing fonts-ipafont-gothic fixed it. In fact both 1.9.8 and 2.0 worked on Ubuntu and OSX.

@mbykovskyy And i test 2.0 on Ubuntu 14.04.3 success, :D
Here is the debian font package list, maybe @ariya should put it in FAQ docs.
https://packages.debian.org/search?suite=default&section=all&arch=any&searchon=names&keywords=fonts-

Due to our very limited maintenance capacity (see #14541 for more details), we need to prioritize our development focus on other tasks. Therefore, this issue will be closed. In the future, if we see the need to attend to this issue again, then it will be reopened.
Thank you for your contribution!


Clarification for brown belt "specialized tool"

As a new picker and new to the whole scene this site offers quite a bit of valuable information.
I was left wondering what the "specialized tool" requirement for brown belt means. It does say a bent bobby pin would not suffice but does not clarify what would.
Does Abloy classic pick made from injector pin fill the requirement?
What about some 3d printed follower sets?
Giving some kind of example would make this quite a bit clearer for newcomers.
I'm happy to make a pull request after getting some clarification on what to add to the text to make it clearer on what is required :)

All of the content in the site is managed by LPU admins. The best place to submit suggestions to wording changes and additions is on the discord in #belt-explorer or #mod-requests.


/jira subscribe displays help instead of subscription management

I installed Jira app for Mattermost via .json file. When I try to /jira subscribe help shows up instead of integration popup. Other commands like /jira view works fine.
Plugin version: 2.2.2

@mickmister I just reproduced this on community after we deployed v2.3.0-rc1 there. The command works in the browser, but not in the desktop app (after a refresh). I am going to move the tracking of this ticket to Jira.

@cadavre @vertisan @greygoosey FWIW, when I quit and then re-started my Mattermost Desktop App, the command worked. This may be a workaround until we fix the root cause.

@levb I did this way:

Fully closed MM Desktop
Runned again
Switched to destination channel
Runned command /jira subscribe

But it show help instead of typical result of command.
Windows 10, Mattermost Desktop 4.3.0

tracking in https://mattermost.atlassian.net/browse/MM-20738

Hi @vertisan, I suggest the following to try and debug the issue:

Try running /jira create. This is a client-side command just like /jira subscribe. If the command does not properly open the issue create modal, then the client-side portion in general is not working.

Check the JS console to see if there is an error related to the plugin when refreshing the page, or when running /jira subscribe. The entire console output would be useful since it may not be obvious that a given error is involved with the plugin.

Thank you for your help!

Hi @mickmister , thanks for your response.
I have tried your tips but it's still does not work properly - I'm still getting help window. JS console is clear, I'm not getting any errors or warnings.
When I enter /jira subscribe command, /api/v4/commands/execute returns me:
{
    "response_type":"",
    "text":"",
    "username":"",
    "channel_id":"",
    "icon_url":"",
    "type":"",
    "props":null,
    "goto_location":"",
    "trigger_id":"<I_hide_this_ID>",
    "attachments":null,
    "extra_responses":null
}

Hi @vertisan, I believe I have found the cause of your issue. Could you look in your Jira plugin settings in the admin console and see what the value for "Allow users to attach and create Jira issues in Mattermost" is?
It is currently tied to the subscriptions feature, and if set to false, the /jira subscribe command will be unavailable (it will print out the help text). This will be fixed in the upcoming release, so this config setting will not affect the subscriptions feature.


Null pointer dereference - remove_tree_node (ems_alloc.c:45)

Environment

Questions
Answers

Related Binary
./iwasm (linux build)

Commit
commit 9a02c49d7c2bb2012fe8d2bd2b9cb2bdaf88ba79

Vulnerability/issue
Null pointer dereference in remove_tree_node (ems_alloc.c:45)
Steps to reproduce the behavior

Download:
PoC.zip

Run:
./iwasm PoC.wasm

Additional Informations
Crash
[1]    5683 segmentation fault  ./iwasm

GDB
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.

[----------------------------------registers-----------------------------------]
RAX: 0x4040404040404040 ('@@@@@@@@')
RBX: 0x0
RCX: 0x0
RDX: 0x55555577f134 --> 0x6d736100a0000078
RSI: 0x555555793b37 ('@' <repeats 200 times>...)
RDI: 0x555555793b37 ('@' <repeats 200 times>...)
RBP: 0x7fffffffd6d0 --> 0x7fffffffd710 --> 0x7fffffffd760 --> 0x7fffffffd780 --> 0x7fffffffd7a0 --> 0x7fffffffd7c0 (--> ...)
RSP: 0x7fffffffd6b0 --> 0x7fffffffd710 --> 0x7fffffffd760 --> 0x7fffffffd780 --> 0x7fffffffd7a0 --> 0x7fffffffd7c0 (--> ...)
RIP: 0x5555555748c5 (<remove_tree_node+118>:	mov    rax,QWORD PTR [rax+0x10])
R8 : 0x55555577eeb8 --> 0x1
R9 : 0x7fffffffd468 --> 0x0
R10: 0x0
R11: 0x246
R12: 0x555555557960 (<_start>:	xor    ebp,ebp)
R13: 0x7fffffffda70 --> 0x2
R14: 0x0
R15: 0x0
EFLAGS: 0x10202 (carry parity adjust zero sign trap INTERRUPT direction overflow)
[-------------------------------------code-------------------------------------]
   0x5555555748b8 <remove_tree_node+105>:	call   0x555555557740 <__assert_fail@plt>
   0x5555555748bd <remove_tree_node+110>:	mov    rax,QWORD PTR [rbp-0x18]
   0x5555555748c1 <remove_tree_node+114>:	mov    rax,QWORD PTR [rax+0x18]
=> 0x5555555748c5 <remove_tree_node+118>:	mov    rax,QWORD PTR [rax+0x10]
   0x5555555748c9 <remove_tree_node+122>:	cmp    QWORD PTR [rbp-0x18],rax
   0x5555555748cd <remove_tree_node+126>:	jne    0x5555555748e1 <remove_tree_node+146>
   0x5555555748cf <remove_tree_node+128>:	mov    rax,QWORD PTR [rbp-0x18]
   0x5555555748d3 <remove_tree_node+132>:	mov    rax,QWORD PTR [rax+0x18]
[------------------------------------stack-------------------------------------]
0000| 0x7fffffffd6b0 --> 0x7fffffffd710 --> 0x7fffffffd760 --> 0x7fffffffd780 --> 0x7fffffffd7a0 --> 0x7fffffffd7c0 (--> ...)
0008| 0x7fffffffd6b8 --> 0x555555793b37 ('@' <repeats 200 times>...)
0016| 0x7fffffffd6c0 --> 0x0
0024| 0x7fffffffd6c8 --> 0x0
0032| 0x7fffffffd6d0 --> 0x7fffffffd710 --> 0x7fffffffd760 --> 0x7fffffffd780 --> 0x7fffffffd7a0 --> 0x7fffffffd7c0 (--> ...)
0040| 0x7fffffffd6d8 --> 0x555555574c46 (<unlink_hmu+383>:	nop)
0048| 0x7fffffffd6e0 --> 0x555555793b37 ('@' <repeats 200 times>...)
0056| 0x7fffffffd6e8 --> 0x55555577eea0 (0x000055555577eea0)
[------------------------------------------------------------------------------]
Legend: code, data, rodata, value
Stopped reason: SIGSEGV
0x00005555555748c5 in remove_tree_node (p=0x555555793b37 <global_heap_buf+85143>) at XYZ/wasm-micro-runtime/core/shared-lib/mem-alloc/ems/ems_alloc.c:45
45	    if (p == p->parent->right) {
#0  0x00005555555748c5 in remove_tree_node (p=0x555555793b37 <global_heap_buf+85143>) at XYZ/wasm-micro-runtime/core/shared-lib/mem-alloc/ems/ems_alloc.c:45
#1  0x0000555555574c46 in unlink_hmu (heap=0x55555577eea0 <global_heap_buf>, hmu=0x555555793b37 <global_heap_buf+85143>) at XYZ/wasm-micro-runtime/core/shared-lib/mem-alloc/ems/ems_alloc.c:124
#2  0x00005555555757af in gc_free_i_heap (vheap=0x55555577eea0 <global_heap_buf>, obj=0x555555799090 <global_heap_buf+106992>) at XYZ/wasm-micro-runtime/core/shared-lib/mem-alloc/ems/ems_alloc.c:507
#3  0x000055555555dc4f in mem_allocator_free (allocator=0x55555577eea0 <global_heap_buf>, ptr=0x555555799090 <global_heap_buf+106992>) at XYZ/wasm-micro-runtime/core/shared-lib/mem-alloc/mem_alloc.c:43
#4  0x000055555555ddab in bh_free_internal (ptr=0x555555799090 <global_heap_buf+106992>) at XYZ/wasm-micro-runtime/core/shared-lib/mem-alloc/bh_memory.c:134
#5  0x000055555555ddef in bh_free (ptr=0x555555799090 <global_heap_buf+106992>) at XYZ/wasm-micro-runtime/core/shared-lib/mem-alloc/bh_memory.c:283
#6  0x0000555555576510 in wasm_hash_map_destroy (map=0x555555780a68 <global_heap_buf+7112>) at XYZ/wasm-micro-runtime/core/iwasm/runtime/utils/wasm_hashmap.c:289
#7  0x000055555556d420 in wasm_loader_unload (module=0x55555577f1b0 <global_heap_buf+784>) at XYZ/wasm-micro-runtime/core/iwasm/runtime/vmcore-wasm/wasm_loader.c:1496
#8  0x000055555556d161 in wasm_loader_load (buf=0x55555577f138 <global_heap_buf+664> "", size=0x74, error_buf=0x7fffffffd900 "h\242\377\367\377\177", error_buf_size=0x80) at XYZ/wasm-micro-runtime/core/iwasm/runtime/vmcore-wasm/wasm_loader.c:1436
#9  0x00005555555594f5 in wasm_runtime_load (buf=0x55555577f138 <global_heap_buf+664> "", size=0x74, error_buf=0x7fffffffd900 "h\242\377\367\377\177", error_buf_size=0x80) at XYZ/wasm-micro-runtime/core/iwasm/runtime/vmcore-wasm/wasm_runtime.c:137
#10 0x000055555555802d in main (argc=0x1, argv=0x7fffffffda80) at XYZ/wasm-micro-runtime/core/iwasm/products/linux/main.c:196
#11 0x00007ffff7448b97 in __libc_start_main (main=0x555555557d8c <main>, argc=0x2, argv=0x7fffffffda78, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffda68) at ../csu/libc-start.c:310
#12 0x000055555555798a in _start ()

Valgrind
==5681== Memcheck, a memory error detector
==5681== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==5681== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==5681== Command: ./iwasm XYZ/wasm-micro-runtime/core/iwasm/products/linux/debug/triage/0x555555574962/PoC.wasm
==5681==
==5681== Conditional jump or move depends on uninitialised value(s)
==5681==    at 0x4C32CF9: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5681==    by 0x54799D1: puts (ioputs.c:35)
==5681==    by 0x10C04C: main (main.c:198)
==5681==

==5681==
==5681== HEAP SUMMARY:
==5681==     in use at exit: 0 bytes in 0 blocks
==5681==   total heap usage: 1 allocs, 1 frees, 1,024 bytes allocated
==5681==
==5681== All heap blocks were freed -- no leaks are possible
==5681==
==5681== For counts of detected and suppressed errors, rerun with: -v
==5681== Use --track-origins=yes to see where uninitialised values come from
==5681== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

Hi, pventuzelo, thanks a lot for your help to test and report so many security vulnerabilities. We tested some of the uploaded files and found that they are invalid wasm binary files, or the file format of them is invalid, e.g.:
$ wasm-objdump -s PoC.wasm
error: function body must end with END opcode
error: expected valid local type
error: unable to read float: f32.const value
error: unable to read string: section name
Actually these files should be rejected by wasm loader and should not be executed by wasm intepreter. Currently we have applied many integrity checks of wasm file in wasm loader, we will apply more in the future and make it more robust and secure, and fix the issues you report.
But it is not the goal of the product currently, we hope that the wasm file integrity is guaranteed by user, and the wasm file provided to wamr is with valid format. For example, user can add signature after generating the wasm file, and check the signature to ensure that it isn't modified before sending it to wamr.

Hi,
I understand your point of view but, even if some static checks are done by the wasm loader, some vulnerabilities in the interpreter can still happen since there is no complete validation of the processing data at runtime.
Do your "module signature" ensure that the module is valid or it only ensure that no bytecode modification have been done between compilation and execution?

Hi, yes, thanks a lot, some checks can only be done in interpreter, such as memory boundary check for load/store opcode, table elem index out of range for call_indirect, stack overflow check, integer divided by zero check, and so on. We added many checks in interpreter.
We are testing your issues, and basically fixed them, we will submit the code when test is done.
For module signature, you are right, it only ensures no bytecode modification is done after compilation.

Ok thanks, let me know when it's pushed on master ;)

Hi pventuzelo, many thanks, we have merged the patch, which should have fixed all the issues you found, could you help confirm it? If there are new issues found, please let us know, we are glad to resolve them.

Ok good, let me check and i will directly close the tickets ;)

Good for me ;)
Thanks for your work !


improve function argument sections

When I first read the docs, I think tuple was the correct way to pass multiple arguments, which is wrong based on https://facebook.github.io/reason/index.html#diving-deeper-curried-functions. I adjust the order of paragraphs to make it more clear.

index.html: refine function argument title

The section talks about use tuple or record as one argument to pass
into the function, instead of arguments of one function.

index.html: move currying function section before tuple/record arg

currying pattern simulates multiple arguments, and this is used more
commonly compared to tuple argument. Move this section before
tuple/record arg section to present important concepts first.

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at<EMAIL_ADDRESS>Thanks!

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

Looks reasonable, thanks!


decision log stream

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 39 (0.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.1%) to 9.928%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

pkg/handlers/decision_logs/stream.go
0
39
0.0%

Totals

Change from base Build<PHONE_NUMBER>:
-0.1%

Covered Lines:
316

Relevant Lines:
3183

💛  - Coveralls


Release version 0.0.6

Codecov Report
Patch and project coverage have no change.

Comparison is base (3e5b882) 100.00% compared to head (9a931d4) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #76   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            8         8
  Lines          351       351
  Branches        93        93
=========================================
  Hits           351       351

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Add support for pathlib.Path in talker settings with file picker

I have a slightly simpler way to fix this and I have some other changes I'm putting in as well.


Unable to expose inspect view with ngrok due to random resources raising status 400 and 503

I'm running inspect log viewer locally with inspect view where the viewer works well on localhost:7575 but I see strange failures when I export it with ngrok (ngrok http 7575)
GET https://<redacted>-6575-bc6b-521e-d227.ngrok-free.app/src/navbar/Navbar.mjs 400 (Bad Request)
WorkSpace.mjs:19
GET https://<redacted>-6575-bc6b-521e-d227.ngrok-free.app/src/samples/tools/SortFilter.mjs net::ERR_ABORTED 400 (Bad Request)
WorkSpace.mjs:25
GET https://<redacted>-6575-bc6b-521e-d227.ngrok-free.app/src/workspace/TaskErrorPanel.mjs net::ERR_ABORTED 400 (Bad Request)
WorkSpace.mjs:18
GET https://<redacted>-6575-bc6b-521e-d227.ngrok-free.app/src/samples/SamplesTools.mjs net::ERR_ABORTED 400 (Bad Request)

I'm able to open each of these URLs individually. If I refresh the page with the cache disabled, a different set of resources fail to load,
GET https://<redacted>-6575-bc6b-521e-d227.ngrok-free.app/src/components/ErrorPanel.mjs net::ERR_ABORTED 503 (Service Unavailable)
App.mjs:13
GET https://<redacted>-6575-bc6b-521e-d227.ngrok-free.app/src/components/AppErrorBoundary.mjs net::ERR_ABORTED 503 (Service Unavailable)

Another refresh,
GET https://<redacted>-6575-bc6b-521e-d227.ngrok-free.app/libs/bootstrap/css/bootstrap.min.css net::ERR_ABORTED 503 (Service Unavailable)
GET https://<redacted>-6575-bc6b-521e-d227.ngrok-free.app/libs/showdown.min.js net::ERR_ABORTED 400 (Bad Request)
SamplesTools.mjs:3
GET https://<redacted>-6575-bc6b-521e-d227.ngrok-free.app/src/samples/tools/EpochFilter.mjs net::ERR_ABORTED 400 (Bad Request)

I'm trying to share the Inspect Log Viewer with my team. Inspect's documentation mentions copying the directory www into the directory that has to be published. I tried that too but see the errors in the HTTP Server,
::1 - - [29/Jul/2024 21:55:35] "GET /src/samples/SampleScores.mjs HTTP/1.1" 200 -
::1 - - [29/Jul/2024 21:55:35] code 404, message File not found
::1 - - [29/Jul/2024 21:55:35] "GET /api/logs HTTP/1.1" 404 -
::1 - - [29/Jul/2024 21:55:35] "GET /favicon.svg HTTP/1.1" 200 -
::1 - - [29/Jul/2024 21:55:36] code 404, message File not found
::1 - - [29/Jul/2024 21:55:36] "GET /api/events?loaded_time=1722282935101&last_eval_time=0 HTTP/1.1" 404 -
::1 - - [29/Jul/2024 21:55:37] code 404, message File not found
::1 - - [29/Jul/2024 21:55:37] "GET /api/events?loaded_time=1722282935101&last_eval_time=0 HTTP/1.1" 404 -

@dragonstyle I think we need to not call the other api methods when we are in single file backend mode. Can we make a change to do this for the upcoming release?
@vcidst That should fix the standalone scenario.
As far as ngrok I can't really speak to what would be going on there.

@vcidst Could you share the Inspect version that you're using and also the urls that you are using? It seems like we are not properly detecting that we should be displaying in a single file mode, so I'm wondering whether you:

Are using a version before we introduced this feature
Maybe aren't forming the urls the way we expect (we use the presence of the log_file query parameter to use HTTP fetching to retrieve the log vs coordinating with Inspect directly)

@dragonstyle I think we need to not call the other api methods when we are in single file backend mode. Can we make a change to do this for the upcoming release?

The single file API already implements all the methods and no-ops the unneeded ones such as client_events.

In order for the viewer to work when hosted, you need to link directly to the log  files (it can't enumerate log files using simple HTTP), so it will only work for specific log files, using a url like:
https://<deployment url>/?log_file=logs/2024-07-18T09-00-04-04-00_bash_QuRMsu7hRUWrJjxe8xePLa.json
(either as a link, or as an iframe url, for example)

But in addition, we introduced the view hosting in v0.3.19 (currently not yet released to pypi). You can install this version directly from the repo using:
pip install git+https://github.com/ukgovernmentbeis/inspect_ai

I just updated the package and did two tests,
I ran the ngrok tunnel again to try the URL with the log file,
https://3001-2001-16b8-cb81-d800-3936-97c6-62cd-f27a.ngrok-free.app/?log_file=logs/2024-07-29T17-15-13+02-00_llm-judge_7mKaqQFWSv9Gn4nwesA4ok.json
I see similar errors on ngrok. Looking into nrgok's dashboard, I see these additional headers in one of the failed requests,
X-Ngrok-Rehydrate-Enriched-Error-Arg: addr:localhost:7575
X-Ngrok-Rehydrate-Enriched-Error-Arg: errorText:dial tcp <IP_ADDRESS>:7575: connect: connection reset by peer
X-Ngrok-Rehydrate-Enriched-Error-Code: 8012
X-Ngrok-Rehydrate-Enriched-Error-Proto: message: "Traffic was successfully tunneled to the ngrok agent, but the agent failed to establish a connection to the upstream web service at localhost:7575." legacy_number_code: 8012 grpc_status_code: 3 http_status_code: 400 stack: <   function: "0x0" > code: "8012"

I also ran the HTTP Server on port 8000, open one of the logs with http://localhost:8000/?log_file=logs/2024-07-29T17-15-13+02-00_llm-judge_7mKaqQFWSv9Gn4nwesA4ok.json but see a 404 error,
Error: Error: 404: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">   <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <title>Error response</title>
Error response

Error code: 404

Message: File not found.

Error code explanation: HTTPStatus.NOT_FOUND - Nothing matches the given URI.
   )
at Error: Error: 404: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">

        <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
        <title>Error response</title>

Error response

Error code: 404

Message: File not found.

Error code explanation: HTTPStatus.NOT_FOUND - Nothing matches the given URI.

)
    at getContents (http://localhost:8000/src/api/api-http.mjs:53:23)
    at async Object.eval_logs (http://localhost:8000/src/api/api-http.mjs:66:24)
    at async http://localhost:8000/App.mjs:137:22

By the way earlier today, I installed inspect_ai on replit, copied logs, ran inspect view and deployed it. That works completely fine and don't see any errors over there

By the way, possibly a digression. I tried to run inspect view --debug but it seems to be either stuck or taking way too long (waited ~5 minutes)
❯ inspect view --debug
Waiting for debugger attach

So I'm running inspect view instead

I would focus on the local example first until you get that working. My guess is that there is something wrong with the log_file url. For example, the + needs to be url encoded, so I think the correct url is:
http://localhost:8000/?log_file=logs/2024-07-29T17-15-13%2B%0A02-00_llm-judge_7mKaqQFWSv9Gn4nwesA4ok.json
Once the local version is working, perhaps give ngrok another try, though I don't really know too much about that :(.

Possibly a digression, I tried to run inspect view --debug but it seems to be either stuck or taking way too long (waited ~5 minutes)

This is because the --debug flag actually tells the viewer to wait for a debugger to attach (until a debugger attaches it just waits)

@dragonstyle You're right, I just copied the file path and missed url encoding! The local server works perfectly, thank you 🙏🏽

For the record, ngrok's URL didn't work even with the encoded log file name. But it looks like that's something unique on ngrok's end and not relevant for inspect_ai

Thanks for the timely / persistent followup and glad at the least the basics are operational!


[v3.0.0] Documentation: GeoObjects, Controls

v3.0.0 in the next branch is getting close to release. One of the finishing steps is:

Add separate documentation pages for all GeoObjects and Controls following the same structure that is used for already existing ones

[x] Map

GeoObjects (taken by @mmarkelov) (done! 🎉)

[x] GeoObject
[x] Placemark
[x] Polyline
[x] Rectangle
[x] Polygon
[x] Circle
[x] Clusterer
[x] ObjectManager

Controls

[x] Button
[ ] FullscreenControl (taken by @mmarkelov)
[ ] GeolocationControl (taken by @mmarkelov)
[ ] ListBox (taken by @mmarkelov)
[ ] ListBoxItem (taken by @mmarkelov)
[ ] RouteButton (taken by @mmarkelov)
[x] RouteEditor
[x] RoutePanel
[x] RulerControl
[x] SearchControl
[x] TrafficControl
[x] TypeSelector
[x] ZoomControl

If you want to help with documenting them, please mention which one you want to take 🙏

@gribnoysup I'll take Placemark to start

@mmarkelov if you have any issues or questions about how to approach, don't hesitate to open a [WIP] PR and we can discuss, or just ask here 👍

I will also take Polyline

I'll take all GeoObjects

@mmarkelov If you want to, I can give you collaborator access to the repo, so you don't need to maintain your fork and merge it with upstream all the time. Again, if you want to, for which account you would prefer to get this?

@gribnoysup It will be great! You can give it to mmarkelov account! Thanks!

I'll also take first 5 of Controls

@gribnoysup I got lots of errors with current next brunch. I suppose something wrong with react-live.
Here is log

@mmarkelov it seems that those are mostly warnings, and some of them are expected, for example, isOpen on DOM element and lineHeight on DOM element. This is caused by rebass passing some style-specific component props directly to the DOM nodes. But there is quite a lot of errors that I don't see locally or on the deployed build (as they are just warnings, deployed version doesn't show warnings in production mode). Can you push your changes in a separate branch so I can check what could be wrong there?

@gribnoysup I just pull current next branch and launch yarn run dev. Now I think that something maybe wrong with styles - cause I just haven't got map here

@gribnoysup I think something is wrong https://github.com/gribnoysup/react-yandex-maps/blob/1eb1c8ccc55ddbeb2fb76627305ebf26a3a6ef77/docs/components/LiveEditor.js#L26
here

@mmarkelov I think the issue is somewhere in the dependencies of the docs. I couldn't reproduce the issue before as I don't use yarn and package-lock handles locking of the dependencies in this project when npm is used. Yarn ignores package-lock file and some minor changes in dependencies are breaking the build, unfortunately. I installed yarn and reinstalled project dependencies with yarn and got exactly the same errors that you are getting. I reinstalled everything with npm again and all the issues disappeared. I'll try to figure out what dependency is causing the issue. In the meantime, it should be working for you, if you reinstall docs dependencies with npm 5+

@gribnoysup thank you! I should do it myself. It was fine just a few commits ago. I hope it help, I’ll also try to find it myself. Thanks as always!

@gribnoysup that is all fine with npm. Thanks!


Changed the model event in the belongsToMany function to saving

Changed the model event in the belongsToMany function to saving so that data can be added via the saved model event

It has to be ::saved so the user can attach resources on the Create view (I need the saved model's ID).
Can you explain more clearly why this is a blocker for you? Thanks!

The retrieved event will fire when an existing model is retrieved from the database. When a new model is saved for the first time, the creating and created events will fire. If a model already existed in the database and the save method is called, the updating / updated events will fire. However, in both cases, the saving / saved events will fire.

In my case, when I use the model event ::saved. I am adding value for a field, category from another field, by default


Added null checks to PartiesListener

Added some null checks to be sure that players are not null.

May I ask under what circumstances would the player be null?
Sent with GitHawk

Sure, every event is correctly marked with @NonNull and @Nullable for these cirmunstances:
onPartyCreate and onPartyDelete:

event.getCreator() can be null if the party is created via console
[1]

onPlayerJoin:

event.getInviter() can be null if the player join via /party join command
[1]

onPlayerLeave:

event.getKicker() can be null if kicked by console
Kicked player can be offline
[1]

[1]: Player uuid could miss inside server data, or even be offline (Parties get it via LastLoginAPI)

Makes sense to me.


refactor: impl From for StateTable

So that init state table can be reused by each stateful op.

Actually not easy, cuz now create StateTable we need Vnodes info, however it is not in StreamNode::internal_table but only Actor.


Modulate Sections — Improving updating or editing process for the website

Based on #52
I am thinking about changing how editing/updating content need to be done, should add a way to do it without any headless CMS (Netlify CMS), with _data subfolder, 11ty will convert it into arrays (collections), based on the name of the file
List of section that need to be Modulate

[x] #55
[x] #57
[x] #60
[x] #73
[x] Modulate Work Section — projects.json (need to be review again)

I don't think I need to convert the njk -based implementation to json -based implementation. It sound good back then, but now I don't think It's anymore


chore(molecule) Add topology test. Add windows process agent no error…

…s. Dump and archive topics content in files after test run
What does this PR do?
A brief description of the change being made with this pull request.
Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?

Looks good to me


Add 1rem top margin to CategoryTree component

Somehow the table of contents heading get messed up when I try browse the preview. Line height set to normal (from 150%) seems fixes it...

Hi thanks for the PR, but as mentioned above it looks a bit odd. It also needs to use the new css custom properties found here: https://github.com/svelte-society/sveltesociety.dev/blob/staging/src/lib/styles/root.css

@kevmodrome Can I look into this issue if the PR is not touched by the Original contributor?

@kevmodrome Can I look into this issue if the PR is not touched by the Original contributor?

Definitely! Go for it.

Closing due to inactivity, feel free to reopen if changes are made.


add XSD validation

Schematron is currently supported, but add the arguably more common XSD (XML Schema Definition) validation as well.

Added.  Using lxml to validate.
Unfortunately, lxml appears to bail at the first exception, and doesn't appear possible to capture other, "down file" exceptions.  But, a step in the right direction, and scaffolding is there if another XSD validation approach is found.

Closing.

What about this one? https://github.com/brunato/xmlschema

That was a good find, but as far as I can tell, still returns when the first error is met.


Bug: UA indicates we should show consent message even after user has already opted out

Intended behavior per the PDD: "If the reporting control flag ("reporting") is set to opt-out of reporting, then no notices should be shown in any tool."
Current behavior:
The current logic sets _showMessage to true for the first run of a Dash tool: https://github.com/dart-lang/tools/blob/main/pkgs/unified_analytics/lib/src/analytics.dart#L447. When a message is shown, the tool showing the message will set analytics enabled to true.
However, this doesn't take into account if the user has already run the command to disable analytics, which seems like a bug? Imagine this scenario:

User opens tool A and sees the analytics prompt. The user will be automatically opted into analytics collection for the second run of tool A.
User decides to disable analytics by running the command. For the subsequent runs of tool A, analytics will not be collected.
User opens tool B and sees the analytics prompt. User ignores prompt, and now the user will be opted into analytics again for the second run of tool B (and for usage of tool A since now analytics enabled = true).

This seems incorrect. If the user just opted out of analytics, we should not be prompting then again.
The code for shouldShowMessage just returns the value of _showMessage, which doesn't take the enabled state into account:
https://github.com/dart-lang/tools/blob/main/pkgs/unified_analytics/lib/src/analytics.dart#L516.
Should this be modified to return _showMessage && !_telemetrySuppressed? Not sure whether we should check _telemetrySuppressed or the value of telemetryEnabled, or both.
@christopherfujino

@andrewkolos can you work on this bug? It has pretty serious correctness implications for how we use analytics.

User opens tool A and sees the analytics prompt. The user will be automatically opted into analytics collection for the second run of tool A.
User decides to disable analytics by running the command. For the subsequent runs of tool A, analytics will not be collected.
User opens tool B and sees the analytics prompt. User ignores prompt, and now the user will be opted into analytics again for the second run of tool B (and for usage of tool A since now analytics enabled = true).

Could you clarify what the expected behavior is here? My personal interpretation is that the user should be opted into telemetry for tool B but not for tool A, as these are two separate tools. However, your description seems to imply that disabling telemetry for tool A should disable telemetry for any other tool that is run in the future.

I do agree that tool A's telemetry should not be re-enabled without the user explicitly enabling it. This is definitely a bug.

Actually, I didn't verify that this is even the case, so I am not even sure there is a bug here.

Could you clarify what the expected behavior is here? My personal interpretation is that the user should be opted into telemetry for tool B but not for tool A, as these are two separate tools. However, the issue description seems to imply that disabling telemetry for tool A should disable telemetry for any other tool that is run in the future.

The intent of unified_analytics is that there would be a single opt-in / opt-out state for all of Dash tools. When we show the analytics notice, we also set the reporting flag to true, and then a user is expected to manually opt out if they do not want analytics to be collected. The bug is coming from when we decide to show the notice and set the opt-in to true.
As the PDD currently stands "If the reporting control flag ("reporting") is set to opt-out of reporting, then no notices should be shown in any tool." This is what we are currently violating by showing the analytics notice in tool B in the example above.

From reading the code and doing some testing on a fresh VM, I don't think the prompt on the second tool re-enables telemetry.
I wrote a test to verify this: https://github.com/dart-lang/tools/blob/5997ca9544c31e0b5b466ff89f832dcc1c5cd6d1/pkgs/unified_analytics/test/unified_analytics_test.dart#L1301-L1303
I also ported this test to the 5.8.8 branch on my local checkout, and it still passed.
So I think the only bug here is that Analytics::shouldShowMessage will be true whenever you are running some tool for the first time[^1], when it should only be true the first time you are running any tool that uses unified_analytics.
[^1]: Or to be more technically precise, Analytics::clientShowedMessage hasn't been called.

@andrewkolos To 1) take a second pass over the unified_analytics code to be confident that the bug described in this issue is not present and then 2) sync up with kenzieschmoll

@andrewkolos To 1) take a second pass over the unified_analytics code to be confident that the bug described in this issue is not present and then 2) sync up with kenzieschmoll

Andrew and I looked at the code, and we believe that:

showing the consent message does not actually mutate the state of whether the user is opted in or out of unified analytics. It does mutate whether or not we will show the consent message the next time this tool is run.
per our current PDD, we believe that this is working as intended that we show the consent message once per tool (e.g. flutter_tools, dartdev, etc). Once we update our PDD, we can improve this to just show the consent message once per client.
the only time that a user who has opted out of analytics then gets opted in is if they explicitly choose to do so, via flutter --enable-analytics or dart --enable-analytics etc.


buttoninfo & damagecalc could be a non-embed menu tabbed together

i don't think we care about damagecalc


v1.x: Fix compilation of enable_if_t for scaled_integer/to_chars.h

Latest MSVC (16.8) gives big compile error explosion on this, without the added parenthesis it seems to be treating the < as part of the type/template rather than a less than.

@exjam thanks for the contribution!


redirect stdout to /dev/null to avoid unnecessary log files

What's the purpose of this PR
redirect stdout to /dev/null to avoid unnecessary log files
Which issue(s) this PR fixes:
Fixes #3272 #2459
Follow this checklist to help us incorporate your contribution quickly and easily:

[x] Read the Contributing Guide before making this pull request.
[x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Write necessary unit tests to verify the code.
[x] Run mvn clean test to make sure this pull request doesn't break anything.

Codecov Report

Merging #3471 (e2eab37) into master (ad63e14) will decrease coverage by 0.05%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #3471      +/-   ##
============================================
- Coverage     51.41%   51.36%   -0.06%
+ Complexity     2316     2314       -2
============================================
  Files           441      441
  Lines         13823    13823
  Branches       1408     1408
============================================
- Hits           7107     7100       -7
- Misses         6226     6233       +7
  Partials        490      490

Impacted Files
Coverage Δ
Complexity Δ

...work/apollo/biz/message/DatabaseMessageSender.java
56.25% <0.00%> (-8.34%)
6.00% <0.00%> (-2.00%)

...ework/apollo/internals/RemoteConfigRepository.java
86.25% <0.00%> (-3.13%)
24.00% <0.00%> (-1.00%)

.../apollo/internals/RemoteConfigLongPollService.java
78.31% <0.00%> (+1.20%)
29.00% <0.00%> (+1.00%)

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 843cd94...e2eab37. Read the comment docs.

Codecov Report

Merging #3471 (e2eab37) into master (ad63e14) will decrease coverage by 0.05%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #3471      +/-   ##
============================================
- Coverage     51.41%   51.36%   -0.06%
+ Complexity     2316     2314       -2
============================================
  Files           441      441
  Lines         13823    13823
  Branches       1408     1408
============================================
- Hits           7107     7100       -7
- Misses         6226     6233       +7
  Partials        490      490

Impacted Files
Coverage Δ
Complexity Δ

...work/apollo/biz/message/DatabaseMessageSender.java
56.25% <0.00%> (-8.34%)
6.00% <0.00%> (-2.00%)

...ework/apollo/internals/RemoteConfigRepository.java
86.25% <0.00%> (-3.13%)
24.00% <0.00%> (-1.00%)

.../apollo/internals/RemoteConfigLongPollService.java
78.31% <0.00%> (+1.20%)
29.00% <0.00%> (+1.00%)

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 843cd94...e2eab37. Read the comment docs.