fix: Fix critical CVEs in release/v1.19 via backport of Alpine 3.19

We're currently using gitea:1.19.x and our security scanners have detected the Critical CVE-2023-38545 found in the base alpine:3.17 image.
This CVE has been fixed in the main branch via #28594.
This PR backports the fixes to the  release/v1.19 branches.
This PR also bumps github.com/mattn/go-sqlite3 to v1.14.9 due to a build break which was fixed by go-sqlite3, a similar bump is introduced in main via #28518
For testing, issuing a make test passes and running a trivy image docker.io/gitea/gitea:latest shows the Critical CVEs are no longer present with alpine:3.19 as of writingthis PR.
We'd like to request the release of a new gitea:1.19.x release on the successful merge of this PR.

This is my first PR to gitea, so please guide me if I have gotten something wrong.

If I understand the problem correctly, Gitea is unaffected as gitea is not curl, and we don't use curl anywhere.
I don't think we need to fix this security issue without impact.
See also https://daniel.haxx.se/blog/2023/08/26/cve-2020-19909-is-everything-that-is-wrong-with-cves/.

@delvh yes that is correct.
Gitea does not use curl/libcurl, but there's a vulnerability within the base alpine image via curl/libcurl.
This PR addresses that with a bump of alpine which has the updated version of curl/libcurl.

Updated title to clarify backport.

I don't think we will release a new 1.19.x version.

Yes, 1.19 (and 1.20 for that matter) are EOL. If an LTS version is of interest to you, one of my goals for the upcoming year is to introduce one.
However, if you are concerned re:security, I'd suggest going to 1.21 right away.
If you have a business need to stay on 1.19 you can reach out to CommitGo, a company founded by some TOC members to offer support services at<EMAIL_ADDRESS>and we can assist you in that, along with backporting the other security patches.


Add Transaction supported on 2.9+

Thanks for your work
I can't use transaction on plusar cluster version 2.9+. like 2.9, 2.10, 3.x and so on  but java client is ok
I got error when start transaction by producer like
"Unhandled exception. Pulsar.Client.Api.CoordinatorNotFoundException: Transaction coordinator with id 1 not found!
at <StartupCode$Pulsar-Client>.$TransactionMetaStoreHandler.-ctor@148-163.MoveNext()
at <StartupCode$Pulsar-Client>.$TransactionBuilder.BuildAsync@34.MoveNext()"
Please join the plan to support the new version on transaction

@Genuineh can you please some Pulsar reference to what changed in transactions between 2.8 and 2.9? Maybe github issue or blogpost

I can give it a try but need some time

I found a change in the agreement that may happen on #13135 Commit. Can you take a look? I'm not familiar with F# myself, so I can't apply it quickly.

Thanks, this looks relevant, I'll dig there when I have more time

@Genuineh I've done some testing and found that it integration tests are broken between 2.8.4 and 2.9.0 (2021-11-25), while the commit above was merged Dec 14, 2021, so it seems that it was not the case

@Lanayx I couldn't find any content related to this exception in the transaction-related commits and discussions from 2.8.1-2.9.0, and it seems that their approach in the 2.9.2 update is to prevent users from being aware of this exception on their end and they have implemented an internal retry mechanism. It is possible that previous transaction-related changes may have triggered this exception logic, but will retrying be able to resolve the problem? I'm not very clear about the internal implementation mechanism and code, so I'm not sure what caused it. However, if such an issue occurs, is it possible that there have been relevant notifications in the official communication group? The official issue resolution speed is quite slow, so I'm wondering if there are any faster channels on your end to confirm the cause of this problem and the related solution?

The retry is already implemented in Pulsar.Client, you can see it in logs, exception get raised after several tries  It looks like something changed about transactions implementation on broker side. I don't have any channels except official, so only digging into the code can help.

@Genuineh I've spent some time today investigating the issue and could make transaction coordinator work even without any client library.
I've followed this guide https://pulsar.apache.org/docs/3.1.x/txn-use/ and then tried to get coordinator stats
https://pulsar.apache.org/docs/3.1.x/admin-api-transactions/#get-coordinator-stats
and it returned the same error Transaction coordinator not found! coordinator id : 1
So I expect that once you'll be able to make it work from admin side the library will work for you as well.

Good news, I've investigated git history and found some relevant commits
https://github.com/apache/pulsar/pull/12301
https://github.com/apache/pulsar/pull/12219
https://github.com/apache/pulsar/pull/11357

I have also tried quite a few approaches to adjust the server settings, but they didn't have any effect. However, it's really great to see this, looking forward to what comes next.

Hey, I've just published https://www.nuget.org/packages/Pulsar.Client/2.14.0 , it should resolve the issue for you. It indeed appeared that protocol was changed in 2.9 and that https://github.com/apache/pulsar/pull/12301 was the commit that fixed it for Java client, so I applied changes from there and it worked. Tested on 2.9.0 and 2.11.2

@Lanayx Thansk for your working, it worked on version 3.x normally too


Add sort feature to file list

Allow users to sort File view list by the headers in ascending and descending order.

duplicate. issue already create - #36
closing this issue.


Fix long Jax tracing times

Problem: when running an analysis via Numpyro, an inordinate amount of time is spent tracing every function attached to the Model object, but most of these functions are not needed at sample-time
Solution: create a lightweight wrapper object which takes only the needed functions and objects for sampling from the Model for use with Numpyro. Should be generated within the Numpyro sampler setup and passed to the sampler.

I think I'll take a shot at this!


Fix form example in readme

What does this pull request do?
Addresses #59 by fixing the form example so it compiles correctly. @mjepronk do you mind giving this a whirl just to make sure things work for you?

Thanks a lot for the quick response. I've tested it and the only remark I have is the type of the page function. It should be:
page :: forall q i o m. MonadAff m => H.Component HH.HTML q i o m

(HH.HTML was missing)

I really want to switch this readme to be a literate PureScript file to avoid these problems in the future, but I've struggled to get the existing tools working for me. Thanks for catching that!


Embed in SharePoint Online => Require License for viewer

Embed in SharePoint Online => Require License for viewer
Embed in SharePoint Online works with the Power BI web part for SharePoint Online. It provides a single sign-on experience with control over how the report is embedded.

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

ID: df058604-4117-88d8-0cb0-935d08e5b22a
Version Independent ID: dc8d3604-1fea-0109-2a94-13bd70a10522
Content: Ways to share your work in Power BI - Power BI
Content Source: powerbi-docs/service-how-to-collaborate-distribute-dashboards-reports.md
Service: powerbi
Sub-service: powerbi-service
GitHub Login: @maggiesMSFT
Microsoft Alias: maggies

Thanks for your comment, @yhlow72. I've assigned this issue to the doc author for review.

Thank you for submitting feedback on our documentation. This article has been updated. If your feedback isn’t addressed, please feel free to submit additional feedback for the page.


cool!

just found this project, cool! linked to your tool from our website now: http://www.capstone-engine.org/showcase.html
just a question: where is the thesis behind this tool?
keep it up, cheers.

Nguyen, that's great, thanks!
The Capstone version of Cardinal is currently halted because I couldn't create an effective procedure boundary finding algorithm. I switched to IDA which gave that for free. Brumley et al. did some interesting procedure finding work that might enable work on the completely free and open-source version of Cardinal with Capstone to continue. I certainly prefer free and open-source.
I'm waiting to upload the paper to GitHub at least until I submit it to a conference.
Thanks for Capstone! Very elegant, minimalist software

awesome, looks forward to the paper. good luck with your submission!

Finally included the paper. We went to Malware 2016 in October!


Update plugin for Keycloak 4

The last stable version of Keycloak is 4.3.0.Final. It would be nice to update the plugin for Keycloak 4.
I tried to use the plugin as-is, but it will not work. I have updated keycloak-core to 4.3.0.Final in my own fork and now I can at least list the Keycloak roles. But a login is still not possible. No error is given.
I followed the guide in the readme.

add service account roles in the Keycloak client
added client roles "admin" and "developer" for the Keycloak client
created the groups "admin" and "developer" in Keycloak
assigned the client roles to the groups
joined users to the groups in Keycloak
added role mappings in Nexus to the Keycloak roles

Tried to sign-in as Keycloak user, but get login error. No other error message is available.

@devent Can you past the pictures for the settings of Clients -> nexus3 -> Service Account Roles and Clients -> nexus-anrisoftware-com -> Roles?
And, it seems that you bind the client roles to the realm groups, that is not supported right now. You should assign the client role to every user, like:

As you requested.
Clients -> nexus3 -> Service Account Roles

Clients -> nexus-anrisoftware-com -> Roles

@devent Yes, I will do some works for it as soon as possible.

Hi, I tried with the fork of devent and can't make it work, don't know if he pushed everything needed to make it work. If you could update your code, i would be deeply appreciated :) thanks for the good work anyway !

@Fantomatic I will make it support the realm roles and groups first, then try to upgrade the version of Keycloak. This will need more time, but I will finish them as soon as possible.

@Fantomatic @devent Hi, I have already upgrade the Keycloak to 4.x and it's compatible with Keycloak 3.x. All of you can try the new version 0.3.0-SNAPSHOT.


Integration of models on the frontend and download music feature

In Nonstop Music (rated music button), the generated music isn't playing on the site. The contributor needs to ensure the generated music is properly sent to the site and starts playing. Additionally, there should be controls like pause, play, and options to skip forward by 10 seconds, download music etc.

We can make a GSoC project out of this issue. Seems large. :)

We can make a GSoC project out of this issue. Seems large. :)

Yes actually :sweat_smile: . It's a bit larger one compared to the others. might require some effort and programming experience with the frameworks used

In Nonstop Music (rated music button), the generated music isn't playing on the site. The contributor needs to ensure the generated music is properly sent to the site and starts playing. Additionally, there should be controls like pause, play, and options to skip forward by 10 seconds, download music etc.
i can work on this

Thanks for your interest @anuj846k but this project is slightly large compared to the previous ones. Our recommendation would be to complete the ones already assigned to you first.

We would assign this to you as soon as you solve the issues currently assigned to you.


Handle CSI u Input (aka fixterms)

It would be nice for Bubble Tea to support the "CSI u" Encoding Specification as outlined in Paul Evans' seminal work "Fix Keyboard Input on Terminals - Please".
References:

Wezterm
Kitty
Windows Terminal
iTerm2

Special thanks to @imsnif for the suggestion.

Yes please!

Closing this in favor of https://github.com/charmbracelet/bubbletea/issues/869 which is mostly compatible with fixterms.


SDPi Rev. 1.4.1 publication updates

Closes #470
📑 Description

Updates for the publication of Rev . 1.4.1 SDPi supplement

✅ Checks

[x] My pull request adheres to the code style of this project
[ ] My code requires changes to the documentation
[ ] I have updated the documentation as required
[ ] All the tests have passed
[x] I have selected a committee co-chair to review the PR

ℹ Additional Information

I merged as Todd Cooper reviewed and approved changes (but may not have proper access an an approved reviewer).


Proposal : make the keyword 'map' optional

I was not able to figure out some case where removing the 'map' keyword create ambiguity.
Go do not have 'slice' keyword to define slices, why we need 'map' ?
var m [string]Vertex

m = make([string]Vertex)

