Cannot make HTTP requests to kube-apiserver from inside cluster when 6443 is not published

As part of some further experimentation, I've been trying to deploy multiple usernetes on the same machine and setting up different high ports to publish the kube-apiserver to things outside of the cluster. The setup is basically:
$ HIGH_PORT=$(( $RANDOM + 1024))
$ ./install.sh --cri=crio --publish="<IP_ADDRESS>:${HIGH_PORT}:6443/tcp"
$ sed -i "s/:6443/:${HIGH_PORT}/" ~/.config/usernetes/master/admin-*.kubeconfig

I can make a request to the kube-apiserver from outside rootlesskit like so:
$ curl -k https://localhost:17488
{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {

  },
  "status": "Failure",
  "message": "Unauthorized",
  "reason": "Unauthorized",
  "code": 401
}
$ kubectl --kubeconfig ~/.config/usernetes/master/admin-localhost.kubeconfig version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.2", GitCommit:"52c56ce7a8272c798dbc29846288d7cd9fbae032", GitTreeState:"archive", BuildDate:"2020-07-28T00:00:00Z", GoVersion:"go1.15rc1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"21+", GitVersion:"v1.21.0-beta.0", GitCommit:"66fa2c49e28b9dcf478a87636971bc7d241b2849", GitTreeState:"clean", BuildDate:"2021-02-23T20:30:49Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"}

However when I attempt to make a similar request to the in-cluster end of the API server, I get my connection reset:
$ ./rootlessctl.sh list-ports
ID    PROTO    PARENTIP     PARENTPORT    CHILDPORT
1     tcp      <IP_ADDRESS>    17488         6443
$ kubectl run --rm -ti --restart=Never --image docker.io/library/busybox:stable foo -- wget https://<IP_ADDRESS>
Connecting to <IP_ADDRESS> (<IP_ADDRESS>:443)
wget: note: TLS certificate validation not implemented
wget: got bad TLS record (len:0) while expecting handshake record
wget: error getting response: Connection reset by peer
pod "foo" deleted
pod default/foo terminated (Error)

This manifests in breakage in the coredns manifests bundled with usernetes since they can't access the api server and then fail their readiness checks.
Events:
  Type     Reason     Age                From                             Message
  ----     ------     ----               ----                             -------
  Normal   Scheduled  <unknown>                                           Successfully assigned kube-system/coredns-76f5d77d78-twrvj to virt-test.lan
  Warning  BackOff    22s (x4 over 66s)  kubelet, virt-test.lan  Back-off restarting failed container
  Normal   Pulled     8s (x4 over 107s)  kubelet, virt-test.lan  Container image "coredns/coredns:1.8.3" already present on machine
  Normal   Created    8s (x4 over 107s)  kubelet, virt-test.lan  Created container coredns
  Normal   Started    8s (x4 over 107s)  kubelet, virt-test.lan  Started container coredns
  Warning  Unhealthy  4s (x7 over 104s)  kubelet, virt-test.lan  Readiness probe failed: Get "http://<IP_ADDRESS>:8181/ready": dial tcp <IP_ADDRESS>:8181: connect: connection refused

