Laravel Sanctum Auth 403

Hello I'm trying to login to a channel with laravel echo.
I use Sanctum, I get 403 as the request response. Why do you think it might be?
var echo = new Echo({
  broadcaster: "socket.io",
  host: "localhost:6001",
  client: io,
  auth: {
    endpoint: '/broadcasting/auth',
    headers: {
      Authorization: "Bearer " + key,
      Referer: window.location.hostname,
    },
  },
});

Response;
Status | 403
 {
"message": "",
"exception": "Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException",
"file": "/var/www/torrentvideo/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php",
"line": 81,
"trace": [
{
"file": "/var/www/torrentvideo/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php",
"line": 69,
"function": "verifyUserCanAccessChannel",
"class": "Illuminate\Broadcasting\Broadcasters\Broadcaster",
"type": "->"
},
...

I realized that the cause of the problem is that I cannot see the channels originating from the api prefix I have changed. If you overwrite the web route with the api route, you need to define your channels under the api route.


Implement event batching in the miniframework

Introduce a new way of passing information from acquire to produce:

add a template type parameter to the EDProducerExternalWork base class, and make it available to inherited classes as AsyncState;
acquire should use an AsyncState object hold all the information that needs to be passed to produce: acquire returns an AsyncState object that is later passed to produce; it is also marked as  const method to guarantee that the information is not passed through some internal state;
produce takes an extra AsyncState parameter to receive the state information from acquire;
if a Producer does not need to pass any state from acquire to produce it can use a void or empty template parameter; in this case acquire returns void and produce does not take any new parameters (as before); acquire is still marked as const.

This change is propaedeutic to the event batching support, but can be reviewed and adopted independently of it.
Add a doneWaiting overload that does not take an exception pointer argument
This is just a simplification for the cases where doneWaiting(...) was being called with an empty exception pointer.
This change is independent from event batching support, and can be reviewed and adopted independently of it
Implement basic support for event batching, trying to have minimal impact on the existing modules:

the Source is responsible for reading (up to) N events at a time;
the Events are stored in an EventBatch and passed to each Worker as an EventRange (for produce()) or ConstEventRange (for acquire); the (Const)EventRange class allows (const) iteration and a (const) range-loop over the events, without any possibility of adding/dropping events;
the Worker passes the events to the various EDProducer-like base classes in the same way;
the existing EDProducer and EDProducerExternalWork base classes loop over the events in the range, and call acquire and produce one event at a time; modules that derive from them can be used without any changes;
introduce two new EDBatchingProducer and EDBatchingProducerExternalWork base classes that pass the range of Events to the module's acquire and produce methods; the module's implementation can then loop over the events, process them in parallel, etc.

The framework tests have been reorganised and extended to test all four EDProdcer-like base classes:

EDProducer;
EDProducerExternalWork;
EDBatchingProducer;
EDBatchingProducerExternalWork.

Notes
About edm::EventRange and edm::ConstEventRange
The current edm::EventRange implementation is suitable only for the case where all modules will process all events; once the possibility of filtering events or to re-aggregate the ranges are considered, a different implementation will be needed.
The interface can mostly stay unchanged, but these objects might better be passed by reference rather than by value.
Alternative approach for acquire()
Instead of acquire returning a new AsyncState object by value (relying on return value optimisation), the AsyncState object could be default-constructed by the EDProducerExternalWork base class and passed to acquire by AsyncState &.
This would make the interface closer to that of produce() - but adds the requirement that AsyncState be default-constructible.

Alternative approach for acquire()
Instead of acquire returning a new AsyncState object by value (relying on return value optimisation), the AsyncState object could be default-constructed by the EDProducerExternalWork base class and passed to acquire by AsyncState &.
This would make the interface closer to that of produce() - but adds the requirement that AsyncState be default-constructible.

Alternative approach for produce()
The AsyncState object could be passed to produce by AsyncState & rather than AsyncState &&.
This should make it easier tu support types that are not movable and/or copyable.

OK, this looks usable now.
The next step will be to try and make the CUDA implementation use it ...

The next step will be to try and make the CUDA implementation use it ...

It will take me some time to digest this. Organizationally I'd prefer if this version of fwtest would be made as a separate program (it's kind of a branching point), because I'm expecting eventually to have a multiple attempts of batching while it could be useful to have many/all of them around. I'll anyway go though this PR as it is.

Organizationally I'd prefer if this version of fwtest would be made as a separate program

Sure. Making the PR on top of the existing fwtest makes it easier to see all the changes, but if/when we decide to merge it it can go in a different directory.

I'm now looking how to apply this to the cuda code base.
The first problem I ran into is that the AsyncState I need to define for some external work producers is not copyable or movable, because it includes a cms::cuda::ContextState.
Just to show how much I didn't know about c++:

even when return value optimisation is mandated by the standard, a non-deleted move or copy constructir is still required
std::vector<T>::resize() and std::vector<T>::reserve() require that T is copyable or movable (I don't know why)

So I'm using a third approach:

the AsyncStates are held in a std::unique_ptr<AsyncSytate[]> or std::optional<AsyncState>
they are recreated for every event or batch of events
they are passed by AsyncState & both to acquire() and produce()
they are reset after each event or batch of events

With this approach the only requirement on AsyncState is that it can be default constructed; I think this should be fine, since using a data member to hold some state between acquire() and produce() probably has the same requirement - and if some type does not satisfy it, it can always be wrapped in a unique_ptr ...

The implementation above incurs a huge performance penalty, because the AsyncState variables are now constructed and destructed for every event.
This avoids it:
diff --git a/src/cuda/Framework/EDProducer.h b/src/cuda/Framework/EDProducer.h
index 17e7e1be1bdb..76e39e93bf62 100644
--- a/src/cuda/Framework/EDProducer.h
+++ b/src/cuda/Framework/EDProducer.h
@@ -38,27 +38,25 @@ namespace edm {
     bool hasAcquire() const { return true; }

     void doAcquire(Event const& event, EventSetup const& eventSetup, WaitingTaskWithArenaHolder holder) {
-      state_.reset();
-      state_.emplace();
-      acquire(event, eventSetup, std::move(holder), *state_);
+      acquire(event, eventSetup, std::move(holder), state_);
     }

     void doProduce(Event& event, EventSetup const& eventSetup) {
-      produce(event, eventSetup, *state_);
-      state_.reset();
+      produce(event, eventSetup, state_);
     }

     virtual void acquire(Event const& event,
                          EventSetup const& eventSetup,
                          WaitingTaskWithArenaHolder holder,
                          AsyncState& state) const = 0;
+
     virtual void produce(Event& event, EventSetup const& eventSetup, AsyncState& state) = 0;

     void doEndJob() { endJob(); }
     virtual void endJob() {}

   private:
-    std::optional<AsyncState> state_;
+    AsyncState state_;
   };

   template <>

but I'm not sure that's a good approach ?

The previous implementation incurred in a huge performance penalty, because the AsyncState variables were now constructed and destructed for every event.

Interesting. The AsyncState variables are essentially bunch of smart pointers and numbers (and one map<unsigned, vector<SiPixelRawDataError>>), is their construction and destruction really that expensive? (I'm probably missing something)

The first problem I ran into is that the AsyncState I need to define for some external work producers is not copyable or movable, because it includes a cms::cuda::ContextState.

For prototyping purposes I think making cms::cuda::ContextState e.g. movable is perfectly fine. The only reason for denying moving is to catch unintended usage early.

The previous implementation incurred in a huge performance penalty, because the AsyncState variables were now constructed and destructed for every event.

Interesting. The AsyncState variables are essentially bunch of smart pointers and numbers (and one map<unsigned, vector<SiPixelRawDataError>>), is their construction and destruction really that expensive? (I'm probably missing something)

I was surprised as well, and digging into the cause I found it to be SiPixelRawToClusterCUDA that needs to pass a pixelgpudetails::SiPixelRawToClusterGPUKernel::WordFedAppender from acquire() to produce().
WordFedAppender has two cms::cuda::host::noncached::unique_ptr<unsigned int[]> and cms::cuda::host::noncached::unique_ptr<unsigned char[]> data members, so re-creating it for every event becomes prohibitely expensive.
I guess we could find a workaround - but avoiding constructing and destructing AsyncState on every event seemed the simplest solution.

I was surprised as well, and digging into the cause I found it to be SiPixelRawToClusterCUDA that needs to pass a pixelgpudetails::SiPixelRawToClusterGPUKernel::WordFedAppender from acquire() to produce().
WordFedAppender has two cms::cuda::host::noncached::unique_ptr<unsigned int[]> and cms::cuda::host::noncached::unique_ptr<unsigned char[]> data members, so re-creating it for every event becomes prohibitely expensive.

Ah, WordFedAppender, missed that. Right, that one has been intended to be "allocate once per stream and re-use". On the other hand, it would also be straightforward to change it (back) to use the caching allocator given the tiny impact of cudaHostAllocWriteCombined. Counter-OTOH, it could also be useful to keep it around as it is to have a use case for a stream-object that should not be constructed for each event.

Just to repeat here what I mentioned in the core sw meeting today. I think an object that should live longer than "from acquire() to produce()" (e.g. WordFedAppender currently) should be stored as a stream module's member variable (or in StreamCache of a global module).
And I think I finally realized the issue with that (within this PR)

EDProducerExternalWork<T> calls first the acquire() for all events in the batch, and only then the produce() for all events in the batch
EDBatchingProducerExternalWork<T> calls the acquire() once for the full batch, and then the produce() for the full batch

Therefore EDBatchingProducerExternalWork<T> can use the stream member variable/cache to pass something from acquire() to produce(), because it has to deal with the batching explicitly anyway. But EDProducerExternalWork<T> can not, because the values written in acquire() call of the first event of the batch would be overwritten by the call of second event of the batch etc. And that would effectively necessitate the concept of "event cache" in addition to "stream cache", because a stream would no longer be a stream of events but a stream of event batches, even if we would solve https://github.com/cms-sw/cmssw/issues/24186.
Would it be fair to say that the AsyncState in this PR is effectively such an "event cache"?

Would it be fair to say that the AsyncState in this PR is effectively such an "event cache"?

Even if that is not the goal of the interface, in practice yes, because it is available (and mutable) in both acquire() and produce() - which are the only event processing methods.

Given that this batching approach needs an "event cache" in any case, how important do you think a separate mechanism to pass data from acquire() to produce() (https://github.com/cms-sw/cmssw/issues/24186) would be?

I have the feeling that an "event cache" and a "pass data from acquire to produce" mechanism could be to some extent orthogonal:

if we have acquire-to-produce, most existing ExternalWork modules would not need an event cache to support batching
even without ExternalWork, modules may need some kind of event cache to support batching - be it something done explicitly by the module or provided by the framework

If we introduce an event cache, and if the interface for the event cache and the acquire-to-produce data would be the same (i.e. additional template parameter, additional parameter passed to acquire and produce) then of course having both at the same tie would only add complexity.


[Bug 🐞]: AMP opens on every return to KSC

Brief description of your issue (aka the problem)
Every time I return to KSC the AMP window opens.
Tested in heavily modded game as well as in a clean install of 1.12.5 with both expansions.
Happens on return from VAB/SHP/flight (did not test tracking station).
Happens in career and sandbox (did not test science mode).
Log from clean install session attached.
KSP.log
Operating system
Windows 11
KSP version
1.12.5
Version of addon
Version <IP_ADDRESS>-prerelease
Steps to reproduce the behavior or issue

Start new Career or Sandbox game
Open VAB/SPH or launch a ship
Return to KSC
AMP panel pops up
close AMP panel
return to step 2

Expected behavior
Once closed, AMP panel should remain closed on further visits to KSC until opened again.
Actual behavior
No response
Environment
see [KSP.log](https://github.com/zer0Kerbal/AdjustableModPanel/files/10913671/KSP.log)

Log files
see above log attachment
Screenshots
No response
Additional context
No response
How did you download and install this?
manual install

Also - update the hard coded code links to be based upon the location of the actual plugin (.dll) rather than hard coded url; re: Epic Games version has a different folder structure than steam/tt/squad.


Component Library DevOps: Package Setup, GitHub Actions, Deploy Target

What
Add the component library to the monorepo and include the basic packages we'll be using (Radix, Stitches).
Todo

Create the components package in our monorepo with the @haus/components namespace
Add Radix and Stitches as dependencies
Add any GitHub Actions or deploy targets we know right now (this also may be down the road and would apply to Storybook)
Note: We can hold off on adding Storybook until our Rage experiments are complete for https://github.com/HausDAO/daohaus-rage/issues/26 and https://github.com/HausDAO/daohaus-rage/issues/22

Resources

Radix UI
Stitches

Has this been split into other issues?

This issue is now redundant with other issues in the Backlog


Clusterroles not found for kube-scheduler

Description
We have clusterrolebindings for kube-scheduler but no cluster roles created for them. This throw error
clusterrole.rbac.authorization.k8s.io "restricted-psp" not found, clusterrole.rbac.authorization.k8s.io "system:basic-user" not found, clusterrole.rbac.authorization.k8s.io "system:discovery" not found, clusterrole.rbac.authorization.k8s.io "system:public-info-viewer" not found, clusterrole.rbac.authorization.k8s.io "system:kube-scheduler" not found, clusterrole.rbac.authorization.k8s.io "system:volume-scheduler" not found, clusterrole.rbac.authorization.k8s.io "privileged-psp" not found

Environment and steps to reproduce

Run a single node cluster
Check logs for kube-scheduler, kubectl logs kube-scheduler-845bddddfd-db9j4 -f

Expected behavior
No errors.
Additional information

@knrt10 where did you see the error:
clusterrole.rbac.authorization.k8s.io "restricted-psp" not found,
clusterrole.rbac.authorization.k8s.io "system:basic-user" not found,
clusterrole.rbac.authorization.k8s.io "system:discovery" not found,
clusterrole.rbac.authorization.k8s.io "system:public-info-viewer" not found,
clusterrole.rbac.authorization.k8s.io "system:kube-scheduler" not found,
clusterrole.rbac.authorization.k8s.io "system:volume-scheduler" not found,
clusterrole.rbac.authorization.k8s.io "privileged-psp" not found

when I ran logs for kube-scheduler

The only errors I am seeing in my cluster are https://gist.github.com/surajssd/6845f354d944ea264ff0cb89692bd359
Above was generated by running k logs kube-scheduler-845bddddfd-khshb | grep ^E | gh gist create -.

Can you grep for authentication.go:294?

@knrt10
$ k logs kube-scheduler-845bddddfd-khshb | grep 'authentication.go:294'
W1207 09:16:25.466682       1 authentication.go:294] Error looking up in-cluster authentication configuration: configmaps "extension-apiserver-authentication" is forbidden: User "system:serviceaccount:kube-system:kube-scheduler" cannot get resource "configmaps" in API group "" in the namespace "kube-system"

I am creating a cluster again, let's see if I get the error. If yes, I will setup gangway for you to confirm. If not, I will close this issue. Cool?

Not able to reproduce, so closing this


load.sh failing issue

Fix provided for issue reported #1

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.chandrumani seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Provide access keys used for a SSL connection

I would like to use a ssl protected db with my application, which is deployed on Zeit Now. I am not sure how to get my p12 and my .pem file into the serverless function though.
I fount this issue: https://github.com/zeit/now/issues/749 , but I think it's not possible that way, since we can't combine env vars

Hi @BjoernRave,
Right now this is not possible as we allow some SSL only to be a file path. I went ahead and opened the spec issue to change the behaviour: https://github.com/prisma/specs/issues/428
After that, you should be able to generate a large connection string that can have the contents of the files in it.
If you don't want a large connection string, you can pass one to the client directly like so:
const prisma = new PrismaClient({
  datasources: {
    db: `postgres://${process.env.USERNAME}:${process.env.PASSWORD}@somehost/mydb`
  }
});

But, I also went ahead and created a specs issue for templating support: https://github.com/prisma/specs/issues/429
So you will need to wait while we work on the above-mentioned things.

Just posting here to bump this back up the priority level.
This was quite a pain to hack around and will be a problem for almost anyone needing to use Prisma in production with a serverless environment.
I am using CloudSQL with SSL from Google Cloud for my database and Vercel (like OP) for my deployment provider. This is how I hacked around it for now:
I store both the server-ca.pem and client-identity.p12 in ENV variables (this gets tricky with the .p12 file and requires some base64 encoding) and then before the Prisma client is initialised I write them to the /tmp folder which is available to vercel deployments:
import { tmpdir } from 'os'
import fs from 'fs'

    fs.writeFile(
      `${tmpdir()}/server-ca.pem`,
      process.env.CLIENT_CERTIFICATE,
      err => {
        if (err) return console.log(err)
      }
    )

  fs.writeFile(
      `${tmpdir()}/client-identity.p12`,
      process.env.CLIENT_IDENTITY,
      //important to re-encode it correctly
      'base64',
      err => {
        if (err) return console.log(err)
      }
    )
...
global.prisma = new PrismaClient()

Then my database url for production looks like :
postgresql://USER:XXX@DBCONNECTION?&sslmode=require&sslaccept=accept_invalid_certs&sslidentity=/tmp/client-identity.p12&sslpassword=XXX&sslcert=/tmp/server-ca.pem

NOTE: Once you have encoded the client-identity.p12 into base64 it will exceed the size limit for ENVs in Vercel so you need to follow the guide mentioned here to encrypt it and then decrypt it before writing the file to disk.
For completeness here is my context.js where I initialise the Prisma client:
import { PrismaClient } from '@prisma/client'
import { tmpdir } from 'os'
import fs from 'fs'
import crypto from 'crypto'
// nextjs dev server reloads files on page navigation, so new Prisma Clients were being spawned everytime
let prisma

if (!global.prisma) {
  if (process.env.NODE_ENV !== 'development') {
    fs.writeFile(
      `${tmpdir()}/server-ca.pem`,
      process.env.CLIENT_CERTIFICATE,
      err => {
        if (err) return console.log(err)
      }
    )

    const algorithm = 'aes-128-cbc'
    const decipher = crypto.createDecipheriv(
      algorithm,
      process.env.CLIENT_IDENTITY_KEY,
      process.env.CLIENT_IDENTITY_IV
    )

    const getDecryptedSecret = () => {
      let decrypted = decipher.update(
        process.env.ENCRYPTED_CLIENT_IDENTITY,
        'base64',
        'utf8'
      )
      decrypted += decipher.final('utf8')
      return decrypted
    }

    fs.writeFile(
      `${tmpdir()}/client-identity.p12`,
      getDecryptedSecret(),
      'base64',
      err => {
        if (err) return console.log(err)
      }
    )
  }
  global.prisma = new PrismaClient({})
}

prisma = global.prisma

export default prisma

Thanks for sharing @danhollick. What could Prisma do to improve your situation? It seems more like a limitation with Vercel.
Would allowing environment variables as templates variables fix this problem?

Hey @matthewmueller
So I think just being able to read the secrets from environment variables would cut out a lot of the hassle. The main point of fragility to me is that I have to write to an OS dependant temp folder (/tmp) and then reference that in my connection string.
This has several drawbacks:

If Vercel ever changes which OS their serverless environments use my connection will fail. Not super likely but not something I should need to know about.
I only need to do this in production and not locally which means if it fails I might not catch it.
It also just kinda feels gross to be writing to the file system of a serverless environment.

You are right about the size limit though. I believe that's an upstream limit so it's likely coming from Amazon or whichever infrastructure they use and could effect other serverless platforms. But the solution I outlined above works well enough to get around that.

@danhollick thanks for taking the time to explain the problem better. I definitely can feel the concern about fragility.
I feel like I'm still missing a piece of the issue though.
Given the following Prisma schema:
datasource pg {
  provider = "postgres"
  url = env("DATABASE_URL")
}

In development you have:
DATABASE_URL = "postgres://user@localhost:5432/db"

In production you have:
DATABASE_URL = "postgresql://USER:XXX@DBCONNECTION?&sslmode=require&sslaccept=accept_invalid_certs&sslidentity=/tmp/client-identity.p12&sslpassword=XXX&sslcert=/tmp/server-ca.pem"

I see this as being somewhat acceptable because the production DATABASE_URL is specifically for a Vercel environment.

I only need to do this in production and not locally which means if it fails I might not catch it.

You might be able to use something like https://github.com/FiloSottile/mkcert to simulate SSL in development.

It also just kinda feels gross to be writing to the file system of a serverless environment.

This feels like a Vercel / Lambda issue unfortunately. Any ideas how Prisma could clean this up?

@matthewmueller no worries, happy to help as much as I can.
Being able to reference the certificates from a .env file in the connection string would take at least part of the problem away. If I could do this for instance:
datasource pg {
  provider = "postgres"
  url = env("DATABASE_URL")
  sslidentity = file("/tmp/client-identity")
  sslcert = env("SERVER_CA")
}

Obviously not a practical suggestion.

Thanks for your patience @danhollick!
We've been talking about adding template literals. Would this work for you?
datasource pg {
  provider = "postgres"
  url = "${env("DATABASE_URL")}?sslidentity=/tmp/client-identity&${env("SERVER_CA")}"
}

@matthewmueller I think that would be a great improvement! 😍

This one should be solved now. We didn't implement it in the schema, but instead support .env template expansion: https://www.prisma.io/docs/concepts/components/prisma-schema#accessing-environment-variables-from-the-schema
So in your .env file:
SSL_CA="./path/to/ca.crt"
DATABASE_URL="postgresql://user:xxx@host?&sslmode=require&sslcert=${SERVER_CA}"

Then in production you can load a different .env than development or do it programmatically as @pantharshit00 suggested.
Closing, but let me know if this workflow doesn't work for you any why. Thanks!

This one should be solved now. We didn't implement it in the schema, but instead support .env template expansion: https://www.prisma.io/docs/concepts/components/prisma-schema#accessing-environment-variables-from-the-schema
So in your .env file:
SSL_CA="./path/to/ca.crt"
DATABASE_URL="postgresql://user:xxx@host?&sslmode=require&sslcert=${SERVER_CA}"

Then in production you can load a different .env than development or do it programmatically as @pantharshit00 suggested.
Closing, but let me know if this workflow doesn't work for you any why. Thanks!

@matthewmueller How do I do that in the prisma schema file? I don't have the env file in production, everything comes directly from the env variables instead.

For the other part of the issue of accepting a certificate's content as an environment variable. We probably won't support this workflow directly, but recommend using the workaround https://github.com/prisma/prisma/issues/1673#issuecomment-647107891. The main reason is that it's easy enough to create a library in userland for handling this and environment variables have size limits.

If we get burned by /tmp not being writable in some serverless environment or enough people want this feature, we may revisit.
I really want that feature. Look at the workaround, it is definitely not a maintainable solution and requires quite a lot of unnecessary blumbing, googling and banging head against the wall.

Using many resources posted in this thread (especially that by @danhollick) I created a project that helps get large environment variables into Vercel deployments in a somewhat elegant way that can be community maintained. I'm using it at my organization to get my Remix app deployed in Vercel to connect to a Google Cloud SQL instance (MySQL) via Prisma. I'll drop it here in case it can help anyone else or maybe others can find their way to it to improve it's reach.
https://github.com/brian-dlee/smuggler

Just posting here to bump this back up the priority level.
This was quite a pain to hack around and will be a problem for almost anyone needing to use Prisma in production with a serverless environment.
I am using CloudSQL with SSL from Google Cloud for my database and Vercel (like OP) for my deployment provider. This is how I hacked around it for now:
I store both the server-ca.pem and client-identity.p12 in ENV variables (this gets tricky with the .p12 file and requires some base64 encoding) and then before the Prisma client is initialised I write them to the /tmp folder which is available to vercel deployments:
import { tmpdir } from 'os'
import fs from 'fs'

    fs.writeFile(
      `${tmpdir()}/server-ca.pem`,
      process.env.CLIENT_CERTIFICATE,
      err => {
        if (err) return console.log(err)
      }
    )

  fs.writeFile(
      `${tmpdir()}/client-identity.p12`,
      process.env.CLIENT_IDENTITY,
      //important to re-encode it correctly
      'base64',
      err => {
        if (err) return console.log(err)
      }
    )
...
global.prisma = new PrismaClient()

Then my database url for production looks like :
postgresql://USER:XXX@DBCONNECTION?&sslmode=require&sslaccept=accept_invalid_certs&sslidentity=/tmp/client-identity.p12&sslpassword=XXX&sslcert=/tmp/server-ca.pem

NOTE: Once you have encoded the client-identity.p12 into base64 it will exceed the size limit for ENVs in Vercel so you need to follow the guide mentioned here to encrypt it and then decrypt it before writing the file to disk.
For completeness here is my context.js where I initialise the Prisma client:
import { PrismaClient } from '@prisma/client'
import { tmpdir } from 'os'
import fs from 'fs'
import crypto from 'crypto'
// nextjs dev server reloads files on page navigation, so new Prisma Clients were being spawned everytime
let prisma

if (!global.prisma) {
  if (process.env.NODE_ENV !== 'development') {
    fs.writeFile(
      `${tmpdir()}/server-ca.pem`,
      process.env.CLIENT_CERTIFICATE,
      err => {
        if (err) return console.log(err)
      }
    )

    const algorithm = 'aes-128-cbc'
    const decipher = crypto.createDecipheriv(
      algorithm,
      process.env.CLIENT_IDENTITY_KEY,
      process.env.CLIENT_IDENTITY_IV
    )

    const getDecryptedSecret = () => {
      let decrypted = decipher.update(
        process.env.ENCRYPTED_CLIENT_IDENTITY,
        'base64',
        'utf8'
      )
      decrypted += decipher.final('utf8')
      return decrypted
    }

    fs.writeFile(
      `${tmpdir()}/client-identity.p12`,
      getDecryptedSecret(),
      'base64',
      err => {
        if (err) return console.log(err)
      }
    )
  }
  global.prisma = new PrismaClient({})
}

prisma = global.prisma

export default prisma

it's much easier to just store the cert like this in the file:
module.exports = `-----BEGIN CERTIFICATE-----
MII....
-----END CERTIFICATE-----
`

You definitely don't have to encrypt it.
And then:
import dbCert from './dbCert';

and
function createCertificate() {
  console.log("This server's tmp:",tmpdir()) // I didn't use tmpdir() because MacOS returns weird paths
  fs.writeFileSync(
    `/tmp/dbCertificate.pem`,
    dbCert,
    err => {
      if (err) return console.log(err)
    }
  )
}

Just posting here to bump this back up the priority level.
This was quite a pain to hack around and will be a problem for almost anyone needing to use Prisma in production with a serverless environment.
I am using CloudSQL with SSL from Google Cloud for my database and Vercel (like OP) for my deployment provider. This is how I hacked around it for now:
I store both the server-ca.pem and client-identity.p12 in ENV variables (this gets tricky with the .p12 file and requires some base64 encoding) and then before the Prisma client is initialised I write them to the /tmp folder which is available to vercel deployments:
import { tmpdir } from 'os'
import fs from 'fs'

    fs.writeFile(
      `${tmpdir()}/server-ca.pem`,
      process.env.CLIENT_CERTIFICATE,
      err => {
        if (err) return console.log(err)
      }
    )

  fs.writeFile(
      `${tmpdir()}/client-identity.p12`,
      process.env.CLIENT_IDENTITY,
      //important to re-encode it correctly
      'base64',
      err => {
        if (err) return console.log(err)
      }
    )
...
global.prisma = new PrismaClient()

Then my database url for production looks like :
postgresql://USER:XXX@DBCONNECTION?&sslmode=require&sslaccept=accept_invalid_certs&sslidentity=/tmp/client-identity.p12&sslpassword=XXX&sslcert=/tmp/server-ca.pem

NOTE: Once you have encoded the client-identity.p12 into base64 it will exceed the size limit for ENVs in Vercel so you need to follow the guide mentioned here to encrypt it and then decrypt it before writing the file to disk.
For completeness here is my context.js where I initialise the Prisma client:
import { PrismaClient } from '@prisma/client'
import { tmpdir } from 'os'
import fs from 'fs'
import crypto from 'crypto'
// nextjs dev server reloads files on page navigation, so new Prisma Clients were being spawned everytime
let prisma

if (!global.prisma) {
  if (process.env.NODE_ENV !== 'development') {
    fs.writeFile(
      `${tmpdir()}/server-ca.pem`,
      process.env.CLIENT_CERTIFICATE,
      err => {
        if (err) return console.log(err)
      }
    )

    const algorithm = 'aes-128-cbc'
    const decipher = crypto.createDecipheriv(
      algorithm,
      process.env.CLIENT_IDENTITY_KEY,
      process.env.CLIENT_IDENTITY_IV
    )

    const getDecryptedSecret = () => {
      let decrypted = decipher.update(
        process.env.ENCRYPTED_CLIENT_IDENTITY,
        'base64',
        'utf8'
      )
      decrypted += decipher.final('utf8')
      return decrypted
    }

    fs.writeFile(
      `${tmpdir()}/client-identity.p12`,
      getDecryptedSecret(),
      'base64',
      err => {
        if (err) return console.log(err)
      }
    )
  }
  global.prisma = new PrismaClient({})
}

prisma = global.prisma

export default prisma

This saved me quite some time, thank you @danhollick!
Earlier this year, Vercel increased the limit for environment variables to 64KB from 5KB so the base64 encoded client identity (~3.5KB in my case) can be directly used.
Adding the commands to create the client identity p12 file and encode it in base64 below to save a little time Googling it.
Generate Client Identity P12 file
openssl pkcs12 -export -out client-identity.p12 -inkey client-key.pem -in client-cert.pem
Encode it in base64
base64 -i client-identity.p12 -o client-identity-base64

Can confirm this thread is still relevant. I'm using NextJS and tRPC deployed on Vercel, and Postgres hosted on Google CloudSQL. I adapted @danhollick's code (thanks Dan!) to work with SSL certificates and took advantage of the recently increased environment variable size limits to store the certificates in base64 before decoding them back into .pem files and storing them in tmp.
The code I used:
// Function to write the decoded content to a file
function writeDecodedFile(filename: string, base64Content: string) {
    const filePath = `${tmpdir()}/${filename}`;
    const contentBuffer = Buffer.from(base64Content, 'base64');
    console.log(filePath)

    fs.writeFile(filePath, contentBuffer, (err) => {
        if (err) {
            console.log(`Error writing ${filename}:`, err);
        } else {
            console.log(`${filename} successfully written to temp directory`);
        }
    });
}

if (process.env.NODE_ENV === "production"){
// Decode and write client-cert.pem
    if (process.env.CLIENT_CERT_BASE64) {
        writeDecodedFile('client-cert.pem', process.env.CLIENT_CERT_BASE64);
    } else {
        console.log('CLIENT_CERT_BASE64 environment variable is not set.');
    }

// Decode and write client-key.pem
    if (process.env.CLIENT_KEY_BASE64) {
        writeDecodedFile('client-key.pem', process.env.CLIENT_KEY_BASE64);
    } else {
        console.log('CLIENT_KEY_BASE64 environment variable is not set.');
    }

// Decode and write server-ca.pem
    if (process.env.SERVER_CA_BASE64) {
        writeDecodedFile('server-ca.pem', process.env.SERVER_CA_BASE64);
    } else {
        console.log('SERVER_CA_BASE64 environment variable is not set.');
    }
}

DATABASE_URL as deployed on Vercel:
postgresql://USER:PASSWORD@PUBLIC_IP:POST/DB_NAME?sslmode=require&sslcert=/tmp/client-cert.pem&sslkey=/tmp/client-key.pem&sslrootcert=/tmp/server-ca.pem
To access the database in my local environment I just use cloud sql proxy.


[disasters] update severity filtering

update severity filtering to be done using the mixer api update

Curious how is the initial page loading time?

Curious how is the initial page loading time?

Looking at the network calls, the longest took about 6.5s

Curious how is the initial page loading time?

Looking at the network calls, the longest took about 6.5s

Wonder if can make more aggressive filtering on fire, so they don't look dense in the map, and the loading could be much faster, say under 2 sec?

Curious how is the initial page loading time?

Looking at the network calls, the longest took about 6.5s

Wonder if can make more aggressive filtering on fire, so they don't look dense in the map, and the loading could be much faster, say under 2 sec?

Yes, this is just using a range that includes all the fire events. I thought we still needed to figure out the defaults to use? Once we know the default range that we want to use, we can just update the config


Build failure on Python 3.13

DM-tree fails to build on Python 3.13.  This prevents tensorflow-probability from installing, which holds up all projects that depend on it.

Also, you may want to consider droping 3.7, 3.8, and 3.9 since Jax no longer supports them.


Performance Problem

Hi
we have scim-for-keycloak running with AZURE and we have currently ~9.000 Users in a realm. Wenn the AZURE SCIM sends a request
https://keycloak.../auth/realms/REALM/scim/v2/Users?filter=userName+eq+%22AzureAD_Test-bdd952ba-be0b-47d4-b4c9-be5afee16d2d%22
(the user doesn't exist. it is sent to test finctionality)
the request runs in a timeout.
I commented out the part in the userrequest, which adds the group-membership to the user object, and then I get a timely response.
In the realm there is no group.

this is a known issue and I already tackled that problem in a complete redevelopment of this problem. If you look at the README.MD https://github.com/Captain-P-Goldfish/scim-for-keycloak I am planning to release it next month. That is if I am able to get it finished until then. But I think that I am right on schedule with my plan.


Sound randomly stopping after minimizing/maximizing iPadOS 14.4.2

We found that the music background of one of our projects was not being restored after minimizing and maximizing the game in mobile Safari with iPadOS 14.4.2 on an iPad Air 3rd Gen. This is a random bug and sometimes the music pauses/resumes correctly but if you repeat this process many times you can hear the sound not being restored eventually.
https://drive.google.com/drive/u/0/folders/1t3PBpqPUjzfNRIXDMxfiu5gDK5UFFsD0
Is this a known issue? We are attaching a video of the issue.
This can be reproduced with the standard demos.

Hi @ex - sorry there is an issue with that. Some of the examples on the site might be older versions of CreateJS.  Are you experiencing the problem with the latest version?  I don't mean to avoid looking into this, but I am just trying to help out with CreateJS in general so "volunteering" and spreading the debugging.  We do maintain a version here that we have been working with sound on... could you give it a try.  https://zimjs.org/cdn/1.3.4/createjs.js Cheers.

Hi and thanks for your link.
Is there a repo where this 1.3.4 version is maintained, and where we could see the added commits?


Allow to define the session cookie name

Currently it's hardcoded to tower.sid here: https://github.com/maxcountryman/tower-sessions/blob/0f953c9d26832858783bf458cc67713905aed7fe/src/service.rs#L56
Having a specific session name leaks information about the backend implementation. This should be set to something generic by default (like "id") and preferably changeable by the user (see the OWASP requirements: https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html#session-id-name-fingerprinting).

Since we can configure this when we create the manager or layer, should this ticket be for updating the "tower.sid" default to "sid"?

You're right, I didn't notice it's configurable, so yes, just updating to to a generic sid would be enough.


this is a quick demo of a 3d graph

This PR was originally set up to add an early 3d model to the project. The description for that PR is at the bottom of this description.
Unfortunately, when I was working solo over Christmas week, I accidentally added on to this branch rather than starting a new branch. Plus, I was working on a wide variety of tasks during that time. So this PR is a bit of a mess. But here's an overview of what has been done in this PR since the initial version:

Basic buttons were added to the UI.

Arrow buttons to control the camera.
Home button to return the camera to its starting position.
Fit all button (doesn't work yet).
Zoom In/Out buttons.
Pointer/Marquee Mode buttons (barely work--you can switch between the buttons, and you can only drag to rotate the 3d graph in pointer mode).
Toggle Legend/XY Plot buttons (barely work--you can toggle them on or off, but they don't do anything).

The plugin now loads data from Codap. It looks for a dataset called dst-data. It will find the dataset if it is added before or after the plugin.
The plot files, which were generated by Bolt, have been renamed into kabab case.
A map has been added to the 3d graph, and points are positioned to fit on the map properly.
A cube outline has been added to the 3d graph.
The 3d graph has been styled to more closely resemble the design spec.
A mobx camera class has been added. This allows us to control the camera via the custom UI, while still maintaining the threejs orbital controls.

Orbital controls use an (x, y, z) position, while the camera uses another system, which makes the UI easier to implement:

distance is the distance from the target (origin) to the camera.
rotation is the angle around the y axis. It ranges from 0 to 2pi. 0 looks at the map from the bottom, half pi looks at the map from the left, pi looks at the map from the top, etc.
pivot is the angle along the plane defined by rotation, so basically the up and down angle. It ranges from -pi to pi. -pi looks up at the target, 0 looks at the target from the side, and pi looks down at the target.

There are several new utility files:

camera-utils contains functions that convert between (x, y, z) position format and the (distance, pivot, rotation) camera format. There are tests for these functions.
codap-utils contains functions for communicating with Codap. Currently there is just one function, which gets data the plugin will use.
graph-utils contains functions that convert latitudes, longitudes, and dates into graph space.
trig-utils contains basic functions to manage radian angles. There are tests for these functions.

I added tests for a couple of utility files, as well as expanding the cypress test to cover the UI buttons. I removed App.test.ts because it is no longer working with the 3d graph. The same functionality is covered by the basic cypress test anyway.

Original PR Description
The files in the plot folder were copied from a bolt.new project
I don't like the camel case file names, but that is what bolt used so we can stick with them for now.
In order to no conflict with other changes, this just updates the index.tsx to point at the ScatterPlot instead of the App.
I did also update the App so it wouldn't throw a warning when running outside of CODAP which might help with testing.
The bolt code used tailwind for the css. I did not bring that over so the styling and sizing of things is off.
I also tracked down the 3d axes rendering code that is used by gl-vis which is then used by plotly: https://github.com/gl-vis/gl-axes3d/blob/master/axes.js
You can see a demo of this code running here: https://gl-vis.github.io/gl-plot3d/scatter.html
The axis code is hard to decipher, but it might be worth while to figure it out and translate it to react-three fiber rather rebuilding from scratch.
For example it seems to be using this shader to keep the text vertical and scaled the same size: https://github.com/gl-vis/gl-axes3d/blob/master/lib/shaders/textVert.glsl

@scytacki Since you created this PR, you can't officially review it. But when you get a chance, please take a look over it and let me know if you think anything should change.
Because I expanded the cypress test and removed the old basic "app renders without crashing" jest test, I tried to turn cypress tests on as part of the ci process. However, it looks like I got something wrong. Maybe it will be obvious to you what needs to happen to make it work?


Fix: warning 'connect deprecated res.headerSent: use standard res.hea…

…dersSent at node_modules/express-chrome-logger/index.js:29:17'
res.headerSent is deprecated in express v 4,
also res.headersSent is a standard in Node since I think the very beginning of the node project.
Thanks for very good middleware :)

Thank you for the patch :+1:


bugfix: do not modify cluster event object

When saving enriched event we want to have infra_env as a property of cluster object, however when saving normalized events, we do not want it.
The code was mistakenly modifying the original object, thus not saving infra_env values in the events.

/cc @osherdp


Convert VariationArchive/Variation nonstring fields

Some fields in VariationArchive and Variation should be integers.
Some should also be date. Need to ensure proper datetime->string conversion
Convert in constructor

BigQuery should be able to auto-interpret date strings in the format yyyy-mm-dd

Closed in #31


Implementation help

@titu1994 ,
Sorry for being a python noob but how does this implementation work? I tested and see that the code works as is to construct the model, but it builds the mode with a call to the DenseNet() function. My question is how does it do this even though the DenseNet function never makes a call to the other  DenseNet building blocks functions (the ones prefixed with "__")? This is very confusing to me but amazing at the same time. PLEASE HELP!

See line 108 in densenet.py. It calls the __create_dense_net(...) method, which calls the other __ methods.

This is a great implementation. The best I've seen. Really wish I could spend a weekend learning from you.


Deprecation Warning: Rails.application.secrets is deprecated in favor of Rails.application.credentials

Thanks for creating an issue! Please fill out this form so we can be sure to have all the information we need, and to minimize back and forth.

What are we trying to do?
Rails has deprecated one thing for another. Let's clean up to match

What feature or behavior is this required for?

DEPRECATION WARNING: `Rails.application.secrets` is deprecated in favor of `Rails.application.credentials` and will be removed in Rails 7.2. (called from <top (required)> at /home/runner/work/dcaf_case_management/dcaf_case_management/config/environment.rb:5)

How could we solve this issue? (Not knowing is okay!)
Hopefully straightforward, should be good info out in the world.

Anything else?

It looks like there are multiple deprecation warnings originating from Rails now. Opened #3128 to keep track of them all, and will close this as a dupe (even though you opened this one first!)


Secure webhook setup issue

the PowerShell script creates the AD service principal but I can't use it unless the "Application ID URI" is set.
the UI on the action group page just failed to save and says "undefined" in the notification. I was only able to find out the reason by looking at the API call response which says
{"code":"AadWebhookApplicationUriNotFound","message":"AadWebhookApplicationUriNotFound"}

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

ID: e27bedb5-7ff6-f4ae-eb7e-4ee25472d25b
Version Independent ID: 804b814e-49c9-7fc8-dc86-27b431a9b7df
Content: Create and manage action groups in the Azure portal - Azure Monitor
Content Source: articles/azure-monitor/platform/action-groups.md
Service: azure-monitor
Sub-service: alerts
GitHub Login: @dkamstra
Microsoft Alias: dukek

@Mexicoder Thanks for your comment! We will review and provide an update as appropriate.

@Mexicoder Is this request for document update or are you still facing the issue even when the "Application ID URI" is set ?

Yes I am still facing issues. More info is here https://docs.microsoft.com/en-us/answers/questions/63854/how-to-debug-azure-monitor-alert-secure-webhook.html

@Mexicoder Thanks for providing the further information about the issue on Microsoft Q&A platform. As this channel is primarily used for documentation changes and there are no changes to be made to document, we will close the issue here for now and we will continue to assist you on Microsoft Q& A channel.

https://dev.to/superjohn140/azure-alerts-secure-webhook-azure-functions-with-authentication-364
This helped me when I landed here

@ShachafGoldstein glad to hear my blog post helped you


SILGen: Skip SIL verification and optimization if errors were emitted

In lazy typechecking mode, errors in the program may only be discovered during SILGen, which can leave the SIL in a bad state for subsequent stages of compilation. If errors were detected, skip SIL verification and optimization to prevent knock-on failures.
Partially reverts https://github.com/swiftlang/swift/pull/75428, which included a more targeted fix for one of the possible knock-on effects of bad SIL coming out of SILGen.
Resolves rdar://132107752.

@swift-ci please smoke test


Add spin example for single R script

recommended by Dusan, very good point, also see examples from Dave as well, need good example for spin.

I have actually moved away from using spin lately.  I have found that .Rmd is formatted much better in RStudio and allows publishing directly to shinyapps.io with a mouse click.  For every project I have 1 long .Rmd that can create 1 or more .R files.  These .R files use doctopt to get the commands lines args and feed back to the .Rmd.  The last command in the .R is render("project.Rmd") with the command line args present in the environment already.
I suppose this same strategy could be done with 1 .R file but for me I prefer the formatting of the .Rmd in RStudio.  The .R file is more concise though and could be used to spin itself.

hi dave, this sounds great, could you please send me your example Rmd  privately to me, so I could get a rough idea for your approach? For the spin example, I now simply want to add a short example that people add .R via fileDef and use base command to spin that into a pdf/html report.

Sounds great.  I will send you an Rmd later this week.  It will have a description of how to wrap star genome generate and star aligner using the sevenbridges package.

Thanks Dave!


MM-20492 Migrate 'components/post_view/post_message_view' module and …

Summary
Migrate 'components/post_view/post_message_view' module and associated tests to TypeScript
Ticket Link
Fixes https://github.com/mattermost/mattermost-server/issues/15449

Hello @pikami,
Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

Thank you for the contribution @pikami :+1:


Feature Request: Edit Mode

I feel a complete edit mode is beyond the scope of this extension.
I feel that VSCode lack the flexibility to have such a complex UI.
But I'm open to ideas.

Microsoft is making it's own extension for HexEditor
I won't try to compete with them :)


Write a unit-tests

We need to check 3 functions:

save_files() - on the one correct file and many files
get_converted_file_path() - on the correct path and incorrect path
zip_files_in_dir() - on the one file and .zip archive

Done unit tests for cases mentioned above


Browser resizing in Flutter Web triggers Providers to rebuild?

deleted

The error is gone at the moment after I added FittedBox() around some widgets in the UI.

It was just my line initializing the sidebar state in right after main causing this.


Tags feature

This feature includes the following.

Each product page has a list of tags.
Each tag has its own page that lists all pages that are tagged by the tag.
There is an index page that lists all tags on the site.

Note that the preview site isn't reliable for demoing this feature since it uses an older version of Python (3.8 instead of 3.11). Also, I cannot test reliably on my local computer due to a caching issue. Therefore, the best way to test this may be to publish it live then roll back if needed.

Hey @benji-glitsos-ga, this looks great. When you have time, we should have a think about how tags will work with DEA Notebooks going forward - our current tagging system there is far too messy at the moment, but in the future it would be valuable to have that content nicely tagged too and integrated with Knowledge Hub tagging (to increase visibility of the various tools and notebooks we have there).

@robbibt Definitely - it will be great if we start tagging the Notebooks (and User Guides). There are a few things we will need to consider such as: will it display visual clutter on the sandbox, and will the product tags overlap too much with the notebook tags and become messy.

We do already have tags - you can see them at the bottom of the notebooks here:
https://docs.dea.ga.gov.au/notebooks/DEA_products/DEA_Fractional_Cover.html#Tags
But they don't use a controlled vocabulary, so they're messy and inconsistent.
I think we'd probably need to re-do them from scratch, making sure we use a small and useful set of controlled terms that play nicely with the existing product tags (but things like using the same product tags in both the product guides and product notebooks would actually be really useful).

Note to Claire:
This feature can't be tested accurately on the demo sites because they use a slightly older version of Python unfortunately. That is a limitation of using Netlify
Also, I have trouble testing on my local environment due to a caching issue.
Therefore, the best way to test would be to deploy it live then quickly roll back if it doesnt work.
The main issue that may happen is that the tag pages don't get generated. This won't break the site at all.


[Auto-generated] Update dependencies

Update dependencies
Automatically created PR from ci/dependabot-updates.
For more information see the "Dependabot updates" workflow.
To-do

[ ] Check that the diff is sensible, and that tests and builds pass with the new dependency versions.
[ ] Make sure that the PR is squash merged, with a sensible commit message.

Codecov Report

Merging #182 (16c0571) into master (289b318) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #182   +/-   ##
=======================================
  Coverage   80.70%   80.70%
=======================================
  Files          39       39
  Lines        1099     1099
=======================================
  Hits          887      887
  Misses        212      212

Flag
Coverage Δ

linux
80.61% <100.00%> (ø)

linux-extra_libs
80.61% <100.00%> (ø)

windows
80.65% <100.00%> (ø)

windows-extra_libs
80.65% <100.00%> (ø)

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

Impacted Files
Coverage Δ

oteapi/strategies/download/https.py
92.00% <100.00%> (ø)

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


Allow to specify custom properties for smtp configuration

Benefit the same as https://github.com/apache/james-project/pull/1392 but for SMTP
https://github.com/apache/james-project/pull/1392

IMO not needed.
We just need to configure the custom handler with custom conf outside of the COre handler package and pass it the conf.
EG:
public class CustomHook implements HeloHook {
    @Override
    public Set<String> implementedEsmtpFeatures() {
        return ImmutableSet.of("DSN");
    }

    @Override
    public HookResult doHelo(SMTPSession session, String helo) {
        return HookResult.DECLINED;
    }

    public void init(Configuration config) throws ConfigurationException {
        System.out.println(config.getString("WOOP"));
    }
}

=>
         <handlerchain class="fqdn.MyCmdHandlerLoader"> <!-- MyCmdHandlerLoader do not bundle CustomHook -->
            <handler class="fqdn.CustomHook">
                <WOOP>EBVWBVWLV</WOOP>
            </handler>
        </handlerchain>

What do you think?

When customProperties, the commandHandles can use the same (share) properties.

IMO not worth the complexity of the change you propose...


Error: 0x80070040

Hi,
I'm currently receiving this error message while trying to start bash, tried using elevated and normal privilege
C:\WINDOWS\system32>bash
Error: 0x80070040
At first Bash was working. This is what I changed.
I tried setting the nameserver manually in /etc/resolv.conf, however then I received errors regarding not being able to open a socket when trying to use nslookup.
I rm'ed /etc/resolv.conf after this did not work - maybe this is causing the issue
I google'd a bit and read a suggestion to set the DNS server on the adapter directly within Windows. So I tried that. I closed bash. Then when I opened it again I started receiving error 0x80070040.
Now I've removed the DNS entry for that adapter and set it back to being set dynamically from DHCP.
But still I cannot start bash again, I only receive error 0x80070040.
I cannot find an obvious relevant event log relating to this. I've tried disabling the Windows subsystem for linux, rebooting, enabling, rebooting, still getting Error: 0x80070040
I checked in get-appxpackage but don't see anything obviously relating to BASH there. So I don't know how I can reinstall this.
Any suggestions?
Thanks,

Can you try
lxrun.exe /uninstall /full

then
lxrun.exe /install

maybe this can help you

Worked great, thanks!
I was able to reproduce the problem by again rm'ing /etc/resolv.conf (which is a symlink to /run/resolvconf/resolv.conf which is empty )
This again gives me the Error: 0x80070040
So for anyone out there - don't do this :)

Very interesting. I got this problem when I was writing a C program, and forgot to close it before compiling -- and I guess it called some invalid code. It crashed my console and the other TTYs with it (my build view in Sublime Text crashed as well).

I had the same issue, edited :
notepad  C:\Users\<User>\AppData\Local\Packages\<My_Linux_dir>\LocalState\rootfs\etc\resolv.conf
and added :
resolv.conf.d/head
As in my distro the resolv.conf configuration is in \etc\resolv.conf.d folder, where head was containing the nameserver entries.

@mkhleel  @ivalexm  I cannot find any linux related folder in the \AppData\Local\Packages
when I search bash, a red colored logo bash on ubuntu on windows appears and it works but doesn't works in cmd when I type bash
I need bash in intellij terminal

C:\Windows\System32\bash.exe {12345678-1234-5678-0123-456789abcdef} ~

Just create a blank text file: %USERPROFILE%\AppData\Local\Packages%YourLinuxUbuntuOrDebianCodeID%\LocalState\rootfs\etc\resolv.conf

https://github.com/Microsoft/WSL/issues/2980#issuecomment-410943347

I was able to move %USERPROFILE%\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\LocalState\rootfs\etc\resolv.conf to another folder and it started working (i.e. the symbolic link was re-created.)

Hi,
I'm trying to use Ubuntu in Windows using Windows10 WSL feature.
I don't have windows store app in my machine. So, I have downloaded Ubuntu18.04 appx file and extracted the contents. Now, I have Ubuntu18.04.exe to run.
For the first time when I tried to run, it ran successfully. Then for some reason I was trying to uninstall and install it again. The extracted folder to which Ubuntu app is pointing got messed up. So, I have again extracted the files in the same folder. But now when I try to install it again it is throwing me this error.
I tried few online solution where it specified to uninstall Linux using this command:
lxrun /uninstall /full
Even for this I'm getting the same error:
lxrun /uninstall /full
Warning: lxrun.exe is only used to configure the legacy Windows Subsystem for Linux distribution.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
This will uninstall Ubuntu on Windows.
This will remove the Ubuntu environment as well as any modifications, new applications, and user data.
Type "y" to continue: y
Uninstalling...
Error: 0x80070002
Can someone please help to resolve this issue?
Thanks in advance

@onomatopellan,
Got it working. I had two versions of Ubuntu, after completely uninstalling it. I was able to run without any error.
Thank you!


Remove proptest & Replace with quickcheck

#44

I can't figure out why this current code is breaking.

As another approach, I tried simply this:
fn build_named__with_version(maj_: isize, min_: isize, patch_: isize) -> bool {
    let maj = maj_.unsigned_abs();
    let min = min_.unsigned_abs();
    let patch = patch_.unsigned_abs();

and that gave me this fun message:
thread 'program_builder::tests::build_named__with_version' has overflowed its stack
fatal runtime error: stack overflow

Well on my computer the Quickcheck returns
thread 'program_builder::tests::build_named__with_version' panicked at
'[quickcheck] TEST FAILED (runtime error).
Arguments: (Version { maj:<PHONE_NUMBER>521073382, min:<PHONE_NUMBER>854775808, patch:<PHONE_NUMBER>649825082 })

Which means via using this Version argument the test case will return runtime error. So I have written a manual test on this and I found out the edge case was<PHONE_NUMBER>854775808.
#[cfg(test)]
mod test {
    // use super::program_builder::constant::WithConstant;
    use super::Builder;
    use super::Version;
    use crate::parser;
    use crate::program_builder::constant::WithConstant;

    #[test]
    fn manual_test() {
        let v = Version {
            maj:<PHONE_NUMBER>854775807,   // Doesn't work if it is<PHONE_NUMBER>854775808,
            min:<PHONE_NUMBER>686795387,   // Doesn't work if it is<PHONE_NUMBER>854775808,
            patch:<PHONE_NUMBER>398915347, // Doesn't work if it is<PHONE_NUMBER>854775808,
        };

        let (maj, min, patch) = v.inner();
        let code = format!(
            r"(program
                 {}.{}.{}
                 (con integer 11)
               )",
            maj, min, patch
        );
        let expected = parser::program(&code).unwrap();
        let actual = Builder::start(maj as usize, min as usize, patch as usize)
            .with_int(11)
            .build_named();

        assert_eq!(expected, actual);
    }
}

The reason is not about Rust / Quickcheck type coercion. It is about the range of the input. If you specify the function argument as type isize, quickcheck will check on the edge cases. One of the test case is<PHONE_NUMBER>854775808 which triggers any code that tries to convert usize to isize. Like the comment you written in src/program_builder.rs.
impl Builder {
    /// Max: `9223372036854775807`
    pub fn start(maj: usize, min: usize, patch: usize) -> Core {
        ...

I think it is better to return panic if either major version, minor version and patch number exceed<PHONE_NUMBER>854775808 during the parsing stage. OR we can set the range of the isize in Quickcheck and let the test case pass.
What do you think?

I'm confused how it gets to be<PHONE_NUMBER>854775808 since the max isize is<PHONE_NUMBER>854775807 (https://doc.rust-lang.org/std/isize/constant.MAX.html).
In both cases I'm starting with an isize:
isize::arbitrary(g)

I think it is better to return panic if either major version, minor version and patch number exceed<PHONE_NUMBER>854775808 during the parsing stage

I agree. I think that should be a separate test that #[should_panic] with just the one case (or maybe one per max, min, and patch.


Add "Navigate to Usage" action to screenshots in the IDE Project View

Summary of scope
Introduce the same Navigate to Usage action from #25 to screenshots in the Project View
Solution details

Add a new context menu item to the screenshots.
Screenshot types in scope: reference, latest, diff
The spec file lookup logic will be different, since it should be independent from the Terra wdio tool window and the model built there.
Other than the items above, the requirements are the same.

Out of scope

N/A

Completed on release branch.


Support for hyphens: auto using the Equinor font

We would like to add hyphens: auto for a better support of unbreakable boxes. Unfortunately this doesn't work with the Equinor font. Se attached screenshots for sans-serif and Equinor

I did a quick test with Codepen, doesn’t seem to be the font, but maybe something with the EDS components?. The component in the screenshot is used on https://energyvision.app.radix.equinor.com/careers/dont-touch-this-sven

Test if this is an EDS issue and give feedback.


On this github page right side, it says the latest release is 6.7 when it should be 6.9

The latest github-only release build was for 6.7.1, but the actual latest npm version/github tag is 6.9.0, which you'll also see noted in the README in the npm banner:


Dragging the arrow pointer and making live edits to code in debug mode

In Visual Studio and the VBA editor, you can move around the arrow pointer and perform live edit updates to functions in order to create tests on the fly. If there is any chance this functionality can be brought into VS Code, this would greatly speed up my current work flow. However, I was made aware that V8 recently removed the ability to "LiveEdit" functions. But just in case they bring back LiveEdit, I do think this feature would be of tremendous value. Please see a video of the feature I am talking about, but in VBA.
Edit: I just learned how to use nodemon for debugging and I think my suggestion would work beautifully with tools such as nodemon.
I would like to note that my current stack is NodeJS and Typescript.
https://user-images.githubusercontent.com/5911283/215593913-72ad9db3-6173-4280-9342-9d7d6ee68d78.mp4

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

:slightly_frowning_face: In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.
Happy Coding!


metrics revamp

Fixes # .
Changes proposed on the PR:

This is to fix the operator crash issue in metrics.go where in stale metrics removal, there was no lock before updating, so there is a possiblity that some other routine tries to update the same metric and ends up with this error.
"Error: fatal error: concurrent map iteration and map write"
Also created a dedicated struct to encapsulate the metrics tracking state.

@samof76 please check this.


Undefined property: stdClass::$column_name when generating model - Laravel 5.4 problem

Hi guys! I'm very impressed with your work: this CMS is really amazing!
There are few things that do not convince me: the use of packages in "dev" version, no longer supported (eg: Laravel 5.4) or abandoned and the impossibility of updates via composer (which I find much more practical and safe) .
About Laravel 5.4: the use of Illuminate by Laravel 5.4 causes an installation problem due precisely to this old version of Illuminate.
Trying Microweber in Ubuntu 18.04, PHP 7.4, nginx 1.18 and Percona Server 8.0 I encountered a problem during the installation:
Undefined property: stdClass :: $ column_name when generating model
The problem is due to this issue #20190 on the /Illuminate/Database/Schema/Grammars/MySqlGrammar.php file installed with Microweber, so updating it to version 5.5, that is simply replacing it with this MySQLGrammar of Laravel 5.5 the problem is solved.
So, yes, I consider absolutely fundamental to update at least to the next version of Laravel LTS (whose support expires in August 2020) or better to the 6 LTS version.

Hello, we are upgrading to laravel 7 at the moment. This issue will be resolved when we upgrade

That's amazing! thank you!

When will the laravel 7 version MV ready for use?

Hello, hopefully this month. We have a working stage on this branch https://github.com/microweber/microweber/tree/laravel7-migration


notifications: Support "badge count" on iOS

Counterpart to zulip/zulip-mobile#438. Quoting from there:

We want to show a badge on the app's icon on the iOS home screen when the user has notifications for messages they haven't read.

I believe what has stalled that issue is a server-side bug with the payloads we're constructing; see discussion: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/iOS.20badge.20count/near/938530
Once servers send the right badge number, we might then need client-side logic (or logic in the push bouncer?) to aggregate those numbers, because the app might be logged into different accounts on different servers. E.g., for logged-in accounts A and B, if there are 3 unread notifications for A, and 2 for B, presumably we should show 5 as the badge count.

Upvoting this feature and joining the comments

We've had another request for this to support@; I've started a thread in the development community for it: https://chat.zulip.org/#narrow/channel/48-mobile/topic/flutter.3A.20iOS.20badge.20count/near/2008950


Audio Chat

Voice chat between players. Should be activated by the press to talk button on the side of the weapons.
Should be low bitrate. Probably would require an external dep

https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/captureStream perhaps good - using webrtc


update issue on windows

Hi,
I am getting the following message on windows:
D:\Projects\l10ns>l10ns update
[added] PAGE
[error] Localizations update failed
D:\Projects\l10ns>l10ns log
ENOENT, open 'D:\Projects\10ns\D:\Projects\l10ns\localizations\en-US.json'

I guess the issue is in index.js around
 project.store = path.join(project.root, project.store);
    if(!/^\//.test(project.store)) {
      project.store = path.join(project.root, project.store);
    }

I guess a dirty fix would be to change:
   if(!/^\//.test(project.store) && !/^\w\:/.test(project.store) ) {
      project.store = path.join(project.root, project.store);
    }

into
if(!/^\//.test(project.store) && !/^\w\:/.test(project.store) ) {
   project.store = path.join(project.root, project.store);
}

in index.js

Thanks @chevdor for reporting it. I will try to push out a release ASAP since this is a critical bug.

@chevdor It is now launched<EMAIL_ADDRESS>


Fix setStripPath and setProjectRoot regexes

setStripPath and setProjectRoot has some unexpected behaviour.
For example if you ->setStripPath('/dir1/') or ->setProjectRoot('/dir1/') then a path like /dir1/dir2/dir1/file.php is stripped to dir2file.php - the regex strips all occurrences of /dir1/ rather than just the root path (which I assume is the intended purpose).
So this updates the setStripPath and setProjectRoot functions to always match the start of a path string.

Thanks @mtibben - good catch!

No worries! Any chance of a release to make updating easy?

v3.5.1 now live


Connect using a Postgres connection string

Is your feature request related to a problem? Please describe.
We are working to use teleport to connect to our remote databases. This service uses certificate based proxying to connect to databases. The output of this tool is a connection string (in our case a postgres connection string). Its a real pain to take the connection string and separate out the bits to put it in each dialog box. Especially since credentials are short lived.
Describe the solution you'd like
The ability to optionally paste a connection string that is parsed and auto inserted into the appropriate input boxes maybe as a starting point after which the input boxes can be further modified.
Describe alternatives you've considered
Manually entering credentials each time :(

Hi Zara,
it should be quite simple to add a function to fill in the connection form via connection string.
I add it to the list of future implementations.
Thanks for your idea


fix: Use KptFileKind variable instead of KptFileName for GVR

When specifying the Kptfile resource kind, some code were using the KptFileName variable instead of KptFileKind. Both variables currently contain the same value: "Kptfile", but this will be an issue in the future should the KptFileName and KptFileKind variables have different values.

@rquitales Thanks for the PR. Appreciate you effort to clean the codebase. Have you verified all other places in the code base where these are being used incorrectly ?

@rquitales Thanks for the PR. Appreciate you effort to clean the codebase. Have you verified all other places in the code base where these are being used incorrectly ?

Yes, these are all the places that KptFileName was used incorrectly in the codebase.


duplicate key: substrate-build-script-utils for key build-dependencies

Description
rust-analyzer failed to load workspace: Failed to read Cargo metadata from Cargo.toml file ../kitties/Cargo.toml, cargo 1.58.0 (f01b232bc 2022-01-19): Failed to run "cargo" "metadata" "--format-version" "1" "--manifest-path" "../kitties/Cargo.toml" "--filter-platform" "x86_64-unknown-linux-gnu": cargo metadata exited with an error: error: failed to load manifest for workspace member ../kitties/node Caused by: failed to parse manifest at ../kitties/node/Cargo.toml Caused by: could not parse input as TOML Caused by: duplicate key: substrate-build-script-utils for key build-dependencies at line 70 column 1
inside my ../kitties/node/Cargo.toml
those two below seem to have conflict...
Line 19:
[build-dependencies.substrate-build-script-utils]
git = 'https://github.com/paritytech/substrate.git'
tag = 'devhub/latest'
version = '3.0.0'

Line 67:
[build-dependencies]
substrate-build-script-utils = { version = "3.0.0", git = "https://github.com/paritytech/substrate.git", tag = "devhub/latest" }

Steps to Reproduce
Follow the tutorial on https://docs.substrate.io/tutorials/v3/kitties/pt1/
After using the kickstart command, type in "kitties" and "kitties"...
Expected vs. Actual Behavior
VS Code plugin rust-analyzer shows above error
Environment
VS Code the latest
rust-analyzer v0.3.933
Linux Mint the latest
Rust 1.58.1
Logs, Errors or Screenshots
See above
Additional Information
none

@AuroraLantean have you got any solution for this issue?

@Aideepakchaudhary are you experiencing the same issue? The template has been updated since this was flagged and should no longer be an issue. Let me know. In any case, I'm moving back to this syntax:
[build-dependencies]
substrate-build-script-utils = { version = "3.0.0", git = "https://github.com/paritytech/substrate.git", tag = "devhub/latest" }

so if you have an older template, just remove the other build-dependencies declaration.

Please try again with a fresh clone. The template has been updated and now uses Substrate's polkadot-v0.9.17 branch, pulling in new updates that should fix the issues above. Let me know if this works!

Yeah Now it works fine. Thank you


Add gitlab sign in method #343

Hey, I just made a Pull Request!
Added sign in method on main page for gitlab
And adds user from gitlab email:

:heavy_check_mark: Checklist

[x] All tests are passing yarn test
[x] Screenshots attached (for UI changes)
[ ] Relevant documentation updated
[x] Prettier run on changed files
[ ] Tests added for new functionality
[ ] Regression tests added for bug fixes

great, thank you


MacOs support ?

Hey , its really helpful package ,
any plan to support macos as well ?

Hi
Yes, there is plans to support both MacOS and Linux


Add Local Push Notification for OnTerminate() - Android

When the app is terminated, add a local push notification via onTerminate() in the MainApplication.java.

Is this push notification is to inform the user about the app termination ?  Let us know , we can start working on this.

@davidbiga why we should get a local push notification when the app is terminated?

Just like the tile app, we want the user to be notified if they closed the
app and we’re tracking location.
On Tue, Apr 7, 2020 at 8:30 AM denispapakul<EMAIL_ADDRESS>wrote:

@davidbiga https://github.com/davidbiga why we should get a local push
notification when the app is terminated?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tripleblindmarket/covid-safe-paths/issues/110#issuecomment-610387728,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACE75Y5OT24JTFV4SQQDSPDRLMTHTANCNFSM4LPT26CQ
.

--
David Biga
Fractional CTO & Senior Software Engineer
David Biga http://davidbiga.io/ | Automating the Proptech and Fintech
Industries
*O *(847) 558-9934 <847-558-9934> *W *davidbiga.io    *E *
<EMAIL_ADDRESS>

I see, then what should be at this push notification? Which text/image/title? I can implement it.

https://github.com/PrivateKit/private-kit/pull/1. Here is PR for this feature.


[WIP] Support DPP

Why is this PR needed?
What changes were proposed in this PR?
Does this PR introduce any user interface change?

No
Yes. (please explain the change and update document)

Is any new testcase added?

No
Yes

Build Failed  with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbonPRBuilder2.3/5703/

Build Failed  with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbon_PR_Builder_2.4.5/3960/

Build Failed  with Spark 3.1, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbon_PR_Builder_3.1/107/

Build Failed  with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbon_PR_Builder_2.4.5/3963/

Build Failed  with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbonPRBuilder2.3/5706/

Build Failed  with Spark 3.1, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbon_PR_Builder_3.1/110/

Build Failed  with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbon_PR_Builder_2.4.5/3965/


Social media buttons need fixing still

[ ] cellphone display, buttons should remain inline with titles here, please fix

[ ] widescreen, buttons should be positioned just to the left of the blog title (not floating out someplace in the middle of the screen, please fix)


How can I make Flutter showDialog, showModalBottomSheet and showMenu Responsive

I am creating a responsive flutter app. I have added a button widget which is intended to display list of items when button is pressed.
I have created three different breakpoints for different screen sizes like one for desktop, one for tablet and one for phone.
My use case is:
When I am running the flutter app on browser on full screen and I press the button, I want to use showMenu for displaying list of items, if I shrinks the browser window to meat the tablet screen size breakpoint, I want to change showMenu to showDialog and further if I decrease the browser screen size I want to use showModalBottomSheet instead of showDialog.
Is there any way that I can use this level of responsiveness in my app, where user tap or press on button once and it display the menu and changes it to dialog and then to bottomsheet as we changes the browser window size ?
If I dismiss the showDialog, showModalBottomSheet or showMenu, any of these and after resizing the browser window press button again then it shows proper widget (because when I press button it checks screen size again), but I don't want to dismiss it and I want to make it responsive on first button press, user doesn't have to dismiss it and tap again on button to see change.
My code sample app is:
IconButton(
icon: Icon(Icons.accessibility_new),
iconSize: 136,
onPressed: () {
if (MediaQuery.of(context).size.width > 1200) // for desktop
showMenu(
context: context,
position: buttonPostion(key.currentContext!),
items: [
PopupMenuItem(child: Container(new Text("Hey! This is Menu box"))),
],
);
if (MediaQuery.of(context).size.width > 600) // for tablet
showDialog(
context: context,
builder: (_) => new AlertDialog(
title: new Text("Material Dialog"),
content: new Text("Hey! This is dialog box!"),
actions: [
MaterialButton(
child: Text('Close me!'),
onPressed: () {
Navigator.of(context).pop();
},
)
],
));
else // for phone
showModalBottomSheet(
elevation: 10,
backgroundColor: Colors.amber,
context: context,
builder: (ctx) => Container(
width: 300,
height: 100,
color: Colors.white54,
alignment: Alignment.center,
child: Text('Hey! This is bottom sheet'),
));
},
),

Is there any way that I can use this level of responsiveness in my app, where user tap or press on button once and it display the menu and changes it to dialog and then to bottomsheet as we changes the browser window size ?

@parteekpassi
I could be wrong, but this doesn't seem to be possible currently in the framework, to dynamically change the widgets to some other widget upon  browser resize. I suggest you to ask this question on support channels like StackOverflow where you could get more insights on your use case.
Closing from here, as this doesn't describe a bug or feature request but is more of a how to question for which, stackoverflow seems to be a correct place. If you disagree, write in comments and I'll reopen it.
Thanks.

@darshankawar thank you for your quick response. Can it be considered as new feature request ?


Enhance code

Deploy preview for arnaudligny ready!
Built with commit 736af148b8a385984d72c614256bfbe47c413ff4
https://deploy-preview-43--arnaudligny.netlify.com


Format Slack messages using Slack's BlockKit UI

Slack's BlockKit UI allows for prettier styling of Slack messages via the Webhook API, beyond just pretty-printing the JSON output of events. There is slack-blocks-rs which will make this transition significantly easier.

Completed in 639f722


Horizontal rule not displaying correctly

With the separator=true param, it just displays as a single dash (same as in source md file)
This article shows how to create horizontal rules.

ok.. yes, the single dash - is for Github (it produces a thinner hr than the default * * *)

fixed and released in 0.1.7, thanks

Thanks!

oops, made a mistake and the separators were displayed even if you didn't set --separators.. this is fixed in 0.1.8


No Paste command on context menu

Using the latest version of esphome (2022.9.2) and the latest version of Firefox (105.0.1) there is no Paste option on the context menu.
It's there on Chrome and Safari but missing on Firefox. I tried clearing browser cache but no luck.

can you reproduce this issue in https://microsoft.github.io/monaco-editor/playground.html ?
If you can, then this is an issue with the editor itself, not the dashboard

Indeed, I could reproduce the issue there. It's an issue with the editor itself so!

Ok thanks


Client Allocation Request for: jack&me

Client Allocation Questions
Core Information

Name: jack&me
Website / Social Media: https://www.jackandme.io/
Region: Greater China
DataCap Requested: 5TiB
Addresses to be Notarized: f1x76c6drtrvt5wucoaool2rwl3v7l4g332xvgmbq
Notary Requested: NeoGe-IPFSMain

Hey @sghmok, thanks for the request. I have some questions regarding your request. Please describe answers as much specificity as you can.

Can you introduce yourself? Where can I find you online? (Github, Twitter, Linkedin handle, Wechat, etc.)
If you represent an organization, what is the name, nature, registration country, time since inception, and named officers of your organization?
In which region(s) do you intend to use the DataCap?
What is your use case for the DataCap being requested?
Do you plan to specify advanced features when utilizing a DataCap in your storage deal? If so, please specify the feature.
How many miners do you plan on allocating the DataCap? If you have a specific miner(s) you would like to allocate a DataCap, please specify.
Do you agree on providing transparency of DataCap allocation decisions & execution details in public to prevent excessive/unfair self-dealing?

Before starting to answer questions, I encourage you to take a look of our allocation strategy here which shows how we utilize the assessment.
Thanks.

Hello @NeoGe-IPFSMain.
I am the product algorithm director of jack&me. I have been working on algorithms for more than 5 years. I used to do algorithm research at China Advanced Technology Research Institute.
GitHub: @sghmok
We, Jack&Me, are an idle computing power integration platform that volunteers to contribute the integrated computing power to scientists and institutions in cutting-edge scientific research around the world.
We are committed to making it easy for ordinary people to contribute to cutting-edge science. At present, our integrated computing power exceeds 2TiB/day.
Here are some reports from the media about the introduction and application of Jack&Me:
https://mp.weixin.qq.com/s/XzVZnWdb13fLuxf4I8maBQ
https://www.chainnode.com/post/503408
http://www.fjznews.com/html/health/1c84ff51e2a8db6ce993b659.html
We are going to use DataCap in China.
We are ready to store the original materials (pictures, videos, audio and other public data) participating in AI training into the Filecoin network.
We don't understand what advanced features are.
We are not going to designate specific miners who allocate DataCap.
Obviously, we are willing to post detailed transaction information here after storing the data.
Thank you.

Hey @sghmok, sorry for the delays during the holiday season, future requests would be processed at a faster pace. My allocation strategy is to build trust progressively. So I could allocate 10 GiB to you for the first time. Feel free to request more DataCap when you use up the allocation.
To better understand how future allocation looks, please take a look here for my allocation process.

Request Approved
Your Datacap Allocation Request has been approved by the Notary
Message sent to Filecoin Network

bafy2bzacecaa4dzkmujvjn7sttqqsofnawzf6vk5duyqo625mro7rn6f76xco

Address

f1x76c6drtrvt5wucoaool2rwl3v7l4g332xvgmbq

Datacap Allocated

10 GiB

You can check the status of the message here: https://filfox.info/en/message/bafy2bzacecaa4dzkmujvjn7sttqqsofnawzf6vk5duyqo625mro7rn6f76xco


v0.4.0 cannot compile on windows

Checking async-ssh2-lite v0.4.0

...
error[E0277]: the trait bound u64: AsRawSocket is not satisfied
--> async-ssh2-lite\src\agent.rs:47:32
|
47  |         session.set_tcp_stream(stream.as_raw_socket());
|                 -------------- ^^^^^^^^^^^^^^^^^^^^^^ the trait AsRawSocket is not implemented for u64

@yorkz1994 Please provide the complete usage code.

Steps to reproduce the compiling error.
On windows system, just git clone and cargo check it, you will see the error. Rust 1.65 is used.
D:\tmp>git clone https://github.com/bk-rs/ssh-rs.git
Cloning into 'ssh-rs'...
remote: Enumerating objects: 764, done.
remote: Counting objects: 100% (231/231), done.
remote: Compressing objects: 100% (91/91), done.
remote: Total 764 (delta 179), reused 167 (delta 136), pack-reused 533
Receiving objects: 100% (764/764), 135.94 KiB | 597.00 KiB/s, done.
Resolving deltas: 100% (478/478), done.
D:\tmp>cd ssh-rs
D:\tmp\ssh-rs>cargo check
Updating crates.io index
Downloaded cc v1.0.78
Downloaded 1 crate (61.4 KB) in 1.20s
Compiling cc v1.0.78
Compiling libz-sys v1.1.8
Compiling wepoll-ffi v0.1.2
Compiling libssh2-sys v0.2.23
Checking polling v2.5.2
Checking async-io v1.12.0
Checking ssh2 v0.9.3
Checking async-ssh2-lite v0.4.0 (D:\tmp\ssh-rs\async-ssh2-lite)
warning: unused import: path::Path
--> async-ssh2-lite\src\util.rs:4:5
|
4 |     path::Path,
|     ^^^^^^^^^^
|
= note: #[warn(unused_imports)] on by default
error[E0277]: the trait bound u64: AsRawSocket is not satisfied
--> async-ssh2-lite\src\agent.rs:47:32
|
47  |         session.set_tcp_stream(stream.as_raw_socket());
|                 -------------- ^^^^^^^^^^^^^^^^^^^^^^ the trait AsRawSocket is not implemented for u64
|                 |
|                 required by a bound introduced by this call
|
= help: the following other types implement trait AsRawSocket:
Async
BorrowedSocket<'_>
OwnedSocket
TcpListener
TcpStream
UdpSocket
socket2::socket::Socket
ssh2::Session
std::sys::windows::net::Socket
note: required by a bound in ssh2::Session::set_tcp_stream
--> C:\Users\york.cargo\registry\src\github.com-1ecc6299db9ec823\ssh2-0.9.3\src\session.rs:321:40
|
321 |     pub fn set_tcp_stream<S: 'static + AsRawSocket>(&mut self, stream: S) {
|                                        ^^^^^^^^^^^ required by this bound in ssh2::Session::set_tcp_stream
error[E0277]: the trait bound u64: AsRawSocket is not satisfied
--> async-ssh2-lite\src\session.rs:65:32
|
65  |         session.set_tcp_stream(stream.as_raw_socket());
|                 -------------- ^^^^^^^^^^^^^^^^^^^^^^ the trait AsRawSocket is not implemented for u64
|                 |
|                 required by a bound introduced by this call
|
= help: the following other types implement trait AsRawSocket:
Async
BorrowedSocket<'_>
OwnedSocket
TcpListener
TcpStream
UdpSocket
socket2::socket::Socket
ssh2::Session
std::sys::windows::net::Socket
note: required by a bound in ssh2::Session::set_tcp_stream
--> C:\Users\york.cargo\registry\src\github.com-1ecc6299db9ec823\ssh2-0.9.3\src\session.rs:321:40
|
321 |     pub fn set_tcp_stream<S: 'static + AsRawSocket>(&mut self, stream: S) {
|                                        ^^^^^^^^^^^ required by this bound in ssh2::Session::set_tcp_stream
For more information about this error, try rustc --explain E0277.
warning: async-ssh2-lite (lib) generated 1 warning
error: could not compile async-ssh2-lite due to 2 previous errors; 1 warning emitted
D:\tmp\ssh-rs>

Sorry, I don't have window here.
From The doc , AsRawSocket is correct, but AsRawSocket not impl AsRawFd , you can try the ssh2 crate directly, maybe should submit a PR to ssh2.

@yorkz1994
Please try edit session.set_tcp_stream(stream.as_raw_socket()); to session.set_tcp_stream(stream);

I changed it in two places, but the error is different now.
D:\tmp\ssh-rs>cargo check
Checking async-ssh2-lite v0.4.0 (D:\tmp\ssh-rs\async-ssh2-lite)
warning: unused import: path::Path
--> async-ssh2-lite\src\util.rs:4:5
|
4 |     path::Path,
|     ^^^^^^^^^^
|
= note: #[warn(unused_imports)] on by default
error[E0382]: use of moved value: stream
--> async-ssh2-lite\src\agent.rs:49:31
|
45 |     pub fn new(stream: S) -> Result<Self, Error> {
|                ------ move occurs because stream has type S, which does not implement the Copy trait
46 |         let mut session = get_session(None)?;
47 |         session.set_tcp_stream(stream);
|                                ------ value moved here
48 |
49 |         let stream = Arc::new(stream);
|                               ^^^^^^ value used here after move
error[E0382]: use of moved value: stream
--> async-ssh2-lite\src\session.rs:67:31
|
61 |         stream: S,
|         ------ move occurs because stream has type S, which does not implement the Copy trait
...
65 |         session.set_tcp_stream(stream);
|                                ------ value moved here
66 |
67 |         let stream = Arc::new(stream);
|                               ^^^^^^ value used here after move
For more information about this error, try rustc --explain E0382.
warning: async-ssh2-lite (lib) generated 1 warning
error: could not compile async-ssh2-lite due to 2 previous errors; 1 warning emitted
D:\tmp\ssh-rs>

Fixed in 0.4.1


Use connect and send for handling single packets to improve latency

The sender_channel_endpoint will connect during transport initialisation
When using multicast a second socket will be opened so that control traffic can still be received (like the Java implementation).
Use sendmmsg if the socket isn't connected or there is more than one message to send

Other than the minor issues this LGTM.


[router][sequencer] Fix sanity checks

The current sanity checks are not implemented correctly. If the sanity check is a simple estimateGas call, it can fail in the multipath case.
This is how it should work:
For router, before execute:

[x] #1019
[ ] #1007

For sequencer:

Upon receiving a bid, before saving it:
- [x] Check that the router and asset have been approved. Cache this for faster reference in the future. REMOVED, adding liquidity is guarded by router/asset approval, so this isn't necessary.

[ ] Confirm that the chain is properly configured. Make sure we have a reference to a valid relayer on this chain.

Before executing an auction (i.e. sending to relayer):

[x] Check router has sufficient liquidity
[x] estimateGas only before sending to relayer. Make sure estimateGas uses the "valid relayer" address as from.

@rhlsthrm @jakekidd Do we need to share this error handling with Coinhippo eng as acceptance criteria for the bridge UI?

@rhlsthrm @jakekidd Do we need to share this error handling with Coinhippo eng as acceptance criteria for the bridge UI?

This shouldn't really be required by the bridge UI but we do need to surface errors through the SDK and the UI can display them properly. This should be a task in the SDK to encompass the error handling. The SDK will not be able to receive these specific router/sequencer errors so it will need to do his own checks.

Closing this out so we can track these separately
https://github.com/connext/nxtp/issues/1007
https://github.com/connext/nxtp/issues/1168


Added my profile in data and default user image URL

Changes proposed

I have added my profile data in data directory in hemantwasthere.json file
I have added a default user image if in any case user doesn't provide an avatar URL
For that default user image I had to add the URL domain name in next.confing.js

Check List (Check all the applicable boxes)

[x] My code follows the code style of this project.
[ ] My change requires changes to the documentation.
[ ] I have updated the documentation accordingly.
[x] All new and existing tests passed.
[x] This PR does not contain plagiarized content.
[x] The title of my pull request is a short description of the requested changes.

Please move your file to public/data/. Let us know if you need any help with that.
__        Summary: 🛠 This code needs a fix

This is nextjs branch there is no public directory


Empty output

Hi! All my sql queries return empty output after last update (0.3.0).

The same if i use WITH

Hi @orl1k, @polRk, can you provide your queries?
Since in last update I migrated to @ClickHouse/clickhouse-js, I'm using different methods for different types of queries:
https://github.com/ultram4rine/sqltools-clickhouse-driver/blob/241e527726778b5c259021f6fa83257b9a489b85/src/ls/driver.ts#L59-L103
If query starts with SELECT then I use query method, which has output, for others I use exec method, which doesn't have output.
But as I can see it was too reckless.

So, writing select in lowercase also gives no results :)

@Leonqn oops, my bad, didn't notice that
I guess that can be fixed easily, so I will patch and release asap.

Also if you have newlines or spaces in the beginning of a query it also won't work.

Also if you have newlines or spaces in the beginning of a query it also won't work.

Yeah, also I can't uppercase whole query since that will change tables names, so it is needed to split query and take first item I believe

I think you can uppercase it like this
query.toString().trimStart().toUpperCase().startsWith("SELECT") ? "query" : "exec";

It is a local uppercasing and won't change original query

@orl1k, @polRk , @Leonqn please check #378.

This does not work with code lens
-- @block
-- @conn clickhouse
SELECT * FROM X;


PB, Uplink and DIR maintenance functions need to run periodically

PB and Uplink maintenance functions would expire stations who have been on the PB or Uplink too long.  DIR maintenance functions would expire files or uploads that have existed too long.  It may also repair damaged files or directories.

Version 0.1g implements DIR Maintenance function.
FTL0 maintenance is implemented to expire entries in the upload table and to delete //tmp files that correspond to the entries or which are orphans.  We may also need a check that a station has not been on the Uplink too long.
PB Maintenance function still needs to be implemented

Actually DIR maintenance is already in place and is run as part of pb_next_action()