Javascript: Object.assign to assign property values for classes is not respected

Perhaps TS should be able to identify Object.assign(this, ...) then infer the properties that are assigned to this? Or is this not possible to do? I am not sure.

TypeScript Version:
Version 3.0.3

Search Terms:

object assign
class
does not exist on type

Code
A.js
export default class A {
  constructor ({ x, y, z }) {
    Object.assign(this, {x, y, z});
  }
  f () {
    return this.x;
  }
}

Expected behavior:
TS should be able to identify x as a property of this.
Actual behavior:
Throwing:
Property 'x' does not exist on type 'A'.

Playground Link:
http://www.typescriptlang.org/play/#src=export default class A {
  constructor ({ x%2C y%2C z }) {
    Object.assign(this%2C {x%2C y%2C z})%3B
  }
  f () {
    return this.x%3B
  }
}
Related Issues:
no
Side Note:
I am using TS with Javascript because YouCompleteMe switched to using TSServer for semantic completion. I absolutely love TS so was really happy about the switch! Thanks for the great work!

Actually, it might not be possible to support this feature for ambiguous objects.
E.g.
Object.assign(this, obj1);

Since obviously obj1 can be any type in JS and hence there is no way to find out what is being assigned to this.
But I think it would be a good idea to be able to support explicit assignment to this with Object.assign.

Why not support return different thing from constructor()?
class X {
	public X: number;

	constructor() {
		return new Y;
	}
}

class Y extends X {
	public Y: number;
}

const obj = new X;
console.log(obj.Y); /// TS2339: Property 'Y' does not exist on type 'X'

It's more common than only Object.assign.

Came here from #28883. I understand that in the general case, the type of the second argument to Object.assign could be of type any, but in my specific case I define that type via an interface beforehand:
interface MyConfig {
    someConfigProp: boolean;
}

class MyClass implements MyConfig {
    // Error: Property 'someConfigProp' has no initializer
    // and is not definitely assigned in the constructor.
    someConfigProp: boolean;

    constructor (config: MyConfig) {
        Object.assign(this, config);
    }
}

It seems to me that comparison between the types of this and config could be done, and if config is some type that's not assignable to this, then that would be the condition where you couldn't determine the type.
The alternative right now is to manually assign every property of the config interface to the corresponding class property, which works but is a pain:
interface MyConfig {
    someProp: boolean;
    someOtherProp: string;
    // ...etc
}

class MyClass implements MyConfig {
    someProp: boolean;
    someOtherProp: string;
    // ...etc

    constructor (config: MyConfig) {
        this.someProp = config.someProp;
        this.someOtherProp = config.someOtherProp;
        // ...repeated for every property of the config object
    }
}

@Geo1088 I think you can just use Object.assign(this, config as any), It's really safe in your case

@GongT Thanks for the guidance, don't know why I didn't think to do that myself.

Not quite, though... The issue was never that the arguments were improperly typed, but that the Object.assign call doesn't update which properties are present on the constructed instance.
Maybe a better example:
interface MyOptions {
   myRequiredProp: string;
}
class MyClass implements MyOptions {
    myRequiredProp: string;
    constructor (options: MyOptions) {
        // The next line guarantees myRequiredProp is assigned, since
        // it's required on MyOptions
        Object.assign(this, options);
        // Next line generates "Property 'myRequiredProp' is used
        // before being assigned"
        if (this.myRequiredProp === 'some value') {
            // additional setup here
        }
    }
}

Just stumbled across this issue - I want to assign multiple properties without too much code duplication, but Typescript is complaining when strict flags are set unfortunately.

Just found this article which outlines a way to accomplish this with the return value of Object.assign(), but doesn't address performing the in-place operation/modifying the type of the first argument without reassignment. https://spin.atomicobject.com/2018/05/14/type-safe-object-merging-2-8/
I'm interested in making a PR for this behavior; does anyone more familiar with the project have any pointers on possible starting points?

Is this a duplicate of #16163?

Looks like it, sorry for not catching that.

I don't know if that is even something you can even express with the current type system

Well this doesn't bode well for my chances making a PR for this, does it...

Next line generates "Property 'myRequiredProp' is used before being assigned"

You could get around that with a definite assignment assertion (!), but it would be nice if TypeScript could figure that out instead.

This would be amazing. Right now, if you want to augment a POJO with some methods, say, for computing related values, it's really easy to do in JS — but basically impossible to type in TS without a lot of boilerplate or circular reference issues:
class AugmentedPOJO {
  a() { return this.b(); },
  b() { return this.x; }
  constructor(pojo: { x: string }) {
    // doesn't work, as pointed out
    Object.assign(this, pojo);
  }
}

If we want to guarantee that the new methods (a and b) won't be shadowed by an own prop of the pojo, we could do something in vanilla JS like:
function augment(pojo) {
  return { ...pojo, ...methods };
}

const methods = {
  a() { return this.b(); },
  b() { return this.x; }
}

But trying to type the this for the functions on the methods objects (which should be { x: string } & typeof methods) blows up with circularity errors that are only avoided when using a class.
The best hack I've come up with is:
type Pojo = { x: string };
type AugmentedTrueType = Pojo & _Augmented;

class _Augmented {
  constructor(pojo: Pojo) {
     object.assign(this, pojo);
  }
  a(this: AugmentedTrueType) { return this.b(); }
  b(this: AugmentedTrueType) { return this.x; }
}

const Augmented = _Augmented as {
  new (pojo: Pojo): AugmentedTrueType;
};

// Works as expected!
const a = new Augmented({ x: "hello" });

Something I found that seems to work is merging/augmenting the class with an interface like below. The idea is to have an interface that defines the object passed to the constructor function that has the same name as the class.
export interface Awesome {
  x: string;
  y: number;
  z: boolean;
  zz?: boolean;
}

export class Awesome {
  constructor(props: Awesome) {
    Object.assign(this, props);
  }

  fn() {
    return this.x;
  }
}

If you have a base abstract class that you want to use together with generics to dynamically defines class properties, you can do this:
// eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/interface-name-prefix
export interface BaseAwesome<T extends IBaseAwesomeProps> extends IBaseAwesomeProps {}

export abstract class BaseAwesome<T extends IBaseAwesomeProps> {
  constructor(props: T) {
    Object.assign(this, props);

    // Some contrived logic to show that both "this" and "props" objects contain the desired object properties.
    this.y = props.y > 5 ? 5 : props.y;
  }

  getX(): T['x'] {
    return this.x;
  }

  updateX(x: T['x']) {
    this.x = x;
  }

  abstract logZZ(): void;
}

Then the abstract class can be used like this:
export interface IDerivedAwesomeProps extends IBaseAwesomeProps {
  someNewProp: 'this' | 'that'; // new prop added to base interface.
  xx: number; // modified prop to be required and have specific type.
}

export class DerivedAwesome extends BaseAwesome<IDerivedAwesomeProps> {
  logZZ() {
    console.log(this.zz);
  }
}

const awesomeInstance = new DerivedAwesome({
  someNewProp: 'that',
  x: 'some string value',
  xx: -555,
  y: 100,
  z: true,
});

console.log(awesomeInstance.getX()); // -> some string value
awesomeInstance.logZZ(); // -> undefined

See https://github.com/microsoft/TypeScript/issues/40451 for proposed further improvements and currently possible alternatives

A workaround solution I used was to create a type alias for the base class. Something like:
interface Opts {
  a: string;
  b: number;
}
export class SomeClass {
  constructor(opts: Opts) {
    Object.assign(this, opts);
  }
}

export type TSomeClass = SomeClass & Partial<Opts>;

At least u get intellisense tips and typechecking

@PLSFIX This helps somewhat for users of the class, but if class methods use any of the properties of Opts they would still have to be declared as fields, and to have them as readonly the compiler would still complain that they are "definitely not assigned in the constructor". So your solution obviously doesn't help making those properties fields.
If we could have field designators (public/private/protected + readonly) in destructured object parameters this problem would be solved AND we would have the added bonus of being able to initialize parts of an object automatically without having to use Object.assign at all:
interface Opts {
  a: string;
  b: number;
}

export class SomeClass implements Opts {
  constructor({readonly a, readonly b}: Opts) {
  }
}

I came across a similar issue where I wanted to essentially extend a type from a third-party library, but didn't want to manually write out all of the properties (lazy 😅). This is what I ended up doing:
Create class from a generic type:
function createClassFromType<T>() {
  return class {
    constructor(args: T) {
      Object.assign(this, args)
    }
  } as ({
    new (args: T): T
  })
}

Create a base class for my Person type:
type Person = {
  name: string
}

const PersonClass = createClassFromType<Person>()

const person = new PersonClass({ name: 'Alice' })

person.name // Alice

Extending PersonClass is also very easy:
class MyPerson extends PersonClass {
  constructor(person: Person) {
    super(person)
  }
  greet() {
    console.log(`Hello, ${this.name}`)
  }
}

Here are some more example use cases:
const classPerson = new PersonClass({ name: 'Alice' })
console.log(classPerson.name)   // Alice

const childPerson = new PersonChild({ name: 'Bob' })
childPerson.greet()   // "Hello, Bob!"

function doSomethingWith(personType: Person) {
  // example method only acceots person type
}

doSomethingWith(classPerson)  // this is ok!
doSomethingWith(childPerson)  // this is ok!

if (childPerson instanceof PersonClass) {
  console.log('person is instanceof PersonClass!')
}

if (childPerson instanceof PersonChild) {
  console.log('person is instanceof MyPerson!')
}

Check it out on the TypeScript playground!

I am having the exact same problem as @eritbh with Object.assign not making TypeScript recognize the assignment to class properties. Please fix this!

I've been looking for this for a while and your solution @asleepace is perfectly doing the job!
By directly calling the createClassFromType method when declaring the actual class it avoids most of the boilerplate:
function classFromProps<T>() {
    return class {
        constructor(props: T) {
            Object.assign(this, props);
        }
    } as ({new (args: T): T});
}

type PersonProps = {
    firstname: string,
    lastname: string,
};

class Person extends classFromProps<PersonProps>() {
    get fullname() {
        return [this.firstname, this.lastname].join(' ');
    }
}

const ts = new Person({firstname: 'Tom', lastname: 'Smith'});

console.log(ts);           // ==> Person: {"firstname": "Tom", "lastname": "Smith"}
console.log(ts.fullname);  // ==> "Tom Smith"

This solution is indeed working,
But at this point, I feel like I'm hacking TypeScript into the language to make it work.
 Using a class declaration wrapper function every time we want to declare a class is just hideous. Yes, it works, but so does resorting to any or going other pointless routes that don't really address the problem.

It's curious why that problem is not solved? while it is not random bug, I can't use Assign Mixin's Property at my Class without type error, I think // @ts-ignore is best solution

@Amiko1
// @ts-ignore is not a solution
It's a shitty workaround

Any solution except TypeScript itself handling this will be an ugly workaround.

In normal JS I can't just hack in some interfaces or types, all I got is JSDoc comments and I have no idea to workaround this with them.

I am waiting for this feature for years now. I hope it will be solved some day 👍

