joinEager doesn't work with table names that contain a postgresql schema

I have a query that looks similar to this:
Thing.query().first().select(
    "thingId", "creationTime", "author.emailAddress"
).joinRelation("author" /* Join on users table */ ).where({
    "thingId": thingId
}).then(thing => doStuff(thing))

Both the thing and user tables have a creationTime column. When I try to express the query like above I get an error column reference "creationTime" is ambiguous.
One solution would be to do this, but I really don't want to because it's verbose and repetitive and I'd have to do it in lots of places. It wouldn't help maintainability at all.
Thing.query().first().select(
    "thingId", "thingSchemaName.thingTableName.creationTime", "author.emailAddress"
).joinRelation("author" /* Join on users table */ ).where({
    "thingId": thingId
}).then(thing => doStuff(thing))

What I would very much like to do and would expect to be able to do - except I haven't worked out any way how - is to select the model table with an alias. Something nice and sensible and readable like
Thing.query().as("thing").first().select(
    "thing.thingId", "thing.creationTime", "author.emailAddress"
).joinRelation("author" /* Join on users table */ ).where({
    "thing.thingId": thingId
}).then(thing => doStuff(thing))

Or, it would be quite nice if objection was able to automagically prepend the models' table name to selected columns that don't otherwise specify.
What's the best way to fix this?

You can use the alias method:
Thing.query().alias("thing").first().select(
    "thing.thingId", "thing.creationTime", "author.emailAddress"
).joinRelation("author" /* Join on users table */ ).where({
    "thing.thingId": thingId
}).then(thing => doStuff(thing))

This solved the problem, thank you!

I have another question related to the same example actually -
Is it possible to cause the returned object to look something like this or will it be necessary to construct a new object meeting this format from the one acquired by the query?
{
    thingId: ...,
    creationTime: ...,
    author: {
        emailAddress: ...,
        ...other selected fields of the author relation
    }
}

Yes:
Thing.query().alias("thing").first().select(
    "thing.thingId", "thing.creationTime", "author.emailAddress"
).joinEager("author" /* Join on users table */ ).where({
    "thing.thingId": thingId
}).then(thing => doStuff(thing))

This didn't work for me - if I use select("*") none of the author columns are included in the output and there is no "author" object. If I try to select e.g. "author.emailAddress" it produces an error missing FROM-clause entry for table "author". I'm using<EMAIL_ADDRESS>

Can you add .debug() to the queries and post the generated sql here?

By the way, I think author should be a BelongsToOneRelation instead of HasOneRelation because the source table Things has the foreign key.

I made the relation change you suggested, that makes sense - still having the same issue though
In my use case the Things are Questionnaires that Users may create.
Postgres schema: https://pastebin.com/BPtpp5du
Models: https://pastebin.com/EYEgmeVc
The query: https://pastebin.com/YZGuSYiX
Console output:
{ method: 'select',
  options: {},
  timeout: false,
  cancelOnTimeout: false,
  bindings: [ 3, false ],
  __knexQueryUid: '0df096b2-876f-4d1e-a531-42a564cc7c06',
  sql: 'select * from "maptionnaire"."Questionnaires" as "questionnaire" left join "maptionnaire"."MultilingualText" as "title" on "title"."textId" = "questionnaire"."titleTextId" where "questionnaire"."questionnaireId" = ? and "questionnaire"."disabled" = ?' }
Questionnaire {
  questionnaireId: 3,
  name: 'New questionnaire',
  titleTextId: null,
  authorUserId: 6,
  creationTime: 2017-07-11T08:10:18.104Z,
  lastModifiedTime: 2017-07-11T08:10:18.104Z,
  disabled: false,
  textId: null,
  languageCode: null,
  content: null,
  contentOrigin: null,
  title: [] }

There might be a bug with using * in select with joinEager. I'll look into that. It should work if you leave out the select. You never need to say select('*') since it's the default.
You seem to have two eager's in your query: eager and joinEager. The latter overwrites the first. You can simply say joinEager('[author, title]').