evaluations := [string]int{"Hatim": 20, "Alex": 18}

or even
m = make([string][float64]Time)

looks to me without ambiguity.
IMO, the syntax without 'map' looks :

unambiguous,
shorter,
more in harmony with the slice syntax ([]int vs [string]int vs map[string]int).

Duplicate of #36508

@changkun Not exactly, #36508 is to remove the keyword 'map', my proposal is to make it optional. The main argument to refuse #36508 is that this change is not backward compatible. But if the word 'map' becomes optional this will not break any code.
But thank you for pointing #36508, which I didn't know.

IMO, the syntax without 'map' looks unambiguous

But... it's not? There's an obvious ambiguity with the array declaration syntax. This has also been pointed out in #36508. And that's a big price to pay for the privilege of saving literally 3 characters when declaring a map type.

@ALTree it depends about what ambiguity we are talking. From the point of view of the compiler there is no one : [foo]type is an array if foo is an integer value, and it is a map if foo is a type. From point of view of the reader the example could be ambiguous, but in this case the problem is somewhere else : if the reader could not understand if foo is an integer or a type may be the code is not well written and the naming conventions are not good enough.
In any case we can use the optional map keyword and introduce an array optional keyword to use in case we want to produce more readable code. But in 99% of the cases, like [10]string or [string]int there is no possible ambiguity for the reader.
It looks to me strange to want to keep map but to accept [foo]string in place of array[foo]string as obvious. Are there some reasons to keep map and not to have array keyword ? I understand that if one of the two words is mandatory the other is useless, but why we should have this asymmetry in the conventions ?

With the introduction of custom generics, I would like to see converting the map keyword to a builtin identifier.

From the point of view of the compiler there is no one : [foo]type is an array if foo is an integer value, and it is a map if foo is a type.

Right now, the language is unambiguous when it comes to maps and arrays without type information. That is what the original thread was about.
Requiring type information to tell if a type expression is a map seems like a step in the wrong direction.

In any case we can use the optional map keyword and introduce an array optional keyword to use in case we want to produce more readable code.

Both of those changes would be language changes. Please note that you should fill https://github.com/golang/proposal/blob/master/go2-language-changes.md when proposing a language change.

This seems to increase reader confusion for minimal benefit.
Separately, making map optional would be unusual.  I can't think of any other Go construct that is optional.  In Go, we're generally happy if there is one way to do something.  We only add a second way if there is a clear benefit.  I'm not seeing the benefit here.

@kpym does
func f() [string]int
return a map or an array?

@davecheney [string]int is a map. Am I missing something, how [string]int could be an array ? And why we need func f() in this example to decide the type of [string]int ?

@ianlancetaylor Is var mandatory ? We can do
var a string
a = "initial"

or
var a = "initial"

or
a := "initial"

We can also discuss how mandatory is string in the previous example, or how mandatory is new in general, or many other cases where the construction is not unique.

@kpym

@davecheney [string]int is a map. Am I missing something, how [string]int could be an array ?

https://play.golang.org/p/1p6DNYj0Lbs
Without the map[ prefix the go parser would need a symbol table to know if string is a type declaration or a constant

@davecheney

https://play.golang.org/p/1p6DNYj0Lbs
Without the map[ prefix the go parser would need a symbol table to know if string is a type declaration or a constant

It looks like the compiler already knows that string is not a type in this case :
https://play.golang.org/p/ES0oBp3F3li
So in this particular case where string is an integer variable (and not a type any more) the compiler should consider [string]int as an array. One more time the ambiguity is not for the compiler but for the reader, and is not coming from the missing map  keyword but from the fact that a programmer has named an integer  variable string. And we can't do nothing against this strange behavior of the programmers ;)

@kpym as said before, then you're relying on the type system to realise if a type expression is a map or an array. That's a significant step backwards.
Also, a reminder that there's a form you should fill for language changes, which I linked above.

One more time the ambiguity is not for the compiler but for the reader

The ambiguity is for the parser.

@kpym

Is var mandatory ?

There are other ways to write variable declarations, but var is not optional in the sense that you are suggesting that map should be optional.  You can't write the exact same statement with or without var.
It's true that there are multiple ways to declare variables.  There are reasons for that.  As I said, we only add a second way if there is a clear benefit. I'm not seeing the benefit here.

For language change proposals, please fill out the template at https://go.googlesource.com/proposal/+/refs/heads/master/go2-language-changes.md .
When you are done, please reply to the issue with @gopherbot please remove label WaitingForInfo.
Thanks!

It seems that no one agrees with me on this subject.
Probably the best thing to do is to close it and not waste any more of everyone's time on this issue.
Sorry for this seemingly bad idea.
So, IMO, you can feel free to close this topic.
Thank you for considering my request.

If you're not going to fill the template linked above, I do agree that we should close this.


fix(ExecutionUnit): Use JSON.stringify to format log objects

@TristanWright  PTAL

LGTM, is there a log message that delivers just json?
Looks like this one is already stringified on the backend...

I added a few for debug and realized that "INFO: [object Object]" isn't very useful ...


Build(deps-dev): Bump @babel/core from 7.19.0 to 7.19.1 (#4052)

Pull request opened by the merge tool on behalf of #4052

Merged in e5ad7f04d327da88355685672843ccf05001ce39


crash at ios11

use WKWebview in iOS11, will crash at webView:decidePolicyForNavigationAction:decisionHandler method.
the crash reason:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Completion handler passed to -[WKWebViewJavascriptBridge webView:decidePolicyForNavigationAction:decisionHandler:] was called more than once'

The method on lssues does not solve the problem

Fixed in 6.0.3


You could make available a standalone winget command line client :)

https://github.com/microsoft/winget-cli#build-your-own

Is there even any reason to do so? Microsoft literally stole almost the whole source code of AppGet, renamed it to WinGet, and killed the original AppGet.


Issue 2000 - Upgrade EMR to 7.2.0

Make sure you have checked all steps below.
Issue

[x] My PR addresses the following issues and references them in the PR title. For example, "Issue 1234 - My Sleeper
PR"

Resolves https://github.com/gchq/sleeper/issues/2000

Tests

[ ] My PR adds the following tests OR does not need testing for this extremely good reason:

Covered by existing tests
Ran quick system test suite in AWS

Documentation

[x] In case of new functionality, my PR adds documentation that describes how to use it, or I have linked to a
separate issue for that below.

Bulk import on non-persistent EMR is failing on this branch currently. It passes on EMR Serverless, but on a non-persistent EMR on EC2 cluster we get this exception:
ERROR TaskResultGetter: Exception while getting task result
java.io.EOFException: null
  at org.apache.spark.serializer.KryoDeserializationStream.readObject(KryoSerializer.scala:331) ~[spark-core_2.12-3.5.1-amzn-0.jar:3.5.1-amzn-0]
  at org.apache.spark.serializer.SerializerHelper$.deserializeFromChunkedBuffer(SerializerHelper.scala:52) ~[spark-core_2.12-3.5.1-amzn-0.jar:3.5.1-amzn-0]
  at org.apache.spark.scheduler.DirectTaskResult.value(TaskResult.scala:108) ~[spark-core_2.12-3.5.1-amzn-0.jar:3.5.1-amzn-0]
  at org.apache.spark.scheduler.TaskResultGetter$$anon$3.$anonfun$run$1(TaskResultGetter.scala:84) ~[spark-core_2.12-3.5.1-amzn-0.jar:3.5.1-amzn-0]
  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23) [scala-library-2.12.17.jar:?]
  at org.apache.spark.util.Utils$.logUncaughtExceptions(Utils.scala:1971) [spark-core_2.12-3.5.1-amzn-0.jar:3.5.1-amzn-0]
  at org.apache.spark.scheduler.TaskResultGetter$$anon$3.run(TaskResultGetter.scala:72) [spark-core_2.12-3.5.1-amzn-0.jar:3.5.1-amzn-0]
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
  at java.lang.Thread.run(Thread.java:840) [?:?]

Looking at the source code of KryoDeserializationStream, it looks like Spark is swallowing the real exception from Kryo without logging it.


Another Temporary variable declared too late

Code
playground
class C {
foo(arg1, arg2) {
[arg1, arg2] = [arg2, arg1];
return arg1;
}
}
Expected behavior:
I would expect any temporary variable declaration to be inserted before use (in this case _a).
I would certainly not expect it after a return statement , giving unreachable code.
Actual behavior:
var C = (function () {
function C() {
}
C.prototype.foo = function (arg1, arg2) {
_a = [arg2, arg1], arg1 = _a[0], arg2 = _a[1];
return arg1;
var _a;
};
return C;
}());

playground

See #4138 and #7297.

Nearly duplicate of #7297.


avoid stray console log in code.

Though I check the diff changes before commit, I often miss a few console.log in the code. Maybe hygiene is a better place for doing this work.
This is my first time touching this hygine check so asking @joaomoreno for review.

[16:52:23] Error: Hygiene failed with 84 errors. Check 'build / gulpfile.hygiene.js'.

😆

LOL, they should be ignore.

Very cool 👍

why is this blocked

It could simply do something similar as the unicode filter that allows for a allow-any-unicode-next-line comment:
https://github.com/microsoft/vscode/blob/009db05ffbf0a3e506e533196e2e2c9941521a77/build/hygiene.js#L47-L54

)$ git clone https://git.kernel.org/pub/scm/git/git.git


Support for adding roles

It would be great to be able to create roles within a realm.

@sideisra Looking at the keycloak API, cant really see a way to add a role without the client. Haven't tried the API myself.
https://www.keycloak.org/docs-api/2.5/rest-api/index.html#_create_a_new_role_for_the_realm_or_client

In the API doc is a second "Create a new role for the realm or client": https://www.keycloak.org/docs-api/2.5/rest-api/index.html#_create_a_new_role_for_the_realm_or_client_2
This should create realm level roles.

okay great. I will give it a shot when i have some spare time. you are welcome to fork and raise a PR as well. This will require a new resource under provider and a corresponding API handler

It sounds to me like https://github.com/tazjin/terraform-provider-keycloak/pull/31 solves what you're looking for?


SQL non idempotent commands aren't transactional when use remote protocol [moved]

This is Issue 181 moved from a Google Code project.
Added by 2010-12-20T18:03:06.000Z by<EMAIL_ADDRESS>Please review that bug for more context and additional comments, but update this bug.
Original labels: Type-Defect, Priority-Low, v1.4.0
Original description
SQL operation like:
- Insert
- Update
- Delete

are non transactionals since they act at server side if you're using the remote protocol.

A solution to this issue could be supporting a new TX_FLUSH command, where the client flushes the TX to the server. Every time a new command is executed, the TX is flushed to the server.
We could also create a new setting to allow the client to flush to the server at regular basis avoiding to use too much memory on the client.
How to implement it?
Just get the first part of TX_COMMIT command

Assigned to @tglman

This fixes also https://github.com/orientechnologies/orientdb/issues/2875

Hi,
Implemented in 3.0, closing


Error: Cannot read property 'labels' of undefined

Describe the bug
Changelog enforcer is unable to run on pushes to main, but it still tries.
To Reproduce
If I want the other steps in my job to still run if somebody pushes to main, I might put something like this:
name: Pull Request Workflow
on:
  pull_request:
      types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
  push:
    branches:
      - main