In newer versions of TS you can do the following to let the type system know the properties are not initialized in the constructor:
class Person {

    public name!: string    // <--- notice the !:
    public age!: number

    constructor(props: { name: string, age: number }) {
        Object.assign(this, props)
    }
}

If you intend to definitely initialize a field through means other than the constructor (for example, maybe an external library is filling in part of your class for you), you can use the definite assignment assertion operator, !:

https://www.typescriptlang.org/docs/handbook/2/classes.html#--strictpropertyinitialization
Looks like you can take this a step further and set strictpropertyinitialization: false in your tsconfig to avoid having to do this altogether, but might be a good idea to still do a runtime check to make sure the data is being set properly.
Alternatively, you can also use declare to specify a property exists, something like
interface Data {
    name: string
    age: number
}

class Person implements Data {
    declare name: string
    declare age: number

    constructor(props: Data) {
        Object.assign(this, props)
    }
}

Still not great solutions, but they do feel a bit less hacky...


SWEEET JESUS YES FINALLY

<3 ya'll thank you so much for making this. I've wanted a nice wireguard gui for a long time.
I'm going to link it all over the https://github.com/pirate/wireguard-docs
(you can close this once you see it, just wanted to say thanks)

Nice! <3

@pirate I can't find wg-dashboard on your list. Am I missing something? 🙈

No sorry just been busy with a client project and packing for burning man haha, it's tracked here right now https://github.com/pirate/wireguard-docs
You're welcome to submit a PR for the places you think it would go best, otherwise I'll get around to adding it myself when I get back around Sep 5th.

Nevermind dude, we'll create a PR :)
Have fun at burning man! 🎉


Analogous of  pd.read_sql(sql_query, engine) in dask?

At the moment I've a query with bind parameters and what I do with pandas is
engine = create_engine("redshift+psycopg2://"+DBconn)
query = SQLtext(QUERY)
sql_query = query.bindparams(par1 =1, par2= 0)
df = pd.read_sql(sql_query, engine)

I was wondering if I can read the dataframe directly in dask without pass by pandas?

@rpanai did you see the discussions in https://github.com/dask/dask/pull/1181 and https://github.com/dask/dask/issues/943 implementing read_sql_table?
IIRC, the concern there was that with an arbitrary query, it may be difficult to construct the partitions / quantiles required for dask.dataframe index. Do you have any thoughts / experience here?

dd.read_sql_table does implement a number of features of its pandas equivalent, including the ability to use SQLalchemy objects in at least some situations. An indexing column is required, and one may pass explicit division markers, or else a separate query will be run to find them.
The form for dask takes a connection URI and creates the engine within each worker, since the engines hold state (transactions cache, etc.). Is there any advantage to passing the engine to pandas as opposed to the connection URI? Is there any advantage to making a binding to a SQText object rather than making an sqlalchemy table/selectable?

@TomAugspurger I saw the discussion before post. As at the moment I build the index from other columns after the table is returned I guess I could have problems with the method you suggested. In any case I'll try to give it a try.

pd.read_sql can accept a query string, e.g. with a where condition. From the documentation, it looks to me like dask's read_sql_table, like Pandas', accepts table and columns params, but not a where param or a raw query string (e.g. with a where condition).
For a use case of making queries filtered on some where condition, am I interpreting correctly that dask is not a suitable tool?

Awesome thanks Martin. An sqlalchemy expression should be plenty flexible enough for my purposes.
One more question - will the number of partitions also be the number connections simultaneously made to the database?

Yes, the access to partitions will be in parallel, by design. How many are simultaneous depend on the number of workers/threads and perhaps configuration on the DB end.

Awesome thanks Martin. An sqlalchemy expression should be plenty flexible enough for my purposes.
@MaxPowerWasTaken Could you please post an example of how to accomplish this using SQLAlchemy expressions?

IIRC, the concern there was that with an arbitrary query, it may be difficult to construct the partitions / quantiles required for dask.dataframe index. Do you have any thoughts / experience here?

@TomAugspurger MPP databases handle a similar situation either by requiring a distribution key (set of columns based on which the data needs to be partitioned/distributed) or defaulting to a hash of unique key for random distribution. If we make at least one of the above parameters mandatory, then it would provide Dask an efficient way to partition the data and related query, ingestion and processing while opening up a more flexible interface to work with databases. This would also enable the developer to make a decision on what processes should be pushed down to MPP database and which ones would be more sensible in Dask.

@martindurant @TomAugspurger
@kylejn27 is working on this problem and is close to a rough solution for simple queries. Would it be possible to discuss once he is ready?

Of course, happy to discuss in a PR or side-channel

I am unable to load the data into dask dataframe using sql query.
import dask.dataframe as dd
ddf = dd.read_sql_query("SELECT country, sum(sales) FROM data group by country", "sqlite:///csv_database.db", "id")

Error:
Traceback (most recent call last):
  File "/task.py", line 130, in <module>
    ddf = dd.read_sql_query("SELECT country, sum(sales) FROM data group by country", "sqlite:///csv_database.db", "id")
  File "/Users/rabiaiftikhar/Documents/venv/lib/python3.9/site-packages/dask/dataframe/io/sql.py", line 119, in read_sql_query
    q = sql.limit(head_rows)
AttributeError: 'str' object has no attribute 'limit'

Any help would be appreciated.
Thanks.

Hi @Rabia23! Thanks for posting here. Your question seems more like a usage question, so I would encourage you to post it over on our discourse page: https://dask.discourse.group/ Thanks for using Dask!

@Rabia23 : the sql parameter must match the description given in the docstring:
    sql : SQLAlchemy Selectable
        SQL query to be executed. TextClause is not supported

Please read SQLAlchemy's documentation on how to make a generic "selectable".

e.g., here is an example from dask's tests:
    query = sql.select([sql.column("number"), sql.column("name")]).select_from(
        sql.table("test")
    )


add padding for slider attributes

The slider value is rare in my experience, but just noticed it and the spacing is pretty squished. Should just be a matter of updating this rule in app.css (line 676) - v quick fix
.nav.filteritems li.attr-slider, .nav.filteritems li.attr-text, .nav.filteritems li.attr-date {
padding: 15px 30px;
}

Since this hasn't been worked on for a few months. I will close this issue and mark it as won't fix.

turns out it was a duplicate of #242 - which was fixed.


Make EntryTitle component responsive

Before

After

merged
https://github.com/up9inc/mizu/pull/922


Fetch with gzipped response returns assertion as body() on Android

Minimal example:
let formData = new FormData();
formData.append('file', {
  uri: 'file:///storage/emulated/0/Pictures/RCTCameraModule/IMG_20160304_110411.jpg',
  type: 'image/jpg',
  name: 'IMG_20160304_110411.jpg'
});

fetch(`https://example.com`, {
  method: 'POST',
  body: formData
}).then(response => response.text())
  .then(body => console.log) //  prints `ID1ID2: actual 0x00003c3f != expected 0x00001f8b`
  .catch(error => console.log);

OkHttp automatically inserts an Accept-Encoding: gzip header.
The server successfully receives the file and retuns a gzipped response. However, body() returns the above assertion from within OkHttp.
This particular service works fine on iOS, and also OkHttp via the java API on android.

React native 0.20.0
Android

@lexs - based on NetworkingModule blame this seems up your alley, please re-assign if I'm mistaken :)

@facebook-github-bot label Android

@danhawkes I can't repro this, I'm running the code below and see the html contents being printed to the console.
let formData = new FormData();

formData.append('file', {
  uri: 'file:///sdcard/Download/image.jpg',
  type: 'image/jpg',
  name: 'image.jpg'
});

fetch(`https://example.com`, {
  method: 'POST',
  body: formData
}).then(response => response.text())
  .then(console.log)
  .catch(console.log);

@lexs This may be an issue with our backend - there's a bug in WSO2 where it's adding the gzip header to the response but not actually gzipping the content. Will check and get back to you.

Yep, that's it. Turns out it worked with our 'native' OkHttp code because we're explicitly setting a Accept-Encoding: gzip,deflate, which has the effect of not returning the erroneous header.


freetype fails for x64-windows-static because pkgconfig cannot be found

Host Environment

OS: Windows

To Reproduce
Steps to reproduce the behavior:
./vcpkg install freetype:x64-windows-static
Failure logs
cmd /c "cd .. && "C:/Users/Public/QField/vcpkg/base/downloads/tools/cmake-3.22.2-windows/cmake-3.22.2-windows-i386/bin/cmake.exe" "C:/Users/Public/QField/vcpkg/base/buildtrees/freetype/src/6482de1748-c0b4903603.clean" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=C:/Users/Public/QField/vcpkg/base/packages/freetype_x64-windows" "-DFT_DISABLE_HARFBUZZ=ON" "-DFT_REQUIRE_ZLIB=ON" "-DFT_REQUIRE_BZIP2=ON" "-DFT_REQUIRE_PNG=ON" "-DFT_REQUIRE_BROTLI=ON" "-DFT_DISABLE_ZLIB=OFF" "-DFT_DISABLE_BZIP2=OFF" "-DFT_DISABLE_PNG=OFF" "-DFT_DISABLE_BROTLI=OFF" "-DCMAKE_MAKE_PROGRAM=C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=C:/Users/Public/QField/vcpkg/base/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v142" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=C:/Users/Public/QField/vcpkg/base/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=C:/Users/Public/QField/vcpkg/base" "-D_VCPKG_INSTALLED_DIR=C:/Users/Public/QField/build-static/vcpkg_installed" "-DVCPKG_MANIFEST_INSTALL=OFF""
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- The C compiler identification is MSVC 19.29.30133.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found ZLIB: C:/Users/Public/QField/build-static/vcpkg_installed/x64-windows/lib/zlib.lib (found version "1.2.12")
-- Found PNG: C:/Users/Public/QField/build-static/vcpkg_installed/x64-windows/lib/libpng16.lib (found version "1.6.37")
-- Found BZip2: C:/Users/Public/QField/build-static/vcpkg_installed/x64-windows/lib/bz2.lib (found version "1.0.8")
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
CMake Error at C:/Users/Public/QField/vcpkg/base/downloads/tools/cmake-3.22.2-windows/cmake-3.22.2-windows-i386/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find BrotliDec (missing: BROTLIDEC_LIBRARIES)
Call Stack (most recent call first):
  C:/Users/Public/QField/vcpkg/base/downloads/tools/cmake-3.22.2-windows/cmake-3.22.2-windows-i386/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  builds/cmake/FindBrotliDec.cmake:51 (find_package_handle_standard_args)
  C:/Users/Public/QField/vcpkg/base/scripts/buildsystems/vcpkg.cmake:841 (_find_package)
  CMakeLists.txt:288 (find_package)

Additional context
freetype should depend on vcpkg-pkgconfig-get-modules
    {
      "name": "vcpkg-pkgconfig-get-modules",
      "host": true
    }

see https://github.com/freetype/freetype/blob/master/builds/cmake/FindBrotliDec.cmake#L22

FTR it is not vcpkg-pkgconfig-get-modules. That port only provide portfile functions.

You are right, that didn't fix it, sorry for the quick shot