This is unrelated, but there is now a findOne({foo: 'bar'}) method that can be used instead of where({foo: 'bar'}.first().

I rewrote the query as
    const query = app.db.Questionnaire.first().alias("questionnaire").joinEager("[author, title]").where({
            // TODO: Distinguish between public and private questionnaires.
            // Consider whether a user/respondent has view permission.
            "questionnaire.questionnaireId": request.body.questionnaireId,
            "questionnaire.disabled": false,
        });

The resulting object does have an author attribute but it's null.
The console output reads:
{ method: 'select',
  options: {},
  timeout: false,
  cancelOnTimeout: false,
  bindings: [ 3, false ],
  __knexQueryUid: '4cdb3ad9-5c06-49ad-8d4d-0cd14302593d',
  sql: 'select "questionnaire".* from "maptionnaire"."Questionnaires" as "questionnaire" left join "maptionnaire"."Users" as "author" on "author"."userId" = "questionnaire"."authorUserId" left join "maptionnaire"."MultilingualText" as "title" on "title"."textId" = "questionnaire"."titleTextId" where "questionnaire"."questionnaireId" = ? and "questionnaire"."disabled" = ?' }
Questionnaire {
  questionnaireId: 3,
  name: 'New questionnaire',
  titleTextId: null,
  authorUserId: 6,
  creationTime: 2017-07-11T08:10:18.104Z,
  lastModifiedTime: 2017-07-11T08:10:18.104Z,
  disabled: false,
  author: null,
  title: [] }

If I manually run the query and add "author".* to the select statement then I do get the user information I expect; this seems not to be an issue with the User not existing but rather with the query not selecting that data. (The title attribute should in fact be an empty list as there are no rows with the corresponding ID.)

That's not the SQL that should be generated. Are you sure that's exactly the query you are running? And you don't have any custom hooks or query builders that add selects or something like that to the query? Where does the select "questionnaire".* come from?

Hey, thank you for your help so far - I'm leaving the office for the day but I will return to troubleshooting tomorrow morning around 7:00 AM UTC

I found a bug in joinEager when a table name has a schema in it. I'll fix it tomorrow. Maybe you could test it before I create a release?

I'd be happy to test. Thank you very much for the quick response!

Awesome!
You can test the HEAD version by putting this in your package.json:
"objection": "git://github.com/Vincit/objection.js.git#28be316"

My package.json dependencies object now looks like this:
  "dependencies": {
    "bcrypt": "^1.0.2",
    "bluebird": "^3.5.0",
    "body-parser": "^1.16.0",
    "cookie-parser": "^1.4.3",
    "express": "^4.14.1",
    "knex": "0.13.0",
    "minimist": "^1.2.0",
    "moment": "^2.17.1",
    "node-uuid": "^1.4.7",
    "objection": "git://github.com/Vincit/objection.js.git#28be316",
    "pg": "^6.2.2",
    "speakeasy": "^2.0.0"
  },

I get this error when attempting to npm install with npm v3.10.10
sophie:server pineapple$ npm install
npm ERR! git rev-list -n1 28be316: fatal: ambiguous argument '28be316': unknown revision or path not in the working tree.
npm ERR! git rev-list -n1 28be316: Use '--' to separate paths from revisions, like this:
npm ERR! git rev-list -n1 28be316: 'git <command> [<revision>...] -- [<file>...]'
npm ERR! git rev-list -n1 28be316:
npm ERR! Darwin 13.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v6.10.3
npm ERR! npm  v3.10.10
npm ERR! code 128

npm ERR! Command failed: git rev-list -n1 28be316
npm ERR! fatal: ambiguous argument '28be316': unknown revision or path not in the working tree.
npm ERR! Use '--' to separate paths from revisions, like this:
npm ERR! 'git <command> [<revision>...] -- [<file>...]'
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

I messed up the original commit, force pushed a new one and edited the message. That's why 😄

This query quite unintuitively fails:
        const query = app.db.Questionnaire.first().joinEager("[author, title]").where({
            "questionnaireId": request.body.questionnaireId,
            "disabled": false,
        });

with this error:
{ method: 'select',
  options: {},
  timeout: false,
  cancelOnTimeout: false,
  bindings: [ 4, false ],
  __knexQueryUid: '6b2999d3-40d3-479f-8bf8-64270f62ddc4',
  sql: 'select "maptionnaire"."Questionnaires".* from "maptionnaire"."Questionnaires" left join "maptionnaire"."Users" as "author" on "author"."userId" = "maptionnaire"."Questionnaires"."authorUserId" left join "maptionnaire"."MultilingualText" as "title" on "title"."textId" = "maptionnaire"."Questionnaires"."titleTextId" where "questionnaireId" = ? and "disabled" = ?' }
{ error: select "maptionnaire"."Questionnaires".* from "maptionnaire"."Questionnaires" left join "maptionnaire"."Users" as "author" on "author"."userId" = "maptionnaire"."Questionnaires"."authorUserId" left join "maptionnaire"."MultilingualText" as "title" on "title"."textId" = "maptionnaire"."Questionnaires"."titleTextId" where "questionnaireId" = $1 and "disabled" = $2 - column reference "disabled" is ambiguous
    at Connection.parseE (/Users/pineapple/git/mapita/maptionnaire2/src/server/node_modules/pg/lib/connection.js:567:11)
    at Connection.parseMessage (/Users/pineapple/git/mapita/maptionnaire2/src/server/node_modules/pg/lib/connection.js:391:17)
    at Socket.<anonymous> (/Users/pineapple/git/mapita/maptionnaire2/src/server/node_modules/pg/lib/connection.js:129:22)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at TCP.onread (net.js:547:20)
  name: 'error',
  length: 107,
  severity: 'ERROR',
  code: '42702',
  detail: undefined,
  hint: undefined,
  position: '350',
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  schema: undefined,
  table: undefined,
  column: undefined,
  dataType: undefined,
  constraint: undefined,
  file: 'parse_relation.c',
  line: '563',
  routine: 'scanRTEForColumn' }

This query succeeds but the author  attribute of the outputted object is incorrectly null:
        const query = app.db.Questionnaire.alias("questionnaire").first().joinEager(
            "[author, title]"
        ).where({
            "questionnaire.questionnaireId": request.body.questionnaireId,
            "questionnaire.disabled": false,
        });

The query debug output followed by the received object:
{ method: 'select',
  options: {},
  timeout: false,
  cancelOnTimeout: false,
  bindings: [ 4, false ],
  __knexQueryUid: 'f6b2d82f-226f-47bd-9685-d4a1d857638e',
  sql: 'select "questionnaire".* from "maptionnaire"."Questionnaires" as "questionnaire" left join "maptionnaire"."Users" as "author" on "author"."userId" = "questionnaire"."authorUserId" left join "maptionnaire"."MultilingualText" as "title" on "title"."textId" = "questionnaire"."titleTextId" where "questionnaire"."questionnaireId" = ? and "questionnaire"."disabled" = ?' }
Questionnaire {
  questionnaireId: 4,
  name: 'New questionnaire',
  titleTextId: null,
  authorUserId: 6,
  creationTime: 2017-07-11T11:09:36.285Z,
  lastModifiedTime: 2017-07-11T11:09:36.285Z,
  disabled: false,
  author: null,
  title: [] }

It appears that it is correctly joining on the users table but failing to select any fields.
This query selects the author table column I'm interested in but it places it in the root returned questionnaire object instead of making it an attribute of the author object
        const query = app.db.Questionnaire.alias("questionnaire").first().joinEager(
            "[author, title]"
        ).select(
            "questionnaire.questionnaireId", "questionnaire.creationTime",
            "author.emailAddress"
        ).where({
            "questionnaire.questionnaireId": request.body.questionnaireId,
            "questionnaire.disabled": false,
        });

The output:
{ method: 'select',
  options: {},
  timeout: false,
  cancelOnTimeout: false,
  bindings: [ 4, false ],
  __knexQueryUid: '5430bc0f-77b8-4014-b47d-592f41a02c55',
  sql: 'select "questionnaire"."questionnaireId", "questionnaire"."creationTime", "author"."emailAddress" from "maptionnaire"."Questionnaires" as "questionnaire" left join "maptionnaire"."Users" as "author" on "author"."userId" = "questionnaire"."authorUserId" left join "maptionnaire"."MultilingualText" as "title" on "title"."textId" = "questionnaire"."titleTextId" where "questionnaire"."questionnaireId" = ? and "questionnaire"."disabled" = ?' }
Questionnaire {
  questionnaireId: 4,
  creationTime: 2017-07-11T11:09:36.285Z,
  emailAddress<EMAIL_ADDRESS>  author: null,
  title: [] }

I did also try selecting author.emailAddress as author.emailAddress but this only changed the key in the object rather than placing emailAddress in the author object
        const query = app.db.Questionnaire.alias("questionnaire").first().joinEager(
            "[author, title]"
        ).select(
            "questionnaire.questionnaireId", "questionnaire.creationTime",
            "author.emailAddress as author.emailAddress"
        ).where({
            "questionnaire.questionnaireId": request.body.questionnaireId,
            "questionnaire.disabled": false,
        });

produces
{ method: 'select',
  options: {},
  timeout: false,
  cancelOnTimeout: false,
  bindings: [ 4, false ],
  __knexQueryUid: '867caf8d-9e99-482f-8c7a-fd780cc0a1e8',
  sql: 'select "questionnaire"."questionnaireId", "questionnaire"."creationTime", "author"."emailAddress" as "author.emailAddress" from "maptionnaire"."Questionnaires" as "questionnaire" left join "maptionnaire"."Users" as "author" on "author"."userId" = "questionnaire"."authorUserId" left join "maptionnaire"."MultilingualText" as "title" on "title"."textId" = "questionnaire"."titleTextId" where "questionnaire"."questionnaireId" = ? and "questionnaire"."disabled" = ?' }
Questionnaire {
  questionnaireId: 4,
  creationTime: 2017-07-11T11:09:36.285Z,
  'author.emailAddress'<EMAIL_ADDRESS>  author: null,
  title: [] }

Argh! The knex method columnInfo doesn't work with schemas. I need to open an issue in knex before this can be solved. It may take a while. Fortunately @elhigu has push rights to knex 😄

Aaaaa ok. What would you suggest as the best workaround to use in the meantime?

I had one more idea. Could you try out commit 0f3094010ea

the good: it populates the author object! sweet
the bad: there doesn't seem to be a way to specify which columns should be included. it's important that I be able to select specific fields so that there's no chance of e.g. password hashes being accidentally included in an API response

You can select columns using modifyEager like this:
        const query = app.db.Questionnaire.alias("questionnaire").first().joinEager(
            "[author, title]"
        ).select(
            "questionnaire.questionnaireId", "questionnaire.creationTime"
        ).modifyEager('author', builder => {
            builder.select('emailAddress', 'blaaBlaa');
        }).where({
            "questionnaire.questionnaireId": request.body.questionnaireId,
            "questionnaire.disabled": false,
        });

You need to use modifyEager or follow the weird naming convention joinEager uses to be able to parse the flat result rows into a tree. modifyEager works with normal eager as well as the join based joinEager.

Aha I believe I have what I need
        const query = app.db.Questionnaire.alias("questionnaire").first().joinEager(
            "[author, title]"
        ).modifyEager("author", qb => {
            qb.select("emailAddress");
        }).select(
            "questionnaireId", "name",
            "creationTime", "lastModifiedTime"
        ).where({
            "questionnaireId": request.body.questionnaireId,
            "disabled": false,
        });

produces
{ method: 'select',
  options: {},
  timeout: false,
  cancelOnTimeout: false,
  bindings: [ 4, false ],
  __knexQueryUid: '535fb6f8-50ad-45df-8b88-872dda4bc068',
  sql: 'select "questionnaireId", "name", "creationTime", "lastModifiedTime", "author"."userId" as "author:userId", "author"."emailAddress" as "author:emailAddress", "title"."textId" as "title:textId", "title"."languageCode" as "title:languageCode", "title"."content" as "title:content", "title"."contentOrigin" as "title:contentOrigin" from "maptionnaire"."Questionnaires" as "questionnaire" left join (select "emailAddress", "userId" from "maptionnaire"."Users") as "author" on "author"."userId" = "questionnaire"."authorUserId" left join "maptionnaire"."MultilingualText" as "title" on "title"."textId" = "questionnaire"."titleTextId" where "questionnaireId" = ? and "disabled" = ?' }
Questionnaire {
  questionnaireId: 4,
  name: 'New questionnaire',
  creationTime: 2017-07-11T11:09:36.285Z,
  lastModifiedTime: 2017-07-11T11:09:36.285Z,
  author: User { emailAddress<EMAIL_ADDRESS>},
  title: [] }

By the way, a useful pattern to remove password hashes is to delete them in $formatJson like this:
class User extends Model {
  $formatJson(json) {
    // Never leak password to the outside world.
    delete json.password;
    return json;
  }
}

That is awesome, thank you for letting me know about that

Is the pattern for limiting columns selected from a HasManyRelation different from a BelongsToOneRelation? What worked for author isn't working for text -
        const query = app.db.Questionnaire.alias("questionnaire").first().joinEager(
            "[author, title]"
        ).modifyEager("author", qb => {
            qb.select("emailAddress");
        }).modifyEager("title", qb => {
            qb.select("languageCode", "content", "contentOrigin");
        }).select(
            "questionnaireId", "name", "titleTextId",
            "creationTime", "lastModifiedTime"
        ).where({
            "questionnaireId": request.body.questionnaireId,
            "disabled": false,
        });

which outputs the almost correct
found user User {
  userId: 6,
  passwordHash: '$2a$08$PYFdeKpp9ZF.Py3DeoMKZuTYfgwWylkfKgSCpV72Esf.3n1GFtxL2',
  otpEnabled: false }
{ method: 'select',
  options: {},
  timeout: false,
  cancelOnTimeout: false,
  bindings: [ 4, false ],
  __knexQueryUid: '35e41952-134c-4dcf-a5bc-7e198e5332d5',
  sql: 'select "questionnaireId", "name", "creationTime", "lastModifiedTime", "author"."userId" as "author:userId", "author"."emailAddress" as "author:emailAddress", "author"."passwordHash" as "author:passwordHash", "title"."textId" as "title:textId", "title"."languageCode" as "title:languageCode", "title"."content" as "title:content", "title"."contentOrigin" as "title:contentOrigin" from "maptionnaire"."Questionnaires" as "questionnaire" left join (select "emailAddress", "passwordHash", "userId" from "maptionnaire"."Users") as "author" on "author"."userId" = "questionnaire"."authorUserId" left join "maptionnaire"."MultilingualText" as "title" on "title"."textId" = "questionnaire"."titleTextId" where "questionnaireId" = ? and "disabled" = ?' }
Questionnaire {
  questionnaireId: 4,
  name: 'New questionnaire',
  creationTime: 2017-07-11T11:09:36.285Z,
  lastModifiedTime: 2017-07-11T11:09:36.285Z,
  author:
   User {
     emailAddress<EMAIL_ADDRESS>     passwordHash: '$2a$08$PYFdeKpp9ZF.Py3DeoMKZuTYfgwWylkfKgSCpV72Esf.3n1GFtxL2' },
  title:
   [ Text {
       textId: 'test',
       languageCode: 'en',
       content: 'test text neato',
       contentOrigin: 'userEntry' },
     Text {
       textId: 'test',
       languageCode: 'es',
       content: 'hola',
       contentOrigin: 'userEntry' },
     Text {
       textId: 'test',
       languageCode: 'fi',
       content: 'terve',
       contentOrigin: 'userEntry' } ] }

Except I was expecting only the languageCode, content, and contentOrigin columns to be included in the results

I also just realized that the query neglected to select the titleTextId column from the Questionnaire table

Sorry I'm an idiot
I forgot to restart the server


undo-tree not included in core/packages.el ?

One of the compilation errors I see is related to undo-tree:
In toplevel form:
core/core-editor.el:244:1:Error: Cannot open load file: Not a directory, undo-tree
Failed to compile core/core-editor.el

Is it possible that the package "undo-tree" is missing from "core/packages.el" or is the package is missing on purpose?

Ah, my bad. undo-tree is one of evil's dependencies and I took that for granted.
I've added it to core/packages.el


[Milestone : Compiler (Basic Setup)] Implement ExpressionBuilder

Expression builder still not implemented fully. Top priority.

ExpressionBuilder implemented


[FLINK-20098] Don't add flink-connector-files to flink-dist

What is the purpose of the change
Before, we had both flink-connector-files and flink-connector-base as dependencies of flink-dist.
This implies, that users should use the dependency like this:
<dependency>
	<groupId>org.apache.flink</groupId>
	<artifactId>flink-connector-files</artifactId>
	<version>${project.version}</version>
	<scope>provided</scope>
</dependency>

which differs from other connectors where users don't need to specify <scope>provided</scope>.
Also, flink-connector-files has flink-connector-base as a provided dependency, which means that examples that use this dependency will not run out-of-box in IntelliJ because transitive provided dependencies will not be considered.
This change removes the dependencies from flink-dist and lets users use the File Connector like any other connector.
I believe the initial motivation for "providing" the File Connector in flink-dist was to allow us to use the File Connector under the hood in methods such as StreamExecutionEnvironment.readFile(...). We could decide to deprecate and remove those methods or re-add the File Connector as an explicit (non-provided) dependency again in the future.
Brief change log

only changes poms

Verifying this change
Covered by existing tests, that still pass.
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): maybe
The public API, i.e., is any changed class annotated with @Public(Evolving): no
The serializers: no
The runtime per-record code paths (performance sensitive): no
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: no
The S3 file system connector: no

Documentation

Does this pull request introduce a new feature? no
If yes, how is the feature documented? not applicable

cc @StephanEwen

@rmetzger or @dianfu Can we merge this one for 1.12? It's a usability improvement for a feature that was added in 1.12.

Also, flink-connector-files has flink-connector-base as a provided dependency, which means that examples that use this dependency will not run out-of-box in IntelliJ because transitive provided dependencies will not be considered.

@aljoscha  To some extend this seems like a bug from the perspective of users. Besides the change seems safe and so +1 from my side.

Thanks for the review!