Unfortunately changelog-enforcer fails with the error:
Error: Cannot read property 'labels' of undefined
Expected behavior
Likely fail because the CHANGELOG.md hasn't changed.
Workaround
Making changelog-enforcer conditional works around the issue:
- if: ${{ github.event_name == 'pull_request' }}
  uses: dangoslen/changelog-enforcer@v2
  with:
    changeLogPath: 'CHANGELOG.md'
    skipLabels: 'no changelog'

Hey @anmlnath! Thanks for reporting this.
I agree this is a bug. The enforcer is designed to run within the context of a pull_request event, but that isn't documented properly. Additionally, it should fail more gracefully if the event is something other than a pull_request.
I'll work on this in the upcoming week as best as I can.
Thanks again!


Allow org labels to be set with issue templates (#14593)

Backport #14593
Fix #13688
Signed-off-by: Andrew Thornton<EMAIL_ADDRESS>

:rocket:


librem: 1.0.0 -> 2.0.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/baresip/rem/releases.
meta.description for librem is: "A library for real-time audio and video processing"
meta.homepage for librem is: "https://github.com/baresip/rem"
meta.changelog for librem is: ""
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS

The tests defined in passthru.tests, if any, passed

0 of 0 passed binary check by having a zero exit code.

0 of 0 passed binary check by having the new version present in output.

found 2.0.0 with grep in /nix/store/1lzqnr6a3vpcscfa5wlkv3hri8ggy7r2-librem-2.0.0

found 2.0.0 in filename of file in /nix/store/1lzqnr6a3vpcscfa5wlkv3hri8ggy7r2-librem-2.0.0

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

2 package rebuild(s)

2 x86_64-linux rebuild(s)
0 x86_64-darwin rebuild(s)

First fifty rebuilds by attrpath
baresip
librem

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/1lzqnr6a3vpcscfa5wlkv3hri8ggy7r2-librem-2.0.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A librem https://github.com/r-ryantm/nixpkgs/archive/9f7eb367b6fa15cedca36b2cfc436d2b4ccd94d2.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/1lzqnr6a3vpcscfa5wlkv3hri8ggy7r2-librem-2.0.0
ls -la /nix/store/1lzqnr6a3vpcscfa5wlkv3hri8ggy7r2-librem-2.0.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package failed to build:

baresip

1 package built:

librem

Maintainer pings
cc @elohmeier @7c6f434c for testing.

Fixed by https://github.com/NixOS/nixpkgs/pull/188462


Manifest Error

When updating mods I get the following, I even tried uninstalling and reinstalling the mod but I still see this:

Duplicate of #40
You will need to reinstall the module using the foundry listing, or the following manifest url
https://dragonflagon.cafe/mods/man/df-scene-enhance

Thanks, sorry for the dup


Dataset for Embedding Model

Do you have a dataset for fine-tuning the embedding model? The data should be in the form of 'query', 'pos': [list of positive examples], 'neg': [list of hard negative examples].

You may refer to here: https://github.com/fairyshine/Seal-Tools/tree/master/DPR_Training

You may refer to here: https://github.com/fairyshine/Seal-Tools/tree/master/DPR_Training

do you think finetune cross encoder to rerank tool is ok? i tried but it didn't work

Yes, just follow the default settings.

Yes, just follow the default settings.
I have tried fine-tuning both the bi-encoder and cross-encoder for the tool retrieval task. The bi-encoder performed quite well, but the cross-encoder could not accomplish the task. I think the cross-encoder is not suitable for tool reranking tasks.

Yes, just follow the default settings.

I have tried fine-tuning both the bi-encoder and cross-encoder for the tool retrieval task. The bi-encoder performed quite well, but the cross-encoder could not accomplish the task. I think the cross-encoder is not suitable for tool reranking tasks.

I think https://github.com/facebookresearch/DPR use the bi-enocder in default setting?

I think https://github.com/facebookresearch/DPR use the bi-enocder in default setting?

I have fine-tuned a cross encoder, not following the script in that file, but the cross encoder is not effective in the tool selection task. I have only seen people fine-tune bi-encoders for tool retrieval and have not seen anyone fine-tune cross encoders for this task. I don't know the reason why. The cross encoder should be more powerful than the bi-encoder.


[Feature] 12

What's the feature?
How did you get the definition of the minimum area of the dataset mentioned in this article? For example, 12 is used in the text
Any other context?
No response

this threshold is defined in the dataset


HDDS-8897. Avoid synchronization on WritableECContainerProvider

What changes were proposed in this pull request?
Keep track of pending EC pipeline allocations in WritableECContainerProvider to avoid the need for synchronization.  Only force wait for over-the-limit requests.
https://issues.apache.org/jira/browse/HDDS-8897
How was this patch tested?
https://github.com/adoroszlai/hadoop-ozone/actions/runs/5342367241

@guohao-rosicky please check if this helps improve latency

We need to see a profile of the original code and the changed code to see exactly where the problem lies. There is synchronization inside pipeline and container manager too, so the changes here might not help much, as we are also not certain about where the problem is, as there are several synchronized blocks in the original code.

hi @adoroszlai
I am also following this issue, this lock contention will degrade the performance of allocate block, detailed report I have submitted to jira.
please see: https://issues.apache.org/jira/browse/HDDS-8897

@adoroszlai
I have an idea to asynchronously process the close pipeline and pre-creating the container, so that the lock time will be much shorter.
I now have a version of the initial implementation of the code, whether to submit a pr, according to the code we will discuss

@guohao-rosicky We really need to profile the code to see the hot spots before jumping into solutions. As it stands we don't know:

If the problem is too few pipelines - see my comment on the Jira about this.
Around pipelines creation time (which could be made worse by too few pipelines)
Selecting pipelines from the open set

If you could reproduce your test with the async profiler attached to SCM, it would be a great help. If it difficult to profile this in a simulation, as the need to open pipelines is driven by pipelines filling and closing, so it really needs a workload on a real cluster.


[Bug]: Tooltip shows up by hovering on border

Is there an existing issue for this?

[X] I have searched the existing issues

Description
Tooltip for Onsuccess & Onfailure shows up everywhere when hovered on border and not only when hovered over the property name.
https://loom.com/share/f2d7421a49cd4c8697917e78f6c94ebc
Steps To Reproduce

Add call back functions
Hover over the border

Public Sample App
No response
Environment
Deploy Preview
Issue video log
No response
Version
ce

available after dp refresh


Composite graph template

Add the composite graph endpoint template to the Composite folder of the Salesforce APIs collection

lgtm - thank you so much for putting this together.


Add support for co_await

Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
webassembly tests in filament exercising co_await
Describe alternatives you've considered
none
OS and backend
Clang now appears to support this for webassembly and everything else., HUGE feature that nobody is currently using.
https://blog.panicsoftware.com/your-first-coroutine/

Look at the seastar project for a good example of co_await, etc.

We are familiar with coroutines but can you explain why do you want Filament to use them? We do not expose STL APIs in our public APIs as we do not want to impose this dependency. Coroutines are also part of C++20 which we have not adopted in our code base at this point.

co_await is a compiler change, not something which depends on STL.  Think along the lines of having a coroutine scheduler which gets kicked from the renderloop.  Coroutines simplify async code enormously, especially when compared to chained callbacks.  Uses range from actors within a game to time-slicing procgen code within a game.

If clang/llvm-ir/webassembly currenlty support them, why not use them?

@romainguy ^^

I guess what I'm really speaking to is having a demo which shows they are available, along with a coroutine scheduler.  It's a screaming shame to have this stuff available "now", for webassembly, and nobody knows about it.

https://llvm.org/devmtg/2016-11/Slides/Nishanov-LLVMCoroutines.pdf

@romainguy see tests in clang for co_await, etc.
https://github.com/llvm-mirror/clang/search?q=co_await&unscoped_q=co_await

Due to all the exploits, cpu threading in the browser has experienced a setback.  Coroutines are a possible option for filling this hole.  For heavy numerical vector processing, I agree cpu threads are needed.  But most of the time people are simply using threads to handle blocking i/o, or manage async activity.  Coroutines can do the same thing.

@romainguy next time I'm in town, salad is on me!


[CON-1245] Add support for Intel reference PCCS

Changes

Fix bug that caused corrupted binary encoded CRLs/Certs.

Sorry to jump in here! This is all that was stopping us from supporting PCCS? Awesome!

Sorry to jump in here! This is all that was stopping us from supporting PCCS? Awesome!

Unfortunately not, there are differences in how some of the other collateral objects are structured. There's actually version number in the json that we should be switching on, but at the moment we're just ignoring it :man_shrugging:. So still a bit of work to do.

@shamsasari Two primary questions from me:

To get this to work, I had to adjust some code in QuoteVerifier.kt so that it would accept the v3 json. I'm pretty sure this is just a version check, but TCB_UNRECOGNIZED_STATUS isn't exactly a descriptive error message! PTAL at this change specifically.
In AttestationJsonTypes.kt, we still have epid ralted classes, not sure if those are still supposed to be there or not, so I've left them alone for now.

@JohnJoser3 Added to review the changes to dcap.md

@shamsasari Marked as draft temporarily to prevent merge. PTAL and let me know if you think it's ready.

Did you forget to push?

Sorry, can you update the PR description on the full set of changes. The fix to the JSON parsing is missing there.


Legion: Unable to find entry for index partition

Updating to the latest control_replication (af833c94b086) on Summit, I'm seeing this:
[2 - 20004c33f890]    9.102109 {5}{runtime}: [error 482] LEGION ERROR: Unable to find entry for index partition 18. This is definitely a runtime bug. (from file /gpfs/alpine/cmb103/scratch/seshuy/legion_s3d_nscbc_summit/legion/runtime/legion/region_tree.cc:4661)
Here is a stack trace:
[10] Thread 8 (Thread 0x20048104f890 (LWP 1709290)):
[10] #0  0x00002000009e9ca0 in waitpid () from /lib64/power9/libc.so.6
[10] #1  0x0000200000954340 in do_system () from /lib64/power9/libc.so.6
[10] #2  0x00002000008c8ec8 in system_compat () from /lib64/power9/libpthread.so.0
[10] #3  0x0000200007088420 in gasneti_system_redirected () from /gpfs/alpine/cmb103/scratch/seshuy/legion_s3d_nscbc_su
mmit/legion/language/build/lib/librealm.so.1
[10] #4  0x0000200007088b8c in gasneti_bt_gdb () from /gpfs/alpine/cmb103/scratch/seshuy/legion_s3d_nscbc_summit/legion
/language/build/lib/librealm.so.1
[10] #5  0x000020000708d9b4 in gasneti_print_backtrace () from /gpfs/alpine/cmb103/scratch/seshuy/legion_s3d_nscbc_summ
it/legion/language/build/lib/librealm.so.1
[10] #6  0x000020000708df7c in _gasneti_print_backtrace_ifenabled () from /gpfs/alpine/cmb103/scratch/seshuy/legion_s3d
_nscbc_summit/legion/language/build/lib/librealm.so.1
[10] #7  0x00002000060a3398 in gasneti_defaultSignalHandler () from /gpfs/alpine/cmb103/scratch/seshuy/legion_s3d_nscbc
_summit/legion/language/build/lib/librealm.so.1
[10] #8  <signal handler called>
[10] #9  0x0000200000943618 in raise () from /lib64/power9/libc.so.6
[10] #10 0x0000200000923a2c in abort () from /lib64/power9/libc.so.6
[10] #11 0x00002000049ec994 in Legion::Internal::Runtime::report_error_message (id=482, file_name=0x2000052896d0 "/gpfs/alpine/cmb103/scratch/seshuy/legion_s3d_nscbc_summit/legion/runtime/legion/region_tree.cc", line=4661, message=0x20048101fca8 "Unable to find entry for index partition 18. This is definitely a runtime bug.") at /gpfs/alpine/cmb103/scratch/seshuy/legion_s3d_nscbc_summit/legion/runtime/legion/runtime.cc:30991
[10] #12 0x0000200004857544 in Legion::Internal::RegionTreeForest::get_node (this=0x1f4f8250, part=..., defer=0x0, can_fail=false, first=true, local_only=false) at /gpfs/alpine/cmb103/scratch/seshuy/legion_s3d_nscbc_summit/legion/runtime/legion/region_tree.cc:4661
[10] #13 0x0000200004845100 in Legion::Internal::RegionTreeForest::is_index_partition_disjoint (this=0x1f4f8250, p=...) at /gpfs/alpine/cmb103/scratch/seshuy/legion_s3d_nscbc_summit/legion/runtime/legion/region_tree.cc:1344
[10] #14 0x00002000049b0238 in Legion::Internal::Runtime::is_index_partition_disjoint (this=0x1f530050, p=...) at /gpfs/alpine/cmb103/scratch/seshuy/legion_s3d_nscbc_summit/legion/runtime/legion/runtime.cc:18254
[10] #15 0x000020000436b7d0 in Legion::Runtime::is_index_partition_disjoint (this=0x1f4f8210, p=...) at /gpfs/alpine/cmb103/scratch/seshuy/legion_s3d_nscbc_summit/legion/runtime/legion/legion.cc:5421
[10] #16 0x000020000411ff70 in legion_index_partition_is_disjoint (runtime_=..., handle_=...) at /gpfs/alpine/cmb103/scratch/seshuy/legion_s3d_nscbc_summit/legion/runtime/legion/legion_c.cc:1687
[10] #17 0x0000200000bcee38 in $<main> () from /gpfs/alpine/cmb103/scratch/seshuy/legion_s3d_nscbc_summit/build/C1A2/libregent_tasks.so
[10] #18 0x0000200000bae7e8 in $__regent_task_main_primary () from /gpfs/alpine/cmb103/scratch/seshuy/legion_s3d_nscbc_summit/build/C1A2/libregent_tasks.so
[10] #19 0x00002000066d3e1c in Realm::LocalTaskProcessor::execute_task (this=0x20f9b230, func_id=4123, task_args=...) at /gpfs/alpine/cmb103/scratch/seshuy/legion_s3d_nscbc_summit/legion/runtime/realm/proc_impl.cc:1135
[10] #20 0x0000200006784508 in Realm::Task::execute_on_processor (this=0x20048806fc30, p=...) at /gpfs/alpine/cmb103/scratch/seshuy/legion_s3d_nscbc_summit/legion/runtime/realm/tasks.cc:302
[10] #21 0x00002000067895c8 in Realm::KernelThreadTaskScheduler::execute_task (this=0x20f9b550, task=0x20048806fc30) at /gpfs/alpine/cmb103/scratch/seshuy/legion_s3d_nscbc_summit/legion/runtime/realm/tasks.cc:1366
[10] #22 0x0000200006787ff0 in Realm::ThreadedTaskScheduler::scheduler_loop (this=0x20f9b550) at /gpfs/alpine/cmb103/scratch/seshuy/legion_s3d_nscbc_summit/legion/runtime/realm/tasks.cc:1105
[10] #23 0x00002000067886ec in Realm::ThreadedTaskScheduler::scheduler_loop_wlock (this=0x20f9b550) at /gpfs/alpine/cmb103/scratch/seshuy/legion_s3d_nscbc_summit/legion/runtime/realm/tasks.cc:1217
[10] #24 0x0000200006794e2c in Realm::Thread::thread_entry_wrapper<Realm::ThreadedTaskScheduler, &Realm::ThreadedTaskScheduler::scheduler_loop_wlock> (obj=0x20f9b550) at /gpfs/alpine/cmb103/scratch/seshuy/legion_s3d_nscbc_summit/legion/runtime/realm/threads.inl:97
[10] #25 0x00002000067a9bec in Realm::KernelThread::pthread_entry (data=0x1f595bc0) at /gpfs/alpine/cmb103/scratch/seshuy/legion_s3d_nscbc_summit/legion/runtime/realm/threads.cc:774
[10] #26 0x00002000008b8ae0 in start_thread () from /lib64/power9/libpthread.so.0
[10] #27 0x0000200000a2e7c8 in clone () from /lib64/power9/libc.so.6

@syamajala Are we sure this isn't a duplicate of #915 ?

S3D has used a fence for a while now in between creating a partition and when it first gets used by a projection functor. That has not changed recently in the application code.
This issue only seems to appear on Summit and on the new commit, going back to an older Legion commit (ffca5154) everything works. I was able to run on Blaze with the newer commit without any problems. There have been no application changes in between updating the versions of Legion.

This issue only seems to appear on Summit and on the new commit, going back to an older Legion commit (https://github.com/StanfordLegion/legion/commit/ffca51544500f3149169d4f0b59651b063f23e77)

Ok, can you bisect exactly which commit causes the failure?

I bisect on Summit and the first bad commit is https://github.com/StanfordLegion/legion/commit/be62515f19143779a53c4c1a6d679515c2196a14

@elliottslaughter I'm not sure it's safe to go full context-free right now with control replication.

What do you want to do?
This was a recent C API change, but the context-free C++ API had been around for a while. There could be C++ clients relying on it.
I could put in a context-ful C API, just to work around this in Regent. It will have some knock-on effects on Regent's analysis (which is why I wanted it context-free in the first place), but we could probably live with that in the short term. But are we going to get back to the context-free API eventually, or are expecting this to continue to be a problem?

It depends on what the group decides we're going to do about #915 which we've discussed in the last two Legion meetings. It's looking more and more like the context-free API is going to be deprecated in a lot of places (although not all). I don't see a way to support context-free in all the places it might be invoked and still be sound. I'm probably going to be willing to keep the context-free API intact, but it will become a fatal error if the runtime can't find an implicit context.

What about inside projection functors? I think that's the reason why I originally pushed the context-free version of this API. Also, it's not obvious to me what it means to issue a fence (or if this is even desirable) inside of a projection functor.

@syamajala can you try this workaround?
diff --git a/runtime/legion/legion_c.cc b/runtime/legion/legion_c.cc
index 3293a6052..b51fbe556 100644
--- a/runtime/legion/legion_c.cc
+++ b/runtime/legion/legion_c.cc
@@ -2275,10 +2275,12 @@ legion_logical_partition_create(legion_runtime_t runtime_,
                                 legion_index_partition_t handle_)
 {
   Runtime *runtime = CObjectWrapper::unwrap(runtime_);
+  assert(Runtime::has_context());
+  Context ctx = Runtime::get_context();
   LogicalRegion parent = CObjectWrapper::unwrap(parent_);
   IndexPartition handle = CObjectWrapper::unwrap(handle_);

-  LogicalPartition r = runtime->get_logical_partition(parent, handle);
+  LogicalPartition r = runtime->get_logical_partition(ctx, parent, handle);
   return CObjectWrapper::wrap(r);
 }

This patch works.

So I guess the question for @lightsighter is whether this is a solution we want to go with, at least long enough to be worth committing into the repo?

I looked at this code again, and I can't explain why it changes any functionality in the current implementation. I'm not convinced that it actually fixes the original problem. It might just be perturbing the timing.

I dont think this issue is relevant anymore.


Greek words with Punctuation are tokenized improperly.

This causes issues where alignments are not highlighted properly.

This has been tracked down to a content issue: https://git.door43.org/unfoldingWord/el-x-koine_ugnt/pulls/160


Swarm Listener is throwing "http: multiple response.WriteHeader calls" error.

https://github.com/vfarcic/docker-flow-proxy/pull/192#issuecomment-291524568
Issue to increase traceability of this problem. As soon I got some time I'll look into that I think I know where this problem comes from.

@s4s0l Did you have time to look into this one?

@s4s0l Please let me know if you'll be able to look into this issue. I'm having trouble to get on top of everything and probably won't have time for this issue myself.

I really have same thing @s4s0l @vfarcic :
<EMAIL_ADDRESS>  | 2017/05/31 20:04:12 http: multiple response.WriteHeader calls
<EMAIL_ADDRESS>  | 2017/05/31 20:04:12 http: multiple response.WriteHeader calls
<EMAIL_ADDRESS>  | 2017/05/31 20:05:56 http: multiple response.WriteHeader calls
<EMAIL_ADDRESS>  | 2017/05/31 20:05:56 http: multiple response.WriteHeader calls
<EMAIL_ADDRESS>  | 2017/05/31 20:11:53 http: multiple response.WriteHeader calls
<EMAIL_ADDRESS>  | 2017/05/31 20:11:56 http: multiple response.WriteHeader calls
<EMAIL_ADDRESS>  | 2017/05/31 20:12:45 http: multiple response.WriteHeader calls
<EMAIL_ADDRESS>  | 2017/05/31 20:12:45 http: multiple response.WriteHeader calls
<EMAIL_ADDRESS>  | 2017/05/31 20:59:12 http: multiple response.WriteHeader calls
<EMAIL_ADDRESS>  | 2017/05/31 20:59:12 http: multiple response.WriteHeader calls
<EMAIL_ADDRESS>  | 2017/05/31 21:00:01 http: multiple response.WriteHeader calls
<EMAIL_ADDRESS>  | 2017/05/31 21:00:01 http: multiple response.WriteHeader calls
<EMAIL_ADDRESS>  | 2017/06/01 14:45:23 http: multiple response.WriteHeader calls
<EMAIL_ADDRESS>  | 2017/06/01 14:45:23 http: multiple response.WriteHeader calls

What it's mean?

@alexsandro-xpt It does not affect how the service works. It's just a very ugly log entry that should be removed mostly for cosmetic reasons.

This was fixed in one of the previous "cleanup" commits. Feel free to reopen if you notice that the issue still persists.


Fix markdown link to relative path #trivial

New Pull Request Checklist

[x] I have read and understood the CONTRIBUTING guide

[x] I have read the Documentation

[x] I have searched for a similar pull request in the project and found none

[x] I have updated this branch with the latest master to avoid conflicts (via merge from master or rebase)

[x] I have added the required tests to prove the fix/feature I am adding

[x] I have updated the documentation (if necessary)

[x] I have run the tests and they pass

[x] I have run the lint and it passes (pod lib lint)

This merge request fixes / refers to the following issues: ...
Pull Request Description
Just update the raw link to relative link to display markdown document.

/run_checks


Use concurrent DispatchQueue

Allows multiple read operations to happen in parallel. Write operations stay thread-safe with barrier flags.

Great idea, thank you so much for the PR! I'm dumb pushed something up without checking PRs, is there any way you could incorporate the new changes into this PR then I'm happy to merge it?
Also, more of a question than anything, what's the advantage/point of capturing self explicitly in the barrier blocks?

Actually I gave a quick swing at bringing in the changes (I now understand why you use [self], haha), and upon trying to compile it under Swift 6 there's a bunch of @Sendable that I'm not sure how to fix so I might have to defer to someone who knows more about Sendable integration

@christianselig got branch? I can take a swing. Semi. unrelated, is there a reason everything is in one file, would be nice to break things out.

@kylebrowning I mostly just took the code from this PR that created the concurrent queue and changed the write calls to async barriers, should be pretty quick! It was mostly around UserDefaults in the migrate function and the optional any Codable in the bulkStore function
For one file, good question! Just felt like a single file utility mostly, my appetite starts to wane when it gets closer to the 1000 line mark. How were you thinking of splitting it up?

Another suggested code change I have to solve the other Swift 6 error would be to make TinyStorageBulkStoreItem and its value property conform to Sendable
public struct TinyStorageBulkStoreItem: Sendable {
    let key: any TinyStorageKey
    let value: any Codable & Sendable

    public init(key: any TinyStorageKey, value: any Codable & Sendable) {
        self.key = key
        self.value = value
    }
}

@bradwindy I nixed TinyStorageBulkStoreItem recently so maybe that helps?

JM2c: I am targeting iOS18 and swift language level 5.
It might be easy enough to just build with these settings and adopt Swift 6 as a next step?

JM2c: I am targeting iOS18 and swift language level 5.
It might be easy enough to just build with these settings and adopt Swift 6 as a next step?

With Swift 6 now being the "standard", I'd prefer to keep the library as in-step with it as possible if that makes sense :(

Instead of having the compiler not check the whole class for Sendable errors in Swift 6, I modified it so only the dictionaryRepresentation and source don't get checked while everything else still does


feat: add scripts to seed database

Related to #1066
In order to be able to create the GUI, I need a lot of data in the database. The issue is that I don't want to run 1 000 000 tasks locally on my computer and some data like partitions or applications can't be easily created.
So I decided to write MongoDB scripts to seed database using fake data. This PR is the first one and allows us to set up the frame to create more scripts (to add sessions, applications, tasks...) (currently, only partitions can be generated).

[x] Documentation

TODOs comments will be solved later. This is not the purpose of this PR

@lemaitre-aneo I've this issue when trying to connect to MongoNetworkError: getaddrinfo ENOTFOUND mongodb-1.armonik (like if the DNS could not resolve the name).

Tu n'es pas dans le reseau de kubernetes quand tu fais ton docker run. Il faudrait essayer avec l'IP. Il faut aussi que le service soit en ClusterIP

Mais je lui donne une ip à manger mais quand il se met à chercher le primary dans le cluster, il retourne un nom à résoudre. Et tu parles de quel service ?

@aneojgurhem I don't know if we can mount a Kubernetes volume in docker but anyway. This script is for dev only and I think that trying every IP is not an issue. I do not find a better solution in the minimal amount of time.


Adopt Swift 6.0 #isolation; Resolves async closure behavior in withSpan

Motivation:
This has been a problem for a long time, where we could not safely non sendable actor state from withSpan because the closure would "hop off". Now with #isolation we can handle it properly in Swift 6.0
Modifications:
Adopt #isolation parameter in all with... APIs with async closures.
Result:
Usages like this will not warn nor produce errors anymore:
actor Foo {
    var bar = 0

    func foo() async {
        var num = 0
         await withSpan(#function) { _ in
            // await self.withSpanWorkaround(#function) { _ in
            self.bar += 1
            await work()
            num += 1
        }
    }
}

resolves rdar://113848512

I kept "old" API around but made it deprecated and disfavored in 6.0+.
I'll merge but if anyone has any concerns let me know and we'll follow up

Thanks @porglezomp lemme check this


Reimplement username/password passing to XMLRPC calls

Supervisord XMLRPC should be protected by basic auth, and the page needs to pass these credentials on now that the initial version is working without auth

1e647aea40766a4f9810ed91251b93e7c1703436


Container override

Clone container with adding/replacement of providers

It's a big question how we can keep decorators and aliases working

The proposed API is to create top level container from existing one by passing additional providers
new_container = container.with_providers(provider)

this should rebuild container of same type (e.g. call make_container) from scratch using same settings and only adding more providers


hott-1489 Add the new action "chapters" on v2/sections_controller

What?
Add the new action chapter on v2/sections_controller and support for CSV and JSON responses.
Jira link
https://transformuk.atlassian.net/browse/HOTT-1489

I've made the refactor using a different controller,  which is great.
All right, the only thing is that the stared example does not work, so I had to write a small custom test.
Let's catch up tomorrow.


MKL fix for mac

macOS linker does not support --{start,end}-group
The IntelMKL link line advisor also does not suggest these options when macOS is selected.

@wavefunction91 This PR is tested on an Intel MAC. MKL is obviously not supported on the new M1,M2 (Arm) macs. Should we just throw an error if a MAC is detected preventing MKL discovery completely  or allow discovery for intel based macs (maybe by checking the processor) ?

Since GNU ld is not supported for macOS, the default linker on macOS is used regardless of the compiler (am using brew installed gcc-12 in this case for testing). Added a check to detect arm64 and report error.

Adding a FATAL_ERROR on arm64 would bring down the whole application - I'd just have it "try" to search for MKL, fail, and move on with its day. We could add an early exit condition if we're really concerned about MKL existing on ARM environments, but a failed check isn't a large overhead

Changed it to a warning.


[5.10] Bump swift-syntax version in the macro template

We use the "-latest" signifier to avoid confusion here, but basically this means we'll use any "-prerelease" tags and also the final release once it is out.
(cherry picked from commit db00c3e1947aeb9c1906ee6330fb587eda940f02)

@swift-ci please test


Internal Server Error: /json/get_old_messages

I've installed Zulip on Ubuntu 14.04, configured it. It ran perfectly until I rebooted the server (to configure network interfaces).
When I login into Zulip it shows me 500 error. I've tried to login several times and finally got into it, but old messages are not loaded and I'm unable to open stream's topics.
In django.log I'm seeing this:
2015-11-27 03:07:15,211 INFO     <IP_ADDRESS>      POST    500  3.0s /json/get_old_messages (unauth via website)
2015-11-27 03:07:18,213 ERROR    Internal Server Error: /json/get_old_messages
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 223, in get_response
    response = middleware_method(request, response)
  File "/home/zulip/deployments/2015-11-20-16-06-11/zerver/middleware.py", line 250, in process_response
    error_content=content, error_content_iter=content_iter)
  File "/home/zulip/deployments/2015-11-20-16-06-11/zerver/middleware.py", line 189, in write_log_line
    queue_json_publish("slow_queries", "%s (%s)" % (logger_timing, email), lambda e: None)
  File "/home/zulip/deployments/2015-11-20-16-06-11/zerver/lib/queue.py", line 259, in queue_json_publish
    get_queue_client().json_publish(queue_name, event)
  File "/home/zulip/deployments/2015-11-20-16-06-11/zerver/lib/queue.py", line 240, in get_queue_client
    queue_client = SimpleQueueClient()
  File "/home/zulip/deployments/2015-11-20-16-06-11/zerver/lib/queue.py", line 25, in __init__
    self._connect()
  File "/home/zulip/deployments/2015-11-20-16-06-11/zerver/lib/queue.py", line 29, in _connect
    self.connection = pika.BlockingConnection(self._get_parameters())
  File "/usr/lib/python2.7/dist-packages/pika/adapters/blocking_connection.py", line 107, in __init__
    super(BlockingConnection, self).__init__(parameters, None, False)
  File "/usr/lib/python2.7/dist-packages/pika/adapters/base_connection.py", line 62, in __init__
    on_close_callback)
  File "/usr/lib/python2.7/dist-packages/pika/connection.py", line 590, in __init__
    self.connect()
  File "/usr/lib/python2.7/dist-packages/pika/adapters/blocking_connection.py", line 206, in connect
    if not self._adapter_connect():
  File "/usr/lib/python2.7/dist-packages/pika/adapters/blocking_connection.py", line 283, in _adapter_connect
    self.process_data_events()
  File "/usr/lib/python2.7/dist-packages/pika/adapters/blocking_connection.py", line 218, in process_data_events
    raise exceptions.ConnectionClosed()
