Can I purge old and outdated cache files?

Feature request
On out CI system we upload webpack's cache to a storage after each build and download them on the next build to speed up build.
After about 6 months, we find there is a 800MB cache directory with more than 100 .pack files in this cache, causing slower and slower download time.

What is the expected behavior?
We'd like to see an API to purge outdated cache content from these files, we can then run purge monthly, a slow purge process is acceptable since this runs only once per month.
What is motivation or use case for adding/changing the behavior?
Try to limit cache size in long term.
How should this be implemented in your opinion?
Maybe we should have a {purge: true} in cache configuration
Are you willing to work on this yourself?
Not able to do that

There is a maxAge configuration but it fails to work, maybe this is because on each download of cache the ctime and mtime is updated to current timestamp.
This is an example of current large cache:
-rw-rw-r-- 1 ferry ferry 119170275 Apr 29 16:37 0.pack
-rw-rw-r-- 1 ferry ferry   3718917 Jan 25 17:17 100.pack
-rw-rw-r-- 1 ferry ferry   2661947 Jan 22 15:16 101.pack
-rw-rw-r-- 1 ferry ferry   2661947 Jan 22 15:16 102.pack
-rw-rw-r-- 1 ferry ferry   2663375 Jan 22 16:13 103.pack
-rw-rw-r-- 1 ferry ferry   1640456 Jan 25 16:39 104.pack
-rw-rw-r-- 1 ferry ferry  27665503 Jan 25 17:18 105.pack
-rw-rw-r-- 1 ferry ferry   2661890 Jan 25 17:17 106.pack
-rw-rw-r-- 1 ferry ferry  35071612 Jan 25 17:18 107.pack
-rw-rw-r-- 1 ferry ferry   1047161 Jan 25 17:18 108.pack
-rw-rw-r-- 1 ferry ferry   3993968 Apr 29 16:54 10.pack
-rw-rw-r-- 1 ferry ferry   3934125 Apr 29 16:54 11.pack
-rw-rw-r-- 1 ferry ferry  56293783 Apr 29 16:54 12.pack
-rw-rw-r-- 1 ferry ferry      5551 Apr 11 15:30 13.pack
-rw-rw-r-- 1 ferry ferry   3153297 Apr 14 13:14 14.pack
-rw-rw-r-- 1 ferry ferry   7043344 Apr 11 15:30 15.pack
-rw-rw-r-- 1 ferry ferry   3900942 Apr 14 13:14 16.pack
-rw-rw-r-- 1 ferry ferry   3149566 Apr 11 23:56 17.pack
-rw-rw-r-- 1 ferry ferry   7088026 Apr 14 13:14 18.pack
-rw-rw-r-- 1 ferry ferry   3153297 Apr 14 14:03 19.pack
-rw-rw-r-- 1 ferry ferry   1700987 Apr 29 16:54 1.pack
-rw-rw-r-- 1 ferry ferry   2776089 Apr 14 14:04 20.pack
-rw-rw-r-- 1 ferry ferry   2774623 Apr 14 13:14 21.pack
-rw-rw-r-- 1 ferry ferry   3923167 Apr 14 14:03 22.pack
-rw-rw-r-- 1 ferry ferry   3912774 Apr 14 13:14 23.pack
-rw-rw-r-- 1 ferry ferry     46629 Apr 14 19:27 24.pack
-rw-rw-r-- 1 ferry ferry   3903555 Apr 14 14:03 25.pack
-rw-rw-r-- 1 ferry ferry   3923088 Apr 14 19:27 26.pack
-rw-rw-r-- 1 ferry ferry   3913944 Apr 14 14:04 27.pack
-rw-rw-r-- 1 ferry ferry     21186 Apr 14 19:27 28.pack
-rw-rw-r-- 1 ferry ferry   3913865 Apr 14 19:27 29.pack
-rw-rw-r-- 1 ferry ferry  11796650 Apr 29 16:37 2.pack
-rw-rw-r-- 1 ferry ferry   3923090 Apr 15 10:23 30.pack
-rw-rw-r-- 1 ferry ferry   3913867 Apr 14 19:27 31.pack
-rw-rw-r-- 1 ferry ferry  19843125 Apr 15 10:23 32.pack
-rw-rw-r-- 1 ferry ferry    804267 Apr 15 10:23 33.pack
-rw-rw-r-- 1 ferry ferry  77633883 Apr 15 10:23 34.pack
-rw-rw-r-- 1 ferry ferry   8339925 Apr 15 10:23 35.pack
-rw-rw-r-- 1 ferry ferry    915722 Mar 24 16:18 36.pack
-rw-rw-r-- 1 ferry ferry  54512178 Mar 24 16:18 37.pack
-rw-rw-r-- 1 ferry ferry     20272 Mar  1 17:28 38.pack
-rw-rw-r-- 1 ferry ferry   7207882 Feb 25 14:53 39.pack
-rw-rw-r-- 1 ferry ferry  15567825 Apr 29 16:37 3.pack
-rw-rw-r-- 1 ferry ferry   6910049 Feb 25 14:56 40.pack
-rw-rw-r-- 1 ferry ferry   3749063 Feb 25 14:56 41.pack
-rw-rw-r-- 1 ferry ferry   3123047 Feb 26 13:31 42.pack
-rw-rw-r-- 1 ferry ferry   3057770 Feb 26 13:31 43.pack
-rw-rw-r-- 1 ferry ferry   3066902 Mar  1 14:34 44.pack
-rw-rw-r-- 1 ferry ferry   4625389 Feb 26 13:31 45.pack
-rw-rw-r-- 1 ferry ferry   6848282 Feb 27 20:10 46.pack
-rw-rw-r-- 1 ferry ferry   7004505 Feb 27 20:22 47.pack
-rw-rw-r-- 1 ferry ferry   2738477 Mar  1 13:06 48.pack
-rw-rw-r-- 1 ferry ferry   2736264 Feb 27 20:23 49.pack
-rw-rw-r-- 1 ferry ferry   4015881 Apr 29 16:37 4.pack
-rw-rw-r-- 1 ferry ferry   6995269 Feb 27 20:23 50.pack
-rw-rw-r-- 1 ferry ferry   5317760 Mar  1 13:06 51.pack
-rw-rw-r-- 1 ferry ferry      9569 Mar  1 14:34 52.pack
-rw-rw-r-- 1 ferry ferry   5319970 Mar  1 13:20 53.pack
-rw-rw-r-- 1 ferry ferry  13243263 Feb 28 14:35 54.pack
-rw-rw-r-- 1 ferry ferry   3806612 Mar  1 14:08 55.pack
-rw-rw-r-- 1 ferry ferry   2739458 Mar  1 14:08 56.pack
-rw-rw-r-- 1 ferry ferry   3792612 Mar  1 17:26 57.pack
-rw-rw-r-- 1 ferry ferry   4932428 Mar  1 15:25 58.pack
-rw-rw-r-- 1 ferry ferry   4348053 Mar  1 17:26 59.pack
-rw-rw-r-- 1 ferry ferry  18028905 Apr 29 16:37 5.pack
-rw-rw-r-- 1 ferry ferry   7116517 Mar  1 14:34 60.pack
-rw-rw-r-- 1 ferry ferry      9327 Mar  1 15:26 61.pack
-rw-rw-r-- 1 ferry ferry   3810131 Mar  1 17:26 62.pack
-rw-rw-r-- 1 ferry ferry     10025 Mar  1 14:35 63.pack
-rw-rw-r-- 1 ferry ferry   2739458 Mar  1 17:26 64.pack
-rw-rw-r-- 1 ferry ferry  26548396 Mar  1 17:26 65.pack
-rw-rw-r-- 1 ferry ferry   2742727 Mar  1 17:26 66.pack
-rw-rw-r-- 1 ferry ferry   7174612 Mar  1 17:26 67.pack
-rw-rw-r-- 1 ferry ferry    777805 Mar  1 17:26 68.pack
-rw-rw-r-- 1 ferry ferry   3871561 Mar  1 17:28 69.pack
-rw-rw-r-- 1 ferry ferry  10872590 Apr 29 16:54 6.pack
-rw-rw-r-- 1 ferry ferry   2736264 Mar  1 17:29 70.pack
-rw-rw-r-- 1 ferry ferry   6900815 Mar  1 17:28 71.pack
-rw-rw-r-- 1 ferry ferry  51530310 Mar  1 17:29 72.pack
-rw-rw-r-- 1 ferry ferry   1111500 Mar  1 17:29 73.pack
-rw-rw-r-- 1 ferry ferry   4993954 Jan 20 17:41 74.pack
-rw-rw-r-- 1 ferry ferry   3700456 Jan 20 17:43 75.pack
-rw-rw-r-- 1 ferry ferry   3711839 Jan 22 10:29 76.pack
-rw-rw-r-- 1 ferry ferry   3701559 Jan 20 18:46 77.pack
-rw-rw-r-- 1 ferry ferry   3692586 Jan 20 17:54 78.pack
-rw-rw-r-- 1 ferry ferry     33649 Jan 22 16:14 79.pack
-rw-rw-r-- 1 ferry ferry  21270722 Apr 29 16:53 7.pack
-rw-rw-r-- 1 ferry ferry   3702384 Jan 20 18:54 80.pack
-rw-rw-r-- 1 ferry ferry   3693411 Jan 20 18:46 81.pack
-rw-rw-r-- 1 ferry ferry  23651993 Jan 22 10:29 82.pack
-rw-rw-r-- 1 ferry ferry   3701285 Jan 20 18:59 83.pack
-rw-rw-r-- 1 ferry ferry   3692308 Jan 20 18:54 84.pack
-rw-rw-r-- 1 ferry ferry   3713051 Jan 25 16:39 85.pack
-rw-rw-r-- 1 ferry ferry   3701285 Jan 20 19:01 86.pack
-rw-rw-r-- 1 ferry ferry   3692308 Jan 20 18:59 87.pack
-rw-rw-r-- 1 ferry ferry   3703147 Jan 21 17:09 88.pack
-rw-rw-r-- 1 ferry ferry   3694171 Jan 20 19:01 89.pack
-rw-rw-r-- 1 ferry ferry   4026682 Apr 29 16:53 8.pack
-rw-rw-r-- 1 ferry ferry   3704062 Jan 22 16:14 90.pack
-rw-rw-r-- 1 ferry ferry   3703008 Jan 21 17:14 91.pack
-rw-rw-r-- 1 ferry ferry   3694033 Jan 21 17:09 92.pack
-rw-rw-r-- 1 ferry ferry   3702849 Jan 22 10:29 93.pack
-rw-rw-r-- 1 ferry ferry   3703290 Jan 22 10:24 94.pack
-rw-rw-r-- 1 ferry ferry   3694315 Jan 21 17:15 95.pack
-rw-rw-r-- 1 ferry ferry   3712423 Jan 22 15:07 96.pack
-rw-rw-r-- 1 ferry ferry   3703433 Jan 22 10:29 97.pack
-rw-rw-r-- 1 ferry ferry     81079 Jan 25 17:18 98.pack
-rw-rw-r-- 1 ferry ferry      5484 Jan 25 16:39 99.pack
-rw-rw-r-- 1 ferry ferry     87419 Apr 29 16:37 9.pack
-rw-rw-r-- 1 ferry ferry   4606528 Apr 29 16:54 index.pack
-rw-rw-r-- 1 ferry ferry   4606102 Apr 29 16:53 index.pack.old