Note to all people involved in this PR: The CI run of this PR showed a test break that has been merged to master: https://issues.apache.org/jira/browse/FLINK-20149
I will revert this change and reopen the ticket.


Fixed a small bug in ZTV.cmap function

Thanks, good catch. Merging in bug fix momentarily. (also made me notice similar bug in ztv_api.invert_cmap)


[WIP] Started work on Middleware tests

@GrahamCampbell would you suggest testing like this, or by mocking a request to handle?

No way we should be unit testing middlewares.

In terms of mocking a request, just litterally make an internal request?

In terms of mocking a request, just litterally make an internal request?

Yeah.

Want to close this then @GrahamCampbell?


Lock remains active when waveguide switch turned off

The lock remains on when the waveguide status is turned off by the pyB12MPS package:
Minimal Example:
mps.wgstatus(1)
mps.rfstatus(1)
mps.lockstatus(1)
mps.wgstatus(0)

If we desire this behavior, this will need to be fixed in the MPS Firmware. I'm moving this issue to the issues associated with the MPS Firmware.


Allow adding CC and BCC key to the email

Can we allow users to add CC/BCC in the email?

Hello @shubhamguptaji,
Yes, here is an example.
With best regards,
Elmer

Thanks, I searched the documentation of the package but didn't find anything.
Can we update the README file with the above example?

Can you please help me understand your search procedure, so that I can understand the best place to link to the example? I do see that if you search for cc or bcc as a GitHub search, the results do not link to the use cases.
Currently, the example I provided above, is linked from here.
Thanks again!

so I noticed if I have an array of emails in "to", "cc", or "bcc" I get 500 bad request error but single emails in those fields are sent successfully

Hello @tonyh-fff,
Please verify that were no duplicate emails across any of those arrays. Duplicate emails are not allowed. Thanks!
With best regards,
Elmer

Hello @tonyh-fff,
Please verify that were no duplicate emails across any of those arrays. Duplicate emails are not allowed. Thanks!
With best regards,
Elmer

That was the issue, thanks for your help!


haskellPackages.niv: 0.2.8 -> 0.2.9

Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Notify maintainers
cc @rycee @peti

Please do not edit hackage-packages.nix. Note the comment at the top of the file. This file is generated automatically and manual changes to it at are invariably lost in the next update. The update you want will be merged as part of https://github.com/NixOS/nixpkgs/pull/75857.


Fancy Zones Editor not opening anymore

Microsoft PowerToys version
0.56.2
Running as admin

[X] Yes

Area(s) with issue?
FancyZones Editor
Steps to reproduce
I updated from 0.35.0 to 0.56.2 and the Fancy Zones Editor did not open anymore. Now I went back to the 0.35.0 and everything is working correctly again.
✔ Expected Behavior
Opening of the fancy zones editor when you press the respected button.
❌ Actual Behavior
Nothing. 1 or 2 secounds of a loading circle and then nothing.
Other Software
No response

/bugreport

PowerToysReport_2022-03-21-20-40-25.zip
Ah alright, I already wondered where I should upload this file. This one is from the 0.56.2 right before I reinstalled the old version. Do you also need a report of the old one after reinstallation?

Hi, could you please see if updating the .net framework desktop runtime to 6.0.3 should fixes? Please remember to restart as well and let us know if it works for you.
https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-6.0.3-windows-x64-installer
/needinfo

Hello @jaimecbernardo
I ran an old version of Power Toys something like 0.33 from last year. Told a friend about it yesterday and updated from 0.33 to the latest version. Same issue here. Can't open the layout editor via shortcut (WIN + Ö) or via the button in power toys itself. Worked perfectly fine before updating.
I created a bug report BEFORE and AFTER updating to 6.0.3 today. I'll append it to my comment. Right now, after the update to 6.0.3 it's not working - yes, I've restarted my system.
PowerToysReport_2022-03-27-12-53-42_BEFORE_NET_6_0_3.zip
PowerToysReport_2022-03-27-12-59-49_AFTER_NET_6_0_3.zip

Well, I hope that my post helped a bit.
Switching back to v0.33 now. If you need anything just @ me.

I can replicate some error when opening FancyZones Editor after using @JonnyBDev settings, though it's not exactly the same.
@JonnyBDev , this seems like some settings format change between the versions that might be breaking this.
Could you please try, on the latest version:

Exit PowerToys. (tray icon / exit)
Backup %localappdata%\Microsoft\PowerToys\FancyZones.
Delete %localappdata%\Microsoft\PowerToys\FancyZones.
Turn PowerToys on again.
Verify if it works now. This might be a workaround for the time being, but it will reset your configured zones. Just seeing if it works. If it doesn't, you can copy your backed up folder again ;)
Thank you.

I followed your steps but it's not working. Just before activating it I looked into the log-file of FancyZones and I found something. Not sure if it's related to this topic, but it's declared as "error". Should be enough to post it here.
[2022-04-05 17:12:37.867052] [p-13824] [t-10932] [warning] Failed to read from settings file
[2022-04-05 17:12:37.868203] [p-13824] [t-10932] [error] app-zone-history.json file is missing or malformed
[2022-04-05 17:13:18.892749] [p-13824] [t-10932] [error] SetWindowTransparency: GetLayeredWindowAttributes failed, Falscher Parameter.
[2022-04-05 17:13:18.892799] [p-13824] [t-10932] [error] SetWindowTransparency: SetLayeredWindowAttributes failed, Falscher Parameter.
[2022-04-05 17:13:19.682506] [p-13824] [t-10932] [error] ResetWindowTransparency: SetLayeredWindowAttributes failed
[2022-04-05 17:13:21.016282] [p-13824] [t-10932] [error] SetWindowTransparency: GetLayeredWindowAttributes failed, Falscher Parameter.
[2022-04-05 17:13:21.016357] [p-13824] [t-10932] [error] SetWindowTransparency: SetLayeredWindowAttributes failed, Falscher Parameter.
[2022-04-05 17:13:21.250759] [p-13824] [t-10932] [error] ResetWindowTransparency: SetLayeredWindowAttributes failed
[2022-04-05 17:13:31.961105] [p-13824] [t-10932] [error] SetWindowTransparency: GetLayeredWindowAttributes failed, Falscher Parameter.
[2022-04-05 17:13:31.961152] [p-13824] [t-10932] [error] SetWindowTransparency: SetLayeredWindowAttributes failed, Falscher Parameter.
[2022-04-05 17:13:32.067219] [p-13824] [t-10932] [error] ResetWindowTransparency: SetLayeredWindowAttributes failed
[2022-04-05 17:13:32.927147] [p-13824] [t-10932] [error] SetWindowTransparency: GetLayeredWindowAttributes failed, Falscher Parameter.
[2022-04-05 17:13:32.927159] [p-13824] [t-10932] [error] SetWindowTransparency: SetLayeredWindowAttributes failed, Falscher Parameter.
[2022-04-05 17:13:33.311678] [p-13824] [t-10932] [error] ResetWindowTransparency: SetLayeredWindowAttributes failed

I have the same issue.
I'm running Windows 10 Enterprise v1909 18363.2158.
I did the same steps as described above I made a complete new installation of PowerToys v0.57.2.
I tried to open Fancy Zones Editor within the GUI --> the mouse progress circle pops up but Fancy Zones Editor doesn't start.
I updated .net framework desktop runtime to 6.0.3 and restarted my computer --> Fancy Zones Editor still not working.
PowerToysReport_bevore_.net_update.zip
PowerToysReport_after_.net_update.zip
Then I uninstalled PowerToys again and installed v0.55.2 as it was suggested in #15785.
I tried to open Fancy Zones Editor within the GUI --> Fancy Zones Editor is working again.
PowerToysReport_v0.55.2.zip
After that I installed v0.56.1 and tried to open Fancy Zones Editor -->  Fancy Zones Editor again not working.
For the moment I will stay on v55.2.0 and hope to see this bug fixed.
If you need further information please get back to me.

@Raicandy , @JonnyBDev and @tobias-who ,
Could you please send a dump file from 0.57.2?
One way of achieving this would be by creating an entry in the Registry Editor (regedit.msc), for Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\PowerToys.FancyZonesEditor.exe , according to the instructions in https://docs.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps
It should look something like this in the end (but for FancyZonesEditor):

After that, please replicate the bug, navigate to $LOCALAPPDATA%\CrashDumps in the File Explorer and upload the zipped PowerToys.FancyZonesEditor.exe.*.dmp file to a GitHub comment.
The idea is that this could show us the stack trace and help pinpoint what the issue might be.

@jaimecbernardo
Just update to 0.57.2 and the layout-editor is working. Started via my shortcut (WIN + Ö) and the layout editor in powertoys.

@JonnyBDev
So, what was causing this remains a mystery for your case 😅 .

older-CrashDumps.zip
20220412-CrashDumps.zip
I Uploaded all the files from Powertoys in the requested folder. I made two archives, the three from today are after replicating the problem on purpose and the rest is older files, I wanted to be complete, maybe you have a use for them.
So the problem still occures with the Release v0.57.2. I will try to delete my settings as suggested here and reply again.

I can replicate some error when opening FancyZones Editor after using @JonnyBDev settings, though it's not exactly the same. @JonnyBDev , this seems like some settings format change between the versions that might be breaking this. Could you please try, on the latest version:

Exit PowerToys. (tray icon / exit)
Backup %localappdata%\Microsoft\PowerToys\FancyZones.
Delete %localappdata%\Microsoft\PowerToys\FancyZones.
Turn PowerToys on again.
Verify if it works now. This might be a workaround for the time being, but it will reset your configured zones. Just seeing if it works. If it doesn't, you can copy your backed up folder again ;)
Thank you.

20220412-2-CrashDumps.zip
After deleting my settings the error still occures, nothing changes. I replicated it again for 3 times and zipped the crash dumps. I will go back to 0.35.0 for now. That one is definitly working for me.

The crash dump from @RaiCandy is giving this error:
System.Windows.Markup.XamlParseException
  HResult=0x80131501
  Message=Could not load file or assembly 'ModernWpf, Culture=neutral, PublicKeyToken=null'. Das System kann die angegebene Datei nicht finden.
   Das System kann die angegebene Datei nicht finden.

ModernWPF is not found? 🤔
Weird. Could you please send an updated bugreport so we can compare the intallation folder report to what's a good 0.57.2 installation folder?

@Raicandy , I kinda need one with 0.57.2 installed, though.

@tobias-who 's error is, which is a bit weirder.:
Unhandled exception at 0x00007FFCA4CCD17F (ntdll.dll) in PowerToys.FancyZonesEditor.exe.11156.dmp: Indirect call guard check detected invalid control transfer.

This seems to be right when starting the application, though:

Does this mean some sort of dll or executable corruption of any kind? 🤔
In your case 0.55.2 works while >=0.56 doesn't work, which coincides with the .net 6 upgrade.
Could you please, turn off PowerToys, uninstall "Microsoft Windows Desktop Runtime - 6.0.3 (x64)", reinstall it again manually through https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-6.0.3-windows-x64-installer , reboot the computer and see if these PowerToys work now.
This user also used a tool to repair .net framework in case you want to check it out: https://github.com/microsoft/PowerToys/issues/17673#issuecomment-1095395164