ConnectionClosed

Services statuses:
# supervisorctl status
process-fts-updates              RUNNING    pid 1350, uptime 0:19:17
zulip-django                     RUNNING    pid 1348, uptime 0:19:17
zulip-senders:zulip-events-message_sender-0 RUNNING    pid 13028, uptime 0:00:06
zulip-senders:zulip-events-message_sender-1 RUNNING    pid 13031, uptime 0:00:06
zulip-senders:zulip-events-message_sender-2 RUNNING    pid 13047, uptime 0:00:04
zulip-senders:zulip-events-message_sender-3 RUNNING    pid 13038, uptime 0:00:05
zulip-senders:zulip-events-message_sender-4 RUNNING    pid 13032, uptime 0:00:06
zulip-tornado                    RUNNING    pid 1349, uptime 0:19:17
zulip-workers:zulip-deliver-enqueued-emails RUNNING    pid 1361, uptime 0:19:16
zulip-workers:zulip-events-confirmation-emails RUNNING    pid 13043, uptime 0:00:05
zulip-workers:zulip-events-digest_emails RUNNING    pid 13037, uptime 0:00:05
zulip-workers:zulip-events-email_mirror RUNNING    pid 13035, uptime 0:00:05
zulip-workers:zulip-events-error_reports RUNNING    pid 13033, uptime 0:00:06
zulip-workers:zulip-events-feedback_messages RUNNING    pid 13034, uptime 0:00:05
zulip-workers:zulip-events-missedmessage_mobile_notifications RUNNING    pid 13036, uptime 0:00:05
zulip-workers:zulip-events-missedmessage_reminders RUNNING    pid 13045, uptime 0:00:04
zulip-workers:zulip-events-signups RUNNING    pid 13042, uptime 0:00:05
zulip-workers:zulip-events-slowqueries RUNNING    pid 13052, uptime 0:00:03
zulip-workers:zulip-events-user-activity RUNNING    pid 13044, uptime 0:00:05
zulip-workers:zulip-events-user-activity-interval RUNNING    pid 13039, uptime 0:00:05
zulip-workers:zulip-events-user-presence RUNNING    pid 13041, uptime 0:00:05