Might only appear in manifest mode or certain dependency resolution orders. Fix supplied in #25957 , follows the approach in ports/gts/portfile.cmake and many more

Since this issue can't be reproduced stably, so I am closing this issue for now. If someone could reproduce this issue, please provide the repro steps and reopen this issue.


README.md: clarify configuration

I had a hard time understanding the beginning of the configuration section.
It referred to concepts I did not understand, and whichhad not been
previously introduced.
I propose the following rewrite of a couple of paragraphs.
Fixes #382
Signed-off-by: Nadav Har'El<EMAIL_ADDRESS>

Looks good to me


Use a More Correct (TM) directory for local data

What's the current status regarding XDG-directories support?
Issue #1148 is fixed, and if I set $CARGO_HOME to $HOME/.config/cargo, it is correctly used without creating a .cargo inside. But when $CARGO_HOME is not set, we don't seem to use the XDG directories by default; we don't even seem to look at it at all.

What's the current status regarding XDG-directories support?

The status is that it’s not supported, as you found out. This PR being shown as "merged" is a bug.

Is there a new bug report about getting this supported?  Snowflake environment
variables are nice and all but when you have 40+, not so much.

@Earnestly I could not find an open issue. Please feel free to file one.


feature: Blogs UI Improvement

Issue Fix :green_heart:
Closes #40
Problem :fire:

Blogs Page UI Improvment

Solution :rocket:

Card UI
Proper Spacing and padding
Mobile Responsive

Screen-Shot :framed_picture:
Web View

Mobile View

Additional context

If any changes require, plz don't hesitate to approach :smile:

Looks great merging it


Update gulpfile.js

Fixed some minor typos to make the comments look natural and friendly. First PR tribute to Kong. Hope to share a memorable Hacktoberfest 2018 and have a nice sweet T-Shirt from Kong ^^

NOTE: Please read the CONTRIBUTING.md guidelines before submitting your patch,
and ensure you followed them all:
https://github.com/Kong/docs.konghq.com/blob/master/CONTRIBUTING.md
Summary
SUMMARY_GOES_HERE
Full changelog

[Edited docs to ...]
[Added cool new feature ...]
...

Issues resolved
Fix #XXX

Checklist:

[x] Commit message & atomicity checked
[x] Documentation
[x] Spellchecked my updates
[x] Ready to be merged

Hi @khang72, thanks for your PR! According to the Hactoberfest guidelines, small character changes like this don't qualify, especially since these are in code comments and not the user-facing documentation itself.
If you'd like to make a change that will earn you Hactoberfest and  Kong t-shirts, I'd encourage you to take a look at issues with good-firs-issue labels, or read through the documentation to find a place where you can help make it clearer or more useful.
If you would like some help finding a good contribution or need clarification on an issue you'd like to work on, please feel free to email me: judith at konghq dot com. I'm excited to help you get a qualifying contribution in! 🙂 Happy hacking!


getusermedia audio true "throttles" browser volume

I have a problem when with getusermedia when the audio is set to "true".  The browser volume gets "throttled" to about a 30% reduction in volume and frequency range. I've tried changing all the audio constraints but any streaming audio on the browser (even different tabs) still get affected. Is there a solution for this?

Please consult a forum like Stackoverflow. This bug tracker is about MDN Web Docs.


[2.4 Backport] unable to recognize "": no matches for kind "Issuer" in version "certmanager.k8s.io/v1alpha1"

Backport for: https://github.com/rancher/rancher/issues/26674

Available to test with v2.4.9-rc1

Same checks done as the original fix here https://github.com/rancher/rancher/issues/26674#issuecomment-697962578

Rancher is installed successfully with cert-manager both v0.15.0 and v1.0.1

all workloads in the system project in local cluster are active
adding a custom cluster is successful


Security question: Why are contextIsolation: false, and nodeIntegration: true, necessary?

Hi, I'm coming from Quasar, which is another Vue project that integrates with Electron through vite.
I want some features from Nuxt 3, so I'm looking for an alternative.
The electron security checklist says nodeIntegration: true and contextIsolation: false are a security issue.
I got the Quick-start running, but I'm unable to see content without disabling these security features.
Is there a reason this must be done for nuxt-electron?
This is the minimum nuxt-electron webPreferences config to see content:
  win = new BrowserWindow({
    webPreferences: {
      preload,
      // nodeIntegrationInWorker: true,
      contextIsolation: false,
      nodeIntegration: true,
      // webSecurity: false,
    },
  });

Quasar's electron security checklist has a strong warning about this, and it's not necessary to disable these security features in development to get HMR.
What's different about Nuxt that requires disabling them?
You can try Quasar like this:
# accept all the defaults
yarn create quasar
# install the cli
yarn global add @quasar/cli
# add electron mode and run dev
quasar mode add electron
quasar dev --mode electron

In the file src-electron/electron-main.js, around line 20, the app instantiates the main window with contextIsolation and w/o nodeIntegration:
  mainWindow = new BrowserWindow({
    icon: path.resolve(__dirname, 'icons/icon.png'), // tray icon
    width: 1000,
    height: 600,
    useContentSize: true,
    webPreferences: {
      contextIsolation: true,
      // More info: https://v2.quasar.dev/quasar-cli-vite/developing-electron-apps/electron-preload-script
      preload: path.resolve(__dirname, process.env.QUASAR_ELECTRON_PRELOAD)
    }
  })

How can I enable these security features in nuxt-electron?
Thank you!

The contextIsolation: false, and nodeIntegration: true is not necessary, It seems that the latest electron-vite template project has already closed theme.

@caoxiemeihao @yejimeiming yes, you are correct.  Thank you!


Refactor invalid token colors

Fixes #218
Compare with this screenshot, where align is both visible and styled appropriately.

Note: This is just for the light theme since it was broken, but similar improvements could be made to the dark theme as well. I can add similar fixes to this PR for the dark themes as well.

Note: This is just for the light theme since it was broken, but similar improvements could be made to the dark theme as well. All in good time! :)

align attribute is deprecated in HTML. Can you please post before/after screenshots of non-deprecated attributes? Thanks!

I only modified the invalid/deprecated scope, for the light theme.
Before:

After:

As you can see, valid attributes are still blue… this only affects the deprecated attribute.

Thanks!

Can you please resolve the conflicts? Then I will merge. Thanks!

Hey @jlmakes, is this still open? I just ran into this issue myself.

I deleted the original fork. I'll apply the fix to the latest branch and open a new PR.


Multiprocessing?

When I run sd.play in a flask app or ipython terminal, I get some sonic artifacts when there is additional load on Python.  Have you tried running SD in multiprocessing, any advice on how to do that?

FWIW, I hammered out a test class in multiprocessing. I haven't tested it on my other machine yet, so I can't say if it helped with the blips and bops.  For those who need MP, it might help:

import numpy as np
from multiprocessing import Process, Queue

fs = 48000
rand_data = np.random.rand(48000 * 5) * 0.1

class AudioMan(Process):
    """Audio Manager
    The multiprocessing.Process class causes two
    instances of the class to exist. The first is in the parent
    process. When .start is called, a second process and instance
    are created. Sounddevice is imported in .run to avoid importing is
    twice, which causes some kind of PortAudio crash."""

    def __init__(self):
        self.state = 'stopped' # Set to quit to exit.
        self.q = Queue()
        self.sd = None
        super(AudioMan, self).__init__()

    def run(self):
        # Sounddevice can't handle being imported in multiple processes.
        # importing it in `run` causes it to only be imported in the
        # spawned process.
        import sounddevice as sd
        self.sd = sd
        while self.state != 'quit':
            cmd = self.q.get()
            if cmd == 'quit':
                self.state = 'quit'
            else:
                # Example: pass ('play', 'foo.wav')
                if isinstance(cmd, tuple):
                    method, args = cmd
                    getattr(self, method)(args)

    def play(self):
        self.q.put(('_play', 'foo.wav'))

    def _play(self, fn):
        self.sd.play(rand_data, 48000, device=1)
        print(fn)

    def stop(self):
        self.q.put(('_stop', None))

    def _stop(self, _):
        self.sd.stop()

    def quit(self):
        self.q.put('quit')

FWIW, I hammered out a test class in multiprocessing. I haven't tested it on my other machine yet, so I can't say if it helped with the blips and bops.  For those who need MP, it might help:

import numpy as np
from multiprocessing import Process, Queue

fs = 48000
rand_data = np.random.rand(48000 * 5) * 0.1

class AudioMan(Process):
    """Audio Manager
    The multiprocessing.Process class causes two
    instances of the class to exist. The first is in the parent
    process. When .start is called, a second process and instance
    are created. Sounddevice is imported in .run to avoid importing is
    twice, which causes some kind of PortAudio crash."""

    def __init__(self):
        self.state = 'stopped' # Set to quit to exit.
        self.q = Queue()
        self.sd = None
        super(AudioMan, self).__init__()

    def run(self):
        # Sounddevice can't handle being imported in multiple processes.
        # importing it in `run` causes it to only be imported in the
        # spawned process.
        import sounddevice as sd
        self.sd = sd
        while self.state != 'quit':
            cmd = self.q.get()
            if cmd == 'quit':
                self.state = 'quit'
            else:
                # Example: pass ('play', 'foo.wav')
                if isinstance(cmd, tuple):
                    method, args = cmd
                    getattr(self, method)(args)

    def play(self):
        self.q.put(('_play', 'foo.wav'))

    def _play(self, fn):
        self.sd.play(rand_data, 48000, device=1)
        print(fn)

    def stop(self):
        self.q.put(('_stop', None))

    def _stop(self, _):
        self.sd.stop()

    def quit(self):
        self.q.put('quit')

I don't really have any experience with multiprocessing, but I would have suggested what you have already done in your code example:

import sounddevice only in one process
communicate with a queue

In general, I would advise to avoid multiprocessing unless it is absolutely necessary.
There are already a few issues related to multiprocessing: #120, #147, #154, #302, ...

I get some sonic artifacts when there is additional load on Python.

Did you manage to reduce/avoid those with multiprocessing?
Another possible approach would be to use a callback function implemented in C (or another compiled language) and make sure that the callback function never takes the GIL. I've experimented with that approach at https://github.com/spatialaudio/python-rtmixer.
A similar thing might even work with Cython, but I've not tried this.

I don't really have any experience with multiprocessing, but I would have suggested what you have already done in your code example:

import sounddevice only in one process
communicate with a queue

In general, I would advise to avoid multiprocessing unless it is absolutely necessary.
There are already a few issues related to multiprocessing: #120, #147, #154, #302, ...

I get some sonic artifacts when there is additional load on Python.

Did you manage to reduce/avoid those with multiprocessing?
Another possible approach would be to use a callback function implemented in C (or another compiled language) and make sure that the callback function never takes the GIL. I've experimented with that approach at https://github.com/spatialaudio/python-rtmixer.
A similar thing might even work with Cython, but I've not tried this.


Create a release schema

To make image releases independent from Dataverse releases, a new schema needs to be implemented.
It needs to carry a release info for the image and should contain the Dataverse release used inside the image.
The docker tags need to reflect this - tagged images are not updated by default in Kubernetes, this is only done for "latest" or untagged.