@Raicandy , I kinda need one with 0.57.2 installed, though.

I reinstalled 0.57.2 for my report and the outputs from the 20220412-CrashDumps.zip are all produced by the 0.57.2 Version or what do you mean?

I meant send a new /bugreport

@jaimecbernardo I did what you have suggested but nothing worked.
I uninstalled the 6.0.3 runtime and reinstalled it and after that restarted the computer. PowerToys was shutdown during the installations. This didn't fix my problem.
I also tried it together with the .net repair tool. I started it and left it open as it was stated in the repair tool and repaired the runtime but this didn't fix the issue either.
In the following you find the PowerToys Report and FancyZones Dump and the FixDotNet Log.
Hope that helps to identify the problem.
PowerToysReport_2022-05-02-07-32-34.zip
PowerToys.FancyZonesEditor.exe.1456.dmp.zip
FixDotNet20220502065931082.zip

@SeraphimaZykova , could you please take a look at the info from @tobias-who ? Thank you!

The crash still happens on startup with ntdll.dll.
@tobias-who Have you tried running the system file checker and performing a clean boot?

Hi @SeraphimaZykova I have performed a system file check without errors.
A clean boot is for me not possible due to the fact that it is a company device.

Can you try reinstalling the ntdll.dll as described here?
https://answers.microsoft.com/en-us/windows/forum/all/app-crash-with-ntdlldll/9aa59f80-99a1-4f3c-b2f0-7eb72df05b2a

@SeraphimaZykova I tried it but this didn't work.
I get an error message when I execute the command saying something like:
"The module ntdll.dll was loaded, but the DllUnregisterServer-entry point was not found.
Make sure that ntdll.dll is a valid .DLL or .OCX file and repeat the process."


Fix copy UFS

What changes are proposed in this pull request?
bug fix
Why are the changes needed?
bug fix
Does this PR introduce any user facing changes?
na

alluxio-bot, merge this please

alluxio-bot, merge this please


How does VM creation process match with replicated image region?

Say I have uploaded latest image version that replicated to Canada Central, East Us 2, West Europe, East Asia.
If I reference this image using:
/subscriptions/<GUID>/resourceGroups/<RG>/providers/Microsoft.Compute/galleries/<SIG>/images/<Image>
Q1: When creating a VM in East US 2 it will automatically use the replica in East US 2?
Q2: Which image replica will be used if creating a VM in Japan East? Does egress fee apply in this scenario?

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

ID: 0d150ace-bd6d-8111-79b5-0ce7cb76a378
Version Independent ID: 13a828ae-ae92-9ea7-5f37-5a69eeeb87b7
Content: Azure Shared Image Gallery
Content Source: articles/virtual-machines/windows/shared-image-galleries.md
Service: virtual-machines-windows
GitHub Login: @axayjo
Microsoft Alias: akjosh

Thanks for the feedback! We are currently investigating and will update you shortly.

@axayjo can you confirm on this one?

@yeswps Great set of questions!
Here are the answers:

I see that your image will be replicated to East US 2, so the platform will automatically pick the copy in that region
If your image is not replicated to Japan East, you will not be able to create a VM with that image.

Thanks @axayjo
@yeswps I will go ahead and close this out. If you have further questions just let us know and we can always reopen and continue the discussion.


PMO Guide Test

This implements the PMO guide tests, to verify that we are able to build
a more complex app than what donejs-chat gives us.
Closes #528 and #529

Issues:

[ ] - Killing the donejs develop process doesn't seem to work. This prevents us from running both tests. Running either by itself works.

[ ] - See if we can test production in both environments


iOS App Crash on survey submission

I am experiencing a crash in my iOS application when using the surveysparrow-react-native-sdk. The crash occurs only on iOS devices on survey submission and is traced back to the library code in Xcode. Below are the details of my environment and the issue.
Machine - MacBook Air M1, Sonoma 14.2
Processor - Apple M1
Memory - 16GB
React Native Version - 0.73.0
surveysparrow-react-native-sdk - 0.1.10

CocoaPods Version - 1.15.2

pod used - pod 'SurveySparrowSdk', :git => 'https://github.com/surveysparrow/surveysparrow-ios-sdk.git', :tag => '0.4.5'
Crash Details:

Crash Log:

Thread 1: signal SIGABRT

Steps to Reproduce:

here is the gist which points to the component that leads to crash => https://gist.github.com/Subramanyarao11/a4d20d05b5c44bcf9f10c0b9ad8c6155
the problem we are facing is once we invoke it, it opens survey in full screen mode as expected and everything works fine however once user submits the survey it crashes as you can see in the attached image
Expected Behavior
The expected behavior is that after submitting the survey, the app should return to the previous screen without crashing ( working fine in android as expected ).
Additional Information:

Xcode Version: Version 15.3 (15E204a)
iOS Version Tested On: 17.4
Device Models Tested: iPhone 15 Pro Simulator

I've created a minimal reproduction project at https://github.com/Subramanyarao11/survey-sparrow-test  to help diagnose the issue. The project demonstrates the same crash I mentioned above in IOS

Fixed the issue and Released a new version v0.2.0

Thanks @Subramanyarao11  for reporting

Let us know for further Queries

@Subramanyarao11,
Are you using the same Domain and token present in the example repo given above ?
That token is throwing this error
'survey response from embed survey is', { error: 'Invalid token, generate and use a Mobile SDK token' }
Can you use a SDK Share token, you will get the response properly.
Creating SDK Share token

Open a survey -> Go to Share page -> Create SDK Share -> Copy token from it.


[opt](inverted index) add inlist condition handling to compound

Proposed changes
Issue Number: close #xxx

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

run buildall

#34134


Format soci ztoc info dump as JSON

This change will reformat the data dumped by soci ztoc info as JSON to better align with the output of similar commands like soci index info.
The JSON will look something like :
{
  "version": "0.9",
  "build_tool": "AWS SOCI CLI v0.1",
  "files": [
    {
      "filename": "bin",
      "offset": 512,
      "size": 0
    },
    …
  ]
}

Signed-off-by: Yasin Turan<EMAIL_ADDRESS>Issue #, if available:
This PR addresses https://github.com/awslabs/soci-snapshotter/issues/259
Description of changes:
Testing performed:
% sudo ./soci ztoc info sha256:38902e5b8587d142e2dbc2f16bbcb045e02a8de9ad38f7c91427fbe62a937f1c | head -20
{
  "version": "0.9",
  "build_tool": "AWS SOCI CLI v0.1",
  "files": [
    {
      "filename": "bin",
      "offset": 512,
      "size": 0
    },
    {
      "filename": "boot/",
      "offset": 1024,
      "size": 0
    },
    {
      "filename": "dev/",
      "offset": 1536,
      "size": 0
    },
    {

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

@turan18 for future reference, if you say "fixes" or "resolves" instead of "addresses" then merging the PR will automatically close the issue.
https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword


Compose implementation outdated

I've been trying to duplicate the compose implementation given in the documentation, but copying the source gives me the following error.

import matplotlib.pyplot as plt
import torch.utils.data
import torch.nn
from random import randrange
import os
os.environ["WDS_VERBOSE_CACHE"] = "1"
import webdataset as wds
url = "http://storage.googleapis.com/nvdata-publaynet/publaynet-train-{000000..000009}.tar"
dataset = wds.WebDataset(url).shuffle(1000).decode("rgb").to_tuple("png", "json")
for image, json in dataset:
break
plt.imshow(image)
def preprocess(sample):
image, json = sample
try:
label = json["annotations"][0]["category_id"]
except:
label = 0
return 1-image, label
dataset = dataset.map(preprocess)
for image, label in dataset:
break
plt.imshow(image)
print(label)
def get_patches(src):
for sample in src:
image, label = sample
h, w = image.shape[:2]
for i in range(16):
y, x = randrange(h - 256), randrange(w - 265)
patch = image[y:y + 256, x:x + 256]
yield (patch, label)
dataset = dataset.compose(get_patches).shuffle(10000)

This gives

File "~/venv/lib/python3.8/site-packages/webdataset/composable.py", line 65, in compose
return constructor(*args, **kw).source_(self)

Am I misunderstanding the documentation or is something out of date?

The recommended interface is the wds.DataPipeline interface. It's easier to use and easier to extend.
The .compose(...) interface is slightly different and there is no source_ anymore. Conversion should be very simple, though. Have a look at compat.py to see how the implementation changed.

How to use SampleEqually(IterableDataset, wds.Shorthands, wds.Composable) under new API?

Is there any example available on how to sample equally from multiple datasets using that new interface?

Interested too. As a side note: Thanks for all the work on webdataset. Appreciate it!

I used this to re-implement SampleEqually. It would be good to update the docs with the official solution.
class SampleEqually(wds.DataPipeline, wds.compat.FluidInterface):
    def __init__(self, datasets):
        super().__init__()
        self.datasets = datasets

    def __iter__(self):
        sources = [iter(ds) for ds in self.datasets]
        while True:
            for source in sources:
                try:
                    yield next(source)
                except StopIteration:
                    return


[pagmo2] Add new port

Describe the pull request

What does your PR fix?

Fixes #13244

Which triplets are supported/not supported? Have you updated the CI baseline?

I've tested x64-linux, x86-windows, x64-windows, x64-windows-static, and x64-windows-static-md.

Does your PR follow the maintainer guide?

Yes.
Previous PR here: https://github.com/microsoft/vcpkg/pull/13339, which required a patch that's no longer necessary in Pagmo 2.16.1. Please also see: esa/pagmo2#446

Hi @dmillard
Thanks for your PR.
Have you tested the feature in this PR?

Hi @dmillard
Thanks for your PR.
Have you tested the feature in this PR?

Hi @NancyLi1013, thanks for your reply! Yes, I've tested my branch using an example from the pagmo docs with and without the nlopt option on Linux and Windows.

Hi @NancyLi1013, thanks for your reply! Yes, I've tested my branch using an example from the pagmo docs with and without the nlopt option on Linux and Windows.

LGTM now, thanks for your PR @dmillard.

LGTM now, thanks for your PR @dmillard.


WIP: Namespace creation: use memory for map location

This should reduce the overhead we lose on device side.

We cannot take away RAM from the node for this, it will cause pod scheduling issues when the node unexpectedly has less RAM available for pods.


Debug: allow a -D option to override header based authenticator

Description
People use various hacks when developing to become different users.  There is always the danger that these hacks make it into the code / builds.   We would like to have an override option when starting the server to fix the user returned by the authentication step.
See: HeaderBasedAuthenticationFilter.java::59
Suggest we have a param like<EMAIL_ADDRESS>Resourcing
We intend to contribute this feature


Unit tests project creation does not work at all

VS2019 v16.4.5, generated unit tests based on MSTest:
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace FinService.MSTests
{
[TestCase]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
}
}
}
Tried to build it - got these errors:
1>  UnitTest1.cs(5,6,5,14): error CS0246: The type or namespace name 'TestCaseAttribute' could not be found (are you missing a using directive or an assembly reference?)
1>  UnitTest1.cs(5,6,5,14): error CS0246: The type or namespace name 'TestCase' could not be found (are you missing a using directive or an assembly reference?)
1>Done building target "CoreCompile" in project "FinService.MSTests.csproj" -- FAILED.

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

ID: 579d660a-e58d-7264-e7b1-54c9259c9878
Version Independent ID: 03696f0b-a16a-3db0-26dd-b3b5a8d89ca2
Content: Test a .NET Standard class library with .NET Core in Visual Studio - .NET Core
Content Source: docs/core/tutorials/testing-library-with-visual-studio.md
Product: dotnet-core
GitHub Login: @tdykstra
Microsoft Alias: tdykstra

@glestwid I verified the behavior you saw as well. This seems like a problem in the MSTest project template in Visual Studio. To resolve the problem, I opened the NuGet package manager (right-click on the Packages node under Dependencies, and then choose Manage NuGet Packages), went to the Updates tab, selected all the packages, and then clicked Update.
I'm closing this issue now since it's not a documentation issue, but let us know if the above steps don't solve the problem for you. Hopefully this will be fixed in a future version of Visual Studio.

Yes, I can confirm that these steps fixed the issue. But I would like to have it fixed in the corresponding project template instead.

@glestwid I don't actually see an existing issue for this on Developer Community, so could you create one there? https://developercommunity.visualstudio.com/content/problem/post.html?space=8

@gewarren here's the link - https://developercommunity.visualstudio.com/content/problem/939146/vs2019-cant-create-a-unit-test-project-for-net-cor.html

@glestwid Thanks very much! I hope they fix it soon!


Implement StrList

See the discussion here. The Rc<str> may be the solution.
When there are many duplicated strings in the Vector, the &str type is much economic than String type, because the same strings can share one heap object.
Look at the example using String below:
fn main() {
    let v: Vec<String> = vec!["foo".to_string(), "foo".to_string(), "bar".to_string(),];
    let a = v[0].as_ptr() as * const() as usize;
    let b = v[1].as_ptr() as * const() as usize;
    let c:f32 = 1.8;
    let _d = &c as * const _ as usize;
    println!("v is {:?}", v);
    println!("a is {}, b is {}", a, b);
    println!("_d is {}", _d);
}

The output is:
v is ["foo", "foo", "bar"]
a is<PHONE_NUMBER>7792, b is<PHONE_NUMBER>7824
_d is<PHONE_NUMBER>03820

The addresses of a and b are different, which implies that they are two different objects. And the address of _d is much smaller than a or b, which implies that _d is using stack memory and a and b are using heap memory.
And look at the &str example below:
fn main() {
    let v: Vec<&str> = vec!["foo", "foo", "bar",];
    let a = v[0].as_ptr() as * const() as usize;
    let b = v[1].as_ptr() as * const() as usize;
    let c:f32 = 1.8;
    let _d = &c as * const _ as usize;
    println!("v is {:?}", v);
    println!("a is {}, b is {}", a, b);
    println!("_d is {}", _d);
}

And the output is as below:
v is ["foo", "foo", "bar"]
a is<PHONE_NUMBER>7479, b is<PHONE_NUMBER>7479
_d is<PHONE_NUMBER>78556

So they are actually pointing to the same object.

Does the implementation look like :
use std::{collections::HashSet, fmt::Display, rc::Rc};

struct StrList {
    value: Vec<Rc<str>>,
    _map: HashSet<Rc<str>>,
}

impl StrList {
    pub fn new() -> Self {
        Self {
            value: Vec::new(),
            _map: HashSet::new(),
        }
    }

    pub fn append(&mut self, item: String) {
        if let Some(e) = self._map.get(item.as_str()) {
            self.value.push(e.clone());
        } else {
            let rc: Rc<str> = Rc::from(item.as_str());
            self.value.push(rc.clone());
            self._map.insert(rc);
        }
    }

    pub fn display_mem(&self) {
        let v: Vec<_> = self.value.iter().map(|x| x.as_ptr() as *const _).collect();
        println!("{v:?}");
    }
}

impl Display for StrList {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        writeln!(f, "{:?}", self.value)
    }
}