# service rabbitmq-server status
Status of node rabbit@chat ...
[{pid,1199},
 {running_applications,[{rabbit,"RabbitMQ","3.2.4"},
                        {os_mon,"CPO  CXC 138 46","2.2.14"},
                        {xmerl,"XML parser","1.3.5"},
                        {mnesia,"MNESIA  CXC 138 12","4.11"},
                        {sasl,"SASL  CXC 138 11","2.3.4"},
                        {stdlib,"ERTS  CXC 138 10","1.19.4"},
                        {kernel,"ERTS  CXC 138 10","2.16.4"}]},
 {os,{unix,linux}},
 {erlang_version,"Erlang R16B03 (erts-5.10.4) [source] [64-bit] [async-threads:30] [kernel-poll:true]\n"},
 {memory,[{total,34921664},
          {connection_procs,64960},
          {queue_procs,5264},
          {plugins,0},
          {other_proc,13460136},
          {mnesia,57248},
          {mgmt_db,0},
          {msg_index,30568},
          {other_ets,739208},
          {binary,8936},
          {code,16522377},
          {atom,594537},
          {other_system,3438430}]},
 {vm_memory_high_watermark,0.4},
 {vm_memory_limit,1262129971},
 {disk_free_limit,50000000},
 {disk_free,491823104},
 {file_descriptors,[{total_limit,924},
                    {total_used,5},
                    {sockets_limit,829},
                    {sockets_used,3}]},
 {processes,[{limit,1048576},{used,129}]},
 {run_queue,0},
 {uptime,1188}]