The same project with a single build locally:
-rw-r--r--  1 otakustay  staff   125M May  2 16:38 0.pack
-rw-r--r--  1 otakustay  staff    77M May  2 16:38 1.pack
-rw-r--r--  1 otakustay  staff    15M May  2 16:38 2.pack
-rw-r--r--  1 otakustay  staff   3.7M May  2 16:38 index.pack
-rw-r--r--  1 otakustay  staff   3.7M May  2 16:38 index.pack.old

Yep I know about this problem. MaxAge does cleanup old cache entries, but no longer used files are not removed from disk...

Perhaps we can include cache outdated information in output stats

Perhaps we can include cache outdated information in output stats

You can set infrastructureLogging: { level: "verbose" } to get a few more lines of logging about the caching.
On short term we want to fix the cache issue by removing all unused files from the cache directory after writing the cache. That sounds easy but actually it a bit tricky since, due to lazy deserialization of the cache, we don't know all files that are currently in use. We might change the cache format a little bit to know these details.

I'm on the same boat, using filesystem caches to speedup our CI builds.
I'm on a big org and project, so after a week and a bit more, our cache got to ~27gb 😅.
@sokra looking @ the code, I see the file serialization middleware lib/serialization/FileMiddleware is used only fore createFileSerializer inside serialization.js (And also print-cache-file.js, which i'm seeing is a debugging/tool https://github.com/webpack/webpack/issues/10400#issuecomment-587521638).
What would be a good approach for a short term fix?
I have a naive approach to fix this locally passing down a purgeStaleCache prop, reading the files inside the cache dir, comparing against allWrittenFiles and deleting what's not used. Pretty much adding all that in between these lines.
https://github.com/webpack/webpack/blob/main/lib/serialization/FileMiddleware.js#L472-L474
I'm sure the idea is to serialization middlewares a bit more generic, but in the short time WDYT of the linked PR?
Either way, any guidance is welcome.

ping @sokra @otakustay I have an implementation here https://github.com/webpack/webpack/pull/13875

Friendly Ping/reminder! :D

@sokra  is it still an issue?

Yes

In filesystem cache, the unused cache items are now splited to a new cache content file partially, perhaps we need a config to remove it, just like maxGenerations:1 works in memory cache.

there is an opened PR https://github.com/webpack/webpack/pull/14661

Can an activity be a comment? 😅
I don't mean to be a nuisance, though @sokra should we be pinging you for @vankop's PR can we help to get it out the door/on a good state? 🙏
Any feedback would be appreciated

I have this issue also with the filesystem cache.  I am using yarn as our package manager, and I get a .cache folder inside my root .yarn folder which starts to accumulate webpack cache files inside a "client-development" folder.  It can grow (in development using the hot reloader) to several gigabytes within even an hour of frequent work.  In one case, it crashed my computer because it ate all but a couple hundred megabytes of disk space when I wasn't paying attention and deleting the files in it.

As an workaround, I wrote a simple webpack plugin. https://github.com/Gavin-Gong/purge-cache-webpack-plugin
Hope this helps someone who has same issue.
npm i purge-cache-webpack-plugin -D

// webpack config
/** @type {import('webpack').Configuration}*/
const config = {
  cache: {
    type: "filesystem", // only working with filesystem cache
    maxAge: 1000 * 60,
  },
  plugins: [
    new PurgeCacheWebpackPlugin(),
    // ...
  ],
  // ...
};

Any update ?

This is marked as shipped, but I don't think it is fixed?
Is there any update on this?

This issue Is still present on Webpack 5.91.0.
Cache size easily grows to 5 Gb during work.


Issues connecting with DocumentDB Emulator using Node SDK

We're trying to connect to DocumentDB emulator using the Node SDK (version 1.10.0), we encountered few issues:

First issue was with the self-signed certificate. For some reason the HTTP request was declined because of this. We searched on how to work with self-signed certificate, one way is to make use of environment variable “NODE_TLS_REJECT_UNAUTHORIZED” and setting this variable to “0”. But a safer way to solve this issue is by adding the following line of code in the SDK(request.js file):
requestOptions.rejectUnauthorized = false;
After adding this line, we no longer receive the error with self-signed certificate issue but now we get an error saying the service is not running.

Second issue, Node’s HTTPS library is pretty choosy about the port. Unless explicitly overridden, HTTPS library expects port to be 443. So to make things work, we added the following line of code in the SDK to set default port of emulator service.(request.js file after line 172):
requestOptions.port = 8081;

The following values can be set in SDK and the “EnableEndpointDiscovery” to false in the ConnectionPolicy while locally connecting to DocumentDB Emulator using Node SDK:
requestOptions.rejectUnauthorized = false; //For self-signed certificates
requestOptions.port = 8081; //Setting default port for DocumentDB Emulator

@jagratimodi

We fixed the self-signed certificate issue with the 1.10.1 release of the SDK, so you should be good there.

Can you please elaborate on:

but now we get an error saying the service is not running.
Are you seeing Service Unavailable exception? Can you send us the complete stack trace?

You shouldn't have to do change the port explicitly. We had a port issue in our first release of the emulator but we fixed it soon. Please make sure you are using the latest emulator from https://aka.ms/documentdb-emulator and using 8081 in the Url as: https://localhost:8081.
You also don't have to set the EnableEndpointDiscovery to false explicitly(this was the same issue in our first emulator release).

So in summary, please use 1.10.1 version of the Node.js SDK, with no workarounds you mentioned above when using the latest emulator and you should be able to connect. Let us know if that's not the case.

I am closing this issue as this is fixed in the latest release of Emulator and NodeJS SDK. If you think still that's an issue feel free to re-open.

I updated my npm packages from 1.10.2 to 1.11.0 and it looks like the issue is back or at least it's similar.
The error returned is:
{
    code: "DEPTH_ZERO_SELF_SIGNED_CERT",
    error: "self signed certificate"
}

@MatejSkrbis With the latest release of emulator, the hostname returned from the server cannot be always "localhost" so we had to make this change. Now you can set DisableSSLVerification option on ConnectionPolicy object to true when connecting to emulator. Let me know if that resolves this issue.

I added the DisableSSLVerification option on ConnectionPolicy object, but now it returns different error:
{
    "code":"BadRequest","message":"Invalid API version. Ensure a valid x-ms-version header value is passed.\r\nActivityId: dfce9f06-da1e-4d08-9184-8d401cb1263f"
}

const { DocumentClient, DocumentBase } = require('documentdb');
...
const connectionPolicy = new DocumentBase.ConnectionPolicy();
connectionPolicy.DisableSSLVerification = true;

const client = new DocumentClient(config.host, { masterKey: config.authKey }, connectionPolicy);

@MatejSkrbis Yes. You seemed to have an older version of the emulator but the latest client and hence this error was expected.

I am getting this problem still, I am running v1.11.0 of the DocumentDB npm package, on Node.js v7.8.0, and DocumentDBEmulator v<IP_ADDRESS>.

@GSchroder Not sure which error you are talking about: SSL verification one or Invalid API version.
If it's former:
Did you set connectionPolicy.DisableSSLVerification = true; in your client?
You now need to explicitly disable SSL verification when connecting to DocumentDB emulator as above.

FYI to everyone of this thread. The issue that we fixed in 1.10.1 to allow connections to emulator automatically doesn't work with the latest releases of emulator as the design has changed, so now you need to explicitly set DisableSSLVerification to true like:
connectionPolicy.DisableSSLVerification = true; in your client to avoid getting Self signed certificate error.

Apologies for not being clear, it was the SSL verification issue. Thanks for the info, I didn't realise the design had changed to manually disabling it now.


Get error when download file on Huawei p30 pro and p30

react-native: 0.63.3
"react-native-blob-util": "^0.13.11",
device info:

the error:

Do you have the error message too?
There is no chance for me to find line 1124 in your app bundle, since it's specific to your app and might change every time you rebuild the app.

the code for this is
u(new Error(h,p)):((f.path||f.fileCache||f.addAndroidDownloads||f.key||f.auto&&'blob'===p.respType)
you can find the same code in index.android.bundle.
the error thows from this line of code.


[fetcher]- add option to add dynamic recourse via values file

Hello, I have a problem and the next pr can solve it and maybe help others
I need to install also recourse to remote clusters such as ClusterSecretStore
and I don't want to create an umbrella chart or manage resources in other charts
via this solution, I can have the manifest of the ClusterSecretStore just be in the values file :-)
I didn't know if I should bump the version and to which version, so please let me know

Hi @ofirshtrull ! I'm not sure that would work, because our helm charts can also install the CRDs themselves. I believe this would just cause an error to the user if they try to use it explicitly from the release version.
Is there any reason why you need to specify the resources in the helm charts?

@gusfcarvalho I am aware that you install CRDs,
this won't affect CRDs at all,
this is a way to add more resources via the chart instead of creating an umbrella chart or even a chart just for extra resources,
by this, I can add a ClusterSecretStore to the detention cluster without any problems,
I run all my clusters via argocd applicationsets and this cool trick removes the need to add custom manifests and manage them via another chart
usually I do this  trick in order to add external secret to outside charts like grafana
 grafana:
    admin:
      existingSecret: grafana-secrets
      userKey: admin-user
      passwordKey: admin-password
    extraObjects:
      - apiVersion: external-secrets.io/v1alpha1
        kind: ExternalSecret
        metadata:
          name: grafana-secrets
        spec:
          refreshInterval: 5m
          secretStoreRef:
            kind: ClusterSecretStore
            name: cluster-secret-store
          data:
            - secretKey: admin-password
              remoteRef:
                key: grafana-admin-credentials
                property: password
            - secretKey: admin-user
              remoteRef:
                key: grafana-admin-credentials
                property: user
          target:
            template:
              metadata:
                annotations:
                  reloader.stakater.com/match: "true"

@gusfcarvalho I am aware that you install CRDs, this won't affect CRDs at all, this is a way to add more resources via the chart instead of creating an umbrella chart or even a chart just for extra resources,

I'm not concerned with the CRDs themselves.
For an user first deploying the charts with helm install external-secrets and the following extraObjects:
extraObjects:
  - apiVersion: external-secrets.io/v1alpha1
    kind: ClusterSecretStore
    metadata:
      name: cluster-secret-store
      namespace: external-secrets
    spec:
      provider:
        gcpsm:
          projectID: sample-project

It won't deploy the helm chart at all, and just error out as the ClusterSecretStore CRD is not yet installed (after all, the chart installs it). It would only work with  "helm.sh/hook": post-install, and even then I'm not sure it would work after validating webhooks are implemented.
I've seen you've just rebased main in your branch. main now has a validating webhook in place, so could you please test a  configuration that would work out, and share it here?


gradle build in demo_gradle is broken

gradle clean build
:api:clean UP-TO-DATE
:app:clean UP-TO-DATE
:plugins/plugin1:clean UP-TO-DATE
:plugins/plugin2:clean UP-TO-DATE
:api:compileJava
NEGOTIATE authentication error: No valid credentials provided (Mechanism level:                                                                               No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)                                                                              )
C:\Work\03_PAB\git\sandbox\pf4j\demo_gradle\api\src\main\java\ro\fortsoft\pf4j\d                                                                              emo\api\Greeting.java:16: error: class, interface, or enum expected
*/
^
1 error
:api:compileJava FAILED
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':api:compileJava'.