fn std_read_line() -> String {
    let mut input = String::new();
    std::io::stdin().read_line(&mut input).unwrap();
    input.trim().into()
}

pub fn main() {
    let mut sl = StrList::new();
    sl.append(std_read_line());
    sl.append(std_read_line());
    sl.append(std_read_line());
    sl.display_mem();
    println!("{sl}");
}

and running:
$ ./main
Hello
is
Hello
[0x5646c831fac0, 0x5646c831fae0, 0x5646c831fac0]
["Hello", "is", "Hello"]

@yingmanwumen Yes, that would be a better solution. My origin idea is something like this:
struct StrList {
    value: Vec<i32>,
    _map: HashMap<String, i32>,
}

So for ['foo', 'foo', 'bar', 'baz'], the vec is [0, 1, 1, 2] and the _map is {'foo': 0, 'bar': 1, 'baz': 2}. It seems that your solution is more elegant and needs less codes to maintain the StrList.


Add spinner when loading

It would be great if there's any loading indicators.

Smart Listing root container has smart-listing class. There are two containers inside: one with class loading and the other with class content.
loading container is faded in when the content is loading. You can style it according to your needs (ie. add spinner background).

But how can I  use 'loading' There no how to use it.


Removing the obligation of the existence of the svelte.config.js file

Hello @mihar-22 , this project is fantastic, congratulations.
This project aims to removing the obligation of the existence of the svelte.config.js file. Do you believe this is valid? The creation of this empty file ends up being very tiring.

Ah there was a PR recently to support monorepos and that must've slipped through, sorry about that. I didn't accept the PR because the warning is required but I moved the requirement to only if you're preprocessing.
Released in 1.1.5.

Ah, thanks, that worked


Minor Feature Request: Hide terminal/console window

Just a minor feature request.
When using sbz-switch with a shortcut it opens a terminal/console window for a short time which can be annoying at times.
Could there be just an additional -hide switch be added?

Unfortunately that's the way Windows works. Whether the program has a console window or not is determined at compile time so either you get a console window or it's difficult to use the program from a CLI. There are two ways around this.
You can have two executables with the only difference being that one is console subsystem and the other is windows subsystem. To run without a console you run the windows subsystem version. This is why on Windows you have stuff like pythonw and javaw.
You can use a windows subsystem program to launch the console subsystem program. See Run a batch file in a completely hidden way.

All right, thank you for explaining it.
And thank you for this (sbz-switch) program it helps out tremendously.


mbedtls_net_accept: client_ip can be NULL

This currently works and is used in example programs, but not explicitly documented (unlike mbedtls_net_bind).
Since only the official documentation and headers are the contract that developers are expected to adhere to and digging the source to gather information about library behavior might be relying on implementation details, I would like to clarify if mbedtls_net_accept is supposed to accept a NULL client_ip argument.
If passing client_ip=NULL is supported, would you please accept this PR?

Hi and thanks for the contribution!
Yes we accept NULL as can be seen in the sample programs, so this looks like a good improvement.
I know this is only a really trivial change, but our policy is to not accept contributions without a Contributor’s Licence Agreement (CLA) signed or authorised by yourself or your employer, and I'm sorry to ask for a CLA for something so simple.
If this is a personal contribution, the easiest way to do this is if you create an mbed account and accept this click through agreement. Alternatively, you can find a slightly different agreement to sign here, which can be signed and returned to us, and is applicable if you don't want to create an mbed account or alternatively if this is a corporate contribution.

I have made an mbed account https://developer.mbed.org/users/aitap/ and accepted the Contributor Agreement. My GitHub profile seems to be connected in the account settings. What should I do next?

Thanks @aitap! No further steps are necessary! At least not for the CLA.

Thanks @aitap ! I took the liberty of pushing a commit to your branch with changelog entry. I've credited you as “aitap”, feel free to amend my commit if you'd like us to use your full name. To facilitate merging, would you mind making a pull request with the same patch against the mbedtls-2.1 branch?

@gilles-peskine-arm, assuming I understood you correctly, #1532 should be the pull request you requested and this pull request can be closed.


When deleting the namepsace do we need to wait until it is confirmed to be deleted?

To avoid the long delay why don't we just send the delete request and continue with deleting the nodepools?
I think it will be deleted in the background and even if fails there is nothing we can do in the automation so maybe there is no reason to check the status to make sure it is deleted before continuing

sounds good to me

How long does namespace delete take? (make resource_delete) it's taking 3-4 secs for me. am I doing something wrong?
when running make nodepool_delete , I get the FailedPrecondition error but no previous nodepool operation was running. while this does trigger the delete operation in gke for the first node(prometheus-{{ .PR_NUMBER }})
04:23:25 provider.go:33: Request for 'deleting nodepool:prometheus-5414' is in progress. Checking in 10s
04:23:36 gke.go:376: Cluster in 'FailedPrecondition' state 'rpc error: code = FailedPrecondition desc = Operation operation-1555022722477-0997d22f is currently deleting a node pool for cluster prombench. Please wait and try again once it is done.'

it takes a little more than 30 tries so it exits prombench and it the second nodePool (L339)
https://github.com/prometheus/prombench/blob/cb798a0564e0e3a78f15c9dc8d916e677e62d6a6/pkg/provider/gke/gke.go#L339-L355
running make nodepool_delete again deletes both of the nodes. (*3 of them one having 2 replicas)

lets deal with the high priority issues first and can revisit this one.
The one for the deployment logs is interesting if we can get it closed.


Error when sanitize strategy escaped and value is undefined.