...done.
# service postgresql  status
9.3/main (port 5432): online
# service nginx  status
 * nginx is running
# service redis-server  status
redis-server is running
# service memcached  status
 * memcached is running
# service  status

DNS:
# cat /etc/zulip/settings.py | grep EXTERNAL_HOST
EXTERNAL_HOST = 'chat.example.com'
# cat /etc/hosts
<IP_ADDRESS>       localhost chat.example.com      chat
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
# ping chat.example.com
PING localhost (<IP_ADDRESS>) 56(84) bytes of data.
64 bytes from localhost (<IP_ADDRESS>): icmp_seq=1 ttl=64 time=0.036 ms

Try running scripts/setup/configure-rabbitmq and then restarting the server?
the traceback is an error with Django trying to connect to rabbitmq using the python-pika library...

@timabbott
I've tried this (I even reinstalled rabbitmq from scratch) several times, no luck at all.
I can try to do it one more time after some timeout though, it could be heisenbug.

@timabbott
I've tried this one more time (I reinstalled rabbitmq, reconfigured it and restarted server) and got it work.
I certainly heisenbug, I see similar reports: #76, #314.
I propose to add a tip how to fix those errors (see #342).

Yeah this rabbitmq issue definitely needs coverage in the documentation at the very least; ideally we'd get a clear reproducer for it so that we can fix it but until then we should document it...

I've also encountered this problem. In my case, restarting the rabbitmq service via service rabbitmq-server restart solved the problem. Is there another ticket I should be following for a resolution to this issue?

Posting a comment on #342 is probably a reasonable approach for making sure we document the restart piece of things.
@asmartin when are you seeing this problem happen.  E.g. are you using containers/docker or some other environment where you're shutting down the service and starting it back up again?

I saw this problem after restarting the VM where I'm running Zulip
On Dec 14, 2015 12:59 PM, "Tim Abbott"<EMAIL_ADDRESS>wrote:

Posting a comment on #342 https://github.com/zulip/zulip/pull/342 is
probably a reasonable approach for making sure we document the restart
piece of things.
@asmartin https://github.com/asmartin when are you seeing this problem
happen. E.g. are you using containers/docker or some other environment
where you're shutting down the service and starting it back up again?
—
Reply to this email directly or view it on GitHub
https://github.com/zulip/zulip/issues/337#issuecomment-164526083.


Fixes the regex to allow for dashes in usernames.

Currently the - in the below regex doesn't actually work. It needs to be escaped to register.
Also submitted a PR here. Confused as to which one to send the PR to...

Well, I am guessing with all those changes, the first place I submitted was correct...


Identify forum for sharing design review guidance across CSE

Team will share guidance regarding design reviews within the playbook GitHub project.


Mergable version of oc-161 branch

Added new Technical Chapter oc-161, changed severals pages as described in ox-162, restructure domain oc-163, added feedback from Sander J

All is well.

All is well.

Looks good to me!

All is well.

All is well.

All is well.

All is well.


Update Swift SDK RFC with PR number

adds PR number to the rfc and changes the file name to include PR number

@danintel That change is already made in the second commit


Memory leak

We've been using sharp for a little while now and have been very happy with everything. Thanks for all of the hard work you've put into this library 😁. Recently, we've switched over from using sharp on an aws lambda function to using it on one of our nodejs servers. Alongside this change, we've noticed a quite significant increase in memory usage. I suspect that this was likely a preexisting problem in our lambda given that the lambda instances get disposed of when not in use.
These are some analytics from an EC2 instance that I set up for load testing. This instance would have seen no traffic during the times recorded in the analytics (I forgot to destroy it when I finished testing 😅):

After scouring the libvips' documentation, I found some notes on the libvips' cache and a stackoverflow page where others seemed to be struggling with a similar issue. I tried to disable the cache using sharp.cache(false) and manage concurrency with sharp.concurrency(1), but this had no effect.
I also tried a slew of other environment variables that libvips provides for configuration:
VIPS_DISC_THRESHOLD=512m # a setting that we have previously used on our lambda
VIPS_LEAK=true
VIPS_CONCURRENCY=1

None of these seemed to work either. As of right now, I'm out of ideas. I found another interesting bit in libvips' docs:
If a source does not support mmap or seek and the source is used with a loader that can only work from memory, then the data will be automatically read into memory to EOF before the loader starts. This can produce high memory use if the descriptor represents a large object.

Use vips_pipe_read_limit_set() to limit the size of object that will be read in this way. The default is 1GB.

Set a value of -1 to mean no limit.

See also: --vips-pipe-read-limit and the environment variable VIPS_PIPE_READ_LIMIT.

I suspect that this wouldn't contribute to a memory leak, just high memory usage. Perhaps it's worth considering?
This is a simplified version of our code that utilizes sharp:
const sharp = require('sharp');

sharp.cache(false);
sharp.concurrency(1);

function streamImage(req, res, next) {
  const { id, renderOptions, shouldRenderOriginal } = res.locals;

  return fetchStream(id)
    .then((stream) => shouldRenderOriginal
        ? stream.pipe(res)
        : stream.pipe(transformWithSharp(renderOptions)).pipe(res);
    )
    .catch((e) => handleError(e));
}

function transformWithSharp(options) {
  const pipeline = sharp({
    sequentialRead: true
  });

  if (options.shouldCrop) {
    const extractOptions = { left: options.x, top: options.y };

    if (options.cropHeight) extractOptions.height = options.cropHeight;
    if (options.cropWidth) extractOptions.width = options.cropWidth;

    pipeline.extract(extractOptions).resize(options.width, options.height, { fit: 'inside' });
  }

  if (options.padding) {
    pipeline.extend({
      background: options.color.background,
      bottom: options.padding.vertical,
      left: options.padding.horizontal,
      right: options.padding.horizontal,
      top: options.padding.vertical
    });
  }

  if (!options.optimize) pipeline.withMetadata();

  pipeline.rotate(); // * ensure iphone images aren't rotated

  return pipeline;
}

I would be supremely grateful for any help. Thank you 🙏

The solution detailed in #955 worked perfectly. It has actually worked so well that we were able to use a concurrency of 4 while keeping memory usage around 400mb on each of our instances. We are still experimenting with what precise configuration is best for our needs, but are optimistic that sharp will perform very well.
For anyone coming here looking for answers: the issue is not a memory leak, its memory fragmentation. This isn't a bug with the library, but rather this comes with the territory of multithreading. Using a different memory allocator could help dramatically reduce the memory fragmentation. We used @lovell 's suggested allocator jemalloc which worked spectacularly. If using an allocator like jemalloc isn't cutting it, setting the concurrency to 1 (or something less than the default) should help.
Go to #955 or https://sharp.pixelplumbing.com/install#linux-memory-allocator for details.


Refresh get started with enterprise trail

Use include for steps to set a license key, shared
with the enterprise faq.
Add link to Cockroach University.

Fixes #5934

This change is


Update README.md

Added short paragraph that clears up the confusion discussed in issue #43
This helps beginners (like me) to understand what steps needs to be done to properly configure the container.

@PavelVanecek, thanks man. This is great. One request, do you mind mind changing the base branch in your PR to develop?

Since the target branch cannot be changed using Github UI (see https://github.com/isaacs/github/issues/18), I will create a new PR once I get to my computer (it's being repaired atm).

see https://github.com/pblittle/docker-logstash/pull/84


Bug: Camera entity not support requesting width and height

Starting (?) on core-2021.9 , Camera entity not support requesting width and height
Expected behavior
It would be expectable to:
camera images can now be scaled to a resolution that fits the device/screen you are looking at; Additionally, they only update when visible. This makes cameras usable in any bandwidth situation.
Log
Just warnings, asking to contact the author of integration
WARNING (MainThread) [homeassistant.components.camera] The camera entity camera.tvcam_sd does not support requesting width and height, please open an issue with the integration author

Device Model:  C200

Using stream component
Yes

Is this still happening on https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/releases/tag/3.4.1?

It's working fine. I'm embarrassed for not to fully test previously.
I can only say you are great !

No worries, I asked you to create issue before it was fixed and then fixed it a bit later when I had time!


Blocked a frame with origin "https://assets.zendesk.com"

Due to same-origin policy, in some cases the following error appears:
Blocked a frame with origin "https://assets.zendesk.com" from accessing a frame with origin "https://example.com". Protocols, domains, and ports must match

However, this cannot be reproduced permanently and seems not to be a critical failure.
Did you experience this error? Is there any workaround?

I've seen a lot of weird errors inside the zendesk code itself, which rarely reproduce nicely.
I think I've seen this before, but I've never looked into it in more depth so far.


Open a pull request

[skip ci]

[retest this please]
Note: This comment is for Jenkins CI build. No action required from the author.


Headache, not issue : Opacity is 0 due to class name collision.

Confirmed that dom nodes are present and correct at end of body, but opacity gets stuck at 0.
Issue is class-name collision with another very popular templating package that uses tooltip class generously.

Use of generic class names like "tooltip" when users employ templates
or scss/sass from imported packages causes collisions.
The classnames for this should be vtooltip- or better.

Temporary fix: (based on code from another related issue):
    .tooltip[aria-hidden="false"] {
        opacity: 1;
        transition: .2s ease all;
    }

Yeah I have planned to change the default classes in the next Major release (it would be a breaking change).

In the meantime you can also change the class used in the default template: https://github.com/Akryum/v-tooltip#global-options


PDF generated cannot be opened

Hi I've sponsored StackEdit to enable the Export to PDF function. However, the PDF generated a "Failed to load PDF document" error when opened in Chrome.
What's the issue?

Anything about this issue? I have it also. Please!

Please open a new ticket if the problem still exists in the v5 and share a markdown sample to reproduce it.


How to commit new feature and create pull request?

I have implemented a feature to configure additional scopes for OAuth2 and OIDC over configuration. Currently only “email” and “profile” are requested. I would like to commit my changes and create a pull request. Currently I’m not able to push my code to new branch. What is the workflow to do so?
BR Tobi

The process would be:

Fork the chipstack repository
Push your local branch with changes to your own chirpstack fork
Then through the GitHub web-interface you can create a pull-request

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request


Using face-api.js in userscript

Hello o'_'o,
I'm writing an userscript aimed at recognizing somebody's face and blocking it.
Nonetheless, when the scripts trying to load models storing in my server, it failed due to CORS or Content Security Policy, etc.
As a consequence, how can I load the models properly and successfully?
Thanks! >///<

Hey,
I've gave it up and found another way: write an extension, which eventually works!
Sorry if I bother you


Implement creation of custom token

Implement functionality in Rust: CustomToken creates a signed custom authentication token with the specified user ID.
See Go reference code:
<EMAIL_ADDRESS>

I think this is out of scope right now since that functionality is actually:

Part of Firebase Auth, not Firestore - this crate is designed to work with Firestore databases, not complete Firebase;
Firebase token generator is a legacy functionality, so you need to migrate to service accounts anyway;

In case you want to generate a token yourself  the crate supports custom JSON tokens via:
FirestoreDb::with_options_token_source where you can specify any possible JWT token with TokenSourceType::Json.
Let me know if you have a specific case where this is somehow required for Firestore and FirestoreDb::with_options_token_source can't be used.

I will provide some more context and hopefully that will be helpful.  We have client applications using the Firebase client libraries to generate auth tokens for each user and the client applications are invoking our Rust backend http services and sending the Firebase auth tokens in the header of the request.  We have custom Rust code that is responsible for validating the bearer auth token.  I modeled this Rust verification code from this Go code: https://github.com/firebase/firebase-admin-go/blob/master/auth/token_verifier.go#L156  If you know of a similar Rust implementation that is already written, please let me know.
I have unit tests for the validation function and the unit tests need to accept a JWT auth token that matches what would be created by the Firebase client libraries.  In Go, this is done by using the Client.CustomToken function but I don't see a similar way to create a token in Rust which prompted me to create this issue.

Thanks for the details. Let me contemplate on this a bit. I think this probably will need to update Google Cloud SDK first, since it is not flexible enough right now to provide the required token.

Thank you. I have some example Go code I am using along with some Rust validation code that I can provide if needed.
It would be a nice to have if the Rust crate also had an implementation to verify the bearer auth token. I can share my implementation for reference if you want.

I made some draft implementation here https://github.com/abdolence/firestore-rs/pull/152 so you can provide your own token source (or static token value if you want).
Can you check it with your implementation, please?
Left an example:

examples/token_auth.rs

Can you check it with your tokens?
PS In case you're not aware, you can point your code directly at my feature branch on github:
https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories

I pulled in the feature branch and I am having a bit of trouble because the function generate_for_scopes was removed.  For reference, this is the function I am attempting to convert:
/// Create a bearer token to be used with all Auth requests
pub async fn generate_auth_token(
    token_source_type: TokenSourceType,
    token_scopes: Option<Vec<String>>,
) -> Result<Token, AuthError> {
    Token::generate_for_scopes(
        token_source_type,
        token_scopes.unwrap_or(GCP_DEFAULT_SCOPES.to_owned()),
    )
    .await
    .map_err(|e| AuthError::GoogleError(e.to_string()))
}

Also in my code, TokenSourceType was used in a struct that derived Clone and now that is a compile error because TokenSourceType is not cloneable.

Ok, let me return those :) I didn't know that they actually used by anyone.

I am going through the Rust example and it is requiring TOKEN_VALUE which I am unsure how to provide.  I also still don't know if this will create the token that I need.  For reference, below is the Go code.  The value that I am wanting Rust to create is the raw token.
package main

import (
	"bytes"
	"context"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"log"
	"net/http"
	"time"

	firebase "firebase.google.com/go/v4"
	"github.com/dgrijalva/jwt-go"
	"google.golang.org/api/option"
)

func main() {
	customToken, err := createTokenCustom()
	if err != nil {
		log.Fatalf("error creating custom token: %v\n", err)
		return
	}
	fmt.Printf("custom token: %s\n", customToken)
	tokenID, err := getTokenId(customToken)
	if err != nil {
		log.Fatalf("error creating id token: %v\n", err)
		return
	}
	err = printToken(tokenID.IdToken)
	if err != nil {
		log.Fatalf("error printing custom token: %v\n", err)
		return
	}
	fmt.Printf("unix time: %v\n", time.Now().Unix())
}

func createTokenCustom() (string, error) {
	opt := option.WithCredentialsFile("XXXX-firebase.json")
	config := &firebase.Config{ProjectID: "XXXX-PROJECT_ID"}
	app, err := firebase.NewApp(context.Background(), config, opt)
	if err != nil {
		return "", err
	}
	client, err := app.Auth(context.Background())
	if err != nil {
		return "", err
	}
	uid := "XXXX-USER_UID"
	customToken, err := client.CustomToken(context.Background(), uid)
	if err != nil {
		return "", err
	}
	return customToken, nil
}

type SignInRequest struct {
	Token             string `json:"token"`
	ReturnSecureToken bool   `json:"returnSecureToken"`
}
type SignInResponse struct {
	IdToken      string `json:"idToken"`
	RefreshToken string `json:"refreshToken"`
	ExpiresIn    string `json:"expiresIn"`
}

func getTokenId(customToken string) (*SignInResponse, error) {
	url := "https://identitytoolkit.googleapis.com/v1/accounts:signInWithCustomToken?key=XXX-CUSTOM_KEY"

	data := SignInRequest{
		Token:             customToken,
		ReturnSecureToken: true,
	}

	payloadBuf := new(bytes.Buffer)
	json.NewEncoder(payloadBuf).Encode(data)

	req, _ := http.NewRequest("POST", url, payloadBuf)

	req.Header.Add("Content-Type", "application/json")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		log.Fatalf("An Error Occured %v", err)
	}

	body, _ := io.ReadAll(res.Body)
	var signInResponse SignInResponse
	err = json.Unmarshal(body, &signInResponse)
	if err != nil {
		return nil, err
	}

	return &signInResponse, nil
}