Compilation failed; see the compiler error output for details.

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

BUILD FAILED
Total time: 48.204 secs
Picked up _JAVA_OPTIONS: -Xmx1g

I don't use gradle in my projects so I don't know how can I fix your error :(
Maybe someone (@stiXits ) can help us.

ok thanks! i will try my search around.

greetingj.java has additional */ in the header. removing that builds fine

I made the modification. Please try again and confirm that the modification resolves the issue. Thanks.

It is building. Thanks for the quick response.


Compile error

I am writing support for my toy fpga. When I tried the sync my fork to the current master and compile it. I got this error.
I guess the parser is unhappy with line 139
I am using opensuse 42.1 leap if that matters
make
[  0%] Building kernel/version_5415e0d.cc
[  0%] Building kernel/version_5415e0d.o
[  1%] Building kernel/driver.o
[  1%] Building techlibs/common/simlib_help.inc
[  1%] Building techlibs/common/simcells_help.inc
[  1%] Building kernel/register.o
[  2%] Building kernel/rtlil.o
[  2%] Building kernel/log.o
[  3%] Building kernel/calc.o
[  3%] Building kernel/yosys.o
[  4%] Building kernel/cellaigs.o
[  4%] Building kernel/celledges.o
[  5%] Building libs/bigint/BigIntegerAlgorithms.o
[  5%] Building libs/bigint/BigInteger.o
[  6%] Building libs/bigint/BigIntegerUtils.o
[  6%] Building libs/bigint/BigUnsigned.o
[  7%] Building libs/bigint/BigUnsignedInABase.o
[  7%] Building libs/sha1/sha1.o
[  8%] Building libs/subcircuit/subcircuit.o
[  9%] Building libs/ezsat/ezsat.o
[  9%] Building libs/ezsat/ezminisat.o
[ 10%] Building libs/minisat/Options.o
[ 10%] Building libs/minisat/SimpSolver.o
[ 11%] Building libs/minisat/Solver.o
[ 11%] Building libs/minisat/System.o
[ 12%] Building frontends/vhdl2verilog/vhdl2verilog.o
[ 12%] Building frontends/ilang/ilang_parser.tab.cc
[ 12%] Building frontends/ilang/ilang_parser.tab.o
[ 12%] Building frontends/ilang/ilang_lexer.cc
[ 13%] Building frontends/ilang/ilang_lexer.o
frontends/ilang/ilang_lexer.cc:912:35: warning: comparison of integers of different signs: 'int' and 'yy_size_t' (aka 'unsigned long')
[-Wsign-compare]
for ( yyl = (yy_more_len); yyl < rtlil_frontend_ilang_yyleng; ++yyl )
~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
frontends/ilang/ilang_lexer.cc:1926:17: warning: comparison of integers of different signs: 'int' and 'yy_size_t' (aka 'unsigned long')
[-Wsign-compare]
for ( i = 0; i < _yybytes_len; ++i )
~ ^ ~~~~~~~~~~~~
2 warnings generated.
[ 13%] Building frontends/ilang/ilang_frontend.o
[ 13%] Building frontends/verilog/verilog_parser.tab.cc
frontends/verilog/verilog_parser.y:139.9-19: error: %define variable 'parse.error' is not used
frontends/verilog/Makefile.inc:8: recipe for target 'frontends/verilog/verilog_parser.tab.cc' failed
make: *** [frontends/verilog/verilog_parser.tab.cc] Error 1

I forgot to mention that I did test it on the unmodified clifford's master branch. I apologize if the issue obvious but I guess I do not see a bug report report anywhere

What output do you get for bison --version?

bison --version
bison (GNU Bison) 2.7
Written by Robert Corbett and Richard Stallman.
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I would assume that %define parse.error verbose is a feature new in bison 3.x. (bison 3.0 has been released in mid 2013. so it's not like it's been released yesterday. puzzling that opensuse is still on such an old version.)
You can simply remove this two lines from frontends/verilog/verilog_parser.y:
%define parse.error verbose
%define parse.lac full

That will give you slightly less verbose error reporting for syntax errors, but otherwise it should have no effect.

ok, I will probably update the bison via the unstable repos.
Thank you, I hope this problem will sort itself out with the next release of opensuse within a few months.


question about batch size and learning rate

Hello authors,
I have access to a GPU server that can handle larger batch-sizes, say around 128 (or more). I believe this would reduce the training time ~4x, What would you recommend would be a good learning rate on higher batch-sizes? In your experience, is there a good heuristic that you follow in training GANs when it comes to adjusting batch-size and learning-rate ?
On a slightly unrelated note -- have you tried using Distributed Data Parallel to speed up training? We've been trying to use it, but are encountering weird errors, maybe you have some insights? If we are able to figure it out, I'd love to share the code with you and contribute it here.
Thanks!

Hi, I have no direct experience with scaling of learning rates for larger batch sizes in GANs, but related work seems to suggest scaling the learning rate with the batch size might be a good start (see e.g. Section 4.7 in https://www.jmlr.org/papers/volume20/18-789/18-789.pdf). Popular approaches for that are to scale the learning rate linearly or by square root with the batch size. So I guess if you increase the batch size you should also increase the learning rate, but by how much exactly is somewhat difficult to predict.
Regarding distributed data parallel training I have not experimented with that but I'd be happy about your contributions and experiences.


Automatically deploy to website

Looks like the website is a bit behind the master branch. Automatic deploys could probably be done with now-travis so that every push to master is deployed to https://carbon.now.sh/.

Thanks for bringing this up! I think we're going to go with a release based scheme where we'll deploy when we feel sufficient progress has been made rather than after every commit. Additionally, we want to verify that the deployment is working properly before aliasing it, so I don't think we'll be automating this for the time being.
We definitely should set up some CI though to run linting!

Sure, that sounds good!


[Feat]: Adding dropdown menu for our services

What feature?
Adding a dropdown feature for Our Services; it will enhance the user experience as users can access them directly from navigation bar.
Show us the magic with screenshots
No response
Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSoC'23 contributor
[X] I want to work on this issue

please assign this issue to me

@PiyushKalyanpy
Please assign this issue to me under @GSSOC


Please allow setting PropertyHandlerFlags of NamedPropertyHandlerConfiguration

I have a named property interceptor and I use Nan::SetNamedPropertyHandler so that it works accross multiple node versions.
auto doctpl = Nan::New<FunctionTemplate>(DocumentWrap::ctor);
doctpl->SetClassName(Nan::New<String>("Document").ToLocalChecked());
doctpl->InstanceTemplate()->SetInternalFieldCount(1);
// Instance functions
Nan::SetPrototypeMethod(doctpl, "getTokenizerForField", DocumentWrap::getTokenizerForField);
Nan::SetPrototypeMethod(doctpl, "setTokenizerForField", DocumentWrap::setTokenizerForField);
Nan::SetPrototypeMethod(doctpl, "destroy", DocumentWrap::destroy);
Nan::SetPrototypeMethod(doctpl, "disableIndexingForField", DocumentWrap::disableIndexingForField);
// Interceptor for docid and fields
Nan::SetNamedPropertyHandler(
    doctpl->InstanceTemplate(),
    DocumentWrap::getField,
    DocumentWrap::setField,
    DocumentWrap::queryField,
    DocumentWrap::removeField,
    DocumentWrap::enumerateField
);
// Create constructor function
auto docctor = doctpl->GetFunction();
// Save persistent handle
documentWrapCtor.Reset(docctor);

The trouble is that the object also has some functions set on its prototype. By default, v8 uses the named property interceptor even if the user wants to call one of these functions:
doc.getTokenizerForField("hello", "world");

This results in a TypeError: doc.setTokenizerForField is not a function
The issue can be solved if one sets the correct PropertyHandlerFlags to the NamedPropertyHandlerConfiguration, however currently nan doesn't let me do this.
I suggest to simply add one more argument to Nan::SetNamedPropertyHandler.
For the sake of completeness, the flags I need to use are:

v8::PropertyHandlerFlags::kNonMasking
v8::PropertyHandlerFlags::kOnlyInterceptStrings

There is no PropertyHandlerFlags or an equivalent in node.js <= v0.12.  As long as we still support those, we can't add the flag.
In your case I'd call v8::ObjectTemplate::SetNamedPropertyHandler() directly since you probably don't care about old node versions.  The enum is available in node.js >= v4.x.

Unfortunately, I do care about old node versions, the module used to work with node 0.12.x and I encountered this problem while upgrading it to work with newer node.

Then you probably have no choice but to branch on #if NODE_MODULE_VERSION >= 46 to add v4.x+ specific code paths.  PropertyHandlerFlags describes behavior that nan cannot shim in a general way except maybe PropertyHandlerFlags::kAllCanRead, but that is the least interesting of the bunch.

Thank you @bnoordhuis I can try that. However, why is it unfeasible for nan to add one more argument? It could be simply ignored on older node versions.

We only add what we can reasonably support across node versions, that is nan's raison d'être.

@bnoordhuis For now, I managed to solve this by copy-pasting nan's SetNamedPropertyHandler into my own code and modifying it to check NODE_MODULE_VERSION and if it is >4.0, set the flags I want.
However, there is one more thing. I believe I might be using this API incorrectly, because neither the query nor the enumerator functions are ever called on any of my objects. Am I doing something wrong here or is this normal?


Added a tutorial on REST API

Hey @Vasujoshi1203 !
Congrats on submitting your pull request and from what I can infer, this was your first pull request towards an open-source project. Thank you for giving this repository to help you guide in your first contribution. On behalf of everyone in here, I'd like to welcome you to the open-source community!
You PR has been merged and the changes will be reflected on the website in a few minutes,.
Do leave a star, if you liked the repo ;)
Happy hacking ! 🎊


feat[s3]: Customize S3 client endpoint url as well as SSL verify flag

Two new environment variables for UI service:

METAFLOW_S3_ENDPOINT_URL
METAFLOW_S3_VERIFY_CERTIFICATE

This change is similar to Metaflow boto3 client init https://github.com/Netflix/metaflow/blob/dc42d670e6c3f7555f40290fce6ed46eb0c12b17/metaflow/datastore/util/s3util.py#L19

Approved for the cache action changes, excellent stuff. Do note that the API handlers use aiobotocore for the log routes, so this needs its own get_s3_client() if you intend on testing that functionality as well.


Parcellation features returning incorrect data

/atlases/{atlas_id}/parcellations/{parcellation_id}/features endpoint does not return data correctly. description, dataset_id, and other fields are not included on the returned json, but they are inside the name field which looks like this:
name: "... {'name': '...', 'dataset_id': '...', 'description': '...', 'citation': '...', 'authors': [...], 'cohort': '...', 'subject': '...', 'filename': '...'}"

... - is filled with relevant data

Great. We need description. For now, not sure if we need citation and authors separately, but would be nice to have them as part of the description.

we will see what we can do.
Not a promise, but we will look into if it is resource intensive to retrieve some/all of the aforementioned fields.

should be fixed. e.g.:
curl -X 'GET'   'https://siibra-api-dev.apps-dev.hbp.eu/v2_0/atlases/human/parcellations/2.9/features?page=1&size=1'   -H 'accept: application/json'  | jq '.items[0] | keys'

returns
[
  "@id",
  "@type",
  "authors",
  "citation",
  "cohort",
  "columns",
  "dataset_id",
  "description",
  "filename",
  "matrix",
  "name",
  "parcellations",
  "subject"
]


Entity view for partial updates

We could add some more annotations for entity views and extend the entity view manager to allow partial updates to the entities they map to.
Need support for version fields too. Note that for now, only updates are considered.

POC implemented by https://github.com/Blazebit/blaze-persistence/commit/27417ef80db745d0571cea9f12452ed943ea8f4e

Works for simple attributes, but collection updates and cascading updates aren't implemented yet.

Also there is no support for subviews yet

The originally planned features are

[x] Possibility to only allow updating specific fields => provide setter for that field
[x] State tracking to enable partial updating instead of full updates => flag in updateable annotation
[ ] Support version field and optimistic locking
[ ] Support for updating *ToMany relations and element collections
[ ] Support updateable subviews
[ ] Support cascading updates of relations or subviews
[ ] Dynamically generated delegating proxy classes for entities or other entity views to use case specific entity view interfaces

Version field support
This is a bit tricky as it requires special attention when doing collection updates on partial enabled entity views. Normally updates of basic and *ToOne fields would be done with an update query, but when collection updates are also involved, we have to take special care regarding the version update.
*ToMany and element collection support
Since *ToMany and element collection updates can only be implemented with JPA by changing a persistent entiy, we will implement these modifications similar to the following example
SomeEntity e = em.getReference(SomeEntity.class, id)
e.getElementCollection().add(...)

To efficiently implement collection semantics, one would have to track changes done to a collection. Since the JPA provider does that already, I am thinking of a lightweight tracking mechanism. The best that I have been able to come up with was tracking method calls to the collection and replaying them on the collection of the entity.
Updateable subviews
Supporting updateable subviews requires some change to the change recognition as we have to go into the subview and check for changes there too. This shouldn't be a big deal, but then again, the version field semantics have to be tested.
Cascading updates of relations and subviews
Subviews can be supported automatically as we are tracking changes to them, but when having *ToOne relations mapped in the entity view, it's not so easy.
We need some kind of mechanism to check if an entity is dirty so we can merge it. Note that we can also have updateable relations in subviews!
Dynamically generated delegating proxy classes
Apart from our very efficient proxy classes, we also have to generate proxy classes that do delegation to instances of a compatible type. In case of updateable entity views, the delegating proxy class also has to implement the UpdateableProxy class properly.
It should be possible to create an entity view A by

Entity that is an instance of the entity for which the entity view A is => This requires a JPQL expression interpreter(Note: we should interpret lazily)
Entity view that is a subtype of entity view A => Simple delegation
Entity id => will use em.getReference

Moving this to 1.2.0 because the scope has been broadened too much already.

Moving to 1.4.0 as the experimental version is already done.

Closing as most of the thing are done. I created issues for the other stuff.


Remove VM GUID from static fields in chargeback report

Static fields are columns which are displayed on
(chargeback) report always (selection is not needed) but
Vm Guid doesn't belong to static fields and it can be
selected from available fields in report definition.
Accidentaly added here
@miq-bot add_label reporting, chargeback, bug
@miq-bot add euwe/yes
@miq-bot assign @gtanzillo

@miq-bot add_label euwe/yes

:+1:

Euwe Backport details:
$ git log -1
commit 51f91dd0b047ac487a2f575ca3900409e9c29aac
Author: Gregg Tanzillo<EMAIL_ADDRESS>Date:   Mon Oct 24 19:44:15 2016 -0400

    Merge pull request #12123 from lpichler/remove_vm_guid_from_static_fields

    Remove VM GUID from static fields in chargeback report
    (cherry picked from commit 95a5536b093ede9409e12accfcf2084966e37962)


qx create --type server

If you create an server application and compile it
qx create myapp --type server -I qx compile
you get boot.js and index.html in myapp dir. In this case index.html is not needed and boot.js should be renamed to myapp.js so that it can be run in node with this name.
@johnspackman: If you have a hint where this is handeled i can  prepare a PR.

closed with merge of   #126


CI: makefile to deploy the image

This is the makefile to deploy the image inside quay repo.

@eloycoto you need to run yarn prettier --write . to fix the formatting that is failing the build.


[Wallet] Add deep links for any screen

Description
Added the ability to send deep links to any screen. The first use case of this will be a web page shown on a WebView which will have a button that will redirect to the cash in screen. The WebView has to redirect to celo://wallet/openScreen?screen=FiatExchangeOptions&isAddFunds=true which will redirect to the FiatExchangeOptions screen.
Tested
I used a custom HTML:

Click me

and clicked on the Click me link. The app redirected me to the FiatExchangeOptions screen.
Related issues

Fixes #6398

This seems like a dangerous capability, this opens the door to (advanced) people abusing this.
What is the need behind this?
Also as is, because it's quite low level, it could easily break existing links if we rename screens.
And it doesn't check the parameters passed are correct.

This seems like a dangerous capability, this opens the door to (advanced) people abusing this.
What is the need behind this?
Also as is, because it's quite low level, it could easily break existing links if we rename screens.
And it doesn't check the parameters passed are correct.

This seems like a dangerous capability, this opens the door to (advanced) people abusing this.
What is the need behind this?
Also as is, because it's quite low level, it could easily break existing links if we rename screens.
And it doesn't check the parameters passed are correct for the screens it's trying to open.

Well, for now we just need a deep link to the cash in screen, but I'm pretty sure that over time people will start requesting for more and more deep links to different parts of the app. I was trying to get ahead of those likely requests and have them be able to deep link to anywhere in the app without requiring an update.
I know there were some edge cases where this didn't work (if a screen has nested parameters por example), but it was meant only for internal use, so the renaming of screens and not checking parameters didn't seem worrisome to me.
Anyways, I agree it opens the door to abuse, so I just changed it to a simple cashIn deep link :)