I googled for "Kubernetes schema" but I'm not sure what this issue is about. Can you please explain a little more, @poikilotherm ? Thanks!

I think I will just stick to Dataverse upstream release numbering.
That number is used for image tags, too. Updates to tagged images, e. g. for security purposes, are released under the same tag.
Tagged images are by default image pull policy not updated on the local K8s cluster. This might be changed later when needed.


sanity.system assertion failure on x86-64_linux_xl

TestIBMJlmRemoteMemoryAuth_0 and TestIBMJlmRemoteMemoryNoAuth_0 seem to fail when LT1 completes its workload before CL1 has finished performing monitoring actions on LT1.
I don't have a failure at OpenJ9 jenkins ci job, but this is seen when running on a CENT6 docker container.  Same job as this one.
https://ci.eclipse.org/openj9/job/Test_openjdk11_j9_sanity.system_x86-64_linux_xl_Nightly/
01:06:01.899  STF 02:41:16.030 - +------ Step 5 - Wait for the processes to complete
01:06:01.899  STF 02:41:16.030 - | Wait for processes to meet expectations
01:06:01.899  STF 02:41:16.030 - |   Processes: [LT1, CL1]
01:06:01.899  STF 02:41:16.030 - |
01:06:01.899  STF 02:41:16.031 - Monitoring processes: CL1 LT1
01:06:02.868  CL1 j> 2019/06/03 02:41:17.013 ServerURL=service:jmx:rmi:///jndi/rmi://localhost:1234/jmxrmi
01:06:09.688  CL1 j> 2019/06/03 02:41:22.780 Monitored VM not ready at Jun 3, 2019, 2:41:22 AM (attempt 0).
01:06:09.688  CL1 j> 2019/06/03 02:41:22.781 Wait 5 secs and trying again...
01:06:15.055  CL1 j> 2019/06/03 02:41:28.702 Connection established!
01:06:16.472  CL1 j> 2019/06/03 02:41:30.407 Starting to write data
01:10:29.855  STF 02:45:38.453 - **FAILED** Process LT1 has ended unexpectedly
01:10:29.855  CL1 .......................j> 2019/06/03 02:45:38.320 Exiting as JVM we are connected to has finished
01:10:29.855  CL1 stderr Exception in thread "main" java.lang.AssertionError
01:10:29.855  CL1 stderr 	at org.junit.Assert.fail(Assert.java:86)
01:10:29.855  CL1 stderr 	at org.junit.Assert.fail(Assert.java:95)
01:10:29.855  CL1 stderr 	at net.openj9.test.jlm.remote.MemoryProfiler.getStatsViaProxy(MemoryProfiler.java:217)
01:10:29.855  CL1 stderr 	at net.openj9.test.jlm.remote.MemoryProfiler.main(MemoryProfiler.java:119)
01:10:29.855  STF 02:45:38.454 - Monitoring Report Summary:
01:10:29.855  STF 02:45:38.454 -   o Process CL1 ended with exit code (1) and not the expected exit code/s (0)
01:10:29.855  STF 02:45:38.454 -   o Process LT1 has ended unexpectedly
01:10:29.855  STF 02:45:38.455 - Killing processes: CL1 LT1
01:10:29.855  STF 02:45:38.455 -   o Process LT1 is not running
01:10:29.855  STF 02:45:38.455 -   o Process CL1 is not running

fyi @Mesbah-Alam

The client is complaining that the server process has finished, while the client is still attempting to make JLM API calls to the server.
Discussing with Joe revealed that - on this particular occasions there more than normal number of CPU's being used in the server process - which might be the reason for the server to finish faster than usual.
We had previously increased workload on the server process to make it run faster - but that had its own side effect - of taking up too much memory.
Regardless, I feel the test strategy used in the JLM system tests should be revisited in general - we likely don't want the client to to fail the test if the server stops. The test should be more robust.

This is fixed by https://github.com/eclipse/openj9-systemtest/pull/118.


Front end / back end, user authentication questions

Thanks for making paypal-sdk! Is your library intended for use in a Dart-based back end only, or can it also be used in the front end? How does the paying user authenticate?
https://developer.paypal.com/api/rest/ is a bit vague, but it suggests that without the client (payee) secret, a basic PayPal button is still possible, so I imagine it's possible to run the library on the front end?
If the client secret is used, that would have to be protected in the back end, and there would be no need to run this module on the front end, right?
Also, how is the paying user's authentication handled? Must passwords be passed to the back end, or is it up to the front end to open a webview at paypal.com, and to pass an access token to the back end? How long is that token valid? Thanks! : )

You're welcome. The library is intended to be used in the back end although there's nothing stopping you from using it's functions in a front end app.
It does not handle payments. In the app I developed the sdk for I use PayPal buttons which I host in an in-app webview. When these buttons are clicked the native browser is opened to the paypal site and the user enters their credentials there to complete the purchase so your app doesn't need to worry about handling sensitive tokens. When the transaction is completed you'll get an order id through a callback in your in-app webview. This is where the paypal-sdk is useful as it allows you to query the status of a purchase or ongoing subscription, typically from your backend.
It's also worth setting up a webhook on your backend so that you can get notifications whenever the status of a purchases changes which is useful for refunds or subscription cancellations.

Thanks for the clarification. : ) By "native browser," do you mean the default browser? If using the that is possible, it would prevent requiring the user from having to copy and paste passwords between their default browser and the webview.
It would be helpful for people new to your library if this your above text were documented. Also, I don't know if this part is out of scope, but if there was some code showing how you open the webview, get a callback, and set up web hooks, I'm sure that would help people understand how to so use it. Thanks! ; )

Yes exactly whatever their default browser is. I would consider setting up the webview/callbacks out of scope, the sdk is purely to facilitate calling their REST API which has nothing to do with processing actual payments however I might add an example anyway as you're not the first to ask me about this!


Implement multipart s3 history archiver.

Fixes #3002.
Remove MaxRetries, this was a left over from the old interface

Following unit test are failing, can you please fix them?

--- FAIL: TestVisibilityArchiverSuite/TestArchiveAndQuery (0.00s) --
  | visibilityArchiver_test.go:508:
  | Error Trace:	visibilityArchiver_test.go:508
  | Error:      	"[]" should have 2 item(s), but has 0
  | Test:       	TestVisibilityArchiverSuite/TestArchiveAndQuery

--- FAIL: TestVisibilityArchiverSuite/TestArchiveAndQueryPrecisions (0.01s) --
  | visibilityArchiver_test.go:461:
  | Error Trace:	visibilityArchiver_test.go:461
  | Error:      	"[]" should have 2 item(s), but has 0
  | Test:       	TestVisibilityArchiverSuite/TestArchiveAndQueryPrecisions
  | Messages:   	Iteration %!(EXTRA int=0)

--- FAIL: TestVisibilityArchiverSuite/TestQuery_Success_NoNextPageToken (0.00s) --
  | visibilityArchiver_test.go:305:
  | Error Trace:	visibilityArchiver_test.go:305
  | Error:      	"[]" should have 2 item(s), but has 0
  | Test:       	TestVisibilityArchiverSuite/TestQuery_Success_NoNextPageToken

--- FAIL: TestVisibilityArchiverSuite/TestQuery_Success_SmallPageSize (0.00s) --
  | visibilityArchiver_test.go:328:
  | Error Trace:	visibilityArchiver_test.go:328
  | Error:      	Expected value not to be nil.
  | Test:       	TestVisibilityArchiverSuite/TestQuery_Success_SmallPageSize

Fixed the failing unit tests as well

Coverage increased (+0.5%) to 67.57% when pulling 711d0336bb90762d98165616b7698cf5e411d26e on jontro:s3-archival-multipart into daf446fff310f8b69df18d735e4a9fa8b48c5fbe on uber:master.


Uploaded GIF files are converted to PNG by default

Issue Summary
In release 2.1.0 GIF files are converted to PNG files by default, likely the result of https://github.com/TryGhost/Ghost/pull/9837. Is this desired? Previously I was able to upload GIF files using the "plus" in the editor, or by dragging the GIF into the browser. Now, after clicking publish the GIF maintains the .gif extension but does not play. After downloading the file I can see that it has been converted to a PNG.
Upon adding the following configuration to my config file the ability to upload & publish GIFs is restored.
"imageOptimization": {
    "resize": false
 }

To Reproduce

Create story on release 2.1.0 and upload a GIF.
See that the GIF is playing.
Click publish and view the post or refresh the editor. The GIF does not play.

Downloading and inspecting the file we can see it has been converted to a PNG even though it has kept the .gif extension.
Technical details:

Ghost Version: 2.1.0
Node Version: 8.11.4
Browser/OS: Chrome/Windows

Confirmed. Not always apparent in the editor because Chrome sometimes doesn't switch from the data: URL used for preview to the final URL when the upload finishes but is definitely visible on the published page.

@gargol I think we close this issue, because of https://github.com/TryGhost/Ghost/pull/9853#issuecomment-419021047

@kirrg001 agreed :+1:


Remove the md-menu padding by default

What is affected?
Component, Theming
Description
Can we remove the default padding from the md-menu?
I noticed there is a .item-padding class that adds padding, which looks like this:
.item-padding {
    padding-block: 8px;
}

The padding in the md-menu makes the menu appear unattractive.

Reproduction
Check this https://material-web.dev/components/menu
Workaround
No
Is this a regression?
No or unsure. This never worked, or I haven't tried before.
Affected versions
1.5.0
Browser/OS/Node environment

https://m3.material.io/components/menus/specs#cd6409d5-9523-4099-9db7-42d1e1d2d194
Look here. It seems that the menu should have top and bottom padding equals to 8px

As well as left and right paddings

@VBasko Thank you for sharing the link. I'm uncertain why it needs to be that way in the specs, but removing the padding does seem to enhance the appearance of the hover style.

Closing as WAI since the spec adds padding to the menu. In the future, this could be customizable by spacing tokens.


Complete the League Checklist

fixes the following items:

Switch to League\ namespace
PSR-2 compliance
PSR-4 compliance
Added/updated README.md, CONTRIBUTING.md, CHANGELOG.md to follow thephpleague/skeleton

closes zackkitzmiller/tiny-php#9

@philsturgeon, take a look?

@philsturgeon, take a look?

Looks good, once Phil signs off, we're done here.

Looks good to me!
Here is the package submission process
Dunno if you wanna project lead zack, or @kylestev does, or if we want to find somebody. Either way posting on the ML would be a good idea. :)

@philsturgeon I'll lead.

:beers:
On Fri, Jun 19, 2015 at 08:34 Zack Kitzmiller<EMAIL_ADDRESS>wrote:

@philsturgeon https://github.com/philsturgeon I'll lead.
—
Reply to this email directly or view it on GitHub
https://github.com/zackkitzmiller/tiny-php/pull/16#issuecomment-113549876
.


Add GPRC for nearvector call

Codecov Report
Patch coverage: 89.85% and project coverage change: -0.04 :warning:

Comparison is base (8f7e154) 96.14% compared to head (83216e7) 96.11%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #293      +/-   ##
==========================================
- Coverage   96.14%   96.11%   -0.04%
==========================================
  Files          61       64       +3
  Lines        7295     7720     +425
==========================================
+ Hits         7014     7420     +406
- Misses        281      300      +19

Flag
Coverage Δ

unittests
?

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

Impacted Files
Coverage Δ

integration/test_timeout.py
100.00% <ø> (ø)

weaviate/backup/backup.py
100.00% <ø> (ø)

weaviate/gql/filter.py
92.85% <ø> (+5.71%)
:arrow_up:

weaviate/schema/crud_schema.py
79.01% <ø> (ø)

weaviate_grpc/weaviate_pb2.py
41.66% <41.66%> (ø)

weaviate_grpc/weaviate_pb2_grpc.py
57.89% <57.89%> (ø)

weaviate/gql/get.py
96.20% <78.26%> (-1.41%)
:arrow_down:

weaviate/connect/connection.py
91.78% <81.08%> (+1.73%)
:arrow_up:

weaviate/gql/multi_get.py
86.36% <86.36%> (ø)

weaviate/client.py
98.50% <90.00%> (+0.20%)
:arrow_up:

... and 13 more

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

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


Bump GA iOS version to 3.17

Bumped the iOS GA version in an attempt to fix an issue with GTM loading json files: https://code.google.com/p/analytics-issues/issues/detail?id=857
Issue still exists in 3.17, but might as well upgrade anyway.

Thanks for the PR! :)


broken urls

Looks like some URLs are broken (consistently failing):
https://github.com/pybamm-team/PyBaMM/runs/2579697833

looks like most of these urls appeared after @Saransh-cpp committed the parameterization notebook, not sure why

looks like most of these urls appeared after @Saransh-cpp committed the parameterization notebook, not sure why

Yes, I just had a look on this and I don't know why but they somehow popped up in the plots.


Optimise pagemap synchronisation

Do only one fence when extending the pagemap.

I take it this wasn't discussed at sync?

No, we missed it.


docs: add orchestrator and relayer documentation

Overview
Closes https://github.com/celestiaorg/orchestrator-relayer/issues/2

Checklist

[ ] New and updated code has appropriate documentation
[ ] New and updated code has new and/or updated testing
[ ] Required CI checks are passing
[ ] Visual proof for any user facing features like CLI or documentation updates
[ ] Linked issues closed with keywords

The CI will fail for some links because they are added in the other PRs.


Thumbnails disappeared after source delete

Description
When I delete the model's source (fbx/obj), then thumbnails are disappearing. And appears an error when I try to select this render without a thumbnail:
Uncaught TypeError: Cannot read properties of null (reading 'get')
    at RenderThumbnailRenderer._watchMaterials (editor.js:10554)
    at RenderThumbnailRenderer.render (editor.js:10678)
    at RenderAssetInspectorPreview._renderPreview (editor.js:88768)
    at sentryWrapped (helpers.ts:87)

Also, this render appears on the scene as a ghost entity (not able to select or delete)
Steps to Reproduce

Import fbx/obj
Delete fbx/obj (source), so .glb only exist
Click on render or entity with render

Project: https://playcanvas.com/project/833028

On separate note, why are you deleting the FBX?


Favicon support

Hi,
I have create Favicon Plugin.
When I sent Hosting Request to Jenkins JIRA, they suggest that integrate it into Simple Theme Plugin.
This PR adds favicon support into this plugin.

Thank you for this pull request! Please check this document for how the Jenkins project handles pull requests.

Ping @jenkinsci/code-reviewers would be great to review.
That PR may be an sensible alternative for users to the creation of a brand new plugin only for the favicon addition.
(Cf. HOSTING-44 if need be)

Ping @buzztaiki
This plugin is actually to be adopted, as you wanted to have your favicon plugin forked, I suppose you'd be interested to become the maintainer of the simple-theme-plugin right?


Make container ID as optional prop

This PR enables the ability to modify the div to avoid collision with existing ID's or define multiple elements

cc @francineemilia @icaldana @AdaltonLeite @AleFossati @lemazzo

Olá @luisguerra, assim que possível faremos a revisão e teste das alterações.
Obrigado pela contribuição!