func printToken(tokenString string) error {
	fmt.Printf("raw token: %s\n", tokenString)

	token, _, err := new(jwt.Parser).ParseUnverified(tokenString, jwt.MapClaims{})
	if err != nil {
		return err
	}

	header := token.Header
	for k, v := range header {
		fmt.Printf("header - %v : %v\n", k, v)
	}

	claims, ok := token.Claims.(jwt.MapClaims)
	if !ok {
		return errors.New("Can't parse token claims")
	}

	for k, v := range claims {
		fmt.Printf("claim - %v : %v\n", k, v)
	}
	return nil
}

signInWithCustomToken is a part of Identitytoolkit v1, which is not provided as gRPC and I think it is not available as Open API spec either.
I remember I did an investigation a while ago: https://github.com/abdolence/gcloud-sdk-rs/issues/84
So, the only option right now just to use REST client (of course PR's are welcome).

Also in my code, TokenSourceType was used in a struct that derived Clone and now that is a compile error because TokenSourceType is not cloneable.

Unfortunately, this can't be cloneable anymore since it accepts Box<> which is not cloneable, so if you will need to fix that part of the code on your side.

I understand regarding signInWithCustomToken  Can the library  at least create the custom token value and then I will make a REST API call to perform the signInWithCustomToken functionality?

I've returned back generate_for_scopes in gcloud sdk v0.24.1, so please remove/update your lock file.

Can the library at least create the custom token value

Looking at your links, this part is inside Firebase/Auth-related libraries (outside of Firestore).
Looking at the official documentation though https://firebase.google.com/docs/auth/admin/create-custom-tokens#create_custom_tokens_using_a_third-party_jwt_library
it seems you can create a JWT token yourself by taking some JWT crate for Rust. It looks fairly straightforward.

Thank you for returning the generate_for_scopes function.
Referring to the link, that does look relatively straight-forward and I can do that in my library or would you want to add that functionality into either firestore-rs or gcloud-sdk?

It is probably closer to gcloud-sdk. Someone already tried to implement something similar before:
https://github.com/abdolence/gcloud-sdk-rs/issues/76
Also if you are able to provide some kind of implementation of some of the functions for Identitytoolkit v1 would be beneficial for others I think :)

I understand.  I don't know if I have the time or experience to do a proper implementation of the IdentityToolkit v1. I really wish Google would just provide a properly supported Gcloud SDK for Rust similar to AWS Rust SDK.
Regarding the related PR, my code compiles so you can merge the PR.  You might want to update the gcloud-sdk version to 0.24.1.

I agree, I would prefer not to support Google SDKs myself indeed.
Regarding Identity toolkit, just to be clear, I just suggested separating it into a new module available for others so people can add missing functions themselves in one place. There is no need to create full functional since we don't have Open API spec available or protobufs.

Could you please provide some clarity for me on the tokens generated by Token::generate_for_scopes vs the custom tokens detailed here: https://firebase.google.com/docs/auth/admin/create-custom-tokens#create_custom_tokens_using_a_third-party_jwt_library

For reference for anyone who reads this issue later, below is working Rust code to generate signed Firebase tokens:
use jsonwebtoken::{encode, EncodingKey, Header};
use reqwest::header::CONTENT_TYPE;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use std::fs;
use std::time::{SystemTime, UNIX_EPOCH};

#[derive(Debug, Serialize, Deserialize)]
pub struct CustomToken {
    iss: String,
    aud: String,
    exp: i64,
    iat: i64,
    sub: Option<String>,
    uid: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    tenant_id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    claims: Option<HashMap<String, serde_json::Value>>,
}

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
    // Logging with debug enabled
    let subscriber = tracing_subscriber::fmt()
        .with_env_filter("firestore=debug")
        .finish();
    tracing::subscriber::set_global_default(subscriber)?;

    let firebase_json = read_firebase_json_from_file("./src/XXX-service-key.json")?;
    let uid = "XXX-userid";
    let custom_token = custom_token_with_claims(
        uid,
        &firebase_json.client_email,
        &firebase_json.private_key,
        None,
    )
    .await?;
    println!("custom_token: {}", custom_token);
    print_jwt_token(&custom_token)?;

    let id_token = get_token_id(custom_token).await?;
    println!("id_token: {}", id_token.id_token);
    print_jwt_token(&id_token.id_token)?;

    Ok(())
}
pub async fn custom_token_with_claims(
    uid: &str,
    svc_email: &str,
    rsa_key: &str,
    dev_claims: Option<HashMap<String, serde_json::Value>>,
) -> Result<String, Box<dyn std::error::Error + Send + Sync>> {
    let iss = svc_email.to_string();

    if uid.is_empty() || uid.len() > 128 {
        return Err("uid must be non-empty, and not longer than 128 characters".into());
    }

    let reserved_claims = vec![
        "acr",
        "amr",
        "at_hash",
        "aud",
        "auth_time",
        "azp",
        "cnf",
        "c_hash",
        "exp",
        "firebase",
        "iat",
        "iss",
        "jti",
        "nbf",
        "nonce",
        "sub",
    ];
    let mut disallowed = vec![];

    if let Some(claims) = &dev_claims {
        for k in reserved_claims {
            if claims.contains_key(k) {
                disallowed.push(k.to_string());
            }
        }
    }

    match disallowed.len() {
        1 => {
            return Err(format!(
                "developer claim {} is reserved and cannot be specified",
                disallowed[0]
            )
            .into());
        }
        len if len > 1 => {
            return Err(format!(
                "developer claims {} are reserved and cannot be specified",
                disallowed.join(", ")
            )
            .into());
        }
        _ => {}
    }

    let now = SystemTime::now().duration_since(UNIX_EPOCH)?.as_secs() as i64;

    let token = CustomToken {
        iss: iss.clone(),
        sub: Some(iss.clone()),
        aud: "https://identitytoolkit.googleapis.com/google.identity.identitytoolkit.v1.IdentityToolkit".to_string(),
        uid: Some(uid.to_string()),
        iat: now,
        exp: now + 3600, // one hour in seconds
        tenant_id: None,
        //tenant_id: ctx.tenant_id.clone(),
        claims: dev_claims,
    };

    let header = Header::new(jsonwebtoken::Algorithm::RS256);
    let key = EncodingKey::from_rsa_pem(rsa_key.as_bytes())?;
    let token_str = encode(&header, &token, &key)?;

    Ok(token_str)
}