This seems like a dangerous capability, this opens the door to (advanced) people abusing this.
What is the need behind this?
Also as is, because it's quite low level, it could easily break existing links if we rename screens.
And it doesn't check the parameters passed are correct for the screens it's trying to open.

Well, for now we just need a deep link to the cash in screen, but I'm pretty sure that over time people will start requesting for more and more deep links to different parts of the app. I was trying to get ahead of those likely requests and have them be able to deep link to anywhere in the app without requiring an update.
I know there were some edge cases where this didn't work (if a screen has nested parameters por example), but it was meant only for internal use, so the renaming of screens and not checking parameters didn't seem worrisome to me.
Anyways, I agree it opens the door to abuse, so I just changed it to a simple cashIn deep link :)

Thanks! Yes completely agree we need this capability! Let's just take the right amount of time to make it right.

Thanks! Yes completely agree we need this capability! Let's just take the right amount of time to make it right.

Cool! Be sure to update the PR title and description with the new behavior 🙏

Cool! Be sure to update the PR title and description with the new behavior 🙏

Cool! Be sure to update the PR title and description with the new behavior 🙏

Cool! Be sure to update the PR title and description with the new behavior 🙏

Hi @gnardini We have verified this task on latest Testflight build 1.8.0(40) & Android internal build 1.8.0 and observe the following scenarios.

User should able to redirect Add funds page by using celo://wallet/cashIn deeplink when app is open in background.
User should able to redirect Add funds page after by using celo://wallet/cashIn deeplink when app is closed state.
Safari cannot open this page because the address is invalid message is shown when user try to open celo://wallet/cashIn deeplink when app is not installed

Can you please let us know if we need to test anything else in this task.

Hi @gnardini We have verified this task on latest Testflight build 1.8.0(40) & Android internal build 1.8.0 and observe the following scenarios.

User should able to redirect Add funds page by using celo://wallet/cashIn deeplink when app is open in background.
User should able to redirect Add funds page after by using celo://wallet/cashIn deeplink when app is closed state.
Safari cannot open this page because the address is invalid message is shown when user try to open celo://wallet/cashIn deeplink when app is not installed

Can you please let us know if we need to test anything else in this task.


Arduino 101 / ARC:  tests/kernel/fifo/fifo_api/ fails after 3d9ba10b5c903265d870a9f24065340d93e7d465

Starting said commit:
    arch: arc: bug fixes and optimization in exception handling

    The original exception handling has space to optimize and
    and some bugs need to be fixed.

    * define NANO_ESF
       * add the definition of NANO_ESF which is an irq_stack_frame
       * add the corresponding codes in exception entry and handler
       * remove _default_esf
    * implement the _ARCH_EXCEPT
       * use trap exception to raise exception by kernel
       * add corresponding trap exception entry
       * add _do_kernel_oops to handle the exception raised by
         _ARCH_EXCEPT.
    * add the thread context switch in exception return
       * case: kernel oops may raise thread context switch
       * case: some tests will re-implement SysFatalHandler to raise
         thread context switch.
       * as the exception and isr are handled in kernel isr stack, so
         the thread context switch must be in the return of exception/isr
         , and the exception handler must return, should not be decorated
         with FUNC_NORETURN
    * for arc, _is_in_isr should consider the case of exception

    Signed-off-by: Wayne Ren<EMAIL_ADDRESS>
running on Arduino 101's ARC (and suspected some other ARC platforms and testcases) fail with:
***** delaying boot 1000ms (per build configuration) *****
***** Booting Zephyr OS v1.11.0-875-gd9cdf7bf30 (delayed boot 1000ms) *****
Running test suite fifo_api
===================================================================
starting test - test_fifo_thread2thread
PASS - test_fifo_thread2thread.
===================================================================
starting test - test_fifo_thread2isr
Exception vector: 0x3, cause code: 0x6, parameter 0x0
Address 0x1cf8c0f0
Current thread ID = 0xa8000588
Faulting instruction address = 0x1cf8c0f0
Fatal fault in thread 0xa8000588! Aborting.
Exception vector: 0x3, cause code: 0x6, parameter 0x0
Address 0x1cf8c0f0
Current thread ID = 0xa8000588
Faulting instruction address = 0x1cf8c0f0
Fatal fault in thread 0xa8000588! Aborting.
Exception vector: 0x3, cause code: 0x6, parameter 0x0
Address 0x1cf8c0f0
Current thread ID = 0xa8000588
Faulting instruction address = 0x1cf8c0f0
Fatal fault in thread 0xa8000588! Aborting.
Exception vector: 0x3, cause code: 0x6, parameter 0x0
Address 0x1cf8c0f0
Current thread ID = 0xa8000588
Faulting instruction address = 0x1cf8c0f0
Fatal fault in thread 0xa8000588! Aborting.
Exception vector: 0x3, cause code: 0x6, parameter 0x0
Address 0x1cf8c0f0
Current thread ID = 0xa8000588
Faulting instruction address = 0x1cf8c0f0
Fatal fault in thread 0xa8000588! Aborting.
Exception vector: 0x3, cause code: 0x6, parameter 0x0
Address 0x1cf8c0f0
Current thread ID = 0xa8000588
Faulting instruction address = 0x1cf8c0f0
Fatal fault in thread 0xa8000588! Aborting.
Exception vector: 0x3, cause code: 0x6, parameter 0x0
Address 0x1cf8c0f0
Current thread ID = 0xa8000588
Faulting instruction address = 0x1cf8c0f0
Fatal fault in thread 0xa8000588! Aborting.
Exception vector: 0x3, cause code: 0x6, parameter 0x0
Address 0x1cf8c0f0
...