(Sorry I don't speak Portuguese 😅 , hello From Mexico, so I will write in English)
Thanks for feedback @AdaltonLeite, makes sense. I have made the requested changes

@luisguerra hey, could you please check @AleFossati comments? Thank you a lot!


Missing field error for bulkref

Hi, I have a similar issue to #13, except with con.bulkref - when a field does not exist for a subset of securities I'm trying to query, it throws an error for the entire thing.
test = ['594918BD5 Corp','594918BE3 Corp','88428LAA0 Corp']
bbg = con.bulkref(test, ['INDEX_LIST'])

The query works for the first two securities but not the last, so the whole query fails instead of just returning NaN where appropriate (error reproduced below).
securityData = {
  security = "88428LAA0 Corp"
  eidData[] = {
  }
  fieldExceptions[] = {
  }
  sequenceNumber = 2
  fieldData = {
  }
}

Traceback (most recent call last):

  File "<ipython-input-142-61c895cb719c>", line 1, in <module>
    bbg = con.bulkref(test, ['INDEX_LIST'])

  File "C:\Temp\Jay\Anaconda\envs\py35\lib\site-packages\pdblp\pdblp.py", line 378, in bulkref
    data = self._parse_bulkref(flds)

  File "C:\Temp\Jay\Anaconda\envs\py35\lib\site-packages\pdblp\pdblp.py", line 404, in _parse_bulkref
    if not fieldData.getElement(fld).isArray():

  File "C:\Temp\Jay\Anaconda\envs\py35\lib\site-packages\blpapi\element.py", line 347, in getElement
    _ExceptionUtil.raiseOnError(res[0])

  File "C:\Temp\Jay\Anaconda\envs\py35\lib\site-packages\blpapi\exception.py", line 145, in raiseOnError
    _ExceptionUtil.raiseException(errorCode, description)

  File "C:\Temp\Jay\Anaconda\envs\py35\lib\site-packages\blpapi\exception.py", line 137, in raiseException
    raise errorClass(description, errorCode)

NotFoundException: Attempt to access unavailable sub-element 'INDEX_LIST' of element 'fieldData'. (0x0006000d)

This looks like a bug. I agree the behaviour should be similar to ref in this scenario.

Similar to ref, there can be empty fields as well as NOT_APPLICABLE_TO_REF_DATA. For example
con.bulkref('CL1 Comdty', ['FUT_DLVRBLE_BNDS_ISINS'])

DEBUG:root:Sending Request:
 ReferenceDataRequest = {
    securities[] = {
        "CL1 Comdty"
    }
    fields[] = {
        "FUT_DLVRBLE_BNDS_ISINS"
    }
    overrides[] = {
    }
}

DEBUG:root:Message Received:
 ReferenceDataResponse = {
    securityData[] = {
        securityData = {
            security = "CL1 Comdty"
            eidData[] = {
            }
            fieldExceptions[] = {
                fieldExceptions = {
                    fieldId = "FUT_DLVRBLE_BNDS_ISINS"
                    errorInfo = {
                        source = "908::bbdbd10"
                        code = 9
                        category = "BAD_FLD"
                        message = "Field not applicable to security"
                        subcategory = "NOT_APPLICABLE_TO_REF_DATA"
                    }
                }
            }
            sequenceNumber = 0
            fieldData = {
            }
        }
    }
}

As well as
con.bulkref(['88428LAA0 Corp'], ['INDEX_LIST'])

DEBUG:root:Sending Request:
 ReferenceDataRequest = {
    securities[] = {
        "88428LAA0 Corp"
    }
    fields[] = {
        "INDEX_LIST"
    }
    overrides[] = {
    }
}

DEBUG:root:Message Received:
 ReferenceDataResponse = {
    securityData[] = {
        securityData = {
            security = "88428LAA0 Corp"
            eidData[] = {
            }
            fieldExceptions[] = {
            }
            sequenceNumber = 0
            fieldData = {
            }
        }
    }
}

However unlike ref(), the fieldData returned can have multiple sub values. For example for DVD_HIST, from con.bulkref("101 HK EQUITY", "DVD_HIST")
fieldData = {
    DVD_HIST[] = {
        DVD_HIST = {
            Declared Date = 1986-09-26
            Ex-Date = 1986-10-31
            Record Date = 1986-11-01
            Payable Date = 1986-11-17
            Dividend Amount = 0.720000
            Dividend Frequency = "Semi-Anl"
            Dividend Type = "Final"
        }
        DVD_HIST = {
            Declared Date = 1986-01-01
            Ex-Date = 1986-04-11
            Record Date = 1986-04-14
            Payable Date =
            Dividend Amount = 0.280000
            Dividend Frequency = "Semi-Anl"
            Dividend Type = "Interim"
        }
    [ommited]
}

This makes assigning values NaN which are not applicable, similar to how it is treate in ref() discussed in #6 problematic since the actual value names not just the values are unknown. For this reason I believe that bulkref is it better to just omit rows for the above two scenarios. So for example both con.bulkref('CL1 Comdty', ['FUT_DLVRBLE_BNDS_ISINS']) and con.bulkref(['88428LAA0 Corp'], ['INDEX_LIST']) would return empty DataFrames

Ok that makes sense, but what's the best way to handle the error such that the query just returns results for securities with valid values for that field, rather than breaks completely?
This works, but is there a smarter way to do it for very large lists of securities?
test = ['594918BD5 Corp','594918BE3 Corp','88428LAA0 Corp']
bbg = pd.DataFrame(columns=['ticker','field','name','value','position'])
for i in range(0, len(test)):
try:
temp = con.bulkref(test[i], ['INDEX_LIST'])
bbg = bbg.append(temp)
except:
print('Error - ' + test[i])

Awesome thanks!

This is not yet released but if you install the latest version of master the issue should be resolved.


Adds 'rq>0.7' version support

Duplicate of https://github.com/jezdez/Flask-RQ2/pull/17 but with fixed isort.
I suggest adding .isort.cfg because of difference between running tests with and without virtualenv (https://github.com/timothycrosley/isort/issues/498)

Closed by #41.


cannot use this source to install calabash

zhangjingdeMacBook-Pro:~ zhangjing$ gem install calabash-cucumber
ERROR:  Error installing calabash-cucumber:
invalid gem: package is corrupt, exception while verifying: undefined method `size' for nil:NilClass (NoMethodError) in /Users/zhangjing/.calabash/cache/calabash-cucumber-0.16.4.gem
only iOS has problem, calabash-android is fine
Please help!

Hi @Stellea
谢谢反馈！
麻烦运行一下 gem install -V calabash-cucumber 并贴一下详细的日志。
我测试一下正常：
~  gem install calabash-cucumber
Fetching: CFPropertyList-2.3.2.gem (100%)
Successfully installed CFPropertyList-2.3.2
Fetching: command_runner_ng-0.0.2.gem (100%)
Successfully installed command_runner_ng-0.0.2
Fetching: retriable-2.0.2.gem (100%)
Successfully installed retriable-2.0.2
Fetching: run_loop-1.5.6.gem (100%)
Successfully installed run_loop-1.5.6
Fetching: httpclient-<IP_ADDRESS>.gem (100%)
Successfully installed httpclient-<IP_ADDRESS>
Fetching: geocoder-1.2.11.gem (100%)
geocoder's executable "geocode" conflicts with geocoder-kb
Overwrite the executable? [yN]  y
Successfully installed geocoder-1.2.11
Fetching: multi_test-0.1.2.gem (100%)
Successfully installed multi_test-0.1.2
Fetching: gherkin-2.12.2.gem (100%)
Building native extensions.  This could take a while...
Successfully installed gherkin-2.12.2
Fetching: cucumber-1.3.20.gem (100%)
Successfully installed cucumber-1.3.20
Fetching: slowhandcuke-0.0.3.gem (100%)

*****************************************************************
* To use the slowhandcuke formatter, simple add                 *
*   --format 'Slowhandcuke::Formatter'                          *
* to your cucumber.yml, Rakefile, or command line call          *
*****************************************************************

Successfully installed slowhandcuke-0.0.3
Fetching: sim_launcher-0.4.13.gem (100%)
Successfully installed sim_launcher-0.4.13
Fetching: edn-1.1.0.gem (100%)
Successfully installed edn-1.1.0
Fetching: calabash-common-0.0.2.gem (100%)
Successfully installed calabash-common-0.0.2
Fetching: calabash-cucumber-0.16.4.gem (100%)
Successfully installed calabash-cucumber-0.16.4
14 gems installed

thank you, need to clear cache


add RemoveModal

Add RemoveModal from rbac-ui

One styling thing - the title should be black like so

@InsaneZein just some nitpicking to be consistent with WarningModal as much as possible, thank you! 🙂

@fhlavac I've added the RemoveModal functionality in WarningModal like we talked about.

@InsaneZein looks great!
Sorry for nitpicking around the prop names, just want to make it as consistent with PF as possible to avoid future API breaking changes for target apps


modify Docker file to use new monitor api to check docker status

should be done after https://github.com/vmware/harbor/issues/4231

Code merged.


UI Controls learning document and code example with Xamarin Android

The link below provides good learning resource.
https://docs.microsoft.com/en-us/xamarin/android/user-interface/
However, there are many controls that I cannot find learning resource and code example.
For example some controls (e.g.ExpandableListView etc) on Visual Studio Toolbox are below.
Is there a one stop learning resource and code example for these controls?

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

ID: e1e88190-5c02-5765-2353-d0df4b82dbbe
Version Independent ID: 35e92af7-c1e9-afc0-cdbf-55ceeb89eeb1
Content: Creating User Interface with Xamarin.Android - Xamarin
Content Source: docs/android/user-interface/index.md
Product: xamarin
Technology: xamarin-android
GitHub Login: @conceptdev
Microsoft Alias: crdun

Thanks for your question @PingPongSet, the only Android controls we have Xamarin/C#-specific documentation for are listed on this controls page, as well as the layouts here.
For the others, the next best place to start is Google's Android user interface and android.widget docs.


MudMenuItem: Fix icon spacing

Description
fixes #9097
Icon spacing was changed to accommodate all icon sizes.
Before:

Now:

How Has This Been Tested?

visually
Type of Changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation (fix or improvement to the website or code docs)

Checklist

[x] The PR is submitted to the correct branch (dev).
[x] My code follows the code style of this project.
[ ] I've added relevant tests.

@henon @danielchalmers @ScarletKuro ready for review ✌
Not sure whats up with the test, passes locally.

Hmm I definitely prefer the consistent alignment before. Maybe it could take the space of the biggest icon out of all of them? So if there was only smalls it would use the smallest spacing, but a single large would grow them all to large

I would call you a madman @danielchalmers having multiple sizes of icons in one menu, but you are absolutely right that if someone were to do that it would look better.
I will try to implement that.

Shall we convert this one to a draft or is it ready @dennisrahmen ?

To be honest, if I were to use icons of different sizes I'd rather have them centered. So I am not sure what we should really implement here and maybe we should postpone it altogether

The best and also simplest solution would be to allow an optional RenderFragment IconContent which would override the Icon, then everybody can do what they like if they are not satisfied with the default icon spacing. This can be done in another PR

@henon I think both are good points and probably easier to implement as the dynamic spacing based on the icon size.
At least for me, as I tried doing it in CSS.
I can look into implementing both right now with this PR or do you want a seconds one for the render fragment?

If this PR is not urgent, how about giving @danielchalmers a chance to add his opinion, possibly finding the best solution and releasing it with v8?

Sure, then we should make this a draft I just don't have the option as it seems.

My suggestion:

Keep the icon space the size of the largest one.
Center the icon in that space
Avoid bulky solutions like IconContent for such a small change if possible
Save this for v8 to avoid complaints

Possible implementation:

Class gets passed through by the component to tell CSS the largest icon used
Explicitly set the width in CSS using that class (mud-menu-item--largest-icon-small)
Horizontally center all icons in that width

Haven't tested this

Sounds good to me, if everyone is fine with that?

Yes, thanks!

v8 development starting soon if you're still interested in this!

Would be nice if it would be possible to fix this problem as well that @henon has with buttons:

Would be nice if it would be possible to fix this problem as well that @henon has with buttons:

@ScarletKuro Likely https://github.com/MudBlazor/MudBlazor/issues/8884#issuecomment-2120650791

@ScarletKuro I played a bit around with the alignment.
I could try a quick fix by adding a negative margin to the start and end icons classes so they are centered with the text as well as a negative margin for the Text/Icon block to center it inside the button.

That would be a bit more ugly than it already is, but at least not visible till we habe a better solution:

Overall I think @danielchalmers approach by tackling the issue with the line height is a better idea.
But also not as easy done and the button icons need work in general, I found a few negative margins (In addition to the ones I added) which I find quite ugly and not making it easier.

by adding a negative margin to the start and end icons classes

Sounds like a nasty workaround to me :(

The alignment of icons / text in MudButton is fixed in another PR by Daniel.
@dennisrahmen do you want to get this PR ready for merging in v8?

@henon looking into this more I think this is more a general Problem with the list, as the menu just uses the MudListItem.
You can see that in the list examples when you compare the checkbox spacing to the icon spacing.

I will look into this for the list in general as the MudListItem also has a IconSize property, so fixing it there should also fix it in the menu and every other component that uses the list.

Ok, now I got it. Ready for review.
Instead of changing the min-width based on the icon size it is now smaller and a margin was added for the correct spacing to the text. As well as the icon centered in that space.
That way the icon size does also not affect the menu width.
List:

Menu:

Please, update your fist post with before - after the change

Barracks should have gutters so it's aligned like the others

Could you add a page to the test viewer with different variations of menus (like in the original issue) to make it easier to compare?

Barracks should have gutters so it's aligned like the others

Wasn't there a "None" or something icon added recently that could be used?

Could you add a page to the test viewer

Will do.

Wasn't there a "None" or something icon added recently that could be used?

Yes, in #9478 but it feels like something I'd expect out of the box.
Would my proposal of passing a class that determines the gutter width (mud-menu-item--largest-icon-{none, small, medium, large}) be useful?

Wasn't there a "None" or something icon added recently that could be used?

I wouldn't, in vNext all svg icons will be removed and moved to icon fonts.

Would my proposal of passing a class that determines the gutter width (mud-menu-item--largest-icon-{none, small, medium, large}) be useful?

The problem is less the icon size in one MudListItem rather that the items in the list are not aware of the existence or size of icons in the other list items.
Maybe I am overthinking this but either the MudList would need to know that there is at least one item with a icon and add the gutters to the ones without.
Or the items would need to know if there is at least one item with a icon in the list and add the gutter when it has no icon itself.

I'm actually going to say the original issue is not a bug and we should close it as working as intended since you can see the same layout in
MUI

and more importantly MD2

Otherwise @Garderoben needs to weigh in

I'm actually going to say the original issue is not a bug and we should close

Can't we just add an icon alignment property?

Can't we just add an icon alignment property?

I guess we can and we can do this in a non-breaking manner, thus I'd split the matter off into another PR. I am sure someone will need it. For this PR we can keep the existing behavior.

the original issue is not a bug and we should close it as working as intended

I wouldn't close it, it is a legitimate use-case and winforms/wpf users would expect it that way so we probably should make it configurable.

@henon then I will open a new PR where I add that property and multiple examples to the test viewer as there will be more with the property than now.

I guess we can and we can do this in a non-breaking manner, thus I'd split the matter off into another PR. I am sure someone will need it. For this PR we can keep the existing behavior.

To be fair, I would use the icon alignment, and I expect any framework to have the ability to control that, rather than having me struggle to achieve it (in the case of Blazor, that would be through CSS).

@ScarletKuro Sorry, I don't get what you mean exactly. Are you contradicting what I said or are you agreeing with it.

@ScarletKuro so you mean the flex box alignment right?
So that the Icon can be centered, left or right aligned via a property.

So if I am not mistaken this is ready to be merged? @henon
I will address the test viewer examples and the additional property in another PR.

So if I am not mistaken this is ready to be merged? @henon

Yes. @danielchalmers do you agree?

I am not exactly aware of the difference to MD2. Do they even allow differently sized icons?

I am not exactly aware of the difference to MD2. Do they even allow differently sized icons?

Note the space between the icons and the text in this comment: https://github.com/MudBlazor/MudBlazor/pull/9143#issuecomment-2425516841
I'm sure that's what it was originally designed to mimic

OK, I see it now, there is an extra padding between text and icon in M2. So, if we centered the small icons within this area marked in red it would be correct in view of M2?

We never were absolutely M2 compliant and we don't have a rule that we have to be. Garderoben deviated in various parts where he felt it looked better. So I guess in the end it is up to the most talented designers in the team to decide. You have a good eye too @danielchalmers so we value your input.

@dennisrahmen What was the original intent of this PR?

How good a menu looks definitely depends on the icon size. Look at this example from our docs, the font awesome menu looks horrible

I am starting to think that we'll have to make the icon padding configurable for the entire list/menu. I mean you can't auto adjust it with icon size because that would look bad when you have different sized icons in a single list (I know you shouldn't do this, but still).

@henon I definitely missed the other icons apart from the native SVG ones.
How about

I check that all icon types are properly centered and have a reasonable default for the spacing to the text.

Then add a IconSpacing property like many other components already do for the spacing between the icon and text.

OK @dennisrahmen . Also we need better before/after pictures (same size, light mode). Something is not right with the ones above. I pulled your branch and checked, the icon spacing didn't change at all for nav menu for instance (which is good, it shouldn't change)
Before:

After:

I am confused what exactly is changed now and what isn't.

I may have looked at the wrong things. The screenshots above are from our NavMenu which doesn't follow MD2 and has different icon padding than MudList ...

@henon the MudNavMenu is a completely separate implementation based on the native NavLink, so it does not use the MudListItem where I made the CSS change.

@henon I definitely missed the other icons apart from the native SVG ones.
How about

I check that all icon types are properly centered and have a reasonable default for the spacing to the text.

Then add a IconSpacing property like many other components already do for the spacing between the icon and text.

Can I then proceed with the PR like this?
I can take a look at the NaMenu in another PR.

@danielchalmers and @Garderoben discussed this PR on discord, they should make statement on how to proceed.

@danielchalmers and @Garderoben discussed this PR on discord, they should make statement on how to proceed.

The current design is intended because it matches closely with Material Design. It's true we have different sizes unlike MD, but we still want them left aligned and padded the same. We should favor creating a more flexible design that is able to switch comfortably between a dense desktop layout and a spaced mobile design closer to what we have now. See #10077 for a basic concept. Really do welcome feedback on it and sorry for how stretched out this has become!! Ultimately will close this because the original layout is what we want.

I understand the decision to keep the default MD2 compliant like it is now instead of reducing the padding for large icons so that it doesn't look so bad for small icons.
Not everyone loves the big space between icon and text though. And for some very big icons (font awesome) you may even need more padding.
There are options we could do to improve customizability:

Add an IconClass parameter to MudListItem to allow people to add a negative margin on the right i.e. IconClass="mr-n1"
Add a default for icon padding in MudGlobal

There are options we could do to improve customizability:

Add an IconClass parameter to MudListItem to allow people to add a negative margin on the right i.e. IconClass="mr-n1"
Add a default for icon padding in MudGlobal.ListDefaults and MudGlobal.MenuDefaults

For purely visual changes I would say adding it to your project's CSS would be the most straight-forward solution:
.mud-list-item-icon {
  justify-content: center;
  min-width: 36px;
  margin-right: 10px;
}

@danielchalmers is there anything here that you would like to see changed then?
I would consider still adding a page to the test viewer for the different menus/icon sizes in another PR.

@dennisrahmen I think it's ok for now until something like #10077 is implemented if we're sticking with MD2.
Do you think it makes sense to remove the icon size property in favor of a curated design to avoid these kinds of issues and make something that looks more cohesive and intentional?

Do you think it makes sense to remove the icon size property in favor of a curated design [...]

Yes, I am in favor of limiting options on composite components to have a coherent design that aligns with MD2 but having many options on the base components, like the icon, to allow custom components.
I think there is a case to be made to keep something like the Dense property to have two common designs where the default one aligns with MD2.
Currently, since there is a IconSize property you could ask why there is no property to change the text typo.

Do you think it makes sense to remove the icon size property in favor of a curated design [...]

Yes, I am in favor of limiting options on composite components to have a coherent design that aligns with MD2 but having many options on the base components, like the icon, to allow custom components.
I think there is a case to be made to keep something like the Dense property to have two common designs where the default one aligns with MD2.
Currently, since there is a IconSize property you could ask why there is no property to change the text typo.

Great, exactly my thoughts!


Jan 3 dist build

Making a quick npm run dist to capture the latest changes.

@mdo: I didn't merge this because there are more changes. Please fetch, do npm i and redo this.

@mdo you pushed again directly...

Ah damnit, just went into autopilot. Sorry about that! I can revert if anything looks off.

I didn't verify your v4-dev push but I'd feel much safer if you enforced the limitations for admins too. You can always shift the limitations for you if needed.

Even though this change is quite harmless, I totally agree with @XhmikosR here.


add message for ambient

Please provide a description of this PR:
Fixes: https://github.com/istio/istio/issues/50491
To help us figure out who should review this PR, please put an X in all the areas that this PR affects.

[ ] Ambient
[ ] Configuration Infrastructure
[ ] Docs
[ ] Dual Stack
[ x ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure

Please check any characteristics that apply to this pull request.

[x ] Does not have any user-facing changes. This may include CLI changes, API changes, behavior changes, performance improvements, etc.

Able to test locally:
helm install istiod manifests/charts/istio-control/istio-discovery --namespace istio-system  --set profile=ambient --dry-run
...
NOTES:
"istiod" successfully installed!

To learn more about the release, try:
  $ helm status istiod -n istio-system
  $ helm get all istiod -n istio-system

Next steps:
  * Get started with ambient: https://istio.io/latest/docs/ops/ambient/getting-started/
  * Review ambient's architecture: https://istio.io/latest/docs/ops/ambient/architecture/
  * Review the list of actively supported releases, CVE publications and our hardening guide:
    * https://istio.io/latest/docs/releases/supported-releases/
    * https://istio.io/latest/news/security/
    * https://istio.io/latest/docs/ops/best-practices/security/

No profile specified or --set profile=demo:
helm install istiod manifests/charts/istio-control/istio-discovery --namespace istio-system   --dry-run

NOTES:
"istiod" successfully installed!

To learn more about the release, try:
  $ helm status istiod -n istio-system
  $ helm get all istiod -n istio-system

Next steps:
  * Deploy a Gateway: https://istio.io/latest/docs/setup/additional-setup/gateway/
  * Try out our tasks to get started on common configurations:
    * https://istio.io/latest/docs/tasks/traffic-management
    * https://istio.io/latest/docs/tasks/security/
    * https://istio.io/latest/docs/tasks/policy-enforcement/
  * Review the list of actively supported releases, CVE publications and our hardening guide:
    * https://istio.io/latest/docs/releases/supported-releases/
    * https://istio.io/latest/news/security/
    * https://istio.io/latest/docs/ops/best-practices/security/

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

Test name
Commit
Details
Required
Rerun command

integ-security_istio
d09a7a39ed9ebf3b38aa4904667b35b00a233cd2
link
true
/test integ-security

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

/test integ-security

/test unit-tests-arm64


[P2P] libp2p and networking tests are failing on an ubuntu 20.04 server.

Objective
Investigate and triage why libp2p and networking tests are failing on an ubuntu 20.04 server.
?       github.com/pokt-network/pocket/libp2p   [no test files]
{"level":"warn","time":"2023-03-14T11:11:19-04:00","message":"resolved multiple addresses but only using one. See ticket #557 for more details"}
{"level":"warn","time":"2023-03-14T11:11:22-04:00","message":"resolved multiple addresses but only using one. See ticket #557 for more details"}
--- FAIL: TestPeerMultiAddrFromServiceURL_Error (3.59s)
    --- FAIL: TestPeerMultiAddrFromServiceURL_Error/fully_qualified_domain_name_with_scheme/fqdn (0.28s)
        url_conversion_test.go:101:
                Error Trace:    /home/bigboss/pocket-network/pocket-v1/libp2p/network/url_conversion_test.go:101
                Error:          Error "failed to parse multiaddr \"/ip4/<IP_ADDRESS>/tcp\": unexpected end of multiaddr" does not contain "resolving peer IP for hostname"
                Test:           TestPeerMultiAddrFromServiceURL_Error/fully_qualified_domain_name_with_scheme/fqdn
                Messages:       actualMultiaddr: %!s(<nil>)
    --- FAIL: TestPeerMultiAddrFromServiceURL_Error/fully_qualified_domain_name_with_scheme/ip4 (3.30s)
        url_conversion_test.go:101:
                Error Trace:    /home/bigboss/pocket-network/pocket-v1/libp2p/network/url_conversion_test.go:101
                Error:          Error "failed to parse multiaddr \"/ip4/<IP_ADDRESS>/tcp\": unexpected end of multiaddr" does not contain "resolving peer IP for hostname"
                Test:           TestPeerMultiAddrFromServiceURL_Error/fully_qualified_domain_name_with_scheme/ip4
                Messages:       actualMultiaddr: %!s(<nil>)
    --- FAIL: TestPeerMultiAddrFromServiceURL_Error/fully_qualified_domain_name_with_scheme/ip6 (0.00s)
        url_conversion_test.go:101:
                Error Trace:    /home/bigboss/pocket-network/pocket-v1/libp2p/network/url_conversion_test.go:101
                Error:          Error "failed to parse multiaddr \"/ip4/<IP_ADDRESS>/tcp\": unexpected end of multiaddr" does not contain "resolving peer IP for hostname"
                Test:           TestPeerMultiAddrFromServiceURL_Error/fully_qualified_domain_name_with_scheme/ip6
                Messages:       actualMultiaddr: %!s(<nil>)
FAIL
FAIL    github.com/pokt-network/pocket/libp2p/network   3.628s

Origin Document
The tests should not fail.
Goals

Fix failure or add documentation if a lapse in config or server setup

General issue deliverables

[ ] Update the appropriate CHANGELOG(s)
[ ] Update any relevant local/global README(s)
[ ] Update relevant source code tree explanations
[ ] Add or update any relevant or supporting mermaid diagrams

Testing Methodology

[ ] Task specific tests or benchmarks: make ...
[ ] New tests or benchmarks: make ...
[ ] All tests: make test_all
[ ] LocalNet: verify a LocalNet is still functioning correctly by following the instructions at docs/development/README.md

Creator: @0xBigBoss

@0xBigBoss can you confirm at what commit are you seeing this? I have not been able to reproduce this locally despite using a fresh ubuntu 20.04 docker container. Those tests should be failing on DNS resolution (trying to resolve garbage, like tcp) before it has the chance to error on the multiaddr parsing.

@0xBigBoss This is a pretty small bug that is specific to your dev environment. Any chance you could take it on?


"urllib.error.HTTPError: HTTP Error 403: Forbidden" on long videos

Hi I'm trying to download some long videos from YouTube unfortunately it doesn't work and I get a 403 reply. For shorter videos it's working fine.
Python 3.11.2
pytubefix 1.5.0
Test code:
#python
from pytubefix import YouTube
#short video works
video = YouTube('https://www.youtube.com/watch?v=CpI3LCSh7zw')
video.streams.filter(file_extension='mp4', adaptive=True).order_by("resolution").desc().first().download()
print('completed')
#long video doesn't
video = YouTube('https://www.youtube.com/watch?v=AgpWX18dby4')
video.streams.filter(file_extension='mp4', adaptive=True).order_by("resolution").desc().first().download()
print('completed')
Any help?

Hi I'm trying to download some long videos from YouTube unfortunately it doesn't work and I get a 403 reply. For shorter videos it's working fine.
Python 3.11.2 pytubefix 1.5.0
Test code:
#python from pytubefix import YouTube
#short video works video = YouTube('https://www.youtube.com/watch?v=CpI3LCSh7zw') video.streams.filter(file_extension='mp4', adaptive=True).order_by("resolution").desc().first().download() print('completed')
#long video doesn't video = YouTube('https://www.youtube.com/watch?v=AgpWX18dby4') video.streams.filter(file_extension='mp4', adaptive=True).order_by("resolution").desc().first().download() print('completed')
Any help?

I haven't been able to solve it yet

Hi I'm trying to download some long videos from YouTube unfortunately it doesn't work and I get a 403 reply. For shorter videos it's working fine.
Python 3.11.2 pytubefix 1.5.0
Test code:
#python from pytubefix import YouTube
#short video works video = YouTube('https://www.youtube.com/watch?v=CpI3LCSh7zw') video.streams.filter(file_extension='mp4', adaptive=True).order_by("resolution").desc().first().download() print('completed')
#long video doesn't video = YouTube('https://www.youtube.com/watch?v=AgpWX18dby4') video.streams.filter(file_extension='mp4', adaptive=True).order_by("resolution").desc().first().download() print('completed')
Any help?

Hi can you make clear 'long' how long video you mean?

The longest video I could download is 01:16:59 long and the shortest one that doesn't work is 01:21:21 long. So somewhere in between.

Tested it a bit today and it looks like YT might have added some safety measure that blocks a generated streaming url if it's downloaded too quickly (at least that's my suspicion) - I'm basing that assumption on the fact that the block doesn't happen always on the same chunk download - it's around 1h 16min mark, but at a different chunk.
I have an idea for a workaround, but it IS a workaround:

Pass YouTube object as an optional(?) parent object to the Stream object along with it's designated itag
Then make the Stream.url property based on the YouTube.fmt_streams + attached itag
Once we encounter error code 403 - reset (clear _vid_info and _fmt_streams from YouTube) and restart downloading, but from where the previous download has stopped).

Hi, same issue
Code :
from pytubefix import YouTube, Stream
from pytubefix.cli import on_progress

url ="https://youtube.com/watch?v=6YiU1PLeifE"
yt = YouTube(url, on_progress_callback=on_progress)
ys:Stream = yt.streams.get_highest_resolution()
ys.download()

It generates exception :
  File "C:\Users\dom\PycharmProjects\youtube.monitor\test.py", line 7, in <module>
    ys.download()
  File "C:\Users\dom\AppData\Roaming\Python\Python310\site-packages\pytubefix\streams.py", line 295, in download
    for chunk in request.stream(
  File "C:\Users\dom\AppData\Roaming\Python\Python310\site-packages\pytubefix\request.py", line 155, in stream
    response = _execute_request(
  File "C:\Users\dom\AppData\Roaming\Python\Python310\site-packages\pytubefix\request.py", line 37, in _execute_request
    return urlopen(request, timeout=timeout)  # nosec
  File "C:\Program Files\Python310\lib\urllib\request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Program Files\Python310\lib\urllib\request.py", line 525, in open
    response = meth(req, response)
  File "C:\Program Files\Python310\lib\urllib\request.py", line 634, in http_response
    response = self.parent.error(
  File "C:\Program Files\Python310\lib\urllib\request.py", line 563, in error
    return self._call_chain(*args)
  File "C:\Program Files\Python310\lib\urllib\request.py", line 496, in _call_chain
    result = func(*args)
  File "C:\Program Files\Python310\lib\urllib\request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

It's a long video (8284s) but sometime it happens also for some short videos too. On short one, if you try again you'll finally get it.
Anyway, thanks for this project

Hi, same issue
Code :
from pytubefix import YouTube, Stream
from pytubefix.cli import on_progress

url ="https://youtube.com/watch?v=6YiU1PLeifE"
yt = YouTube(url, on_progress_callback=on_progress)
ys:Stream = yt.streams.get_highest_resolution()
ys.download()

It generates exception :
  File "C:\Users\dom\PycharmProjects\youtube.monitor\test.py", line 7, in <module>
    ys.download()
  File "C:\Users\dom\AppData\Roaming\Python\Python310\site-packages\pytubefix\streams.py", line 295, in download
    for chunk in request.stream(
  File "C:\Users\dom\AppData\Roaming\Python\Python310\site-packages\pytubefix\request.py", line 155, in stream
    response = _execute_request(
  File "C:\Users\dom\AppData\Roaming\Python\Python310\site-packages\pytubefix\request.py", line 37, in _execute_request
    return urlopen(request, timeout=timeout)  # nosec
  File "C:\Program Files\Python310\lib\urllib\request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Program Files\Python310\lib\urllib\request.py", line 525, in open
    response = meth(req, response)
  File "C:\Program Files\Python310\lib\urllib\request.py", line 634, in http_response
    response = self.parent.error(
  File "C:\Program Files\Python310\lib\urllib\request.py", line 563, in error
    return self._call_chain(*args)
  File "C:\Program Files\Python310\lib\urllib\request.py", line 496, in _call_chain
    result = func(*args)
  File "C:\Program Files\Python310\lib\urllib\request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

It's a long video (8284s) but sometime it happens also for some short videos too. On short one, if you try again you'll finally get it.
Anyway, thanks for this project

Hi, this video you tried is very long, but I'm going to do some tests to see if I can solve it.

problem solved:
Youtube is blocking the connection because it cannot find a "real user", that is, it is trying to find the User-Agent that is used to provide information about the browser and the device. This only happens in longer videos.
To solve the problem, the device needs to be authenticated, Pytubefix already has this functionality, just pass some parameters, as in the code below that will use the long video.

from pytubefix import YouTube
from pytubefix.cli import on_progress

url = "https://www.youtube.com/watch?v=6YiU1PLeifE"

yt = YouTube(url, use_oauth=True, allow_oauth_cache=True, on_progress_callback = on_progress)
ys = yt.streams.get_highest_resolution()

ys.download() # you will only get the request to authenticate once you download

this code will return this:

Please open https://www.google.com/device and input code XXX-XXX-XXX
Press enter when you have completed this step.

You must open the link in the browser and place the code that appeared and press enter in the terminal then this will start the download and will not return the error again, I hope this solves it for everyone.

Thanks but still the same exception :
Authentification has been done.
It fails at @ 71.5%, 77.4%, 75.5% ... it depends on the trial.
  File "C:\Users\dom\AppData\Roaming\Python\Python310\site-packages\pytubefix\streams.py", line 295, in download
    for chunk in request.stream(
  File "C:\Users\dom\AppData\Roaming\Python\Python310\site-packages\pytubefix\request.py", line 155, in stream
    response = _execute_request(
  File "C:\Users\dom\AppData\Roaming\Python\Python310\site-packages\pytubefix\request.py", line 37, in _execute_request
    return urlopen(request, timeout=timeout)  # nosec
  File "C:\Program Files\Python310\lib\urllib\request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Program Files\Python310\lib\urllib\request.py", line 525, in open
    response = meth(req, response)
  File "C:\Program Files\Python310\lib\urllib\request.py", line 634, in http_response
    response = self.parent.error(
  File "C:\Program Files\Python310\lib\urllib\request.py", line 563, in error
    return self._call_chain(*args)
  File "C:\Program Files\Python310\lib\urllib\request.py", line 496, in _call_chain
    result = func(*args)
  File "C:\Program Files\Python310\lib\urllib\request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden
python-BaseException

Regards

show the code you tested

Remembering that authentication takes time to complete

show the code you tested

from pytubefix import YouTube
from pytubefix.cli import on_progress

url = "https://www.youtube.com/watch?v=6YiU1PLeifE"

yt = YouTube(url, use_oauth=True, allow_oauth_cache=True, on_progress_callback=on_progress)
ys = yt.streams.get_highest_resolution()
ys.download()

I tryied with computer reboot, disabling AdGuard Home (network software for blocking ads and tracking) but nothing change.
Thanks


Fixing cloud sdk install progress bar display time

Summary

The progress bar for installing the cloud sdk does not appear, even though it is being installed
Both updating the cloud sdk (SdkUpdater::update) and installing components (SdkComponentInstaller::installComponent) use ProgressListener.UNKNOWN while installing the SDK (SdkInstaller::install) sets the progress time to 200 or 300 ms.
Setting the time to ProgressListener.UNKNOWN and removing the child progress listeners prevent the progress bar from disappearing.
context

Ran the following:

mvn fmt:format
mvn clean install, mvn clean install -DskipTests

Testing

[x] Build snapshot JAR and ran in Cloud Code using these instructions

Release Process to Follow

https://g3doc.corp.google.com/company/teams/cloud-java/tools/developers/releasing.md?cl=head#releasing-via-rapid

So the way you resolve the issue is making the progress reporting coarse (from explicitly allocating progress units for the entire steps to just saying "uh, don't know how long it will take"). In IntelliJ, for "unknown" progress work, you probably set up an IDE progress reporting that just rolls (i.e., no incremental progress updates by ticks). So I wonder if it's just that your ProgressListener implementation in IDE is not handling the signals properly? The appengine-plugins-core is just notifying the client through the ProgressListener interface, and I think it should mainly be the responsibility of Cloud Code to interpret the calls in whatever it wants to.

Agreed, that makes sense.
This is a little tricky, Cloud Code's implementation for installing the sdk (ManagedCloudSdkService::installSdk()) is nearly identical to the code below, for installing components (ManagedCloudSdkService::installComponent()), which already correctly shows the progress indicators.
The only difference I see is that this library's SdkInstaller::install creates child processes. I see in our code base (ManagedCloudSdkProgressListener::newChild) that we use ChildProgressListener, which is defined in this library.
I'm not sure if it's worth digger further, but let me know if you have any ideas at a glance, as to what could be going wrong?

Closing for now. Confirmed that this was working a while ago, so a bug was probably introduced. Will investigate the change logs and reopen

I see. Feel free to restore the branch when needed.


Compilation bug without recyclerview version

With version 28 the compilation fail, with version 27.0.2 it works perfectly

This sample has been deprecated/archived (check README for more information).
As recommended by GitHub, we are closing all issues and pull requests.


Automatic windows  Authentication

Hi Mohammad . At first thank you for your fantastic mix  Authentication system , it works fine and  save time of my time. But is there any way to skip windows authentication window and use current user data?

Hi,
Automatic login depends on client configuration, the web app should be in an Internet Zone that has User Authentication set to Automatic.

I have the same settings as in screenshot but still when i first time enter my site it's asking me for User name and Passwors

Is your site a member of "Local Intranet Zone" ?

Thx, in IE it works fine . But still I need fix redirect  after cancel button press , it's possible ?

Yes,  Add a custom error page configuration, as described here. Then you can either customize the 401.html to display some informative message or redirect users to the normal Login action:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title></title>
  <meta http-equiv="refresh" content="0;URL='/MixedAuth/Account/Login'" />
</head>
<body>
  Invalid credentials
</body>
</html>

Already did this but after Cancel click it's redirect me to Windows/Login  .Even when I change LoginPath in  Startup.Auth  to something else it's still redirect to Windows/Login

Why would it redirect you to Windows/Login ? Try to re-check your configuration.

I retested the [WindowsFirst] branch, and it works as expected. Make sure you

Update LoginPath in Startup.Auth LoginPath = new PathString("/Windows/Login")
Make 401.html redirect to normal login page <meta http-equiv="refresh" content="0;URL='/Account/Login'" /> and that login page does not require authorization.

You do need to re-check your configuration :smile:

Solved.
Some 'genius' from my team comment context.Response.TrySkipIisCustomErrors = true:sweat_smile:
I have one more problem. Since automatic windows authentication  not work in Edge ,Firefox and maybe some others brothers , in them user should enter his User Name and Password and
when he login with windows user account it's impossible to login into other windows account.
So is there any way to make complete LogOff ?

You need to either close the browser or invalidate the browser credentials cache. see  http://signinas.codeplex.com


2000 pokestop in 24h limit

2000 pokestop in 24h limit

Can this be included in the configs?

ok.

done

I ask because we have an onslaught of request in this vicinity.

:+1:


Visualizer test

This PR creates

tests for the visualizers for rllib and rllab
tests for the example run scripts

<3