[Discussion] Dynamic Query Builder Design

We have received a lot of requests, and have a significant need ourselves, for a dynamic query builder in SQLx that can generate and execute valid SQL with the appropriate bind parameters for a given database backend at runtime.
This is to do things like:

Dynamically add columns from the query based on what data is needed
Dynamically add joins to the query from other tables
Dynamically add where clauses based on user input
Generate INSERT INTO foo(...) VALUES(...) statements with a variable number of records in the VALUES expression, taking into account the SQL flavor's max number of bind parameters per query (which we can build a more specialized API for on top of this)

MVP
I'm thinking the minimum viable product for this would be something like the following:
pub struct QueryBuilder<DB> { ... }

impl<DB> QueryBuilder<DB> {
    /// Create a builder with the initial SQL literal to append to
    pub fn new(init: impl Into<String>) -> Self { ... }

    /// Push more SQL code
    pub fn push(&mut self, sql: impl Display) -> Self { ... }

    /// Push a bind parameter to the SQL and add encode its value
    /// RFC: should we be taking values here, or bind once the query is built?
    pub fn push_bind(&mut self, value: impl Encode<DB>) -> Self { ... }

    /// Append a comma separated list with the closure being repeatedly called to add the values between commas until it returns `false`.
    ///
    /// This seems a bit higher level but it would be really useful for generating `VALUES` lists with binds
    pub fn comma_sep(&mut self, impl FnMut(&mut QueryBuilder<DB>) -> bool) -> Self { ... }

    /// Finalize the query so it can be executed
    ///
    /// I'm thinking this clones the query so the builder can be reused
    pub fn build(&mut self) -> sqlx::Query<DB, 'static> { ... }

    /// Alternatively, we have `.execute()`, `.fetch()`, `.fetch_all()`, etc. on this struct
}

Thoughts to the Future

Some sort of macro that can do interpolations and dynamic repetitions like quote::quote!()

Perhaps still somehow checking the query at compile time
The catch here is that the syntax would have to be tokenizable by Rust's lexer and I think there's a few things about SQL which violate that (single-quote strings, for one)

A dedicated API for generating efficient INSERT INTO statements

Perhaps a proc-macro that generates an insertion builder for a given table with specific columns and return values

Non-Goals

We don't want to go overboard and implement a fully fledged query DSL yet, that's a discussion for another day

cc @mehcode @izik1 @danielakhterov

I guess that would result in usage like the following to perform a multi-row insert:
// E.g.
let records: Vec<(Uuid, i32)> = vec![...];

let records_iter = records.iter();
let query = QueryBuilder::new("INSERT INTO users VALUES ")
    .comma_sep(move |builder| {
        if let Some(record) = records_iter.next() {
            builder.push("(");
            builder.push_bind(record.0);
            builder.push(", ");
            builder.push_bind(record.1);
            builder.push(")");
            true
        } else {
            false
        }
    })
    .build();

let result = query.execute(&conn).await?;
assert_eq!(result, 2);

This would be a decent starting point, though the inner building would be a bit painful for large structs.

Prisma has a working SQL builder: https://github.com/prisma/quaint

Note that this interface would be aimed at being used by quaint. Not at replacing Quaint.

This would be a decent starting point, though the inner building would be a bit painful for large structs.

Maybe instead we have .separated(char) -> Separated where Separated also has .push() and .push_bind() but appends the separator between calls or something.

Any progress on this? I feel like this is very much a necessary feature for real world applications.
I am currently really in need of some dynamic query building system, specifically dynamically building up a where clause based on user input.
I don't know how to do this in a temporary fashion either, that does not fall back to copy pasting logic with different parameters...

Any update on this?

/// I'm thinking this clones the query so the builder can be reused
pub fn build(&mut self) -> sqlx::Query<DB, 'static> { ... }

Wouldn't that by virtue of the builder also clone the arguments? It seems like that would be a bit heavy. Alternatively, if the design had a placeholder type param, we could clone the query "plan" and later bind the args.

Wouldn't that by virtue of the builder also clone the arguments?

Hmm, no, the arguments would be wrapped in Option internally and it would probably panic if called more than once. Really though, the only reason to take &mut self here is so that it can be called at the end of a method chain.

do you use push_bind to repopulate the builder args?
On Fri, Sep 11, 2020, 6:03 PM Austin Bonander<EMAIL_ADDRESS>wrote:

Wouldn't that by virtue of the builder also clone the arguments?
Hmm, no, the arguments would be wrapped in Option internally and it would
probably panic if called more than once. Really though, the only reason to
take &mut self here is so that it can be called at the end of a method
chain.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/launchbadge/sqlx/issues/291#issuecomment-691331451,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABRMQUOK7SFG4UQF7UBXABLSFKNETANCNFSM4MUDDMWA
.

I wouldn't mind trying to implement a basic query builder similar to the one you had suggested @abonander . Should I give it a shot?

@nkconnor .push_bind() both pushes a bind parameter expression to the query string and also adds the bind value to the arguments, so it recreating the arguments doesn't make much sense. I'm thinking the query builder is going to be a one-and-done kinda thing. Although maybe instead of building the Arguments concurrently to the query string, we just have the user call .bind() on the Query returned by build(), so theoretically it could be used more than once, but I think that's going to be very error-prone.
@elertan please do! We unfortunately don't have much time to dedicate to SQLx these days but we're trying to get back on it.

Hi, anyone can advise me about how to make a massive database ingestion (> 200k rows) with SQLX, there is a bulk operation builder or somethig like that?, thanks

@shiftrtech from my experience wrapping bunch of separate inserts into a transaction gives roughly the same speed

inserts

Can you give me some basic example?

let mut tx = db.begin().await?;
for row in your_data {
    sqlx::query!("INSERT ...").execute(&mut tx).await?;
}
tx.commit().await?;

@abonander @elertan Hey, did you guys started working on this? If not I can take this up. I have been thinking for sometime now to contribute and this seems like a fun addition to the repo.

By all means go at it, I honestly kind of left this in the dust for quite a while, but would be great to have this feature implemented.
@anitnilay20

@elertan Awesome.. will start on it right away and will keep this thread updated.

Is there anything that can be used by now? All I can find are some incomplete snippets... I really like sqlx, but I'm at a point where I need to construct a filter based on user input (the filters for a list endpoint) and I don't see a way of doing this except writing my own query builder which assembles the sql string and the arguments. Is there a way that I'm just overseeing?

@trusch I ended up just building the filter on the db level. As you can see in the following example some parameters are optional and you can check if they're exist on postgres level.
async fn fetch_items(
    db: &PgPool,
    start: DateTime<FixedOffset>,
    finish: DateTime<FixedOffset>,
    company: Option<i32>,
    purpose: Option<&str>,
    from_id: Option<i32>,
    limit: i64,
) -> Result<Vec<Transaction>> {
    Ok(sqlx::query_as!(
        Transaction,
        r#"
            SELECT
                -- total number of rows before limit applied
                count(*) OVER() as full_count,
                t.id,
                c.id as company_id,
                c.name as company_name,
                t.type as kind,
                CAST(t.amount as DOUBLE PRECISION),
                CAST(t.aws_amount as DOUBLE PRECISION),
                CAST(t.current_balance as DOUBLE PRECISION),
                t.user_id,
                -- hotfix for a sqlx bug - it doesn't see the field as nullable
                u.full_name as "user_name?",
                t.extra,
                t.created,
                t.charge_for,
                t.software
            FROM billing_transaction t
            JOIN app_company c on c.id = t.account_id
            LEFT JOIN user_user u on u.id = t.user_id
            WHERE t.created >= $1
              AND t.created < $2
              AND ($3::int IS null OR t.account_id = $3)
              AND ($4::text IS null OR t.extra -> 'computer' -> 'type' ->> 'purpose' = $4::text)
              AND ($5::int IS null OR t.id < $4::int)
            ORDER BY t.created DESC
            LIMIT $6
            "#,
        start,
        finish,
        company,
        purpose,
        from_id,
        limit,
    )
    .fetch_all(db)
    .await?)
}

@imbolc Thanks for the hint! Unfortunatly my usecase is even more dynamic since I want to filter on a jsonb field and the structure of it is only known at runtime. So I really get something like a tuple of fieldname, operation and value and need to translate that to something like props->>'fieldName' = 'value'.

Dynamic behavior like that is simply not something that SQLx tries to target. Even with this proposal we aren't going to be adding a SQL builder that lets you fluently build up a query. This is a minimal proposal to make it easier for a library to wrap SQLx to provide such an API.
The library ormx may work for you. You can add optional clauses to your query.
Another library choice could be any SQL builder. Something like https://github.com/perdumonocle/sql-builder that you then pass the resulting SQL into SQLx.

Dynamically add where clauses based on user input

How about use a static query to deal with dynamic user input?

// assume age is a optional variable from request
// age: Option<i32>

let users = sqlx::query_as!(User, r#"
    SELECT * From "User" WHERE (age = $1 OR 0 = $2 );
  "#,
  age.unwrap_or_default(),
  age.unwrap_or_default()
).fetch_all(&ctx.db).await.ok().unwrap_or_default();

pros:

use static query to handle dynamic user input

cons:

need to hardcode the default value in query
tedious unwrap_or_default() but may be solved by macro (by default call unwrap_or_default for all optional variables)

I can second  https://github.com/perdumonocle/sql-builder . It does what's being asked here and integrates nicely with sqlx.

I can second https://github.com/perdumonocle/sql-builder . It does what's being asked here and integrates nicely with sqlx.
Is it sql injections free?

I can second  https://github.com/perdumonocle/sql-builder . It does what's being asked here and integrates nicely with sqlx.

I disagree. SqlBuilder is nice and simple, but it lacks some required APIs to be able to build any query with it. It does include preventive measures such as 'quote' against sql injection and the like.
I recently stumbled upon SeaQuery which is a little more complicated but is more flexible than SqlBuilder is.
But it might be better for sqlx to not focus on dynamic query building after all and let that be the work of another crate.
Even though there should be more documentation for these very common use cases.

I recently too start using SeaQuery and really like it, and the best thing is that you can construct a SeaQuery connection from a sqlx pool, so you can with easy have a shared sqlx pool for static queries and using the same pool for SeaQuery too.

Hey I hope I don't derail the conversation and I am happy to create this somewhere else, but have you guys ever thought about a a declarative api as well, in addition to the "fluent" query builder proposal ?
One of the most pleasant api's I have worked with was JDBI, on both links above, someone have already gave it a crack here but it does not seem fully fledged, something that the sqlx community might be better equipped to keep momentum on.

Anyone given this a try? Looks simple
https://docs.rs/quaint/latest/quaint/#using-the-ast-module