the exception loop repeats for ever, the board is stuck there.

Also affects tests/kernel/mem_pool/mem_pool_api:
Running test suite mpool_api
===================================================================
starting test - test_mpool_alloc_free_thread
PASS - test_mpool_alloc_free_thread.
===================================================================
starting test - test_mpool_alloc_free_isr
***** delaying boot 1000ms (per build configuration) *****
***** Booting Zephyr OS v1.11.0-725-gf10fddeb56 (delayed boot 1000ms) *****
Running test suite mpool_api
===================================================================
starting test - test_mpool_alloc_free_thread
PASS - test_mpool_alloc_free_thread.
===================================================================
starting test - test_mpool_alloc_free_isr
***** delaying boot 1000ms (per build configuration) *****
***** Booting Zephyr OS v1.11.0-725-gf10fddeb56 (delayed boot 1000ms) *****
Running test suite mpool_api
===================================================================
starting test - test_mpool_alloc_free_thread
PASS - test_mpool_alloc_free_thread.
===================================================================
starting test - test_mpool_alloc_free_isr
***** delaying boot 1000ms (per build configuration) *****
***** Booting Zephyr OS v1.11.0-725-gf10fddeb56 (delayed boot 1000ms) *****
Running test suite mpool_api
===================================================================
...

fixed.


Greenkeeper/sequelize 4.33.4

Coverage remained the same at 8.141% when pulling 832fedf083c8d8afca31e1e8c64bd5df8eda5d0b on greenkeeper/sequelize-4.33.4 into 7ce2c94643caf2d5bc0ad387fc3484ac49fefd2a on master.


Remove power distribution results from Report objects

Instead, this PR makes the power distribution results available directly from the *Pools.
This should go some way towards reducing the frequency of Report objects

Draft until channel release with filter on receivers.

Based on #1000.

This is now ready.  ReceiverFetcherWith is internal, but still could use a better name I think, if anyone has any ideas.

This is now ready. ReceiverFetcherWith is internal, but still could use a better name I think, if anyone has any ideas.

Who doesn't like to get involved in a nice and long name discussion? :laughing:


[ci_setup] Fix error pertaining to GPG signature keys for EPEL repositories.

This change should resolve the below error
TASK [ci_setup : Install EPEL] *************************************************
fatal: [instance]: FAILED! => changed=false
  msg: 'Failed to validate GPG signature for epel-release-9-7.el9.noarch: Public key for epel-release-latest-9.noarch10woiruw.rpm is not installed'

As a pull request owner and reviewers, I checked that:

[x] Appropriate testing is done and actually running

recheck

/lgtm
/approve


fix: add sidebar to "local development pages"

Add new Lit component "Sidebar Element" to be used on all pages (local development), to make it easier to navigate between components.

I made some style adjustments by copying style from Fabric's markdown.css.


Forced formatting of time to not wrap

This fixes the formatting of the time to not wrap and makes the layout more compact.

Wrong repo


[Feature]: ODC 42x supports connection cloning functionality

Is your feature request related to a problem?
The connection cloning function is a function that was removed from odc 420.
Describe the solution you'd like
ODC 42x supports connection cloning functionality
Additional context
No response

similar：https://github.com/oceanbase/odc/issues/374


update from URL is not working

...fails silently

Same here

@pbanaszkiewicz @chrismedrela @narayanaditya95  Can we prioritize this? We need to be able to keep our records up to date.

@maneesha I apologize for such delay, I've just deployed v1.10.1 and it should work now.


added gradient-x

I added some code to make the gradient_x opencl kernel available

Codecov Report
Base: 77.55% // Head: 77.67% // Increases project coverage by +0.12% :tada:

Coverage data is based on head (f7202a8) compared to base (755521a).
Patch coverage: 97.29% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #113      +/-   ##
==========================================
+ Coverage   77.55%   77.67%   +0.12%
==========================================
  Files         155      158       +3
  Lines        7894     7941      +47
==========================================
+ Hits         6122     6168      +46
- Misses       1772     1773       +1

Impacted Files
Coverage Δ

clic/include/core/clesperanto.hpp
91.66% <ø> (ø)

tests/gradient_x_test.cpp
95.23% <93.75%> (ø)

clic/include/tier1/cleGradientXKernel.hpp
100.00% <100.00%> (ø)

clic/src/core/clesperanto.cpp
89.23% <100.00%> (+0.06%)
:arrow_up:

clic/src/tier1/cleGradientXKernel.cpp
100.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.

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


⚠ Bofrost.lu has degraded performance

In 879bf90, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1966 ms

Resolved: Bofrost.lu performance has improved in e1d9fe3 after 6 minutes.


[BUG] Players that left the game mid air get kicked for flying while trying to login

Describe the bug
If a player leaves the game mid-air and, joins after the session expired if the server is with allow-flight=false the player will get kicked since this mod won't let him land on a block
To Reproduce
Steps to reproduce the behaviour:

Enter to a server with allow-flight=false
Start jumping randomly
Leave the game mid-air
Wait until your session expired
Try joining the game

Expected behaviour
When a player joins mid-air, the mod should let him land on a block and then lock the movement, or, instead, teleport him to the ground right after joining the game.

Hi, thanks for the report. I'll dive into it later.

This should be now resolved. Config will have option allowFalling which can be enabled if you have such problems. This will enable players to fall (and take damage) properly.


Russian Translation of Getting Started

[x] Learn how Free Code Camp Works
[x] Create a Github Account and Join our Chat Rooms
[x] Configure your Code Portfolio
[x] Join a Free Code Camp Group in Your City
[x] Read Coding News on our Medium Publication
[x] Learn What to Do If You Get Stuck

this issue suppose to be on this repo https://github.com/FreeCodeCamp/TranslationExpansion/issues

@texas2010 will keep this in mind for future


StateFlow causes stack overflow

I started with a working code that only operates pass-by-value serializable data classes. I converted one of the methods to return a StateFlow<T> instead of T:
// before (works)
override fun myZiplineServiceMethod(): MyType = _myValue
private var _myValue: MyType = someInitialValue

// now (doesn't work)
override fun myZiplineServiceMethod(): StateFlow<MyType> = _myValue
private val _myValue: MutableStateFlow<MyType> = MutableStateFlow(someInitialValue)

On the client-side the only difference is that I now call .value to get the value.
The zipline part compiles fine, but I get a crash at runtime, when I call .value:
Exception in thread "main" app.cash.zipline.QuickJsException: stack overflow
	at app.cash.zipline.JniCallChannel.call(Native Method)
	at app.cash.zipline.JniCallChannel.call(JniCallChannel.kt:25)
	at app.cash.zipline.Zipline$endpoint$1.call(Zipline.kt:65)
	at app.cash.zipline.internal.bridge.OutboundCallHandler.callInternal$zipline(OutboundCallHandler.kt:116)
	at app.cash.zipline.internal.bridge.OutboundCallHandler.call(OutboundCallHandler.kt:75)
	at app.cash.zipline.internal.bridge.StateFlowZiplineService$Companion$Adapter$GeneratedOutboundService.getValue(flows.kt:34)
	at app.cash.zipline.internal.bridge.StateFlowSerializer$toStateFlow$1.getValue(flows.kt:145)
        [here my client code calls .value on a StateFlow instance it received from zipline]

I used to get this error before when there were circular dependencies in my pass-by-value data classes which makes sense (also I would appreciate a more meaningful error message). But what happens here I have no idea.
I also tried using regular Flows before discovering from a random issue that StateFlows are supported too (please please work on the docs!) and with minimal changes got a QuickJs cannot read property "set_value_v1vabv_k$" of undefined and a SIGSEGV (!) on two separate occasions with even less info to work with. This is out of scope of this issue though.

Update:
Apparently the problem only occurs when .value is taken outside the context of the single-threaded dispatcher.


HTTP: Drop extraInfoExtractor

This feature isn't used in any official nor open source community reporting component.
And it's not a proper solution for debugging.
Let's drop dead code.

Hi @slandelle
May be we really don't find some standard way to do this and misused gatling somehow,
but in our company we use this as a hook for our custom reporting solution
We have all data under control, we:

fulfill simulation.log with extra data what was send and what was got
after hook we read this simulation.log with extra data and generate csv files with required for us
after hook we push csv as Parquet on S3
I really don't see how this can be implemented now, so this block for now with library upgrade
Thanks.


Added Sparkle CocoaPod

Framework for setting up App Update

Added Sparkle CocoaPod Framework to implement App Updates.

You will need to use this guide to finish the rest of the steps. It is 100% free using heroku.
https://elements.heroku.com/buttons/pierredavidbelanger/githubappcaster


BZ-1256700 Fixed GetAchievedMilestones to return results for complete…

…d cases

Merged (and additional test added)
http://github.com/droolsjbpm/jbpm/commit/261fd61d8


ORC-486 - Automatic counters on the homepage

thanks for the review @clementprdhomme . it should be ready for another review


OpenAI endpoints don't support canceling request

Using the latest development branch, I noticed in testing the OpenAI endpoints (chat_completion) that there is an issue with canceling the request if the user cancels the query for example.
If a user kills their query, the inference request is never interrupted and the inference continues unabated and further requests to the API seem to just sit there forever.
Edit: After more research, the issue is related to: https://www.postgresql.org/message-id/flat/CAFYwGJ3%2BXg7EcL2nU-MxX6p%2BO6c895Pm3mYZ-b%2B9n9DffEh5MQ%40mail.gmail.com
I saw there was another thread a couple years later, but it seems like nothing ever was done: https://www.postgresql.org/message-id/flat/CAB0yrek0C9ioVoaTiPUXy4GKzHxuf8aSc3%2BkrCCSK_Emxwf4nQ%40mail.gmail.com
So, at this point I am researching ways to use the async client to get the desired behavior:

It will cancel the request on the inference server when the user requests to cancel their query,
It will react quickly to the users request to cancel their query.

Will update when I have more info.