#[derive(Serialize, Deserialize, Debug)]
pub struct FirebaseJson {
    r#type: String,
    project_id: String,
    private_key_id: String,
    private_key: String,
    client_email: String,
}
pub fn read_firebase_json_from_file(
    path: &str,
) -> Result<FirebaseJson, Box<dyn std::error::Error + Send + Sync>> {
    let file_content = fs::read_to_string(path)?;
    let ret: FirebaseJson = serde_json::from_str(&file_content)?;
    Ok(ret)
}

#[derive(Serialize)]
struct SignInRequest {
    token: String,
    #[serde(rename = "returnSecureToken")]
    return_secure_token: bool,
}

#[derive(Deserialize)]
struct SignInResponse {
    #[serde(rename = "idToken")]
    id_token: String,
    #[serde(rename = "refreshToken")]
    refresh_token: String,
    #[serde(rename = "expiresIn")]
    expires_in: String,
}

async fn get_token_id(
    custom_token: String,
) -> Result<SignInResponse, Box<dyn std::error::Error + Send + Sync>> {
    let url = "https://identitytoolkit.googleapis.com/v1/accounts:signInWithCustomToken?key=XXX-key";
    let client = reqwest::Client::new();

    let data = SignInRequest {
        token: custom_token,
        return_secure_token: true,
    };

    let res = client
        .post(url)
        .header(CONTENT_TYPE, "application/json")
        .json(&data)
        .send()
        .await?;

    if res.status().is_success() {
        let sign_in_response: SignInResponse = res.json().await?;
        Ok(sign_in_response)
    } else {
        let body = res.text().await?;
        Err(body.into())
    }
}

fn print_jwt_token(token_string: &str) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
    let header = jsonwebtoken::decode_header(token_string)?;

    println!("header: {:?}", header);

    let mut validation = jsonwebtoken::Validation::new(jsonwebtoken::Algorithm::HS256);
    validation.insecure_disable_signature_validation();
    validation.validate_aud = false;
    validation.validate_exp = false;

    let token_data = jsonwebtoken::decode::<serde_json::Value>(
        token_string,
        &jsonwebtoken::DecodingKey::from_secret("secret".as_ref()),
        &validation,
    )?;

    println!("claims: {:?}", token_data.claims);

    Ok(())
}

Can you go ahead and merge in the external-token-support branch so that it will update the gcloud-sdk version?

Could you please provide some clarity for me on the tokens generated by Token::generate_for_scopes

Token::generate_for_scopes is basically a few lines wrapper that relies on Token Source implementation so it won't help with this at all. This is why I was surprised to see it is used outside of the crate.
Glad to see that you have a working version now 👍🏻
I have merged the branch already, I will release it later this week.

Let me know if you still have any issues or additional questions. Closing this for now.


Move selector naming to the descriptor

Currently two selector names are hard-coded in DOM.java.
"<this_element>" and "Accessibility Properties". With this commit
descriptors are able to themselves choose what the selector name should
be and how their various properties should be distributed among the
selectors.
This enables an element to have styles such as:
layout {
  width: 100px;
  height: 100px;
}

props {
  text: "Hello World";
}

Due to this requiring an added property in StyleAccumulator I chose to
also take this commit to split up styles from computed styles which are
two separate concepts but up until now have been handled the same. A
style may be width: 100% while a computed style would be width: 320px.

Addressed most comments (still iterating keySet()) and fixed some bugs in my implementation which I somehow did not catch last time I was testing this.

ok looks good. builds locally, and don't really want to wait for Travis-CI


Build benchmarks during CI/CD

This adds configs to build benchmarks when running CI/CD, allowing to check for any breaking changes in the new PRs that can break the benchmark code.
Depends on:

https://github.com/NVIDIA/spark-rapids-jni/pull/2196.

Closes https://github.com/NVIDIA/spark-rapids-jni/issues/2195.

build


Introduce stacked filtering

This introduces a mutable IsCallable and thus fixes some issues making utility and proxy dangerous to use together.
Also introduces as_limited_sub which is exactly like as_sub except that the sub-calls are restricted by the same filter that applies to the caller (as before). This might find use if you want to create an account with several stash or governance sub-accounts, and a single proxy for it that can only be used for these functions (rather than needing multiple proxies, one for each sub account).
This also repots Utility pallet's multisig functionality into its own pallet, Multisig, thereby making Utility stateless.
In summary:

proxy[only_utility](batch(transfer(...))) now results in error.
proxy[only_utility](multisig(transfer(...))) still succeeds.
proxy[only_utility](as_sub(transfer(...))) still succeeds.
proxy[only_utility](as_limited_sub(transfer(...))) results in error.
proxy(batch(add_proxy(<more_permissive>))) now results in error.

TODO:

[x] Test for proxying
[x] Tests fot impl_filter_stack!
[x] Extract IsCallable & the call stack functionality into something re-usable
[x] Migration Utility/multisig -> Multisig

NOTE: This will be retired once we have in-origin filtering, which should be ready in the NTD future.
Polkadot companion: https://github.com/paritytech/polkadot/pull/1212

This seems added a lot more context that are required to know in order to code securely. I hope they are documented throughly.

Let me know if there's something specific that needs explaining.

When do we need to call FilterStackGuard and ClearFilterGuard?
Seems like FilterStackGuard is needed before granting additional permission and ClearFilterGuard is needed before dispatch calls with different origin?
This seems like a way to prevent reentrancy attack, but it is not easy to wrap my head around with all the indirections (proxy, multisign, sub account call, batch call, governance call?, and calls from contracts).

There's no clear-cut way of knowing when to call them as it depends entirely on the semantics of your dispatcher.
Basically, the FilterStack paradigm allows you to alter a static Filter by pushing one or more filters onto it and temporarily clearing it. The real runtime filter stacks are implemented by a macro that supplements this model with a base-filter which always gets applied.
The reason for this is:

Base filter is used to disable signed calls to certain modules throughout the codebase.
The push/pop stack allows proxy module to restrict inner dispatches; we can't just filter the immediate inner Call because it could be a re-caller such as batch, into which the restrictions should persist.
The temporary clearing is needed to allow for inner calls to multisig or proxy which, as newly authorised dispatch origins, need not inherit the restrictions of their caller (though we want to ensure that when they return to the caller context, the restrictions are back in place).
as_sub is an example where it's unclear whether any call restrictions should persist. As is documented, both are quie reasonable and have their use-cases. For this, we have split it into two calls as_sub (restrictions do not persist into the inner) and as_limited_sub (restrictions do persist).


revealItem not working on newly added element

In my view I have a table displaying users from a users array, which is binded to data.bind: users; display-data.bind: $displayData; like this. It all works fine. On this page, I also have a modal to add a new user. The new user gets added to the users array and to a local json server (for now). If I then try to do revealItem on this added user, the functions returns false. What do I need to do for the plugin to see this change in data?

I believe I know what is going on. If you add the element and immediately ask to reveal it, the reveal method will not find the element in the list, it is a timing issue.
I have started some work to internally use  promises to avoid this kind of issues, but it is not ready yet.
On the meantime, you can wait a little bit after adding the new item to call the function to reveal the item. I know it is not pretty, but it should get the job done.

Putting it in a timeout did the trick indeed, it works now. Looking forward to the promises for a cleaner solution.  Thanks for the quick reply! Good job on the plugin.


Use uintptr_t instead of uint64_t to represent address

In the current MmapArena, uint64_t is used to represent an
"address", which is a bit obscure. Especially when used in map, it is
difficult to distinguish whether it represents a "length" or an
"address" (pointer).
To improve readability, uintptr_t is used instead of uint64_t when
representing an "address" (pointer).
   std::map<uint64_t, uint64_t> freeList_;
   std::map<uint64_t, std::unordered_set<uint64_t>> freeLookup_;

V.S.
   std::map<uintptr_t, uint64_t> freeList_;
   std::map<uint64_t, std::unordered_set<uintptr_t>> freeLookup_;

@lingbin The documentation says intptr_t is optional. Will this have portability implications? https://en.cppreference.com/w/cpp/types/integer

@majetideepak Thank you for pointing this out. I'm really not sure if it will affect portability, but I have a feeling it won't. And I believe that "GCC" and "Clang" must already support uintptr_t.
And in fact, intptr_t and uintptr_t are already used in many places in the Velox. So, if this was a problem, it would have been discovered long ago.
https://github.com/search?q=repo%3Afacebookincubator%2Fvelox intptr_t&type=code

@mbasmanova  Could you please help to take a look? Thanks.

@lingbin Getting "Diff Is Old or Base Revision Is Old" error. Would you rebase?

@mbasmanova Already rebased, thanks for the review


ExcludeAppControlTypes Documentation Error

This may or may not be an issue. In trying out the sample code in the documentation for the share options, I get the following error:
"Cannot implicitly convert type Plugin.Share.Abstractions.ShareUIActivityType[] to Plugin.Share.Abstractions.ShareAppControlType"
My code is
CrossShare.Current.Share(new ShareOptions
{
ChooserTitle = "Share Blog",
ExcludedAppControlTypes = new [] { ShareUIActivityType.PostToFacebook}
});

Correct you would need to set : ExcludedUIActivityTypes  not ExcludedAppControlTypes

Ah, I must have let it auto-enter too early. Thanks!


[dart-migration] un-migrate files from null-safety?

How do I un-migrate files from null-safety? When I was migrating my flutter project, I unchecked the test directory where I kept my tests (test), but the migration web page must have been reloaded and the checkmark was back on when I applied the migration.
Flutter_driver is not migrated yet, so I'm getting messages like this one:
{

"resource": "/Users/asdasd/appsauuad/test_driver/features/common/date_header_page.dart",
"owner": "dart",
"code": "import_of_legacy_library_into_null_safe",
"severity": 2,
"message": "The library 'package:flutter_driver/flutter_driver.dart' is legacy, and should not be imported into a null safe library.\nTry migrating the imported library.",
"source": "dart",
"startLineNumber": 1,
"startColumn": 8,
"endLineNumber": 1,
"endColumn": 52,
"tags": []
}

Dart SDK version: 2.12.2 (stable) (Wed Mar 17 10:30:20 2021 +0100) on "macos_x64"
Flutter 2.0.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 4d7946a68d (7 days ago) • 2021-03-18 17:24:33 -0700
Engine • revision 3459eb2436
Tools • Dart 2.12.2

The easiest approach would normally be to check the old version of the files out from source control.
For git that would be something like git checkout pre-migration-branch test/.
You'll then have to go through the reverted files and manually add a<EMAIL_ADDRESS>marker to each Dart file that is not migrated.

thank you @lrhn