Adding the default <IP_ADDRESS>:6443:6443/tcp" port forward makes everything work as normal, but then multiple usernetes cannot co-exist on the same machine and it seems likely that there will be cross-talk between the clusters since packets are obviously making their way outside of the cluster somehow! Interestingly, adding a <IP_ADDRESS>:6443:6443/tcp*does not* fix the misbehaviour. For context in the shell output below, <IP_ADDRESS> is an IP on a dummy interface on my box - effectively localhost. Note that only the<IP_ADDRESS>:6443` rule works (ie. allows me to request the API server and get a 401 response).
$ ./rootlessctl.sh add-ports <IP_ADDRESS>:6443:6443/tcp
2
$ kubectl run --rm -ti --restart=Never --image docker.io/library/busybox:stable foo -- wget https://<IP_ADDRESS>
Connecting to <IP_ADDRESS> (<IP_ADDRESS>:443)
wget: note: TLS certificate validation not implemented
wget: server returned error: HTTP/1.1 401 Unauthorized
pod "foo" deleted
pod default/foo terminated (Error)
(failed reverse-i-search)`remove': kubectl run --rm -ti --^Cstart=Never --image docker.io/library/busybox:stable foo -- wget https://<IP_ADDRESS>
$ ./rootlessctl.sh remove-ports 2
2
$ ./rootlessctl.sh add-ports <IP_ADDRESS>:6443:6443/tcp
3
$ kubectl run --rm -ti --restart=Never --image docker.io/library/busybox:stable foo -- wget https://<IP_ADDRESS>
Connecting to <IP_ADDRESS> (<IP_ADDRESS>:443)
wget: note: TLS certificate validation not implemented
wget: short read, have only 0: Connection reset by peer
wget: error getting response: Connection reset by peer
pod "foo" deleted
pod default/foo terminated (Error)
$ kubectl delete^Cod foo
$ ./rootlessctl.sh remove-ports 3
3
$ ./rootlessctl.sh add-ports <IP_ADDRESS>:6443:6443/tcp
4
$ kubectl run --rm -ti --restart=Never --image docker.io/library/busybox:stable foo -- wget https://<IP_ADDRESS>
Connecting to <IP_ADDRESS> (<IP_ADDRESS>:443)
wget: note: TLS certificate validation not implemented
wget: short read, have only 0: Connection reset by peer
wget: error getting response: Connection reset by peer
pod "foo" deleted
pod default/foo terminated (Error)

This can be fixed by configuring the coredns deployment to point at the rootlesskit tap's IP using one of the two following patch hunks:
diff --git a/manifests/coredns.yaml b/manifests/coredns.yaml
index e39d3f9..93446ff 100644
--- a/manifests/coredns.yaml
+++ b/manifests/coredns.yaml
@@ -58,6 +58,7 @@ data:
         health
         ready
         kubernetes cluster.local in-addr.arpa ip6.arpa {
+          endpoint https://<IP_ADDRESS>:6443
           pods insecure
           fallthrough in-addr.arpa ip6.arpa
         }
@@ -109,6 +110,11 @@ spec:
             cpu: 100m
             memory: 70Mi
         args: [ "-conf", "/etc/coredns/Corefile" ]
+        env:
+        - name: KUBERNETES_SERVICE_HOST
+          value: "<IP_ADDRESS>"
+        - name: KUBERNETES_SERVICE_PORT
+          value: "6443"
         volumeMounts:
         - name: config-volume
           mountPath: /etc/coredns

and adding the tap's IP to the cert generation with this patch:
diff --git a/common/cfssl.sh b/common/cfssl.sh
index ae30d95..3e0a5dc 100755
--- a/common/cfssl.sh
+++ b/common/cfssl.sh
@@ -141,7 +141,7 @@ else
 	log::info "Creating ${master_d}/{kubernetes.pem,kubernetes-key.pem}"
 	k_hostnames="kubernetes,kubernetes.default,kubernetes.default.svc,kubernetes.default.svc.cluster,kubernetes.svc.cluster.local"
 	ip_addrs=$(hostname -I | sed -e 's/ /,/g' -e 's/,$//g')
-	k_cluster_ip="<IP_ADDRESS>"
+	k_cluster_ip="<IP_ADDRESS>,<IP_ADDRESS>"
 	cfssl gencert -loglevel="$loglevel" \
 		-ca="${master_d}/ca.pem" \
 		-ca-key="${master_d}/ca-key.pem" \

But obviously that would need to be fed the value of --cidr from install.sh to be correct.
However, fixing each instance of this breakage seems like it'll just be a game of whack-a-mole and it would be better for in-cluster access to the API sevice to Just Work (TM).
My best theory is that kube-proxy is directing the traffic to <host_ip>:6443 which allows the packet to escape the network namespace and then only be able to get back in via the rootlesskit port forward. It's a bit hard to tell with the userspace kube-proxy driver.

Let me close this, as the architecture was changed in "Generation 2":
https://github.com/rootless-containers/usernetes/releases/tag/gen2-v20230906.0


Add docker e2e api tests workload cluster k8s upgrade, taints and labels

Issue #, if available:
Description of changes:
This PR renames a file and adds two docker e2e tests for the full lifecycle API. It also adds the UpdateKubeConfig to e2e Provider interface, which is required implementation for the docker provider.
This is part 1 of a bigger PR. There will be another one adding validations for labels and taints to the controlplane and worker nodes validations.
--- PASS: TestDockerUpgradeWorkloadClusterLabelsAndTaintsAPI (1086.90s)
--- PASS: TestDockerUpgradeKubernetes123to124WorkloadClusterScaleWorkerNodesAPI (1418.77s)
Testing (if applicable):
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/retest

/lgtm

/approve

/lgtm


logging config: DEBUG -> INFO

@confluentinc It looks like @sullis just signed our Contributor License Agreement. :+1:
Always at your service,
clabot

@sullis could you elaborate the motivation to change default logging level to INFO?

What is the status of this? Should this PR be closed?

@mjsax:

We recently intentionally increase the log level to DEBUG -- sometimes some tests fails (due to race conditions) and having DEBUG level logs give us valuable information to fix those tests.

Shouldn't we rather update our build (Jenkins) to override the log level, rather than exposing every user to the flood of DEBUG messages?

\cc @guozhangwang @bbejeck @vvcephei Any comments?

I'm not sure how to change the jenkins settings to override log levels, but assuming it is doable I'm fine with changing it back to INFO.

@sullis I'm going to merge this PR and explore other ways to enable efficient trouble shooting.


fix: load google credentials properly in GoogleDriveLoader

Description:

Fix #12870: set scope in default func (ref: https://google-auth.readthedocs.io/en/master/reference/google.auth.html)
Moved the code to load default credentials to the bottom for clarity of the logic
Add docstring and comment for each credential loading logic

Issue: https://github.com/langchain-ai/langchain/issues/12870
Dependencies: no dependencies change
Tag maintainer: for a quicker response, tag the relevant maintainer (see below),
Twitter handle: @gymnstcs

@hwchase17 Can you review this PR?

google drive loader seems good to have working


Figure out how to integrate the prometheus chart

Prom is not a first class Istio component but is needed for demos. Figure out the right way to integrate the chart to support a single line demo install while not integrating prom too deeply into the operator.
One way to kick the can down the road is to install it through the existing values.yaml passthrough API.

Whats the plan for non-demo? Bring your own Prometheus operator and we provide the yamls to get istio scraping?

Also should we consider integrating with prometheus that already exists in the cluster?

I believe @mandarjog and @douglas-reid worked on integrating the prom operator - can you guys comment on the plan for it going forward? Is it just a straight drop in replacement for the chart we had before?

@ostromart it can be used a straight drop-in. The plan for the prom operator is to allow people that are already managing a prom deployment with the prom operator to generate the CRs necessary to scrape istio endpoints. There is a mode for also generating a prom CR, in the cases where the user is not already running a prometheus instance. Used in that way, it can be a drop-in replacement.

In that case I propose we use it as a drop-in for the demo profile, using the helm passthrough API. For integrating with existing prom, we'll leave that outside operator scope.
@douglas-reid is there a values.yaml available somewhere for the demo use case?

Does prom CR depend on how the Istio control plane is deployed? Or will a single static definition be sufficient for any control plane deployment?

It's not static - see https://github.com/istio/installer/tree/master/istio-telemetry/prometheus-operator/templates

Fixed.


OTZmqCmdEA.mq4 does not compile

It requires a bunch of unavailable .mqh files. Is this expected?

Did you follow the Installation directions and instal OTMql4Lib and OTMql4Py first?
It is working fine, so probably you just have some installation issues.
I'm working on an installer...

Thanks for the swift reply.
Yes I did, but I can't anywhere files like

OTLibJsonFormat.mqh
OTLibLog.mqh

and another couple of headers like these ones.

Unresponsive


Allow parsing sub-sat denominations with decimal points

Numbers with only zeros after decimal points are valid if they are also
multiples of 10^precision (e.g. 1000 for msats). These were
artificially disallowed as "too precise" which was at least misleading.
This change allows parsing such numbers.
And yes, I know this is not perfectly efficient (unless the compiler figures out some magic opts) but so isn't the rest of the code. TBH this parsing code drives me crazy and I'd love to rewrite it to be more efficient and readable.

I'm skeptical that we should allow too-precise values just because the extra precision happens to specify something we're able to represent exactly. It seems like a special case that users would need to memorize. Especially if they changed the data and suddenly got a "too precise" error even though their precision hadn't changed at all.
In general I've been willing to ACK basically anything related to this code because I don't care about trying to parse amounts from strings, and don't plan to ever care, and I can see the argument for this, so I'm happy to ACK it. But I also don't necessarily think it's the right idea.

My idea is to be consistent with f64 which always allows decimal point. The case of people changing data and suddenly becoming an error is already a problem e.g. we accept 1000 msat so changing it to 1001 msat will trigger the error you describe.

Well, f64 will just silently mangle data rather than producing precision errors under any circumstances.
But ok, if these are the existing semantics of msat etc., then I agree that this PR is consistent with that. So I rescind my skepticim.

1176ae5f58ef6d81d23d5dc6a66ebc1f5f1154ca does not compile.
error[E0425]: cannot find value `msat` in this scope
    --> bitcoin/src/amount.rs:1657:37
     |
1657 |         assert_eq!(p("999.0000000", msat), Err(E::TooPrecise));
     |                                     ^^^^ help: a local variable with a similar name exists: `sat`

concept ACK, though tbh I agree with Andrew. In principle it would be better to no longer allow 1000 msat instead of allowing more off things.
What is the motivation for this change? Did you bump into this restruction personally?

@stevenroose the main motivation is consistency. Anything that is a correctly formatted number should be accepted if it's representable. Note that I also find the limit on maximum length kinda weird but I guess it's DoS protection and the error message is reasonable. I guess there was a reason to support msats in the first place.


Add Call From event

Description
This pull request adds a new type of event called Call From, which allows users to call methods from other nodes besides the Event Manager node itself.
Images

Type of change

New feature (non-breaking change which adds functionality)

How Has This Been Tested?
I am using this in my own projects

Good catch, very well handle of arrays, setter and getters of the event and good PR format.
This event will only work with an specific scene in a specific path, but since timelines are usually tied internally to EventManager, is not a big problem.
Many thanks!


fix: sync hidden keys

- What I did

Sync public hidden keys(keys with __) between cloud and local secondary.

- How I did it

Increment the commitId for the keys that start with public:__

- How to verify it

Create public:__ keys in local and cloud secondary and keys should sync.

- Description for the changelog

please add changelog details to persistence secondary


Support aggregation service？

Can the Kong  support  KONG support aggregation service like  ocelot ?http://ocelot.readthedocs.io/en/latest/features/requestaggregation.html

duplicate of #155


WIP: support for geologic time series; closes issue #213

This change adds a new resqpy class, GeologicTimeSeries, which is designed to be used for RESQML TimeSeries objects which are on a geological timeframe.
Note that initial code changes were accidentally merged directly into master (sorry!)
Resolves issue #213

Codecov Report

Merging #215 (40e260d) into master (5a2bdaa) will increase coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #215      +/-   ##
==========================================
+ Coverage   48.16%   48.17%   +0.01%
==========================================
  Files          53       53
  Lines       25184    25155      -29
==========================================
- Hits        12130    12119      -11
+ Misses      13054    13036      -18

Impacted Files
Coverage Δ

resqpy/time_series.py
51.64% <ø> (+0.13%)
:arrow_up:

resqpy/olio/simple_lines.py
40.65% <0.00%> (-0.48%)
:arrow_down:

resqpy/olio/wellspec_keywords.py
66.66% <0.00%> (-0.31%)
:arrow_down:

resqpy/olio/keyword_files.py
41.80% <0.00%> (-0.13%)
:arrow_down:

resqpy/olio/factors.py
97.14% <0.00%> (-0.08%)
:arrow_down:

resqpy/lines.py
57.42% <0.00%> (-0.06%)
:arrow_down:

resqpy/olio/transmission.py
71.49% <0.00%> (-0.05%)
:arrow_down:

resqpy/grid_surface.py
77.61% <0.00%> (-0.03%)
:arrow_down:

resqpy/model.py
65.20% <0.00%> (ø)

resqpy/grid.py
39.45% <0.00%> (+0.01%)
:arrow_up:

... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5a2bdaa...40e260d. Read the comment docs.


Change cipher default strings to a function

Making the default cipher strings a function gives the library more
control over the defaults. Potentially allowing a change in the
future as ciphers become deprecated or dangerous.
Also allows third party distributors to change the defaults for their
installations.

Checklist

[X] documentation is added or updated
[ ] tests are added or updated - existing tests are sufficient

Making a function return that makes total sense to me. But I'm afraid this might somehow break existing applications that try to do things like sizeof(SSL_DEFAULT_CIPHER_LIST), and I'm not sure what to do with this.

@kroeckx good point. This is going into 3.0.0, where there could be ABI breaking changes.

That would actually be an API break.

We have said that 3.0 should have minimal breaking API changes, I
at least suggeted that 99% of the applications should keep working
with just a recompile.
You can at least use something like sources.debian.net to get an
idea if this might be a problem or not.

For curiosity I looked at the codesearch and there is a case where string literal concatenation is supposed to work for SSL_DEFAULT_CIPHER_LIST.

So, the question becomes, do the benefits outweigh the disadvantages (breaking a small percentage of apps). I'm more than willing to withdraw this, and/or modify it to not redefine SSL_DEFAULT_CIPHER_LIST (i.e. still a function to return the default cipher string, for apps to migrate to).

I think having the functions and just deprecating the strings is
the best way forward.

I agree with @kroeckx. Deprecate the string form.

Rebased, and deprecated defines as recommended.

Rebased... do we want to go with this?

ping @openssl ?

I made the requested changes ping @mattcaswell

I agree this approach would make the library more flexible to control the default list

Do I need to fix CHANGES before this is committed?

Pushed to master. I resolved the trivial CHANGES conflict myself. Thanks!


mavlink: correctly fill LOCAL_POSITION_NED_COV message

Right now it's impossible to get estimated covariances and accelerations with MAVROS.
In this PR I fill out LOCAL_POSITION_NED_COV message fields correctly. I get data from vehicle_local_position topic, because estimator_status fields are not actually formalised and have different values for EKF2 and LPE.
I created a corresponding in MAVROS (https://github.com/mavlink/mavros/pull/1142), so this info can actually be used.
Right only possibility to enable this message is only by the code. But it can be a configurable parameter.
But actually, only LOCAL_POSITION_NED_COV can be used instead of LOCAL_POSITION_NED as it contains all the information. The only problem is its giant size.

@okalachev this message was dropped some time ago for a purpose: the ODOMETRY msg is going to be used to get the feedback, instead of LOCAL_POSITION_NED_COV, which will probably be deprecated.

And the reference plugin: https://github.com/PX4/Firmware/pull/9895

So is ODOMETRY is going to replace the LOCAL_POSITION_NED? Is there any point to fix LOCAL_POSITION_NED for now, as ODOMETRY is not yet implemented?

No. ODOMETRY is not going to replace LOCAL_POSITION_NED. it has a different purpose. But eventually LOCAL_POSITION_NED_COV will be deprecated. So this is not a matter of fixing. It kust doea not make sense to support LOCAL_POSITION_NED_COV.

#10510 is already opened so to have the ODOMETRY loopback

LOCAL_POSITION_NED_COV is not actually a loopback. It's the estimated data from the estimator.
Also ODOMETRY doesn't have accelerations.

When I refer to loopback, I mean the estimated pose and velocity from the FCU. And we don't propagate the accelerations either way.

Why to use ODOMETRY to get the estimated state?
First, it doesn't have accelerations. How I can the accelerations from the FCU thought MAVLink then?
Also, it has redundant rollspeed, pitchspeed, yawspeed, which are already present in ATTITUDE_QUATERNION.

Either way, this PR has good intention but it does not fit the current defined odometey pipeline and message set. This message was also dropped some time ago for that same reason. So feel free to close it. I will ping you soon when I open the PR with the ODOMETRY stream support

How do I get estimated accelerations from the FCU with ODOMETRY message?

@okalachev read #9895 and you will understand the pipeline. This fita ROS REP 105. The accels will be supported as soon as we also have the OdometryWithAccel msg support on ROS, which is also planned by ROS developers.

If you are really using the accelerations on the other side, just apply a derivative the the velocity, which is actually what the ax, ay and az fields on the vehicle_local_position are.

When I refer to loopback, I mean the estimated pose and velocity from the FCU

Then, ODOMETRY should be the replacement for LOCAL_POSITION_NED, I guess. But the lack of accelerations data is still not cool.

Just apply a derivative of the velocity

No, that's ugly. Why I should calculate what is already is known actually?

@okalachev the accell estimation you think you have is nothing more that the derivative. Check the vehicle_local_position accel fields description.

ODOMETRY does not have to be a replacement for LOCAL_POSITION_NED. There are systems where you don't need covariances or velocities. Just the estimated pose from the FCU. Example: closed loop offboard control. For more complex systems like SLAM, then ODOMETEY will be used.

@okalachev maybe this is something it may interest you for future reference: https://github.com/mavlink/mavlink/pull/880

Pitching in here : currently the accel "estimates" published on the PX4 side is just the raw accelerometer data minus the estimated bias.

True, there is no good way to get the accel bias. Odom with accel is also talked about in the rep above. Maybe we should support that as well?

I've read anything above, and my proposal:

Merge this one, because it's not obvious, that all the ODOMETRY thing will be out soon. And the code in my branch is definitely more correct, than the existing. As soon as the ODOMETRY thing will be done, this code may be deleted.
The fact, that accels in vehicle_local_position are not the "real" estimation, but the data from IMU (minus gravity) is not actually a problem. The MAVLink protocol says, that ax, ay, az are the estimation of the FCU filter. But it does not say, that the filter cannot "estimate" the accels by just taking the IMU data. And knowing what the estimator thinks about the accels is nessesary for debugging.
Also, there can be other estimators, that can place real accel estimations in vehicle_local_positions later.

Merge the corresponding MAVROS PR, because technicaly it does correct handling of LOCAL_POSITION_NED_COV message. And this message can be used by some other flight controllers.
Later the plugin can be extended with ODOMETRY message handling as well.

@mhkabir

currently the accel "estimates" published on the PX4 side is just the raw accelerometer data minus the estimated bias.

Also minus gravity. It's useful info, even in this form.

I agree the old code is just wrong it was a hack to get some real-time estimator state debugging, but I think if we start supporting this message and pipe all that info through it, people will start using it and be upset when we switch to the odom msg style. I think the odom is lighter because it doesn't keep all the cross covariances. Adding a temporary odom with accel msg until it is merged into ros seems like another option. And all this only seems worthwhile if you actually need accel for your application. Otherwise let's just delete the code entirely.

@okalachev just propose an extension for ODOMETRY with accelerations. This is not going to be merged just because you need it imediately for your application. When merging things, we need see the full spec and the planned architecture, not what feels convinient for use. It does not make sense to merged this and then imediately drop it again. This was dropped once for a purpose. Does not make sense to bring it back again.
So please, if you do need support to this purpose an extension for ODOMETRY to add accels and then we can work from there. The MAVROS PR is a different story and can be of course reviewed and merged since is made for other flight stacks as well, but it won't benefit from the approach we are taking on PX4 for a VIO pipeline.
Though stay tunned as I am bringing the ODOMETRY support next couple of days. Though it won't be with accels as you want. Again, please propose the message extension on the Mavlink side.

I'm not sure if we have space for accel in the mavlink ODOMETRY message though.
@TSC21 is this new "message flow" with the ODOMETRY message documented somewhere?

@TSC21 is this new "message flow" with the ODOMETRY message documented somewhere?

The docs are ongoing. Part of it is already in https://dev.px4.io/en/ros/external_position_estimation.html. But you can track the different parts of it in:

https://github.com/PX4/Firmware/pull/9895 (implementation of the flow to the OBC to the estimator)
https://github.com/PX4/Firmware/issues/10510
https://github.com/PX4/Firmware/issues/10511
https://github.com/PX4/Firmware/issues/10512
https://github.com/PX4/Firmware/issues/10513

This PR is superseded by https://github.com/PX4/Firmware/pull/11084.


fix error in setup function when opts is nil

fix https://github.com/synaptiko/xit.nvim/issues/1#issuecomment-1226751788

Closing in favor of #4


Try to test examples in the GitHub Actions

Examples with tests are broken. Probably other examples are broken too. Could be a great source for tracking API changes and documenting the upgrade path.
Checklist

[ ] I have updated tests where applicable.
[ ] I have added an entry to the CHANGELOG.

We do have some tests for some examples at https://github.com/mitmproxy/mitmproxy/tree/master/test/examples, I absolutely agree that we should ideally test more here.
The story is a bit different when we look at examples/contrib: The addons in there often have niche use cases or do not meet our general code standards. I have tried to maintain that in the past, but practically it's been slowing us down more than anything. There is a note in https://github.com/mitmproxy/mitmproxy/blob/master/examples/contrib/README.md that we don't maintain whatever is in there at all, do we need to make that more explicit/prominent?
(As mentioned elsewhere, HAR Support is important enough to move to mitmproxy/addons once it's polished, where we 1) maintain 100% test coverage and 2) maintain it.)

Maybe it doesn't worth time to maintain examples in the sense of porting them to the latest features, but at least providing backward compatibility API so that they won't break would be beneficial for those who are dealing with their own or legacy extensions.

I might fix a few tests as a result of this PR.

Actually, I don't have much time to go deep into it right now. Some of the errors are import errors and I am not sure how to provide right imports for each example to test in automated way. So I better leave it for now and concentrate on HAR when/if I get more time. It may worth to note how to actually run tests in example/ as the trick with copying fixtures it is not trivial.
The current results just for the history, because GitHub will clean up the build log.
=========================== short test summary info ============================
FAILED examples/contrib/webscanner_helper/test_urlindex.py::TestUrlIndexAddon::test_init_append
FAILED examples/contrib/webscanner_helper/test_urlindex.py::TestUrlIndexAddon::test_response
FAILED examples/contrib/webscanner_helper/test_urlindex.py::TestUrlIndexAddon::test_done
ERROR examples/contrib/test_jsondump.py
ERROR examples/contrib/test_xss_scanner.py
ERROR examples/contrib/webscanner_helper/test_mapping.py
ERROR examples/contrib/webscanner_helper/test_proxyauth_selenium.py
ERROR examples/contrib/webscanner_helper/test_watchdog.py
==================== 3 failed, 40 passed, 5 errors in 1.80s ====================
Error: Process completed with exit code 1.


Minimal sample and minor tweak to listener

The PR contains the following:

A sample minimal config to use kine with rke based on a external etcd endpoint served by kine.

Kine endpoint is not secured using tls. There is a change to endpoints.go to use the same cert used for communication with a database to secure kine endpoint.

If needed I can tweak the code to add extra flags to specify a different cert for kine endpoint. This would be more beneficial as this will allow users to use two sets of certs for encrypting backend and endpoint traffic.

thanks for the PR @ibrokethecloud! I think the code change is okay, altho we may want to gate the behavior behind the flag.
my personal feeling is that examples should not contain static credentials, so it would be better to include a script to generate them.
the commits should be "fixed up"/rebased to two commits, one for the code change and one for the sample.
feel free to ping myself or @cjellick, in PRs or slack, if it helps to get this stuff moving.


[M] DUP Facility specific messaging added to GARIBALDI DUP confirmation pages

Description:
As a Garibaldi visitor, I want to get park specific information so that I can be better prepared.
As a bc parks staff, I want to provide park specific information after a user has booked a day use pass so they can be better prepared. This is part of responsible recreation messaging.
Acceptance Criteria:

[ ] Update Garibaldi confirmation pages with approved text and links as per the design ticket: https://github.com/bcgov/parks-reso-public/issues/399
[ ]

Development Checklist:

[ ] ...
[ ] ...
[ ] ...

Dependencies

Blocked by #399
Blocking

Relevant documentation as reference
Definition of Ready

[ ] Acceptance criteria are included
[ ] Wireframes are included (if applicable)
[ ] Design / Solution is accepted by Product Owner (if applicable)
[ ] Dependencies are identified (technical, business, regulatory/policy)
[ ] Story has been estimated (under 13 pts)

Definition of Done

In progress:

[ ] Acceptance criteria are tested (Functionality meets the acceptance criteria defined in the ticket)
[ ] UI meets accessibility requirements
[ ] Unit tests are written
[ ] Work is traceable in GitHub
[ ] PR linked to ticket number
[ ] If needed/required - Dev adds flag/label to highlight any migration steps necessary prior to PROD deployment

Code review:

[ ] Code is peer reviewed and has passed CI/CD tests

QA:

[ ] Acceptance criteria are tested (Functionality meets the acceptance criteria defined in the ticket)
[ ] Code is potentially shippable to the production environment
[ ] Functional features have been tested and passed by QA
[ ] UI components tested by designer
[ ] Code is deployed to PROD when moved to 'done' column (unless requested otherwise by PO)

PO Review:

[ ] Acceptance criteria are tested (Functionality meets the acceptance criteria defined in the ticket)
[ ] Reviewed and approved by Product Owner

Notes:

Confirming with Nicole whether we need to wait for the icons to be decided for the new bullets.
https://www.figma.com/design/2lQW8InOa0lEiUiMeGmeNC/Day-Use-Pass?node-id=5046-2432&t=OasmEf9QLpmr4REv-1
@meyerdarcie  @ndelraye

Yes, this ticket is blocked until we get decisions on the new icons, will try to get them today

Icons have now been added. See design ticket

Tested on TEST:

Need more space between the Safety information section and the Visitor guidelines heading.

@manuji just wanted to leave some screenshots of the fixes Im putting in for this. Let me know if I am missing anything :)
Print button moved to above safety information when mobile:

Diamond Head Spacing and alignment:

Tested on TEST: Passed

verified that this task has been completed and the issues have been fixed.
Passing to PO review before PROD deployment.

Looks good and working as intended, moving to done.


Return name of current top displayed layer

Hey everyone,
I'm trying to use layerswitcher in the sidebar to create a dropdown list of times from the current top displayed WMS layer, and I was wondering if it was possible using LayerSwitcher to get it to return the current top displayed layer?
If I can get the top displayed layer, then I can do a WMS Capabilities query on the layer to discover what all the time values of the layer are.

Hi, you can determine the top most visible layer by looping through the layers that the map contains. If you have nested layers you could use the LayerSwitcher.forEachRecursive function to loop through layers and groups. Docs: https://github.com/walkermatt/ol-layerswitcher#foreachrecursive

Thanks for linking to that @walkermatt, I managed to get it to work using the .forEachRecursive method.


Serve static files (with optional Live reloading)

Personally, I prefer manually refreshing the page to see (and compare) changes; live reloading just gets in my way. So it would be helpful if that was optional.
Ideally, I'd like to avoid installing the live-server dependency in the first place. In fact, lib/server.js seems to be entirely agnostic of the specifics of this project, so it could be launched independently. Perhaps the module could be included for convenience, but users would be prompted to install live-server themselves? 🤷♂
    styleguide: [{
        source: "./pages.js",
        target: "./dist",
        server: require("…/lib/server")
    }]

I'm pretty sure that most users want live reload and that not wanting live reload is the option. So I think I would prefer to just have a liveReload option that you can set to false. I know that this means an unnecessary dependency for you, but it's a better "getting started" experience for the other users 😸

A highly scientific poll elsewhere suggests your assumption is incorrect: There's a significant number of people (n > 0) who, like me, are irritated by live reloading. Obviously I'm biased, but that to me suggests opting into live reloading would accommodate a broader audience: Opt in turns live reloading into a pleasant enhancement for those who want it, opt out means it's an annoyance for those who don't. That's also why opt in strikes me as more intuitive and easier to document.
Having said that, you're the boss around here, so of course it's up to you.

For people who don't want a live server, do they also don't want a server at all? Because if they want a server, we need to find a solution for that as our server always does live reloading and we would need to switch to another server for that.

While I wouldn't want that, I'm guessing serving via HTTP (as opposed to file://) will be necessary in a lot of cases (mostly due JavaScript APIs' origin restrictions) and making people choose their own might be annoying for many. Luckily servedir does the job and only has a single dependency.

Ok, so I guess the solution here is... we remove the port configuration from the config file. If you provide no CLI option, you get no server. There are two options:

--serve $PORT serves the files via servedir
--livereload $PORT serves the files via live-server
You can't combine the two options. To reduce the dependencies, we could not add them as dependencies. When you provide the configuration, we will attempt to load it and ask you to install it if it is not there (as implemented in faucet).

I'd be happy (FCVO) with that. --livereload looks pretty cumbersome, but luckily I won't ever have to type that.

This will be implemented by using https://github.com/faucet-pipeline/faucet-pipeline-core/pull/59

Already done (for a while)


[now-cli] Handle uv_cwd error when cwd is deleted

Converts reportError() to typescript and adds an ignore list.
In particular, uv_cwd comes from process.cwd() so we don't need to track these errors in the case the user deletes their current working directory.
This is a follow up to #3194 which handled only one scenario.

Codecov Report

Merging #3326 into master will decrease coverage by 0.09%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master    #3326     +/-   ##
=========================================
- Coverage   11.77%   11.68%   -0.1%
=========================================
  Files         267      267
  Lines       10162    10174     +12
  Branches     1331     1350     +19
=========================================
- Hits         1197     1189      -8
- Misses       8869     8888     +19
- Partials       96       97      +1

Impacted Files
Coverage Δ

src/util/dev/router.ts
77.27% <0%> (-3.5%)
:arrow_down:

src/index.js
0% <0%> (ø)
:arrow_up:

src/util/report-error.js

src/util/report-error.ts
0% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d55acc2...61cfbd1. Read the comment docs.


Tabs not recognized in practice tests.

Description
Added a snippet of Go code which had a tab before the "fmt" import.
When doing a practice run, I was not able to trigger the tab with a tab or spaces.
(optional) What browsers are you seeing the problem on?
Chrome
Code of Conduct

[X] I agree to follow this project's Code of Conduct

It is also not possible to use tabs when adding code snippets by hand.

I will look into this.

Can you please include the snippet? A video would be extra helpful. Thank you

I notice the same thing, and I have a fix for it.
It's true that you cannot to use tabs when adding code snippets by hand. But if you copy and paste the snippet form somewhere else, the tab will be inserted. That's how I replicated the bug.
Can I take care of this issue or there's someone else already working at it?

Here's a step-by-step on how to reproduce the issue:

Run a local instance of the App.
Click "Add Snippet"
Copy the code below & paste in the snippet to be added, & add the snippet:

#include <iostream>

int main() {
	std::cout << "Hello World!";
	return 0;
}

The code above has tab characters in it, so the snippet will be added with tab characters to the database.

Click "Race", select "C++" and run. You should see the new code snippet. If not, refresh until you got the correct snippet.
When you reach the tab character, pressing tab does nothing and you are stuck.

That's it. I'll create a PR with a fix later today.

Thanks for the snippet.
The /t needs to be stripped and replaced with whitespace before insert into the database.
I would prefer to avoid editing the race logic.

Yep. I was thinking about these alternatives. The way I found to deal with the issue, is to tweak a little the race logic in packages/app/src/app/race/_components/race/race-practice.tsx. But it turns out, the tweaks are really minimal: it's just about replicating some of the logic to deal with whitespaces in the beginning of a line, so it can also deal with \t at the beginning of a line.
I suspect it's worth having the race practice to be able to deal with tabs, in case they end up in the database somehow. The idea of stripping the tabs before inserting into the database is good too. This would also give more consistency across different snippets, to avoid some coming with tabs and others with whitespaces.
It might be worth implementing both. I'll create a PR with the fix I did, so you can take a look. Let me know if this looks good!

@writeonlycode
This will work. However, the race-multiplayer.tsx file will also have to be changed.
The snippets inside the database will not be uniform. This can make debugging accuracy more difficult.
A  .replace("/t", "    ")  inside add-snippet-form.tsx will format the strings to be uniform upon insert into the database.
This way the race logic does not need to be edited or perform an extra step on every enter(), only once on insert.
Tab will still not work inside the /add-snippet-form input.
This issue should be reopened or a new issue should be created.

Good points. I'll explore further this issue, and I'll create another PRs once I implement these other tweaks.

Hey @writeonlycode could you please share updates, if any?


Updating toolset compiler to 2.6.0-beta3-62316-02

Nothing significantly changed.
Just a newer version to match CoreFxLab and CoreFx repos.

@VSadov is there a version of the .NET CLI with this compiler yet? I'd like to stop using this package because it's making our builds extremely slow (no crossgen)

See https://github.com/aspnet/KestrelHttpServer/commit/01e2c881317ef3473b313a01eb194f6f418b11b6

Thanks.
Now that there is no active feature development and there is an SDK with 7.2, using SDK seems the right thing to do.


T_in and T_out TypeVars

in / out is based

we already have T_co and T_cont

But in / out is based

so just rename them?

Hmmm, if they are the same thing, and more based, then yes?


update unit and integ test runners to ubuntu-20

update base image in scripts/github_runner/Dockerfile.github_runner to ubuntu:focal
update scripts/github_runner/start_runners.sh to use the new image
update .github/workflows/unit_tests.yml to use ubuntu-20.04 for unit tests.

also, please merge the commits into one


How do I use the EventBus library?

EventBus doesn't seem to contain a definition for Send, so I couldn't follow the code sample.

The issue was due to the event bus source generator not running

Hey, how did you solve this?

@wiredmatt https://github.com/genaray/Arch.Extended/issues/23#issuecomment-2099166263
To note: In Unity I was getting an error about Hook not existing when trying to listen directly in a system class. Only static event listener seemed to work.


Rosetta: improve balance retrieval performance

We currently execute a Cadence script to retrieve the balance for token vaults. Cadence is executed on top of the interpreter and therefore incurs the overhead of the whole Cadence runtime.
The latest version of the Flow Virtual Machine (FVM) allows us to bypass the runtime, by retrieving resources natively in Go code in the form of a Cadence value Go type. This allows us to read out the balance of a token vault without executing any Cadence, and should thus be faster by an order of magnitude.

I can not find the code in Flow Go v0.19.2 to get resources on accounts without using Cadence code. As this is not a relevant bottleneck at the moment, we can skip it and potentially revisit if it ever becomes a problem.


added extra caution for SUSE users, updated script

Signed-off-by: rachejazz<EMAIL_ADDRESS>Tested my script recently on OpenSUSE, looks like python3 needs to be specified since it has python2 as default.
And also, there was no /bin/python3 :'D on SUSE
Changed and added a workaround too in case of permission error.

I'll update the script as well and then you can review this PR.

Should I proceed for OpenSUSE addition? Sine Nominie response might delay

I'll just merge this. We can adjust later if there are problems, and we'll still wait on the data import.


Should require xextoproto

From libXcursor:
checking for XCURSOR... configure: error: Package requirements (xrender >= 0.8.2 xfixes x11 fixesproto) were not met:

Package 'xextproto', required by 'fixesproto', not found

I don't feel like dealing with this right now, but should be rectified.

Fixed in PR #2 .


update scatter3d and surface3d nodes

Description

[x] I've included a concise description of what each node does

Styleguide

[x] My node adheres to the styleguide for Flojoy nodes

Docs

[x] I've submitted a PR for a documentation page for the new node(s) that contains usage examples (see docs.flojoy.io)

The 3d plots only work inside the node submenu view. If this is expected LGTM.

I have updated studio to show in the thumbnail view as well


Authorization not asked in case of .significant subscription

If I call locateFromGPS() with .significant subscription, it doesn't ask for authorization, whereas in the case of .continous and .oneShot it does.
It looks like a bug, I can fix it myself, but before trying, I'd like to know if that's the intended behavior.

I think it’s actually a bug. You can make a PR, I’ll review it next Tue when I’ll back to office. Thanks!

Fixed in 4.0.1

Sorry been with my head elsewhere in the latest days, and I couldn't work
on it, but I'm glad you fixed it so quickly.
Grazie 1000
Antonio
On Tue, Apr 30, 2019 at 9:50 AM Daniele Margutti<EMAIL_ADDRESS>wrote:

Fixed in 4.0.1
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/malcommac/SwiftLocation/issues/254#issuecomment-487851388,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAIJDT2722OQC3JE5GEYWBTPS724RANCNFSM4HI2H7BA
.


ES2018 event though target is es5 in tsconfig.json

#🐞 Bug report
ng build is outputting ES2018 syntax (Spread in object literals) even though the target is set to es5 in tsconfig.json.
Command (mark with an x)

[ ] new
[x] build
[ ] serve
[ ] test
[ ] e2e
[ ] generate
[ ] add
[ ] update
[ ] lint
[ ] xi18n
[ ] run
[ ] config
[ ] help
[ ] version
[ ] doc

Is this a regression?
No. Issue just happened after upgrading to Angular 9.1.4 from 8.x
Description
After upgrading to Angular 9.1.4, the output in dist/main.*.js contains spread in object literals such as this.options={...c,...t} as seen in the snippet below:
function O(e,t){t.score=e.score}const P=[];class M{constructor(e,t={},n=null)
{this.options={...c,...t},this._processKeys(this.options.keys),this.setCollection(e,n)}
setCollection(e,t=null){this.list=e,this.listIsStringArray=o(e[0]),
this.setIndex(t||this._createIndex())

The spread in object literals is causing older browsers to be unable to load the application.
The tsconfig.json has target set to es5
{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "src",
    "allowJs": true,
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es5",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2017",
      "dom"
    ],
    "paths": {
      "@shared/*": ["app/shared/*"],
      "@assets/*": ["assets/*"]
    }
  }
}

tsconfig.app.json:
{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "outDir": "../out-tsc/app",
    "baseUrl": "./",
    "target": "es5",
    "types": []
  },
  "files": [
    "main.ts",
    "polyfills.ts"
  ],
  "include": [
    "**/*.d.ts"
  ]
}

tsconfig.spec.json:
{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "outDir": "../out-tsc/spec",
    "baseUrl": "./",
    "target": "es5",
    "types": [
      "jasmine",
      "node"
    ]
  },
  "files": [
    "test.ts",
    "polyfills.ts"
  ],
  "include": [
    "**/*.spec.ts",
    "**/*.d.ts"
  ]
}

.browserlistrc:
defaults
IE 10
IE 9
safari 10

🌍 Your Environment

Angular CLI: 9.1.4
Node: 12.13.1
OS: darwin x64

Angular: 9.1.4
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.901.4
@angular-devkit/build-angular     0.901.4
@angular-devkit/build-optimizer   0.901.4
@angular-devkit/build-webpack     0.901.4
@angular-devkit/core              9.1.4
@angular-devkit/schematics        9.1.4
@ngtools/webpack                  9.1.4
@schematics/angular               9.1.4
@schematics/update                0.901.4
rxjs                              6.5.5
typescript                        3.7.5
webpack                           4.42.0

Hi @zackarychapple, is the above code this.options={...c,...t} from one of the libraries or it's part of your application code?
This seems to be similar to https://github.com/angular/angular-cli/issues/17377 which turned out to be a problem in a library.

You are right, it is from Fuse.js library, where I imported it directly as
import Fuse from 'fuse.js';

Rather than using the typings
import Fuse from 'fuse.js/dist/fuse';


Normalization of CIFAR-10 images

In your script, you didn't use the standard normalization done on CIFAR-10. Would you say that a fair comparison is still given, even when normalization is applied? Or should an approach tested by AutoAttack be trained without this normalization to stay comparable?
Best regards, and thanks for offering this great repo for testing robustness!

Hi,
I guess you have found them, but, if not, see https://github.com/fra31/auto-attack/issues/13 and https://github.com/fra31/auto-attack/issues/16.

Hi,
yes I saw the previous issue this is why I closed it directly.
But still, thanks!


Increase minimum test coverage to 95%

The Windows build doesn't reach 95% coverage, so closing this for now...


EMR shred step failed with exitCode -1

My EMR job failed this morning (was successfully run since last week).
This is what I found in controller log:
2017-03-29T19:48:32.155Z WARN Step failed with exitCode -1 and took 2586 seconds

stderr and stdout logs are empty and syslog has nothing interesting.
Could you please help to understand the meaning of exitCode -1?

Hey @tyomo4ka - please can you direct support requests to our community forums:
http://discourse.snowplowanalytics.com/

@alexanderdean
Ok. Thanks!
Asked there http://discourse.snowplowanalytics.com/t/emr-shred-step-failed-with-exitcode-1/1090


Question on Clarity?

Hello,
While researching for components that might be used in a new P2P project that I am ramping up now, I came across your "wgsd" approach which sounds like it might be what I need for a system that effectively connects to peers (with one or both possibly behind NAT's) and then hands off the connection to the peers so that they can communicate.
Your Principle says:
You run a service on each node, and the central node no longer handles data exchange; instead, it is used for device discovery.
 The main function of each service is to obtain the peer addresses of devices corresponding to local public keys from specified addresses.
It also serves other devices, providing them with the peer addresses of all locally connected devices.
This concept is somewhat akin to a simplified version of a DHT (Distributed Hash Table network structure) (although it is far from the same level of complexity).

I am a bit confused on exactly how 2 peers can be connected if they are both behind different firewalls without any port forwarding happening on the peers.  If Peer-A and Peer-B are both on different networks (i.e. LAN's that could be located in 2 different places across the world) then aren't they blocked off from each other for "direct" connections but could only communicate if they go through a public IP node.
Can you please clarify this as I may be missing something here?
Thanks and have a great day

Hello,
In the example, I mentioned that she needs three nodes to function properly, and the A node is essential, specifically requiring it to have public accessibility. Thus, the role of the A node is akin to that of a STUN server in a P2P network (Wikipedia), helping the nodes determine their NAT information.
Meanwhile, the role of wgsd is simply to aid B and C in exchanging their respective NAT (Wikipedia) information.

Device Name
Public Address (Address+Port)
Peer Address

A
<IP_ADDRESS>:19198
<IP_ADDRESS>

B
NAT: <IP_ADDRESS>:11451
<IP_ADDRESS>

C
NAT: <IP_ADDRESS>:11452
<IP_ADDRESS>


Download broken in 2.0.0-beta.6

Download is broken. Maybe the Crunchyroll team updated their DRM. Can you fix this?
Thanks.
i crunchyroll-dl v2.0.0-beta.6
i Attempting to login...
(node:13744) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'name' of null
    at FormData._getContentDisposition (C:\Users\****\AppData\Roaming\npm\node_modules\crunchyroll-dl\node_modules\form-data\lib\form_data.js:226:40)
    at FormData._multiPartHeader (C:\Users\****\AppData\Roaming\npm\node_modules\crunchyroll-dl\node_modules\form-data\lib\form_data.js:177:33)
    at FormData.append (C:\Users\****\AppData\Roaming\npm\node_modules\crunchyroll-dl\node_modules\form-data\lib\form_data.js:70:21)
    at main (C:\Users\****\AppData\Roaming\npm\node_modules\crunchyroll-dl\index.js:197:15)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:13744) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:13744) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Also, here's my input (In case if needed):
crunchyroll-dl -i  https://www.crunchyroll.com/saekano-how-to-raise-a-boring-girlfriend- -u **** -p **** --unblocked -l enUS -q 1080p -a -o ":name Episode :ep - :epname (:resolution)"

Crunchyroll removed support for the old device I was spoofing, I updated to the latest android version.
Fixed in 2.0.0-beta.7


[entropy_src] Formal / Jasper Gold

Per other V2S tasks we will likely need Formal methods applied to entropy_src.

55/57 entropy_src_sec_cm assertions are currently proven, the following two are cex:

FpvSecCmCtrlMainFsmCheck_A
FpvSecCmCtrlAckFsmCheck_A

I'll investigate


3rd Party Tool extracting data via ODP API is not permitted by SAP - Non compliant

[According to SAP note: 3255746, The use of ODP APIs in this case synapse CDC connector is not permitted to use by any third party. If you do so you are non-compliant in Audit by SAP. Kindly check with SAP, So far Microsoft has come up with a preview OData connector which doesn't solve the purpose.]

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

ID: 9666c3fe-bd4d-0d56-ca2d-c07ecd25c8e2
Version Independent ID: a50aac15-d29d-3686-620d-78a74d5cfe54
Content: Overview and architecture of the SAP CDC capabilities - Azure Data Factory
Content Source: articles/data-factory/sap-change-data-capture-introduction-architecture.md
Service: data-factory
Sub-service: data-movement
GitHub Login: @ukchrist
Microsoft Alias: ulrichchrist

@AnkitPathak41
Thanks for your feedback! I've assigned this issue to the author who will investigate and update as appropriate.

The issue is impacting more than 1700 customers worldwide using CDC connector, is there any communication from Microsoft ?

Facing the same issue , new to this but I hope it doesn't affect other connectors like the Table connector

Thanks for your feedback @AnkitPathak41. We are working on this issue. For questions about the SAP policy, please reach out to SAP directly. In the meantime, Microsoft will post updates as soon as there is any new information to report, and in the meantime, continue to fully support the SAP ODP connector. #please-close


Missing MQTT "cmd" key in message causes sytsem crash

I have been investigating issues with addusers over MQTT and my system kept crashing beause I had forgotten to add the "cmd" key to the message.
Other keys like doorip are checked for and onMQTTmessage in file mqtt.esp returns if this key does not exist.
In my test build I have modifed onMQTTmessage and added a test
`if (!mqttIncomingJson.containsKey("cmd"))
{
#ifdef DEBUG
Serial.print("[ INFO ] No cmd key in MQTT message: ");
Serial.println("+++++++++++++++++++++++++++++");
#endif
return;
}
strlcpy(incomingMessage->command, mqttIncomingJson["cmd"], sizeof(incomingMessage->command));`

Merged! :)


Update Footer.jsx

Fixes #<ISSUE_NUMBER>
#211
Description
Include a summary of the change and the steps taken to make the change.
Screenshots
Add screenshots displaying the change.(Especially if working on UI)
https://user-images.githubusercontent.com/55022929/111017324-c5d24b00-83d8-11eb-972e-ee77b5c4ab51.mp4
Addition Information (if any)
Mention any additional information that has been taken note of while making the PR, or needs to be taken note of while reviewing the PR. Ignore if none.

@pkspyder007 please review it. @bhubesh757 why are the checks failing? Please have a look.

@gauravdas014 its failing tell me the solution

@pkspyder007 please review it. @bhubesh757 why are the checks failing? Please have a look.
@gauravdas014 @pkspyder007 code and everything is fine it works on my localhost , please check this and give me a solution

@bhubesh757 The reason why this is failing because you have imported the Link component and never used it in the code.

Why you are wrapping Navlink with BrowserRouter.

For simply creating link with react-router-dom we use Organisations
No need of adding unnecessary stuff keep it simple
If you to learn goto this link
https://reactrouter.com/web/guides/quick-start

@bhubesh757 Looks good hope you learned about using react-router-dom.


EAS Build failing to find database after successful build but Expo Build works fine

Build/Submit details page URL
No response
Summary
I have a project that uses expo-sqlite, the implementation follows the steps in the documentation and my local dev environemnt and Expo Build CLI works fine to find this database (and subsequently makes my app work fine) however, when using EAS Build, I can log an error at that step to get the database and am met with an error (below). This happens only during EAS CLI Build, including building for simulator but not Expo CLI Build.
Managed or bare?
Managed
Environment
expo-env-info 1.0.2 environment info:
System:
OS: macOS 11.6.1
Shell: 5.8 - /bin/zsh
Binaries:
Node: 12.22.10 - /usr/local/bin/node
Yarn: 1.22.17 - /usr/local/bin/yarn
npm: 6.14.16 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
IDEs:
Xcode: 12.4/12D4e - /usr/bin/xcodebuild
npmPackages:
expo: ^44.0.0 => 44.0.6
react: 17.0.1 => 17.0.1
react-dom: 17.0.1 => 17.0.1
react-native: 0.64.3 => 0.64.3
react-native-web: 0.17.1 => 0.17.1
npmGlobalPackages:
eas-cli: 0.47.0
expo-cli: 5.3.0
Expo Workflow: managed
Error output
No response
Reproducible demo or steps to reproduce from a blank project
Service that creates the database:
export default class DatabaseService extends ComponentService {
  instance = null;
  dbName: string = 'AllPrintings.sqlite';
  sqlDir: string = FileSystem.documentDirectory + 'SQLite';

  /**
   * Asynchronously create a folder and download local database to it
   * for the SQLite package to perform operations on.
   *
   * @param setErrorViewState State setter for ErrorView
   */
  async getDatabase(setErrorViewState: (value: string) => {}): Promise<SQLite.WebSQLDatabase | void> {
    try {
      if (!(await FileSystem.getInfoAsync(this.sqlDir)).exists) {
        await FileSystem.makeDirectoryAsync(this.sqlDir);
      }

      await FileSystem.downloadAsync(
        Asset.fromModule(require('../assets/database/AllPrintings.sqlite')).uri,
        this.sqlDir + '/' + this.dbName
      );

      return SQLite.openDatabase(this.dbName);
    } catch (err: any) {
      setErrorViewState('DatabaseService: ' + err.toString());
    }
  }
}

File structure:

Error (Generated from my app from the catch block):

check out this troubleshooting guide https://docs.expo.dev/build-reference/troubleshooting/
It looks like there is some reference to your local path, which of course does not exists on eas builder. Also, remember that ifiles that are gitignored will not be uploaded to eas builder

@wkozyra95 So just the clarify, my database is not git ignored because its rather small. I did a couple things in that guide that I had not seen before:

expo run:ios --configuration Release
Output:

⚠  Pods/boost-for-react-native<EMAIL_ADDRESS>deployment version mismatch, expected >= 9.0 <= 14.4.99
⚠  Pods/HMSegmentedControl<EMAIL_ADDRESS>deployment version mismatch, expected >= 9.0 <= 14.4.99

eas login, then eas build --local, then select ios
Output:

[INSTALL_DEPENDENCIES] [4/4] Building fresh packages...
[INSTALL_DEPENDENCIES] $ husky install
[INSTALL_DEPENDENCIES] fatal: not a git repository (or any of the parent directories): .git
[INSTALL_DEPENDENCIES] Done in 12.54s.
[READ_APP_CONFIG] Using app configuration:
[READ_APP_CONFIG] **Omitted**
[PREPARE_CREDENTIALS] Preparing credentials
[PREPARE_CREDENTIALS] Creating keychain
[PREPARE_CREDENTIALS] Preparing credentials for target **omitted**
[PREPARE_CREDENTIALS] Getting distribution certificate fingerprint
[PREPARE_CREDENTIALS] Writing distribution certificate to /var/folders/ph/6rhgg4f138s68wrbhvbq6csh0000gn/T/683ecaa8-3765-46a7-ad53-189c4239e18f.p12
[PREPARE_CREDENTIALS] Importing distribution certificate into the keychain
[PREPARE_CREDENTIALS] Initializing provisioning profile
[PREPARE_CREDENTIALS] Validating whether distribution certificate has been imported successfully
[PREPARE_CREDENTIALS] Destroying keychain - /var/folders/ph/6rhgg4f138s68wrbhvbq6csh0000gn/T/turtle-v2-1dd0a512-4431-4593-9d5e-fcb388661714.keychain
[PREPARE_CREDENTIALS]
Error: Distribution certificate with fingerprint **omitted** hasn't been imported successfully
    at Keychain.ensureCertificateImported (/Users/lakae002/.npm/_npx/23134/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/build-tools/dist/ios/credentials/keychain.js:54:19)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async IosCredentialsManager.prepareTargetCredentials (/Users/lakae002/.npm/_npx/23134/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/build-tools/dist/ios/credentials/manager.js:96:13)
    at async IosCredentialsManager.prepare (/Users/lakae002/.npm/_npx/23134/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/build-tools/dist/ios/credentials/manager.js:54:41)
    at async /Users/lakae002/.npm/_npx/23134/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/build-tools/dist/builders/ios.js:25:20
    at async BuildContext.runBuildPhase (/Users/lakae002/.npm/_npx/23134/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/build-tools/dist/context.js:48:28)
    at async Object.iosBuilder (/Users/lakae002/.npm/_npx/23134/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/build-tools/dist/builders/ios.js:24:29)
    at async Object.buildIosAsync (/Users/lakae002/.npm/_npx/23134/lib/node_modules/eas-cli-local-build-plugin/dist/ios.js:45:27)
    at async Object.buildAsync (/Users/lakae002/.npm/_npx/23134/lib/node_modules/eas-cli-local-build-plugin/dist/build.js:28:32)
    at async main (/Users/lakae002/.npm/_npx/23134/lib/node_modules/eas-cli-local-build-plugin/dist/main.js:16:9)

Build failed
Distribution certificate with fingerprint **omitted** hasn't been imported successfully
    Error: npx exited with non-zero code: 1

I notice in the error text from your app that the path includes ......./assets/assets/database/.......  Is that the correct directory?
It might be helpful if you could post a super-simple repo via GitHub so that to reproduce the issue it is a simple matter of:

Clone the repo
Run the command XXX
See the error by doing YYY

I'll see about making a public MVE but the "assets/assets" is certainly weird but that error only occurs for EAS Build, not Dev mode or Expo Build

Well thats the weird part, Expo CLI Build finds that file just fine, ive never had a problem before EAS Build.
Heres my implementation (ive changed a few naming conventions of the database file so the error still applies just with a different database name):
Base Service:
export default class ComponentService {
  // Needs to be overridden to avoid conflicts on extension
  static instance: any = null;

  /**
   * Gets a single instance of the service across components
   */
  static getService(): any {
    if (this.instance === null) {
      this.instance = new this();
    }

    return this.instance;
  }

  /**
   * Wipes out instance
   */
  static resetInstance() {
    this.instance = null;
  }
}

Database Service extending ComponentService
import * as FileSystem from 'expo-file-system';
import * as SQLite from 'expo-sqlite';
import { Asset } from 'expo-asset';
import ComponentService from './ComponentService';

export default class DatabaseService extends ComponentService {
  instance = null;
  dbName: string = 'db.db';
  sqlDir: string = FileSystem.documentDirectory + 'SQLite';

  /**
   * Asynchronously create a folder and download local database to it
   * for the SQLite package to perform operations on.
   *
   * @param setErrorViewState State setter for ErrorView
   */
  async getDatabase(setErrorViewState: (value: string) => {}): Promise<SQLite.WebSQLDatabase | void> {
    try {
      if (!(await FileSystem.getInfoAsync(this.sqlDir)).exists) {
        await FileSystem.makeDirectoryAsync(this.sqlDir);
      }

      await FileSystem.downloadAsync(
        Asset.fromModule(require('../assets/database/db.db')).uri,
        this.sqlDir + '/' + this.dbName
      );

      return SQLite.openDatabase(this.dbName);
    } catch (err: any) {
      setErrorViewState('DatabaseService: ' + err.toString());
    }
  }
}

Usage
import DatabaseService from '../services/DatabaseService';

const databaseService = DatabaseService.getService();

databaseService.getDatabase(/*setErrorViewState, basically just a setter for various states so render the error seen above*/)

metro.config.js
const { getDefaultConfig } = require('expo/metro-config');

const defaultConfig = getDefaultConfig(__dirname);

defaultConfig.resolver.assetExts.push('db');

module.exports = defaultConfig;

app.config.js
export default {
  expo: {
    ...
    assetBundlePatterns: [
      "assets/images/*",
      "assets/database/*"
    ],
    ...
  }
};

I didn't notice that the error refers to the path in the simulator filesystem, so probably the path is fine that it refers to your user
It probably worked in expo build because Asset.fromModule(require('../assets/database/db.db')).uri, referred to the asset hosted on expo cdn, try using https://docs.expo.dev/versions/latest/sdk/filesystem/#filesystemcopyasyncoptions instead of downloadAsync

@wkozyra95 No luck on that, I tried a few different options all met with errors locally.
await FileSystem.copyAsync({
  from: FileSystem.documentDirectory + 'assets/database/db.db',
  to: FileSystem.documentDirectory + 'SQLite/db.db',
});

await FileSystem.moveAsync({
  from: FileSystem.documentDirectory + 'assets/database/db.db',
  to: FileSystem.documentDirectory + 'SQLite/db.db',
});

Ive always tried a few variations including the following, all met with similiar errors:
await FileSystem.copyAsync({
  from: FileSystem.documentDirectory + 'assets/database/db.db',
  to: FileSystem.documentDirectory + 'SQLite',
});

await FileSystem.copyAsync({
  from: FileSystem.documentDirectory + 'assets/database/db.db',
  to: FileSystem.documentDirectory + 'SQLite/',
});

Here is a test repo to reproduce the issue (it uses downloadAsync since that was my initial problem).

I've found the "EAS Build" way to resolve this issue. I use expo-asset's useAssets hook to bundle up the database so that it can properly be referenced:
import React, { useEffect } from 'react';
import { useAssets } from 'expo-asset';
import * as FileSystem from 'expo-file-system';
import * as SQLite from 'expo-sqlite';

export default () => {
  const databaseName = 'db.db';
  const sqlDir = FileSystem.documentDirectory + 'SQLite';

  const [assets, assetsError] = useAssets([require('../assets/database/db.db')]);

  useEffect(() => {
    const getDatabase = async (databaseAsset) => {
      try {
        if (!(await FileSystem.getInfoAsync(sqlDir)).exists) {
          await FileSystem.makeDirectoryAsync(sqlDir);
        }

        await FileSystem.copyAsync({
          from: databaseAsset.localUri,
          to: sqlDir + '/' + databaseName,
        });

        return SQLite.openDatabase(databaseName);
      } catch (err) { /* Handle error */ }
    };

    if (assets && assets[0] && !assetsError) {
      const databaseAsset = assets[0];

      getDatabase(databaseAsset).then(database => {
        // Use the database
      }).catch(err => { /* Handle error */ });
    }
  }, [assets]);

  return ( /* Whatever your app looks like */ );
}

Since bundled assets are read only we have to use copyAsync to move the database over the the proper SQLite directory location and reference the localUri of the database asset. This is a little bit free-hand since my implementation uses services to use FileSystem and SQLite but this is the general idea to get the asset bundled and referenced properly.

Hola, tenía un problema parecido y revisando tsconfig.json  en los módulos de expo-sqlite, observé que necesitaba la dependencia de expo-module-scripts.
mi problema se solucionó instalando esa dependencia,  no sé si sea tu caso, pero deberías intentarlo.

According to your method, I solved my problem, thank you!
Others can try to solve the CDN download problem by excluding DB files from the optimization.
"assetBundlePatterns": [
"assets/images/*"
],


add directionality prediction to targets

add column in full target list that indicates the functional direction of the target on disease risk

This exists in ODDI data


[BuildSystem] Add support for "command timestamp" nodes.

These nodes can be used to build relationships between commands which
effectively cause one command to trigger another to build any time it
updates.

This can be used as part of a primitive mechanism for supporting commands
which need to mutate the outputs of other commands, by treating the output as
effectively one of the mutating command, and using a trigger relationship
between the producing & mutation commands to cause them to run in concert.

@swift-ci please test

@swift-ci please test

@swift-ci please test

@swift-ci Please smoke test


Helper function to group a pipe into chunks?

I'm trying to find a function that allows me to do something with the equivalent of this type signature:
group :: Int -> Pipe a [a] m r

I'm also struggling to try and define this myself. The naive approach that comes to mind is the following:
group n = forever $ replicateM n await >>= yield

But this will fail when the number of values in the input is not a perfect multiple of n, for example:
λ P.toList $ each [1..10] >-> group 3
[[1,2,3],[4,5,6],[7,8,9]]

The last [10] group is omitted here because the await fails before it has a chance to yield the partial list. How do I implement this function in a better way, and is it defined anywhere already?
It seems like it would be useful for a number of things that can process values in batches rather than one-by-one.

The pipes-group library solves this purpose: https://hackage.haskell.org/package/pipes-group/docs/Pipes-Group-Tutorial.html
However, I strongly recommend using the streaming library which solves this use case better (and is better optimized for it)

Interesting, that one is new to me. It does looks promising.
One of the things in particular that I was going to try combining with pipes is the pipes-concurrency library, although after studying the code a bit I believe I can reimplement the functionality using TQueue on top of streaming without having to incur a pipes dependency.


model does not detached from root store if it in array

in this test detach on model A never called:
@model("A")
class A extends Model({
  n: tProp(types.number).withSetter()
}) {
  protected onAttachedToRootStore() {
    console.log("attach", this.n);
    return () => {
      console.log("detach", this.n);
    };
  }
}

@model("B")
class B extends Model({
  as: tProp(types.array(types.model(A))).withSetter()
}) {}

const b = new B({ as: [new A({ n: 1 })] });
registerRootStore(b);
b.setAs([]);

Thanks, fixed in v1.6.2

Detach now works.
But a little different than I expected, if the array contains a model that is present in the new version of the array, then it is still detached and then immediately attached back.
sample:
@model("A")
class A extends Model({
  n: idProp.withSetter()
}) {
  protected onAttachedToRootStore() {
    console.log("attach", this.n);
    return () => {
      console.log("detach", this.n);
    };
  }
}

@model("B")
class B extends Model({
  as: tProp(types.array(types.model(A))).withSetter(),
  ar: tProp(types.record(types.model(A))).withSetter()
}) {
}

const b = new B({
  as: [new A({ n: "1" })],
  ar: {
    "3": new A({ n: "3" })
  }
});
registerRootStore(b);
const sn1 = getSnapshot(b);
console.log("b.setAs");
b.setAs([...b.as, new A({ n: "2" })]);
console.log("b.setAr");
b.setAr({
  "3": b.ar["3"],
  "4": new A({ n: "4" })
});
console.log("applySnapshot");
applySnapshot(b, sn1);

output:
attach 1
attach 3
b.setAs
detach 1
attach 1
attach 2
b.setAr
detach 3
attach 3
attach 4
applySnapshot
detach 2
detach 1
attach 1
detach 4

Its by design?
If its not a bug, I need find the way, how to avoid unnecessary detach/attaches.
With arrays i can use push/splice functions, not as comfotable as reassignment, but you can live with it.
But with applySnapshot i don`t know hot to avoid unnecessary detach/attaches.