Alright, have something working finally: https://github.com/Tostino/pgai/commit/6163939882de4074c1fa351a17a7a387d1247178
This moves things to use the async client and handles checking for cancelled queries.
This also properly supports timeout now.
The behavior is much better when things aren't on the "happy path" as far as my testing goes.

Hey @Tostino thanks for this. As I said in my previous message, we are finishing a new big feature. Once we finish the release (we are almost done) we are going to look into your issues.

Hey @Tostino , can you open a PR with your changes? That way it'll be easier to iterate over it. Thanks :)

Yeah, I need to rebase on the main branch first and then i'll open a PR.


Failed to Upload image file using POST request body

Codes
import 'dart:io';
import 'package:dio/dio.dart';
import 'package:path/path.dart';

class Uploader {
  // real credentials for testing purpose, you can try it
  static Options options= new Options(
      baseUrl: 'https://parseapi.back4app.com',
      headers: <String, String>{
        'X-Parse-Application-Id': 'YtoxICpUQVRdQT96DUAdkGuk85unFzfuOUomHALP',
        'X-Parse-Client-Key': '8OELUgIMBuEVNECy3jioGmDvf7QSyshVLshqNS6N',
      }
  );
  final _dio = new Dio(options);

  static void upload(File profile) async {
    print(profile.path);
    final name = basename(profile.path);
    final ext = extension(profile.path).replaceAll('.', '');
    _dio.options.data = await profile.readAsBytes();
    _dio.options.contentType = ContentType.parse('image/$ext');
    Response response = await _dio.post('/files/$name');
    print(response);
  }
}

Outputs
{
  "url": "https://parsefiles.back4app.com/H6667u06Gy6xrudPQP5NpemUxLFAibSkMS2gjyv9/e7e677d2e650ac5838abc555ba87fbda_f9a49214-bfbd-49d7-9e44-12ff0b868ad97903289065744838690.jpg",
  "name": "e7e677d2e650ac5838abc555ba87fbda_f9a49214-bfbd-49d7-9e44-12ff0b868ad97903289065744838690.jpg"
}

By seeing the output, this file uploaded successfully. But when I open the url link generated from the server it show a blank image. What about the right way to upload image using POST request body?

https://github.com/flutterchina/dio/blob/flutter/README.md#sending-formdata

Please update to v1.0.12 and try again.

What If we directly wants to pass file object in data as below? Can we?
Would like to pass file in body without any kind of conversions.
static void upload(File profile) async {
    print(profile.path);
    final name = basename(profile.path);
    final ext = extension(profile.path).replaceAll('.', '');
    _dio.options.data = profile;
    _dio.options.contentType = ContentType.parse('image/$ext');
    Response response = await _dio.post('/files/$name');
    print(response);
  }

If anyone sending an image to PHP laravel server. Then make sure to reduce the size of the image. It worked for me after reducing the image size.


Syncing our list of bad user agents with apache-ultimate-bad-bot-blocker list

Description
We are currently covering 6% of the bad bots listed at https://raw.githubusercontent.com/mitchellkrogza/apache-ultimate-bad-bot-blocker/master/Apache_2.4/custom.d/globalblacklist.conf.
$ cat globalblacklist.conf. | grep bad_bot | cut -d")" -f2 | cut -d"(" -f1 | while read UA; do curl localhost?XXX10 -H "User-Agent: $UA"; done
...
$ cat /apache/logs/access.log | grep XXX10 | grep -v "Require not" | alscorein | sucspercent
                         Entry        Count Percent
---------------------------------------------------
                             5           38   5.97%
                             0          599  94.03%
---------------------------------------------------
                         Total          637 100.00%

Not quite sure in which file the would fit or how to split the list.

We have at least these issues created:

#2638
#2645
#2648
#2646
Probably you can add this information to any of those, and maybe close this one?

Happy to do so. But let's first decide how to handle this. I think this bad bot list is super extensive and not really categorized very well. Its grouping does not match ours. And our rules / data files are somewhat arbitrary on top.
So how do we want to approach this?

Well, I have questions also, but no answers:

where is the line between a crawler, a bot, or a scanner? once we draw that line, we can move things around.
there are some comments around this in https://github.com/coreruleset/coreruleset/issues/2638 that might want to explore.

My general answer on how to approach this will be:

systematic and repeatable.
and, most importantly, scriptable.

@dune73 Any news here?

Getting there.

We decided to drop most UA detection for CRSv4. So I'm closing this.


a button to pause carousel during slides

a button to pause carousel during slides

a button to pause carousel during slides

hello did you find a function to pause the slide?

Developer notes: reference https://github.com/shbatm/MMM-Carousel/blob/c368e895d38069ea100d35980ae871b6a0acc711/MMM-Carousel.js


Accepting suggestion to join nearby lines does not do anything

Description
I copied and pasted a whole crosswalk, and then it suggested 2 connections:

the crossing node (I accepted and it worked)
the endpoint node, which I can click but nothing happens

Screenshots

Version
2.1.1
What browser are you seeing the problem on? What version are you running?
Chrome 115.0.5790.173 64-bit
The OS you're using
Windows 11
Steps to reproduce
Copy a crosswalk and paste it at another intersection where there are sidewalks but not an existing crosswalk, then accept the suggestions for connecting geometry that is nearby
The browser URL at the time you encountered the bug
https://rapideditor.org/edit?#background=Bing&datasets=fbRoads,msBuildings&disable_features=boundaries&gpx=https://mwai-tasking-manager-production-api.mapwith.ai/api/v2/projects/149/tasks/queries/gpx/%3Ftasks%3D158&id=w-25&map=20.63/40.64022/-73.98979
The auto-detected useragent string for your browser (leave blank if you're manually filling this form out)
No response

this might actually be working but has a lag effect sometimes,not clear to me

When I try it, it does look like I'm able to generate an actual error.
I was able to make a first connection but got this when making the second connection.


Wallpaper previously working via "services.xserver.desktopManager.wallpaper.mode" quit working after update.

Describe the bug
Though the associated feh command works fine in the terminal, this option has stopped working despite no changed to the wallpaper was made. If I manually set it, the wallpaper requires manual setting again upon reboot.
I have talked to other users who can no longer get this option to work either. This issue persists on all three machines that I manage.
https://github.com/NixOS/nixpkgs/commits/nixos-24.05/nixos/modules/services/x11/desktop-managers/default.nix
Steps To Reproduce
Steps to reproduce the behavior:

... Reboot
...
...

Expected behavior
Wallpaper to display as it did previously.
Notify maintainers
@jtojnar

Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 6.6.36, NixOS, 24.11 (Vicuna), 24.11.20240629.2741b4b`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.18.4`
- channels(root): `"nixos"`
- nixpkgs: `/nix/store/g83ji892byw4wd81rmb14v69yrhq408s-source`

Add a :+1: reaction to issues you find important.

What desktop environment do you use?
Personally, I would just remove the option as I think it is a hack that does not compose well with different DEs, resulting in issues like this.

Thank you for your reply.
I use Qtile. This option was working great on all three computers for my whole time on NixOS until a recent update. I can fix it in a variety of ways, of course, but wanted to do it "the Nix-way."
I think we should either make the option reliable or depreciate the option. Or, at a minimum, make a note in the documentation to its limited-use cases and maybe link to another method.
Thanks again. I hope to learn enough that someday I can understand the inner workings sufficiently that I could efficiently diagnose what the cause it and assess what it would take to fix it.

I vaguely recall someone saying years ago that feh works by drawing in the X server root window. So if anything does that for whatever reason too, the background will be overwritten.
I would recommend preferring DE/WM-native way of setting wallpaper when available since if the above is true, feh is inherently unreliable.
I found this for Qtile: https://old.reddit.com/r/Ubuntu/comments/jv0v3d/comment/hj719oc/

I would recommend preferring DE/WM-native way of setting wallpaper when available since if the above is true, feh is inherently unreliable.

I went with your recommendation and integrated the wallpaper with Qtile directly.
Thank you.
I still think a note or depreciation of the option could be in order.
Thanks again.

I still think a note or depreciation of the option could be in order.

That would be nice but we would probably want to plan a removal and I am not aware of anyone maintaining the xserver module. Plasma already stopped using it and I am hoping to do the same for GNOME as soon as I can.


Dropping Python 3.4, 3.5 and adding 3.7 to CI

Dropping Python 3.4, 3.5 tests
In some test cases, for example:

test/test_engine/test_find.py

test_find_2
test_find_3

tests/test_engine/test_update/test_update.py

test_update_positional_filtered_near_conflict
test_update_positional_filtered_has_conflict_1

tests/test_engine/test_update/test_update_pull.py

test_update_pull_6
test_update_pull_7

They often failed randomly due to the dict key order in run-time. I think, unless changing those test case documents into OrderedDict, or can not ensure the key order input into monty and mongo were the same ( which may cause different output ).
Since this is not the issue of montydb's functionality, dropping them for good.
Involving Python 3.7
Well, it's 2019.

Implemented in 06a2cc5

This should be resovled by changing query fields in tests from keys in nested dict into dot notaioned flat dict.

Many projects that I have seen are ignoring Python<3.6 already, re-close this.


Updating tailwindcss - how?

I just started to try this create-nuxt-app and were happy to see that i could select tailwindcss but i can see that it's an old version and i can't figure out how to update it to the latest version (0.4.1)
Can anyone help me? :)
UPDATE - I found out that i can use the node-module instead but why isn't it using this by default?

Did something break after updating the dependency?

I found out that i can use the node-module instead but why isn't it using this by default?

what should be used by default?

Nothing broke by updating the dependency. The dependency wasn't imported in the .nuxt/App.js file - it was a static tailwind.css file instead.
It's probably me who are doing something wrong, but i changed the import in the .nuxt/App.js to the tailwind node-module css instead.


Add files via upload

Add school

@PasqualeMainolfi Please provide us with an URL of a page on the official website where the school offers an IT-related long-term (>1 year) course

https://www.consalerno.it/

Il giorno 10 dic 2021, alle ore 08:05, Philip Torchinsky @.***> ha scritto:

@PasqualeMainolfi Please provide us with an URL of a page on the official website where the school offers an IT-related long-term (>1 year) course
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

@PasqualeMainolfi Thank you! You might misunderstand the question.
This school is not a technical school, but a musical school. Thus, we have to ensure that students of this school will use the free licenses for educational purpose, not for giving them out to their friends outside of the school. Thus, I have to check what are IT-related courses you study.
Please send me the link to the IT-related long-term course description, not to a homepage of the school.
Thank  you for your understanding.

I teach computer science apply to music, you can find my courses under the acronym COME/05 at https://www.consalerno.it/didattica/corsi
Thank you!

Il giorno 10 dic 2021, alle ore 09:07, Philip Torchinsky @.***> ha scritto:

@PasqualeMainolfi Thank you! You might misunderstand the question.
This school is not a technical school, but a musical school. Thus, we have to ensure that students of this school will use the free licenses for educational purpose, not for giving them out to their friends outside of the school. Thus, I have to check what are IT-related courses you study.
Please send me the link to the IT-related long-term course description, not to a homepage of the school.
Thank you for your understanding.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

