Typed GDScript named enums can't be used as types

Godot version:

Godot master https://github.com/godotengine/godot/commit/4b549faaab40f09756b644d4ad4d9d63e3b5e70c
OS/device including version:

Windows 10
Issue description:

Typed GDScript doesn't let you use named enums as types.

I thought about this but currently enums are just shorthand for dictionary/constants, they are not a special type. Not sure how to implement it properly.

As a workaround, you can use int as the type hint for now.
@vnen would it be possible to implement a fallback type search based on the same logic that uses member variable suggestion? A challenge with that approach might be differentiating between variables and enums, but I'm not sure about that.

@mrzapp I'm not sure if I follow. Do you mean just showing the enum constants on code completion when assigning?

@vnen I was probably a bit quick with that idea. Take 2:
I don't think you need to check if the value is valid, C# doesn't do this either:
public class Program
{
	enum MY_ENUM {
		VALUE_1,
		VALUE_2
	}

	public static void Main()
	{
		MY_ENUM myEnum = (MY_ENUM)33; // <- This is valid
	}
}

It also accepts any int (if you cast it)
I think it would be perfectly reasonable to add enum declarations to the "script_type" tokens (if that makes sense, I admit I didn't read all of the code in the PR)

I agree with @mrzapp. Enum typed variables shouldn't be limited to the enum values only. Making them an int implicitly would allow saving enums to files and reading them later. It could optionally limit the var to a certain range. Would be great for suggestions anyway.

We can certainly make an enum-typed variable simply be an int, but then we take a stand to not allow other types (such as String as asked in #20988), nor do we make tagged unions (as asked in #15141).

@vnen Is that a big problem?
enum Test {
    TEST = "foobar"
}

func something(t: Test):
    print(t)

func _ready():
    something(Test.TEST)

If Godot could be able to detect the type of enum values, it could make the enum work as the type of the values.

But what if you have:
enum Test {
    STRING_VALUE = "foobar",
    INT_VALUE = 42
}

var my_var: Test

What is the type that my_var expects?

@vnen I don't know. An union?

@vnen @Soaku I don't mean to be a buzzkill, but I think the feature requested in #20988 is highly unorthodox. I may be wrong about this, but I've never seen a language that treats enum values as anything but integers, and it certainly adds unnecessary complexity for very little gain. The problem mentioned in that issue could be solved with a dictionary in any case.

I could understand the point of string enums, but adding to my previous reply, why would an enum allow mixed types? This would cause inconsistency and comparing two values in the enum could fail. For this, a separate enum should be created.

@Soaku GADT enums allow for mixed types, it can be quite useful.

I think we're not acknowledging the amount of work needed to make mixed type enums happen. If we settle on int-based enums for now, at least the problem that this issue was opened for (236 days ago ^^") will be solved. @vnen what is your opinion?

I don't see significant value in adding mixed-type enums, but I do see value in being able to treat Enums as user-defined types and being able to enforce a specific enum type as a function argument type if the user wishes. Even if you don't enforce ranges (which I don't think is typical anyways), it at least pushes the programmer to think about the intention of the enum type instead of passing an arbitrary integer around.

I would definitely like to have Enums be user defined types. I understand we can define them as ints at the moment because that is what they are under the hood. But I would like to enforce that a value getting passed into a function is indeed a reference to an enum.
For example if I had a function call like this:
if (player.canMove(Direction.Left)):
That function can never be considered "safe" to me because I can't enforce it on the other end:
#not valid code
func canMove(direction: Direction):

Being able to enforce that a parameter comes from a particular enum would be a good addition in my opinion.

As a (probably bad) suggestion, what if enums could be typed and then their type is inferred when attempted to be used in static typing?
enum Fruit:int { APPLE = 0, BANANA = 1, ORANGE = 2 }
var current_fruit:Fruit

or maybe enum(int) ...
Not great since obviously the error still exists, and you have to know about static typing to avoid it. Though I'd prefer this in lieu of leaving comments around saying that a function that expects an int is really expecting a specific enum. :)

Just stumbled upon this issue as I found the need for this in my code. Maybe in future versions of Godot it will be available. xD

@rafaelgdp Please don't bump issues without contributing significant new information; use the :+1: reaction button on the first post instead.

I think someone suggested above that the enum-as-type pattern is unorthodox, yet it is present in modern languages like typescript.
See this example from the TS docs:
enum Response {
    No = 0,
    Yes = 1,
}

function respond(recipient: string, message: Response): void {
    // ...
}

respond("Princess Caroline", Response.Yes)

The "enum-as-type" is quite common (often accepting everything of that type, like the example above from TS). I guess it's a start, but it doesn't check much - you could freely mismatch enums or pass invalid values. It would be nice to have true sum+product types like in Haskell:
-- compiler will check argument of type Bool to be either True or False,
-- nothing else is accepted (no random int)
data Bool = True | False

-- "enum" with values (I believe something similar is also in Scala in several forms)
data Shape = Circle Int | Box Int Int

I guess product types in the context of GDS would be typed Dictionaries (interfaces).
It's worth noting that even in TypeScript are unions, which can check if you are passing only allowed subset of other type (e.g. int, string) and are often used in place of enums because of better type checking:
type Bit = 0 | 1;
const b1: Bit = 0; // ok
const b2: Bit = 1; // ok
const b3: Bit = 2; // compilation error

type Animal = 'dog' | 'cat';
const a1: Animal = 'dog';
const a2: Animal = 'snake'; // compilation error

While I would love to see full algebraic data types ("enum"s with data like Shape above), I think for most users the sweet spot would be in fully typed unions (Bool, Bit and Animal examples).

I like how Rust or Haxe does that. You can have c-like enums:
enum Color {
    Red = 0xff0000,
    Green = 0x00ff00,
    Blue = 0x0000ff,
}

But also enums that contain different and more complex types:
enum Event {
    Init,
    AssetLoad = 0,
    AssetUnload = 1,
    KeyPress(char),
    Message(String),
    Click { x: int, y: int },
}

I think in the end its important how this works together with pattern matching. Sum types without pattern matching support are half as useful as they could be. If matching on the variant type of an enum is possible, this would be nice to have.
Javascript does not have runtime Typescript type information, so it cannot support matching on types. I don't know how that is with gdscript, how much type information it has or could have, but if matching on types would not be supported, doing as Typescript does with numeric enums and a union type could be a good way to go. I think its similar for Mypy.

Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine.
The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker.
If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance!

One, I would think it's a bug rather than enhancement, and two, isn't it covered in @vnen's rework?

@Zireael07 it is an enhancement, since currently enums in GDScript are more of a syntax sugar rather than a separate type. Also, I'm pretty sure this message is sent to most or all issues labeled "feature proposal".

It's not a bug because it's working as intended. But yes: I'll likely add enum as types in the new GDScript code.

@vnen Does the rewrite of GDScript also involve exposing the enums in GlobalScope by name?
If so, I may make note on this issue: https://github.com/godotengine/godot/issues/20015

Funny thing is, we can't use enums as a type like this:
var game_state : Enums.GameState
But we can use it like this:
export(Enums.GameState) var game_state

You also cannot use enums as parameter types. For example, I have a Type enum to designate the element type of an attack and a Terrain enum to designate the type of terrain, and am using it like func deal_damage(damage: int, type: Type, phy: bool, terrain: Terrain, ...) and I get the error The identifier "Type" isn't a valid type (not a script or class), or couldn't be found on base "self"., despite the enum being in the same file. Are there any plans to allow for this in the future?
Also in reference to the previous message by @chandujr, I had the opposite issue. I can use my enums Type and Terrain as the type definition of a variable but NOT as an export, which would also be a great feature to have, possibly a dropdown with the different values of the enum?

Update on my last message's second paragraph (wanted to add a new one rather than edit to keep context): So it turns out that Godot evaluates errors a little weirdly. Had the errors go on and off every now and then. When I made some changes, the errors would completely disappear without me even interacting with them in any way. When I fixed the function errors, after a while I got the same error on the variables. So ignore the response I had on that. I still couldn't use my enum as an export, though. Maybe I was just doing it wrong? Idk, I was doing export(Type) and export(Terrain).


Upsert seems to increment pk id by 3 in postgres

Bug description
1st of all I'm new to prisma, so it could be my error
Problem, if i upsert on a unique key, (with 3 columns) it increments the pk by 3 for each new record. This isn't breaking, but it is annoying!
How to reproduce

Expected behavior
the primary key auto increment should increase by 1
Prisma information

generator client {
  provider = "prisma-client-js"
}

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

/// This model contains row level security and requires additional setup for migrations. Visit https://pris.ly/d/row-level-security for more info.
model name {
  name_id                               Int           @id(map: "name_pk") @default(autoincrement())
  name                                  String        @db.VarChar
  male                                  Boolean       @default(false)
  female                                Boolean       @default(false)
  rating                                rating[]
  similar_similar_name_idToname         similar[]     @relation("similar_name_idToname")
  similar_similar_similar_name_idToname similar[]     @relation("similar_similar_name_idToname")
  source_name                           source_name[]
}

model source {
  source_id   Int           @id(map: "source_pk") @default(autoincrement())
  name        String
  url         String?       @db.VarChar
  description String?       @db.VarChar
  source_name source_name[]
}

model source_name {
  source_name_id Int    @id(map: "source_name_pk") @default(autoincrement())
  name_id        Int
  source_id      Int
  name           name   @relation(fields: [name_id], references: [name_id], onDelete: NoAction, onUpdate: NoAction, map: "source_name_fk")
  source         source @relation(fields: [source_id], references: [source_id], onDelete: NoAction, onUpdate: NoAction, map: "source_name_fk_1")
}

/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
model similar {
  similar_id                         Int  @id(map: "name_name_pk") @default(autoincrement())
  name_id                            Int
  similar_name_id                    Int
  name_similar_name_idToname         name @relation("similar_name_idToname", fields: [name_id], references: [name_id], onDelete: NoAction, onUpdate: NoAction, map: "name_name_fk")
  name_similar_similar_name_idToname name @relation("similar_similar_name_idToname", fields: [similar_name_id], references: [name_id], onDelete: NoAction, onUpdate: NoAction, map: "name_name_fk_1")

  @@unique([name_id, similar_name_id], map: "similar_un")
}

model session {
  session_id Int      @id(map: "session_pk") @default(autoincrement())
  user_id    Int
  hash       String   @db.VarChar(256)
  created    DateTime @default(now()) @db.Timestamp(6)
  expires    DateTime @default(dbgenerated("(CURRENT_TIMESTAMP + '14 days'::interval)")) @db.Timestamp(6)
  user       user     @relation(fields: [user_id], references: [user_id], onDelete: NoAction, onUpdate: NoAction, map: "session_fk")
}

model user {
  user_id         Int       @id(map: "user_pk") @default(autoincrement())
  username        String    @db.VarChar
  email           String    @unique(map: "user_un") @db.VarChar
  hash            String    @db.VarChar(256)
  date_created    DateTime  @default(dbgenerated("CURRENT_DATE")) @db.Date
  validated       Boolean   @default(false)
  validation_code String?   @db.VarChar(256)
  group           group[]
  rating          rating[]
  session         session[]
}

model rating {
  rating_id Int     @id(map: "name_rating_pk") @default(autoincrement())
  user_id   Int
  name_id   Int
  rating    Decimal @db.Decimal
  group_id  Int
  name      name    @relation(fields: [name_id], references: [name_id], onDelete: NoAction, onUpdate: NoAction, map: "name_rating_fk")
  user      user    @relation(fields: [user_id], references: [user_id], onDelete: NoAction, onUpdate: NoAction, map: "name_rating_fk_1")
  group     group   @relation(fields: [group_id], references: [group_id], onDelete: NoAction, onUpdate: NoAction, map: "rating_fk")

  @@unique([user_id, name_id, group_id], map: "rating_un")
}

model group {
  group_id      Int      @id(map: "group_pk") @default(autoincrement())
  name          String?  @db.VarChar
  owner_user_id Int
  user          user     @relation(fields: [owner_user_id], references: [user_id], onDelete: NoAction, onUpdate: NoAction, map: "group_fk")
  rating        rating[]
}

static async rateName(name_id: number, rating: number, group_id: number = 1): Promise<{ message: string, success: boolean }> {

    const user_id = AuthUser?.user_id || 0;

    if (user_id === 0) return { "message": "not logged in", "success": false };

    if (!Number.isInteger(name_id) || rating > 1 || rating < 0 || (!Number.isInteger(group_id) && group_id)) {
      return { "message": "invalid data", "success": false };
    }

    try {
      const result = await prisma.rating.upsert({
        where: { user_id_name_id_group_id: { name_id, user_id, group_id } },
        update: { rating },
        create: { name_id, user_id, group_id, rating }
      });
    } catch (e) {
      console.log(e);
      return { "message": "unable to update rating", "success": false };
    }
    return { "message": "success", "success": true };
  }

Environment & setup

OS: windows
Database: PostgreSQL/supabase
Node.js version: 18.16.0

Prisma Version
5.0.0

Are yu maybe supplying the name_id value that is used in create yourself to rateName? Where does that value come from? When you supply the primary key value that is usually to be auto incremented by the database, it usually just takes the value you provide instead of the value that would be next in the sequence. Possible or did I misunderstand?

Are yu maybe supplying the name_id value that is used in create yourself to rateName? Where does that value come from? When you supply the primary key value that is usually to be auto incremented by the database, it usually just takes the value you provide instead of the value that would be next in the sequence. Possible or did I misunderstand?

the rating_id (not specified in query) is incremented by 3 each time upsert adds a new record, name_id is a fk for a record in the name table.
for context: this structure is in support of a "team baby name picker" - the name table, is literally thousands of names, each user can rate each name in the context of a group

Yes, that makes more sense. Can you maybe create a minimal reproduction and put it on GitHub so we can look at it ourselves? Thanks.

I can confirm that I'm seeing the same behaviour in my application that also uses PostgreSQL. I have a DB table with only 238 records. I'm calling upsert on this table every time my app is deployed. There's only a single new record added once in a while. But the id of the latest record is already 11052. The previous one is 10986, then 9354, 8610, etc.
This is just a small table but I have others with millions of records where I will run out of possible values in INTEGER type over time unless this bug is fixed.

I couldn't reproduce neither with 5.0.0 nor with latest main with the provided schema and query. One related thing I could see was that the initial value of rating_id jumped right to 2 in an empty database on the first upsert, but I can't reproduce this again after resetting the db 😕
Further values were always incremented by one each time I tried.

Here's a simple reproducer that clearly demonstrates this bug: https://github.com/RBFLabs/bug-reproducers/tree/main/prisma/prisma/postgres-upsert-increment

@livthomas indeed, I can reproduce this with your example. However, if you look at the logged queries, Prisma does not create the new ID, the database does:
prisma:query INSERT INTO "public"."entity" ("slug") VALUES ($1) ON CONFLICT ("slug") DO UPDATE SET "slug" = $2 WHERE ("public"."entity"."slug" = $3 AND 1=1) RETURNING "public"."entity"."id", "public"."entity"."slug"

Apparently Postgres advances the sequence each time an INSERT statement is executed regardless of whether a new row was inserted or not. In fact, this happens even with the regular INSERT statement (e.g. when the row is not inserted due to the constraint violation) and not just with INSERT ... ON CONFLICT:
$ pgcli postgres://prisma:prisma@localhost:5432/repro-current
Server: PostgreSQL 10.21 (Debian 10.21-1.pgdg90+1)
Version: 3.5.0
Home: http://pgcli.com
repro-current> select * from entity;
+----+------+
| id | slug |
|----+------|
| 1  | 1    |
| 3  | 2    |
| 6  | 3    |
+----+------+
SELECT 3
Time: 0.017s
repro-current> insert into entity (slug) values ('1') on conflict (slug) do nothing returning id, slug;
+----+------+
| id | slug |
|----+------|
+----+------+
INSERT 0 0
Time: 0.016s
repro-current> insert into entity (slug) values ('4') on conflict (slug) do nothing returning id, slug;
+----+------+
| id | slug |
|----+------|
| 8  | 4    |
+----+------+
INSERT 0 1
Time: 0.018s
repro-current> insert into entity (slug) values ('1');
duplicate key value violates unique constraint "entity_slug_key"
DETAIL:  Key (slug)=(1) already exists.
Time: 0.009s
repro-current> insert into entity (slug) values ('5') returning id, slug;
+----+------+
| id | slug |
|----+------|
| 10 | 5    |
+----+------+
INSERT 0 1
Time: 0.014s

I can see how this can be problematic in scenarios where upsert happens to update more often than insert, but it doesn't look specific to Prisma in any way, and the same problem would happen when using another ORM or writing the SQL queries by hand, wouldn't it? Do you have any suggestion about what you'd prefer Prisma to do here?

@aqrln Thanks for looking into this!
Couldn't Prisma use a different SQL query? The following one would bypass this problem:
INSERT INTO "public"."entity" ("slug")
  SELECT $1 WHERE NOT EXISTS (SELECT FROM "public"."entity" WHERE "slug" = $2)
  RETURNING "public"."entity"."id", "public"."entity"."slug"

This would probably be only possible if update field is left empty which is quite common.

Some explanation on how this is "by design" in PostgreSQL:
https://stackoverflow.com/a/37206177/1345244
Note that "The only thing a sequence guarantees is that it never generates the same number twice."

@livthomas the problem with your suggested query is that it may fail with unique constraint violation on concurrent insert as there is a race condition: a new record with the same "slug" may be inserted after the SELECT subquery but before the INSERT main query.
You can reproduce it fairly easily: start a bunch of parallel threads or processes (e.g. as much as you have parallel workers in postgres), open a separate connection in each of them and run a loop that tries to upsert records with the same slug in parallel. You'll run into errors right away:
DETAIL: Key (slug)=(0) already exists.
db error: ERROR: duplicate key value violates unique constraint "entity_slug_key"
DETAIL: Key (slug)=(0) already exists.
db error: ERROR: duplicate key value violates unique constraint "entity_slug_key"
DETAIL: Key (slug)=(1) already exists.
db error: ERROR: duplicate key value violates unique constraint "entity_slug_key"
DETAIL: Key (slug)=(1) already exists.
db error: ERROR: duplicate key value violates unique constraint "entity_slug_key"
DETAIL: Key (slug)=(2) already exists.
db error: ERROR: duplicate key value violates unique constraint "entity_slug_key"
DETAIL: Key (slug)=(2) already exists.
db error: ERROR: duplicate key value violates unique constraint "entity_slug_key"
DETAIL: Key (slug)=(3) already exists.
db error: ERROR: duplicate key value violates unique constraint "entity_slug_key"
DETAIL: Key (slug)=(5) already exists.
db error: ERROR: duplicate key value violates unique constraint "entity_slug_key"
DETAIL: Key (slug)=(6) already exists.

This will not happen with INSERT ... ON CONFLICT though.

I'm going to go ahead and close this issue as I believe it is not a bug. The way upsert is implemented in Prisma (i.e. which SQL query it produces) is IMO how most users would expect it to work in most cases, and other alternatives would come with correctness or performance implications in general case. The fact that the sequence works like that in Postgres is not something we control.
If it's critical to use sequential IDs and ensure they are contiguous, and it is acceptable to trade off some performance for it, it's always possible to use different queries more appropriate for a specific use case in a transaction with sufficient isolation level from within user code.
Please open kind/feature or kind/improvement issues if you see how Prisma could help with this, or if it could generate better or more appropriate queries in specific cases.
Also please let me know if you believe this was a mistake and this issue should be reopened.

@livthomas Do you maybe want to open an issue over at https://github.com/prisma/docs, optimally with a suggestion on where such a mention would fit in our documentation? Thanks.


Include CI agents 6 - 8 in delete ephemeral interface data script

We now have additional CI agents so we're quickly building up junk in
our graphite stats from veth and br interface databases.

Let's just do https://github.com/alphagov/govuk-puppet/pull/6949 instead

@surminus yup that looks better 👍


Reland Activate InkSparkle on CanvasKit

Description
This PR activates the M3 InkSparkle splash animation on Android + CanvasKit.
This is a reland for https://github.com/flutter/flutter/pull/138545 which was reverted due to a Flutter Gallery integration test failure.
The failure which lead to the revert was reproducible as described in https://github.com/flutter/flutter/issues/143075.
I'm no more able to reproduce this error locally.
The root issue was probably fixed in https://github.com/flutter/engine/pull/49754.
Related Issue
Fixes https://github.com/flutter/flutter/issues/138487
Tests
Updates several existing tests.

Unfortunately, we're now back to the error message we got some months ago, see https://github.com/flutter/flutter/pull/138545#issuecomment-1814639943
Looks like this error was just hidden by the one fixed in https://github.com/flutter/engine/pull/49754.
I will have a closer look to this error and comment soon.

Closing this PR for the moment because:

Some work is needed on the flutter tools side to get the shaders asset being loaded in web tests (see https://github.com/flutter/flutter/pull/144597#issuecomment-2090387625).
The recent isSkwasm flag should probably also be used to activate the ink sparkle when it is possible.


Add test of Monte Carlo results

Codecov Report

Merging #137 into master will increase coverage by 16.18%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           master     #137       +/-   ##
===========================================
+ Coverage   82.41%   98.59%   +16.18%
===========================================
  Files          31       31
  Lines         927      927
===========================================
+ Hits          764      914      +150
+ Misses        163       13      -150

Impacted Files
Coverage Δ

src/EquityWeighting.jl
92.3% <0%> (+5.76%)
:arrow_up:

src/GDP.jl
100% <0%> (+7.14%)
:arrow_up:

src/ClimateTemperature.jl
100% <0%> (+10.25%)
:arrow_up:

src/SulphateForcing.jl
100% <0%> (+11.76%)
:arrow_up:

src/AdaptationCosts.jl
100% <0%> (+12.3%)
:arrow_up:

src/CO2cycle.jl
100% <0%> (+12.82%)
:arrow_up:

src/SLRDamages.jl
97.43% <0%> (+17.94%)
:arrow_up:

src/SeaLevelRise.jl
100% <0%> (+19.04%)
:arrow_up:

src/mctools.jl
100% <0%> (+20%)
:arrow_up:

src/Discontinuity.jl
95.45% <0%> (+20.45%)
:arrow_up:

... and 4 more

Continue to review full report at Codecov.

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

I'm not sure why the checks are failing on the last commit - all the tests seem to pass in runtests.jl


Smarter integration tests timeouts

Right now we have an overall timeout of 30m on the integration tests. The timeout is sane because sometimes we have to bring up a cluster, which may take up to 5-10m, plus the tests themselves which may take up to 5m.
The problem is that if the integration tests are broken, they take 30m to fail. Since Jenkins currently only does one job at a time, this means that if a broken PR triggers a few builds, Jenkins can be down for hours. This shouldn't happen.
The timeout should start counting from the point where the cluster is ready. Then the timeout can be lowered to something like 10m, since the tests should never take more than 5m. They usually take around 2m as the model takes roughly 1m to gather up stats.
This way, Jenkins would be stuck for a third of the time it usually would.
CC @vishh

At times, we upgrade the test cluster version. That is now tied to the
integration tests themselves for the sake of ease. If we separate cluster
maintenance from integration testing, we can lower the timeout and also
possibly run multiple tests in parallel (each tests needs its own
namespace).
On Mon, Sep 28, 2015 at 3:58 PM, Daniel Martí<EMAIL_ADDRESS>wrote:

Right now we have an overall timeout of 30m on the integration tests. The
timeout is sane because sometimes we have to bring up a cluster, which may
take up to 5-10m, plus the tests themselves which may take up to 5m.
The problem is that if the integration tests are broken, they take 30m to
fail. Since Jenkins currently only does one job at a time, this means that
if a broken PR triggers a few builds, Jenkins can be down for hours. This
shouldn't happen.
The timeout should start counting from the point where the cluster is
ready. Then the timeout can be lowered to something like 10m, since the
tests should never take more than 5m. They usually take around 2m as the
model takes roughly 1m to gather up stats.
This way, Jenkins would be stuck for a third of the time it usually would.
CC @vishh https://github.com/vishh
—
Reply to this email directly or view it on GitHub
https://github.com/kubernetes/heapster/issues/618.

It seems to be not a big problem, so closing the issue


Flaky http tests tyrian.HttpTests

They are pretty slow and fail intermittently. Here for example the HEAD test passed, but I've seen it fail too, despite no code changes in that area.
tyrian.HttpTests:
  + HEAD 1.33s
  + POST 1.09s
  + PUT 3.28s
  + PATCH 0.40s
  + DELETE 1.65s
==> X tyrian.HttpTests.GET with headers 0.93s munit.ComparisonFailException:

Annoyingly I can't replicate this now. Will leave the issue open a bit longer...

Seems like the tests I added 😞 I wonder if httpbin was having issues at the time? That's the downside of depending on an external service for the unit tests...

Yeah it's being flaky again this morning - no worries though, it's still a massive improvement to have tests for this stuff!
I think maybe I'll just have to switch httpbin out for some sort of mock when I get a chance.

I've disable the tests for now and left the following comment in the code while I have a think about what to do next:
    // These tests work great, but http://httpbin.org is unreliable, it seems.
    // So we either need an HTTP mock server compatible with Scala.js, or to use
    // containers (I'd rather not, but...). In the meantime these failing tests
    // are lowering build confidence, so I've disabled them.

I do want to bring them back though! Just not quite sure how best to proceed. httpbin is available as a Docker image, but I really dislike docker. :yum:

Understandable, I also thought about some sbt magic that would start the httpbin container just for the tests but I didn't like the idea and my sbt knowledge is also questionable. I think @armanbilge had some fancy setup in their project with some simple http4s server running only for the tests or something? Maybe we can make an http4sbin 😅

http4sbin

The thought crossed my mind... 😄

I happened to be manually testing an http call to httpbin this morning and it was a bit slow. I wonder if we could get away with just having retries with a backoff policy...

Were you thinking of adding the retry policy to the API itself or just for the tests?


Unable to find VAE during start up with this extension enabled.

Couldn't find VAE named clearvae_variant.safetensors; using None instead
Applying scaled dot product cross attention optimization.
Textual inversion embeddings loaded(7): bad_prompt_version2-neg, badhandv4, badv5, easynegative, ng_deepnegative_v1_75t, pureerosface_v1, ulzzang-6500-v1.1
Model loaded in 2.1s (load weights from disk: 0.4s, create model: 0.2s, apply weights to model: 0.8s, apply half(): 0.3s, move model to device: 0.4s).
To create a public link, set share=True in launch().
Startup time: 8.4s (import torch: 0.9s, import gradio: 0.6s, import ldm: 0.3s, other imports: 1.4s, load scripts: 3.4s, create ui: 1.6s, gradio launch: 0.1s).
100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:02<00:00,  8.46it/s]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 20/20 [00:00<00:00, 31.17it/s]
Loading VAE weights specified in settings: D:\SD\WebUIX\models\VAE\ClearVAE_NansLess1.safetensors0:00<00:00, 35.61it/s]
Applying scaled dot product cross attention optimization.
VAE weights loaded.
Loading VAE weights specified in settings: D:\SD\WebUIX\models\VAE\clearvae_variant.safetensors
Applying scaled dot product cross attention optimization.
VAE weights loaded.
Inside WebUI will show the correct "clearvae_variant" as selected from dropdown, but it's not applied, until switch made to different vae and back. Have tested with this extension disabled and no error. have isolated it down to this extension, built-in + this = cannot find vae message.

ok, i think it should be fixed now.

still happening even after latest commit

am i missing something?

set vae to something specific in settings
restart server
observe that vae is loaded on startup

anyhow, start webui --debug and post log AFTER line "Entering start sequence"

sorry for not getting it is this an argument? because showing up as not a launch.py argument

yes, its a command line argument - just running webui --debug should be enough, its definitely a launch.py argument:
what version are you on? this was added quite some time ago...

i'm using a fork,
https://github.com/anapnoe/stable-diffusion-webui-ux
commit d6b4aeb
Windows 11,

that is different! if you're using a fork, report issue there. that fork is not up to date with this repo. it will be, but its not yet.


Implement support to SecXmlExternalEntity inside libmodsecurity

More information about SecXmlExternalEntity can be found at ModSecurity reference manual: https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual

Closed. f989ecd5cb73046ef4a64b032eb6bc8d737c520c


bump go version to 1.16 and update dependencies.

Signed-off-by: Mohamed Eldafrawi<EMAIL_ADDRESS>

Just to be aware go 1.16 has some module handling changes. So if you update your local go version a go get will look quite a bit different :)
https://blog.golang.org/go116-module-changes
Generally updating is a good idea once we upgrade the kubernetes version https://github.com/longhorn/longhorn/issues/2757
@meldafrawi please also create a Task issue in the longhorn/longhorn repo and reference it here as part of the PR.


Navigation: Scroll to select assertion

The suite consistently fails in Firefox locally:
× firefox on mac 20.3.0 - NavigationTests - following a same-origin link to a named anchor (0.309s)
    AssertionError: Unspecified AssertionError
      at NavigationTests.test following a same-origin link to a named anchor @ src/tests/functional/navigation_tests.ts:84:9
      at runMicrotasks @ anonymous
      at processTicksAndRejections @ internal/process/task_queues.js:93:5
      at async NavigationTests.runTest @ src/tests/helpers/intern_test_case.ts:43:6

This commit adds an assertion message to the test for better failure
state communication.

Hmm, I'm surprised to see this passing in CI. It's failing very consistently when I run the suite locally.

Closing in favor of https://github.com/hotwired/turbo/commit/5a9f437be2a4ff47f255b8c5e65d921440513c34.


WIP: fix antimeridian queries via second r-tree

Add a second r-tree indexed with extents in the range [0, 360] and use that r-tree when the extent query crosses the antimeridian.
resolves #468

This is marked as WIP because it should not be merged until it is compared with the other solution PR.

Closing because we are going with #470 instead.


not a question, but in 1.21~ where was theMinecraft etc relocated

all of these things e.g:
theMinecraft
thePlayer
playerController
theWorld
etc are no longer where they used to be.

mappings change based on Mojang's changes, so that's expected
I can't point you to equivalent members as I don't know where those were in the first place

mappings change based on Mojang's changes, so that's expected
I can't point you to equivalent members as I don't know where those were in the first place

they were located at net/minecraft/client/Minecraft

and in what version?


Anchor Links Do Not Work on Mobile Phones

Challenge Build a Personal Portfolio Webpage has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
The project specifies that you must be able to"navigate to different sections of the webpage by clicking buttons in the navigation."
This is not possible when using Codepen on a browser on a mobile phone.
I have created links to the various sections of my page as specified in the project objectives.

BIO

WORK

CONTACT

I then created anchor points using IDs in my page

Unfortunately, the Bio link does not work when I test the page on my mobile phone. I believe this has to do with the Codepen application and its limits. I have not seen any information on Free Code Camp about how to work around this issue. I have tried using the target="_self" and that does not work either.
For now I will simply move on, knowing that my links will only work on the desktop and hoping that were I to actually build a site not on CodePen, that the anchor links would work.
It would be nice to specify this "hiccup" on the project information page.

I too faced same problem. It's best to work on a computer Mobile browser doesn't support all symbols so thes problems happen. Try it on chrome in your computer it will be fine

I'm facing the same issue. How have you fixed it?


[Question] How to use Github Credentials

I read the README but it still unclear how can I use the Environment variables.
git {
    fetch 'https://example.com/repository.git', {
        dir "$rootDir/gradle/scripts"
        tag 'v1.2.3'
        username "$System.env.GIT_GITHUB_USERNAME"
        password "$System.env.GIT_GITHUB_PASSWORD"
    }
}

Is it right approach, as by default it doesn't pick-up the environment variable credentials ? Can you please help me what am I missing here?

Looks like your groovy code to get environment variables is not correct. First of all if you have a complex expression you need to use curly brakets in your string interpolation: "${System.env.GIT_GITHUB_USERNAME}". Though I don't think you need to use string interpolation at all here.
My another concert is with the way you are accessing env variable. I think it should be something like this instead: System.getenv()['GIT_GITHUB_USERNAME'].
Also note that you can just use authGroup parameter in this casem like this: authGroup 'github'. This way the plugin wiill automatically look for GIT_GITHUB_USERNAME and GIT_GITHUB_PASSWORD env variables.

Perfect!!!, I was looking for authGroup 'github'
My initial impression was, this plugin will automatically read the ENV variables directly, i.e without authGroup e.g. GIT_GITHUB_USERNAME


[BUG] pylips with set apiv is slow compared to curl

Describe the bug
pylips with correct set apiv (6) is slow compared to bare metal curl.
See results meassured with time:

time curl -X POST --digest --insecure -v -u USER:PW -d '{"key":"VolumeUp"}' https://192.168.0.XXX:1926/6/input/key

Result:

real    0m0.278s
user    0m0.132s
sys     0m0.030s

and here pylips witzh teh same request:
time python3 pylips.py --command volume_up
Sending POST request to https://<IP_ADDRESS>:1926/6/input/key
Request sent!
{"response": "OK"}

real    0m1.082s
user    0m0.903s
sys     0m0.056s

To Reproduce
see above
Expected behavior
pylips is as fast as curl
Additional context
Maybe pathon3 is the overhead here?
Is there anything i can try to debug the issue?

Seems to be an python2/3 issue.
Importing the modules takes long.
I have removed all code from pylips.py and just leaved the imports in there, the delay with time on running the script is the same.
So it's not an pylips issue!
Will go the mqtt way which is much faster on my first tests.
Closing this now.


perf: cache empty optimizer result

Description
When an app doesn't have dependencies, we have been dropping the empty optimization result (after include+scanner optimization). This means that for these apps, the scanner is always run. Even if an app without deps is rare, I think we should still cache the empty results. This also affects warm start benchmarks for apps like vite-dev-server-perf

What is the purpose of this pull request?

[x] Bug fix
[ ] New Feature
[ ] Documentation update
[ ] Other

/ecosystem-ci run


Kivy application doesn't work correctly if I use pynput global hotkeys

Software Versions

Python: 3.10.4
OS: Ubuntu 21.10
Kivy: v2.1.0
Kivy installation method: Linux Pip + pyenv + poetry

Describe the bug
When I run the app everything looks fine but no label is shown and I am unable to close the app with a single click of the close button. After multiple attempts of closing the window, I get a python not responding error.
Expected behavior
It should work with pynput without any errors.
To Reproduce
A short, runnable example that reproduces the issue with latest kivy master.
Code and Logs and screenshots
from kivy.app import App
from kivy.uix.label import Label
from pynput import keyboard

class MyApp(App):
    def open_window(self):
        print(f"Key pressed...")
        self.root_window.show()

    def build(self):
        return Label(text="Hello")

    def on_start(self):
        self.root_window.hide()

        with keyboard.GlobalHotKeys({"<ctrl>+<alt>+h": self.open_window}) as h:
            h.join()

if __name__ == "__main__":
    MyApp().run()

Additional context
Some screenshots of my app:
Image 1
Image 2
Stackoverflow Question

Does that join a thread in the middle of on_start()? Uh, well, that's not a good idea.


Fix wrong assertion in create_core_token

Thanks for your contribution.
The assertion condition did indeed need to be core_symbol.decimals() == 4. However, the other lines needed to continue using the core_symbol provided as a function argument because one of the tests (eosio_system_tests/votepay_transition2) required using SYS rather than TST as the core token symbol.
Because of the rebasing issue with the current PR, I have pulled the relevant one-line change in PR #256.


Remove has-ansi and strip-ansi dependencies

I never use them and in hindsight it was a mistake to bundle them. They're only useful in some instances and then you can just require them directly.

@jbnicolai Maybe we should require('util').deprecate them in a minor release? Or is that too annoying for users?

That's probably annoying, depending on how many are making use of them.

Yea, kinda annoying.

Ok, it will be a major release anyways, so let's just drop doing that.

Yeah, let's go with a major for that. Seems nicer towards the users


Websites to Cite in the ReadMe

https://ampersandtutorials.com/materialize-css/open-modal-on-page-load/

Celeste Bradley Moore (TA): assisted Nico with coding for the song and image and marrying them and getting images to show up.  Approx lines 75-105 in html

LoveQuiz API - https://rapidapi.com/ajith/api/love-calculator

CSS Framework: https://materializecss.com/

90s Background: https://www.freepik.com/free-photos-vectors/90s-background


Not always joining clan chat

In EnhancedChat Branch, haven't checked master yet, user doesn't always join clan chat.

https://gist.github.com/Cheyans/b7a3ec61395fc7789bf4


net/http: returned typed error when proxy connection fails

Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
$go version
go version go1.6.2 darwin/amd64
What operating system and processor architecture are you using (go env)?
$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.6.2/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.6.2/libexec/pkg/tool/darwin_amd64"
GO15VENDOREXPERIMENT="1"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"
What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
package main

import (
	"fmt"
	"net"
	"net/http"
	"net/url"
	"time"
)

func main() {
	proxy := "http://<IP_ADDRESS>:80"
	tr := &http.Transport{
		Proxy: func(*http.Request) (*url.URL, error) {
			return url.Parse(proxy)
		},
		Dial: (&net.Dialer{Timeout: 500 * time.Millisecond}).Dial,
	}
	c := http.Client{Transport: tr}
	req, _ := http.NewRequest("GET", "http://golang.org", nil)
	_, err := c.Do(req)
	uerr, ok := err.(*url.Error)
	if ok {
		nerr, ok := uerr.Err.(*net.OpError)
		fmt.Println(ok, nerr)
	}
}

What did you expect to see?
true, http://<IP_ADDRESS>:80: dial tcp <IP_ADDRESS>:80: i/o timeout".

I could find the Op of the error would be dial.
net/http/transport.go: 765 "err = fmt.Errorf("http: error connecting to proxy %s: %v", cm.proxyURL, err)".
That rewrites the error, and the details of the error are missing
What did you see instead?
false <nil>

Hey guys, if everyone is OK with I'd like to take a stab at it


Update from bitcoin v24.1 to v25.1

Bitcoin v25.1rc1 was released on 2023-10-04 (https://github.com/bitcoin/bitcoin/tree/v25.1rc1).
We can safely assume that the churn upstream from rc1 to the final v25.1 release will not be very noisy, so it is time to start the preparatory work to upgrade the itcoin-core base from bitcoin v24.1 to bitcoin v25.1.
Known issues:

does not compile

blockencodings.cpp: In member function ‘ReadStatus PartiallyDownloadedBlock::FillBlock(CBlock&, const std::vector<std::shared_ptr<const CTransaction> >&)’:
blockencodings.cpp:205:51: error: operands to ‘?:’ have different types ‘PartiallyDownloadedBlock::CheckBlockFn’ {aka ‘std::function<bool(const CBlock&, BlockValidationState&, const Consensus::Params&, bool, bool)>’} and ‘bool(const CBlock&, BlockValidationState&, const Consensus::Params&, bool, bool, bool)’
  205 |     CheckBlockFn check_block = m_check_block_mock ? m_check_block_mock : CheckBlock;
      |                                ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from /usr/include/boost/test/test_tools.hpp:45,
                 from /usr/include/boost/test/unit_test.hpp:18,
                 from wallet/test/wallet_tests.cpp:28:
wallet/test/wallet_tests.cpp: In member function ‘void wallet::wallet_tests::ListCoinsTest::test_method()’:
wallet/test/wallet_tests.cpp:584:36: error: ‘GetAvailableBalance’ was not declared in this scope
  584 |     BOOST_CHECK_EQUAL(5050 * COIN, GetAvailableBalance(*wallet)); // ITCOIN_SPECIFIC: it was 50, but COINBASE_MATURITY=0 implies that in a 101 blocks chain we have 5050 * COIN balance
      |                                    ^~~~~~~~~~~~~~~~~~~

cant' run the tests since it does not compile yet

Upgrading https://github.com/bancaditalia/secp256k1-frost and vendorizing it was not handled at all yet

the local initialization via:
cd infra
./initialize-itcoin-local.sh
./continue-mining-local.sh

is not working.

5: files that between v24.1-itcoin-1 e v25.1rc1 were deleted, but that contained itcoin-specific patches that have to be reapplied somewhere else (we have information loss here):

src/wallet/test/availablecoins_tests.cpp
test/functional/rpc_fundrawtransaction.py

TODO: find where those files have been moved to, and integrate back itcoin modifications

little modifications that we should heve done in v24.1-itcoin-1 already:

test/functional/wallet_signrawtransactionwithwallet.py
in test_fully_signed_tx() change:
self.generate(self.nodes[0], 100 + 1) # ITCOIN_SPECIFIC: it was COINBASE_MATURITY + 100 but at least 100 blocks are required in test_signing_with_cltv.

to:
self.generate(self.nodes[0], 100 + 1) # ITCOIN_SPECIFIC: it was COINBASE_MATURITY + 1 but at least 100 blocks are required in test_signing_with_cltv.

in test/functional/test_framework/test_node.py change:
from test_framework.conftest import ITCOIN_PBFT_ROOT_DIR

to:
from test_framework.conftest import ITCOIN_PBFT_ROOT_DIR  # ITCOIN_SPECIFIC

v2:

the build is now working:
$ bin/bitcoind --version
Itcoin Core version v25.1.0rc1-itcoin-1
Copyright (C) 2019-2023 The Bank of Italy developers
Copyright (C) 2009-2023 The Bitcoin Core developers

make check fails. Current situation:

wallet/test/wallet_tests.cpp(662): error: in "wallet_tests/BasicOutputTypesTest": check available_coins.Size() == expected_coins_sizes[OutputType::UNKNOWN] has failed [101 != 1]

wallet/test/wallet_tests.cpp(663): error: in "wallet_tests/BasicOutputTypesTest": check available_coins.coins[OutputType::UNKNOWN].size() == expected_coins_sizes[OutputType::UNKNOWN] has failed [101 != 1]
2023-10-11T14:33:51.286312Z (mocktime: 2020-08-31T15:34:12Z) [test] [wallet/wallet.h:869] [WalletLogPrintf] [default wallet] Fee Calculation: Fee:0 Bytes:191 Tgt:0 (requested 6) Reason:"Fallback fee" Decay 0.00000: Estimation: (-1 - -1) 0.00% 0.0/(0.0 0 mem 0.0 out) Fail: (-1 - -1) 0.00% 0.0/(0.0 0 mem 0.0 out)
2023-10-11T14:33:51.286376Z (mocktime: 2020-08-31T15:34:12Z) [test] [wallet/wallet.h:869] [WalletLogPrintf] [default wallet] CommitTransaction:
CTransaction(hash=2154169602, ver=2, vin.size=1, vout.size=2, nLockTime=101)
    CTxIn(COutPoint(111704014a, 0), scriptSig=47304402203d97a75e025ddd, nSequence=4294967293)
    CScriptWitness()
    CTxOut(nValue=1.00000000, scriptPubKey=76a914d875dd2e0ed88047f02a1afc)
    CTxOut(nValue=49.00000000, scriptPubKey=76a9147d5925e4e65bc40e16881723)

wallet/test/wallet_tests.cpp(650): error: in "wallet_tests/BasicOutputTypesTest": check size == available_coins.coins[type].size() has failed [1 != 100]
2023-10-11T14:33:51.317924Z (mocktime: 2020-08-31T15:34:12Z) [test] [wallet/wallet.h:869] [WalletLogPrintf] [default wallet] Fee Calculation: Fee:0 Bytes:187 Tgt:0 (requested 6) Reason:"Fallback fee" Decay 0.00000: Estimation: (-1 - -1) 0.00% 0.0/(0.0 0 mem 0.0 out) Fail: (-1 - -1) 0.00% 0.0/(0.0 0 mem 0.0 out)
2023-10-11T14:33:51.317986Z (mocktime: 2020-08-31T15:34:12Z) [test] [wallet/wallet.h:869] [WalletLogPrintf] [default wallet] CommitTransaction:
CTransaction(hash=36aab314f2, ver=2, vin.size=1, vout.size=2, nLockTime=102)
    CTxIn(COutPoint(704f71c5ac, 0), scriptSig=47304402201d705be06ca00b, nSequence=4294967293)
    CScriptWitness()
    CTxOut(nValue=1.00000000, scriptPubKey=a9147fd8cd441ab0c66f46a8136f1b)
    CTxOut(nValue=49.00000000, scriptPubKey=a914958c38db29b055810b3ab5581c)

wallet/test/wallet_tests.cpp(650): error: in "wallet_tests/BasicOutputTypesTest": check size == available_coins.coins[type].size() has failed [1 != 99]
2023-10-11T14:33:51.348989Z (mocktime: 2020-08-31T15:34:12Z) [test] [wallet/wallet.h:869] [WalletLogPrintf] [default wallet] Fee Calculation: Fee:0 Bytes:185 Tgt:0 (requested 6) Reason:"Fallback fee" Decay 0.00000: Estimation: (-1 - -1) 0.00% 0.0/(0.0 0 mem 0.0 out) Fail: (-1 - -1) 0.00% 0.0/(0.0 0 mem 0.0 out)
2023-10-11T14:33:51.349052Z (mocktime: 2020-08-31T15:34:12Z) [test] [wallet/wallet.h:869] [WalletLogPrintf] [default wallet] CommitTransaction:
CTransaction(hash=58f384e078, ver=2, vin.size=1, vout.size=2, nLockTime=103)
    CTxIn(COutPoint(424a7d4eec, 0), scriptSig=4730440220270f65a5ad4a7e, nSequence=4294967293)
    CScriptWitness()
    CTxOut(nValue=49.00000000, scriptPubKey=00140a85442bc6be40176f21c5895d)
    CTxOut(nValue=1.00000000, scriptPubKey=001404164ae2d10ad0615127eab205)

wallet/test/wallet_tests.cpp(650): error: in "wallet_tests/BasicOutputTypesTest": check size == available_coins.coins[type].size() has failed [1 != 98]
2023-10-11T14:33:51.380354Z (mocktime: 2020-08-31T15:34:12Z) [test] [wallet/wallet.h:869] [WalletLogPrintf] [default wallet] Fee Calculation: Fee:0 Bytes:209 Tgt:0 (requested 6) Reason:"Fallback fee" Decay 0.00000: Estimation: (-1 - -1) 0.00% 0.0/(0.0 0 mem 0.0 out) Fail: (-1 - -1) 0.00% 0.0/(0.0 0 mem 0.0 out)
2023-10-11T14:33:51.380417Z (mocktime: 2020-08-31T15:34:12Z) [test] [wallet/wallet.h:869] [WalletLogPrintf] [default wallet] CommitTransaction:
CTransaction(hash=6d9e72ebba, ver=2, vin.size=1, vout.size=2, nLockTime=104)
    CTxIn(COutPoint(a929eb7f80, 0), scriptSig=4730440220599c6201f54180, nSequence=4294967293)
    CScriptWitness()
    CTxOut(nValue=1.00000000, scriptPubKey=5120fa1d480d1ade439f29e837a48f)
    CTxOut(nValue=49.00000000, scriptPubKey=512094cf7ff4a2f9f35fef029e27df)

wallet/test/wallet_tests.cpp(650): error: in "wallet_tests/BasicOutputTypesTest": check size == available_coins.coins[type].size() has failed [1 != 97]

*** 6 failures are detected in the test module "Bitcoin Core Test Suite"

the following functional tests are failing:
feature_signet.py                                        | ✖ Failed  | 3 s
interface_zmq.py                                         | ✖ Failed  | 1 s
itcoin_feature_control_block_time.py                     | ✖ Failed  | 1 s
itcoin_feature_num_nodes_differs_from_num_signers.py     | ✖ Failed  | 1 s
itcoin_feature_solution_independent_blockchain_1_of_2.py | ✖ Failed  | 1 s
itcoin_feature_solution_independent_blockchain_3_of_4.py | ✖ Failed  | 1 s
itcoin_feature_taproot_challenge_frost_pubkey.py         | ✖ Failed  | 4 s
itcoin_feature_taproot_challenge_frost_pubkey_tweaked.py | ✖ Failed  | 5 s
itcoin_rpc_testblockvalidity_1.py                        | ✖ Failed  | 1 s
itcoin_rpc_testblockvalidity_2.py                        | ✖ Failed  | 1 s
itcoin_zmq_itcoinblock.py                                | ✖ Failed  | 1 s
rpc_getblockfrompeer.py                                  | ✖ Failed  | 7 s
rpc_rawtransaction.py --legacy-wallet                    | ✖ Failed  | 9 s
rpc_scantxoutset.py                                      | ✖ Failed  | 1 s
rpc_txoutproof.py                                        | ✖ Failed  | 1 s
wallet_balance.py --descriptors                          | ✖ Failed  | 3 s
wallet_balance.py --legacy-wallet                        | ✖ Failed  | 3 s
wallet_fundrawtransaction.py --descriptors               | ✖ Failed  | 20 s
wallet_fundrawtransaction.py --legacy-wallet             | ✖ Failed  | 14 s
wallet_transactiontime_rescan.py --legacy-wallet         | ✖ Failed  | 20 s

v3:

./initialize-itcoin-local.sh && ./continue-mining-local.sh is now working
reintegrated the removal of the PoW, applying back our changes in src/kernel/chainparams.cpp (they were moved there from src/chainparams.cpp.
for this reason, ./continue-mining-local.sh now runs instantly.

v3:

rebased on bitcoin v25.1 final, released on 2023-10-19


Implement URL as input

Description of Problem & Solution
I am running this on a Django app running on Heroku. I'm using Django-storages to place the users uploaded videos on an S3 bucket. It seems that calling the file back with URL fails because pyscenedetect doesn't accept URL as input.
Proposed Implementation:
I would like to see if we can maybe add a flag to tell the app that the source file is coming in as a URL or some conditional check in the video_manager to check if the input is local or remote and handle appropriately

Hi @ajeema;
While this is technically possible, I'm not sure if this aligns correctly with where I see the development of PySceneDetect going.  I'd like to avoid having any kind of I/O specific handling logic put into this package, so I'd like to avoid having to make special provisions for URLs.
Is it feasible for your application to write a wrapper which can download the URL into memory or disk, and pass that path to PySceneDetect?
Thank you!

Yes, I can find a work around. Just thought I’d ask as I thought it may be a use case other would run into

@ajeema Sounds good, will close this issue until another use case is discovered.

Cheers

Hey @ajeema;
This was revisited recently in #188 - sorry for not realizing at the time that this was a duplicate of that one.  URLs should work after the next release (v0.5.5).
You can test it now by checking out the v0.5.5 branch.  I just verified, the following now works:
scenedetect -i https://www.sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4  detect-content

Note that URLs are not compatible with the split-video and save-images command.

Hey @ajeema;
This was revisited recently in #188 - sorry for not realizing at the time that this was a duplicate of that one.  URLs should work after the next release (v0.5.5).
You can test it now by checking out the v0.5.5 branch.  I just verified, the following now works:
scenedetect -i https://www.sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4  detect-content

Note that URLs are not compatible with the split-video and save-images command.


Read-only, non-UI app guide

Is your feature request related to a problem? Please describe.
The documentation mentions it's possible to create "read-only non-ui" apps but there is no actual guide on how to do it. All the guides, even the backend ones mention a UI. There is a guide on migrating extensions to apps, but no guide on creating a new "extension" like app.
Describe the solution you'd like
A detailed guide on creating a read-only, non-UI Stripe app.
Describe alternatives you've considered
Building an app with a useless UI.
Additional context
No additional context.

Hi @enkay
Thanks for opening this issue. We are working on a range of improvements to make this experience better.
If you want to be an early tester, feel free to send me an email to<EMAIL_ADDRESS>so we can chat. I'd love to know more about your use-case.

Hi, any update on this issue? I can't find anything on how to implement a ui-less integration


Make « tabulate » package works properly with slack API.

Hello everyone !
I was trying to use the python tabulate package in order to create nice table to send with a slack bot ! Unfortunately the result was quite bad and after some research I rounded out that slack doesn't support this package.
Moreover, I didn't find a good way to create table and send them through slack api ..
Why tabulate is not working with slack API ?
Would you consider to integrate it ?
Many thanks !
Henri

Hi @HenriPiot-dev, thanks for asking the question! Do you mean this package https://github.com/astanin/python-tabulate ?

Hello ! Thank you for answering me ! This is exactly the package I talked about ! This is use for pandas for instance with the DataFrame.to_markdown() method !
For other projects I'm using the telegram API which handle this package quite well and allow a proper rendering of tables ! As I mentioned when I'm using it on slack, the output is not well formatted !

@HenriPiot-dev Thanks for your quick response here.
As of today, the Slack platform does not offer any feature to render tables. Also, Slack's markdown renderer would not always be compatible with some of the standard markdown syntax.
One thing I can suggest for this is to have ``` to render the generated string as-is. Here is the difference:

I know that the suggested solution may not be ideal for you but I hope this was helpful to you!

Hi thank you for the response ! This can be good for me now to use pre tags ! It looks great ! Many thanks !

I'm glad to hear that my suggestion was helpful to you!


Missing Argument 1 Error Exception with internal post request, Laravel 5.2

I am running into an issue with internal post requests using latest Laravel 5.2 and Dingo dev/master (commit 904d4e4e). Get requests work fine, but I keep getting a 'missing argument 1' error exception when I attempt any post request from anywhere (routes.php, and controllers).
My App Controllers all extend my Base Controller, which is set up as follows:
use Dingo\Api\Dispatcher;
use Dingo\Api\Routing\Helpers;
use Illuminate\Http\Request;

class BaseController extends Controller
{
    use Helpers;

    public $dispatcher;

    public function __construct(Dispatcher $dispatcher)
    {
        $this->dispatcher = $dispatcher;
    }

    // My global functions (irrelevant)...
}

Example of admin subdomain 'modelExample' controller:
namespace App\Http\Controllers\Admin;

use App\Http\Requests;
use App\ModelExample;
use Dingo\Api\Dispatcher;
use App\Http\Controllers\BaseController;

class AdminModelExampleController extends BaseController
{

    public function __construct(Dispatcher $dispatcher)
    {
        parent::__construct($dispatcher);
    }

    /**
     * Display a listing of ModelExamples.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        $modelExamples = $this->dispatcher->get('model-example');

        return view('admin.model-examples.index')->with(['model_examples' => $modelExamples]);
    }

    /**
     * Store a newly created ModelExample in the DB.
     *
     * @param $request
     * @return array
     */
    public function store($request)
    {
        $data = $request->all();

        $modelExample = $this->dispatcher->post('model-example', $data);

        return $modelExample;
    }

}

Example of 'modelExample' API controller:
namespace App\Api\Controllers;

use App\Http\Requests;
use App\ModelExample;
use Illuminate\Http\Request;
use App\Http\Controllers\BaseController;

class ApiAddMediaMethodController extends BaseController
{

    /**
     * Return all ModelExamples.
     *
     * @return \Illuminate\Database\Eloquent\Collection|static[]
     */
    public function index()
    {
        return ModelExample::all();
    }

    /**
     * Store a newly created ModelExample in the DB.
     *
     * @param $request
     * @return array
     */
    public function store($request)
    {
        // I would obviously do stuff here, but for testing purposes, we'll just return...

        return $request;
    }
}

My routes.php
/*
|--------------------------------------------------------------------------
| Dingo generated router for API Routes
|--------------------------------------------------------------------------
*/
$api = app('Dingo\Api\Routing\Router');
$dispatcher = app('Dingo\Api\Dispatcher');

$api->version('v1', function ($api) {

    // Set the namespace for the API_v1-specific route controllers
    $api->group(['namespace' => 'App\Api\Controllers'], function ($api) {

        //Model Example routes
        $api->get('model-example', [
            'as' => 'model-example.get',
            'uses' => 'ApiModelExampleController@index'
        ]);

        $api->post('model-example', [
            'as' => 'model-example.post',
            'uses' => 'ApiModelExampleController@store'
        ]);
    });
});

/*
|--------------------------------------------------------------------------
| Application (non-API) Web Routes
|--------------------------------------------------------------------------
*/
Route::group(['middleware' => 'web'], function () {

    // Bunch of regular web app routes (irrelevant)

    /*
    |--------------------------------------------------------------------------
    | ADMIN Subdomain Routes
    |--------------------------------------------------------------------------
    */
    Route::group(['domain' => 'admin' . env('SESSION_DOMAIN')], function () {
        // Set the namespace for the Admin Subdomain route controllers
        Route::group(['namespace' => 'Admin'], function () {

            Route::group(['middleware' => 'admin'], function(){
                // Model Example routes
                Route::resource('model-example', 'AdminModelExampleController');
            }

        }
    }
}

No matter what I use in the store method on the Admin Controller, I get the following error:
Missing argument 1 for App\Api\Controllers\ApiModelExampleController::store()
I have tried:
$modelExample = $this->dispatcher->with($data)->post('model-example');
$modelExample = $this->dispatcher->post('model-example', ['hard' => 'coded', 'just' => 'in case']);
$modelExample = $this->api->post('model-example', $data);
$modelExample = $this->api->with($data)->post('model-example');
$modelExample = $this->api->post('model-example', ['hard' => 'coded', 'just' => 'in case']);

I have also tried directly from the routes file with test endpoints, I have turned off all middleware... no matter what I do, the payload array is not being recognized.
Is this a Laravel 5.2 vs 5.1 issue? Am I missing something completely obvious (been known to happen ...often)? How can I resolve this? Much thanks in advance! :-)

This was my bad, and I have figured it out.
The Post data object I was passing through was not an instance of a Request. I was trying to pass through an array. I realize now that it has to be a Request (or Form Request, what have you) in order to work.


Couldn't start client Flat File Import Service

Azure Data Studio Version: 1.48.1
OS Version: Sonoma 14.4.1 (23E224)
SQL Server Import v1.6.1

Steps to Reproduce:

Right click on database
Select Import Wizard from drop down

Receive "Couldn't start client Flat File Import Service" message in lower right corner

Does this issue occur when all extensions are disabled?: Yes

Hi @mycturner, I wasn't able to repro this issue. Are you able to update to the latest version of Azure Data Studio? If you are able to update and still see this issue, could you attach application and console logs to help identify what is causing the flat file import service to not start?


Use FFT interpolation in Plonk proving system

Use FFT interpolation in Plonk proving system
Description
To speed up all the rounds in the Plonk proving system, it's better to use all the operations implemented in FFT instead of Lagrange interpolation. I implemented the IsTwoAdicField trait to the ScalarField of the BLS12-381 curve to make it suitable to use with FFT. These changes affect the proving and the verifying function.
Type of change

[x] Optimization

Checklist

[ ] Linked to Github Issue
[ ] This change is an Optimization

[ ] Benchmarks added/run

Codecov Report

Merging #254 (5860ca9) into main (28f6d51) will decrease coverage by 0.03%.
The diff coverage is 96.02%.

@@            Coverage Diff             @@
##             main     #254      +/-   ##
==========================================
- Coverage   96.19%   96.16%   -0.03%
==========================================
  Files          83       84       +1
  Lines        9444     9502      +58
==========================================
+ Hits         9085     9138      +53
- Misses        359      364       +5

Impacted Files
Coverage Δ

...field/fields/fft_friendly/stark_252_prime_field.rs
82.35% <ø> (ø)

proving_system/plonk/src/test_utils/utils.rs
100.00% <ø> (+2.38%)
:arrow_up:

...field/fields/fft_friendly/bls12381_scalar_field.rs
82.35% <82.35%> (ø)

proving_system/plonk/src/prover.rs
100.00% <100.00%> (ø)

proving_system/plonk/src/verifier.rs
100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

No longer valid


SMPTE 240M discussion

I would like to note NLEs and QuickTime both match the reverted zimg behavior on ctual 240M files (and I have shared at last one, but I have many). There was a huge uptick in complains from users when the original commit went into prod. Michael Bradshaw / @mjbshaw (from YouTube) on that thread probably experience similar.
You can maybe argue the behavior pre-revert was "most correct" based on docs, but it does not match how any software or files act in the real world, and thus is defacto wrong, in my opinion. It is not useful to say "but this is technically correct" if it doesn't match anything else in the real world. There is plenty of evidence in how standard NLEs and players render 240M, an how they create files. I have thus far seen zero evidence that the pre-revert behavior was correct, other than arguing technical semantics based on docs.

NLEs and QuickTime both match

QuickTime does not even support BT.1886, so who cares what it does (it uses gamma 1.961). Also it has TrueTone so the test is also quite difficult to do.
As for NLEs (I doubt any NLE supports this old and deprecated transfer) the mpv is only one that can support it and ffplay (no need to include my fix https://github.com/FFmpeg/FFmpeg/commit/3249b963421cf5ff0e6adf2e38c86194fdf50929) with this: ffplay C:\Users\ZAQU\2.mp4 -vf scale=in_color_matrix=smpte240m,format=gbrp or just auto instead of smpte240m if tagged (that is only colorspace, transfer and primaries both affect the picture too and is not supported by ffplay, only by mpv).

There was a huge uptick in complains

Why those users even use that transfer?? It is deprecated in favour of BT.709 OETF which is using BT.1886 EOTF, which is almost sRGB for LCD displays and 2.4 pure gamma for OLED. Also, Youtube does not support this transfer, AFAIK, and since most use Chromium/Chrome to watch it, as a dev of Chrome, I can say it forces sRGB EOTF for BT.709, so there is no point in arguing about this, since everything else on the web is targeting sRGB and color management of WCG images is very broken (see: https://bugs.chromium.org/p/chromium/issues/detail?id=820233) and CSS WCG support is still a draft W3C draft.

commit went into prod.

BTW, why is Youtube using zimg? Also, not like Youtube even supports sYCC and stuff.

I have a lot of files from a lot of software

Please give at least mediainfo of those files. Does it use ffmpeg and/or zimg? Then it is not surprising, since ffplay and mxf encoder in ffmpeg and ffmpeg documentation had this bug in DOCS only that I fixed: https://github.com/FFmpeg/FFmpeg/commit/6b1268f8c371c2e6efa5c8465b85ae9025254184 but it did propagate elsewhere: https://github.com/FFmpeg/FFmpeg/commit/91ba771a3fee9757273416789ba01e1a7c62890b https://github.com/FFmpeg/FFmpeg/commit/3249b963421cf5ff0e6adf2e38c86194fdf50929
THE FACT OF THE MATTER is that SMPTE240M EOTF and OETF are not the same as in any other. This is the fact. See ffmpeg source code: https://github.com/FFmpeg/FFmpeg/blob/870bfe16a12bf09dca3a4ae27ef6f81a2de80c40/libavutil/color_utils.c#L83
Also, the fact is H.273 does use different transfer for 240M. There will be always broken files, for example of some 8K satellites I saw BT.2020-CL matrix which should have been BT.2020-NCL. That is just the way it is. If google wants it can support some in tree patches for this.

QuickTime does not even support BT.1886, so who cares what it does

Almost everybody working in profesional (and amateur) video editing cares what QuickTime does.

As for NLEs (I doubt any NLE supports this old and deprecated transfer)

You would be surprised.

Why those users even use that transfer??

I do not read minds.

Also, Youtube does not support this transfer,

I would be surprised if they did not support it for ingest.

BTW, why is Youtube using zimg? Also, not like Youtube even supports sYCC and stuff.

They're not AFAIK, but the experience wrt 240m source files is relevant.

Please give at least mediainfo of those files. Does it use ffmpeg and/or zimg

I've provided some to @sekrit-twc, but I'm not clear to provide user files in the open. I have plenty that are not made by FFmpeg or zimg.
In any case, I don't think I will be spending any more of my time Arguing On The Internet with someone who appears quite angry. If the revert is reverted, then fine, I can work around it on my end manually. I merely reported the feedback.

video editing cares what QuickTime does

Except everybody really pro uses reference monitors with BT.1886 and special player, so false.

I would be surprised if they did not support it for ingest.

But their apps and what else do not.

provide user files or info in the open.

you can just give primaries/trc/range/matrix part.

I don't think we should break user files for the sake of being technically correct on an old and deprecated format, as it could be argued that the the current zimg implementation (post revert) is the behavior needed by this de-facto standard.
if a stricter implementation is required maybe a custom option could be added to support this specific use case. jm2c

custom option could be added to support

That would be nice. Though I still do not get how those users have this transfer. I never saw it!

My two cents: it can never be correct to apply inverse 240M OETF followed by 1886 EOTF to do a gamma conversion, because 601, 709, and all other CRT-based transfer functrions imply an end-to-end 1.2 gamma boost. It is not clear to me that 240M is different from 601 and 709, but if it were, it would still be incorrect to convert to 709 by applying 1886 on top of 240M, as that would add a second layer of gamma boost.

inverse 240M OETF

You do not need to invert 240M OETF, you can just use the 240M EOTF, which is defined in SMPTE doc.

imply an end-to-end 1.2 gamma boost

Yes, but that is just dark surround correction. Because most video is done in bright environment and the end result is presented in much darker environment, in case of BT.1886 2.4 gamma is for dark room and sRGB EOTF can be used as a good approximate for light room.

convert to 709 by applying 1886 on top of 240M

Yes, it should be as before revert apply SMPTE240M EOTF, apply BT.709 OETF, that can then be presented using BT.1886.

@haasn What do you think? Should SMPTE 240M transfer be EOTF and OETF from the docs? Looks like mpv has some problems with SMPTE 240M, i.e. is just using BT.1886 for it too? See:

Updating this issue with some additional context.
ValZapod wrote:

since most use Chromium/Chrome to watch it, as a dev of Chrome, I can say

Contributor A wrote:

I missed ValZapod being a Googler.
A nice quote from chromium's bug tracker:

If it makes you feel any better, you're absolutely correct in principle, and we're objectively wrong.  We simply made this decision by allowing more than that objective principle to affect our decision, and we know how and why we're wrong, and I think we're all still pretty much okay with that decision.

Yeah, Val is not a Project Member :)

Contributor B wrote:

and as a dev of Chrome, I can say

I can find no evidence of this

Contributor A wrote:

I can find no evidence of this

At most, he posted a  rejected patch. He does not have Project Member badge on the Chromium issue tracker

does not have Project Member badge

That is only available for @chromium and @google email.

Oh, and BTW. These guys know much more than you do and even I. Same: https://github.com/colour-science/colour/blob/02612fef79cddbada324def766b8a93283430908/colour/models/rgb/transfer_functions/smpte_240m.py#L133

Okay I now see that in SMPTE 170M the EOTF is also just the inverse instead of being BT.1886, which was only done in 2011.
See: https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.1700-0-200502-I!!ZPF-E.zip (s170m file inside).
Still same BT.1886 cannot be used for SMPTE240M transfer!

So.. I don't want to disturb you gentlemen (even because this is not my field, and I couldn't find the last 1999 spec anywhere)
Though I just wanted to point out 170M has a lot of "ifs" and "buts" between what the datasheets say, and what the thing in the real world ended up being.

170M is just BT.601 matrix, but BT.601 matrix was derived from BT.470 System M analog TV. It is not interesting. 240M uses matrix derived from primaries defined in 170M, SMPTE Conrac.
As for your link for 170M transfer that is wrong. 170M uses (as per H.273) the very same 601/709/2020-10 transfer with BT.1886 EOTF.

Just a newbie here.  I don't know if this is helpful, interesting, or totally irrelevant:
---I was preparing to capture footage from an early 1990's Betacam SP master. As I studied about these colorimetry/SMPTE standards, there was this comment on Wikipedia (https://en.wikipedia.org/wiki/NTSC):
"Japanese NTSC never changed primaries and whitepoint to SMPTE "C", continuing to use the 1953 [470m?] NTSC primaries and whitepoint."--which I felt was relevant to me, since this is a Japanese Betacam master tape.

Japanese NTSC never changed primaries and whitepoint to SMPTE "C", continuing to use the 1953 [470m?]

Yes NTSC 1953 is BT.470 System M, you are right! As for this issue it has nothing to do with your issue, we are talking about transfer, not primaries. For SD no one ever cared about primaries though! Only mpv player color manages 1953 to sRGB's primaries and transfer, BT.709 + sRGB transfer or to Display P3 used by Apple, or 2020 used by LG C9. Etc.

Thank you. You guys are amazing!

Okay, at the very least the change of primaries should happen using inverse OETF, because color managment on scene referred sources should happen ON SCENE LIGHT. Then you can apply BT.1886, whatever.


Create edge with ODB SQL  - Low performance & exceptions in 3.0.17 TP3

OrientDB Version: TP3 3.0.17
Java Version: 1.8.0_111
OS: Windows 7 Enterprise
Expected behavior
In OrientDB 2.2.12 we could read edge info (label, source id, target id) from external tables and produce ODB SQL commands to create edges in ODB very efficiently.
It was expected that the same could be done with OrientDB 3.0.17 TP3
Actual behavior
The ODB SQL commands created from the external tables were executed at an unacceptable speed (~10ms per command, compared to less than 1ms in OrientDB 2.2.12). The process also threw vague exceptions that did not appear in the same tests in OrientDB 2.2.12, nor did they appear when instead of using ODB SQL commands we changed to the v.addEdge() methods in OrientDB 3.0.17 TP3. The exceptions found were:

ODatabaseException: No Transaction Active. This exception tends to happen when more than one edge connected to the same vertex was included within the same commit batch. Nevertheless, cases were identified where this pattern didn’t result on this exception. Given the lack of detailed information on the causes of the exception, the only way to partially cope with it is to catch the exception and log the commands affected by it. This obviously results in missing edges in OrientDB database.

OConcurrentModificationException. This exception should not apply here, since only one client is accessing the server data. The easiest way to cope with it is to catch the exception and re-try the commit.

Steps to reproduce

Create class "A", populate 1,000 instances and get the list of their @rids
Create class "B", populate 1,000 instances and get the list of their @rids
Create edge "EdgeC"
Create external table (e.g. in CSV or RDBMS) with EdgeC instances linking "A" with "B" vertices
Read table and create per row the ODB SQL command = "CREATE EDGE EdgeC FROM " + vertexAId + " TO " + vertexBId;
Get the time per command execution
Compare with OrientDB 2.2.12 and with execution times using vA.addEdge("EdgeC", vB);

I am also facing this issue too.

Hi @rafasantodomingo @ozgursucu
do you have a simple java code to reproduce this issue?
Are you running this in transaction?
Thanks

Also Which APIs are you using?

package com.odb.test;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import org.apache.tinkerpop.gremlin.orientdb.OrientGraph;
import org.apache.tinkerpop.gremlin.orientdb.OrientGraphFactory;
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import com.orientechnologies.orient.core.index.OIndex;
public class Test_LoadEdgesWithOdbSql {
private static final long COMMIT_SIZE = 1000;
public static void main(String[] args) {
String dbUri = "remote:localhost/";
String dbName = "database";
String user = "admin";
String pwd = "admin";
class EdgeInfo {
  String label;
  String sourceId;
  String targetId;
  EdgeInfo(String l, String s, String t) {
    label = l;
    sourceId = s;
    targetId = t;
  }
}

// Connect to graph DB
System.out.println("Connecting to ODB database");
OrientGraphFactory factory = new OrientGraphFactory(dbUri + dbName, user, pwd).setupPool(1,10);
OrientGraph graph = factory.getTx();
System.out.println();

// Create Set<EdgeInfo>
System.out.println("Create edgeInfos...");
Set<EdgeInfo> edgeInfos = new HashSet<>();
System.out.println("\tGet Vertices A");
String getVerticesA = "SELECT FROM ClassA LIMIT 22479";
List<Vertex> verticesA = graph.executeSql(getVerticesA).stream().map(gr -> gr.getVertex().get()).collect(Collectors.toList());
System.out.println("\tLink to Vertices B");
int i = 0;
for (Vertex vAt : verticesA) {
  String name = (String) vA.property("Name").value();
  Vertex vB = getVertexByName(graph, name);
  edgeInfos.add(new EdgeInfo("EdgeC", vA.id(), vB.id()));
  i++;
}
graph.commit();

// Load edges
System.out.println();
System.out.println("Load Edges C");
long totalTimeInMillis = 0;
double averageTimeInMillis = 0;
int count = 0;
for (EdgeInfo edgeInfo : edgeInfos) {
  count++;
  String command = "CREATE EDGE EdgeC FROM " + edgeInfo.sourceId + " TO " + edgeInfo.targetId;
  Date date = new Date();
  graph.executeSql(command);
  long time = getLoadTime(date.getTime());
  totalTimeInMillis += time;
  if (totalTimeInMillis > 0) {
    averageTimeInMillis = totalTimeInMillis / (double) count;
  }
  System.out.println("Command " + command + " executed in " + time + " ms; Average time =  " + averageTimeInMillis + " ms");
  if (count % COMMIT_SIZE == 0) {
    graph.commit();
  }
}

graph.commit();

// Print Results
System.out.println();
System.out.println("The total time in ODB3 was = " + totalTimeInMillis  + " ms");
System.out.println("The average time in ODB3 was = " + averageTimeInMillis + " ms");
System.out.println("Number of edges loaded = " + count);

// Close graph
graph.close();

}
private static Vertex getVertexByName(OrientGraph g, Name) {
OIndex index = (OIndex) g.getRawDatabase().getClass("ClassB").getClassIndex("ClassB.Name");
List list = new ArrayList<>();
list.add(componentAlias);
return g.getIndexedVertices(index, list.iterator()).findFirst().orElse(null);
}
private static long getLoadTime(long initialTimeInMillies) {
long finalTimeInMillies = new Date().getTime();
return finalTimeInMillies - initialTimeInMillies;
}
}

Hi @rafasantodomingo
In ODB 2.2.x are you using SQL statement or using the api addEdge ?
Thanks

Both, in different parts of the code. The thing is that the SQL statement has even better performance than the API addEdge in ODB 2.2.x

@rafasantodomingo
2.2.x sql statement were executed without transactional state of the server all.
In 3.0.x  the statement are executed but the changes are saved at commit time.
in my machine with our code i do .
The total time in ODB3 was = 781 ms
The average time in ODB3 was = 0.781 ms
Number of edges loaded = 1000

In your code you can reduce the execution time by using prepared statement
 String command = "CREATE EDGE EdgeC FROM :from TO :to";
      Date date = new Date();
      Map<String, Object> params = new HashMap<String, Object>() {{
        put("from", new ORecordId(edgeInfo.sourceId));
        put("to", new ORecordId(edgeInfo.targetId));
      }};
      graph.executeSql(command, params);

In this way the execution plan of the query is cached the first time and reused for each queries
Let me know if this improves
Thanks

Hi,
The difference in performance are depending on API use, so the right use of the API should bring similar performances.
Closing this


Matcher: PathPrefixStrip in 2.0

Do you want to request a feature or report a bug?
Feature
What did you expect to see?
Documentation on how the matcher PathPrefixStrip Documentaion v1.7 can be used in traefik version 2.

Hello,
PathPrefixStrip has been replaced by the rule PathPrefix and the middleware stripPrefix


On load doesn't work

Hello,
I’m using the plugin this way : data-toggle="validator"  role="form"  in my form.`
$(window).on('load', function () {in validator.js at line 398 doesn't work for me. But, If I replace it by $(document).ready( function () {` it works.  (I’m using jquery  v2.2.4).
Do someone have any idea to make it work with 'on load'  ?
Thank you in advance for your answer.

Hi Gowsan10,
Have you found any solution for it? It would be helpful to us if you could share it


[0.5d] pull out dm client interactions into the client pkg

User requirement
As a developer, I would like to use dotmesh from my go program without having to shell out to a binary or dig into the source code to find the right import path.
Specifically we could probably just move cmd/dm/pkg/remotes code to be in pkg/client, change the imports elsewhere and be done with it :) This would also get us closer to following the standard go project layout (by one package)

Done. I did both api.go and remotes.go, meaning that users of the client library can now access remotes set up in ~/.dotmesh/config, which could be pretty handy for CLI tools like ds!


500 Internal Server Error in case of incorrect JWT

If I use something meaningless as JWT:
GET /test HTTP/1.1
Host: localhost:3000
Authorization: Bearer dsfsdf.sdfsdf.sdfsdf

response is:
HTTP/1.0 500 Internal Server Error
Date: Sat, 20 Feb 2016 23:11:11 GMT
Server: postgrest/<IP_ADDRESS>
Content-Type: text/plain; charset=utf-8

like something is wrong on server side. Seems like the situation of incorrectly built JWT is not process in the code. Solution could be: try to base64decode of both two first parts of JWT token and if it fails, reply with 400 Bad Request or smth more suitable.

Tried this out today and I see what you mean. It's interesting that you can use a bigfakestring for the JWT and it behaves OK, but once it has those dots in it then it dies on the server with
uncaught exception: UnicodeException
(Cannot decode byte '\xec': Data.Text.Internal.Encoding.decodeUtf8: Invalid UTF-8 stream)

I agree that a 400 not a 500 error would be more appropriate. Since this doesn't cause a security problem or anything I'd classify it as a lower priority issue than some other ones right now, but it is a valid issue.

Given the new code on the master branch when I try posting that bad JWT I get a 401 response with the body:
{
  "message": "JWT invalid"
}

So I think we're all good now!

Great!


Update documentation: contentful previews, github PR's and releases

📇 User story
As a developer, I want to the technical documentation to be up to date, so that it will be easier to read and work on the product.
✅ Definition of Done

[x] Documentation reviewed by one other team member
[ ] Documentation exists for french & english (help from @ClementineHahn)

📜 Acceptance criteria

[x] Contentful Previews in wiki
[ ] Feature toggles: remaining documentation available in french
[x] Github PRs documentation (squashing commits)
[x] Github Releases documented

📝 More info

Still missing french translation of feature toggles. @ClementineHahn failed to complete in time. Leftover task to be converted as a new separated card to send tech doc to translation office


Failed to connect to sentinel

Hi,
We currently connect to Redis just fine on port 6379. However, we recently upgraded our instance to use the stable/redis-ha Helm chart and this comes with a Sentinel installation.
I changed our connection string to connect to it on port 26379, but it just fails to connect.
I thought it was supported now that Sentinel support is in the SE client library?
Thanks.

As far as I know the sentinel support PR in Stackexchange.Redis is still not merged.
There is some basic support though for sentinel setups.
I did some testing with that a couple of years ago and nothing really changed so that should still work.
I bet you had only the sentinel configured an no other servers, or you have other network issues which prevents the connection.
Anyways, that shouldn't have anything to do with this library.


Drag between grids issue

There is a bug while dragging between two grids: http://take.ms/maoFv

would u like fix this bug first?

var dragOrResize = function(event, ui) {
...
var n = el.data('_gridstack_node');
            //add if widget had been added to outer grid
            if (x < 0 || x >= self.grid.width || y < 0 || (n && n._added)) {

#435

that issue shown in the video is still there in 0.5.2-dev latest build (2 drop shadow showing, with one phantom left behind on drop).

To add a note on to this, I will receive phantom items with an outline, but when I try and move an item from a Grid below to the one above (or even above to below) the outline disappears and I am not able to put an item in that spot. Almost as if there is an invisible item-placeholder there.
Currently running 1.0.0-dev I believe.

The problem seems to be still there ?
V1.1.2

yes, hasn't been looked at...

Any change to fix that issue in very near future ??

How much is it worth to you? Feel free to contribute time or $ as I'm swamped these days...

finally fixed in 2.0.1

I can still see it sometimes... re-opening

finally fixed in v4!


Prepare release 1.2.0 with Scala 2.12 support

As soon as #770 is merged and potentially #761 also, this PR upgrades Quill to 1.2.0 with 2.11/2.12 cross compilation.
@getquill/maintainers

Updated and ready.
@getquill/maintainers

Approved 👍


Module is not treated as a module, if it's specified inside profile

If module is specified in:
/pom:project/pom:profiles/pom:profile[1]/pom:modules
Then it's not recognized as a module for analyze_project_roots

Fixed for default profile: now modules from profile with activation by default are added as well


Nucleo f401 re oled

Summary
Nucleo F401RE board support for SSD1306 oled display with SPI interface
Impact
Testing
Yes

@adamkaliszan it's better to fix the style issue in place instead creating a new patch.

still has one error:
Error: /home/runner/work/incubator-nuttx/incubator-nuttx/nuttx/boards/arm/stm32/nucleo-f4x1re/src/stm32_spi.c:228:3: error: Right brace must be followed by a blank line

@adamkaliszan please squash your patch like this:
git rebase --interactive HEAD~4
reorder your patch set in the editor and select squash as needed.

I add one more comit and rebased: git rebase --interactive HEAD~5

I add one more comit and rebased: git rebase --interactive HEAD~5

but your PR still contain file patch, please reorg your patch into the reasonable set.


Fix elbs urls protocol

Fix elb entity url based on configured listeners

Fix #57

Current coverage is 75.16% (diff: 100%)

Merging #58 into master will increase coverage by 0.16%

@@             master        #58   diff @@
==========================================
  Files             5          5
  Lines           452        455     +3
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits            339        342     +3
  Misses          113        113
  Partials          0          0

Powered by Codecov. Last update d879314...6dc4607

:+1:

👍


Feature: Add a RESTART command

Rebuilds and restarts the program. Tired of running that same freaking command over and over :)

Fixed in https://github.com/Solitude-Software-Solutions/OstrichDB/commit/a634ac75a368792bf136338aec58f015ca02d3a3


More info for CoreWindow change on Desktop

More detail on lack of CoreWindow etc classes in a Desktop app, and cover it in the Restrictions section rather than the Known Issues (because it's part of the design that's not going to change).

@MikeHillberg : Thanks for your contribution! The author(s) have been notified to review your proposed change.

#sign-off


Add geocodeapi

#441

Hi @KostyaEsmukov ,
Could you check the last update - I can't find a reason for errors


az ad sp create-for-rbac --name new-service-principal-name --skip-assignment --years ???

Is there a way to set the client secret to never expire from the command line? It seems when creating a new secret from the portal there is an option for never that just sets it to expire on 12/31/2299? A thousand years seems to work fine but 10,000 throws an error. What is the max time for "--years" parameter?
az ad sp create-for-rbac --name new-service-principal-name --skip-assignment --years 1000

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

ID: e99d25ff-03e2-e015-37f4-a29b59ec50d4
Version Independent ID: 1a8e88ed-72c7-fbe7-b0ad-68f23b3946cd
Content: az ad sp
Content Source: src/azure-cli/azure/cli/command_modules/role/_help.py
Service: active-directory
GitHub Login: @rloutlaw
Microsoft Alias: routlaw

add to S167

It looks like the max value for years is (9999-current_year), or currently 7979.
az ad sp create-for-rbac --name new-service-principal-name --skip-assignment --years 7979

Azure CLI uses Python's built-in function relativedelta to compute the app_end_date.
https://github.com/Azure/azure-cli/blob/1c0e9c3e18c34116d5a2e25cb7460d1af8a85969/src/azure-cli/azure/cli/command_modules/role/custom.py#L1301
datetime.py defines
MAXYEAR = 9999

So yes. The max value for --year is 9999-current_year, or currently 7979. The developer of Python may think Python 3.8.2 won't be used until the year of 9999. 😄


How to change value of attribute dynamically?

I found id of attribute and I want to change value of this, I use:
$("#id).val("value")
value of input is change but attribute is not add to element. and value not save in json output.

You would need to change the inputs in the edit panel of the field but there is a new feature in progress that should be available next month to handle this programmatically.