Error in angular-translate.js on line 284
Error: TypeError: angular.element(...).text(...).html is not a function
var htmlEscapeValue = function (value) {
        return angular.element('

').text(value).html();
  };

Suggestion to check type of value before call: return angular.element('').text(value).html();

Thanks for reporting. I'm still wonder why this can be null actually. text is a defined?!

Problem is when model is not populated with data and property of model is undefined.

Which model? This particular piece of code does not depend on any model.

angular.element('

').text(undefined).html() == ''
angular.element('

').text(null).html() == 'null'
angular.element('

').text('').html() == ''

Still not getting it.

Here is full error trace:

$translateSanitizationProvider/htmlEscapeValue()angular...late.js (line 283)
$translateSanitizationProvider/mapInterpolationParameters()angular...late.js (line 307)
$translateSanitizationProvider/mapInterpolationParameters/<()angular...late.js (line 300)
forEach()angular.js (line 331)
$translateSanitizationProvider/mapInterpolationParameters()angular...late.js (line 298)
$translateSanitizationProvider/strategies.escapeParameters()angular...late.js (line 137)
$translateSanitizationProvider/this.$get</applyStrategies/<()angular...late.js (line 213)
forEach()angular.js (line 323)
$translateSanitizationProvider/this.$get</applyStrategies()angular...late.js (line 209)
$translateSanitizationProvider/this.$get</<.sanitize()angular...late.js (line 277)
$translateDefaultInterpolation/$translateInterpolator.interpolate()angular...late.js (line 2365)
$translate/this.$get</determineTranslation()angular...late.js (line 1721)
$translate/this.$get</$translate()angular...late.js (line 1331)
linkFn/updateTranslation()angular...late.js (line 2633)
linkFn/updateTranslations()angular...late.js (line 2625)
$RootScopeProvider/this.$get</Scope.prototype.$digest()angular.js (line 14308)
$RootScopeProvider/this.$get</Scope.prototype.$apply()angular.js (line 14571)
done()angular.js (line 9698)
completeRequest()angular.js (line 9888)
requestLoaded()angular.js (line 9829)

return angular.element('

').text(value).html();

angular.js (line 11655)

Problem is when in function  "mapInterpolationParameters" is send object
var object = {
   field: "name"
   message: "{javax.validation.constraints.NotNull.message}"
   type: "Operator"
   valid: false
   validator:"required"
   value: undefined
}

It go through every parameters and call function htmlEscapeValue(value). When get on property "value" error is happened because value= undefined.
Value is undefined because form user valdr (plugin for validation) and object used on form is Angular resource object. When new resource object is created value are undefined.

When get on property "value" error is happened because value= undefined.

But that conflicts with my "test" mentioned in the last post: angular.element('

').text(undefined).html() == ''

Please demonstrate you case, as minimal as possible. You can use this here as base..

Test this "angular.element('').text(undefined).html()" without included jquery.
If you do not have included jquery, this: angular.element('').text(undefined).html() throw error.
If you have included jquery, this : angular.element('').text(undefined).html() return "".
Now this is not related to this plugin (but it will be good if you fix this or write jquery as dependency), it is problem in angular jqLite. (behavior in jquery and jqLite is not same).
Please write can we expect your solution without jquery dependency.

Ah, jqLIte. Right, okay, thanks for the hint. The next release will contain a patch.

Same issue without jQuery included.

landed as ef1b10a

Fixed in 2.7.2 (released two days ago).


Performance regression in while_loop

Description
I've observed a performance regression moving from jax 0.4.14 to 0.4.16 in a rejection sampling while loop. Here's a simplified version of the code that exhibits the same behavior:
import timeit

import jax

import jax.numpy as jnp

def rejection_sample(sample_fn, accept_fn, *, rng_key):
    def loop_body(state):
        (rng_key, sample, accepted_mask) = state
        rng_key, subkey = jax.random.split(rng_key)
        new_sample = sample_fn(subkey)
        sample = jax.tree_map(
            lambda x, x_new: jnp.where(accepted_mask, x, x_new),
            sample, new_sample)
        accepted_mask = jnp.logical_or(accept_fn(new_sample),
                                       accepted_mask)
        return rng_key, sample, accepted_mask

    def loop_cond(state):
        _, _, accepted_mask = state
        return jnp.logical_not(jnp.all(accepted_mask))

    rng_key, subkey = jax.random.split(rng_key)
    first_sample = sample_fn(subkey)
    first_accepted = accept_fn(first_sample)
    _, sample, _ = jax.lax.while_loop(loop_cond, loop_body,
                                      (rng_key, first_sample,
                                       first_accepted))
    return sample

def sample(shape, *, rng_key):
    def sample_fn(rng_key):
        return jax.random.uniform(rng_key, minval=0.0, maxval=1.0,
                                  shape=shape)

    def accept_fn(sample):
        return sample < 0.7

    return rejection_sample(sample_fn, accept_fn, rng_key=rng_key)

L = 16
Lt = 48
rng_key = jax.random.PRNGKey(0)
shape = (L, L, L, Lt)

# Force compilation before timing
sample_jit = jax.jit(lambda key: sample(shape, rng_key=key))
rng_key, subkey = jax.random.split(rng_key)
x0 = sample_jit(subkey).block_until_ready()

rng_key, subkey = jax.random.split(rng_key)
dt = timeit.timeit(lambda: sample_jit(subkey).block_until_ready(),
                   number=100)
print(dt)

Running this under several different environments yields
Using jax-0.4.10
0.07284442099989974
Using jax-0.4.12
0.08756969699970796
Using jax-0.4.14
0.10284504599985667
Using jax-0.4.16
7.349518729002739
Using jax-0.4.20
8.398614255998837

I.e. the newer version is ~100x slower (in fact, there seems to be a consistent increase in runtime from version to version). I see similar behavior on two different types NVIDIA GPUs (A100 and RTX 2080 Ti). If I force everything to run on CPU, the timings become more inconsistent, but generally consistent with each other, so this likely a GPU-specific issue:
Using jax-0.4.10 (cpu)
5.222352617987781
Using jax-0.4.12 (cpu)
4.833697886992013
Using jax-0.4.14 (cpu)
3.9580981749895727
Using jax-0.4.16 (cpu)
5.534542325010989
Using jax-0.4.20 (cpu)
4.845710285997484

Potentially related issues:
https://github.com/google/jax/issues/16661
https://github.com/google/jax/issues/16663
What jax/jaxlib version are you using?
Several (see above)
Which accelerator(s) are you using?
CPU, GPU
Additional system info
Python 3.10, Linux
NVIDIA GPU info
No response

Can you try updating to the latest version of JAX? I believe jaxlib==0.4.16 has a known performance issue that may be related: https://github.com/google/jax/pull/17724

The latest version I've tried is 0.4.20, which is the most recent release as far as I can tell. The issue is still present there.
The issue you linked inspired me to dig a bit deeper, and after some further investigation it appears the issue is not actually in the while loop, but rather in the condition. Specifically the combination jnp.logical_not(jnp.all(...)) seems to be the slow part. This simplifies things a bit:
import timeit
import jax
import jax.numpy as jnp

@jax.jit
def f(x):
    return jnp.logical_not(jnp.all(x < 0.7))

@jax.jit
def g(x):
    return jnp.any(jnp.logical_not(x < 0.7))

@jax.jit
def h(x):
    return jnp.all(x < 0.7)

shape = (16**3 * 48,)
rng_key = jax.random.PRNGKey(0)
x = jax.random.uniform(rng_key, minval=0.0, maxval=1.0,
                       shape=shape)

# Compile
f(x)
g(x)
h(x)

dt = timeit.timeit(lambda: f(x).block_until_ready(),
                   number=1000)
print(f"not(all(x)): {dt}")
dt = timeit.timeit(lambda: g(x).block_until_ready(),
                   number=1000)
print(f"any(not(x)): {dt}")
dt = timeit.timeit(lambda: h(x).block_until_ready(),
                   number=1000)
print(f"all(x): {dt}")

Running this I get
Using jax-0.4.10
not(all(x)): 0.04904459699173458
any(not(x)): 0.040804433010634966
all(x): 0.03323979300330393
Using jax-0.4.12
not(all(x)): 0.06948921899311244
any(not(x)): 0.041380729991942644
all(x): 0.03729355499672238
Using jax-0.4.14
not(all(x)): 0.07314369500090834
any(not(x)): 0.065828587001306
all(x): 0.06242232900694944
Using jax-0.4.16
not(all(x)): 5.161174478009343
any(not(x)): 0.1380664679891197
all(x): 0.11088073400605936
Using jax-0.4.20
not(all(x)): 3.935028567997506
any(not(x)): 0.11883646699425299
all(x): 0.09598468799958937

I'm not sure if this is the same as #17724, but it does sound plausible.

I can't reproduce this on my (CPU) machine:
not(all(x)): 0.031113745993934572
any(not(x)): 0.029049667005892843
all(x): 0.029495747003238648

On what platform does this issue occur?

The issue is only present on GPU -- in particular I've seen this with 2 different Nvidia GPUs (A100 and RTX 2080 Ti), and also two different CUDA versions (11.8 and 12.0).

Thanks, it looks like XLA's code generation regressed for this reduction. Filed https://github.com/openxla/xla/issues/7152

We have found that the regression came from reduction epilogue fusion which was implemented in that time frame when the regression occurred. We allowed to create a fusion that is actually not supported by the reduction emitter, so the reduction got emitted via the loop emitter as elementwise reduction, which is quite a bit slower in this case. I am about to submit a fix where we do not allow this fusion, so the reduce will still be the root of the fusion.

https://github.com/openxla/xla/commit/cc5307ec4f968a80aecaeb0febed2a65789ab713 was the fix for this

Closing because the XLA issue was fixed! Please try it out.


[FEATURE] Search Pipelines in opensearch-js

Is your feature request related to a problem?
The search pipelines feature was released officially in 2.9.  Example search with a pipeline:
POST /opensearch_sample_data_flights/_search?search_pipeline=my_pipeline
{
   "query": {
      "match_all:" {}
   }
}

The request in opensearch-js currently does not have a parameter for a search_pipeline.
What solution would you like?
Add a parameter for search_pipeline for search requests.
What alternatives have you considered?
Currently, adding a search_pipeline parameter works, but it is not declared in opensearch-js, and the linter throws errors.
Do you have any additional context?
N/A

Thanks @sejli
I've raised an issue in the API Spec repo as eventually this will be handled by a client generator that will read the spec and generate the API code. We're currently working on the generator ourselves.
In the meantime, feel free to raise a PR to update the input type for the search operation if no one has gotten to it. If you have any questions, don't hesitate to ask :)

@nhtruong any update on this? The PR was closed recently.

It was probably closed by mistake. Just restored it. Lemme rebase it and get it merged.


[docs] DemoEditor not allowing scroll on website documentation

Duplicates

[X] I have searched the existing issues

Latest version

[X] I have tested the latest version

Steps to reproduce 🕹
Link to live example:
Steps:

Get into MUI website
Go to any component documentation (e.g. https://mui.com/material-ui/react-autocomplete/#multiple-values)
Click on show source
Try to scroll to see the example code source

Current behavior 😯
Text editor area doesn't scroll

Expected behavior 🤔
Text editor area should scroll

Context 🔦
I was reading the documentation while working on a project and this sh** was driving me nuts.
Toying with the inspect developer tools I managed to make it work again changing those two properties of CSS.
When looking on the codebase realized where these changes could be applied - didn't test those tho -.
I think the problem is located at this file https://github.com/mui/material-ui/blob/0a29e3c5d07b3d8dcbc3a89d283f65c6c86f2c18/docs/src/modules/components/DemoEditor.tsx

looks like those properties come from react-simple-code-editor package, but overriding those make your life less painful again.
Your environment 🌎
Tested on latest Google chrome version Version 107.0.5304.87 (Official Build) (x86_64) and Firefox version 106.0.3 (64-bit) on MacOs Monterrey 12.6

Hi @codeinearts, according to https://github.com/mui/material-ui/issues/35068, some people have been able to work around the issue by switching the docs website from Dark mode to Light mode.

Hey @gitname
I can confirm that it effectively works correctly using light theme.
I've also discovered that oddly enough, this only happens if entering the url of the docs directly, but not if you land on the home page and the move to components documentation.
When entering directly to the documentation pages, I can also see a flash of the light theme, which might give some clues about why is this happening.
Thanks for the workaround 👍


Python 3.6.1 requirement

The plugin depends on Python 3.6.1, meaning that consumers wishing to use a dependency resolver such as that in Poetry will also need to require 3.6.1.
As most projects use some sort of semantic versioning, it's typical to specify dependencies as either X, or X.Y, and then let a lock-file of some sort pin to X.Y.Z. It is rare that a patch version is a necessary upgrade for a project.
Does flake8-github-actions depend specifically on 3.6.1? If not, I'd encourage this requirement to be loosened to 3.6 so that package consumers do not need to require 3.6.1 either, and enforce that strict requirement on their consumers, and so on.
If the 3.6.1 requirement is necessary it would be great to get a better understanding of the edge case. Can it be documented? Is there a workaround that can be applied so that the version bounds can be loosened?

Hi @danpalmer,
Thanks for opening this issue.
The minimum version was set because typing.NamedTuple didn't support default values in 3.6.0, but as flake8-github-actions doesn't actually use NamedTuple it should work fine.
I have relaxed the version requirement to >=3.6 and made a new release (0.1.1). Does that resolve your issue?


How do I implement caching?

I would like to avoid calling an API twice, if the service has already been called.
Now I wonder where to put this logic. Do the service handle the "caching" (e.g ReplaySubject) or does  a smart component "subscribe" to the store and just calls the service in case there is no data available.
Thoughts?

There is very simple solution for that.
Let's say you have UserService which handles fetching data from api.
In case you need some caching, you can implement wrapper.
interface IUserService {
  loadUser(id: string): IUser;
}
class UserService implements IUserService  {
  constructor(_http: Http) { }
  loadUser(id: string): IUser { ... }
}
class CachingUserService implements IUserService  {
  constructor(userService: UserService, cache: SomeCache) { }
  loadUser(id: string): IUser {
    let user = cache.get(id);
    if (!user) {
      return userService.loadUser(id);
    }
    return user;
  }
}

And your components will depend on IUserService and DI will do the rest.

Ah this is a nice idea. Thank you !


Not able to use fileshare and blob together using connection-string (spring-cloud-azure 4.0.0)

Below is the application.yml (using spring-cloud-azure 4.0.0) which specifies both blob and fileshare:
spring:
  cloud:
    azure:
      storage:
        blob:
          account-name: "${AZURE_STORAGE_BLOB_ACCOUNT_NAME}"
          connection-string: "${AZURE_STORAGE_CONNECTION_STRING}"
        fileshare:
          account-name: "${AZURE_STORAGE_FILESHARE_ACCOUNT_NAME}"
          connection-string: "${AZURE_STORAGE_CONNECTION_STRING}"

Below is the errror.
2022-04-22 09:07:40.848  WARN 38200 --- [           main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.support.BeanDefinitionOverrideException: Invalid bean definition with name 'staticStorageBlobConnectionStringProvider' defined in class path resource [com/azure/spring/cloud/autoconfigure/storage/fileshare/AzureStorageFileShareAutoConfiguration.class]: Cannot register bean definition [Root bean: class [null]; scope=; abstract=false; lazyInit=null; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=com.azure.spring.cloud.autoconfigure.storage.fileshare.AzureStorageFileShareAutoConfiguration; factoryMethodName=staticStorageBlobConnectionStringProvider; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/azure/spring/cloud/autoconfigure/storage/fileshare/AzureStorageFileShareAutoConfiguration.class]] for bean 'staticStorageBlobConnectionStringProvider': There is already [Root bean: class [null]; scope=; abstract=false; lazyInit=null; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=com.azure.spring.cloud.autoconfigure.storage.blob.AzureStorageBlobAutoConfiguration; factoryMethodName=staticStorageBlobConnectionStringProvider; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/azure/spring/cloud/autoconfigure/storage/blob/AzureStorageBlobAutoConfiguration.class]] bound.
2022-04-22 09:07:40.864  INFO 38200 --- [           main] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-04-22 09:07:40.897 ERROR 38200 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   :

***************************
APPLICATION FAILED TO START
***************************

Description:

The bean 'staticStorageBlobConnectionStringProvider', defined in class path resource [com/azure/spring/cloud/autoconfigure/storage/fileshare/AzureStorageFileShareAutoConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [com/azure/spring/cloud/autoconfigure/storage/blob/AzureStorageBlobAutoConfiguration.class] and overriding is disabled.

Action:

Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true

Note, it works if account-key is specified for both.

@ctalpandey Thanks for reaching us, I will look into it.

@ctalpandey We have fixed this issue in the PR, and will fix it in our next release.

Thank for the fix; closing issue from my side.


What about .flowconfig.js ?

As you can understand some flow config may depend on project config, so it will be useful to have an opportunity to dynamically create flow config.
A good example is eslint config in form of .eslintrc.js

For reference/easier findability, these are the flowconfig related issues/suggestions I found that would bring it in line with other tools like eslint, babel, webpack, etc:

https://github.com/facebook/flow/issues/4115 : What about .flowconfig.js
https://github.com/facebook/flow/issues/153 : .flowconfig should use json
https://github.com/facebook/flow/issues/238 : .flowconfig should recursively consider other .flowconfig files
https://github.com/facebook/flow/issues/3569 : Flow config in package.json

Flow is written in ocaml. Adding node.js runtime may negatively affect performance and increase complexity.


Dev/nevin/log

can I just rethrow the exception here?
I'm not sure if I should throw a general RuntimeException, or just simple rethrow

I'll merge this first. Please kindly give me some post review. Thank you!


Cannot logout from Nexus Web on Linux workstations

In Nexus Web, after logging in, click on the logout link. You will appear as logged out, although if you click on "login" again, you'll be automatically logged in again with the previous user, without being asked for username and password.
It means it's not possible to switch users, and it's also a security risk, as logging out on a machine doesn't prevent someone else to use it after yourself and login with your user without having to enter any password.

This is because of the way the kerberos token is handled on linux machine. There is nothing we can do about that


Reverted changes in README.md footer date

Task 10

"Reverting changes in README.md" is the correct commit


Update enum values for "cursor" in CSS

doesn’t work:

vertical-text

works:

not-allowed

Figure out the rest: https://developer.mozilla.org/en-US/docs/Web/CSS/cursor

works

auto, inherit, cross, default, move, pointer, text
not-allowed
ew-resize, ns-resize,nesw,nwse
grab
grabbing
zoom-in
zoom-out


Fix "clipped" property in layer. Has to be "group"

Fix "clipped" property in layer. Has to be "group"

Will be fixed in 1.2.0


Travis integration test

@jh-bate this PR includes a pretty good integration test for dfaker. It starts dockerized mongo, styx, gatekeeper, shoreline, and jellyfish, uses dfaker to generate 2 days of data, then ensures the data is successfully uploaded to jellyfish.
This is based off of #14 so the diff should be a lot smaller once that is merged.

thanks @anderspitman will take a look early next week

on small thing I thought of - could we add the travis badge to the readme. Just so we can see the state of the build

LGTM - merging


Negated rule made position-insensitive (#29)

Maybe I was a bit hasty w this one, but it was blocking my long-dormant #25.

String or array of string patterns.

This part feels moot in the TS definition (but not the readme) as it's already made clear by the types.
Otherwise, it looks ok.

Plz check & let me know. I did not bump the version.


v1.12 Backports 2023-07-24

[x] #25038 (@pchaigno)
[x] #26808 (@pchaigno)
[x] #26933 (@nbusseneau)
[x] #26934 (@michi-covalent)
[x] #26979 (@pchaigno)

PRs skipped due to conflicts:

#26455 (@alan-kut)

Once this PR is merged, you can update the PR labels via:
for pr in 25038 26808 26933 26934 26979; do contrib/backporting/set-labels.py $pr done 1.12; done

or with
make add-labels BRANCH=v1.12 ISSUES=25038,26808,26933,26934,26979

@michi-covalent @pchaigno Please see backporter's notes for each commit, conflicts arised due to file renames.

/test-backport-1.12

1.16 / 4.9 hit both #25721 and #24840.
1.19 / 4.9 hit #25721 as well.

The backport only targets docs and tests themselves, and the unquarantined test passed, the 2 failures above cannot be introduced by this PR. Marking ready-to-merge.

Looks like there are some conflicts @nbusseneau.

Indeed, #27059 got merged first so I lost the race here (unlike on v1.13, where I won and now Quentin has to deal with it, hehe). It's only very a minor Documentation conflict though (spelling wordlist...), so no need to re-run the full CI for this. Documentation checks have passed, marking ready-to-merge.


How to use TF_VARIANT in c_api?

Hi :
How to use TF_VARIANT in c_api?

This question is better asked on StackOverflow since it is not a bug or feature request. There is also a larger community that reads questions there.
Thanks!


Do I need to install original @yaireo__tagify library to make it work?

Do I need to install original @yaireo__tagify library to make it work?

Both @yaireo/tagify and @types/yaireo__tagify are dependencies and are getting installed automatically. No extra peer dependencies. See #1 for what I guess your problem is.


Introduce configuration using Custom Resources instead of annotations

Is your feature request related to a problem? Please describe.
Currently, Argo CD Image Updater is configured in two ways:

The images and applications to be updated are configured by applying annotation on Argo CD's Application resources. This is cumbersome (need to for each application which uses a certain image) and error prone (e.g. typos).

Additionally registry configuration is done using a YAML within a ConfigMap resource, e.g. registries.conf

Describe the solution you'd like
We want to make the configuration of Argo CD Image Updater - both for registries and applications - to be a strongly typed one, so that creating a configuration becomes less error prone. Also, we want to decouple the image configuration from a single Application resource, so that it becomes easier to say "update image foobar in all applications matching a giving pattern/project/label selector`.
For this, two new CRDs should be introduced:

argoproj.io/ImageUpdateConfig for describing images to be updated and mapping them to Applications
argoproj.io/RegistryConfig for configuring custom registries to be used by Image Updater

The APIs have yet to be defined and are currently work in progress. But they will eventually replace the current way of configuring Image Updater.
An initial version of the APIs/CRDs will be attached to this issue once they are in a reviewable state.

@jannfis Just  curious if you've made any progress on this front?

Is anyone actively working on this? Happy to take this feature request on

@aburan28 Thanks for your offer. Before writing any code, we should define & agree on an API though. This will be a dry run task. There's a couple of things in the backlog too, that play into this. Feel free to come up with a proposal for an API (probably as a Discussion). I do believe this will not be an easy task, and there will be lots of discussions and back and forths around it.

Absolutely, sounds good. I will come up with a proposal and start a discussion on this topic


[TACHYON-987] temporarily disabling MasterFaultToleranceIntegrationTest

https://tachyon.atlassian.net/browse/TACHYON-987
Disable MasterFaultToleranceIntegrationTest to unblock other PRs

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/Tachyon-Pull-Request-Builder/5112/
Test PASSed.

LGTM, thanks.


fix program call without custom regex and format

calling program with custom regex and format like,
python3 logmerge.py tests/f1 tests/f2

resulted in
Traceback (most recent call last):
  File "logmerge.py", line 213, in <module>
    main()
  File "logmerge.py", line 181, in main
    elif not args.format ^ args.regex:
TypeError: unsupported operand type(s) for ^: 'NoneType' and 'NoneType'

Bug introduced in 53ff53e and #8, authored by me. Sorry.

@jasonzio Kindly review


Date-Picker allow template for calendar icon

What problem does this feature solve?
We have a specific set of icons that we use on our site. We want to be able to user our calendar icon instead of the default icon that is specified in the fesm5/ng-zorro-antd-date-picker.js - <span class="{{ prefixCls }}-picker-icon">\n    <i nz-icon nzType="calendar">\n
It would be ideal if the calendar icon would accept a template like some of the other controls do. If it doesn't find a template then just use the default calendar icon.
What does the proposed API look like?
<nz-date-picker [(ngModel)]="date" (ngModelChange)="onChange($event)" [nzSuffixIcon]="customIconTemplate">
<ng-template #customIconTemplate>

The suffixIcon property in AntD.

Close via #5072


Form inputs without shouldSaveDraft don't update their value and submit stale data

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Run npm run storybook
Update the value of an input without the shouldSaveDraft param, e.g. Account number in the default story.
Submit the form and verify that the value submitted is stale

Expected Result:
The value should be updated and submitted correctly.
Actual Result:
Value updates on the UI, but the submitted value is stale.
Workaround:
None.
Platform:

Web
iOS
Android
Desktop App
Mobile Web

Version Number:
Reproducible in staging?:
Reproducible in production?:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
Issue reported by:
Slack conversation:
View all open jobs on GitHub

Working on it this week.


[MacOS] The project can't be build with 7.0.302 SDK

Relates to https://github.com/dotnet/razor/issues/8718
Now I can't build the project. I have errors like:
/Users/XXX/git/OpenMU/src/Web/AdminPanel/Components/Form/ItemStorageField.razor(42,42):
Error RZ9991: The attribute names could not be inferred from bind attribute 'bind-Value'.
Bind attributes should be of the form 'bind' or 'bind-value' along with their corresponding
optional parameters like 'bind-value:event', 'bind:format' etc. (RZ9991)
(MUnique.OpenMU.Web.AdminPanel)

Right now I'm using Docker for building, because I don't know how to fix it on MacOS.

Is this still an issue?
Can you try building the dotnet 8 branch (#389)?

Is this still an issue? Can you try building the dotnet 8 branch (#389)?

Yeah, it works, thanks!


DataFrameClient retry on batches

When writing medium to large dataframes (multiple 50K datapoints and up) we sometimes run into server errors (HTTP 500, timeout etc). I understand this could be considered outside of the scope for the client library, but if the error is caught outside of the batch loop we can't know what data was uploaded and have to restart the upload for the entire dataframe.
Ideally, when using the the batch_size option on the DataFrameClient.write_points function it would be aware of these errors and retry a batch if needed. There are a few retry decorators out there that could be of use (e.g. https://github.com/d0ugal/retrace).
Any thoughts? Would this be a valuable addition? Would you mind taking a dependency on a retry decorator?

+1

+1, just running into this issue
500 error is leaving influxdb server spinning off and taking the server down with it as a result.

+1

I added retry logic on ConnectionError a few months back, I'll implement something similar for HTTPErrors with exponential backoff (see https://github.com/influxdata/influxdb-python/pull/435).


chore: run merge-gate on pr label change

Description
Changes proposed in this pull request:

...
...
...

Related issue(s)

Tested on this PR, it works


 I don't think we should merge this quite yet, as in the past we've been burned by attempting to upgrade to the latest Go version too quickly. However, once we're confident in this new version, then we can start to use any new language and standard library features that were included as part of Go 1.14.

@Roasbeef nice, this already caught these
# github.com/lightningnetwork/lnd/brontide
brontide/noise_test.go:109:27: conversion from int to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)

# github.com/lightningnetwork/lnd/macaroons_test
FAIL	github.com/lightningnetwork/lnd/macaroons [build failed]
macaroons/constraints_test.go:17:49: conversion from int to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)

these were added as vet checks in go1.15 to prevent common gotchas

Just leaving this as a note but if we want CI fuzz tests, they'll not be able to run with 1.15 yet so it will be separate

@Roasbeef can you rebase now that #4647 has been merged?

@Roasbeef the unit-cover target is failing now on travis. it seems to no longer like the -test.tags argument here. I was able to resolve it locally by removing the test. prefix

Should be fixed now?

Travis failure is a neutrino flake, will test locally.


Adding new wordpress themes

There is currently no button that allows for new wordpress themes to be used:

I'm not sure if this is by design for security purposes or there is a way to do it that I'm not aware of.
Any direction on this would be useful.
Thanks!

Heroku has an ephemeral file system. Anything u install with the app will be deleted when the app restarts. (And it will happen everyday randomly according to heroku)
U can try to install via composer.json
Or the easier way is to copy the themes folder manually into
Public-->wp-content-->themes

Thanks! This worked out well


Group and display results in specific order

group and display results in a specific order

Group results by "Test Number"
Group results by "Part Number"

This feature is implemented as part of phase 1 development


Missing support info mentioned in FAQ

On this page, it states:
> "If the status column shows green/OK, and Search is still not working, contact support at the address shown at the end of this topic."
But: there is no contact support address or option at the end of the topic.

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

ID: 281d0249-2b4b-85cf-150b-509805c90931
Version Independent ID: 897e1ea2-d3fd-b21b-a07c-e62218fad22b
Content: FAQs and problem solutions for Search - Azure DevOps
Content Source: docs/project/search/faq-search.md
Product: devops
Technology: devops-collab
GitHub Login: @chcomley
Microsoft Alias: sunar

Hi @NenoLoje, Thanks for letting us know! I've updated the article to include hyperlinks to Support. Thanks again and have a great day!

@chcomley - Follow-up question. I see the support link is now: https://visualstudio.microsoft.com/vs/support/#talktous
Is this the most appropriate place? I would think that issues with Azure DevOps Server/TFS Code Search, might be better suited at: https://azure.microsoft.com/en-us/support/devops/, no?


Serializers convert floats to strings

In the R and C interfaces of LightGBM, the serialization functions convert floating point numbers to text representations in decimal format in order to save and load models (e.g. LGBM_BoosterSaveModel and LGBM_BoosterSaveModelToString). This loses precision in floating point numbers and can lead to small differences in predictions between a model used right after fitting it and a model that was loaded from a saved file or string.
As an additional problem, serializing through this system also means that it's not possible to know the size that the serialized bytes will have beforehand (that is, the model needs to be serialized in order to know how long will the buffer than holds need to be), which makes serialization in the C interface less efficient.

Thanks for writing this up!
Can you please provide some evidence for the problem you're talking about?

how did you notice this? (e.g. is there some code you can provide that reproduces the problem?)
are you able to point to specific lines in the functions you referenced, like LGBM_BoosterSaveModel, where you think this precision loss is happening?

Without that type of information, maintainers here will have to put some effort into figuring out things that I suspect you already know. Sharing such information could help us get to a fix more quickly.

Don't know. Could be, if lgb.Dataset does the same thing, but haven't looked at its code. Although in that case, if it is only failing for windows, you could perhaps try playing with mingw's __USE_MINGW_ANSI_STDIO.

Do you think we need a binary serialization format in addition to current text one?
Related: #4217.
There was unsuccessful attempt to adopt protobuf format many years ago: #372, #908 (reverted from master later).

I think it'd be a good addition, since apart from ruling out any potential case of mismatches between fresh and deserialized models, it would imply decreased memory usage and faster serialization/deserialization (especially important for the R interface since it now keeps a serialized copy by default).
However, I think it'd be enough with simply using a custom format by memcpying arrays and struct fields to a char* pointer. There's also the "cereal" library which auto-generates code for doing that using ostreams (like std::stringstream), but such an approach would have the downside of losing compatibility with earlier and future library versions with a different model structure.

but such an approach would have the downside of losing compatibility with earlier and future library versions with a different model structure.

It might be desirable to have a schema otherwise it can be difficult to debug compatibility issues in the future.


AVD Getting started

The global administrator is not required and should be removed from the following:
An account with the global administrator Azure AD role assigned on the Azure tenant and the owner role assigned on subscription you're going to use.
The account must be assigned the contributor or owner role on your subscription for deployment as stated in the Prerequisites for Azure Virtual Desktop | Microsoft Learn

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

ID: d6474476-1912-a090-9c28-6c0613adfd5c
Version Independent ID: 4e3457e0-6abb-92fb-5080-56f5be0356fd
Content: Deploy Azure Virtual Desktop with the getting started feature
Content Source: articles/virtual-desktop/getting-started-feature.md
Service: virtual-desktop
GitHub Login: @dknappettmsft
Microsoft Alias: daknappe

Contacted offline. Closing due to a misunderstanding.
#please-close

Author fixed the issue


Current Debian build fails on Ubuntu

VSCode Version: 1.28.1-1539281690
OS Version: Ubuntu 18.04

Steps to Reproduce:

Upgrade or install code from the repository (deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main)

Result:
Here is the output from apt:
$ sudo apt install code
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  code
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/44.1 MB of archives.
After this operation, 196 MB of additional disk space will be used.
(Reading database ... 226790 files and directories currently installed.)
Preparing to unpack .../code_1.28.1-1539281690_amd64.deb ...
Unpacking code (1.28.1-1539281690) ...
dpkg: error processing archive /var/cache/apt/archives/code_1.28.1-1539281690_amd64.deb (--unpack):
 unable to open '/usr/share/code/code.dpkg-new': Operation not permitted
Errors were encountered while processing:
 /var/cache/apt/archives/code_1.28.1-1539281690_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I have tried uninstalling code, and reinstalling, but the /usr/share/code/ never seems to be deleted.

Does this issue occur when all extensions are disabled?: N/A, but yes

Found the error. The operation is blocked by Sophos antivirus somehow. Stopping the antivirus service fixed the error.

I find this one so edge case, that unless it uncovers other issues, it should be closed. You have my blessing in closing this issue, but I will not do it myself, in case there is something you want to investigate.

Thanks for letting us know, will see if anyone else reports 🙂


pgmigrate does not chooses a master when multiple hosts are passed in the connection string

When I start pgmigrate like this:
pgmigrate -l 1 -t 1000 -d /app/migrations -c "dbname=artdb host=host1.my.net,host2.my.net,host3.my.net port=5432 user=art" migrate

It would be great if pgmigrate will add target_session_attrs=read-write to the connection string if it is not already there.

We probably shouldn't modify connection string.
There are several problems with adding target_session_attrs=read-write to every conn string:

What if user just wants to get info about applied migrations and calls pgmigrate with a list of replicas? Pgmigrate will fail to connect.
What if user always set session param -s "SET SESSION CHARACTERISTICS AS TRANSACTION READ WRITE" in pgmigrate call and role has default_transaction_read_only = on setting? Pgmigrate will also fail to connect.

So we need to check if we are going to write anything or mess with session params in our call in case of several hosts in conn string. There are probably more problematic cases. I just came with 2 after about 5 minutes of thinking.
If caller put several hosts in conn string why not just add desired target_session_attrs?

Added workaround into my own wrapper around pgmigrate.


I want to use Cowboy 2.11's Websocket over HTTP/2 feature, How do I configure nginx

I use the NGINX cowboy agent service, NGINX configuration is as follows: https://github.com/imboy-pub/imboy/blob/main/doc/nginx_dev.imboy.pub.conf
I want to use Cowboy 2.11's Websocket over HTTP/2 feature,
How do I configure nginx

I don't know nginx much. You should try stackoverflow or other forums for help. Please only open a ticket if there's an issue in Cowboy.