leaderelection.go:249 Failed to renew lease - failed to tryAcquireOrRenew context deadline exceeded

I have two database instances managed with kubeoperator 0.12.0, they are both based on a custom CRD image of postgres 11.2 that installs the Timescale extension. I host that image on a public docker registry.
These services and their related pods seem to constantly run and then CrashLoopBackOff in a seemingly endless loop... I am at a loss for why this is happening:
The last two things that I did:
I created the second instance of the database (much smaller volume) in order to test restoring one of the snapshots that I setup (i.e. port forwarded to the new database and tested the dumpfile.sql).
→ psql -h localhost -p 3241 -U postgres -1 -f dumpfile_full.sql
I also deleted a variety of the snapshot.kubedb.com that had failed (when I hadn't properly setup Google Cloud Storage) permissions:
NAME                                                        DATABASENAME            STATUS      AGE
snapshot.kubedb.com/lb-timescale-postgres-20190627-141924   lb-timescale-postgres   Failed      5d

The state of the pods constantly going between CrashLoopBackOff and Running:
NAME                                      READY   STATUS             RESTARTS   AGE
pod/example-pod                           1/1     Running            0          20d
pod/kubedb-operator-588fff969f-4h5ff      1/1     Running            0          8d
pod/lb-timescale-postgres-0               0/1     CrashLoopBackOff   180        20d
pod/restore-backup-timescale-postgres-0   1/1     Running            17         84m

→ kubectl describe pod/lb-timescale-postgres-0 -n kubedb
Events:
  Type     Reason   Age                     From                              Message
  ----     ------   ----                    ----                              -------
  Warning  BackOff  2m10s (x1327 over 12d)  kubelet, lightning-badger-1-x1wg  Back-off restarting failed container

The logs with this failed renew lease stuff...
→ kubectl logs service/lb-timescale-postgres -n kubedb
I0702 15:03:38.950680       1 log.go:172] FLAG: --alsologtostderr="false"
I0702 15:03:38.951722       1 log.go:172] FLAG: --bypass-validating-webhook-xray="false"
I0702 15:03:38.951811       1 log.go:172] FLAG: --enable-analytics="true"
I0702 15:03:38.951873       1 log.go:172] FLAG: --help="false"
I0702 15:03:38.951916       1 log.go:172] FLAG: --log-flush-frequency="5s"
I0702 15:03:38.951981       1 log.go:172] FLAG: --log_backtrace_at=":0"
I0702 15:03:38.952015       1 log.go:172] FLAG: --log_dir=""
I0702 15:03:38.952078       1 log.go:172] FLAG: --logtostderr="false"
I0702 15:03:38.952131       1 log.go:172] FLAG: --stderrthreshold="0"
I0702 15:03:38.952180       1 log.go:172] FLAG: --use-kubeapiserver-fqdn-for-aks="true"
I0702 15:03:38.952214       1 log.go:172] FLAG: --v="3"
I0702 15:03:38.952277       1 log.go:172] FLAG: --vmodule=""
We want "lb-timescale-postgres-0" as our leader
I0702 15:03:39.147540       1 leaderelection.go:205] attempting to acquire leader lease  kubedb/lb-timescale-postgres-leader-lock...
I0702 15:03:39.159852       1 leaderelection.go:214] successfully acquired lease kubedb/lb-timescale-postgres-leader-lock
Got leadership, now do your jobs
Running as Primary
2019-07-02 15:03:39.219 GMT [11] LOG:  skipping missing configuration file "/etc/config/user.conf"
2019-07-02 15:03:39.219 GMT [11] LOG:  skipping missing configuration file "/etc/config/user.conf"
2019-07-02 15:03:39.227 UTC [11] LOG:  listening on IPv4 address "<IP_ADDRESS>", port 5432
2019-07-02 15:03:39.227 UTC [11] LOG:  listening on IPv6 address "::", port 5432
2019-07-02 15:03:39.237 UTC [11] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2019-07-02 15:03:39.272 UTC [14] LOG:  database system was interrupted; last known up at 2019-07-02 14:53:30 UTC
2019-07-02 15:03:39.537 UTC [14] LOG:  database system was not properly shut down; automatic recovery in progress
2019-07-02 15:03:39.547 UTC [14] LOG:  redo starts at 0/34A87F60
2019-07-02 15:03:39.547 UTC [14] LOG:  invalid record length at 0/34A87F98: wanted 24, got 0
2019-07-02 15:03:39.547 UTC [14] LOG:  redo done at 0/34A87F60
2019-07-02 15:03:39.863 UTC [11] LOG:  database system is ready to accept connections
2019-07-02 15:03:39.866 UTC [20] LOG:  TimescaleDB background worker launcher connected to shared catalogs
I0702 15:06:08.731635       1 leaderelection.go:249] failed to renew lease kubedb/lb-timescale-postgres-leader-lock: failed to tryAcquireOrRenew context deadline exceeded
Lost leadership, now quit

Anyone have any clue what is going on here?

The only google hits I get on this type of issue is here:
https://github.com/kubernetes/kubeadm/issues/1280
My cluster's resources appear to be without serious pressure...
The pod is available for about 2 minutes and then fails again (fully described pod below):
→ kubectl get pods -n kubedb
NAME                                  READY   STATUS    RESTARTS   AGE
example-pod                           1/1     Running   0          20d
kubedb-operator-588fff969f-4h5ff      1/1     Running   0          8d
lb-timescale-postgres-0               1/1     Running   183        20d
restore-backup-timescale-postgres-0   1/1     Running   19         99m
~/spectral_work/timescale-kubedb ruby-2.3.1 master
→ kubectl describe pod/lb-timescale-postgres-0 -n kubedb
Name:               lb-timescale-postgres-0
Namespace:          kubedb
Priority:           0
PriorityClassName:  <none>
Node:               lightning-badger-1-x1wg/<IP_ADDRESS>
Start Time:         Wed, 12 Jun 2019 10:57:50 +0200
Labels:             controller-revision-hash=lb-timescale-postgres-5bdf969785
                    kubedb.com/kind=Postgres
                    kubedb.com/name=lb-timescale-postgres
                    kubedb.com/role=primary
                    statefulset.kubernetes.io/pod-name=lb-timescale-postgres-0