@PasqualeMainolfi Thank you for the clarification. Pull request merged.


Profile tsv format

While csv/tsv are not really well-defined specs, there are a couple of things about the new profile output that are a bit challenging with a couple of parsers I've used.

Include a "comments" (or something) column header in line 4 after relative_abundance. Right now, there are only 3 valid columns there, so that line can't be parsed as a header if desired.

Include taxids for _unclassified clades. My preference would be to use the upstream ids, and then a trailing | or something.
For example, I have one row that's
...|g__Ruminococcaceae_unclassified|s__Clostridium_leptum\t2|1239|186801|186802|541000||1535

And another that's
...|g__Ruminococcaceae_unclassified\t

with nothing in the taxid column (leading to a missing or NA when parsed). Could that be
2|1239|186801|186802|541000| as the taxid instead?

Having hashes in the comments column (column 4) doesn't do much, since there's a tab before them, meaning that a column is added even if they're parsed as comments. I think better to keep the column, but maybe remove the hash?

Thank you for the suggestions Kevin, the latest commits include all these fixes


Mistakenly labels GeneralizedNewtypeDeriving pragma as unused

I'm using text-show, which exports a typeclass called Show. When I use this version of Show in conjunction with GeneralizedNewtypeDeriving, HLint believes that the GeneralizedNewtypeDeriving extension isn't needed (as if text-show's Show were being derived like base's Show) when it actually is. As an example:
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Main (main) where

import Prelude hiding (Show, print)
import Text.Show.Text (Show, print)

newtype MyInt = MyInt Int deriving Show

main :: IO ()
main = print (MyInt 42)

Running hlint on this will yield:
MyInt.hs:1:1: Error: Unused LANGUAGE pragma
Found:
  {-# LANGUAGE GeneralizedNewtypeDeriving #-}
Why not remove it.

1 suggestion

HLint doesn't do name resolution (it is purely syntactic) so I don't think that this will be possible to fix.

HLint has some approximate name resolution, and in this case it might actually be enough to figure out that Show /= Prelude.Show, and thus skip the hint.

Hmm, it's possible to figure out it's not equal to Prelude.Show, but lots of modules reexport type classes, and in those instances they genuinely won't be equal to Prelude.Show (I count 6 such modules on Hackage), so I don't think there's much I can do about it - unless anyone has any good suggestions?

That's unfortunate, but I can see why this would be difficult to implement. Thanks for looking into it!


Create Client from Authorization Token

Description
I'm currently working on an application where I need to verify Pocketbase-Users in an external API.
This means that I needed to send an auth-refresh request to Pocketbase for verification.
Additionally, as the Authorization Token changes after this request, I needed to pass the fresh token back to the user.
Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

Changes
Wrapped authorizer-Interface with the authStore-Interface which adds the Methods IsValid, for checking Token expiration and Token, for retreiving the Token. Similar to the authStore from other Pocketbase-SDKs.
Added type authorizeToken which implements the authStore-Interface.
authorize sends an authRefresh request to Pocketbase.
Added the options WithAdminToken and WithUserToken which instantiate the authorizeToken as the underlying authorizer for the Client.
client := pocketbase.NewClient("http://localhost:8090"<EMAIL_ADDRESS>"admin@admin.com"))
client.Authorize()
client = pocketbase.NewClient("http://localhost:8090", WithAdminToken(client.AuthStore().Token()))
// client can proceed with more requests

How Has This Been Tested?
Added Tests to client_test.go and also ran "example/main.go" with a second client created with the Token Option.
Test Configuration:

Go version: 1.20.2
Hardware: WSL2 - Ubuntu-20.04

I would appreciate some feedback as I'm relatively new to Golang.
Also feel free to point out errors or things where I can improve on in this code.

Hi @hsedr, thanks for this PR. I'll review it this week.

Hi, @hsedr can you merge with master and then apply the little fix to make the linter happy?

@hsedr thank you, merged.


This software ，Whether can join the age, sex identification

face_recognition version:
Python version:python3.5
Operating System:Linux

Description
Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.
What I Did
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.

No, just face recognition.


[flutter release] track metrics related automated cherry pick

Come up with ways to track useful metrics related to automated cherry pick
which metrics we are interested in, and how to write from github to plx?
potential approach: write comment to an open issue, and use github query api to collect metrics. (subject to public users not spamming our open issue)

from triage: Jesús suggested checking the comment event through github webhook on FRoB.


VM hosted Sql Server as Hub?

[Enter feedback here]
Is it possible to use Sql server hosted on a VM to act as hub? Member servers are Azure Sql Servers.

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

ID: 791801be-835a-7b8d-106a-53f5e9f8eb66
Version Independent ID: 740ebf2f-8f09-1869-6d78-2b7242aab4ec
Content: Data Sync - Azure SQL Database
Content Source: articles/sql-database/sql-database-sync-data.md
Service: sql-database
Sub-service: data-movement
GitHub Login: @stevestein
Microsoft Alias: sstein

@vaibhavramdasi We are checking this and will get back to you.

@vaibhavramdasi The answer is no. As the document says shown below:
"The Hub Database must be an Azure SQL Database."

Hope this helps.

@vaibhavramdasi Please let us know if you need any further help regarding this thread.

@vaibhavramdasi We are going ahead and closing this thread for now. Please get back to us for any questions.


Change the method of obtaining the classpath

Change the method of obtaining the classpath. The old method is to get the URLClassPath(ucp) field in the URLClassLoader. This class is a java class that is not recommended to be used and has no access in JDK9. Therefore, an equivalent implementation has been changed.

Pull Request Test Coverage Report for Build 186

5 of 11 (45.45%) changed or added relevant lines in 3 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage decreased (-0.2%) to 32.059%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

sofa-ark-parent/core/spi/src/main/java/com/alipay/sofa/ark/spi/tools/RuntimeUtil.java
3
6
50.0%

sofa-ark-parent/support/ark-support-starter/src/main/java/com/alipay/sofa/ark/support/startup/SofaArkBootstrap.java
0
3
0.0%

Files with Coverage Reduction
New Missed Lines
%

sofa-ark-parent/support/ark-support-starter/src/main/java/com/alipay/sofa/ark/support/startup/SofaArkBootstrap.java
1
0.0%

Totals

Change from base Build 184:
-0.2%

Covered Lines:
1107

Relevant Lines:
3453

💛  - Coveralls

@JoeKerouac  hi, it seems that test coverage declines, can you fix it ?

@QilongZhang the coverage declines cause by i merge some code from master , this code is not belong to me.

@JoeKerouac

The master is ok..

@QilongZhang I think the coverage rate is the same as that of the previous PR #43 , but it still shows that the coverage rate is decreasing. Can I help you to see why?


Eliminate the reference loop between HTTPIncomingMessage and HTTPParser

Description
HTTPParser needs an object to receive the results of the callbacks from the C language http_parser. Unfortunately self can't be used in creating these callbacks. Instead an inner object is created in HTTPParser for receiving callback results from C language http_parser. HTTPParser provides accessor functions for the values stored in the inner object.
Motivation and Context
Solve all sorts of potential memory leaks due to reference loops.
How Has This Been Tested?
KituraNet unit tests have been run along with memory leak tests.
Checklist:

[ ] I have submitted a CLA form
[ ] If applicable, I have updated the documentation accordingly.
[ ] If applicable, I have added tests to cover my changes.

Current coverage is 62.93% (diff: 84.05%)

Merging #161 into master will increase coverage by 0.40%

@@             master       #161   diff @@
==========================================
  Files            26         27     +1
  Lines          2338       2331     -7
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits           1462       1467     +5
+ Misses          876        864    -12
  Partials          0          0

Powered by Codecov. Last update 52b2928...48f498e


Can't import Pod from yaml on WebUI

Follow the below steps and get these error logs.

Create Pod
Create PriorityClass
Export
Reset
Import
Failed ↓

E0531 01:12:28.949622   12592 snapshot.go:58] failed to load all resources: failed to apply():
    sigs.k8s.io/kube-scheduler-simulator/simulator/snapshot.(*Service).Load
        /Users/i196/go_project/kube-scheduler-simulator/simulator/snapshot/snapshot.go:261
  - apply resources:
    sigs.k8s.io/kube-scheduler-simulator/simulator/snapshot.(*Service).apply
        /Users/i196/go_project/kube-scheduler-simulator/simulator/snapshot/snapshot.go:229
  - apply Pod:
    sigs.k8s.io/kube-scheduler-simulator/simulator/snapshot.(*Service).applyPods.func1
        /Users/i196/go_project/kube-scheduler-simulator/simulator/snapshot/snapshot.go:545
  - apply pod:
    sigs.k8s.io/kube-scheduler-simulator/simulator/pod.(*Service).Apply
        /Users/i196/go_project/kube-scheduler-simulator/simulator/pod/pod.go:51
  - pods "pod-hnjhk" is forbidden: the integer value of priority (0) must not be provided in pod spec; priority admission controller computed 1000 from the given PriorityClass name

I think this is due to the fact that PriorityClass is Imported(Apply) first.
/kind bug

/kind bug
/assign

I think this is due to the fact that PriorityClass is Imported(Apply) first.

oops... this is not simple.

create Pod1
create PriorityClass1
create Pod2 (← reference PriorityClass1)
Export
Reset
Import
6-1. import Pod1 (success)
6-2. import Pod2 (failure)
6-3. import PriorityClass1 (skip)

/retitle Can't import Pod correctly from yaml on WebUI

I have some caveats.

If globalDefault is true, all pods that do not have priorityclass are affected.
It is possible that a PriorityClass with the same name but different value existed previously. (maybe edge case)

I don't think it's a good idea, but there is a surefire way.

Pods creation phase.
1-1. Check all Pod's .spec.priorityClassName field
1-2.  If specified, create a dummy priorityclass with the priority value set in the pod.
1-3.  Create the target Pod.
1-4.  Delete the dummy priorityclass.
Priority creation phase.

It may be more efficient if pods with no priorityclass specified are first created in parallel.

/area simulator

/reopen


Bug Report: XfinityHome plugin 401 -timestamp errors