Can someone help me understand how push_bind is intended to work?
If I have this:

fn get_all(pool: &PgPool, sort_by = Option<String>) -> ... {
let mut query: QueryBuilder<Postgres> = QueryBuilder::new(
    r#"SELECT
        id,
        name
    FROM thing_users"#
    )

    if let Some(s) = sort_by {
        query.push("ORDER BY ").push_bind(s);
    };
}

query.build_query_as::<User>().fetch_all(pool).await

The ORDER BY field never seems to make a difference. The data returned is always ordered the same. I'm also having trouble trying to use this to generate a WHERE clause and am having similar results. Obviously, I can do something like query.push("ORDER BY ").push(s) but that's basically just blind SQL string concatenation which I'd like to avoid.
I think I'm fundamentally misunderstanding how push_bind works.

If s is some string "foo" then what you'll get out of that is
SELECT
    id,
    name
FROM thing_users ORDER BY $1

with $1 bound to the string 'foo', which is meaningless in an ORDER BY expression because the comparison for every row will essentially be 'foo' <= 'foo', and thus the ordering will be whatever order that Postgres produces the rows in.
If you're trying to order by the column foo you need to use query.push(s) to push the contents of the string to the query and you'll get
SELECT
    id,
    name
FROM thing_users ORDER BY foo

Of course, if sort_by is from, say, the query segment of a request URL then you're essentially injecting an attacker-controlled string into your SQL. That's what the warning on .push() pointing to .push_bind() is about. However, since you're actually trying to modify the SQL here then you should use .push() while checking that s is only one of the valid column names to sort by.


Ensure no allen_cord meshes are black

The updated atlas script looked fine, but some meshes were black, so they didn't show up in brainrender-napari.

Test failures are weird, but unrelated.


drivers: i2c: i2c_dw: update DMA node access in I2C dw.

Update DMA and I2C to support latest LPSS DMA interface.
This PR depends on https://github.com/zephyrproject-rtos/zephyr/pull/65689
Signed-off-by: Anisetti Avinash Krishna<EMAIL_ADDRESS>

@akanisetti looks pretty good, but you really need to include both the DMA driver changes and the peripheral driver changes into a single PR, since otherwise we'll end up having an intermediate state where DMA is not working.


fix shenyu-admin: add dashboard user permission

// Describe your PR here; eg. Fixes #issueNo

Make sure that:

[ ] You have read the contribution guidelines.
[ ] You submit test cases (unit or integration tests) that back your changes.
[ ] Your local test passed mvn clean install -Dmaven.javadoc.skip=true.

Codecov Report

Merging #2357 (c07f247) into master (4ade51c) will decrease coverage by 0.22%.
The diff coverage is 59.80%.

@@             Coverage Diff              @@
##             master    #2357      +/-   ##
============================================
- Coverage     58.13%   57.90%   -0.23%
+ Complexity     3951     3945       -6
============================================
  Files           629      629
  Lines         18044    18059      +15
  Branches       1695     1693       -2
============================================
- Hits          10489    10457      -32
- Misses         6719     6763      +44
- Partials        836      839       +3

Impacted Files
Coverage Δ

.../shenyu/admin/service/impl/AppAuthServiceImpl.java
82.58% <ø> (ø)

...che/shenyu/admin/service/impl/EnumServiceImpl.java
100.00% <ø> (ø)

...shenyu/admin/service/impl/MetaDataServiceImpl.java
5.26% <0.00%> (+0.05%)
:arrow_up:

...e/shenyu/admin/service/impl/PluginServiceImpl.java
84.55% <0.00%> (-2.12%)
:arrow_down:

...henyu/admin/service/impl/UpstreamCheckService.java
23.20% <0.00%> (-4.45%)
:arrow_down:

...e/shenyu/admin/shiro/bean/StatelessAuthFilter.java
6.06% <ø> (ø)

...g/apache/shenyu/admin/shiro/config/ShiroRealm.java
14.81% <0.00%> (ø)

...apache/shenyu/admin/utils/ShenyuResultMessage.java
0.00% <ø> (ø)

...enyu/admin/service/impl/PermissionServiceImpl.java
80.95% <64.70%> (-1.55%)
:arrow_down:

...shenyu/admin/service/impl/SyncDataServiceImpl.java
93.54% <77.77%> (-3.12%)
:arrow_down:

... and 18 more

Continue to review full report at Codecov.

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


ui: Condition UI-string "channel" terminology on >=255, not >255

Oops; this was missed because I didn't do end-to-end testing before we merged #5830.

Thanks! Looks good; merging.
I also did some greps for other places where we compare a feature level, and I think we have them all the right way around.
In particular non-strict inequalities are now all "current feature level >= threshold", and strict inequalities are all "<", from reading the output of:
$ git grep 'eatureLevel.*(?<!=)[><]='
$ git grep 'eatureLevel.*(?<!=)[><](?!=)'

and for good measure:
$ git grep '(?<!=)[><]=.*eatureLevel'
$ git grep '(?<!=)[><](?!=).*eatureLevel'


virt-v2v: cold: do not use glibc-2.34-66

For some reason latest glibc in CentOS Stream 9 causes QEMU in TCG emulation to fail to boot and leads to kernel panic. Revert to previous glibc version when building the libguestfs appliance.
There is another issue somewhere causing that when the appliance build triggers kernel panic the build will not terminate and QEMU is stuck waiting forever. This makes the investigation of a failure complicated, but it's something we cannot fix on our side.

@nyoxi this change looks good but did you file a bug on this? the packages on centos stream 9 are updated so quickly that I'm afraid we'll lose that version 2.34.66 soon..

Not yet, but I am still considering opening a bug on QEMU. Although I am quite unsure if it's worth any effort exactly for the reason you mentioned. Chances are next glibc build will not suffer from this.

Chances are next glibc build will not suffer from this.

yeah, if the next build will be alright then that's ok, but what do we base it on?


[Flag] --cookie -b

   -b, --cookie <name=data>
          (HTTP)  Pass  the data to the HTTP server as a cookie. It is supposedly the data previously received from the server in a "Set-Cookie:" line.  The data should be in the format
          "NAME1=VALUE1; NAME2=VALUE2".

          If no '=' symbol is used in the line, it is treated as a filename to use to read previously stored cookie lines from, which should be used in this session if they match. Using
          this method also activates the "cookie parser" which will make curl record incoming cookies too, which may be handy if you're using this in combination with the -L, --location
          option. The file format of the file to read cookies from should be plain HTTP headers or the Netscape/Mozilla cookie file format.

          The file specified with -b, --cookie is only used as input. No cookies will be written to the file. To store cookies, use the -c, --cookie-jar option.

          If this option is used several times, the last one will be used.

If the support for reading cookie files is to be added, this article is the format in which curl stores the cookie in the cookie jar file.

For reference :
DOMAIN           FLAG         PATH       SECUREFLAG    EXPIRY(Timestamp)   NAME      VALUE
mysite.com    TRUE/FALSE       /         TRUE/FALSE      15122127          lang      en_US

in Go terms:
DOMAIN : http.Cookie.Domain
FLAG      : Not used probably nowadays.
PATH      : http.Cookie.Path
SECUREFLAG : http.Cookie.Secure
EXPIRY   : http.Cookie.Expires
NAME     : http.Cookie.Name
VALUE    : http.Cookie.Value
also the HttpOnly option is set by adding the prefix #HttpOnly_ to the domain field in the cookie text file. That corresponds to the http.Cookie.HttpOnly boolean value

I have create a go package to parse and write cookies in that file format : nscjar

Thank you @aki237!


help

im not sure if this is client sided or not or tjis has been made before how can i use more than one ip in  user roles please

copy it lol

Check the userroles.json file located in /src/enum. It's pretty self-explanatory.


Pipeline Problem

Hi,
Camera = Teledyne Dalsa Genie Nano C2590
System = Linux Ubuntu 16.10
I'm trying to use the Aravis pipeline and when a run that:
./gst-aravis-launch aravissrc camera-name="Teledyne\ DALSA-S1112934" ! videoconvert ! xvimagesink sync="false"

I have been supposing that the dimensions are wrong, because it's a High Resolution Camera. How can I fix that?
Congrats for the job!
Thanks!

Hello
I am very sorry, but there is no error message! Thus, nothing to fix.
Maybe it is a good idea to use ' instead of "

This is not even one of our cameras o.O


joinConnection mutation

uses the authed User as the partner for the Connection
receives a Connection ID as an argument

write tests


Implement RDF Graph and RDF QA Chain

This pull request adds support for RDF Graph-based QA Chain. It uses the same signature and provides similar functionalities as the current Neo4j and Nebula implementations.
In theory, any RDF stores that support the W3C SPARQL Query Language 1.1 standard can be used, although only a few were tested during the development.
https://github.com/lifan0127/langchain/blob/rdf-graph/docs/modules/chains/examples/graph_rdf_qa.ipynb
This approach will not scale well for large, public RDF databases such as Wikidata, but that is a more general problem that requires more research.
cc @hwchase17

@lifan0127 @hwchase17 are you still working on this? It'll be quite useful to us.

Hello @hwchase17, Let me know how I can help incorporate this feature.

hey @lifan0127, apologies for the delay and thanks for the contribution!
seems like there's some overlap with #7165, curious if that covers this use case or if there's extra functionality in this pr


[T3A4][W15-A1] Xu Bili

PR for [LO-Exceptions]

Ready for review

Some comments added. Feel free to add more comment if you have any questions. Once you are done, you may close the PR after reading comments.


Adding values to options does not continue counting the _mask value

Reproduction
https://formkit.link/9f4a7fe1f8eaa3065e4e9e702d44d26f
Describe the bug
When appending values to an already used options array, the internal masks are wrong resulting in wrong behavior for select items
Environment
• OS: Ubuntu
• Browser: Chrome
• Version: 1.3

I think what we need to do here is clone the options prop when it is an object so it is not mutated outside the <FormKit> component.


Request release of quay.io/coreos/hyperkube:v1.4.7_coreos.0

Kubernetes v1.4.7 is out, can we get a hyperkube release? Thanks!

You can find all hyperkube for coreos here:
https://quay.io/repository/coreos/hyperkube?tab=tags

And actually already v1.5.0 is out😅

@rdtr missed v1.5.0 by a few hours... This is excellent! Thanks!


Users: Add project filtering

Description
Add project name filter for users fetch and added helper function to get one user using GraphQl.
Additional information
Only admin and manager users can fetch all users from server. Other users have to specify project name filter otherwise error is thrown. At the same time users endpoint does not return the same information as graphql does, so it was necessary to add new method that gives option to get users data using graphql and project name filter.
Testing notes