Annotations:        <none>
Status:             Running
IP:                 <IP_ADDRESS>
Controlled By:      StatefulSet/lb-timescale-postgres
Containers:
  postgres:
    Container ID:  docker://5f0773e3705e6bcfa7066cfb1f55c98a9b4c76ae2a9db5fb540833ab515bb275
    Image:         iamliamc/timescaledb:1.0
    Image ID:      docker-pullable://iamliamc/timescaledb@sha256:3bd61ef487ed6ece162d1e8e2c0eaaaf8edb013db092c92da42ffd4d1a7f63b8
    Port:          5432/TCP
    Host Port:     0/TCP
    Args:
      leader_election
      --enable-analytics=true
      --logtostderr=false
      --alsologtostderr=false
      --v=3
      --stderrthreshold=0
    State:          Terminated
      Reason:       Error
      Exit Code:    1
      Started:      Tue, 02 Jul 2019 17:12:26 +0200
      Finished:     Tue, 02 Jul 2019 17:17:47 +0200
    Last State:     Terminated
      Reason:       Error
      Exit Code:    1
      Started:      Tue, 02 Jul 2019 17:06:23 +0200
      Finished:     Tue, 02 Jul 2019 17:12:01 +0200
    Ready:          False
    Restart Count:  183
    Environment:
      APPSCODE_ANALYTICS_CLIENT_ID:  bb62dd09605f3053196c9dfe3db629d7
      NAMESPACE:                     kubedb (v1:metadata.namespace)
      PRIMARY_HOST:                  lb-timescale-postgres
      POSTGRES_USER:                 <set to the key 'POSTGRES_USER' in secret 'lb-timescale-postgres-auth'>      Optional: false
      POSTGRES_PASSWORD:             <set to the key 'POSTGRES_PASSWORD' in secret 'lb-timescale-postgres-auth'>  Optional: false
      STANDBY:                       warm
      STREAMING:                     asynchronous
      LEASE_DURATION:                15
      RENEW_DEADLINE:                10
      RETRY_PERIOD:                  2
    Mounts:
      /var/pv from data (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from lb-timescale-postgres-token-l2vlc (ro)
Conditions:
  Type              Status
  Initialized       True
  Ready             False
  ContainersReady   False
  PodScheduled      True
Volumes:
  data:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  data-lb-timescale-postgres-0
    ReadOnly:   false
  lb-timescale-postgres-token-l2vlc:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  lb-timescale-postgres-token-l2vlc
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason   Age                   From                              Message
  ----     ------   ----                  ----                              -------
  Warning  BackOff  13s (x1334 over 12d)  kubelet, lightning-badger-1-x1wg  Back-off restarting failed container

Followed the steps listed here:
https://kubedb.com/docs/0.12.0/guides/postgres/quickstart/quickstart/
To remove the second instance of this CRD definition in my cluster and maybe it's stabilized? Hard to tell without waiting a few hours at least....
Why can't I run two instances of the same custom postgres definition in the same cluster. They had different names, volumes, secrets etc....

Here is my CRD:
apiVersion: catalog.kubedb.com/v1alpha1
kind: PostgresVersion
metadata:
  name: timescale-1.3.0
  labels:
    app: kubedb
spec:
  version: "11.2"
  db:
    image: "iamliamc/timescaledb:1.0"
  exporter:
    image: "kubedb/postgres_exporter:v0.4.7"
  tools:
    image: "kubedb/postgres-tools:11.2"
  podSecurityPolicies:
    databasePolicyName: "postgres-db"
    snapshotterPolicyName: "postgres-snapshot"

And my PG definition for anyone that might have some insight.
apiVersion: kubedb.com/v1alpha1
kind: Postgres
metadata:
  name: lb-timescale-postgres
  namespace: kubedb
spec:
  version: "timescale-1.3.0"
  storageType: Durable
  storage:
    storageClassName: "do-block-storage"
    accessModes:
    - ReadWriteOnce
    resources:
      requests:
        storage: 10Gi
  terminationPolicy: DoNotTerminate
  # imagePullSecrets:
  #   - name: timescale-build-deploy-token

I continue to get this issue even with only one instance running... so I'm not sure this has to do with installing a second instance...

Eventually my main kubedb postgres pod did a full reprovision, and I manually deleted the kubedb-operator pod and it got reprovisioned and I've had 18h of stable service. Still confused...

Take a look here at the documentation https://kubedb.com/docs/0.12.0/guides/postgres/quickstart/quickstart/ and find section leaderElection.
For my case there was a problem with network througput. In this case leader election failed by timeout. This issue also related to kube-controller-manager and kube-scheduler. Just increase values leaseDurationSeconds and renewDeadlineSeconds with higher value.
For example x2, x3 (i used x3). Be sure that renewDeadlineSeconds must be less or equal to leaseDurationSeconds

KubeDB/Stash v2021.03.17 does not use Kubernetes leader election anymore. Let us know if you still see this issue.


[BEAM-242] Enable and fix checkstyle on Flink runner

Be sure to do all of the following to help us incorporate your contribution
quickly and easily:

[X] Make sure the PR title is formatted like:
[BEAM-<Jira issue #>] Description of pull request
[X] Make sure tests pass via mvn clean verify. (Even better, enable
Travis-CI on your fork and ensure the whole test matrix passes).
[X] Replace <Jira issue #> in the title with the actual Jira issue
number, if there is one.
[X] If this contribution is large, please file an Apache
Individual Contributor License Agreement.

Enable checkstyle plugin in Flink runner and fix checkstyle issues.

R: @mxm
R: @aljoscha
R: @davorbonaci

Thanks for doing this @jbonofre!
I see that you are also fixing the examples. Almost all of these will probably go away so I think it doesn't make much sense to fix them (sorry for the extra work for you).
I'll read through the other changes tomorrow.

R: @davorbonaci I thought you might have something to say about Maven/Code Style
A few quick remarks from glancing at the code: We have checkstyle rules that enforce line length but we don't seem to have rules that specify how lines should be broken/chomped (IntelliJ uses this word for some setting). I'm seeing these snippets in the code:
FlinkPipelineOptions flinkOptions = PipelineOptionsValidator.validate(FlinkPipelineOptions
          .class, options);

StreamTransformTranslator<?> translator = FlinkStreamingTransformTranslators.getTranslator
            (transform);

private <T extends PTransform<?, ?>> void applyStreamingTransform(PTransform<?, ?> transform,
                                                                  TransformTreeNode node,
                                                                  StreamTransformTranslator<?>
                                                                  translator) {

private static final Map<Class<? extends PTransform>, FlinkStreamingPipelineTranslator
       .StreamTransformTranslator> TRANSLATORS = new HashMap<>();

public void translateNode(Create.Values<OutputT> transform, FlinkStreamingTranslationContext
         context) {

My feeling says that they should look something like this:
FlinkPipelineOptions flinkOptions =
    PipelineOptionsValidator.validate(FlinkPipelineOptions.class, options);

StreamTransformTranslator<?> translator =
    FlinkStreamingTransformTranslators.getTranslator(transform);

private <T extends PTransform<?, ?>> void applyStreamingTransform(
    PTransform<?, ?> transform,
    TransformTreeNode node,
    StreamTransformTranslator<?> translator) {

private static final Map<
    Class<? extends PTransform>,
    FlinkStreamingPipelineTranslator.StreamTransformTranslator> TRANSLATORS =
        new HashMap<>();

(about this one, with all the generics, I'm not sure... 😅)
public void translateNode(
    Create.Values<OutputT> transform,
    FlinkStreamingTranslationContext context) {

In most of the the new changes things are done like this (thanks again @jbonofre), but if we don't enforce it the code can become very "strange looking".

FYI, I used IntelliJ line wrapping.

Thanks for the PR, @jbonofre! I agree with @aljoscha but I think line wrapping should always be followed by +4 indention according to the Google style: https://google.github.io/styleguide/javaguide.html#s4.5.2-line-wrapping-indent

private static final Map<
Class<? extends PTransform>,
FlinkStreamingPipelineTranslator.StreamTransformTranslator> TRANSLATORS =
new HashMap<>();

Shouldn't this be:

```java
private static final Map<
    Class<? extends PTransform>,
        FlinkStreamingPipelineTranslator.StreamTransformTranslator> TRANSLATORS =
            new HashMap<>();

Unfortunately, the style is quite extensive and not fully checked by the Checkstyle rules.
In addition, I've made some more comments concerning sensible wrapping of lines, generic type name changes, and final/constants capitalization.

(Not release blocking, IMO.)

Update: I'd try to get javadoc fixes out, if possible, before the first release. Checkstyle part can be addressed later.

FYI, javadoc fails on flink runner using the release profile: mvn clean install -Prelease.
I'm extracting javadoc commits from this PR in another PR.

BTW this formatter is quite good: https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml

Here is what I meant to link: https://github.com/google/google-java-format

+1 maybe we can check out if the Google Java Format tool does a better job than the IntelliJ line wrapping.

I'm closing this PR for now.


Floppy drive signal test /TKO signal appears incorrect

Hi. I have noticed that the /TKO signal is not behaving as I would expect it to in the floppy drive signals tests. When the heads are stepped inwards, I would expect /TKO to be negated (not active) and remain negated until the direction is changed and the heads are stepped back to track 0. Instead, the /TKO signal oscillates with each step, regardless of /DIR
Repro steps:

Boot Amiga Test Kit v1.21 on stock A500 KS1.3
Press F3 on main menu to select Floppy Drive tests
Press F5 on Floppy Drive menu to select Signal Tests
Observe that /TKO is asserted and /DIR=L (In)
Press F6 to step the heads. Note that /TKO is negated
Press F6 again to step the heads. Note that /TKO becomes asserted again

Expected behaviour:

In step 6, /TKO should remain negated as the heads step inwards towards higher numbered tracks
/TKO should not be asserted again until /DIR is changed to out, and the heads are stepped back to track 0

Further info:

The same behaviour is observed regardless of motor state
The same behaviour is observed regardless of direction /DIR (F8)
The same behaviour is observed on both real hardware and in WinUAE
The expected behaviour is observed if the heads are stepped by pressing F7 twice (heads step on positive edge)

Please let me know if I have misunderstood something. Great tool - many thanks!

Yes, the signals test options are misleading here.  F8 (/DIR) is expected to be used in concert with F7 (/STEP) which directly toggles the STEP line (ie. press F7 twice to cause one step). F6 (Step)  actually is intended to step between cylinders 0 and 1, hence your observed behaviour.
Actually I expect the interactions between F6 and F7 aren't quite correct: F7 probably confuses F6. And F6's description could be better. So there is probably anyhow some small fixing to be done here.

Haha. Thanks for that. Yes "Step" is confusing. I just assumed it generated a STEP pulse, to save having to do it manually with F7, or for users who don't need to understand it at this level.
Does F6 always step +1 then -1? So if you were on track 10, would it go back and forth between 10 and 11, or would it make its way back to zero then start stepping 0-1-0-1-0 ?

Actually it seeks to 0 or 1 depending on whether it thinks it's at cyl 0 or not. https://github.com/keirf/amiga-stuff/blob/master/testkit/floppy.c#L388
Potentially I could just remove it, but it is kind of convenient to have that key to hit a few times to check that TK0 reliably toggles... As opposed to DIR + STEP + STEP.
Maybe I should make it "Step Pulse" and then it would be "Step Pulse + DIR + Step Pulse + DIR + ..." which isn't too bad and is at least somewhat clear wtf is going on, and doesn't try to track the "current cylinder" at all.

Yes. I think that change would make sense. If the current cylinder is tracked, it is based on the assumption that the TK0 signal is reliable in the first place, so maybe a bit chicken and egg.
"Step pulse" sounds good, but it kind of assumes that the user knows that this is what triggers the movement, but I imagine many who are fixing up an old computer from the attic do not.
I would go for plain old "Step" which generates a pulse to step in the selected direction, and would also consider "Step in/up" and "Step out/down" helper buttons. If the user hammers Step down a hundred times and /TK0 doesn't appear, then they know something is up.

Signals test is a power user feature anyway. The whole thing is totally confusing to the average ATK user. It should probably be "Signal Test (Experts only)". General problems with signals are raised by the Read Test.
Or I could reorder the tests, and put both Signals and Head Calibration under "Advanced Tests" heading.

It's hard to decide what's best. Another low-effort possibility that makes things obvious but doesn't remove the handy feature might be to replace Step with Step In and Step Out.

If only I had more Fn keys.


Add more eval API options

Right now, the only option in api.rs is an evaluation function that takes and outputs hvm code as text.
I think an option of having the input and output be a language::syntax::File would be good for using HVM inside other projects where we might be generating HVM code dinamically.

Also, the way the "extra functions" are passed is a bit strange. If interpreted functions are passed as part of the input code and precompiled functions are pulled from the precomp.rs file, what is the use of having another way of giving the API custom functions?

Having an option to disable / not load any precompiled functions could also be interesting for writing tests.
I see that some internal HVM tests keep failing every time a new default precompiled function is added since some of them rely on the number of terms in the rulebook.

@frehberg Good point, gluon is doing a log of things right as a host-extension/scripting language.
I think there are many use cases where HVM can be useful as an embedded scripting language for (Rust) hosts.
In fact, I hope it can replace Lua for many host-extension/scripting use cases.
This would require marshalling of Rust symbols like gluon has (being able to call into HVM and allowing HVM to call host functions), and ideally the host can also specify exactly which symbols should pre-exist in the "prelude" so that it's not "opinionated" about the prelude like gluon is.
And it would also be nice being able to query/inspect the HVM runtime which symbols are defined and read out their definition from the host (not just as text) and to have a way to sandbox user scripts and only allow certain effects.
With a strongly typed language on top of HVM (such as Kind), it also has the potential to become very useful as a replacement for Python/JS/Matlab when it comes to interactive computation / interactively exploring/visualizing data / tying native libs together with higher-level glue code. (There's no reason to leave this domain to dynamically/weakly typed languages.)


Adding Header Search Paths to solve problems when:

Adding Header Search Paths to solve problems when:

Native iOS app integrate react native from Podfile and integrate this library from package.json.
By adding $(BUILT_PRODUCTS_DIR).
In react native 0.51, react native iOS app integrating react native from Podfile and adding this library from node_modules to iOS project folder Libraries.
By adding other lines.

The error likes below:
In file included from /Users/OceanHorn/SourceTree/mobile-agent/node_modules/react-native-fast-image/ios/FastImage/RCTConvert+FFFastImage.m:1:
/Users/OceanHorn/SourceTree/mobile-agent/node_modules/react-native-fast-image/ios/FastImage/RCTConvert+FFFastImage.h:1:9: fatal error: 'RCTConvert.h' file not found
#import <React/RCTConvert.h>
        ^~~~~~~~~~~~~~
1 error generated.

Any chance this is getting merged?

Let's try it!

@OceanHorn This seems to have worked for everyone. Thank you for adding it 👍 , sorry it took so long to merge

I didnt completely understand what I should do to solve this problem. Can someone explain it more clearly please? I tried adding "$(SRCROOT)/../node_modules/react-native-fast-image/ios" to header search path but it didnt work.

why i still get error：'React/RCTConvert.h' file not found  with  "react-native-fast-image": "5.2.0",

why i still get error：'React/RCTConvert.h' file not found with "react-native-fast-image": "5.2.0",

have same issue. did u fix it?

me too, after upgrade :(

@NSShentu, @Desintegrator Have same issue, did you find a solution ?

@andru1989 try to delete library from pods -- it worked for me


[CAD-1720] Integrate Alonzo ledger

This Issue is to integrate the Alonzo ledger Shelley-based era into the Consensus layer.
The document added by PR #2847 should be an extremely useful guide about how to proceed. Just like Allegra and Mary, Alonzo is -- from the Consensus Layer's perspective -- a minor revision of Shelley. So it should follow the same pattern established by Allegra and Mary. That document walks through the necessary steps.

There is right now a branch where a bunch of appropriate changes were made https://github.com/input-output-hk/ouroboros-network/tree/EncodePanda/CAD-1720-intergrate-alonzo. We now wait for cardano-ledger-alonzo to provide missing bits.

There is right now a branch where a bunch of appropriate changes were made https://github.com/input-output-hk/ouroboros-network/tree/EncodePanda/CAD-1720-intergrate-alonzo. We now wait for cardano-ledger-alonzo to provide missing bits.


Issue with running MQT Bench's QAOA and Portfolio Optimization QAOA on hybrid_qasm_simulator and path_sim_qasm_simulator

mqt.ddsim version
1.17.3.dev18+gfbfe86a
OS
Linux Mint 21.1
Python version
Python 3.10
C++ compiler
11.3.0
Additional environment information
Content of input file qaoa_indep_qiskit_3.qasm:
// Benchmark was created by MQT Bench on 2022-12-15
// For more information about MQT Bench, please visit https://www.cda.cit.tum.de/mqtbench/
// MQT Bench version: 0.2.2
// Qiskit version: {'qiskit-terra': '0.22.3', 'qiskit-aer': '0.11.1', 'qiskit-ignis': '0.7.0', 'qiskit-ibmq-provider': '0.19.2', 'qiskit': '0.39.3', 'qiskit-nature': '0.5.1', 'qiskit-finance': '0.3.4', 'qiskit-optimization': '0.4.0', 'qiskit-machine-learning': '0.5.0'}

OPENQASM 2.0;
include "qelib1.inc";
qreg q[3];
creg meas[3];
creg meas0[3];
h q[0];
h q[1];
rzz(3.47521905147808) q[0],q[1];
h q[2];
rzz(3.47521905147808) q[0],q[2];
rx(-3.9630316145815) q[0];
rzz(3.47521905147808) q[1],q[2];
rx(-3.9630316145815) q[1];
rzz(-3.7141963075006) q[0],q[1];
rx(-3.9630316145815) q[2];
rzz(-3.7141963075006) q[0],q[2];
rx(-12.2750719749294) q[0];
rzz(-3.7141963075006) q[1],q[2];
rx(-12.2750719749294) q[1];
rx(-12.2750719749294) q[2];
barrier q[0],q[1],q[2];
measure q[0] -> meas[0];
measure q[1] -> meas[1];
measure q[2] -> meas[2];
barrier q[0],q[1],q[2];
measure q[0] -> meas0[0];
measure q[1] -> meas0[1];
measure q[2] -> meas0[2];

Content of input file portfolioqaoa_indep_qiskit_3.qasm:
// Benchmark was created by MQT Bench on 2022-12-15
// For more information about MQT Bench, please visit https://www.cda.cit.tum.de/mqtbench/
// MQT Bench version: 0.2.2
// Qiskit version: {'qiskit-terra': '0.22.3', 'qiskit-aer': '0.11.1', 'qiskit-ignis': '0.7.0', 'qiskit-ibmq-provider': '0.19.2', 'qiskit': '0.39.3', 'qiskit-nature': '0.5.1', 'qiskit-finance': '0.3.4', 'qiskit-optimization': '0.4.0', 'qiskit-machine-learning': '0.5.0'}

OPENQASM 2.0;
include "qelib1.inc";
qreg q[3];
creg meas[3];
creg meas0[3];
u2(0.41951949,-pi) q[0];
u2(0.41620669,-pi) q[1];
rzz(-0.420917333908502) q[0],q[1];
u2(0.41905329,-pi) q[2];
rzz(-0.421016123405307) q[0],q[2];
u3(2.2348228,1.2558831,-pi/2) q[0];
rzz(-0.420940441831552) q[1],q[2];
u3(2.2348228,1.2087537,-pi/2) q[1];
rzz(-5.98815838177421) q[0],q[1];
u3(2.2348228,1.2492507,-pi/2) q[2];
rzz(-5.98956380537088) q[0],q[2];
u3(0.56042125,-1.2358007,pi/2) q[0];
rzz(-5.98848712542991) q[1],q[2];
u3(0.56042125,-1.2880621,pi/2) q[1];
rzz(-6.64023274758061) q[0],q[1];
u3(0.56042125,-1.2431553,pi/2) q[2];
rzz(-6.6417912133385) q[0],q[2];
rx(-4.06512402388918) q[0];
rzz(-6.64059728943955) q[1],q[2];
rx(-4.06512402388918) q[1];
rx(-4.06512402388918) q[2];
barrier q[0],q[1],q[2];
measure q[0] -> meas[0];
measure q[1] -> meas[1];
measure q[2] -> meas[2];
barrier q[0],q[1],q[2];
measure q[0] -> meas0[0];
measure q[1] -> meas0[1];
measure q[2] -> meas0[2];

Description
When running MQT Bench's (https://www.cda.cit.tum.de/mqtbench/) QAOA and Portfolio Optimization with QAOA circuits (target independent, compiler = Qiskit), e.g.  portfolioqaoa_indep_qiskit_3.qasm, qaoa_indep_qiskit_3.qasm, using  hybrid_qasm_simulator and path_sim_qasm_simulators, error logs are encountered.
When running the circuits using hybrid_qasm_simulator, the following log appears:
ValueError: Only StandardOperations are supported for now.
When running the circuits using path_sim_qasm_simulator, the following log appears:
ValueError: DD for non-unitary operation not available!
Expected behavior
No response
How to Reproduce

Download some QAOA and Portfolio Optimization with QAOA circuits (target independent, compiler = Qiskit) from MQT Bench's (https://www.cda.cit.tum.de/mqtbench/).
Run the circuits using the hybrid_qasm_simulator and path_sim_qasm_simulator backends. Sample scripts:
Path Simulator script:

import sys
from qiskit import *
from mqt    import ddsim
qasmFilename     = sys.argv[1]
quantumCircuit   = QuantumCircuit.from_qasm_file(qasmFilename)
backendSimulator = ddsim.DDSIMProvider().get_backend("path_sim_qasm_simulator")
myJob            = execute(quantumCircuit, backendSimulator)
print(myJob.result())

Hybrid Simulator script:
import sys
from qiskit import *
from mqt    import ddsim
qasmFilename     = sys.argv[1]
quantumCircuit   = QuantumCircuit.from_qasm_file(qasmFilename)
backendSimulator = ddsim.DDSIMProvider().get_backend("hybrid_qasm_simulator")
myJob            = execute(quantumCircuit, backendSimulator)
print(myJob.result())

Observe the error logs appear.

Sorry for not getting back to you on this earlier. Since we stumbled upon this today at the qrisp community meeting:
The errors you are seeing here are essentially due to the duplicate measurements in these circuits taken from MQT Bench.
As for the QAOA circuit, this has definitely been fixed in MQT Bench. The resulting circuit there is now:
// Benchmark was created by MQT Bench on 2024-03-18
// For more information about MQT Bench, please visit https://www.cda.cit.tum.de/mqtbench/
// MQT Bench version: 1.1.0
// Qiskit version: 1.0.2

OPENQASM 2.0;
include "qelib1.inc";
qreg q[3];
creg meas[3];
h q[0];
h q[1];
rzz(5.094008139994057) q[0],q[1];
h q[2];
rzz(5.094008139994057) q[0],q[2];
rx(-6.860310317223841) q[0];
rzz(5.094008139994057) q[1],q[2];
rx(-6.860310317223841) q[1];
rzz(-5.141522309483603) q[0],q[1];
rx(-6.860310317223841) q[2];
rzz(-5.141522309483603) q[0],q[2];
rx(8.165927224507852) q[0];
rzz(-5.141522309483603) q[1],q[2];
rx(8.165927224507852) q[1];
rx(8.165927224507852) q[2];
barrier q[0],q[1],q[2];
measure q[0] -> meas[0];
measure q[1] -> meas[1];
measure q[2] -> meas[2];

The portfolio QAOA circuit that is downloadable from the website still contains the duplicate measurements. This has been fixed in https://github.com/cda-tum/mqt-bench/pull/364, but we haven't come around to regenerate the MQT Bench circuit database since then. The correct circuit is available via the mqt.bench CLI though. If you have a recent uv version installed, then
uvx --from mqt.bench mqt.bench.cli --algorithm portfolioqaoa --level indep --num-qubits 3 --compiler qiskit

should yield something comparable to
OPENQASM 2.0;
include "qelib1.inc";
qreg q[3];
creg meas[3];
u2(-2.2153343779813284,-pi) q[0];
u2(-2.2046418772975507,-pi) q[1];
rzz(-4.083687560158023) q[0],q[1];
u2(-2.1987929080465562,-pi) q[2];
rzz(-4.083620518646561) q[0],q[2];
u3(1.178605356771574,-1.7921159382230245,pi/2) q[0];
rzz(-4.083742192346308) q[1],q[2];
u3(1.1786053567715737,-1.77618209398317,pi/2) q[1];
rzz(-6.085465265062668) q[0],q[1];
u3(1.178605356771574,-1.7674660257999388,pi/2) q[2];
rzz(-6.085365360556431) q[0],q[2];
u3(1.8486282685867204,2.369613989111852,-pi/2) q[0];
rzz(-6.085546677335095) q[1],q[2];
u3(1.8486282685867204,2.371713711680157,-pi/2) q[1];
rzz(-0.8019275551676139) q[0],q[1];
u3(1.8486282685867204,2.372862293578896,-pi/2) q[2];
rzz(-0.801914389998979) q[0],q[2];
rx(-12.580569066809241) q[0];
rzz(-0.8019382834754334) q[1],q[2];
rx(-12.580569066809241) q[1];
rx(-12.580569066809241) q[2];
barrier q[0],q[1],q[2];
measure q[0] -> meas[0];
measure q[1] -> meas[1];
measure q[2] -> meas[2];

Both simulators are failing here because they only support a rather limited gate-set. More precisely, they only support measurements at the very end of the circuit.
Even though this is mostly an issue with the circuits themselves, I guess the error message in both cases could be improved. So I will keep this ticket open for now and see whether I can get a quick fix in over the coming days.


Fixes registration issues in character data

Thanks for the PR. Please check the README on how to contribute. We don't modify the generated schema directly, rather creating migration scripts. Please also reference the ticket as mentioned in your other PR: https://github.com/ko4life-net/ko/pull/200


integration only works for a few hours

I have a working version of this plugin to control my domintell installation.
It works for a few hours and then I need to reboot it to make it work again.
Is there a way to debug this issue ?

I did some investigation, the integration stops working after this log statement:
2021-03-14 08:48:32 WARNING (MainThread) [homeassistant.components.websocket_api.http.connection] [547984631792] Disconnected: Did not receive auth message within 10 seconds

Is anybody monitoring these issues ?

Hello,
this is my hobby project, so I'm not monitoring comments here. Just reading it from time to time. I using this plugin to control my domintell integration for 3 years already. And it is more or less stable.
Looks like your problem is the configuration on Domintell side. Check the Session timeout parameter here. Increase it, or remove checkbox at all.

Where do you have that panel in your domintell software ? I can't find it anywhere.

Checks this out :)

Ah great thanks for the help. I will change my setup and see if that indeed solves the problem.

I changed my settings as proposed and the integration is still working after an entire night. I will close this issue. If it comes back I can always reopen... but I am feeling hopeful. Thanks for the help, I appreciate it that you make your hobby project available like this.


Does not work with a multi project workspace

it always creates the folder/files in the first project.
Also selecting a folder to create the files there, creates them in the first project under the specified path.

Also experiencing this issue. Please, do you mind looking into this?
Here is a simple code snippet that asks a user to select the workspace they want to execute the command in. You simply provide the text a user should in the drop-down as a placeholder.

import { workspace, WorkspaceFolder, window } from "vscode";

export async function selectWorkspaceFolder(
  placeHolder: string
): Promise<WorkspaceFolder | null> {
  const workspaceFolders = workspace.workspaceFolders;
  if (!workspaceFolders) return null;
  if (workspaceFolders.length === 1) return workspaceFolders[0];

  const items = workspaceFolders.map(w => w.name);
  const choice = await window.showQuickPick(items, { placeHolder });
  return workspaceFolders.find(w => w.name === choice) || null;
}

This problem is why I've slowly stopped using this extension, despite it being an amazing extension. @ritwickdey is there any hope of this being fixed or does it need to be assigned to someone else just so we can get this fixed?


Implement RTL support

https://stackoverflow.com/a/64981339/1435891

A new page.rtl property has been added that allows controlling text directionality: https://flet.dev/docs/controls/page#rtl


[REQUEST] - Processing Generated GPT-4 code

I am currently using the provided generation script with the following command:
``python generate.py --model gpt-4-1106-preview --bs 1 --temperature 0 --root reproduce_samples --n_samples 1 --greedy  --dataset humaneval' `
Is this all that was used to generate the samples you provide? There are several cases of duplicated function definitions, which arises from GPT-4 redefining the function (instead of just finishing it). Is there any guidance regarding the post-processing steps taken by the team, before eval, when the provided generation script is used?
Thanks!

I think that is all you need for that. I have not been testing that for a while. But can you demonstrate the redef issue?

There are many examples. One example is HumanEval 65 - this is the file at /reproduce_samples/humaneval/gpt-4-1106-preview_temp_0.0/HumanEval_65 from command ``python generate.py --model gpt-4-1106-preview --bs 1 --temperature 0 --root reproduce_samples --n_samples 1 --greedy --dataset humaneval' `
def circular_shift(x, shift):
    """Circular shift the digits of the integer x, shift the digits right by shift
    and return the result as a string.
    If shift > number of digits, return digits reversed.
    >>> circular_shift(12, 1)
    "21"
    >>> circular_shift(12, 2)
    "12"
    """

def circular_shift(x, shift):
    """Circular shift the digits of the integer x, shift the digits right by shift
    and return the result as a string.
    If shift > number of digits, return digits reversed.
    >>> circular_shift(12, 1)
    "21"
    >>> circular_shift(12, 2)
    "12"
    """
    x_str = str(x)
    shift %= len(x_str)
    if shift == 0:
        return x_str
    return x_str[-shift:] + x_str[:-shift]

First of all, this does not affect the evaluation results as the first function + body is semantic/syntactic valid and is then overloaded by a valid redefinition.
After a close look it is caused by this line:
https://github.com/evalplus/evalplus/blob/87e0b2e6c4d6576d99b5474e4d279eaa744e2831/codegen/model.py#L535
IIRC, I added the prompt prefix to cover cases when GPT-4 only produces the body without repeating the prompt.


Use execution parameters in Athena backend

I'm trying to update the AthenaBackend, so I will be able to create a mock based on common SQL statements I use in my tests.
I changes the start_query_execution and get_query_results methods, and it works well for me.
I'm missing in both statements the query execution parameters, which are used by Athena prepared statements. Is there any option to get to this information and use it?
see examples for parameterized queries here: https://docs.aws.amazon.com/athena/latest/ug/querying-with-prepared-statements.html
Thanks

Hi @ori-n, thanks for raising this. Did you mean the get_query_execution-operation? That is now part of moto >= 5.0.7.dev13, it will return the execution parameters set by start_query_execution.

I just checked it and it works as expected


Chore: Misc infrastructure updates

Upgrade all prod + dev dependencies
BREAKING: Update node engines
Switch istanbul to nyc.
Update to es-next code from at least auto-fixes.

Released in<EMAIL_ADDRESS>


Stack traces are missing variadic and not declared arguments

How do you use Sentry?
Self-hosted / on-premises
SDK version
4.0.1
Steps to reproduce

Create function with variadic parameters or without parameters. Ex.:

function variadic(...$params) {...}
function noParams() {...}

Call this function with some arguments.
Throw an exception inside that function.

Expected result
Sentry shows all passed arguments in stack trace.
Actual result
Sentry shows only first argument for variadic function and no arguments for function without parameters.
With this code:
function variadic(...$params)
{
    noParams($params);
}

function noParams()
{
    throw new \Exception();
}

Artisan::command('debug', function () {
    variadic('a', 1, [123]);
});

I get this stack trace in Sentry:

I believe the culprit is \Sentry\FrameBuilder::getFunctionArgumentValues. It only takes values passed for defined parameters based on their position, which means it completely ignores parameters that weren't defined or parameters that have multiple values.

Also, \Sentry\FrameBuilder::getFunctionArgumentValues ignores nulls, since it uses isset() to check if argument was passed to the function, and it doesn't use default values if nothing was passed to the function.
This might not be an issue depending on what's the purpose in sending parameters to sentry. If it's to show the complete picture, that it probably would be useful to send those. But if it is supposed to give just enough information to reconstruct the rest from the code, then sending arguments that was actually passed would be enough.

I haven't tested this yet, but how are variadic parameters reflected in a native stack trace?

All ways to pass parameters to function look the same way in PHP 7.4. Functions' code:
function regularParams(string $s, int $i, array $a)
{
    variadic($s, $i, $a);
}

function variadic(...$params)
{
    noParams(...$params);
}

function noParams()
{
    throw new \Exception();
}

Artisan::command('debug', function () {
    try {
        regularParams('a', 1, [123]);
    } catch (\Throwable $e) {
        var_dump(array_slice($e->getTrace(), 0, 3));
    }
});

var_dump output:
array(3) {
  [0] =>
  array(4) {
    'file' =>
    string(23) "/app/routes/console.php"
    'line' =>
    int(29)
    'function' =>
    string(8) "noParams"
    'args' =>
    array(3) {
      [0] =>
      string(1) "a"
      [1] =>
      int(1)
      [2] =>
      array(1) {
        ...
      }
    }
  }
  [1] =>
  array(4) {
    'file' =>
    string(23) "/app/routes/console.php"
    'line' =>
    int(24)
    'function' =>
    string(8) "variadic"
    'args' =>
    array(3) {
      [0] =>
      string(1) "a"
      [1] =>
      int(1)
      [2] =>
      array(1) {
        ...
      }
    }
  }
  [2] =>
  array(4) {
    'file' =>
    string(23) "/app/routes/console.php"
    'line' =>
    int(39)
    'function' =>
    string(13) "regularParams"
    'args' =>
    array(3) {
      [0] =>
      string(1) "a"
      [1] =>
      int(1)
      [2] =>
      array(1) {
        ...
      }
    }
  }
}

We use the args to add the variables to the Sentry stack trace. Not sure if we can improve this much.

args has all required info. I made quick and maybe dirty fix.
private function getFunctionArgumentValues(\ReflectionFunctionAbstract $reflectionFunction, array $backtraceFrameArgs): array
{
    $argumentValues = [];

    foreach ($reflectionFunction->getParameters() as $reflectionParameter) {
        if (!empty($backtraceFrameArgs)) {
            // Since getParameters() returns parameters in order they were
            // declared, we can just remove first argument from array to
            // get value for first parameter.
            $value = array_shift($backtraceFrameArgs);
        } else {
            // No more args, we can get out of the loop.
            // (or we can continue and handle default values here)
            break;
        }

        $argumentValues[$reflectionParameter->getName()] = $value;
    }

    $lastParameter = last($reflectionFunction->getParameters()) ?: null;
    if ($lastParameter !== null && $lastParameter->isVariadic()) {
        $lastParameterName = $lastParameter->getName();
        // Since variadic parameters available as arrays inside of functions,
        // we can wrap passed value into array so Sentry would represent it
        // the same way we would see it in code.
        $argumentValues[$lastParameterName] = [
            $argumentValues[$lastParameterName],
        ];
    }

    if (!empty($backtraceFrameArgs)) {
        if ($lastParameter !== null && $lastParameter->isVariadic()) {
            $lastParameterName = $lastParameter->getName();
            // If we still have args and last parameter is variadic,
            // merge its value with remaining args.
            $argumentValues[$lastParameterName] = array_merge(
                $argumentValues[$lastParameterName],
                $backtraceFrameArgs,
            );
        } else {
            // If last parameter is not variadic, it means we passed undefined
            // parameters into function. They are probably used with
            // func_get_args(), or this could be a bug. In any case, it
            // would be useful to see them in Sentry.
            $parameterPosition = count($argumentValues) + 1;
            foreach ($backtraceFrameArgs as $argument) {
                $argumentValues['param' . $parameterPosition] = $argument;
                $parameterPosition += 1;
            }
        }
    }

    return $argumentValues;
}

I'm not sure about performance and all the edge cases, but it solves the problem. Here is the before and after for code snipper from my last comment.
Before
Stack frame for variadic function contains only one variable, for function without arguments it doesn't contain anything.

After
Both stack frames contain all passed variables.

I can open a merge request if you think this solution is good enough or could be used as a start.

Oh, if you are okay with just having the values, sure, please open a PR (including tests 😬).
I thought you wanted the argument names as well.

The variadic parameter has a name, params, though it was a confusing one in this context 😅.
For function without parameters at all we cannot do much, so I took the same name FrameBuilder uses when it cannot create reflection object.
I think thats the best we could do for this two cases.


Adoption Request

name: Adoption Request
about: Submit your feature to the project
title: 'Adoption Request'
labels: 'adoption'
assignees: ''

Adoption Request
This adoption request aims at contributing a new technology feature pack in the form of a new Technology Repository.
The contributing company is Huawei Technologies Co., Ltd.
The contribution initially will contain two major feature areas:

OBS: S3-compatible object storage hosted in the cloud
GaussDB: a relational database based on Postgres 9.2.4 as data retention backend

These components are currently implemented using EDC SPIs and core features.
General information
Please provide some information about your project or code contribution.
If you choose to be referenced as a "friend", these will be added to the known friends list.
If you choose to add your feature as a core EDC component, links to your current code and correlated issues, discussions, and pull requests are of great importance.

Title
Description
Contact
Links

Huawei Dataspace Components
Technology repository named "Technology-Huawei" containing OBS extensions and GaussDB extensions
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>https://github.com/Huawei-Dataspace-Components/components

Adoption level
Next, please tell us what level of adoption you intend to provide. (pick only one)

[ ] Reference a feature as "friend"
[x] Incorporate a feature as core EDC component

Adoption in EDC core
During an initial ramp-up phase, Huawei Technologies Co., Ltd. contracts existing committers of the EDC Technical Committers group to maintain and develop the code base. This phase will be supported and accompanied by two Huawei employees. Over time, Huawei Technologies Co., Ltd. will build up an internal team to take over maintenance of the Technology-Huawei repository.
Huawei Technologies Co., Ltd. commits to provide real cloud test infrastructure, if no self-contained (containerized) variant is available.
If you chose to add your feature as a core EDC component, please answer the following questions.
Why should this contribution be adopted?

This contribution provides functionality based on the Huawei Cloud analogous to existing hyperscaler technology repositories.

Could it be achieved with existing functionality? If not, why?

No, because it is a novel development. Although large areas of the functionality provided herein are similar to existing implementations (OBS ~ S3, GaussDB ~ Postgres), there are customizations and subtle differences necessary. Futhermore, the testing environment is different.

Are there multiple use cases or applications who will benefit from the contribution?

Everyone who wants to leverage Huawei Cloud, which is relevant especially in non-European geographies.

Can it be achieved without introducing third-party dependencies? If not, which ones?

No, it cannot. The newly introduced dependencies are:

com.huaweicloud:esdk-obs-java: SDK to communicate with Object Storage Service
com.huaweicloud.sdk:huaweicloud-sdk-iam: SDK to communicate with the IAM service. Relevant for provisioning buckets.
com.huaweicloud.dws:huaweicloud-dws-jdbc: JDBC driver for GaussDB
all are resolvable from MavenCentral

Would this feature limit platform independence in any way? If so, how and why?

No, the code would be platform-independent, although an active subscription for GaussDB / OBS is necessary.

Is it going to be a self-contained feature, or would it cut across the entire code base?

It is self-contained

The committers have given the Huawei Technologies Ltd.'s adoption request a positive reception. We have observed Huawei's ongoing commitment to and support of the EDC. It's great to see another CSP embracing the EDC framework as well as participating in community support and delivering and maintaining customized extensions. These have a significant impact on the EDC's recognition on an international level.
We see no issues with the submitted codebase, and both extensions satisfy the EDC project's principles and contribution requirements. Both extensions, however, are brand-new creations and are unable to yet demonstrate the maintenance and track records that we have established as essential prerequisites and quality gates for acceptance in the EDC codebase. Even for extensions for technologies invented by the individual CSPs, this concrete proof is necessary in order to be branded with the Eclipse project and must adhere to the same ruleset as all other prior requests.
As a result, we will choose to accept the adoption once these conditions are met. Specifically, the TC has voted in favor of including Huawei-specific extensions in a technology folder going forward. However, prior to that, we must observe a history of consistent upkeep and application of the offered extensions. We therefore urge the Huawei team to demonstrate that they would maintain the extensions current for future iterations of the EDC and to showcase the application of these technologies in dataspace initiatives. One possible solution for this could be to attend one of our 2024 Q&A events and give a presentation. There is a clear path for integrating a technology repository for Huawei's extensions and the TC will resubmit the adoption request around Easter.
Meanwhile, we will list the extensions on the known friends list to provide visibility within the community.


pull request for e2e test at 02/02/2017 06:45:15

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


For the specified history message obtained by the client, there are cases where the message does not need to be rendered

For example:

When a message is logically deleted, all 20 of the messages paged by the client are already deleted.
For message recall deletion, I think it would be relatively friendly to insert recall and delete directives into the message flow, similar to in-session notification messages, which are only retrieved when needed.

For the client, however, each pull should specify at least a number of valid render messages.  Does the author have any other good advice for me? Thank you
In addition, come on, turms will be a big fire in the future. I have gained a lot in turms. Thank you

In addition, come on, turms will be a big fire in the future. I have gained a lot in turms. Thank you

Thank you for your encouragement, and it's lucky for the community to have people like you to make Turms and its community better.
I want to develop turms full-time so that Turms can move on far faster, but I also need to work and I can take only a part of my time to develop turms, so that's a little pity.

For your question, I have written a doc to answer them, and you can take a look: https://turms-im.github.io/docs/for-developers/status-aware.html#消息接收、消息更新与消息撤回
And you can add comments if you have more questions.

Of course, I have read the content in the document you mentioned, and the implementation of the process of message withdrawal as a special message is the same as I imagined, but there is a historical message pull problem:

Suppose the client withdraws 20 messages in a row
Assume that the number of client pages is 20
At this time, when the server executes the query, it will query 20 withdrawal notifications. The messages obtained by the client cannot be used for page rendering, but each time the client should be able to obtain the effective rendering when roaming offline messages. information.

Of course, I have read the content in the document you mentioned, and the implementation of the process of message withdrawal as a special message is the same as I imagined, but there is a historical message pull problem:

Suppose the client withdraws 20 messages in a row
Assume that the number of client pages is 20
At this time, when the server executes the query, it will query 20 withdrawal notifications. The messages obtained by the client cannot be used for page rendering, but each time the client should be able to obtain the effective rendering when roaming offline messages. information.

当然，我看过您提到的文档中的内容，对于消息撤回的流程实现当做一条特殊的消息和我设想的一样，但是这之间存在一个历史消息拉取问题:
1.假设客户端连续撤回了20条消息
2.假设客户端分页数量为20条
3.此时服务端执行查询会查询出20条撤回通知，客户端获取到的消息不能用于页面渲染，但是客户端每次应该在漫游离线消息时都应该能获取到能用于有效渲染的消息。


Suggest updating documentation to use Microsoft.Data.SqlClient

Suggesting to look into updating documentation to use the Microsoft.Data.SqlClient package as that is the future direction for SqlClient.  Full disclosure I haven't tested if fully compatible with above scenario yet.  See more on announcement blog post here:
https://devblogs.microsoft.com/dotnet/introducing-the-new-microsoftdatasqlclient/

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

ID: e4785005-a130-a392-7b4a-c8c6d36bad37
Version Independent ID: 6beb58e0-167c-c08d-46ff-13f72ddbaf31
Content: Use Azure Functions to perform a database clean up task
Content Source: articles/azure-functions/functions-scenario-database-table-cleanup.md
Service: azure-functions
GitHub Login: @ggailey777
Microsoft Alias: glenga

@BrianTJackett Thank you for your feedback! We will review and update as appropriate.

@fabiocav @brettsam Could you share your guidance on this matter and advise if we should hold off for now? Looking at Azure/Azure-Functions#1370, it seems that there are still some scenarios that are breaking and need consistent repro steps.

@BrianTJackett Based on the active discussions taking place on Azure/Azure-Functions#1370 and other issues referenced, we'll hold off from making the suggested update until further instructions are shared from the Functions team.
We will now proceed to close this thread for now. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.

This won't work if you use an older version of Entity Framework Core. This has a reference to the original System.Data.SqlClient.


Add new_file

/bench_x64

bench

/binch_x64

/bench_x64

X86_blah

/x86_64

/Bench_x64

/bench_x64

/Bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

To Test
/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x264

hello

/bench_x264

/bench_x264

/bench_x64

/be22nch_x264

/bench_x64

/be22nch_x264

/be22nch_x264

/bench_x64

/bench_x64

/bench_x64

/be22nch_x264

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x6e

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

|| Arch | Phase | Results||
|Compilation | Patch is .03x slower than HEAD. |
|Instantiation | Patch is |

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

/bench_x64

Requested from pull request comment.


Performance

I love Atom, but its so so slow :-( Please help me.
I dont can open large projects..

Thanks for reaching out!
As mentioned below, please fill out the issue template, the information in the template is helpful for us when triaging issues.  Please describe the issue in more detail, how to reproduce, etc. and we can go from there.
Also, please see the reference mentioned in the Prerequisites section:
https://flight-manual.atom.io/hacking-atom/sections/debugging/
Let us know if you tried safe mode any other of the suggestions there.

We require the template to be filled out on all new issues and pull requests. We do this so that we can be certain we have all the information we need to address your submission efficiently. This allows the maintainers to spend more time fixing bugs, implementing enhancements, and reviewing and merging pull requests.
Thanks for understanding and meeting us half way :grinning:


Update DockerBuildPush.yml

Description
I'm not %100 sure why the docker buildx didn't work I used the same
PATH context and --file FILE specifications that I use locally
the Build command is:
/usr/bin/docker buildx build \
--tag SECRET \
--iidfile /tmp/docker-build-push-4PJV9W/iidfile \
--cache-from type=local,src=/tmp/.buildx-cache \
--cache-to type=local,dest=/tmp/.buildx-cache \
--file ./project/Dockerfile \
--push \
./project

the output from the build command is:
unable to prepare context: path "./project" not found

In this PR I try removing the relative path specifier to see if that's the problem.
so the new command is going to be:
/usr/bin/docker buildx build \
--tag SECRET \
--iidfile /tmp/docker-build-push-4PJV9W/iidfile \
--cache-from type=local,src=/tmp/.buildx-cache \
--cache-to type=local,dest=/tmp/.buildx-cache \
--file project/Dockerfile \
--push \
project

On the next iteration I will rebuild the workflow from scratch if this doesn't work using standard docker build command.
dropping the caching service and builder pool options that come with docker buildx in favor of something that works as expected.
Type of change

[X] Bug fix (non-breaking change which fixes an issue)
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

Change Status

Complete, tested, ready to review and merge
[X] Complete, but not tested (may need new tests)
Incomplete/work-in-progress, PR is for discussion/feedback

Has This Been Tested

Yes
[X] No
Not necessary

Checklist

[X] My code follows the style guidelines of this project
[X] I have performed a self-review of my own code
[X] I have commented my code, particularly in hard-to-understand areas
I have made corresponding changes to the documentation
[X] My changes generate no new warnings
I have added tests that prove my fix is effective or that my feature works
New and existing unit tests pass locally with my changes
[X] There are no merge conflicts

as per https://github.com/docker/setup-buildx-action/issues/29
and https://github.com/docker/setup-buildx-action/tags
the @v1 tag uses the v1.0.2 image which may have some problems that have yet to be fully documented.
I may also want to specify the tag as @v1.0.1 which was the previous latest stable release of the buildx image.


Update teach performance.md

#9 some starting material, seed for discussion on what should be on this page

Thanks, @jowens, for this contribution.

I figured we'd talk about it before merging, but glad you like it!

Thanks for that extra context. I am still discovering our team workflow, and treating the website as openly in-development. After building it solo for weeks, I'm excited to have new contributors. Next time you contribute something, I won't be so easy on you 🙂

From: John Owens @.>
Sent: Tuesday, June 14, 2022 5:07 PM
To: OpenCilk/www.opencilk.org @.>
Cc: Bruce Hoppe @.>; State change @.>
Subject: Re: [OpenCilk/www.opencilk.org] Update teach performance.md (PR #37)
I figured we'd talk about it before merging, but glad you like it!
—
Reply to this email directly, view it on GitHubhttps://github.com/OpenCilk/www.opencilk.org/pull/37#issuecomment-1155713583, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AWHWTSQBPOGZKXMRDXCBMZTVPDYANANCNFSM5YZBMPOA.
You are receiving this because you modified the open/close state.Message ID: @.***>

I figure if I want to incorporate changes, doing it as a pull request (so someone's eyes can look at it, and edit it if necessary) is sensible. Pull request == staging area. But you're the boss on how you want to manage changes.


bst1: Hang when terminating build

I tried to abort build through terminate locally just to get
User interrupted with ^C

Choose one of the following options:
  (c)ontinue  - Continue queueing jobs as much as possible
  (q)uit      - Exit after all ongoing jobs complete
  (t)erminate - Terminate any ongoing jobs and exit

Pressing ^C again will terminate jobs and exit

Choice: [continue]: t
Exception in callback Scheduler._interrupt_event()
handle: <Handle Scheduler._interrupt_event()>
Traceback (most recent call last):
  File "/usr/lib64/python3.9/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/lib/python3.9/site-packages/buildstream/_scheduler/scheduler.py", line 481, in _interrupt_event
    self._interrupt_callback()
  File "/usr/lib/python3.9/site-packages/buildstream/_frontend/app.py", line 504, in _interrupt_handler
    choice = click.prompt("Choice:",
  File "/var/home/nanonyme/.local/lib/python3.9/site-packages/click/termui.py", line 168, in prompt
    value = prompt_func(prompt)
  File "/var/home/nanonyme/.local/lib/python3.9/site-packages/click/termui.py", line 143, in prompt_func
    return f(" ")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 1: unexpected end of data

Haven't seen this again and no idea how to reproduce so closing.


Missing capability method getAvailableEncoders

Add both getAvailableEncoders and availableEncoders.

Not sure why the build is failing - its happening on the other 2 pull requests occasionally too 😔

Yeah, that's due to some timing-dependent tests that I wasn't able to rewrite correctly.
I have invited you to the team, hopefully that enables you to relaunch PR test jobs on jenkins.

👍 done!
Any chance when merging this in that you could also push a new version to npm?

Yep. Do you have an account on npmjs.org ?

Yep - rhodgkins

Okay, added you on npmjs so that you can push the new version if you want to. I won't be able to do it myself for a few days.


Remove accidental code block

@meum : Thanks for your contribution! The author, @gewarren, has been notified to review your proposed change.


Fix commodity ancestors

some commodities have more than one indent  and it can cause issue on getting ancestors, so we decided to select only ancestors with lower indent (e.g.<PHONE_NUMBER>)

 [TARIFF17] Issue with missing measure and duplicate measure


merge(["some", "fields"]) is not available

Hi there, I was trying to use:
Model.query()
  .insert({name: "Hello", age: 10, uniqueId: 2})
  .onConflict("uniqueId")
  .merge(["name"]);

As per Knex documentation: http://knexjs.org/#Builder-merge.

But it seems like only the object mode works with Objection.js:
Model.query()
  .insert({name: "Hello", age: 10, uniqueId: 2})
  .onConflict("uniqueId")
  .merge({name: "Hello"});

Which is fine, I can use this instead. But maybe we want to have the same API than Knex here too?
Thanks!

Thanks for bringing this up. I'll add support for that syntax.

Trying to see if there is a work around for this as this is an issue for me as well

Any update to this issue?


2.0.0 bundle size

Hi,
It seems that the bundle size difference of 2.0.0 vs 1.1.4 is 3x in minified code size and 2x in min+gzip which seems like a lot.
Stats reported from import cost plugin in VS Code

version 1.1.4, size 23KB, 8KB minified
version 2.0.0, size 63KB, 15KB minified

Stats from my CRA application after updating to 2.0.0

bundle size 84.21 KB, diff from 1.1.4 bundle size +7.63 KB (only change between the builds was update of react-hotkeys)
this corresponds to the stats reported by import cost plugin

I wonder if the bundle size could be cut down closer 1.x.x sizes.

Hi @Hurtak,
Thanks for taking the time to raise this.
At the outset, I'd like to say monitoring bundle size is not something I am particularly strong in. I have looked into the best way of tracking it a couple of times and have never really come away with a clear answer.
But if you'll permit me, I'd like to run through a few reasons why version 2.0.0 is indeed significantly larger than v1.1.4.
With the removal of mousetrap, react-hotkeys now handles all key map detection and matching. So I have had to effectively replace mousetrap's entire functionality. This was done to better integrate with React, and to lean on its key standardisation and synthetic event system. I wonder if the ways you're using to measure the bundle size subtract the size of mousetrap.
v2.0.0 also provides a significant number of optimisations, bugfixes and additional functionality - this unfortunately does require additional code. The release notes give a good overview of those.
As bundle size has been something I've tried to be mindful of, a number of steps have been taken to attempt to reduce it:

All comments and (virtually all) logging are stripped from the production build.
Uglification and minification are used to reduce the production build
The "files" attribute is used in package.json to ensure only essential files are included in the published bundle.
The "modules" package.json attribute points to a ES6 module release that should allow tree shaking, and only including the files that are actually required by the consuming project. (This is something I don't have a confident understanding of, so it may not be functioning as intended).
The production build is built with rollup.js, which as I understand it, is currently the best tool for producing the smallest bundles, with ES6 module support.
Where possible, I've tried to normalize (de-dupe) all code to maximise the re-use of each routine and reduce the size of the source code

There are a few things I can try, to get the bundle size down:

Upgrade all development dependencies and make sure react-hotkeys is being built with the most up-to-date ES5 transpilation algorithms.
Check that production optimisation measures are indeed working as expected
Look into measures for producing reliable and consistent reporting on bundle size

There is also (hopefully) good news that the bundle will get slightly smaller in subsequent versions:

The next major release will be a refactor of v2.0, with a significantly more modularised architecture that should help to further reduce any code duplication. It will provide the exact same (supported) API as v2.0.
The next major release will also likely remove deprecated features which have been left in v2.0. for the time being, to aide people in migrating to the new API.

Please let me know if you have any other ideas or thoughts on how the bundle size may be reduced further.

Hi,
thanks for the detailed answer and for the hard work on this great library!
I think you are doing everything right when it comes to optimization, the only thing that comes to mind would be some lightweight build that would cover only some basic functionality (not sure if that would actually help) but I think this library is not that big to have this additional complexity justified.
We will see what happens at 3.0 that will remove the deprecated features.
Cheers

Yes, a possibility I forgot to mention is that parts of the library may be able to be abstracted into optional plugin packages. At the moment, react-hotkeys isn't set up for plugins, and the things that come to mind for abstraction are the legacy backwards compatible components. But there may be something that makes itself known as I continue to think about it.
Similarly, I don't think there is currently much to jettison for a stripped down version. I also don't particularly like the idea of maintain two libraries, when I can barely keep up with one.
But I'm open to suggestions on optional features that may be spun off, and are worth the hassle of doing so when it comes to bundle size.
Thanks for putting this back on my radar. I shall endeavour to find a more consistent and systematic way of tracking bundle size in the future so it remains at the forefront of my mind.

Let me know if you'd like a hand with this. My team has been working hard on bundle optimizations and we'd actually like to use this library if it weren't for the bundle size. Every byte makes a difference for us. I'd be happy to help out if it could lead to use implementing react-hotkeys in our product.


SLS invoke shows vars.populateService(...).then is not a function

Version of the plugin: Latest, tried with locking to version 1.3.6
I just followed the installation procedure with the latest version but I get the following error:

If I switch to 1.3.3 and 1.3.5 the error is not there.
I also follow this tutorial to setup the project. https://serverless.com/blog/tdd-serverless/ but had the same outcome.

@NikolaNikushev Hi, thanks for reporting this issue. We had to change the populateService execution at some point because it changed somehow in the Serverless framework. If it is possible, you could upgrade your serverless version to >= 1.13.2, any working version of serverless after that should work.

@laardee, that indeed fixed it. Thank you very much.
Updated my serverless to the newest one and reinstall the plugin and everything works fine.


Can't run docz:

Question
Description
Got a runtime error this.context.router.history.createHref is not a function
Stack trace
🚨 Whoops, we crashed 🚨
this.context.router.history.createHref is not a function
Stack trace
in Link (created by Route)
in Route (created by NavLink)
in NavLink (created by NavHashLink)
in NavHashLink (created by Link)
in Link (created by ConsumerMemoization)
in ConsumerMemoization
in CopyOnWriteConsumer
in ThemeConfig (created by Link$3)
in div (created by Wrapper)
in Wrapper (created by Link$3)
in Link$3 (created by g)
in nav (created by Menus)
in Menus (created by g)
in div (created by Wrapper)
in Wrapper (created by g)
in g (created by Toggle)
in Toggle
in g
in ConsumerMemoization
in CopyOnWriteConsumer (created by Docs)
in Docs
in Adopt (created by Adopt(Unknown))
in Adopt(Unknown) (created by Adopt(Unknown)(Unknown))
in Adopt(Unknown)(Unknown) (created by Adopt(Unknown)(Unknown)(Unknown))
in Adopt(Unknown)(Unknown)(Unknown) (created by Adopt(Unknown)(Unknown)(Unknown)(Unknown))
in Adopt(Unknown)(Unknown)(Unknown)(Unknown) (created by Sidebar)
in Sidebar (created by ConsumerMemoization)
in div (created by Wrapper)
in Wrapper (created by Main)
in Main (created by ConsumerMemoization)
in ConsumerMemoization
in CopyOnWriteConsumer
in ThemeConfig (created by NotFound)
in NotFound (created by Route)
in Route (created by ConsumerMemoization)
in Switch (created by ConsumerMemoization)
in ConsumerMemoization
in CopyOnWriteConsumer
in MDXProvider (created by DocPreview)
in DocPreview (created by ConsumerMemoization)
in g (created by ConsumerMemoization)
in ThemeProvider (created by ConsumerMemoization)
in ConsumerMemoization
in CopyOnWriteConsumer
in ThemeConfig (created by Theme)
in Theme (created by DoczTheme)
in DefaultWrapper (created by DoczTheme)
in Router (created by BrowserRouter)
in BrowserRouter (created by DoczTheme)
in DataServer (created by DoczTheme)
in CopyOnWriteStoreProvider (created by DoczTheme)
in ErrorBoundary (created by DoczTheme)
in DoczTheme (at root.jsx:7)
in Root (created by HotExportedRoot)
in AppContainer (created by HotExportedRoot)
in HotExportedRoot (at index.jsx:17)

Give more information about your doubt
node: v8.9.4
react: v16.3 (tested also with 16.4, still the same crash)
docz: v0.10.2
docz-theme-default: v0.10.2

Twitter: If it's just a quick question you can ping me on Twitter: https://twitter.com/pedronauck

Can you show your package.json @francescogior ?

{
  "name": "project",
  "version": "0.0.1",
  "scripts": {
    "build": "echo \"WARNING: \\`yarn run build\\` has been deprecated in favour of \\`yarn run build:production\\`\" && yarn run clean && yarn run build:production",
    "build:basic": "webpack --progress --hide-modules --config webpack/basic.config.js",
    "build:clean": "rm -rf ./static/build",
    "build:development": "node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js --progress --hide-modules --config webpack/development.config.js",
    "build:development:watch": "yarn run build:development --watch",
    "build:production": "node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js --hide-modules --config webpack/production.config.js",
    "clean": "echo \"WARNING: \\`yarn run clean\\` has been deprecated in favour of \\`yarn run build:clean\\`\" && yarn run build:clean",
    "flow": "flow check",
    "jsdoc": "jsdoc -c ./modules/.jsdocrc.json",
    "jsdoc:clean": "rm -rf ./docs/jsdoc",
    "jest": "jest",
    "jest:watch": "jest --watch",
    "lint": "yarn run eslint && yarn run stylelint",
    "eslint": "eslint modules/ --ext .jsx",
    "prettier:write": "yarn prettier --write --single-quote --trailing-comma all './modules/**/*.jsx'",
    "start": "yarn run build:clean && yarn install && yarn run build:development:watch",
    "storybook": "build-storybook -c local_modules/storybook/ -o docs/storybook",
    "storybook:clean": "rm -rf ./docs/storybook",
    "storybook:watch": "export __STORYBOOK__=true; start-storybook -h <IP_ADDRESS> -p 9001 -c modules/storybook -s .",
    "stylelint": "stylelint ./local_modules/**/*.css",
    "test": "yarn check --integrity --verbose && yarn relay && yarn relay-admin && yarn run lint && yarn run flow && yarn run jest",
    "relay": "relay-compiler --src ./modules --exclude 'ms-admin/**' --schema ./schema.gql --extensions jsx",
    "relay:clean": "find . -type f -path '**/__generated__/*' -exec rm {} ';'",
    "relay:watch": "yarn run relay --watch",
    "relay:validate": "yarn run relay --validate",
    "generate-schema": "./manage.py dump_graphql_schema > schema.gql",
    "generate-schema-admin": "./manage.py dump_graphql_schema --admin > schema-admin.gql",
    "generate-schema-playground": "./manage.py dump_graphql_schema --playground > schema-playground.gql",
    "docz:dev": "docz dev",
    "docz:build": "docz build"
  },
  "jest": {
    "globals": {
      "__STORYBOOK__": false
    },
    "moduleDirectories": [
      "node_modules",
      "modules"
    ],
    "moduleNameMapper": {
      "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/.jest/fileMock.js",
      "\\.(css|less)$": "<rootDir>/.jest/styleMock.js"
    },
    "setupFiles": [
      "./.jest/setup.js"
    ],
    "testMatch": [
      "**/test.jsx"
    ],
    "transform": {
      "\\.gql$": "<rootDir>/.jest/rawLoader.js",
      "\\.jsx?$": "babel-jest"
    }
  },
  "dependencies": {
    "aphrodite": "1.1.0",
    "babel-polyfill": "6.26.0",
    "brace": "0.8.0",
    "cytoscape": "2.7.15",
    "cytoscape-cola": "1.5.0",
    "cytoscape-dagre": "1.4.0",
    "dagre": "0.7.4",
    "deep-freeze": "0.0.1",
    "detect-browser": "2.1.0",
    "enzyme": "3.3.0",
    "exports-loader": "0.6.3",
    "fuzzy": "0.1.3",
    "graphiql": "0.11.11",
    "history": "4.4.1",
    "idx": "1.5.0",
    "immutable": "3.8.1",
    "jquery": "1.12.2",
    "jquery-migrate": "1.4.1",
    "js-base64": "2.4.3",
    "load-script": "1.0.0",
    "lodash": "4.17.10",
    "logrocket": "0.6.3",
    "moment": "2.21.0",
    "moment-timezone": "0.5.11",
    "phantomjs-prebuilt": "2.1.15",
    "ramda": "0.22.1",
    "raven-js": "3.22.2",
    "react": "16.3.2",
    "react-apollo": "1.4.4",
    "react-dnd": "2.5.4",
    "react-dnd-touch-backend": "0.2.7",
    "react-dom": "16.3.2",
    "react-helmet": "5.1.3",
    "react-icons": "2.2.7",
    "react-immutable-proptypes": "2.1.0",
    "react-redux": "5.0.6",
    "react-relay": "1.6.2",
    "react-router-dom": "4.2.2",
    "redux": "3.5.2",
    "redux-thunk": "2.2.0",
    "relay-runtime": "1.6.2",
    "resize-observer-polyfill": "1.5.0",
    "smoothscroll-polyfill": "0.4.0",
    "uglifyjs-webpack-plugin": "1.2.7",
    "webcola": "3.3.3",
    "whatwg-fetch": "2.0.1"
  },
  "devDependencies": {
    "@storybook/addon-actions": "4.0.0-alpha.12",
    "@storybook/addon-knobs": "4.0.0-alpha.15",
    "@storybook/addons": "4.0.0-alpha.12",
    "@storybook/react": "4.0.0-alpha.12",
    "babel-core": "6.26.0",
    "babel-eslint": "8.2.3",
    "babel-jest": "22.1.0",
    "babel-loader": "7.1.4",
    "babel-plugin-idx": "1.5.1",
    "babel-plugin-ramda": "1.1.6",
    "babel-plugin-relay": "1.6.2",
    "babel-preset-env": "1.6.0",
    "babel-preset-react": "6.11.1",
    "babel-preset-stage-2": "6.24.1",
    "babel-runtime": "6.26.0",
    "clipboard-js": "0.3.2",
    "copy-webpack-plugin": "3.0.1",
    "css-loader": "0.23.1",
    "docz": "0.9",
    "docz-theme-default": "0.10.2",
    "enzyme-adapter-react-16": "1.0.2",
    "eslint": "4.19.1",
    "eslint-config-airbnb": "11.1.0",
    "eslint-config-mathspace": "0.5.1",
    "eslint-config-prettier": "2.9.0",
    "eslint-import-resolver-webpack": "0.10.0",
    "eslint-plugin-flowtype": "2.30.0",
    "eslint-plugin-import": "2.11.0",
    "eslint-plugin-jsx-a11y": "2.2.2",
    "eslint-plugin-prettier": "2.5.0",
    "eslint-plugin-react": "7.7.0",
    "expose-loader": "0.7.1",
    "faker": "4.1.0",
    "file-loader": "1.1.11",
    "flow-bin": "0.75.0",
    "graphql": "0.13.2",
    "graphql-tools": "2.23.1",
    "imports-loader": "0.7.1",
    "ink-docstrap": "1.2.1",
    "jest": "23.4.0",
    "jest-fetch-mock": "1.6.0",
    "jsdoc": "3.4.0",
    "jshint": "2.9.2",
    "loader-utils": "1.1.0",
    "prettier": "1.11.0",
    "prop-types": "15.6.0",
    "raw-loader": "0.5.1",
    "react-devtools": "3.2.0",
    "react-devtools-core": "3.2.0",
    "react-dnd-test-backend": "1.0.2",
    "react-test-renderer": "16.3.2",
    "relay-compiler": "1.6.2",
    "serv": "0.2.4",
    "style-loader": "0.17.0",
    "stylelint": "7.0.3",
    "stylelint-config-standard": "11.0.0",
    "url-loader": "0.5.8",
    "webpack": "4.15.0",
    "webpack-bundle-tracker": "0.3.0",
    "webpack-cli": "2.1.4",
    "webpack-hot-middleware": "2.12.2",
    "webpack-merge": "4.1.0",
    "webpack-synchronizable-shell-plugin": "0.0.7"
  },
  "resolutions": {
    "eslint-config-airbnb-base": "7.1.0",
    "graphql": "0.13.2"
  },
  "private": true,
  "engines": {
    "yarn": "^1.7.0"
  }
}

There's a lot of dependencies running together, can be some version conflict. Looking into your error seems to be an error about the new createHref method, but you tried to update and the bug keeps popping up, right? So, I can see this error I need a minimal setup of your project in a repo. Can you do this?

Unfortunately I can't

@francescogior when you have a project that we can test and find the problem, you reopen the issue.


Ability to set API key system wide

I love using dogwrap on my cron jobs. I would like to be able to set the API key system wide so that I each of my cron tasks don't end up looking like this:
45 1 * * * root dogwrap -k 'ffffffffffffffffffffffffffffffff' -n 'Database Backup: blah blah' -m all '/usr/local/bin/pgbackup'

Also if I need to rotate keys, I could change them easily all in one place.
Thanks!

Thanks for your suggestion @danieljimenez.
dogapi is deprecated, and dogwrap  is now part of datadog package.
We are releasing a new version v0.4.0 which includes the ability to set your API parameters with environment variables.
Feel free to reopen this case on [datadog] (https://github.com/DataDog/datadogpy) repo if this solution does not suit your use case.


Unable to locate package capnproto-dev

I try to install the dev headers before installing node-capnp as the doc says:
sudo apt-get install nodejs-dev nodejs-legacy capnproto-dev
I get this error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package capnproto-dev
I use ubuntu 14.04.
So far I was not able to locate this package anywhere, did the installation steps change?

Hmm, I don't quite recall if Cap'n Proto was in Ubuntu 14.04 -- sounds like it wasn't. But note that Cap'n Proto is still pretty young and changing frequently. The current node-capnp code requires Cap'n Proto 0.5.x, which is available in Debian unstable/testing; I'm not sure if it has made it into Ubuntu at all yet.

Sorry for the delay, I had to put this aside for a while.
I have cloned the node-capnp repo and finally I could build it from source on Ubuntu, but I had to use the headers from capnp master branch. The problem is that in the project I work on we have a c++ backend with a nodejs front end, and we try to use the same version of the c++ capnp lib to avoid incompatibility issues and streamline our build process. So far in our c++ backend we used the latest release version (0.5.3), and according to your previous comment, the current node-capnp also requires 0.5.x. But if I use the headers from this release, I have errors during build like:
./src/node-capnp/capnp.cc: In member function ‘capnp::Orphancapnp::DynamicValue v8capnp::{anonymous}::FromJsConverter::orphanFromJs(capnp::StructSchema::Field, capnp::Orphanage, capnp::Type, v8::Handlev8::Value)’:
../src/node-capnp/capnp.cc:1283:18: error: ‘class capnp::Type’ has no member named ‘whichAnyPointerKind’
if (type.whichAnyPointerKind() == capnp::schema::Type::AnyPointer::Unconstrained::CAPABILITY) {
^
../src/node-capnp/capnp.cc:1283:76: error: ‘capnp::schema::Type::AnyPointer::Unconstrained’ has not been declared
if (type.whichAnyPointerKind() == capnp::schema::Type::AnyPointer::Unconstrained::CAPABILITY) {
Would it be possible to bind node-capnp to the latest release of capnp? The master branch is changing constantly and we cannot risk to use it in our project (even if we could just use it in our c++ backend easily, as right now node-capnp requires this version)

There is one more issue, unfortunately when I require the capnp module that I built myself, I get this error:
Error: /home/dev/Projects/Playground/NodejsWrapperCapnProto/node_modules/capnp/bin/linux-x64-v8-3.14/capnp.node: undefined symbol: _ZNK2kj9EventPort4wakeEv
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/dev/Projects/Playground/NodejsWrapperCapnProto/node_modules/capnp/src/node-capnp/capnp.js:47:15)
This is when I execute npm test, or when I just require it in my nodejs app. (var capnp = require("capnp");)
Do you maybe know what is wrong here?

Not sure about the undefined symbol error, but I agree in any case that you should stick to the release version of Cap'n Proto. It sounds like we've accidentally introduced some incompatibility between node-capnp master and Cap'n Proto 0.5.x. I believe, though, that the most recent version of node-capnp published to the npm repository should work with Cap'n Proto 0.5.x. Can you try installing node-capnp from npm, with Cap'n Proto 0.5.3 installed locally from source?

Thanks for your help, based on your reply I checked around and noticed that I had some capnp and kj headers of unknown origin in /usr/include folder. I have removed these, and as you suggested I installed Cap'n Proto 0.5.3 from source. All went fine, I also got the headers in /usr/local/include folder. Then finally I could install capnp-node from npm with 'npm install capnp' command. But when I try to use it in my app, or run 'npm test' in capnp module folder, I still get the undefined symbol error, same as before:  undefined symbol: _ZNK2kj9EventPort4wakeEv
Looks like something is wrong with linking to kj lib, any idea what can go wrong there?

_ZNK2kj9EventPort4wakeEv should be in libkj-async.so. It should be in 0.5.x but may not have been present in previous versions. Is it possible there is a bogus copy of libkj-async.so hiding somewhere on your system?

I have a similar problem. I am working on a Meteor package for capnproto and the capnproto-dev dependency is pretty heavy. Especially if one assumes that capnproto will be used only inside Sandstorm grains, when used as this Meteor package.
I also use Ubuntu 14.04 LTS.

On Ubuntu 16.04 and later, the name of the required package appears to be libcapnp-dev rather than capnproto-dev.


Write React Best Practices & Style Guide

Write a style guide for developers on the Mapstory/Storyscapes project based on existing best practices to be included in the project wiki.

Mapstory JavaScript Style & Pattern guide started here: https://gist.github.com/darinacosta/b16d295c3f32bad99e60e82fe7dd6968. Will be adding to this over the coming weeks as I do more reading/research.


Deprecated ruff <file>

error: ruff   has been removed. Use ruff check   instead.
with
ruff 0.6.5

Maybe need to check version of ruff during this transition period.

Looks like you removed 0.40


Hello

Could I please get the decrypted script

I have given the decrypted version previously later on i had to reverse it as someone complained that it's not working.

Neither is the encrypted one working, the live CC's shown as live are dead so that's why I needed the non-encrytped one so I can maybe fix an error or 2


there is a erroe on windows

Bug description
my os is windows
when  I use it to predict
it happens:
OSError: no library called "cairo-2" was found
no library called "cairo" was found
cannot load library 'C:\Program Files (x86)\Graphviz2.38\bin\libcairo-2.dll': error 0xc1
cannot load library 'libcairo.so.2': error 0x7e
cannot load library 'libcairo.2.dylib': error 0x7e
cannot load library 'libcairo-2.dll': error 0xc1
Code snippet to reproduce the bug
OSError: no library called "cairo-2" was found
no library called "cairo" was found
cannot load library 'C:\Program Files (x86)\Graphviz2.38\bin\libcairo-2.dll': error 0xc1
cannot load library 'libcairo.so.2': error 0x7e
cannot load library 'libcairo.2.dylib': error 0x7e
cannot load library 'libcairo-2.dll': error 0xc1
Error traceback
OSError: no library called "cairo-2" was found
no library called "cairo" was found
cannot load library 'C:\Program Files (x86)\Graphviz2.38\bin\libcairo-2.dll': error 0xc1
cannot load library 'libcairo.so.2': error 0x7e
cannot load library 'libcairo.2.dylib': error 0x7e
cannot load library 'libcairo-2.dll': error 0xc1
Environment
OSError: no library called "cairo-2" was found
no library called "cairo" was found
cannot load library 'C:\Program Files (x86)\Graphviz2.38\bin\libcairo-2.dll': error 0xc1
cannot load library 'libcairo.so.2': error 0x7e
cannot load library 'libcairo.2.dylib': error 0x7e
cannot load library 'libcairo-2.dll': error 0xc1
Deep Learning backend
OSError: no library called "cairo-2" was found
no library called "cairo" was found
cannot load library 'C:\Program Files (x86)\Graphviz2.38\bin\libcairo-2.dll': error 0xc1
cannot load library 'libcairo.so.2': error 0x7e
cannot load library 'libcairo.2.dylib': error 0x7e
cannot load library 'libcairo-2.dll': error 0xc1

Hi @dingli06 👋 ,
There is currently a closed issue about this can you please try if it help #701 ? :)

Hi @dingli06 👋 , There is currently a closed issue about this can you please try if it help #701 ? :)

thanks, I have solve it

@dingli06 👍
@charlesmindee please close :)

Thanks @felixdittrich92


Documentation for locally running the app

Discord Username: @papaurke
What type of PR is this? (select all that apply)

[ ] 🍕 Feature
[ ] 🐛 Bug Fix
[ ] 🚧 Breaking Change
[ ] 🧑💻 Code Refactor
[x] 📝 Documentation Update

Description
Added Run the application locally part inside the readme file
Related Tickets & Documents

Documentation

QA Instructions, Screenshots, Recordings
Check README.md

This information is in the CONTRIBUTING.md file. I don't think it would be useful to have it duplicated here.
However, If other people think it is useful, I'd recommend to move it to the ## Contribution section (line 62 or something).

this is all outlined in the contributing doc, closing


Bad option: --harmony_arrow_functions if run from npm run

This is not related to flightplan. Please note that ./node_modules/fly is not related to flightplan. Your setup is probably conflicting with fly. See also #96.


Material design update

Is this the best way to get a code review in? Let me know if there is a better way

Do you have a migration plan for existing sites?

Not yet, I can work on that next

Yeah, what I'm most worried about is that existing sites may have some modified templates and end up with a weird mix of themes.

Discussed with @decause, we'll just do a non-destructive sync of the templates to the existing sites. I'll add an ofcourse command to handle it.
Once the sync is done, the profs can use git add -p and accept only the changes they like.

@mellolikejello This is great, I just whipped up the sync command and did a (test) migration of the HFOSS site. You can pull down the latest develop to try it yourself. :)

Oh, I forgot to ask: is there an easy way for you to detect CSS and such that isn't being used anymore?

awesome!

I found a firefox plugin to find unused CSS https://addons.mozilla.org/en-us/firefox/addon/dust-me-selectors/ . There were a few others, but I wasn't sure how they'd work with ofcourse.

There were just a few unused selectors in site.css. I can remove them


AbstractFunctionRestrictions: Efficiency tweak.

As there are by now quite a number of sniffs which use the AbstractFunctionRestrictions class as the basis and T_STRING tokens are quite common, the "checking whether a T_STRING is a function call" part might be done ten or more times for each T_STRING token.
By adding a preliminary check whether the token content matches one of the targeted functions, we can bow out early and prevent a lot of this overhead.
It would be even better if we could use a straight array with isset(), but unfortunately that won't work here as the list of functions can contain function names with wildcards.
Having this extra check does mean we have to decouple the AbstractClassRestrictionsSniff::process_token() method from the parent as for the class sniffs we don't know the class name yet at that point in time.
@JDGrimes Can you work your magic with the speed test on this PR ? I'm definitely curious to see how much this helps (presuming it does...).

🚀 This improves performance by as much as 15%: https://blackfire.io/profiles/compare/d8843cc9-c09a-4f0b-868f-318db3f0f90c/graph

@JDGrimes Thanks for that! I was hoping it would ;-)