Describe The Bug:
I've been trying to run the XfinityHome homebridge plug in off and on for a couple of versions and have been having issues with it having 401 errors and then seemingly taking down other plugins that communicate with the outside world (e.g. ring &  CarrierInfinity), and causing the homebridge to become generally unresponsive, see system A below.  I've tried running it on a separate child bridge and that doesn't help, once I see a 401 error in the logs, it tends to clobber my other plugins as well.  Each of the other plugins are running on their own separate bridges.  Once I reboot the XfinityHome child bridge (and the other subsequent failed bridges), or homebridge, or the server, everything is fine for a while.  If I disable the XfinityHome plugin child bridge (not running XfinityHome at all), my homebridge system stays up and remains responsive.
Subsequently I've configured a second system to run Homebridge, a Synology DSM (system b below), and only the XfinityHome plugin as a child bridge.  This system also gets a 401 error after a short period of time, and the plugin does not recover.  Restarting the child bridge and its fine for a short time.  Meanwhile my original Homebridge continues to run the other child bridges fine.
My external and internal networks are stable.  Both homebridge systems are using ethernet connections and I'm not experiencing any internal or external network connectivity issues.
Homebridge system configurations:
a) Raspberry Pi Linux Bullseye 11
Node.js v18.12.1 (had the same problems using older Node.js versions)
8GB RAM, 7.12GB available
Typically running around 5% CPU load
Homebridge v1.5.1 - I've had the same problems with older home bridge versions
4 child bridges (when running XFinityHome, 3 now consisting of Ring, CarrierInfinity & Dummy)
1GB wired Ethernet connection directly to router
b) Synology DSM - running 7.1
Node.js v16.16.0
8 GB RAM / 7.1GB available
2% CPU load
Homebridge v1.6.0 - I've had the same problems running 1.5.1
XfinityHome child bridge only.
LAG Ethernet connection to switch then to router.
To Reproduce:
Configure XFinityHome using the instructions provided with the plugin.  The instructions yield a working refresh token, a pin is provided and Log Level is set to 3.  Then let it run a while.
Expected behavior:
Plugin works and provides AppleHomekit support.
Logs:
[11/28/2022, 6:36:59 PM] [Xfinity Home] Panel: Failed To Fetch Target State With Error:  {
  "name": "Error",
  "message": "Request failed with status code 401",
  "request": {
    "method": "GET",
    "protocol": "https:",
    "host": "xhomeapi-lb-prod.codebig2.net",
    "path": "/client/icontrol/device/109c9726ad8acc",
    "headers": [
      "GET /client/icontrol/device/109c9726ad8acc HTTP/1.1",
      "Accept: application/json",
      "Host: xhomeapi-lb-prod.codebig2.net",
      "Content-Type: application/x-www-form-urlencoded",
      "Connection: keep-alive",
      "X-Client-Features: auth4all,carousel,carousel-devicedeeplink,no-cookie,deeplinkV1",
      "Xh-Auth: <redacted>",
      "Authorization: Bearer <redacted>",
      "Accept-Language: en-us",
      "Accept-Encoding: gzip, deflate, br",
      "User-Agent: axios/0.26.1"
    ]
  },
  "response": {
    "statusCode": 401,
    "statusMessage": "Unauthorized",
    "headers": {
      "server": "CodeBig",
      "date": "Tue, 29 Nov 2022 00:36:59 GMT",
      "content-type": "text/plain",
      "transfer-encoding": "chunked",
      "connection": "keep-alive",
      "keep-alive": "timeout=60",
      "www-authenticate": "Bearer realm=\"CIMA\", error=\"invalid_token\", error_description=\"expired timestamp\"",
      "codebig-error-message": "expired timestamp",
      "via": "1.1 CodeBig"
    },
    "data": "expired timestamp\n"
  }
}
[11/28/2022, 6:37:46 PM] [Xfinity Home] Panel: Failed To Fetch Target State With Error:  {
  "name": "Error",
  "message": "Request failed with status code 401",
  "request": {
    "method": "GET",
    "protocol": "https:",
    "host": "xhomeapi-lb-prod.codebig2.net",
    "path": "/client/icontrol/device/109c9726ad8acc",
    "headers": [
      "GET /client/icontrol/device/109c9726ad8acc HTTP/1.1",
      "Accept: application/json",
      "Host: xhomeapi-lb-prod.codebig2.net",
      "Content-Type: application/x-www-form-urlencoded",
      "Connection: keep-alive",
      "X-Client-Features: auth4all,carousel,carousel-devicedeeplink,no-cookie,deeplinkV1",
      "Xh-Auth: <redacted>",
      "Authorization: Bearer <redacted>",
      "Accept-Language: en-us",
      "Accept-Encoding: gzip, deflate, br",
      "User-Agent: axios/0.26.1"
    ]
  },
  "response": {
    "statusCode": 401,
    "statusMessage": "Unauthorized",
    "headers": {
      "server": "CodeBig",
      "date": "Tue, 29 Nov 2022 00:37:46 GMT",
      "content-type": "text/plain",
      "transfer-encoding": "chunked",
      "connection": "keep-alive",
      "keep-alive": "timeout=60",
      "www-authenticate": "Bearer realm=\"CIMA\", error=\"invalid_token\", error_description=\"expired timestamp\"",
      "codebig-error-message": "expired timestamp",
      "via": "1.1 CodeBig"
    },
    "data": "expired timestamp\n"
  }
}
[11/28/2022, 6:45:16 PM] [Homebridge UI] [homebridge-xfinityhome] Terminating child process...
[11/28/2022, 6:45:16 PM] [Homebridge UI] [homebridge-xfinityhome] Child process ended

Note: Both homebridge system times appear to be the in sync with the rest my computers, iOS devices, etc.

Config:
{
    "bridge": {
        "name": "Homebridge",
        "username": "0E:EE:84:98:C2:5B",
        "port": 51810,
        "pin": "255-19-737",
        "advertiser": "bonjour-hap",
        "bind": [
            "bond0"
        ]
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "name": "Xfinity Home",
            "refreshToken": "******",
            "pin": "1597",
            "temperatureSensors": true,
            "logLevel": 3,
            "platform": "XfinityHomePlatform",
            "_bridge": {
                "username": "0E:CA:A4:35:02:C7",
                "port": 52433
            }
        }
    ]
}

Operating System:
Other
Node Version:
18.12.1 & 16.16.0
NPM Version:
8.19.2 & 8.11.0
Homebridge Version:
1.6.0 & 1.5.1
Plugin Version:
2.4.0

Please LMK if there is other information you need to debug the issue.

I've experience this issue on my end as well but only about once a month so I didn't bother to patch it. Now that I know it is a bigger problem I will work on getting a patch out in the near future. I will let you know when it is out.

Cool.  It happens pretty randomly as far as time between restart and when it occurs.  Generally less than 6h.  When I upgraded to the updated version of node.js I was hopeful as it seemed stable for a couple hours.  I don't think I've made it over the 12h mark with it running reliably.  I know I have not made the 24h mark once in the last week on the system that is only running the XfinityHome plug in.

Could you try setting your DEBUG variable in homebridge settings to XHome:Error* and send me a copy of any new logs that show up right before/when it is unresponsive

Variable set.  Will send log information when I get it.

  I've downloaded the log, but don't know when it failed.  Perhaps in the last 4h, but I really don't know, and the log doesn't seem to go back that far.  What message should I look for? What message would you find interesting to diagnose the issue?
Here is the oldest message I was able to get from the log file via the Homebridge UI:
2022-11-29T20:47:32.038Z XHome:Error Request failed with status code 401
2022-11-29T20:47:32.038Z XHome:Error:Info {
name: 'Error',
message: 'Request failed with status code 401',
request: {
method: 'GET',
protocol: 'https:',
host: 'xhomeapi-lb-prod.apps.cloud.comcast.net',
path: '/client/icontrol/delta',
headers: [
'GET /client/icontrol/delta HTTP/1.1',
'Accept: application/json',
'Host: xhomeapi-lb-prod.apps.cloud.comcast.net',
'Content-Type: application/json',
'Connection: keep-alive',
'X-Client-Features: auth4all,carousel,carousel-devicedeeplink,no-cookie,deeplinkV1',
'Xh-Auth: ',
'Authorization: Bearer ',
'Accept-Language: en-us',
'Accept-Encoding: gzip, deflate, br',
'User-Agent: axios/0.26.1'
]
},
response: {
statusCode: 401,
statusMessage: 'Unauthorized',
headers: {
'cache-control': 'no-cache, no-store, max-age=0, must-revalidate',
'content-length': '300',
'content-type': 'application/json',
date: 'Tue, 29 Nov 2022 20:47:31 GMT',
expires: '0',
pragma: 'no-cache',
'strict-transport-security': 'max-age=31536000 ; includeSubDomains',
'www-authenticate': 'Bearer realm="example", error="invalid_token", error_description="The access token expired"',
'x-content-type-options': 'nosniff',
'x-frame-options': 'DENY',
'x-vcap-request-id': '9bc1cb85-97d5-45c9-6ae1-f94fb4a51b11',
'x-xss-protection': '1; mode=block',
xh_fingerprint: '379fe1a5-27e6-466c-9401-1a947c91ba20'
},
data: {
timestamp: '2022-11-29T20:47:32.007Z',
path: '/client/icontrol/delta',
method: 'GET',
fingerprint: '379fe1a5-27e6-466c-9401-1a947c91ba20',
errorCode: 'CIMA_TOKEN_INVALID',
exception: [Object]
}
}
}

Update: It died again today and I caught it earlier than yesterday, somewhere less than 2h from when it died, but unfortunately the transition between working and not had already been lost.  I'll see if I can catch the transition point in the logs, but am not super hopeful as I don't stare at the Apple Home app all the time.

I have re-wrote the whole backend and testing it out. It is currently published as 3.0.0-beta.16. You are welcome to try it out to see if it fixes this error. I will likely be publishing it as the latest release later tomorrow assuming nothing goes wrong.

I've updated to the v3.0.0 release and so far so good.  I suggest we close this and we can re-open or log a new one if it reoccurs.
What I will add I've turned on the Log Watch Dog Errors, and I'm seeing pretty regular: "Watchdog Error: Error: socket hang up" messages.  I can provide those messages here, or in a separate issue, your call.
I've also got a several of "Unknown accessory! messages.... Please open an issue about this".  They relate to all the sensors and a couple of other components.  The alarm does arm and disarm. Shall I log them in one issue or separately for each component?  Again, your call.
Thank you for all your efforts.  I hope you have a Merry Christmas.

What I will add I've turned on the Log Watch Dog Errors, and I'm seeing pretty regular: "Watchdog Error: Error: socket hang up" messages. I can provide those messages here, or in a separate issue, your call.

I've already seen them from my instance, the socket hang up error is basically it timing out, they are harmless and expected

I've also got a several of "Unknown accessory! messages.... Please open an issue about this". They relate to all the sensors and a couple of other components. The alarm does arm and disarm. Shall I log them in one issue or separately for each component? Again, your call.

Please open a separate issue for each type of accessory. (for example, the current plugin has motion sensors, doors, and windows)
Merry Christmas to you too.


"Maximum call stack size" in Canary

I'm testing my first component in different browsers and it seems to work in Chrome stable, Firefox, Safari but not in Canary.
Below are the errors I am receiving these errors
Uncaught RangeError: Maximum call stack size exceeded deprecated.js:12
Failed to load resource: the server responded with a status of 404 (Not Found) http://karan.github.io/polymer/polymer.html
Failed to load resource: the server responded with a status of 404 (Not Found) http://karan.github.io/core-ajax/core-ajax.html
Uncaught ReferenceError: Polymer is not defined sc-embed.html:11

I have no idea why this is happening. I have all experimental features enabled in chrome://flags.
Also, in my gh-pages branch, I have all my code except the dependencies. How is the demo able to work in browsers then? How it it able to find the dependencies? This is throwing me off.

I am running first polymer element on browser but, there is not found text and message in console
Failed to load resource: the server responded with a status of 404 (Not Found)