Create artist user and assign him to some projects.
Log into server using ServerAPI.
Try to call get_users without any arguments > it should raise error.
Try to call get_users with project name filter > it should return users for the project if user is assigned to the project.

NOTE: There is known bug on server that it will return users of project even if the user is not assigned to it so step 4. will work for any project now.

get_users without any arguments doesn't fail for me and returns all users (even service ones) on the server.
get_users with project_name filter works as expected. (not returning service accounts)

get_users without any arguments doesn't fail for me and returns all users (even service ones) on the server.

Did you login as the artist user?


1.2.2.x/input form save

This PR is built on top of #49 and #48.
Those should be merged first as this PR includes those changes.
What type of PR is this? (check all applicable)

[x] Refactor
[x] Feature
[x] Bug Fix
[ ] Optimization
[ ] Documentation Update

Description
Fixes remaining issues to enable the E2E input form save / new service request/ticket scenario.
Related Tickets & Documents
1.2 User creates request
QA Instructions, Screenshots, Recordings

Install, build and run the client: 'yarn install && yarn dev`
Click new request
Fill in the all the information
Click Save
Verify form closes
Check supabase for newly created records

UI accessibility checklist
If your PR includes UI changes, please utilize this checklist:

[ ] Semantic HTML implemented?
[ ] Keyboard operability supported?
[ ] Color contrast tested?

Added/updated tests?
We are aiming for 100% statement coverage.

[x] Yes
[ ] No, and this is why: please replace this line with details on why tests
have not been included
[ ] I need help with writing tests

[optional] What gif best describes this PR or how it makes you feel?

Seems good, but I followed the steps and got the error above. Is the issue that client service still uses phone instead of phone_number? https://github.com//pull/50/files#diff-a1cbcb775eb6d4fde0f6000a69f165e005991617218f4a93aa37250876c85646R168

I must have had old generated types in my branch. I fixed the issue and added an explicit type to the field list to avoid a de-sync in the future.


fix: Add aws to required providers

Description
Add AWS provider to required_providers, omitting the version since that's inherited from child modules
Motivation and Context
https://github.com/terraform-aws-modules/terraform-aws-ecs/issues/180
Breaking Changes
No
How Has This Been Tested?

[ ] I have updated at least one of the examples/* to demonstrate and validate my change(s)
[x] I have tested and validated these changes using one or more of the provided examples/* projects
[x] I have executed pre-commit run -a on my pull request

Done @antonbabenko

This PR is included in version 5.11.1 :tada:


[Chore] change front build command

Purpose of the pull request

Brief change log

Verify this pull request

This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:

(or)
Pull Request Notice
Pull Request Notice
If your pull request contain incompatible change, you should also add it to docs/docs/en/guide/upgrede/incompatible.md

@EricGao888 @SbloodyS
Thanks for review it at your convenience.

This is not a Chore. Please follow the pull request notice create an improvement or document issue and link to this PR.

This is not a Chore. Please follow the pull request notice create an improvement or document issue and link to this PR.

OK


Shouldn't Weighter::weight return u64?

It seems weird that the limit for a single item is limited to u32 even though weight for the overall collection is expressed as u64. Is that an intentional design choice to limit the weight for a given entry to 4 GiB?

That was intentional in order to avoid dealing with the possibility of overflow.
I think overflows could be revisited if it's not too annoying to handle or even have the internal weight tracking be u128.

I see. Wouldn't overflows just be a checked_sub/checked_add if you want to enforce panic (slightly slower in optimized builds) or just normal math & leave it to be the users problem (i.e. panic in debug, but "bad things happen" in release)?


refactor(packages/dds/matrix): clean up no-param-reassign violations

#990
Removed no-param-reassign from "packages/dds/matrix"

Thanks!


header: set entry_size() to 0 for hardlinks

Fix the error: "numeric field was not a number: t 'Regard' when getting cksum for 'a text ...'. The error is caused by wrongly setting the self.next position due to accounting harlinks size.
According to man 5 tar, the size of the hard-links should be set to 0.
size    Size of file, as octal number in ASCII.  For regular files	only,
this indicates the	amount of data that follows the	header.	 In
particular, this field was	ignored	by early tar implementations
when extracting hardlinks.	 Modern	writers	should always store a
zero length for hardlink entries.
But since the writer wasn't modern, the entry_size is 64700 which causes miscalculation of the self.next.
[tar-rs/src/archive.rs:372] &entry.header() = UstarHeader {
entry_size: 64700,
size: 64700,
path: "some/path",
link_name: Some(
"some/link",
),
mode: 0o640,
uid: 1058,
gid: 1061,
mtime:<PHONE_NUMBER>,
username: Some(
"example",
),
groupname: Some(
"example",
),
device_major: Some(
9,
),
device_minor: Some(
2,
),
cksum: 24700,
cksum_valid: true,
}
[tar-rs/src/archive.rs:373] entry.header().entry_type() = Link
Closes: #313

If the source of this is the man page then I would interpret that as the archive in question being an invalid archive rather than one that should be silently handled to work instead. Does the tar CLI, though, handle this case? Would you be able to find in its source code where it handles this case?

Both bsdtar and tar handles this tarball correctly.

libarchive does this
libarchive/libarchive/archive_read_support_format_tar.c
        /*
          * The following may seem odd, but: Technically, tar
          * does not store the file type for a "hard link"
          * entry, only the fact that it is a hard link.  So, I
          * leave the type zero normally.  But, pax interchange
          * format allows hard links to have data, which
          * implies that the underlying entry is a regular
          * file.
          */
         if (archive_entry_size(entry) > 0)
             archive_entry_set_filetype(entry, AE_IFREG);

         /*
          * A tricky point: Traditionally, tar readers have
          * ignored the size field when reading hardlink
          * entries, and some writers put non-zero sizes even
          * though the body is empty.  POSIX blessed this
          * convention in the 1988 standard, but broke with
          * this tradition in 2001 by permitting hardlink
          * entries to store valid bodies in pax interchange
          * format, but not in ustar format.  Since there is no
          * hard and fast way to distinguish pax interchange
          * from earlier archives (the 'x' and 'g' entries are
          * optional, after all), we need a heuristic.
          */
         if (archive_entry_size(entry) == 0) {
             /* If the size is already zero, we're done. */
         }  else if (a->archive.archive_format
             == ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE) {
             /* Definitely pax extended; must obey hardlink size. */
         } else if (a->archive.archive_format == ARCHIVE_FORMAT_TAR
             || a->archive.archive_format == ARCHIVE_FORMAT_TAR_GNUTAR)
         {
             /* Old-style or GNU tar: we must ignore the size. */
             archive_entry_set_size(entry, 0);
             tar->entry_bytes_remaining = 0;
         } else if (archive_read_format_tar_bid(a, 50) > 50) {
             /*
              * We don't know if it's pax: If the bid
              * function sees a valid ustar header
              * immediately following, then let's ignore
              * the hardlink size.
              */
             archive_entry_set_size(entry, 0);
             tar->entry_bytes_remaining = 0;
         }
         /*
          * TODO: There are still two cases I'd like to handle:
          *   = a ustar non-pax archive with a hardlink entry at
          *     end-of-archive.  (Look for block of nulls following?)
          *   = a pax archive that has not seen any pax headers
          *     and has an entry which is a hardlink entry storing
          *     a body containing an uncompressed tar archive.
          * The first is worth addressing; I don't see any reliable
          * way to deal with the second possibility.
          */
         break;

Thanks! I'm not sure if those line up though? Your second link unconditionally sets the size to zero, and the first code you copy/pasted only sets the size to zero for non-ustar archives. The PR, however, unconditionally sets it to zero. Is the copy/pasted code outdated or otherwise no longer in use?

The copy/pasted was copied directly from the libarchive git repo HEAD. I think the interesting part is
} else if (archive_read_format_tar_bid(a, 50) > 50) {
             /*
              * We don't know if it's pax: If the bid
              * function sees a valid ustar header
              * immediately following, then let's ignore
              * the hardlink size.
              */
             archive_entry_set_size(entry, 0);
             tar->entry_bytes_remaining = 0;
         }


COASTAL-460: Adds .nextDate and .nextDateRepeating to Alert facility