The first ones are by design, but the applySnapshot one was a bug. That one should be fixed now in v1.6.3

works, thanks!


unknown identifier in strict mode: vim

Trying to convert from aniseed to hotpot. And got a lot of such errors, which are happens inside (macro ...) blocks.
I definitely doing something wrong, but with aniseed it have worked. An now with hotpot i can't use any globals inside macros. My macro definitition just split throw config, not in some specific file. Currently my conf/maps.fnl is cause of the errors.
Have spend a lot of time to fix this issue without any success.
You can find my config for hotpot branch (it's currently a mess) here https://github.com/monkoose/neovim-fennel/tree/hotpot
Starting point is init.lua and then conf/init_fnl.fnl
Not an lisp/fennel expert so my macros are ugly too (wanted to make them do too much, will simplify them after fix to this issue).
Only have found allowedGlobals = false compiler option as a workaround for strict mode (but it doesn't help for me).
Any help? Should i split macros into different file? Where to put it and how to name it?
Additional info
OS: ArchLinux
neovim version: 0.7.2 from oficial archlinux 'community' repository
init.lua
require("hotpot").setup()
require("fnl_init")

fnl/fnl_init.fnl
(import-macros {: strict} :macros)

(local pack (require "packer"))

(fn load-plugins [use]
  (use "wbthomason/packer.nvim")
  (use "rktjmp/hotpot.nvim"))

(pack.startup load-plugins)

(strict)

fnl/macros.fnl
(fn strict [arg]
  (vim.pretty_print "test"))

{: strict}

This minimal neovim config gives such error to me
Error detected while processing /home/monkoose/.config/nvim/init.lua:
E5113: Error while calling lua chunk: /home/monkoose/.config/nvim/init.lua:2: module 'fnl_init' not found:Compile error in /home/monkoose/.config/nvim/
fnl/fnl_init.fnl:1:0
  Compile error in /home/monkoose/.config/nvim/fnl/macros.fnl:2:3
  unknown identifier in strict mode: vim

  (^[[7mvim.pretty_print^[[0m "test"))
* Try looking to see if there's a typo.
* Try using the _G table instead, eg. _G.vim if you really want a global.
* Try moving this code to somewhere that vim is in scope.
* Try binding vim as a local in the scope of this code.

^[[7m(import-macros {: strict} :macros)^[[0m
* Try looking to see if there's a typo.
* Try using the _G table instead, eg. _G.vim

  (^[[7mvim.pretty_print^[[0m "test"))
* Try looking to see if there's a typo.
* Try using the _G table instead, eg. _G.vim if you really want a global.
* Try moving this code to somewhere that vim is in scope.
* Try binding vim as a local in the scope of this code. if you really want a global.
* Try moving this code to somewhere that vim

  (^[[7mvim.pretty_print^[[0m "test"))
* Try looking to see if there's a typo.
* Try using the _G table instead, eg. _G.vim if you really want a global.
* Try moving this code to somewhere that vim is in scope.
* Try binding vim as a local in the scope of this code. is in scope.
* Try binding vim
  (^[[7mvim.pretty_print^[[0m "test"))
* Try looking to see if there's a typo.
* Try using the _G table instead, eg. _G.vim if you really want a global.
* Try moving this code to somewhere that vim is in scope.
* Try binding vim as a local in the scope of this code. as a local in the scope of this code.
        no field package.preload['fnl_init']
        no file '/usr/share/lua/5.4/fnl_init.lua'
        no file '/usr/share/lua/5.4/fnl_init/init.lua'
        no file '/usr/lib/lua/5.4/fnl_init.lua'
        no file '/usr/lib/lua/5.4/fnl_init/init.lua'
        no file './fnl_init.lua'
        no file './fnl_init/init.lua'
        no file '/home/monkoose/.luarocks/share/lua/5.4/fnl_init.lua'
        no file '/home/monkoose/.luarocks/share/lua/5.4/fnl_init/init.lua'
        no file './fnl_init.lua'
        no file '/usr/share/luajit-2.1.0-beta3/fnl_init.lua'
        no file '/usr/local/share/lua/5.1/fnl_init.lua'
        no file '/usr/local/share/lua/5.1/fnl_init/init.lua'
        no file '/usr/share/lua/5.1/fnl_init.lua'
        no file '/usr/share/lua/5.1/fnl_init/init.lua'
        no file '/usr/lib/lua/5.4/fnl_init.so'
        no file '/usr/lib/lua/5.4/loadall.so'
        no file './fnl_init.so'
        no file '/home/monkoose/.luarocks/lib/lua/5.4/fnl_init.so'
        no file './fnl_init.so'
        no file '/usr/local/lib/lua/5.1/fnl_init.so'
        no file '/usr/lib/lua/5.1/fnl_init.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        /home/monkoose/.config/nvim/init.lua:2: in main chunk

@babygau didn't help. Updated repository you can check how i did it.

Off topic but your map! macro makes me miss my old doom-emacs :)

Will change them (too complex especially for me who are not expert)

I have imported map!. set-map! is helper macro for map! should i import it too?
It's the same error
Error detected while processing /home/monkoose/.config/nvim/init.lua:
E5113: Error while calling lua chunk: module 'conf.maps' not found:Compile error in /home/monkoose/.config/nvim/fnl/conf/maps.fnl:1:0
  Compile error in /home/monkoose/.config/nvim/fnl/conf/macros.fnl:2:15
  unknown identifier in strict mode: vim

  (local opts (^[[7mvim.tbl_extend^[[0m "force" {} (or opts {})))
* Try looking to see if there's a typo.
* Try using the _G table instead, eg. _G.vim if you really want a global.
* Try moving this code to somewhere that vim is in scope.
* Try binding vim as a local in the scope of this code.

Highly recommend this for your reference, easier to grok and make your own
https://github.com/datwaft/themis.nvim

Yes i saw it. I took inspiration from his config when i switched to hotpot.
I don't get it either. I don't see anything specific that he done (he just import macros from this plugin). And this plugin is just collection of macros not even with some specifc filename as macros.fnl. :(

_G.vim is a help (but then i need to rename every global like so in macros`. I prefer to find what is causing such issue.
For some reason config dir doesn't have any lua folder in my config. Cleared .cache/nvim/hotpot but issue is still present.

Possibly, you put lua in gitignore :D

I'm definitely stupid, but not so much :) Have checked hidden files too.

Sorry that I can't help much. Actually I had that issue long time ago, especially when trying fennel-cljlib. But it should not be your issue now. You could pull datwaft repo and test if the prob still persists (well, with your system :|).

Ok will do it now. Anyway have no idea why lua/ dir is missing. But it is still like half working my config i still get completions from cmp and mappings from it config works too. Weird.

I got some errors from his config here and there (especially some CursorHold events), but it is working and at least it is not a fennel compiler issues. So there are no unknown identifier in strict mode problems :(

So at least we know it's not your system issue, sth strange in your config btw ^ ^ Do you see Lua folder? I'm curious :D

Yes have found it, lua files are actually are in .cache/nvim/hotpot directory. Which i previously deleted without any fix to the issue.

Have updated issue message.
With that minimal neovim config i still have error.

Guessing:
You need to set :compilerEnv _G to stop global checking in the macro compiler.
https://fennel-lang.org/api

compilerEnv: an environment table in which to run compiler-scoped code for macro definitions and eval-compiler calls. Internal Fennel functions such as list, sym, etc. will be exposed in addition to this table. Defaults to a table containing limited known-safe globals. Pass _G to disable sandboxing.

  (setup {:provide_require_fennel true
          :compiler {:modules {:correlate true}
                     :macros {:env :_COMPILER
                              :compilerEnv _G
                              :allowedGlobals false}}})

https://github.com/rktjmp/hotpot.nvim/issues/22#issuecomment-916148788

Let me try with minimal config, but i have tried this setting before with no result. I literally tried like almost every line from your cookbook.

https://github.com/rktjmp/hotpot-issue-82
Note that "test" is only output at compile time, so when you first run nvim in the container, or if you edit the file and relaunch.

  env = "_Compiler",

Must be _COMPILER

kkk

(fn strict [arg]
  `(vim.pretty_print "test"))

{: strict}

Holy mother fu..... sh ......
So my custom made (assert (= vim.tbl.....) where the issue? Why they have worked in aniseed then?

  env = "_Compiler",

Must be _COMPILER

Ok this works. Thank you. I do remember i tried uppercase with mine config.

Unsure what your intention is, that function is different to what you have in your first post:
;; inject the code (vim.pretty_print "test") into the call site
(fn strict [arg]
  `(vim.pretty_print "test"))n

;; run the call (vim.pretty_print "test) _at compile time_
(fn strict2 [arg]
  (vim.pretty_print "test"))

Fennel doesn't know vim.pretty_print at compile time.

Seems with the setting from @rktjmp it still works fine. But if i add backquote and remove config it works too.

Unsure what your intention is, that function is different to what you have in your first post:

Yes. Thank you. I do get it now.

@rktjmp @babygau Thank you both for the help.
Test with minimal config was the thing. Should have done it much earlier.

See the link I posted to the Fennel API doc, by default only a few functions are available at compile time (so when building macros). By setting compilerEnv to _G, all functions (well anything in the global scope) are available to be called at compile time. This is a sort-of safety feature of Fennel upstream.
You should be able to look at Aniseeds compiler settings to see what they use, Hotpot should be 100% compatible as long as they have not patched fennel somehow.
Glad you sorted it out, thanks @babygau for lending a hand.

Now my config works even with my weird macros. :smile:

@rktjmp one more question while you are here.
I want to build some addition dir with AOT. Have this code (but it again error with undefined in strict ....)
  require("hotpot.api.make").build(
    config_dir,
    {
      verbosity = 0,
      compiler = {
        macros = {
          env = "_COMPILER",
          compilerEnv = _G,
          allowedGlobals = false,
        },
      },
    },
    config_dir .. "/colors/half.fnl",
    function(path)
      return path
    end
  )

Do i miss something?

Hmm, it looks OK. The make stuff is a bit weird with how we have to juggle API options, possibly it's not getting passed down. Can you post it to another issue and I will try to look at it tonight.

Hmm, it looks OK. The make stuff is a bit weird with how we have to juggle API options, possibly it's not getting passed down. Can you post it to another issue and I will try to look at it tonight.

let me try few more things before that. Maybe I will find the solution.

Fixed it.
My color/colorscheme.fnl one again had (macro ... form. Seems like even with such addition options macros must be in a different file. And seems like aniseed have no problems with that.


Fix typo

a -> an

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

#sign-off


HDDS-3833. Use Pipeline choose policy to choose pipeline from exist pipeline list

What changes were proposed in this pull request?
With this policy driven mode, we can develop various pipeline choosing policy to satisfy complex production environment.
Now the default policy is Random policy.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-3833
How was this patch tested?
CI checks.

@nandakumar131 Would you like to take a look at this PR? Thanks.

Hi @elek Would like to take a look at this PR?

@xiaoyuyao Please take a look at this PR, thanks.

@avijayanhwx Thanks for your pervious review and suggestion, I push a new commit and addressed you comments, PTAL.

@maobaolong There are still some unaddressed comments here.

Using Java based config API
Adding unit test(s).
PTAL

@avijayanhwx @elek  I've addressed all your comments and add some ut, PTAL.

@elek Thanks you very much for merge this PR, base this framework, we can create various pipeline choose policies.


Trading numbers display

@svk31 I don't what to overreact here, but this looks like a pretty important issue to address. I hope you agree and will work on this as part of 1202.
get_limit_orders "BTC" "TRADE.BTC" 1
[{
    "id": "1.7.4951",
    "expiration": "2020-11-16T16:38:11",
    "seller": "1.2.282",
    "for_sale": 237500,
    "sell_price": {
      "base": {
        "amount": 89999999,
        "asset_id": "1.3.103"
      },
      "quote": {
        "amount": 94736842,
        "asset_id": "1.3.350"
      }
    }
  },{
    "id": "1.7.8303",
    "expiration": "2020-11-30T21:30:30",
    "seller": "1.2.21594",
    "for_sale": 50000000,
    "sell_price": {
      "base": {
        "amount": 50000000,
        "asset_id": "1.3.350"
      },
      "quote": {
        "amount": 50000000,
        "asset_id": "1.3.103"
      }
    }
  }
]

Note the first transaction:
      "quote": {
        "amount": 94736842,
        "asset_id": "1.3.350"
      }

The second transaction is fine, but it has round numbers...
But on the GUI:

The quote amount is not the price, the price is:
price = (base amount * base precision) / (quote amount * quote precision)
price = 89999999 / 94736842 = 0,9499999905
(Simplified in this case because the precisions of the two assets are the same so I left that out of the equation)
You cannot easily look at an order object and get the price, you have to do additional calculations.


New line pushes content out of parent view

How do you accomplish something like this?
                <View style={{height: 20}}>
                    <Markdown>
                        {'# Line one \n # Line two'}
                    </Markdown>
                </View>

It seems the new line causes the markdown to flow out of the view with the constrained height.

So I've further confirmed this issue exists when there are newlines on the markdown.

The height of the parent container should be respected but it is not. The
content flows out of it but I need it not to as I’m creating a component
that is like a “show more” button that wraps the markdown component and
needs to be a fixed height when closed/collapsed.
On Sat, Sep 29, 2018 at 4:19 AM Lasse Nørfeldt<EMAIL_ADDRESS>wrote:

Not sure what you wish to do. But consider using a ScrollView instead of
View. If you wish to "fit" the markdown content within the constrained
height you'll have to modify the styles and set the fontSize lower than
default.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/mientjan/react-native-markdown-renderer/issues/81#issuecomment-425637457,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADFCo2K3DDCo2xFi4NdDSecBy8g9DEtFks5uf1c8gaJpZM4W_qAL
.

Could you provide some screenshots of it?

Code:
                <View style={{ height: 25 }}>
                    <Markdown>{'# This is line 1'}</Markdown>
                </View>

Output:

This works as expected. The Text is cut off by the constrained height.
Code:
                <View style={{ height: 25 }}>
                    <Markdown>{'# This is a test \n # This is a test'}</Markdown>
                </View>

Output:

This does not work as expected. The Text flows out of the constrained height.
I've tried variations of styles on the root property (things like "overflow: 'none'") but that only sorta works and leads to other problems like the text not wrapping horizontally.

I see what you mean. My guess would also be to try different root properties.

I think I’ve tried all to no avail :/
On Mon, Oct 1, 2018 at 10:03 PM Lasse Nørfeldt<EMAIL_ADDRESS>wrote:

I see what you mean. My guess would also be to try different root
properties.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/mientjan/react-native-markdown-renderer/issues/81#issuecomment-426149838,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADFCoyelaDCU6VZRNe5KAnkHMAlTkwiWks5ugvOAgaJpZM4W_qAL
.

So I was able to get this to play nice with the following styles:
        const style = {
            root: {
                // overflow: 'none' doesn't cuts of text horizontally .. scroll seems to work
                overflow: 'scroll' as 'scroll',
                height: 25,
            },
        };

Then:
                <View>
                    <Markdown style={style}>{'# This is a test \n # This is a test'}</Markdown>
                </View>


Add support for webpack2

(node:38259) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Module '/node_modules/json-loader/index.js' is not a loader (must have normal or pitch function)

<EMAIL_ADDRESS>

I'm using json-loader with webpack v2 and it's working for me. Do you use extract-text-webpack-plugin, and if so, what version?

Do you use extract-text-webpack-plugin, and if so, what version?

<EMAIL_ADDRESS>

@monolithed have you found a work around to this yet? Let me know if I can help in any way!

@SpaceK33z seems like removing the requirement for extract-text-webpack-plugin seems to resolve the issues for json-loader — do you have more context?

@waltfy it might be related to https://github.com/webpack/extract-text-webpack-plugin/issues/265, but not sure.

@SpaceK33z

I'm using json-loader with webpack v2 and it's working for me.

Have you tried to delete your node_modules before?
@waltfy

have you found a workaround for this yet? Let me know if I can help in any way!

I rolled to a previous version 😄

Jep, just tried it again. What version did you rollback to? And does the problem disappear if you don't use extract-text-webpack-plugin?

@SpaceK33z, I meant "webpack": "^1.13.2", "json-loader": "0.5.4" :)

Okay, but could you checkout if it happens without extract-text-webpack-plugin? This is crucial for me to know because if so, it is most probably an issue with extract-text-webpack-plugin.

Okay, but could you checkout if it happens without extract-text-webpack-plugin?

Alas, I did not keep that state in the history of commits, sorry.

Okay, then I'm going to close this since webpack v2 with json-loader does work, but it is some other package (probably extract-text-webpack-plugin since that fixed it for @waltfy) that introduces this bug.

@SpaceK33z @monolithed I think it makes sense to close the issue. I'll post any useful information I find here, it'll maybe help other people. Thanks!
👍

I'm getting the following error when loading json files with Webpack 2 and this plugin (which I don't have with Webpack 1.x:
ERROR in ./src/stark-app-config.json
Module build failed: SyntaxError: Unexpected token m
    at Object.parse (native)
    at Object.module.exports (C:\LocalData\DEV\Workspace\AAH-Stark\node_modules\json-loader\index.js:7:48)
 @ ./src/app/modules/config/module.ts 12:21-62
 @ ./src/app/modules/index.ts
 @ ./src/app/app.ts
 @ ./src/main.ts
 @ multi main

Any ideas? I guess the 'm' in error is part of "module.exports" or something like that.

I'm getting the exact same as @dsebastien.

I've got the same error:
Uncaught Error: Module build failed: SyntaxError: Unexpected token m
    at Object.parse (native)
    at Object.module.exports (/home/Projects/app/node_modules/json-loader/index.js:7:48)

I'm using node in version 4.6.0

Okay I'll reopen this, but please provide some useful information so we can narrow this down. Try to remove as many plugins / loaders as possible. Especially try if removing extract-text-webpack-plugin works.

I changed my webpack.config config a bit and now it is working again. In the webpack.config I'm now using:
{ test: /\.json$/, loader: 'json-loader' }

and in my files instead of importing the files like this before:
  const routesForBreadcrumb = require('json!../../config/routes.json');

I had to remove the json! at the beginning of the path like
  const routesForBreadcrumb = require('../../config/routes.json');

now it is working in node as well as in the browser environment

@crebuh see https://github.com/webpack/webpack/issues/3359 for a plan on how we want to avoid the issue you had from happening again.
Closing this again since you can fix that error with the above fix.

In my case, I've doubled checked but I didn't specify the "json!" in the require call, so normally I'm only using the loader once...


clean up after remote build

when performing an image build over a varlink connection, we should
clean up tmp files that are a result of sending the file to the host and
untarring it for the build.
Fixes: #3869
Signed-off-by: baude<EMAIL_ADDRESS>

Changes LGTM, but remote tests aren't hip.


chore(main): release 1.1.2

:robot: I have created a release beep boop
1.1.2 (2024-04-03)
Bug Fixes

Remove unused variables for GitLab Runner registration tokens (0abcc8d)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/nesty92/terraform-aws-gitlab-runner-autoscaler/releases/tag/1.1.2 :sunflower:


(demos) the route parameters demo featuring a Polymer element is broken

The 'Accessing Route Parameters' demo does not work when built and deployed to GitHub pages:
Clicking on the Project 1 link causes an error in the browser log:
Uncaught TypeError: Class constructor XProjectView cannot be invoked without 'new'
    at new j (custom-elements-es5-adapter.js:4)
    at Function.value (demo-shell.html:64)
    at C (demo-shell.html:64)
    at A (demo-shell.html:64)
    at b (demo-shell.html:64)
    at demo-shell.html:64

Related: webcomponents/webcomponentsjs#871


Invalid URL in docs for InMemoryUserProfileService

This file/resource was moved to a new location

Hi @Lutando, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, DNFBOT;

thanks!


setting up demo environment

 Checking analysis of application NodeGoatJS against 1 build rules.
Checking new findings between ]8;;https://app.shiftleft.io/apps/NodeGoatJS/compare?filterState=new&scan=53&source=scan.52&sourceScanId=52\scans 52 and 53]8;;.
Results per rule:
✔Allow zero high SAST vulnerabilities: pass
(0 matched vulnerabilities; configured threshold is 0).
All rules passed.

 Checking analysis of application NodeGoatJS against 1 build rules.
Checking new findings between ]8;;https://app.shiftleft.io/apps/NodeGoatJS/compare?filterState=new&scan=69&source=scan.68&sourceScanId=68\scans 68 and 69]8;;.
Results per rule:
✔Allow zero high SAST vulnerabilities: pass
(0 matched vulnerabilities; configured threshold is 0).
All rules passed.

 Checking analysis of application NodeGoatJS against 1 build rules.
Checking new findings between ]8;;https://app.shiftleft.io/apps/NodeGoatJS/compare?filterState=new&scan=71&source=scan.70&sourceScanId=70\scans 70 and 71]8;;.
Results per rule:
✔Allow zero high SAST vulnerabilities: pass
(0 matched vulnerabilities; configured threshold is 0).
All rules passed.

 Checking analysis of application NodeGoatJS against 1 build rules.
Checking new findings between ]8;;https://app.shiftleft.io/apps/NodeGoatJS/compare?filterState=new&scan=72&source=scan.71&sourceScanId=71\scans 71 and 72]8;;.
Results per rule:
✔Allow zero high SAST vulnerabilities: pass
(0 matched vulnerabilities; configured threshold is 0).
All rules passed.


TL: toward a presentable uniform code ...

Hi !
I've just re-organized the code exported from Helmoltz Gitlab here in the sdc branch. @chelseajohn you can simply run this to change the remote locally :
git remote set-url origin git@github.com:Parallel-in-Time/cfno.git

Some main changes :

renaming of fnop into cfno
put the two main trainer class into a cfno.training.origin (original code from @chelseajohn) and cfno.training.pySDC (simplified code from my side more adapted to pySDC)
switch to a pyproject.toml  installation script (see main Readme). I've put the old requirements.txt file in a utils folder, along with the base scripts that are used by @chelseajohn to run on Juwels.
I corrected the CFNO class when forceFFT was used : I had a bad understanding on how rfft2 was handling the different dimensions (actually, the code taken by Chelsea as reference was completely right). It probably didn't make a huge difference at the end, but it's corrected now (and I quickly tested it, seems fine).

@sgoetschel I guess you can look already at the sdc branch to see where to look into the code
@chelseajohn I let you merge this PR when you thinks it's ready, don't hesitate to correct some parts if needed, or ping if some part looks weird.

@danielru I've given you maintainer access, feel free to correct the acknowledgments part if needed

I have corrected the paths in the README files and also removed absolute paths from scripts