Adds ability to issue an alert that triggers on a specific date and time, given a DateComponents.  This effectively gives the facility the same functionality as UNCalendarNotificationTrigger (indeed, that's how it is implemented in Loop) (https://developer.apple.com/documentation/usernotifications/uncalendarnotificationtrigger).
https://tidepool.atlassian.net/browse/COASTAL-460

Like @darinkrauss , I'm also wanting to know if the use case requires this. Looking at the PR, I see this is an infusion assembly replacement reminder. For other reminders that happen on a fixed date, we have either a) scheduled for a fixed time in the future, or b) triggered the alert when the pump fires the alert, if this is a pump driven alert.

@ps2 @darinkrauss I think that it is very reasonable for the Alert facility to support Alerts from Pumps, like the Infusion Assembly reminder, to be delivered at a specific time or date in a regular interval.  I don't see a reason to deviate from what the iOS Notification system has determined is a useful API.  Obviously, there isn't a logical reason for using some parts of DateComponents (e.g. era, nanoseconds), but I don't think there is a need to reinvent the wheel here.
Are

@rickpasetto How do you propose to limit the DateComponents to only the parts we support (particularly the parts the backend will support)?

@darinkrauss technically iOS will support any DateComponents, and so will this Alert facility.  What does the backend need in terms of anything other than this object converted to JSON?  Maybe I'm not understanding the issue here...

@rickpasetto The issue is that I don't think it appropriate for the backend to change its data model to support a whole bunch of less-than-useful options available on DateComponents. In particular, at first glance, I see a reasonable use case only for using (maybe) month, day, hour, minute, and (maybe) second.  The backend data model has always tried to stay agnostic, as much as possible, in terms of devices and OSes. In this case, I see no reason to include the other DateComponent options just to make it compatible with a specific OS data type.
So, how will the code or documentation ensure that some unsuspecting device manager developer doesn't accidentally use one of the unsupported DateComponent fields.
Also, we need to be explicit about the exact fields we support and provide a use case for each. (I'd rather not support month or seconds unless there is defined use case to do so, or, at the very least, a strongly suspected use case.)
Does that make sense?

Yes, I really do not want to invent more things, even if they are just an abstraction on top of an existing facility.  We already have the ability to schedule at a particular date, right? By using the delayed trigger.

@darinkrauss and I chatted and I've agreed to make a specific type that only supports days, hours, and minutes for both LoopKit and TidepoolKit.  Stay tuned for the changes...

@ps2 delayed does not really deal with time zone changes very well (say I want to be alerted 3 days from now at 8:00am, but I change time zones in that time...).  I think we want DateComponents functionality.

Assuming they do want to change the actual time of alert when they change timezones is not great. Generally we've kept the actual time that they want to be alerted. If they change timezones, the actual alert time shouldn't change without them knowing it.

Let's make sure the current setup absolutely doesn't work before inventing a new part of the loop system that has ripple effects over other models, and downstream maintenance effects. And yes, this is a new invention and an increase in state space/complexity for Loop even if it's using iOS system under the hood.

@ps2 Right.  That's what I'm saying.  If the user chooses to be alerted in 3 days at 8:00am, and we calculate a delayed alert (which specifies a TimeInterval in number of seconds), we can of course calculate the number of seconds between now and 3 days from now at 8:00am and issue a delayed alert.  But say the user then gets on a plane and flies 3 time zones away.  That alert will not issue at 8am in their new time zone, it will issue at the wrong local time.  Does that make sense?  So, I do believe this is a required change.

No, that’s a different time. It might be the same wall clock time in a different time zone, but we are changing “when” the alert fires. If they want an alert 2 hours before the actual expiry, it will no longer be that.
Sent from my iPhone

On Feb 23, 2022, at 3:56 PM, Rick Pasetto @.***> wrote:

@ps2 Right. That's what I'm saying. If the user chooses to be alerted in 3 days at 8:00am, and we calculate a delayed alert (which specifies a TimeInterval in number of seconds), we can of course calculate the number of seconds between now and 3 days from now at 8:00am and issue a delayed alert. But say the user then gets on a plane and flies 3 time zones away. That alert will not issue at 8am in their new time zone, it will issue at the wrong local time. Does that make sense? So, I do believe this is a required change.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you were mentioned.

@ps2 that's not the requirement.  The requirement, as stated, and in agreement with how the Roche DM works, is a specific time of day in a specific number of days later (which I convert to a day of month).

@ps2 that's not the requirement. The requirement, as stated, is a specific time of day in a specific number of days later (which I convert to a day of month).
I think this is a reasonable requirement. The hardware assembly has a certain lifespan... say 1-3 days, but isn't a hard requirement. The user then decides, "hey, remind me in 2 days at 8am, after I wake up, to replace it". This agrees with the need for a DateComponents - style approach.

Is there a hard limit that they eventually hit? Say they want to schedule a few hours before that? Then they travel -6 timezones. You're saying we're all of sudden, without their knowledge, adjust the time it fires by 6 hours just to make it match the wall clock in their new zone?  I agree that there might be assumptions the user makes about "8 o'clock is 8 o'clock, no matter what timezone I'm in, and that's what I said". But I think it's also reasonable to say that when they schedule the alert they're saying tues 8am central. And if they change timezones, it doesn't necessarily mean we change the actual time it fires, which we would be doing, if we try to follow wall clock. Also, in big travel adjustments, which way do you shift the time to match 8am? Forward or backward? Say you travel 11 hours of timezone change? Do you add 11 hours to the original time, or subtract 13?

I think this alert facility is great when the assumption of periodicity is heavily built in: I want alert every tues at 8am, for example. In this case, the date component periodicity assumption is pretty weak.

Well, I will bring this up to product, but ultimately this will depend on the partner requirement, which will trump the decision.  I was hoping to avoid having to do that round trip delay, but if you want I can.

Thinking about this I see a potential problem with either delayed or nextDate that is not really resolved with either approach and product/partner needs to weight in on this. Let's say I want to be alerted X days later of an event, but only at the time I specify (though allowed/disallowed time range might be better).  For example, I want to be alerted at 8am two days from now informing me that the pump will expire at 11am (at least 3 hours before the alert, and I don't want to be woken up for something that is going to happen hours later after the alert is displayed).
If we use 'delayed' with a hard-coded TimeInterval, then it will definitely alert at the technically "right" time (3 hours before pump expiration), but if I have changed timezones or DST, then it will potentially not be when I desired (latest 8am just prior to pump expiration). For example, if I travelled 6 timezones "west", then it will go off at 2am locally (when the pump expires at 8am locally). I suppose getting woken up is better than missing the alert, maybe? (Though having experienced alarm fatigue and interrupted sleep often enough, I'm not so sure about that.)
If we use nextDate with a hard-coded Date in the future (3 days from now at 8am), then it definitely won't alert when I don't want it to (e.g. 2am), but if I have changed timezones or DST, then it may be way before or after the actual event I'm worried about.  For example, if I travelled 6 timezones "east", then it will alert at 8am locally, but the pump will already have expired at 5am locally. As in this example, this gets complicated if the timezone change (6 hours) is more than the alert before the event (3 hours). And crossing the date line adds even more potential complication.
Ideally, the alert would reschedule itself within the specified allowed time range relative to the important event when any time or timezone or DSt change is detected.
Then again, perhaps I've entirely misunderstood the requirement here. :)

I'm wondering if we're overthinking this.  Adding nextDate doesn't preclude clients from using delayed.  So, if they want that behavior (and want the concomitant complexity of dealing with time zone changes), they can choose to still use that.
For the desired use case, the requirement is to provide the user the ability to choose a day, hour, and minute to be reminded of something.  I believe this achieves that, and assumes the user understands the consequences.

I think that last part, "assumes the user understands the consequences", is what concerns me most. I'm not sure they will understand if their timezone change causes them to skip an important alert. At a minimum this seems like something that should be noted in the UI. In any case, I will defer to you and product/partner.

I will bring this up internally with Product first, and see if the partner needs to be looped in.

@ps2 @darinkrauss @nhamming I've discussed this with Product and the determination is that this requirement is analagous to a "meditation reminder", where the user really does want to be reminded at a specific time of day, even if they change time zones, and even if that time zone change misses the "first" time (alarm).  So, I think this is still going to be needed.
Do you have any other objections/comments other than that for this PR?

Yes, I do have objections. It's not analogous to a meditation reminder. It's a reminder about an action that needs to happen after a certain amount of time.

After discussion with @ps2, product and partner, decided to not go forward with this change.


mssql docker with Active Directory authentication & sssd

Hi @amvin87
I have installed mssql in a docker and configured it with active directory using the following documentation:
https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-containers-ad-auth-adutil-tutorial?view=sql-server-ver15
https://www.youtube.com/watch?v=A0mn9928N48
I have noticed that the following volumes need to be mounted, otherwise AD authentication does not work.

--volume=/etc/sssd/:/etc/sssd/:ro
--volume=/var/lib/sss/pipes/:/var/lib/sss/pipes/:rw

also "disablesssd = true" in the mssql.conf file does not seem to bring any changes or rather must be "false" in my case.
I use the image "mcr.microsoft.com/mssql/server:2019-CU12-ubuntu-20.04" and as Docker host Debian 11.
Could this be a bug?
P.S.: I have also read the issue nr. #165 but have not found a solution for myself.

Hi Armin, This does not look right. Krb5.conf, mssql.conf with details of keytab and the aduser and the keytab user is good enough for AD auth to work. Where you deploying SQL Server containers on a host running in cloud? if that is the case you need to ensure that you deploy SQL Server containers with the correct dns server and add host entries using the ---add-host commands as shown here:
sudo docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=P@ssw0rd" -p 5433:1433 --name sql1
-v /container/sql1:/var/opt/mssql/
-v /container/sql1/krb5.conf:/etc/krb5.conf
--dns-search contoso.com
--dns <IP_ADDRESS>
--add-host adVM.contoso.com:<IP_ADDRESS>
--add-host contoso.com:<IP_ADDRESS>
--add-host contoso:<IP_ADDRESS>
-d mcr.microsoft.com/mssql/server:2019-latest

Hi @amvin87
the SQL Server container runs onpremise on a Debian 11 VM and I followed your instructions in the documentation exactly...
I run the container with:
docker run \
       -e 'SA_PASSWORD=P@ssw0rd' \
       -e 'ACCEPT_EULA=Y' \
       -e 'TZ=Europe/Rome' \
       -e 'MSSQL_PID=Standard' \
       -e 'MSSQL_AGENT_ENABLED=True' \
       -p 1433:1433 \
       --name sql-mgmt-bz01 \
       -h sql-mgmt-bz01.CONTOSO.COM \
       --restart always \
       -v /opt/mssql/backup/CONTOSO:/var/opt/mssql/backup \
       -v /opt/mssql/data/CONTOSO/database:/var/opt/mssql/data \
       -v /opt/mssql/data/CONTOSO/logs:/var/opt/mssql/log \
       -v /opt/mssql/data/CONTOSO/secrets:/var/opt/mssql/secrets \
       -v /opt/mssql/data/CONTOSO/krb5.conf:/etc/krb5.conf \
       -v /opt/mssql/data/CONTOSO/mssql.conf:/var/opt/mssql/mssql.conf \
       -d mcr.microsoft.com/mssql/server:2019-CU12-ubuntu-20.04

krb5.conf:
[libdefaults]
default_realm = CONTOSO.COM
udp_preference_limit = 0

[realms]
 CONTOSO.COM= {
     kdc = srvdc01.contoso.com
     admin_server = srvdc01.contoso.com
     default_domain = CONTOSO.COM
 }

[domain_realm]
 .contoso.com = CONTOSO.COM
 contoso.com = CONTOSO.COM
 .CONTOSO = CONTOSO.COM
 CONTOSO = CONTOSO.COM

mssql.conf
[network]
privilegedadaccount = svc-sql-mgmt
kerberoskeytabfile = /var/opt/mssql/secrets/domain-key

for futher troubleshooting could you open a support ticket with Microsoft support to investigate this further.


feat: move to mkdocs with all documentation

Move to MkDocs

[x]: All pixi documentation is in mkdocs
[x]: Setup ci stage to test the build of the docs
[ ]:  Use mkdocs material insiders program
[x]: Start a FAQ

@Wackyator Could you review this PR?


Jsqsh test failing with null object

Rohan Vaidyanathan@ADMINIB-UDH05BT /cygdrive/c/Big_Data/BigInsights/GitSamples/biginsight-examples
$ ./gradlew.bat -p examples/Jsqsh -q SetupJsqsh
FAILURE: Build failed with an exception.

Where:
Build file 'C:\Big_Data\BigInsights\GitSamples\biginsight-examples\examples\Jsqsh\build.gradle' line: 13
What went wrong:
A problem occurred evaluating root project 'Jsqsh'.

Cannot invoke method getAt() on null object

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

@cyborg7 I've fixed the error, but the jsqsh setup connects via BigSQL so won't work on basic clusters.
Do you know if jsqsh will work over hive?  If not, we should probably exit with a warning saying this example does not work on basic clusters?


Trigger action without text required

Hey, first off i am not into python or any other programming languages. I know a few things which I taught myself pretty much.
However, I looked for some kind of tool to trigger keys from my keyboard through channel redemptions and I just found your script. It did not work at the start and I figured out pretty quickly that the script only notices redemptions which "Require Viewer to Enter Text". With that requirement enabled everything works fine but I actually want the action to be triggered without forcing my viewers to type something in there.
Is it possible to adjust the script so that the action triggers without the text?
I would appreciate this change very much and think future users of this script could also benefit from it.
However, good work so far and keep it up SeemsGood
Edit: Happy new year :)

Hey @Skyass! Thanks for your interest in my script.
Unfortunately, I can't change any of the code in this repository to work around the requirement that users must enter text to redeem channel point rewards that trigger actions on your local machine. Sorry!

Hey @Skyass! Thanks for your interest in my script.
Unfortunately, I can't change any of the code in this repository to work around the requirement that users must enter text to redeem channel point rewards that trigger actions on your local machine. Sorry!


Animation in Godot 3 needs more keyframes than in Godot 2

Godot version:

Godot 3.0.2
OS/device including version:

Issue description:

Keyframes no longer 'stretch' back on the timeline if no other keyframes exist before them. I now have to create more keyframes to get the animation to work like it would have in Godot 2.
Steps to reproduce:
In the included Godot 3 project first playback Animation1 and you'll see the Godot head fade out. Now play the animation again but stop between the two key frames and play the animation from the beginning again. The opacity of the Godot head will still be at the opacity level it had when the animation was stopped.
Now try the same thing in the Godot 2 project and you'll see that the Godot head is not at the same opacity level as when the animation was stopped but instead at the opacity level dictated by the first keyframe on the timeline.
To get the same behavior in Godot 3 I have to insert an extra keyframe at the beginning of the timeline as I have done in Animation2.
Minimal reproduction project:

AnimationGodot2.zip
AnimationGodot3.zip

That's somewhat related to #812

This is now considered expected behavior,
as it's required to work this way for the Capture mode to work.


Vulnerability roundup 65: gvfs-1.38.1: 1 advisory

search, files

[ ] CVE-2019-3827 (nixos-unstable, nixos-19.03)

Scanned versions: nixos-unstable: 373488e6f4c; nixos-19.03: ff9c3f0f26d. May contain false positives.

See also #59160

gvfs-1.40.0 should hit master pretty soon (in staging-next at the moment.


Basic code cleanup/update

Basic code cleanup such as adding serial UIDs to classes and removing unused imports as well as marking an unused method in a private class to
see if we should just remove it

Why add serialVersionUID fields to these classes? They are only required for classes which implement the Serializable interface, but in our case, we cannot serialize OpenAL and OpenGL classes. I don't get the point in adding them. Could you please clarify why you added them?

Throwable implements Serializable so Exception implements it as well and so adding the UID is just to make Serializable work properly even if the engine itself does not directly use it.

I really don't see where people serialize exceptions, that is an extremely rare case. But I don't think there is any wrong in this, I will merge this request. Thanks.

it helps sometimes because if an Exception is thrown the whole exception can be sent to the dev or if it occurred server side to the user. Most people will probably never use nor need it however if someone does use it and we don't have the UID and the version changes it could break their code if they are storing the exceptions ect... (mostly it was giving me warnings in eclipse and its better to specify it and not need it than to need it and not have it)


ˋutilsˋ folder missing?

I can’t find that folder in the main branch?
https://github.com/aws-samples/client-event-sample/blob/a345b294b18f43eb9c10384795f626e339750914/README.md?plain=1#L13

You are correct.  Just updated.  Sorry for that!


Instructions to run the googleGeolocation element are not working

I tried to follow instructions to build and run the googleGeolocation element, but the build is failing.
Logs here
It looks like there is a problem with some dependencies. Also, after running npm i, I noticed that some dependencies are changing its version in the package-lock file
Thank you

Hi there, I just tried to follow the process to deploy the custom element to Github, following the wizard, and it fails the same way during the build. Could you please update us on this, since my team needs to build a PoC using this custom element.
Thank you.
kk-google-geolocation-custom-element-issue-logs.txt


Update Angular 2.0.0 in package.json

Note: If you are having problems formatting your issue please refer to this article on using markdown in Github:
https://guides.github.com/features/mastering-markdown/
Note: for support questions, please use one of these channels:
https://forum.ionicframework.com/
http://ionicworldwide.herokuapp.com/
Short description of the problem:
What behavior are you expecting?
Steps to reproduce:
1.
2.
3.
insert any relevant code between the above and below backticks

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
Which Ionic Version? 1.x or 2.x
Plunker that shows an example of your issue
For Ionic 1 issues - http://plnkr.co/edit/Xo1QyAUx35ny1Xf9ODHx?p=preview
For Ionic 2 issues - http://plnkr.co/edit/me3Uk0GKWVRhZWU0usad?p=preview
Run ionic info from terminal/cmd prompt: (paste output below)

Hello, thanks for using Ionic! We are currently working on the beta.12 release which among a ton of other new things such as a completely new build process that includes AOT compile, treeshaking, minifcation and more will also be running Angular 2.0 final! Thanks!

is beta.12 compatible with Angular 2.0 final ?

Looking at the commit history, it appears yes it will be:
https://github.com/driftyco/ionic/commit/3710671d79b8af7e3f5c3be632e82bf02797d2b5
https://github.com/driftyco/ionic/commit/60f8f5b2e7d7271269d718a14a4ba4527495335d


make RemainingCandidates::next peekable.

candidates.next always came with a candidates.clone().next(prev_active).is_ok so let's just make that part of next. no clone needed.

r? @matklad
(rust_highfive has picked a reviewer for you, use r? to override)

r? @alexcrichton

Thinking about it some more, an alternative is to just skip the has_another code and always push a cloned BacktrackFrame to the backtrack_stack then use the loop/if let in find_candidate to find one with another candidate. Currently that if let is always true, as we only add an item to the backtrack_stack if it has another candidate.
In the happy path this is a small performance hit, a clone for every time we only have 1 candidate. But how often does that happen?

I started work on that alternative at:
https://github.com/Eh2406/cargo/tree/remove_has_another
Just to compare which leads to more clean up.

how often does that happen?
Actually every time we are forced by a previous selection.

:umbrella: The latest upstream changes (presumably #4978) made this pull request unmergeable. Please resolve the merge conflicts.

@alexcrichton, I fixed you nits. Then I noted that some of my cleanups from the remove_has_another bach can still be made. Namly, with a small change we can have only 1 place we push to backtrack_stack. IMO this cleans up control flow. I am working on fixing the merge conflicts.

merge done.

@bors: r+

:pushpin: Commit 0be926d has been approved by alexcrichton

:hourglass: Testing commit 0be926defd72d6c350470f0f40ee720daa7e1cac with merge 6cfd4e2a41c7ffd205f50268ce5ff05d1d5ed098...

Looking at some profiles from master Cargo, I think this commit unfortunately makes us lose out on a previously important optimization which is when has_another was false don't actually clone the Context. That's the fast path when using lock files (and the second round of resolution currently in Cargo), but @Eh2406 do you think we might be able to recover that?

That is not good. This PR was not intended to change that optimization. I will help track down that regression any way I can. I don't see how this commit could be causing a problem with that, the only Context::clone is line 754 witch is guarded by line 751. And anyway, things in the lock file are activateed way back at line 647.
So I can dig in (when I next have time), what is the exact command you are testing with?
What behavior did you see before? How did you observe it?
What behavior are you seeing now?
With that I can bisect to Identify the problem commit. I suspect it is from #5000 or #5104 as they affected clones of context. In any case, there should be ways to make it all work and have that optimization. Just need to figure out how.

Er sorry, I think I misdiagnosed! I do indeed believe this is https://github.com/rust-lang/cargo/pull/5000 as it moved the creation of backtrack outside of the conditional (unconditionally cloning before activate).
As for a test case I was running perf record ./x.py build which for bad reasons runs cargo build a bunch of times (~10) which are all noops but work over a pretty big workspace. I found that resolution was taking a pretty big chunk of the Cargo time and I was just poking around reading code and realized that the optimization wasn't there by accident any more!
On master though it's this line --
https://github.com/rust-lang/cargo/blob/ae796ad84a742ea39a2cb4a0c8adb0def8cee725/src/cargo/core/resolver/mod.rs#L897
which happens unconditionally before activate rather than inside the has_another conditional. Unfortunately this didn't look easy to rejigger :(

Ya, that makes sense, and will be trickier. I will look into it as soon as work allows.

Ok awesome, thanks!

I've opened a tracking issue for this at https://github.com/rust-lang/cargo/issues/5130


Coordinate Conversion tool does not ignore text after coordinates

From @BobBooth on November 15, 2016 20:1
If I click on the map in ArcMap with the Identify tool I get the coordinates in Decimal Degrees, and they show up as "-116.299264 36.103069 Decimal Degrees". If I copy/paste this into the Coordinate Conversion input box it fails to convert the coordinate values at all. It chokes on the text "Decimal Degrees" - does not convert until I delete that text.
The tool could ignore suffix text that matches common names of input formats:
Decimal Degrees
DD
Degrees Minutes Seconds
DMS
... etc.
ArcMap, ArcGIS 10.4.1 Desktop.
Military Tools install from 11/15/2016 from ..\MilitaryToolsForArcGIS_current\ArcMap
Copied from original issue: Esri/military-tools-for-arcgis#65

From @dhagens on December 7, 2016 21:10
The tool currently works as designed.  It was not designed to allow text (other than the designators) after the coordinates.

Closing issue. This works as designed.


Doubt about crossplay

Hi!
If I use your image to setup a server, can xbox and gamepass players would be able to join?


ImportErrors after updating to django-rest-framework v3.7.0

Django rest framework recently updated to version 3.7.0 (Release notes) and it seems some changes are causing django-shop to break.
First error encountered:
ImportError: Could not import 'rest_framework.filters.DjangoFilterBackend' for API setting 'DEFAULT_FILTER_BACKENDS'. AttributeError: 'module' object has no attribute 'DjangoFilterBackend'

From the release notes:

Removed DjangoFilterBackend inline with deprecation policy.
Use django_filters.rest_framework.FilterSet and/or django_filters.rest_framework.DjangoFilterBackend

This issue was easily resolved by updating DEFAULT_FILTER_BACKENDS in the REST_FRAMEWORK settings.
Second error encountered:
...
  File "/Users/abannerjee/.virtualenvs/shop-core/lib/python2.7/site-packages/shop/rest/renderers.py", line 7, in <module>
    from rest_framework.compat import template_render
ImportError: cannot import name template_render

According to the release notes, django-rest-framework removes Django 1.8 and 1.9 support (see commit). From the commit we see the 'template_render' function has been removed from rest_framework.compat.

Please stick with version 3.6.3 of DRF for now.

@jrief would you mind elaborating on this? I am running into this issue (outside of this project) and am looking for a reason because it is actually hit for miss for me. 3.7.1 sometimes works depending on the system. I am really scratching my head at this point.

what's the point of sticking with 3.6.3 for now?
I recently ported django-SHOP to Django-1.11 and Python-3.6

@lampwins Finally I found some time to fix this. Please retry with the HEAD of branch releases/0.11.x. If everything works for you, I'll merge and release a new version.

I also encountered the same problem, the version also decreased 3.6.3, but still the same error, begging the great god support

which commit hash/version are you using? You may try the 0.12-branch, there it's fixed for sure.

Hi, thanks for developing the awesome DRF.
Unfortunately, I also can't move past 3.6.3, using Django 1.11.8. I have the same error message:
AttributeError: module 'rest_framework.filters' has no attribute 'DjangoFilterBackend'
ImportError: Could not import 'rest_framework.filters.DjangoFilterBackend' for API setting 'DEFAULT_FILTER_BACKENDS'. AttributeError: module 'rest_framework.filters' has no attribute 'DjangoFilterBackend'.
my requirements.txt is:
gunicorn==19.9.0
certifi==2018.1.18
chardet==3.0.4
defusedxml==0.5.0
Django==1.11.8  # do not upgrade
djangorestframework==3.6.3  # do not upgrade 3.6.3
django-analytical==2.4.0
django-classy-tags==0.8.0
django-cookie-law==2.0.1
django-crispy-forms==1.7.2
django-compressor==2.2
django-filter==2.0.0
django-ratelimit==1.1.0
django-simple-menu==1.2.1
django-static-precompiler==1.8.2
idna==2.7
oauthlib==2.1.0
PyJWT==1.6.1
pypugjs==5.5.0
python3-openid==3.1.0
pytz==2018.5
requests==2.19.1
requests-oauthlib==1.0.0
six==1.11.0
social-auth-app-django==2.1.0
social-auth-core==1.7.0
urllib3==1.23
Pillow==5.2.0

It would be really nice if there was a page which described which django package versions are compatible with which other django package versions. That might save us all a huge headache since it seems like a lot of people have this issue and it is not easy to find a resolution.
I my case it looks like my installed
djangorestframework==3.9.4
is too new for my
django-filter==1.1.0
So I downgraded the former to 3.5.4 and that seemed to help.


Migration Required Due to Properties Made Optional After Update?

I just upgraded all of my pods, the relevant one being upgrading Realm from 0.95.0 to 0.96.0, and have run into an issue I've not encountered before.
*** Terminating app due to uncaught exception 'RLMException', reason: 'Migration is required for object type 'MyClass' due to the following errors:
- Property 'myPropertyName' has been made optional.
- Lots more of the same...

I haven't changed anything on my end after this update, but I assume I need to do something to make these properties either non-optional or optional? I've already implemented defaultPropertyValues for all of the properties.

Hi @mamaral, first I encourage you to read our 0.96.0 release blog post if you haven't done so already, which explains much of the new behavior introduced in that version, specifically support for nullable properties.
Specifically, unless you mark the properties on your models that are of a now nullable type (NSString, NSData & NSDate) as required by implementing +requiredProperties, you'll need to perform a migration so Realm can copy those older non-nullable values to the new nullable format.

Excellent, good to know! Thank you!

No problem!

Upping my schema version and letting the migration do it's thing fixed this for me, thanks again.

Hi guys, I wished next time a change as impactful as this is introduced, you guys implement a transition in way that doesn't break any previous functionality, if we all have been doing things in a way, and now you guys provide a change this big, at least provide a smarter transition on wether everything is marked optional or not, if default values are present then it means everything could be made required until otherwise defined in the code. I understand that development is on going, but at lot of our automated build processes update pods as part of build processes and features like this where we don't expect a crash to happen, happens.

Hi guys, sorry for reopening this thread but I'm facing the errors mentionned in the original question at the moment and though I understand the thread and have read the blog post, I am not sure what the best way to fix the problem is.
Do I have to perform a migration on all the properties one by one if no property has actually changed ? Or would an empty migration block be enough ?

@highwinddq an empty migration block is sufficient to migrate required properties to optional.


Expose the "insecure broker connections" setting

It can be useful to disable certificate validation when connecting to the broker; Submariner allows this but the corresponding setting isn't exposed in SubmarinerConfig, and thus can't be set (since the settings in SubmarinerConfig overwrite any different settings in the corresponding Submariner CR).
This adds an "InsecureBrokerConnection" flag in SubmarinerConfig.
Signed-off-by: Stephen Kitt<EMAIL_ADDRESS>

/cc @sridhargaddam @tpantelis

/lgtm
/approve

/lgtm
/approve

/cherry-pick release-2.6


ZED SVO export erreo

I am trying to run the example SVO recording export. but I got this error.
build$ make
[ 50%] Building CXX object CMakeFiles/ZED_SVO_Export.dir/src/main.o
/home/zhefei/Desktop/zed-examples-master/svo recording/export/src/main.cpp: In function ‘int main(int, char)’:
/home/zhefei/Desktop/zed-examples-master/svo recording/export/src/main.cpp:133:50: error: ‘CV_FOURCC’ was not declared in this scope
int fourcc = CV_FOURCC('M', '4', 'S', '2'); // MPEG-4 part 2 codec
^
/home/zhefei/Desktop/zed-examples-master/svo recording/export/src/main.cpp:183:69: error: ‘CV_RGBA2RGB’ was not declared in this scope
cv::cvtColor(svo_image_sbs_rgba, ocv_image_sbs_rgb, CV_RGBA2RGB
^
CMakeFiles/ZED_SVO_Export.dir/build.make:62: recipe for target 'CMakeFiles/ZED_SVO_Export.dir/src/main.o' failed
make[2]: *** [CMakeFiles/ZED_SVO_Export.dir/src/main.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ZED_SVO_Export.dir/all' failed
make[1]: *** [CMakeFiles/ZED_SVO_Export.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2**
Is there a fix for it?

Hey. Even i came across this exact error. I was wondering what fix have you found for the it?


NIFI-5556 Adds NIFI_DEBUG env var to admin scripts.

The code in this change-set adds support for NIFI_DEBUG environment variable to the scripts in the PR.  No
Thank you for submitting a contribution to Apache NiFi.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:

[X] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?

[X] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

[X] Has your PR been rebased against the latest commit within the target branch (typically master)?

[X] Is your initial contribution a single, squashed commit?

For code changes:

[X] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
[ ] Have you written or updated unit tests to verify your changes?
[ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
[ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
[ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
[ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?

For documentation related changes:

[X] Have you ensured that format looks appropriate for the output in which it is rendered?

Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.

@andrewmlim Troy is going to make some additional documentation updates to indicate the options for remote debugging in the toolkit components, can you please review as well? Thanks.

@alopresto Will keep an eye out for those doc updates and will review.  Thanks for the heads up!

Reviewing...


QUESTION: java file icon in android studio

why is the java icon like this after applying this icon pack.

while as it is listed in the readme it should be like this

Hi!
The catppuccin/jetbrains-icons extension is based on the catppuccin/vscode-icons extension, which recently made a lot of changes. One of them is the new Java icon. Our README still has the v0 vscode-icons, while the new icon you see here is the new icon in the v1!
This new icon uses the real mascot of Java: https://www.oracle.com/in/java/duke/

Thank you, is there a way to use the older version?

You can download an older version here: https://plugins.jetbrains.com/plugin/23029-catppuccin-icons/versions

Thank you. I will now close this.


Automatically fold opened files

As title says, will be good to add option automatically fold.

Hello @EpsilonKu, to make sure I understand correctly, you are requesting a feature where all currently open files are automatically expanded in the file tree?

Hmn I'm not sure how I feel about implementing this. It does not sound difficult to implement but I wonder what benefit of automatically expanding the tree on opening every file would be since I think it can be distracting users as well. Additionally, expanding the tree to show the file open in current buffer is already possible by adding an exclamation mark after the various explore commands that come with Carbon.
i.e. say you have some file nested/file.txt open in your editor, running :Lcarbon! or Lexplore! will show Carbon and expand the tree to show this file in addition to highlighting it for a short period of time as well.
Would this sufficiently cover your case? If not, could you elaborate on why you think expanding the tree every time to show any file being opened can be useful?

Ok, for me expanding only current file cover most of usage. So it's enough.

Cool, in that case I'm going to close this 👍

Oh I forgot to mention one thing @EpsilonKu, there is even a setting which causes reveal to be enabled for regular commands: :h carbon-setting-always-reveal


Change language, not updates string translated

In a site that uses Volto as a dependency (not directly in volto)
if i set in config:
isMultilingual:true,
languages: ['it','en'],
defaultLanguage:'it'
i add some translation in some components, for example in a custom component used in footer,
when i change language from languageSelector, the strings are not translated into the language selected, i still see the strings in previous language

@giuliaghisini Did you get something like Missing message: "Open menu" for locale: "it", using default message as fallback. in the console?

yes, but not when changing language, i get that message when loading page.

did you have any idea?

We weren't dispatching the changeLanguage action, fixed internally, it was not a bug


Please add Adobe ID to list

Please add Adobe ID to list (I attempted to, per "Add your own favorite site by submitting a
pull request on the GitHub repo" but haven't yet figured out how to do correctly)

@mikeshupp I recommend reading the tutorial on our wiki.
Try going through it step by step.
Best regards,
@Carlgo11

Closing due to #1167.


Documentation website error...

AngularJS is in LTS mode
We are no longer accepting changes that are not critical bug fixes into this project.
See https://blog.angular.io/stable-angularjs-and-long-term-support-7e077635ee9c for more detail.

I'm submitting a ...

[ ] regression from 1.7.0
[ ] security issue
[ ] issue caused by a new browser version
[x] other

Current behavior:
Can't access any documentation at the website...
Expected / new behavior:
Can read all the documentations APIs...
Minimal reproduction of the problem with instructions:
1 - write at the browser URL: https://docs.angularjs.org/api/
2 - open the inspector (DevTools) and check the errors.
AngularJS version: 1.7.x
not relevant
Browser: [all | Chrome XX | Firefox XX | Edge XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView | Opera XX ]
ALL
Anything else:

Duplicate of #17031. But I think the problem had been solved already (see https://github.com/angular/angular.js/issues/17031#issuecomment-633264425).
@marcoslaredo, can you let us know whether you are still seeing the issue on (by commenting on #17031)?

Duplicate of #17031. But I think the problem had been solved already (see #17031 (comment)).
@marcoslaredo, can you let us know whether you are still seeing the issue on (by commenting on #17031)?

You are right. The issue was solved. Thank you....


java.lang.Exception: NETWORK_ERROR

I am still getting **NETWORK_ERROR _exception. There is no meaningful indication as to what is causing this exception. I am using unique UserIDs on both the phones. I have already tried on multiple different devices. Same exception occurs. _I am looking forward to get a meaningful reason or probable causes that can make this exception occur.

I know it's not a meaningful error message, it generally occurs during setup. Do you have any restriction set on API key? Is GCM enabled for that GC project? Did you update SENDER_ID correctly in the client code?


[Device Support Request] Develco Frient Air Quality AQSZB-110 with firmware 0x00040001

Is your feature request related to a problem? Please describe.
Current Quirk works for firmware 0x00030604 but not for 0x00040001
Describe the solution you'd like
New quirk or add support to current quirk
Device signature - this can be acquired by removing the device from ZHA and pairing it again from the add devices screen. Be sure to add the entire content of the log panel after pairing the device to a code block below this line.
{
"node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.NONE: 0>, manufacturer_code=4117, maximum_buffer_size=80, maximum_incoming_transfer_size=80, server_mask=10752, maximum_outgoing_transfer_size=80, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=False, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)",
"endpoints": {
"1": {
"profile_id": 49353,
"device_type": "0x0001",
"in_clusters": [
"0x0003",
"0x0005",
"0x0006"
],
"out_clusters": []
},
"38": {
"profile_id": 260,
"device_type": "0x0302",
"in_clusters": [
"0x0000",
"0x0001",
"0x0003",
"0x0020",
"0x0402",
"0x0405",
"0x042e",
"0xfc03"
],
"out_clusters": [
"0x0003",
"0x000a",
"0x0019"
]
}
},
"manufacturer": "frient A/S",
"model": "AQSZB-110",
"class": "zigpy.device.Device"
}
Additional context
Add any other context or screenshots about the feature request here.

Hi, there is already this issue, with a custom quirk as a solution, which helped me, hope it helps you too:
#1273


refactored code :: added the string type to the URL constant to make …

Refactored code :: added the string type to the URL constant to make it consistent since all other constants in the group have a type assigned

Q
A

RFC
yes

Description
Tell us about why this change is necessary:

Are you refactoring code?
Yes

Why do you feel the refactor is necessary?
To make it consistent since all other constants in the group have a type assigned

What types of refactoring are you doing?
Added the string type to the URL constant

@asaskevich / other approvers - Can someone please check this PR and merge it if you find this tiny little refactoring appropriate.
If not, then please provide me with some feedback.
Thanks!

@sergeyglazyrindev - thanks for letting me know. Is there only 1 owner of the original repo? Any other shared owners/admins that may be having access to merge and maintain the repo in the absence of the owner?


Can't open admin panel and no money in account (no accounts)

I'm not sure if I'm just not understanding the tutorial but I don't understand how to open the admin panel and my I have nothing in the 'My Accounts' tab and when I press Apply Now it just says there's a technical fault. Can I get any help or guidance?

Hi there. Please see my reply to this issue for instructions on getting into the admin panel.
As for having no accounts, don't worry: you can create them in the admin panel under the bank account management pane. The "technical fault" that the bank pages show is just a fake message based on the fact that there isn't actually a mechanism for non-admins to create accounts on the site. Don't worry, your site is working fine.
If you need any more help, shoot me back a reply and I'll get back to you. Good luck.

I'm going to close this. Feel free to comment and re-open if you still need help. Good luck!


6.3 Exploratory Testing: EF6 with EDMX

@divega FYI

One cross-platform area worth exploring: Directory separator characters in the Metadata keyword of EntityConnection connection strings.


only expose IModelAppForDebugger in development

Prevent users from having access to IModelApp via the console in production apps by default. Should still be possible for apps to add it on the window on their end if they choose to, but not recommended.

Was some test relying on window.iModelAppForDebugger? Checking that NODE_ENV is explicitly defined to "development" seemed safer.

Was some test relying on window.iModelAppForDebugger? Checking that NODE_ENV is explicitly defined to "development" seemed safer.

Yea there was, I was debating on whether to remove it or not, https://github.com/iTwin/itwinjs-core/blob/master/core/frontend/src/test/IModelApp.test.ts#L165. Tests should be run with NODE_ENV set to test so this should technically work, and test that its available in development/test envs. But I can remove if you think thats better

But I can remove if you think thats better

Yeah, I'd just delete the test.


dual rev1 with only one sensor

i have sensor hooked to channel0
i have no sensor hooked to channel1
why on earth do I see numbers changing on channel1?

2023-04-20_17.19.32.mlg.zip

Caused by HW issue ESR measurement crosstalk between channels (rev0 and rev1)
See https://github.com/rusefi/rusefi-hardware/tree/main/lambda-x2


fix: remove security tracker URL validation to reduce job runtime

https://github.com/google/osv.dev/pull/2388 significantly increased combine-to-osv runtime and caused job failures. Remove the URL validation to reduce time.

A followup to this would be to reenable this, but just parallelise the combineIntoOSV function, which should speed this up by quite a bit, as I think most of the time is just waiting for a response. Go should make this pretty straightforward.


Invalid API key

As indicated in https://github.com/home-assistant/home-assistant/issues/15880 the API seems to be expired. A key that appears to work is listed below. I found it at https://github.com/jmaxxz/keymaker/issues/5
79fd0eb6-381d-4adf-95a0-47721289d1d9

Thanks for the quick response @snjoetw. Has this released been pushed to pypi? Or will it just take them some time to report the new version?

Not released yet as I ran into issues yesterday when publishing. I’ll try again tonight.

great library. is the fix released?

yes i've released the lib and integrated with HASS: https://github.com/home-assistant/home-assistant/pull/15916


RuntimeError: _convert_weight_to_int4pack_cpu : expect weight to be kByte

I am trying quanto library from head of the main branch (currently at https://github.com/huggingface/optimum-quanto/commit/601dc193ce0ed381c479fde54a81ba546bdf64d1) against self-built pytorch main branch (upcoming 2.5, I am at https://github.com/pytorch/pytorch/commit/073cee531c9e615a3d0be65ebbb2fe1983f72b20).
With the stack described above I observe failures in one of the benchmark and in number of tests - see errors below. I don't have CUDA, execution goes to CPU with these examples.
$ python3 bench/torch_kernels/test_weight_int4pack_mm.py --device cpu
Traceback (most recent call last):
  File "/home/dvrogozh/git/huggingface/optimum-quanto/bench/torch_kernels/test_weight_int4pack_mm.py", line 119, in <module>
    main()
  File "/home/dvrogozh/git/huggingface/optimum-quanto/bench/torch_kernels/test_weight_int4pack_mm.py", line 93, in main
    B_packed = torch._convert_weight_to_int4pack(B_int32, innerKTiles=2)
RuntimeError: _convert_weight_to_int4pack_cpu : expect weight to be kByte.

$ python3 -m pytest --pspec --capture=no test/
FAILED test/tensor/ops/test_linear_dispatch.py::::test_linear_bf16_int4[cpu-bias-256-256-1] - RuntimeError: _convert_weight_to_int4pack_cpu : expect weight to be kByte.
FAILED test/tensor/ops/test_linear_dispatch.py::::test_linear_bf16_int4[cpu-bias-256-256-10] - RuntimeError: _convert_weight_to_int4pack_cpu : expect weight to be kByte.
FAILED test/tensor/ops/test_linear_dispatch.py::::test_linear_bf16_int4[cpu-no-bias-256-256-1] - RuntimeError: _convert_weight_to_int4pack_cpu : expect weight to be kByte.
FAILED test/tensor/ops/test_linear_dispatch.py::::test_linear_bf16_int4[cpu-no-bias-256-256-10] - RuntimeError: _convert_weight_to_int4pack_cpu : expect weight to be kByte.
FAILED test/tensor/optimizers/test_hqq_optimizer.py::::test_hqq_optimizer[cpu-128-first-axis-qint4-bf16-input_shape0] - RuntimeError: _convert_weight_to_int4pack_cpu : expect weight to be kByte.
<...>

In a benchmark issue is coming from here:
https://github.com/huggingface/optimum-quanto/blob/601dc193ce0ed381c479fde54a81ba546bdf64d1/bench/torch_kernels/test_weight_int4pack_mm.py#L93

It looks like the base quantized weights before packing must have a different dtype in pytorch 2.5 (they are int32 in 2.4). This could be addressed with conditional code eventually.

@dacorvo : yes, it occurs that pytorch 2.5 has changed input tensor shape from [n][k] int32 to [n][k / 2] uint8 - see links below. I have tried to fix this for quanto in #286. Please, help to review.
See: https://github.com/pytorch/pytorch/pull/129940
See: https://github.com/pytorch/pytorch/commit/6f662e95756333284450ff9c3c6e78c796aa6e77


Generation of report for android in react-native app is not working properly

Environment:

Node.js version: [8.11.1]
NPM version: [5.6.0]
webdriver.io version: [e.g. 4.13.1]
wdio-cucumber-framework version: [2.2.8]
wdio-multiple-cucumber-html-reporter version: [0.3.3]

Config of webdriver.io and the reporter
reporters: ['dot', 'cucumber', 'multiple-cucumber-html'],
      reporterOptions: {
        htmlReporter: {
            jsonFolder: './test/output',
            reportFolder: './test/output/report',
            openReportInBrowser: 'yes',
            pageTitle: 'pageTitle',
            displayDuration: true,
            removeFolders: true
        }

    },

Describe the bug
I am trying to run the test suite, but in android we get the following error, and the report doesn't generated
/Users/gromanas/lotteryie/CtpIENativeApp/node_modules/webdriverio/build/lib/utils/BaseReporter.js:336
                        throw _iteratorError;
                        ^

TypeError: Cannot read property 'toLowerCase' of undefined
    at eval (lodash.templateSources[1]:205:76)
    at arrayEach (/Users/gromanas/lotteryie/CtpIENativeApp/node_modules/lodash/lodash.js:516:11)
    at Function.forEach (/Users/gromanas/lotteryie/CtpIENativeApp/node_modules/lodash/lodash.js:9344:14)
    at eval (lodash.templateSources[1]:38:4)
    at _createFeaturesOverviewIndexPage (/Users/gromanas/lotteryie/CtpIENativeApp/node_modules/multiple-cucumber-html-reporter/lib/generate-report.js:449:84)
    at generateReport (/Users/gromanas/lotteryie/CtpIENativeApp/node_modules/multiple-cucumber-html-reporter/lib/generate-report.js:135:3)
    at MultipleCucumberHtmlReporter.onEnd (/Users/gromanas/lotteryie/CtpIENativeApp/node_modules/wdio-multiple-cucumber-html-reporter/build/reporter.js:160:56)
    at emitOne (events.js:116:13)
    at MultipleCucumberHtmlReporter.emit (events.js:211:7)
    at BaseReporter.handleEvent (/Users/gromanas/lotteryie/CtpIENativeApp/node_modules/webdriverio/build/lib/utils/BaseReporter.js:324:35)

Android Json file
[{"keyword":"Feature","description":"As a user I should be able to check Home Screen","line":1,"name":"Check Demo Screen","tags":[],"uri":"/Users/gromanas/lotteryie/CtpIENativeApp/test/features/home/home.feature","elements":[{"keyword":"Scenario","line":4,"name":"Test Demo screen","tags":[],"id":"check-demo-screen;test-demo-screen","steps":[{"arguments":[],"keyword":"Given ","name":"I wait 4 seconds","result":{"status":"passed","duration":4017000000},"line":5,"match":{"location":"can not be determined with webdriver.io"}}]}],"id":"check-demo-screen","metadata":{"browser":{},"device":"Pixel XL","platform":{"name":"android","version":"8.0"}}}]

Additional context
It doesn't work for apps.

Thanks for this issue, I'm fixing this asap

Fixed with version 0.4.0


vscode and php.executablePath with docker-

Hello all. I'm lost.
Iḿ trying to get set php.executablePath with docker (laradock) but i cant.
My vsc always show a error.
So, any help?

any help?

There's some discussion of this here: https://github.com/Microsoft/vscode/issues/43636


Request limit reached

System Health details
System Information

version
core-2023.9.3

installation_type
Home Assistant OS

dev
false

hassio
true

docker
true

user
root

virtualenv
false

python_version
3.11.5

os_name
Linux

os_version
6.1.45

arch
x86_64

timezone
Europe/Amsterdam

config_dir
/config

Home Assistant Community Store

GitHub API
ok

GitHub Content
ok

GitHub Web
ok

GitHub API Calls Remaining
5000

Installed Version
1.33.0

Stage
running

Available Repositories
1304

Downloaded Repositories
29

Home Assistant Cloud

logged_in
false

can_reach_cert_server
ok

can_reach_cloud_auth
ok

can_reach_cloud
ok

Home Assistant Supervisor

host_os
Home Assistant OS 10.5

update_channel
stable

supervisor_version
supervisor-2023.09.2

agent_version
1.5.1

docker_version
23.0.6

disk_total
62.3 GB

disk_used
32.2 GB

healthy
true

supported
true

board
ova

supervisor_api
ok

version_api
ok

installed_addons
File editor (5.6.0), Samba share (10.0.2), Terminal & SSH (9.7.1), Home Assistant Google Drive Backup (0.111.1), Grafana (9.0.3), InfluxDB (4.7.0), Mosquitto broker (6.3.1), Duck DNS (1.15.0), SQLite Web (3.9.3), MariaDB (2.6.1), Portainer (2.19.1), ESPHome (2023.9.1), Volvo2Mqtt (1.8.7)

Dashboards

dashboards
2

resources
19

views
7

mode
storage

Recorder

oldest_recorder_run
29 September 2023 at 13:25

current_recorder_run
2 October 2023 at 21:27

estimated_db_size
661.98 MiB

database_engine
mysql

database_version
10.6.12

Spotify

api_endpoint_reachable
ok

Checklist

[X] I have enabled debug logging for my installation.
[X] I have filled out the issue template to the best of my ability.
[X] This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
[X] This issue is not a duplicate issue of currently previous issues..

Describe the issue
After latest reboot I noticed that the Blue Current integration was no longer working. I have removed the integration from Devices & Services and have tried to reinstall the integration but unfortunately I now get the following error when I enter the API code:
Request limit reached
I have also used the
I'm unable to reinstall the integration.
Reproduction steps

Reboot HA - Blue Current integration failed
Redownload HACS integration - no result
Remove integration from Devices & Services and reinstall using API - unable to add with error Request limit reached
...

Debug logs
No details showing in logs

Diagnostics dump
No response

Thank you for creating an issue! There was a bug on the server, It should be fixed now.


How to provide the username?

Hi Kristian,
thank you for investing the time to set this integration up.
Unfortunately, I am having issues configuring it though.
According to the documentation, the username should be requested by the plugin but this isn't happening.
I have also tried to add the following entries to my configuration.yaml manually:
hass_stokercloud:
username: myusername
This didn't help either (no new entities or sensors).
Could you please let me know how to configure the integration properly?
Thanks,
Christian

I believe the following is the method, after installing through HACS etc:
Open Home Assistant and go to settings>Devices & Services>Add Integration>search for "stoker" and add the integration

Thank you Ed!
That did the trick!

Too bad that Kristian did not include this in his installation instructions.
Would have saved me a lot of time and headache.
Not everyone is so familiar with the ins and outs of home assistant to find this simple solution.


ngResource is not suitable for single primitive value(such as string or number) response

the web api(restful most of time) may return a single primitive value as response,such as a string or a number, like this
GET /users/count  ----> 10
GET /users/1/name ------> "Jack"

single primitive value(string or number or true&false and so on) is conform to the specifications of JSON,but now ngResource just support Array or Object response,and I know the reason when I saw the ngResource source code:
........
if (action.isArray) {
  value.length = 0;
  forEach(data, function(item) {
    if (typeof item === "object") {
      value.push(new Resource(item));
    } else {
      // Valid JSON values may be string literals, and these should not be converted
      // into objects. These items will not have access to the Resource prototype
      // methods, but unfortunately there
      value.push(item);
    }
  });
} else {
  shallowClearAndCopy(data, value);
  value.$promise = promise;
}
..........
/**
 * Create a shallow copy of an object and clear other fields from the destination
 */
function shallowClearAndCopy(src, dst) {
  dst = dst || {};

  angular.forEach(dst, function(value, key) {
    delete dst[key];
  });

  for (var key in src) {
    if (src.hasOwnProperty(key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) {
      dst[key] = src[key];
    }
  }

  return dst;
}

Obviously it can not resolve single string or number response.
What should I do when the response is single string with ngResource?

Now I have to overwrite the shallowClearAndCopy method to support my business
function shallowClearAndCopy(src, dst) {
  dst = dst || {};

  angular.forEach(dst, function(value, key) {
    delete dst[key];
  });

  if (angular.isString(src) || angular.isNumber(src)) {
      dst._data = src;
    } else {
      for (var key in src) {
        if (src.hasOwnProperty(key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) {
          dst[key] = src[key];
        }
      }
    }

  return dst;
}

what it do is to wrap the single value response to {_data:xxx},and then I can get the value by resource._data.
and then override the $resource service use $provide.decorator.
 I don't think that is the case.

Ok, it looks like it is possible to have single values as valid JSON, see http://tools.ietf.org/html/rfc7159 and http://stackoverflow.com/questions/13318420/json-standard-a-single-string-value

from the offical specification of JSON,http://json.org/

A value can be a string in double quotes, or a number, or true or false or null, or an object or an array. These structures can be nested

yes response a single value is in a few case usually,but I don`t think it is a bad practice.Such as a api for invoker to get a username or a total count,why I need to wrap it response as a object but not the original primitive value?I think it is redundant.
So I have to give them a _value(or other key) to wrap them and I think it is the only way to compatible with the primitive format of JSON response under the existing design of ngResource.

IMO we should not try to fix this one. Returning primitives from $resource call doesn't make sense since we need a resource should be an object (so it can be enriched with $resource-specific methods). I've got an impression that fixing this would encourage people even more to use $resource as a general-purpose XHR call. This is not what it was designed for and $http should be used instead. Using $resource to fetch a single value is wasteful.

I agree with @pkozlowski-opensource.
A couple of thoughts:
1.
@kuitos wrote:

from the offical specification of JSON,http://json.org/

A value can be a string in double quotes, or a number, or true or false or null, or an object or an array. These structures can be nested

This snippet is talking about values (wrt to objects and arrays). It is never claimed that a single value is valid JSON. It says that JSON is based on objects and arrays (which isn't very clear either).
2.
More importantly, $resource is not supposed to accept any valid JSON (because it wouldn't necessarily know what to do with it). It creates and acts upon resource objects and doesn't know how to handle primitives.
3.
$resource is targeting specific usecases. It's pretty good for simple interaction with RESTful data sources (which is more than enough for 90% of the time according to my expecrience), but is obviously neither as flexible as other alternatives or custom implementations (wrappers around $http), nor suitable for all usecases.
--
BTW, you can easily create a wrapper around $resource, that adds some "non-$resource-like", static methods to the created resource class; e.g.:
// Create a "countable" `User` resource class:
.service('User', function UserFactory($http, $resource) {
  var BASE_URL = '/api/users/';

  var User = $resource(BASE_URL + ':userId', {userId: '@id'});
  User.count = $http.get.bind($http, BASE_URL + 'count');

  return User;
}

// User `User`:
function AppCtrl(User) {
  // Request: User-count
  User.count().then(...);

  // Request: User 1
  var user1 = User.get({userId: 1});
}

Demo

@gkalpak
Thanks for your correction,I realized my mistake just a moment ago.
Now the implementations are compatible with the primitives like JSON.parse and the new version RFC7159 was changed to suit for primitives(in @pkozlowski-opensource answer),although I don`t know why it made this change.
ngResource module is design for restful api,we should treat every response as a resource,primitives can not express the original intention of resource clearly.
Maybe now I should communicate with api designer to fix it.😄


ci(.github): move image push to before cluster start

If this fails, it fails fast and doesn't depend on having the cluster running so run it first.

@Automaat done

At the moment the registry depends on the terraform outputs for some reason, so I'm gonna close this for now.


compile error: success and failure are inaccessible due to 'private' protection level

Checklist

[X] I've the latest update of Swiftinstagram.
[ ] I've searched for existing GitHub issues.
[ ] I've read the wiki pages.
[ ] I've read the contibution guidelines.

Expected Behavior
There should be no compile errors.
Actual Behavior
Compile errors in InstagramLoginViewController:
'success' is inaccessible due to 'private' protection level
'failure' is inaccessible due to 'private' protection level
Steps to Reproduce the Problem

pod install 'SwiftInstagram', '~> 1.0.5'
build project
there are compile errors mentioned above.

Specifications

xCode Version: Version 9.0.1 (9A1004)
macOS Version: Sierra 10.12.6 (16G29)
iOS Version: Generic iOS Device
Device(s):

Hi @xiaobingo, I've have reproduced the steps you mentioned but I don't get any error. Are you trying to access to the success or failure properties in your code? Could you please share your code?
Thanks!

I have same issue. Swift 4 project

Hi @SergeyCHiP, are you sure you are building your project with Swift 4.0? Make sure of it by going to Build Settings tab within your Target project.

Closed due to inactivity.