Release on OperatorHub.io

We should make Cryostat Operator releases available on https://operatorhub.io/

A guide on contributing an operator to OperatorHub: https://operatorhub.io/contribute. We will be using the Bundle format, not the PackageManifest format.

The docs seem to be outdated in one area or another as https://k8s-operatorhub.github.io/community-operators/packaging-operator/ suggests semver-mode being the default, as well as another mode, semver-skippatch.
After reading the explanation I linked, I recommend semver-skippatch or semver-mode

After reading through the contribution docs, Hareet and I had a few questions:
1. Which version of the cryostat operator bundle should we use? This one from the v2 branch? https://github.com/cryostatio/cryostat-operator/tree/v2

You'll want the v2.0.0 tag. https://github.com/cryostatio/cryostat-operator/tree/v2.0.0

2. The [Operator Publishing / Review Settings](https://k8s-operatorhub.github.io/community-operators/operator-ci-yaml/) > Operator Versioning lists two version modes: `updateGraph: replaces-mode` and `updateGraph: semver-mode`. Which mode should we choose and why?

I think semver-mode is the way to go. If I understand the docs correctly, replaces-mode means we'll have to manually manage the update graph. semver-skippatch may be fine but complicates testing by adding additional upgrade paths (e.g. need to ensure both 2.0.0 -> 2.0.1 -> 2.1.0 and 2.0.0 -> 2.1.0 work).

3. We were wondering what the `replaces-mode` description meant by saying, "It means, that there is a possibility to omit some versions from the update graph. Best practice is to put them to a separate channel then." We also found some [channel naming conventions](https://olm.operatorframework.io/docs/best-practices/channel-naming/) and were wondering how the channel name `alpha` (from [bundle.Dockerfile](https://github.com/cryostatio/cryostat-operator/blob/v2/bundle.Dockerfile)) affects the operator versioning?

We've been using the alpha for nightly builds essentially. In the v2.0.0 tag, you'll see we use the stable channel instead. Users subscribing to the stable channel should get whatever the newest release is, and be able to upgrade as newer releases come out.

4. To setup the [testing pre requisites](https://k8s-operatorhub.github.io/community-operators/testing-operators/#pre-requisites), we decided to start a minikube cluster. Hareet's cluster started successfully, but I ran into some errors. Here's what I've tried so far and my logs. Any ideas?

sudo dnf install ansible
systemctl start docker
sudo dnf install kubernetes-kubeadm
sudo swapoff -a
systemctl enable kubelet.service
systemctl start kubelet
minikube start

Fri Nov 12 18:36: http://pastebin.test.redhat.com/1008065 Today's logs (after noticing the warning from Fri saying 'please enable kubelet.service`): http://pastebin.test.redhat.com/1008328

I've been using the kvm2 driver to run Minikube [1]. Maybe that will help if that's not what you're doing already. Essentially minikube start --driver=kvm2, and if that works make it default with: minikube config set driver kvm2.
[1] https://minikube.sigs.k8s.io/docs/drivers/kvm2/

I've been using the kvm2 driver to run Minikube

Thanks, that worked for me. It turns out my driver was set to Docker by default, and I needed to enable hardware virtualization before minikube could use kvm2.

We were able to complete manual testing of the operator through the process detailed here: https://k8s-operatorhub.github.io/community-operators/testing-operators/.
However, when we try to locally run the automatic CI test suite (see https://k8s-operatorhub.github.io/community-operators/operator-test-suite/) we run into issues with our Kubernetes setup, specifically with kind, kubeadm and kubelet.
The following are Janelle's logs but I have the same results as well:

After running "bash <(curl -sL https://raw.githubusercontent.com/redhat-openshift-ecosystem/community-operators-pipeline/ci/latest/ci/scripts/opp.sh)
kiwi,lemon
operators/cryostat-operator/2.0.0
https://github.com/jalaw/community-operators
cryostat-operator" :

http://pastebin.test.redhat.com/1008727

Systemctl logs for kubelet: http://pastebin.test.redhat.com/1008728

The OperatorHub.io docs (scroll to bottom of page) also recommend adding info about any manual pre-requisite steps and links to more information in the CSV. This is the catalog preview using https://operatorhub.io/preview. The github repo link is already included, but should we mention anything about installing cert-manager or add any other links to documentation in the description?

Yeah, I'd add cert-manager installation as a manual pre-req.

Yeah, I'd add cert-manager installation as a manual pre-req.

Yes please, this should go into the CSV in this repo as well. Created an issue for it: https://github.com/cryostatio/cryostat-operator/issues/299

We were able to complete manual testing of the operator through the process detailed here: https://k8s-operatorhub.github.io/community-operators/testing-operators/.
However, when we try to locally run the automatic CI test suite (see https://k8s-operatorhub.github.io/community-operators/operator-test-suite/) we run into issues with our Kubernetes setup, specifically with kind, kubeadm and kubelet.

That's unfortunate :(. I haven't used Kind before, but I'll find some time soon to try it out myself.

I tried to get the OperatorHub.io test suite to run with Podman, but it doesn't seem supported at the moment. I installed Docker using the guide here: https://fedoramagazine.org/docker-and-fedora-32/, and the test suite seems to run for me now. I get this failure, which I think indicates we need to add updateGraph: semver-mode to our ci.yaml:
TASK [operator_info : Index mode] **********************************************
task path: /playbooks/upstream/roles/operator_info/tasks/op_info.yml:57
fatal: [localhost]: FAILED! =>
  msg: |-
    The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'updateGraph'

    The error appears to be in '/playbooks/upstream/roles/operator_info/tasks/op_info.yml': line 57, column 7, but may
    be elsewhere in the file depending on the exact syntax problem.

    The offending line appears to be:

        - name: "Index mode"
          ^ here

Sounds good, we'll try the Docker setup then. Thanks!

We may want to include this piece of documentation in the CSV description as well:
https://github.com/cryostatio/cryostat-operator/blob/v2.0.0/docs/config.md#network-options
Since this release is primarily intended to run on plain Kubernetes, the user will have to define the Ingress specs accordingly, which is not all that obvious.

The test suite runs and passes all tests with Docker now: https://gist.github.com/jan-law/572220f1867edce233f57db5406847dd
I've also added the cert-manager docs and Ingress config docs to the CSV.
Is there anyone I should add/remove as a reviewer in the ci.yaml file?
https://k8s-operatorhub.github.io/community-operators/operator-ci-yaml/
---
updateGraph: semver-mode
reviewers:
 - ebaron
 - jan-law
 - hareetd
 - jiekang

The test suite runs and passes all tests with Docker now: https://gist.github.com/jan-law/572220f1867edce233f57db5406847dd
I've also added the cert-manager docs and Ingress config docs to the CSV.

Great news!

Is there anyone I should add/remove as a reviewer in the ci.yaml file? https://k8s-operatorhub.github.io/community-operators/operator-ci-yaml/
---
updateGraph: semver-mode
reviewers:
 - ebaron
 - jan-law
 - hareetd
 - jiekang

I would add @andrewazores as well.

I tried to get the OperatorHub.io test suite to run with Podman, but it doesn't seem supported at the moment. I installed Docker using the guide here: https://fedoramagazine.org/docker-and-fedora-32/ [...]

One thing I noticed after following this guide is I get the following error when running crc setup:
Failed to start libvirt 'crc' network
 exit status 1: error: Failed to start network crc
error: error from service: changeZoneOfInterface: COMMAND_FAILED: 'python-nftables' failed:
JSON blob:
{"nftables": [{"metainfo": {"json_schema_version": 1}}, {"add": {"rule": {"family": "inet", "table": "firewalld", "chain": "filter_IN_libvirt_allow", "expr": [{"match": {"left": {"payload": {"protocol": "udp", "field": "dport"}}, "op": "==", "right": 67}}, {"match": {"left": {"ct": {"key": "state"}}, "op": "in", "right": {"set": ["new", "untracked"]}}}, {"accept": null}]}}}, {"add": {"rule": {"family": "inet", "table": "firewalld", "chain": "filter_IN_libvirt_allow", "expr": [{"match": {"left": {"payload": {"protocol": "udp", "field": "dport"}}, "op": "==", "right": 547}}, {"match": {"left": {"ct": {"key": "state"}}, "op": "in", "right": {"set": ["new", "untracked"]}}}, {"accept": null}]}}}, {"add": {"rule": {"family": "inet", "table": "firewalld", "chain": "filter_IN_libvirt_allow", "expr": [{"match": {"left": {"payload": {"protocol": "tcp", "field": "dport"}}, "op": "==", "right": 53}}, {"match": {"left": {"ct": {"key": "state"}}

It seems like one of the steps mentioned in the article is no longer required and causes a conflict with the moby-engine package. To rectify this, I ran:
sudo firewall-cmd --zone=trusted --remove-interface=docker0 --permanent
sudo systemctl restart firewalld.service

After this, the OperatorHub test suite still runs properly and crc setup also works. I hope this helps, if you run into the same problem.

I hope this helps, if you run into the same problem.

Good to know. I've been using kind for the test suite and it's working well.
Now that all of the prerequisite steps are complete, I'll work with Hareet to open a PR

Thanks! When you've opened the PR, can you link it in a comment here?

@ebaron, @hareetd and I followed your network options readme and ran into an error when testing cryostat in minikube: No route to host: testing.cryostat-grafana/<IP_ADDRESS>:443.
NAME                                                    READY   STATUS    RESTARTS      AGE
cryostat-operator-controller-manager-5696448764-t2lkw   1/1     Running   0             35m
cryostat-sample-57858cd788-psw8c                        2/3     Running   7 (45s ago)   21m

$ kubectl get ingress
NAME                      CLASS   HOSTS                      ADDRESS     PORTS     AGE
cryostat-sample           nginx   testing.cryostat           localhost   80, 443   112s
cryostat-sample-command   nginx   testing.cryostat-command   localhost   80, 443   112s
cryostat-sample-grafana   nginx   testing.cryostat-grafana   localhost   80, 443   112s

We weren't sure which of the minikube ingress commands to follow, so we tried the following steps: https://gist.github.com/jan-law/69a862723089c68bead9b0056c242b41
full logs are here: https://gist.github.com/jan-law/0d11d9a72d898df56e1bd946b95b07d8
yaml files are here: https://gist.github.com/jan-law/16a808e0205e99d1d3e8878a681769e9

It looks right to me, very strange. Can you show me the YAML for the Ingress objects too?

kubectl get ingress -o yaml: https://gist.github.com/jan-law/f315eb15e703c8e8b65af632746e9835

@andrewazores encountered this issue as well. The Ingress status is showing localhost and not the Minikube IP. I forget exactly how we resolved the problem, but try restarting from scratch: Delete the Cryostat CR, uninstall the operator, stop Minikube, restart computer.

I'm not sure what I did either to "resolve" it - I just started from scratch as Elliott says, and somehow it came back with the expected IP address instead. I thought that I repeated all the steps the same way but perhaps I unknowingly did something incorrectly the first time and correctly the second time.

So it turns out my Ingress routing is actually working. If I go to https://testing.cryostat/ I can see the web UI and the WebSocket connection is accepted.
What's weird is that I followed the exact same steps and my Ingress status also shows localhost but mine is working for some reason...
On a side note, I left the UI untouched for a few minutes and this is the result:

Before leaving the UI I had selected the Cryostat instance as a target but didn't complete authentication.

That's looking a lot like https://github.com/cryostatio/cryostat-web/issues/338 , which also came out of SSL/TLS misconfiguration issues when using Kubernetes Ingress...

I was just about to link Janelle's comment on that issue: https://github.com/cryostatio/cryostat-web/issues/338#issuecomment-973142068. My situation is similar but the errors and reconnection/dropping of the WebSocket occur at a much more frequent rate than 1-minute intervals.

Logs for reference: https://gist.github.com/hareetd/64766c5520ca80dbc741a6f50a0f393f

Assuming the testing.cryostat-grafana hostname is also defined in /etc/hosts, then it seems like maybe the hostname is working on your local machine, but not inside the Minikube VM. Let me know if the full process outlined here helps: https://github.com/cryostatio/cryostat-operator/issues/279#issuecomment-979461067

Still the same issue, unfortunately i.e. repeated WebSocket connection drops and errors.

@hareetd What do you get from kubectl get pods -n ingress-nginx?

@ebaron

Which seems correct judging by the docs: https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/#enable-the-ingress-controller

Indeed, that looks fine. Can you past the relevant line from /etc/hosts?

<IP_ADDRESS> testing.cryostat testing.cryostat-command testing.cryostat-grafana
Where the IP address is the result from running minikube ip.

@hareetd Do you know if you're using the KVM2 driver like @jan-law and I are? You should be able to find out by using:
$ jq .Driver ~/.minikube/profiles/minikube/config.json
"kvm2"

If you're using the Docker driver, this may be the issue you're facing: https://github.com/kubernetes/minikube/issues/7802

I'm using the same driver, unfortunately.
Logs: https://gist.github.com/hareetd/ce325767a808edee4cd45ee9e6f2e0b9
For some reason, even though the behaviour on the web client is the same, the Exceptions thrown. In the previous logs, an UnknownHostException was repeatedly thrown when attempting to query testing.cryostat-grafana.
Now, a NoStackTraceTimeoutException is thrown when attempting a HTTP GET for the health of the testing.cryostat-grafana container, followed by repeated connecting and dropping of the WebSocket connection.

try restarting from scratch: Delete the Cryostat CR, uninstall the operator, stop Minikube, restart computer.

Thanks, I'm able to see the web-client with these steps now. The Ingress addresses still show localhost.
NAME                      CLASS   HOSTS                      ADDRESS     PORTS     AGE
cryostat-sample           nginx   testing.cryostat           localhost   80, 443   17m
cryostat-sample-command   nginx   testing.cryostat-command   localhost   80, 443   17m
cryostat-sample-grafana   nginx   testing.cryostat-grafana   localhost   80, 443   17m

Here are my most recent logs showing the webSocket connections getting dropped after to many concurrent connections. I don't see the same exceptions as Hareet: https://gist.github.com/jan-law/992090079a5e110811f8d1ea08b405a4

Here are my most recent logs showing the webSocket connections getting dropped after too many concurrent connections. I don't see the same exceptions as Hareet: https://gist.github.com/jan-law/992090079a5e110811f8d1ea08b405a4

@jan-law does this have a known fix in -web? I know you've done some work on the WebSocket connections there recently.

@ebaron the main -web branch has some changes to the way the frontend handles webSocket connections. I'll build and test the latest -web branch on minikube to see what happens

@jan-law Sounds good. If you just do a make deploy from the operator's main branch it should get you changes up to https://github.com/cryostatio/cryostat-web/commits/956f782ec9c19e9f144ab3185630a0a6bd2e790b. kubectl describe deploy cryostat-sample should show the cryostat image with 2.1.0-SNAPSHOT.

@ebaron With the cryostat:2.1.0-SNAPSHOT image on minikube, the error notifications don't appear anymore. The websocket connection still disconnects and reconnects every 60s as described in https://github.com/cryostatio/cryostat-web/issues/338#issuecomment-973142068

@jan-law Try adding these annotations to each Ingress:
nginx.ingress.kubernetes.io/proxy-read-timeout: 3600
nginx.ingress.kubernetes.io/proxy-send-timeout: 3600

This seems to be the recommended solution from the NGINX Ingress documentation: https://kubernetes.github.io/ingress-nginx/user-guide/miscellaneous/#websockets

Do we need a constant websocket connection? It sounds like the timeout is based on inactivity, which sounds sensible on it's own. Can we accommodate that functionality and just re-connect the next time we need to use it? Alternatively we can send keep-alive pings from either side through the connection and if it makes sense, have an increase in the timeout length. An open and unused connection doesn't sound ideal.

Is the behavior robust when the other side of the connection randomly dies?

Is the behavior robust when the other side of the connection randomly dies?

The main -web branch automatically retries the connection whenever the WebSocket connection gets disconnected for any reason (other than an authorization failure). In the case of a timeout, a user would see the page refresh briefly and two info-level notifications would appear inside the notification drawer: WebSocket connection lost and WebSocket Client Activity: Client at <IP_ADDRESS>:46334 accepted

The constant connection is used for notification emission from the server, so it's not feasible for the client side to re-open the connection on-demand - it doesn't know when demand is. We could send application-level keep-alive pings from either side (or both) and just ignore them in the web-client so they don't produce visual noise.

Okay. I think websocket has spec/definitions for keep-alive via special Ping/Pong messages. Maybe we can investigate that then.

If the 3600 timeout is useful for packaging/productization/downstream type things like OperatorHub then I think it's probably a good idea to include that configuration for now. Once we have an upstream release that includes application-level keepalive then the downstream configuration for increasing the timeout can be removed.

Originally posted by @andrewazores in https://github.com/cryostatio/cryostat/issues/757#issuecomment-983070243
Now that #311 is merged, should we go ahead with submitting an OperatorHub PR, or would you rather we include the keepalive pings in the OperatorHub PR?

I'm okay with the initial OperatorHub PR just containing the 3600 timeout "fix". The keepalive pings will take some more time to get implemented in upstream Cryostat and -web, and then some more time before they make it into a released version that we can tag and reference in the OperatorHub.

PR opened here: https://github.com/k8s-operatorhub/community-operators/pull/481

This is now live! https://operatorhub.io/operator/cryostat-operator
Congrats and thanks @jan-law and @hareetd!

FYI: I filed an issue to update the install guide on the website for this change: https://github.com/cryostatio/cryostatio.github.io/issues/34


Updated spacing images

Minor fix: @sonnemaf pointed out that, according to our docs, our OK labels should be all capital.

Minor fix: @sonnemaf pointed out that, according to our docs, our OK labels should be all capital.

TIL :)

/azp run


characters "ff" are not captured from return value of getTextContent()

Attach (recommended) or Link to PDF file here:
Sample3.pdf
Configuration:

Web browser and its version: not using browser
Operating system and its version: MacOS 10.14.6 hosting a local nodejs server
PDF.js version<EMAIL_ADDRESS>Is a browser extension: no

Steps to reproduce the problem:
1.
Run the following code snippet to print out the text to console.
The words such as "stuff", "offer" have the same issue that the "ff" is missing from the return value of the getTextContent() function, and become a weird character which cannot be compared or seen, which you can see the result from the screenshot below.
The code snippet is the following:
function getPDFText(data, callback, errorCallBack) {
var loadingTask = pdfjsLib.getDocument(data);

loadingTask.promise.then(function(pdf) {

    var maxPages = pdf._pdfInfo.numPages;
    var countPromises = []; // collecting all page promises

    for (var j = 1; j <= maxPages; j++) {

        var page = pdf.getPage(j);

        countPromises.push(page.then(function(page) { // add page promise
            var textContent = page.getTextContent();
            return textContent.then(function(text){ // return content promise
                return text.items.map(function (s) { return s.str; }).join(''); // value page text
            });
        }));
    }
    // Wait for all pages and join text
    Promise.all(countPromises).then(callback);

}).catch(errorCallBack);

}

What is the expected behavior? (add screenshot)
Expect to see the word "stuff" in the console.log, but instead only see "stu"
What went wrong? (add screenshot)

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):

This is a bug in the PDF file itself and not in the PDF.js library, which can also be reproduced in other viewers as well (e.g. Adobe Reader and PDFium in Google Chrome).
The problem is that the font in question contains incorrect data in the Encoding dictionary, which is why text-selection/copying doesn't work correctly.

if that's the case, do you know any alternative workaround that i can use to extract the text from the PDF in this kind of scenario?

This is a bug in the PDF file itself and not in the PDF.js library, which can also be reproduced in other viewers as well (e.g. Adobe Reader and PDFium in Google Chrome).
The problem is that the font in question contains incorrect data in the Encoding dictionary, which is why text-selection/copying doesn't work correctly.

This is not corrected actually.
I opened it with the Preview application from Mac OS, and I did text-selection, it actually gives me the word "stuff" correctly. I did try it in Google Chrome, and it failed and gave me "stu".
But I think this justifies the point that it may not be a bug in the PDF file itself.

This is not corrected actually.

Yes, it really is!
As already mentioned in https://github.com/mozilla/pdf.js/issues/11016#issuecomment-515893544, the Encoding dictionary has an incorrect entry.

I opened it with the Preview application from Mac OS, and I did text-selection, it actually gives me the word "stuff" correctly.

Generally speaking: Just because you're able to find an example of a PDF viewer which has implemented a work-around to handle certain kinds of corrupt font data, that does not mean that the PDF file itself isn't the culprit.

But I think this justifies the point that it may not be a bug in the PDF file itself.

No, it really is a bug in the PDF file itself (even if you don't agree). The fact that Adobe Reader, i.e. the PDF reference implementation, cannot handle this either is generally a quite good indication that the PDF file itself is corrupt.

Closing since I also don't see what we can do here. The PDF file itself is corrupt, and unless such a form of corruption happens very often, I don't see why we would need to work around this, if even possible.

Closing since I also don't see what we can do here.

There's probably a fairly simple/cheap fix for this particular case, assuming tests pass of course, however these sort of hacks should obviously be done on a case-by-case basis only when real-world PDF examples can be provided.

Fixed by the pull request above.


Check Indicators-array existence before iterating over it

Sometimes _indicatorsMap() is called after destroy() has already been called.
One case I managed to track down was when the instance was destroyed on the window.resize event:
The instance still handles the event and tries to refresh(), which in turn calls _indicatorsMap which iterates over that.indicators. But destroy already delete'd the indicators array.
this.on('destroy', function () {
	// ...
	delete this.indicators;
});

We are getting the same issue...
What about fix like this one below?
		// TODO: check if we can use array.map (wide compatibility and performance issues)
		function _indicatorsMap (fn) {
                        var indicators = that.indicators || [];
			for ( var i = indicators.length; i--; ) {
				fn.call(indicators[i]);
			}
		}

The reason I opted for the if statement over the empty-array fallback was the numerous times @cubiq mentioned his preference for avoiding extraneous statements in hot code paths.
Either fix works. I was just trying my best to get the pull request merged.


Fix Python xDS User Agent

Previously, the value of the macro resolved to "Python" in the Linux binary, resulting in no value supplied in the user agent. On Windows, the proper value of Python was supplied and would have worked correctly (if we actually tested xDS on Windows). This comes down to a different number of quote evaluations happening between platforms.
This PR switches from a raw command line flag to using the define_macros argument of distutils.Extension, which (hopefully) will do the right thing.

Manual run of xDS interop tests (in progress)

Unblocking the release. But it would be nice to have:

Similar change in Bazel;
A Python end2end test. It might be tough to test via Core, but it might be easier to test a Python xDS channel.

Similar change in Bazel;

Agree. Nico, Jan, Mark and I had a meeting on this and concluded that there's no good way to do this. Build macros in Bazel are defined at the level of a whole binary, not a single library within that binary. The only solutions we came up with that supported Bazel didn't use a build system at all and instead provided this information using a new core API or a static variable and some initialization logic.

A Python end2end test. It might be tough to test via Core, but it might be easier to test a Python xDS channel.

I assigned an issue to myself for this.

Build macros in Bazel are defined at the level of a whole binary, not a single library within that binary.

Good point. I don't think the --config works here as well.


Rework the standard-compliant charset detector

This commit contains all my latest work on StandardHtmlEncodingDetector.

Improves performance
Improves standard compliance
Adds tests
Fixes bugs (the stream was not reset after detection)

Standard compliance is still not perfect, as some parts, such as page-reloading, do not fit well in TIKA.
I am open to any remarks or suggestions concerning the code and am ready to rework it if necessary.
For a comparison to other encoding detectors, see: https://issues.apache.org/jira/browse/TIKA-2673?focusedCommentId=16541307&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16541307
Using this detector, we achieved <1% misdetected charsets in a random crawl segment.

This is a check-then-set pattern that should be in a synchronized block, right? I may be missing multithreaded guarantees elsewhere in your design... I'm happy with a single static initialization rather than lazy loading.

Good catch, thank you :+1: Charset initialization can be costly, especially if there are custom CharsetProvider loaded, so I chose lazy loading. But if you think this is not necessary, then we can go back to a static initialization.

What is the benefit of moving from a config file to hard coded loading? I somewhat prefer the config file, but defer to you if there's a good reason.

I didn't really like the custom file format (TSV with comments) with a custom java parser just for it. Plus I wanted to be able to add ReplacementCharset and XUserDefinedCharset without registering them for the whole program.

When you call PreScanner, you've already set mark() on the parent stream (before wrapping it in the BoundedInputStream). In other words, you assume that the stream sent in to detect already supports mark(). Do you need to wrap this separately?

EncodingDetector guarantees that the stream supports mark(), and requires the detector to reset() it before returning.


Add a method to detect if the application runs in a virtual environment

The idea is to use a syscall (on Windows), as described here: https://superuser.com/questions/806209/is-there-any-way-to-identify-if-my-server-is-hyperv-vm-or-a-physical-machine
This data should also be accessible through System.Management.
Hyper-V
Manufacturer = Microsoft Corporation
Product = Virtual Machine
Citrix
Virtualbox
VMware
Manufacturer/product can contain NONE, virtual or vmware

Support for Hyper-V was added in #50 .


Fix: Conditions for collection coverage

This PR

[x] fixes conditions for collection code coverage

Somewhat related to #526.
💁♂ The environment variable WITH_COVERAGE (previously used for indicating the desire to collect code coverage) is actually never used, but a variable COLLECT_COVERAGE is set in the before_script section, so I remove the former and rename the latter here.

Thanks @localheinz

Thank you, @chartjes!


[FLINK-19585][tests] Waiting for job to run before savepointing in UnalignedCheckpointCompatibilityITCase.

What is the purpose of the change
Fixes UnalignedCheckpointCompatibilityITCase.test:97->runAndTakeSavepoint: "Not all required tasks are currently running.", which may be caused when deploying takes longer than expected, such that stopWithSavepoint is called before everything is running.
Brief change log

Allow savepoints to be used in MiniCluster.
Use JobDetailsInfo to ensure that job and all tasks are running.

Verifying this change
Fixes test failure.
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (yes / no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
The serializers: (yes / no / don't know)
The runtime per-record code paths (performance sensitive): (yes / no / don't know)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (yes / no / don't know)
The S3 file system connector: (yes / no / don't know)

Documentation

Does this pull request introduce a new feature? (yes / no)
If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

E2E failures are unrelated since this PR is only affecting non-E2E tests.


[WIP] Update template and null providers for terraform v0.12

What this PR does / why we need it:
template and null providers also need to be updated for terraform v0.12.
Ref https://github.com/terraform-providers/terraform-provider-template/blob/master/CHANGELOG.md and https://github.com/terraform-providers/terraform-provider-null/blob/master/CHANGELOG.md.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Release note:

Provider versions are upgraded:

- template `1.0.0` -> `2.1.2`
- null `1.0.0` -> `2.1.2`

Will unhold when I am done with the validation.
/hold

/hold cancel


Mobile support

Is it possible to make this library work for mobile devices as well?

Have you seen the Simple Touch-Enabled Demo in README or searched for the touch keyword in older issues?


Fly: --swap without --root lead to permission problems with fly volumes

I followed Sqlite3 on fly volumes tutorial and proactively enabled swap for demo rails app.
It turned out that, since the container is launched as root user when swap is on, fly mounts volumes for root too:
Mounting /dev/vdb at /mnt/volume w/ uid: 0, gid: 0 and chmod 0755
then entry-point script substitutes user for rails server command with rails user:
https://github.com/rubys/dockerfile-rails/blob/69f7631407735aa558bf99be46e0c0c988435479/lib/generators/templates/docker-entrypoint.erb#L18
rendering mounted volumes un-accessible for rails user.

This will require dockerfile-rails to check for and parse the fly.toml file, which will be fly.io specific; that being said, I see no reason why this couldn't be done.


Heads up on using iSTFTPNet

Hey there,
Magnificent project, i've spent quite some time looking for a project like this one (ended up finding this via Leanspeech). During my research, i've come upon this thing : https://github.com/rishikksh20/iSTFTNet-pytorch/
From what I gathered, optispeech is using WaveNext as a vocoder. It seems to work really well (in this case, at least). I was wondering if you'd heard about iSTFTNet and if you knew:

if it performed as well as WaveNext
if it was more lightweight (in memory & CPU usage) than WaveNext

Well, I read the WaveNext paper a bit more carefully (using mighty ctrl-f), and they actually mention iSTFTNet a lot (to say they're performing much better), so that might answer it.

Adding to what you've already discovered, ISTFTNet requires an additional ISTFT component when you deploy it. You cannot easily export it to ONNX unless you sacrifice some quality, and if you want to use a native ISTFT implementation, you must compile it separately and link it to your TTS app.
At least WaveNeXt is self-contained.


API virtual-machines only return primary ip address

Hello,
I have a Virtual Machine with:

1 virtual interface
this virtual interface have 02 IP
one IP mark as primary

When query with API virtual-machines, the result only have primary IP. How can we get the result with all IP Address ?
I use netbox version v2.8.3

This issue is pending closure as it does not conform to one of the provided templates as required by the contributing guide. If you'd like to request that your issue be re-opened, please first update the content so that it matches the appropriate template (this may require rewriting your issue entirely).

The nb.virtualization.virtual_machines endpoint only returns VirtualMachine objects. If you want interfaces and IP addresses you have to query the nb.virtualization.interfaces and nb.ipam.ip_addresses endpoints, filtering by the VirtualMachine ID. Reference the NetBox API docs for your installation at http://<netbox_url>/api/docs/ to see the available filters.


feat(socketio): notify client of transport completion

When the async client connects to the server, it spawns a new thread to handle the arriving messages asynchronously, which is immediately detached with no chance of awaiting its completion.
For long-running programs (e.g. a client program that never really disconnects from the server) this can be problematic, as unexpected stream completions would go unnoticed. This may happen if the underlying tungstenite websocket shuts down ('Received close frame: None') but there are no engineio/socketio close frames. Hence, since the stream terminates, the message handling task stops without a Close or Error event being fired.
Thus, we now fire an additional Event::Close when the stream terminates, to signal the (potentially unexpected) close to the user.
Closes #448
Once we settle on a final solution, I can also write a test for that.

Are there any remaining problems with this?
This looks like it solves exactly what I need.


Frequent Request Menu

As there is too much work, I am deprioritizing this. Maybe reopen it one day.


Pull request test passes on GitHub pull request page but fails when run locally

I have mentioned this problem here (http://itensor.org/support/2290/questions-about-checks-for-itensors-jl-pull-request) and here (https://github.com/ITensor/ITensors.jl/pull/434), but I have been asked to put it as an issue here.
Basically, I submitted the above pull request, and all of the tests have passed. However, I have noticed that, when I run the tests locally, there is a particular test that fails--it is the line @test str[1] == "MPS" in mps.jl (line 15). Here is the error message:
MPS Basics: Test Failed at c:\Users\user\ITensors.jl\test\mps.jl:16
  Expression: str[1] == "MPS"
   Evaluated: "ITensors.MPS" == "MPS"

For additional information, I have seen this test failure at every individual commit I have placed for that pull request. I am running this on my desktop, which is a 64-bit computer using Windows 10. When I ran the tests locally, I ran each individual file on its own in Visual Studio Code.
It is also worth mentioning that all of the files gave me this warning:
Warning: Package VSCodeDebugger does not have ITensors in its dependencies:
│ - If you have VSCodeDebugger checked out for development and have
│   added ITensors as a dependency but haven't updated your primary
│   environment's manifest file, try `Pkg.resolve()`.
│ - Otherwise you may need to report an issue with VSCodeDebugger
└ Loading ITensors into VSCodeDebugger from project dependency, future warnings for VSCodeDebugger are suppressed.

Some of them ran without incident afterward, but some of them then gave me this error (perhaps with "QuadGK" replaced with some other package name):
ERROR: LoadError: LoadError: ArgumentError: Package VSCodeDebugger does not have QuadGK in its dependencies:
- If you have VSCodeDebugger checked out for development and have
  added QuadGK as a dependency but haven't updated your primary
  environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with VSCodeDebugger

I believe this is just some issue I have in VSCode, but I just thought I should mention it so that you have the full information about the way I have been running the tests locally.

Thank you! We will try to reproduce this. It may be something to do with running each test individually instead of through runtests.jl, but I'll have to check about that. We do want the testing files to be individually runnable so there's nothing wrong with you doing that.

UPDATE: I ran runtests.jl as well, and I confirm that running test files individually shouldn't be the problem here. When I did this, I got 2 failed tests and 6 errors during tests.
The 2 failed tests were just like the one mentioned above--one was the aforementioned one (line 15 of mps.jl), and the other one said @test str[1] == "MPO" (line 26 of mpo.jl) and generated an identical error message but with "MPS" replaced by "MPO."
The 6 broken tests are due to the error with the package VSCodeDebugger on my end, so you shouldn't see those. But for your reference, here are the 6 tests, along with the package that VSCode Debugger doesn't have in its dependencies:
contract.jl --> Combinatorics
combiner.jl --> Combinatorics
trg.jl --> QuadGK
ctmrg.jl --> QuadGK
readwrite.jl --> HDF5
examples.jl --> Suppressor

Out of curiosity, when you run all of the tests, are you doing julia>] test ITensors or are you doing julia> include("runtests")? If you are only doing one of them, could you try the other one and let us know if you get different results?
If the main issue is the MPS printing method test, I would vote to just remove that test anyway.

I was actually doing neither of the two: I was clicking on the "Run Without Debugging" option under the "Run" tab on Visual Studio Code (this is how I ran each test file individually and how I ran runtests.jl to run them all at once).
I decided to follow your instructions above in the Julia REPL, and I actually got different results, which adds to the confusion. When I used your first suggestion (julia>] test ITensors), I actually got no failed tests at all (see the first 2 attached screenshots). However, when I used your second suggestion (include("C:/Users/user/ITensors.jl/test/runtests.jl")), I got even more errors than before (see the next 10 attached screenshots for all of the errors). After combing through these errors, I am confident that none have anything to do with my modifications to the code. A number of them seem to be about a package not being in the current path, which I imagine can be fixed fairly easily, and I think some of them (in-place operations in broadcast.jl) are the same as before, but some of them are new.

Also, to add to this weirdness a little, I also have a separate copy of ITensors that is not a GitHub repository, i.e. I installed it using the "add" command rather than the "git clone" command. When I ran the tests on them (include("C:/Users/user/.julia/packages/ITensors/tgmxZ/test/runtests.jl")), I now got far fewer errors, even though I made changes in this folder so that all of the code matched up. In fact, the only errors that persisted were the errors about a certain package not being found in the current path. I have attached a screenshot for this one too.

Thanks for trying that out, that is helpful. I think there are a few potential issues going on.

I can see from the first output that the test is using NDTensors v0.1.6. The latest version of ITensors should be using a more recent version (the latest registered version, ITensors v0.1.14, relies on NDTensors v0.1.11). Are you sure you have the most up to date versions of ITensors and NDTensors? Is it possible you need to merge the master branch into your local branch?

The tests rely on some test-only dependencies, like Combinatorics and QuadGK. These would get automatically installed when you do julia>] test ITensors, but not when you do julia> include("runtests.jl"). To do julia> include("runtests.jl"), you would have to install them manually. You can see which packages the tests rely on here: https://github.com/ITensor/ITensors.jl/blob/master/Project.toml#L33. It looks like maybe you would need to add HDF5 as well, though I'm not sure why since that should be installed when you install ITensors, that could be related to having too old of a version.

I haven't used Visual Studio Code, maybe when you run them in that way it is running it in a strange environment, which is leading to the MPS printing test failing (that's just a guess). I'm curious what happens when you fix issues 1. and 2. above and run it in the same way. If the only issue left is the MPS printing test, we can just remove that one.

Just saw your latest post, it sounds like the issue was that you didn't have the latest version of ITensors from your clone.
In general, I would recommend developing ITensors by first doing julia>] add ITensors and then doing julia>] dev ITensors. This creates a development version of ITensors (a git clone) in the directory ~/.julia/dev/ITensors, and you can develop in a branch there. You can switch back to the non-development version with julia>] free ITensors. You should also make sure to pull the latest versions of ITensors when you are in the directory ~/.julia/dev/ITensors to make sure everything is up to date.
I'm not sure how this workflow translates to use Visual Studio Code, however. I started a section of the docs that is meant to be a guide for developing ITensors here, I should probably add more to that. Could you make some suggestions about what would be helpful to have there, particularly in relation to developing using Visual Studio Code? I can add some pointers about the best ways to test the code and make sure it is up to date with the latest master branch.

I think this issue is more of a documentation issue, about the best practices for developing and testing ITensors. So I'll close in favor of #289.


Some methods of Client return HTTP error 404

The returned value:
HttpErr(Valid(404))

I accidentally opened this issue in the wrong repository.
Closing this issue and moving it to the correct repository.


Custom Class and Auto PreSave

I was trying to Create a Custom Class to Inherit AuditEntry and added my own property
But i am unable to use the AUTO PRESAVE
How to acheive that ?

If you don't have customized the DbSet, you can use it as you do it without customization
public class EntityContext : DbContext
{
   // ... context code ...
   public DbSet<AuditEntry> AuditEntries { get; set; }
   public DbSet<AuditEntryProperty> AuditEntryProperties { get; set; }
}

AuditManager.DefaultConfiguration.AutoSavePreAction = (context, audit) =>
    // ADD "Where(x => x.AuditEntryID == 0)" to allow multiple SaveChanges with same Audit
    (context as EntityContext).AuditEntries.AddRange(audit.Entries);

However, if you also have a custom DbSet, you must cast the list to the DbSet element type.
public class EntityContext : DbContext
{
   // ... context code ...
   public DbSet<CustomAuditEntry> CustomAuditEntries { get; set; }
   public DbSet<CustomAuditEntryProperty> CustomAuditEntryProperties { get; set; }
}

AuditManager.DefaultConfiguration.AutoSavePreAction = (context, audit) =>
    // ADD "Where(x => x.AuditEntryID == 0)" to allow multiple SaveChanges with same Audit
    (context as EntityContext).CustomAuditEntries.AddRange(audit.Entries.Cast<CustomAuditEntry>());

var audit = new Audit();
audit.CreatedBy = "ZZZ Projects"; // Optional
ctx.SaveChanges(audit);

We added the example here
Let me know if you successfully make it work, or you have a different scenario.

I am getting the following exception as
{"Unable to cast object of type 'Z.EntityFramework.Plus.AuditEntry' to type 'DinePlan.DineConnect.Audit.TenantAuditEntry'."}
and my code is
 AuditManager.DefaultConfiguration.AutoSavePreAction = (context, audit) =>                 (context as DineConnectDbContext).CustomAuditEntries.AddRange(audit.Entries.Cast<TenantAuditEntry>());

Do your class inherit from Audit Entry?
If yes, did you use the AuditEntryFactory property?
You can learn more about Audit Customization here
If you want, you could also send us a project sample, and we will help you.

Hi there,
This package is amazing! Makes things so much easier. However a feature is missing: I want to store audit logs in different tables per entity type because I fear that having all the logs on one table is going to cause a performance issue. Example: CustomerAuditEntry, CustomerAuditEntryProperty (so customer logs will be stored on these tables) and ProductAuditEntry, ProductAuditEntryProperty (so product logs will be stored on these tables). Thus each type has its own log tables and preventing one huge table.
On trying to work around your package to get my goal, I ran into the problem that has been posted. Cannot cast from Base class to Sub class.
Your assistance is appreciated.
Regards

Hello @KarishImrith ,
Since this question may lead to more questions, I answered in a new issue to make it easier to make a follow-up.
Please see the answer in the Issue #63

Can you give me a sample class of a working CustomAuditEntry and CustomerAuditEntryProperty? I am having the same problem

Hello @primerocarlos ,
Here is an example
using System.Data.Entity;
using System.Windows.Forms;

namespace Z.EntityFramework.Plus.Lab
{
    public partial class Form_Request_Audit_CustomAudit : Form
    {
        public Form_Request_Audit_CustomAudit()
        {
            InitializeComponent();

            AuditManager.DefaultConfiguration.AutoSavePreAction = (context, audit) =>
                (context as EntityContext).AuditEntries.AddRange(audit.Entries);

            AuditManager.DefaultConfiguration.AuditEntryFactory = args =>
                new CustomAuditEntry {CustomProperty = 1};

            AuditManager.DefaultConfiguration.AuditEntryPropertyFactory = args =>
                new CustomAuditEntryProperty {CustomProperty = 2};

            using (var ctx = new EntityContext())
            {
                var audits = new Audit();
                audits.CreatedBy = "ZZZ Projects"; // Optional

                ctx.EntitySimples.Add(new EntitySimple {ColumnInt = 2});
                ctx.SaveChanges(audits);
            }
        }

        public class EntityContext : DbContext
        {
            public EntityContext() : base("CodeFirstEntities")
            {
            }

            // ... context code ...
            public DbSet<AuditEntry> AuditEntries { get; set; }

            public DbSet<AuditEntryProperty> AuditEntryProperties { get; set; }
            public DbSet<EntitySimple> EntitySimples { get; set; }

            protected override void OnModelCreating(DbModelBuilder modelBuilder)
            {
                // MAP audit using TPH
                modelBuilder.Entity<AuditEntry>().Map<CustomAuditEntry>(x => x.Requires("Discriminator").HasValue("CustomAuditEntry"));
                modelBuilder.Entity<AuditEntryProperty>().Map<CustomAuditEntryProperty>(x => x.Requires("Discriminator").HasValue("CustomAuditEntryProperty"));

                base.OnModelCreating(modelBuilder);
            }
        }
    }

    public class EntitySimple
    {
        public int ID { get; set; }
        public int ColumnInt { get; set; }
    }

    public class CustomAuditEntry : AuditEntry
    {
        public int CustomProperty { get; set; }
    }

    public class CustomAuditEntryProperty : AuditEntryProperty
    {
        public int CustomProperty { get; set; }
    }
}

Best Regards,
Jonathan

Hi Jonathan,
Thanks!
On Oct 4, 2017 6:13 AM, "Jonathan Magnan"<EMAIL_ADDRESS>wrote:

Hello @primerocarlos https://github.com/primerocarlos ,
Here is an example
using System.Data.Entity;using System.Windows.Forms;
namespace Z.EntityFramework.Plus.Lab
{
public partial class Form_Request_Audit_CustomAudit : Form
{
public Form_Request_Audit_CustomAudit()
{
InitializeComponent();
        AuditManager.DefaultConfiguration.AutoSavePreAction = (context, audit) =>
            (context as EntityContext).AuditEntries.AddRange(audit.Entries);

        AuditManager.DefaultConfiguration.AuditEntryFactory = args =>
            new CustomAuditEntry {CustomProperty = 1};

        AuditManager.DefaultConfiguration.AuditEntryPropertyFactory = args =>
            new CustomAuditEntryProperty {CustomProperty = 2};

        using (var ctx = new EntityContext())
        {
            var audits = new Audit();
            audits.CreatedBy = "ZZZ Projects"; // Optional

            ctx.EntitySimples.Add(new EntitySimple {ColumnInt = 2});
            ctx.SaveChanges(audits);
        }
    }

    public class EntityContext : DbContext
    {
        public EntityContext() : base("CodeFirstEntities")
        {
        }

        // ... context code ...
        public DbSet<AuditEntry> AuditEntries { get; set; }

        public DbSet<AuditEntryProperty> AuditEntryProperties { get; set; }
        public DbSet<EntitySimple> EntitySimples { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            // MAP audit using TPH
            modelBuilder.Entity<AuditEntry>().Map<CustomAuditEntry>(x => x.Requires("Discriminator").HasValue("CustomAuditEntry"));
            modelBuilder.Entity<AuditEntryProperty>().Map<CustomAuditEntryProperty>(x => x.Requires("Discriminator").HasValue("CustomAuditEntryProperty"));

            base.OnModelCreating(modelBuilder);
        }
    }
}

public class EntitySimple
{
    public int ID { get; set; }
    public int ColumnInt { get; set; }
}

public class CustomAuditEntry : AuditEntry
{
    public int CustomProperty { get; set; }
}

public class CustomAuditEntryProperty : AuditEntryProperty
{
    public int CustomProperty { get; set; }
}

}
Best Regards,
Jonathan
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/zzzprojects/EntityFramework-Plus/issues/56#issuecomment-334031518,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATgdRY7vXc0WpLptfL7rowUAw-1wY8TBks5sounXgaJpZM4KMWjY
.

In this example code, the "CustomProperty" seems assigned the same value.  Is there a way to assign the value based on values of the entity being auditted?
It would be nice to configure a function so that the CustomProperty value is assigned with output of a function with the auditted entity as a parameter.


Misspell in "Screenshot" CAN ONLY BE CORRECTED BY PROJECT ADMINS.

Describe the bug
The template mentors give us for writing an issue. There is a small misspell in it. Its a small error so I don't think I deserve to write GSSoC in it, Also I can't solve it, only the mentors can.

Screenshort   <- This is the error

Okay we will fix it!
Thanks for letting us know!

Thank you @MonalikaPatnaik for acknowledge.


DEP: remove old BSR methods

Reference issue

Closes #15759
What does this implement/fix?

Removes deprecated BSR methods. These have been deprecated since 0.19 (5 years) so think it is safe to remove.
Additional information

Have skipped azure ci but happy to force push if needed

didnt notice #15875 will close


Scheme to return to app

I am struggling to get this to work, and I'm not sure if it's Auth0 or {N} causing the problem... auth0 has had me "on hold" in a ticket for over a month I was hoping someone here could validate that it's not an {N} issue, maybe the way I'm registering the Broadcast bits or something?
Repo: https://github.com/sitefinitysteve/nativescript-auth0
Android Java: https://github.com/sitefinitysteve/nativescript-auth0/tree/master/plugin/platforms/android
It BASICALLY works, I get the lock screen, can login with my provider, but once complete it should send me back to my app, but instead, this happens
http://www.screencast.com/t/tNCgrH6yRzs

I do have some logcat stuff as well, but don't want to paste in here... should be able to run the demo app from the repo quite easily though...

Closing... They issued a pr today (of course after a month they do it the day i open this, thx universe)


Investigate performance of dart.mixin and copyProperties

copyProperties (particularly as called from dart.mixin) shows up as hot.  We should see if we can optimize this code, and/or optimize our use of it.

Yeah I just noticed this looking at dart.mixin ... it's even worse than our normal setSignature. Working on a fix.

this should be improved somewhat by https://dart-review.googlesource.com/c/sdk/+/7442 ... I don't know whether to call this "fixed" or not though. We still need to copy things at setup time, due to how mixins work. I suspect "unrolling" mixin classes to successive applications would help this (as well as many other things: mixin constructor performance, stack traces, and generally reducing the bug farm around the dart.mixin helper trying to replicate many of the things that are normally done by _emitClassDeclaration at compile time.)

This was mostly a reminder to myself to look at the code and see if there were obvious opportunities.  If you've taken a pass and feel like the code itself is adequate given the architecture I'd go ahead and close it.  If this becomes an issue, I can open a new issue around the higher level design.

We could unroll mixins at compile time, that may help performance at the cost of code size. I'm not sure, though. It would look something like:
class Object$ListMixin extends core.Object {}
Object$ListMixin.prototype.add = ListMixin.prototype.add;
Object$ListMixin.prototype.addAll = ListMixin.prototype.addAll;
...
... set signatures for Object$ListMixin ...
...

class MyList extends Object$ListMixin {
  ...
}

It would almost certainly help runtime execution, because the constructor(s) for Object$ListMixin would be faster.

i'm fixing this as part of https://github.com/dart-lang/sdk/issues/31003

https://dart-review.googlesource.com/c/sdk/+/16337

that CL landed :)


GraphQL API - jobs filtering and sorting at database level

What is the feature request? What problem does it solve?
Currently the API loads all jobs into the memory and then applies filters. This is very inefficient and resource intensive (memory, network traffic, etc.).
If we have 2000 jobs and filter them by team that has 100 jobs, the API will always load 2000 jobs instead of 100 and it will filter them into the memory.
Suggested solution
Modify the existing GraphQL data fetcher for executions (com.vmware.taurus.service.graphql.GraphQLDataFetchers) to support database filtering and sorting. The filtering and sorting should be performed at database level for better performance and resource (memory, network traffic, etc.) utilization. The queries should be built dynamically based on the filters.
Sample implementation - https://piotrminkowski.com/2020/07/31/an-advanced-guide-to-graphql-with-spring-boot/
Acceptance criteria
The API should perform jobs filtering and sorting at database level.

Triaged. Closed as stale.


Handle Ping message

This PR adds support for the no-op Ping message which seems to break connections with Emby 4.8.
The Ping message doesn't have a 'Data'field, which results in the below exception:
{"MessageType":"Ping"}

>>> emby.start()
Task exception was never retrieved
future: <Task finished name='Task-4' coro=<EmbyServer.socket_connection() done, defined at /usr/local/lib/python3.11/site-packages/pyemby/server.py:255> exception=KeyError('Data')>
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/pyemby/server.py", line 287, in socket_connection
    self.process_msg(msg.data)
  File "/usr/local/lib/python3.11/site-packages/pyemby/server.py", line 315, in process_msg
    msgdata = jmsg['Data']
              ~~~~^^^^^^^^

@mezz64 any chance you have a moment to merge this so we can unbreak the home assistant emby integration?

Looks straight forward enough.  I'll merge and push to pypi later today.


Faraday::Request (Faraday::Error)

My code:
require 'telegram/bot'
token = 'real_token'
Telegram::Bot::Client.run(token) do |bot|
bot.listen do |message|
case message.text
when '/start'
bot.api.send_message(chat_id: message.chat.id, text: "Hello, #{message.from.first_name}")
when '/stop'
bot.api.send_message(chat_id: message.chat.id, text: "Bye, #{message.from.first_name}")
end
end
end
error:
/usr/local/lib/ruby/gems/3.0.0/gems/faraday-2.0.0/lib/faraday/middleware_registry.rb:57:in lookup_middleware': :multipart is not registered on Faraday::Request (Faraday::Error) 	from /usr/local/lib/ruby/gems/3.0.0/gems/faraday-2.0.0/lib/faraday/rack_builder.rb:242:in use_symbol'
from /usr/local/lib/ruby/gems/3.0.0/gems/faraday-2.0.0/lib/faraday/rack_builder.rb:103:in request' 	from /usr/local/Cellar/ruby/3.0.1/lib/ruby/3.0.0/forwardable.rb:238:in request'
from /usr/local/lib/ruby/gems/3.0.0/gems/telegram-bot-ruby-0.16.0/lib/telegram/bot/api.rb:86:in block in conn' 	from /usr/local/lib/ruby/gems/3.0.0/gems/faraday-2.0.0/lib/faraday/connection.rb:91:in initialize'
from /usr/local/lib/ruby/gems/3.0.0/gems/faraday-2.0.0/lib/faraday.rb:94:in new' 	from /usr/local/lib/ruby/gems/3.0.0/gems/faraday-2.0.0/lib/faraday.rb:94:in new'
from /usr/local/lib/ruby/gems/3.0.0/gems/telegram-bot-ruby-0.16.0/lib/telegram/bot/api.rb:85:in conn' 	from /usr/local/lib/ruby/gems/3.0.0/gems/telegram-bot-ruby-0.16.0/lib/telegram/bot/api.rb:49:in call'
from /usr/local/lib/ruby/gems/3.0.0/gems/telegram-bot-ruby-0.16.0/lib/telegram/bot/api.rb:37:in method_missing' 	from /usr/local/lib/ruby/gems/3.0.0/gems/telegram-bot-ruby-0.16.0/lib/telegram/bot/client.rb:30:in fetch_updates'
from /usr/local/lib/ruby/gems/3.0.0/gems/telegram-bot-ruby-0.16.0/lib/telegram/bot/client.rb:25:in listen' 	from main.rb:6:in block in '
from /usr/local/lib/ruby/gems/3.0.0/gems/telegram-bot-ruby-0.16.0/lib/telegram/bot/client.rb:18:in run' 	from /usr/local/lib/ruby/gems/3.0.0/gems/telegram-bot-ruby-0.16.0/lib/telegram/bot/client.rb:8:in run'
from main.rb:5:in `'

Looks like multipart middleware was removed from Faraday 2.0.0 version (released today). You can avoid this error by using 1.8 version (add next line to your Gemfile: gem "faraday", "~> 1.8.0").

this work, thks.

But I think this issue should not be closed and telegram-bot-ruby should be adapted to latest stable version of faraday?

yes I agree with you


Updates to fermipy plugin pt 1

Generate model from fermipy output fits file.
(Todo: Check superexponential cutoff PL)

Codecov Report

Merging #552 (3e27369) into dev (6a834f3) will decrease coverage by 0.12%.
The diff coverage is 57.89%.

@@            Coverage Diff             @@
##              dev     #552      +/-   ##
==========================================
- Coverage   71.87%   71.75%   -0.13%
==========================================
  Files         121      121
  Lines       15647    15675      +28
==========================================
+ Hits        11246    11247       +1
- Misses       4401     4428      +27

I tried the test locally, and the new test failed with the following exception:
FAILED threeML/test/test_model_from_catalog.py::test_read_model_from_catalogs - ValueError: Unable to insert row because of exception in column 'Spatial_Filename':
This failed simply calling the following command in fermipy:
In [1]: from fermipy.gtanalysis import GTAnalysis
In [2]: gta=GTAnalysis("2config_Crab_4FGL.yaml",logging={'verbosity' : 3})
In [3]: gta.setup()
In [4]: gta.write_roi("roi_4FGL")
Maybe is related to wrong fermion version? (I have fermipy 1.0.1 which is the latest available in Conda-forge)

Huh. I tested it locally with the new fermitools and fermipy and it was
fine. Will try and take a look at it tomorrow. Sorry!
On Wed, Aug 31, 2022, 19:39 Nicola Omodei @.***> wrote:

@.**** commented on this pull request.
test failed locally after merging with dev
—
Reply to this email directly, view it on GitHub
https://github.com/threeML/threeML/pull/552#pullrequestreview-1092618992,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB3PSBU4VKGQOHVDUX7ALW3V37UMFANCNFSM55CIL4VQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

@omodei Which version of fermi tools are you using? For fermitools 2.2.x you need fermipy 2.1.x which you can get from pip. Unfortunately I cannot release to fermi conda myself yet.


[Send Txn] Cannot bump a txn twice

App version: v0.1.95-01/Testnet

Send a txn.
Bump it once.
Open txn page.

Expected:
Bump fee button to be visible and working.
Observed:
Bump fee button is not visible.

Addional info:

When the txn is first broadcasted, RBF is enabled.
But when it's bumped, RBF is disabled (Not by user's choice)

fixed on main


Support of Le Monde

Checklist

[X] I'm reporting a new site support request
[X] I've verified that I'm running youtube-dl version 2<IP_ADDRESS>
[X] I've checked that all provided URLs are alive and playable in a browser
[X] I've checked that none of provided URLs violate any copyrights
[X] I've searched the bugtracker for similar site support requests including closed ones

Example URLs

Single video: https://www.lemonde.fr/festival/video/2017/08/30/que-se-passerait-il-si-tout-le-monde-etait-vegan_5178386_4415198.html

Description

WRITE DESCRIPTION HERE
Le Monde videos are actually on YouTube but youtube-dl doesn't catch them.

Here is an other video which is on dailymotion : https://www.lemonde.fr/sciences/video/2019/09/12/correlation-et-causalite-peut-on-decrocher-un-prix-nobel-en-mangeant-du-chocolat_5509656_1650684.html

Here is an other video which is on dailymotion : https://www.lemonde.fr/sciences/video/2019/09/12/correlation-et-causalite-peut-on-decrocher-un-prix-nobel-en-mangeant-du-chocolat_5509656_1650684.html

I added it in the initial issue.

By the way, this issue is not a site-support request but a bug report. The extractor LeMonde already exists : https://github.com/ytdl-org/youtube-dl/blob/master/youtube_dl/extractor/lemonde.py


Feature: Decorator/Function declaration in cadl using extern

closes #994
Add support for decorator and function declaration in cadl
Yon can now do that to define the type of decorators
extern dec header(target: ModelProperty, headerName?: StringLiteral);
extern dec put(target: Operation);

Playground with examples

Basic IDE support
Decorators

Functions:

Implementation details
How it works: (Same for functions)

Parsing has nothing special just parse like any other node
Binding is where we have some symbol merging:

when binding a decorator

add SymbolFlags.Implementation when its in JS
add SymbolFlags.Declaration when its a cadl decorator declaration

When a decorator symbol get merged in the table it:
if there is no existing symbol for that name we are good
if there is a symbol but its not a decorator, emit a duplicate error
if there is a symbol and its a decorator:

if its has same type Implementation or Declaration then emit a duplicate error
otherwise merge the 2 symbol

Check will then verify the decorator declaration node is valid and create a new decorator type

check a declared decorator has an implementation

other-way around is not an error(can have an implementation without a declaration)

check rest parameter type is an array
check the decorator was marked with extern (AS this is the only scenario we support right now)

also fix https://github.com/Azure/cadl-azure/issues/2130

This could use better error message, probably best handled as a separate issue.
https://cadlplayground.z22.web.core.windows.net/prs/1161/?c=dXNpbmcgQ2FkbC5SZWZsZWN0aW9uOwoKZXh0ZXJuIGRlYyBmb28odGFyZ2V0OiBUeXBlLCB2YWx1ZTogeyBhOiBTdHJpbmdMaXRlcmFsLCBizxJ9KTsKCkDEQ3thOiAiaGVsbG8ifSkKbW9kZWwgRm9vIHt9Cgo%3D

This could use better error message, probably best handled as a separate issue.
https://cadlplayground.z22.web.core.windows.net/prs/1161/?c=dXNpbmcgQ2FkbC5SZWZsZWN0aW9uOwoKZXh0ZXJuIGRlYyBmb28odGFyZ2V0OiBUeXBlLCB2YWx1ZTogeyBhOiBTdHJpbmdMaXRlcmFsLCBizxJ9KTsKCkDEQ3thOiAiaGVsbG8ifSkKbW9kZWwgRm9vIHt9Cgo%3D

Yeah I did notice that, we should chnage anonymous model print to print the content of the type like TS does. But I think we have to be smart to not show too much if the type is very large.

This is awesome work and it's really great to be able to play with this!
That said, putting a top-level comment here for this discussion: I've grown somewhat concerned about the Reflection namespace idea we approved previously. Seeing how it was used in e.g. template parameters made me realize that we are increasing the complexity of Cadl's type space significantly, and it is already complex (and, unfortunately, somewhat messy). Introducing such concerns as "do I mean Type or Model or object?", or "should I use Union or should I use subtype checking with some model type" feels like a bridge too far right now.
I propose the following:

Delete all types in Reflection.*
Make type declarations optional and implicitly unknown. If users can define the type they want their decorator to be passed, then great, but otherwise they should continue to do their own validation on the implementation side.
Over time, move some of the types here into the main type hierarchy (Tuple, *Literal, Array seem like good candidates).

An observation about 2 is that, I think we are being a bit hand-wavey about whether a declaration like fn foo(s: string): void is expecting s to be the type string, any subtype of string (and so string literal types are fine), or values of string (which we don't have a syntax for but presumably can implicitly cast string literal types to string values). I think this needs to be cleaned up too.
You proposed #888 which was rejected because you can just use *Literal but I think these are different things (though implicit casts may apply). Conflating types with values of types is fundamentally going to cause some deep confusion. I think we should reconsider. Having some kind of valueOf operator means we can use cadl models to describe the data shapes we want decorators to give us in the same way we describe e.g. service endpoints. For example, the following example reads very nice to me:
@minLength(2)
@maxLength(2)
model CCTLD is string;
model Country {
  name: string;
  ccTld: CCTLD;
}
dec country(target: object, record: valueOf(Country));

@country(#{ name: "hi", ccTld: "hi" })
model Foo { }

Without valueOf, it is ambiguous whether something like above is expected, or if subtypes of country are expected, e.g. I might think I should pass something like this instead (and in some cases, this may indeed be the expectation):
@country({ name: string, ccTld: CCTLD, customProp: string })
model Foo { }

Removing all the Reflection types would make this PR loose the significant part of its worth. That means we need to keep all the custom validation for all the decorators which is quite a pain to have when writing decorators.
I would be fine not having the literal typs StringLiteral and instead use string and just hope user won't pass string explicitly until we have that valueOf. But mot being able to specify the target and some of the parameters feels very limiting to me and (@versioned takes an enum, @added a enum member, etc.)

It will pain me to see the custom validation deletion reverted, but I can be OK with @bterlson's proposal if we give high priority to settling the overall design issues for the type system. It seems we've been (inadvertently) punting on related issues for a long time. We sort of scrape by issue by issue, for example, deciding to leave it to a model-to-object helper and just use anonymous model types as though they are objects using a conversion helper. Or to to punt on projection argument typing and valueof. So I think it's time to look at this carefully and all-up.
I think even the most extreme subdivision of work where everything is unknown is still a very significant increment in value. Being able to see argument names, have argument count checked automatically, and having a place to put docs that tooling can render are all independently very useful, IMHO. If it comes to that, I can even (relcutantly) accept everything unknown as the v1.0 line. From a typical Cadl spec author's perspective, libs with good parameter names, IDE-visible docs and custom validation are not devastatingly worse than fully typed libs.
But I would still like to have a clearer sense of the long-term picture as soon as we can, even if we choose not to implement it all at once. I'm fine with bringing back the rest of the value over time, but I would still worry if we try to design each increment of remaining expressiveness independently and risk continuing to leave these larger questions lingering in the background. It would be much more satisfying to have at least tried to get to a complete proposal we all like sooner rather than later.

I noticed that we don't seem to be very careful at all when using cadlTypeToJson that the resulting object has correct structure. Wrong type of nested properties like that should also generate diagnostics. If we don't have this soon, we should add some helpers to do the validation.


Import ceil

Fixes #636

Some unrelated win bug appeared... Will take a look tomorrow.
PS: what target are you using? Qt wrapper was working without cmath just fine.

Those are the commands that ended up being used:
# download deps
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"

# build C API
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --workspace --frozen --release --all-features

# build viewsvg
cd tools/viewsvg
qmake PREFIX="$pkgdir/usr"
make


Add warning to yotta link command reference

On windows, yotta link creates directory junctions inside yotta_modules.
Some tools (known to include at least git-bash's rm -rf) will traverse these when removing files, potentially causing the unexpected removal of files.
The docs should include a warning about this.

+1000. rm -rf deletes things, but rmdir /s /q works just fine.

If rmdir works fine, I suspect that this should also be filed as a bug against msys's rm command?

Good point, yes. Not exactly sure where I got my rm from though :) But I think this issue happened to a number of people using different versions of rm.


can rust don't use colon for a statement?

hello ,rust!
now ,as a modern language, like groovy kotlin, and also in js, the colon is optional,this feature will be really convenience of programers.so if it is possible in rust,the colon is optional?
thanks a lot.

Do you mean the semicolon? It's absolutely needed. The lack of it means it's a value returned from a function and this aspect of the language was determined long ago. Changing this syntax would be a major breaking change and one that wouldn't be worth it at all to have.

The lack of it means it's a value returned from a function

To be clear, the lack of it means that a value is an expression, rather than a statement. If the expression is in the tail position, then it becomes the return value.

Ah yes thanks for the clarification for that one.

@mgattozzi  Thanks a lot,I understand, "the lack of it means that a value is an expression, rather than a statement",so the colon is significative,not like other language ,just split a statement(sometimes can be omitted).


Improved display of tags & pairs

Right now, when inspecting an entity, jabby displays all values in a table like Key | Value, but I think tags & pairs in jecs could benefit from being displayed separately since the Value part is always tag.
Maybe it could be in a separate list below the normal data, similar to how the properties widget in studio displays CollectionService tags.

Implemented with https://github.com/alicesaidhi/jabby/commit/cdbd4bf768becb439d451eaec57b5e979554a766


Link to Code of Conduct is broken

Description
 The link to Code of Conduct in the contributing.md is broken and displays not found.
Screenshots/testimonials

Image1
Image2
I can fix it if you would like ?

Go for it @Ampit


abstract task struct

why do we need this? add info to PR description. we already have PDDLEnvs which worked without this. also, many many things would need refactoring with this, such as task_plan only needing to take in an abstract task instead of an init_atoms and a goal (this pattern happens many other places too)

it's convenient for forthcoming PG3 code. I agree that many things would be refactorable. is your feeling that we should just not do this then, and use tuples of object, atoms, goal where I need them?

yeah i feel like that's better unless we're planning to properly refactor things to use this, otherwise it's confusing to have this while also having all the old code that uses those tuples (objects, atoms, goal)


"jquery not defined" breaking board view

I uploaded the theme to my plugins folder. Now, when I view the board, it's mostly blank. There's an error in the console:
ReferenceError: jQuery is not defined[Learn More]
kb-scripts.js:9:1
<anonymous>
https://squeakface.com/plugins/Themeplus/assets/js/kb-scripts.js:9:1

When I click on that file name, I see the following code:
(function($){

    $(document).ready(function(){
        $('#menu-switch').click(function(){
            $('.sidebar').toggleClass('active-mobile');
        });
    });

})(jQuery);

I got a different error, but the same result.
Using this fork of the theme solved the issue: https://github.com/ylorant/kb-themeplus-stgray

Can confirm that the forked project fixed the "jquery not defined" error.
https://github.com/ylorant/kb-themeplus-stgray
Great work all around, very clean and responsive theme, this should be the default theme.
Make sure to delete any Themeplus folders you may have have in your plugins directory, simply renaming will not work, it throws a 500 error.


Add support for binding IEnumerable

While the ConfigurationBinder has support for binding arrays (T[]) and types that implement ICollection<T>, it seems to be missing support for just binding IEnumerable<T>. This could be the same process as binding arrays - just back the IEnumerable<T> with the bound array.

IList<T> would also be beneficial.

Lump https://github.com/aspnet/Configuration/issues/393 into this bug as well


Renaming file does not fix module import

__init__.py
celery.py

celery.py:
import celery
celery.Celery('tasks')

Hover over 'celery', result as expected

Now rename celery.py to something else
Hover does not change to global celery module despite
[Error - 9:45:42 AM] One or more errors occurred. (failed to parse file file:///c:/Users/.../Documents/PyTest4/celery.py)

Reloading window (restarts LS) fixes it

Does renaming it send any sort of message? Right now this looks like a VSC issue.


Question: When to release the code?

Hi, I saw the code is not public according to the architecture doc here https://hybridbackend.readthedocs.io/en/latest/architecture.html
Do you have a plan to open source it? Or is it just focused on data io?
I'd appreciate it if anyone could help me.
Thanks :clinking_glasses: :beers:

cc @2sin18

Thanks for asking. The next major version is planned to release on late Feb, 2022, but no final date has been set yet.


Added Example: If Case (Enumeration Case Pattern)

I don't know if this is the appropriate section.

Awesome, thanks!


No file uploaded error message

I received this error on the web service. I believe the server has just filled up again. Thanks in advance!

Thanks for letting me know. The server had filled, but I was able to clean
up some space so things are working again.
Good luck!
Mike
On Thu, Nov 30, 2023 at 3:28 PM Austin Chipps @.***>
wrote:

I'm having the same issue..
—
Reply to this email directly, view it on GitHub
https://github.com/schatzlab/genomescope/issues/115#issuecomment-1834507555,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABP343KEW6YQNOZWAD3R2TYHDT5FAVCNFSM6AAAAAA77ZQOUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZUGUYDONJVGU
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Great, thank you!
Best,
Jackson


Json format error in zh-Hant.json

Hi,
Missing one comma at the end of line 431 in file zh-Hant.json

Latest master don't have this problem


obsidian plugin: drawing cursor disapearing when using wacom one table pen

Something weird happens when I use the Obsidian Excalidraw plugin (version 2.1.7).
When I use any Wacom pen tablet ( like https://www.wacom.com/en-us/products/pen-tablets/one-by-wacom) the Draw cursor doesn't appear. The problem happens only with the draw cursor (as seen in the video below). During the video, I started using the trackpad from my computer, and then the cursor appeared. The cursor appears for every other tool, Rectangle, Diamont, Circle, etc.
https://github.com/excalidraw/excalidraw/assets/288272/e1c3b83a-7031-4f0b-b170-29e057437c15
Another point: the problem only happens on the Obsidian plugin. The problem doesn't appear on the desktop app or the web interface( excalidraw.com).
Any insight about what could be happening?

Hi. Usually this is the default behavior of tablets, but it's strange it only does that for the freedraw tool.
But, since it only happens in Obsidian, can you please open an issue in the plugin repository? https://github.com/zsviczian/obsidian-excalidraw-plugin/issues 🙏


Spyder 1.1.3 + winpdb 1.4.6 + PythonXY <IP_ADDRESS> - does not launch winpdb using F8  in Spyder

From<EMAIL_ADDRESS>on 2010-08-01T08:47:28Z
What steps will reproduce the problem?
1.Install PythonXY, Install Spyder 1.1.3, Install winPDB 1.4.6
2.Open script in Spyder
3.Press F8 to launch winpdb with script What is the expected output? What do you see instead? I expect to see winpdb launch. I see a console flash and nothing happens. What version of the product are you using? On what operating system? Spyder 1.1.3, winpdb 1.4.6, PythonXY <IP_ADDRESS>, Windows 7
Please provide any additional information below
. Worked with previous version of all tools.
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=258

From pierre.raybaut on 2010-10-17T13:03:02Z
Status: Done


Start the stack trap earlier for daemon

That way we can get stack dump earlier if there is something that
locks the daemon during start/restore phase.
/cc @thaJeztah @cpuguy83 @vieux @tonistiigi @tiborvass
🦁
Signed-off-by: Vincent Demeester<EMAIL_ADDRESS>

SGTM

LGTM

LGTM


403 error when attempting to download csv

When attempting to use this package, I am receiving the following error:
Trying calling getCSVUrl, attempt #1 out of 3 Scheduling download of CSV from https://onesignal.s3.amazonaws.com/csv_exports/*****.csv.gz
After failing for the third retry, I am given a dump of the config array, which I can provide if needed.

After looking around a little more into this, I feel that it is due to the number of subscribers I have, and the time it takes to generate the CSV file.
After setting backOff to 30seconds, It seems to have improved it a little. I'm now able to download the CSV within the default 3 attempts.
Rather than upping the backOff limit the more subscribers we have, would there be a better way to approach this?


bug:  children must be keyed

Affected Packages

[ ] @yeger/eslint-config
[X] @yeger/vue-masonry-wall
[ ] @yeger/vue2-masonry-wall
[ ] vecti

Description
I'm using vue-masonry-wall with TransitionGroup of Vue 3 because I need to add an animation each time that I delete or add a Card.
It doesn't works becouse TransitionGroup require that childs have an unique id, this is the the warning in console:

My code is like that:
`

        <masonry-wall :items="projects" :gap="16">
          <template #default="{ item, index }">

{{ item.title }}

{{ item.category }}

          </template>
        </masonry-wall>

      </TransitionGroup>

`
How can I fix that and add the :key?
Reproduction
Add masonry-wall component inside the TransitionGroup component
Additional context
No response
Preferences

[ ] I want to be assigned to and work on this issue myself

All elements of the masonry-wall are properly keyed.
While I don't have experience using TransitionGroup, its docs seem to imply that its immediate children need to use v-for and be keyed. Hence, you'll need to add a :key to masonry-wall. However, I don't think this will (or even is able to) animate the items of this library. That's just not how the transition group works.

I tried to use a "fake" :key with a Math.random(), it seems to fix that but I tried also other library, this is a common problem, so I fixed that building a "Masonry" effect with grid + TransitionGroup.


add MachineConfiguration conditions for boot image updates

This PR adds a few new MachineConfiguration conditions, which will be used by the MSBIC to inform the user of the results of the boot image reconciliation loop. These conditions will be behind the ManagedBootImages feature gate.
More info:

Failure conditions for boot image updates

I do have an open question. If boot image updates are disabled(which is possible via the opt-in mechanism), none of the conditions are exactly applicable. Should I make a specific condition for the "Off" state, and set it to true?

Chatted with @deads2k on slack, and we boiled this down to two conditions:

BootImageUpdateDegraded. This can be a failure mode in the controller loop or a user mis-configuration. This will flip co/machine-config to degrade.
BootImageUpdateProgressing - A boot image update is ongoing. This will flip co/machine-config to progressing.

All of them should include progress counts of the machinesets, and the generation info of the source configmap. If neither of these conditions are true, this means that the controller is in a happy/done state.

I do have an open question. If boot image updates are disabled(which is possible via the opt-in mechanism), none of the conditions are exactly applicable. Should I make a specific condition for the "Off" state, and set it to true?

Boiling it down to two conditions has helped with this too; as there we are no longer tracking a success state, the other two conditions being false feels valid when the feature is "off" as well.
Also to make a note: The MCO team will consider implementing something like PoolSynchronizerStatus for this in the future

/lgtm
/approve

/tide refresh


restartround should reset the lobby timer

I'm trying to start suspicion and every time I restartround or endround it just immediately starts sandbox so I can't forcepreset :\

Okay turns out forcepreset starts the game when it should PROBABLY not.


Add Request.destination recipe to Workbox guides

This is a follow-up on https://github.com/GoogleChrome/workbox/issues/1606.
What's changed, or what was fixed?

Adds an example that showcases leveraging Request.destination for Workbox routing

Fixes: https://github.com/GoogleChrome/workbox/issues/1606
Target Live Date: 2018-11-15

[ ] This has been reviewed and approved by (NAME)
@jeffposnick, please take a look.

[x] I have run npm test locally and all tests pass.

[x] I have added the appropriate type-something label.

[x] I've staged the site and manually verified that my content displays correctly.

CC: @petele

:tada: This has been pushed live to https://developers.google.com/web/


Bump version to 12.8.0

https://trello.com/c/4iKDzhBY/417-separate-saving-a-change-from-the-creation-of-a-preview

I've got a feeling you need to run a bundle to update the Gemfile.lock of the app otherwise Heroku apps don't build.

Thanks @sihugh :-). One day I'll remember this!

Superseded by https://github.com/alphagov/govuk_publishing_components/pull/622.


Question

Still working on this project?

it works so I'm not doing a whole lot but happy to help you out or consider features.   what do you need?

I'll go through the code for now, will take some time probably since there's quite some code to go through :) but probably I'll have some questions :) also will write my own web layer with Javascript only. I have an embedded Linux touch panel which I plan on using for operating the whole late, since entire electrical cabinet needs some work.

there is quite a bit of cruft so feel free to ask questions.  A lot of unused code from some abandoned ideas that I did not bother to clean out (not much engagement from users).  The json should be fairly straight forward but it was not exactly planned out.  There is an "status" json doc and a "state" doc.  the web UI sends commands, the controller evaluates them and updates state and propagates that state back to the web UI.
i'm not using any buttons or the display code since the webUI was good and responsive and easier to work with.  this is a big chunk of the cruft, I was assuming it may be useful to someone else but I never really liked the code.
also the config is a bit sprawling and there are likely lots of unused configuration variables so sorry about that.
There is a closed issue here that has a bit of documentation about the setup that may also help you.
All that said it works great and I've had no problems using it on a phone or tablet.

Yes, I started reading through the issue where you placed a lot of valuable info :) I was wondering if you are using any logic level shifter for converting your signals to 5v?

nope, 3.3v seems to work fine form most stepper drivers i've used.  the esp32 grbl fork uses i2s and shift registers to get 5v along with additional axis (6) with less pins.  It seems to work well but would be a bit of work to move.

I've seen you mention in several places, you would use esp32 grbl for els? I have a slightly large older lathe, stepper I plan to use is 12nm nema42. Min voltage for the controller is 5v so I ordered some level shifters since I don't have any optocouplers around.

not quire sure what you are asking, esp32 grbl does not support spindle sync.  I'd use it if it did though but I don't' believe bart has any plans to add that as a feature.

Yea that was what I meant but I did not know there is no spindle sync.
Actually i just checked and it is on the roadmap but marked as --Not on near term roadmap now-- so probably won't happen any soon.
Once I have the parts here I'll build some testing environment and give your version a try and piece by piece trim the code. If you don't want to have this as an open issue, you can close it or we can keep it open and I'll pop something here once in a while.

we can keep it open.  i may add NVRAM storage of configuration this week.

I've added a bunch of stuff and done some cleanup.  Wondering if you are up for discussing the UI?

Just checked your latest commit, tnx for the cleaning :) How can I help you?

Just looking for some feedback on the UI.
Here's the reworked version
**

**
The pitch settings are in the "jog settings" button.  The "enable rapid button toggles" are a bit unsightly but I think it would be good to keep a rapid direction locked out so you can only rapid "back" to where you started.  They are big because I use a tablet touchscreen to run the lathe (phone works well also).
I worked a bit on rapids and I'm just not sure how to deal with acceleration.  Right now it is just slaved to the spindle with no acceleration.  If you tell it to "rapid" with the spindle off and then turn the spindle on the motor will ramp with the spindle acceleration.  If the spindle is running and you "rapid" too fast the motor will stall.  Since all the motion code is slaved to the spindle i'm not really sure how to "make up" for a spindle that is already running.  A closed loop stepper deals with this much better than an open loop stepper since it will make a "best effort".  I put in accelstepper but it has problems running in an RTOS task.  There is a very promising fastaccelstepper lib but it uses the MCPWM peripheral and command queues and I'm not sure I can get the spindle sync code working with it.  So long story short rapids are based on a rapid pitch slaved to the spindle and there is a chance you set it too high for the current spindle RPM and you motor stalls and you loose position.
I also have a "mode" lockout, when it starts it sets the mode to "startup" and you have to set it to "slave jog mode" in the UI to unlock it.  This is somewhat of a safety feature but since you have to click on the jog tab it may not be needed.  wondering if this is something you'd want.  I was also planning on locking out the debug functions unless you set it to "debug mode".

This is the new NV ram screen (with the old status display).  Wondering what you'd want to persist in the EEPROM?  I plan to put in the UI update rate and a few other things.  I'm not yet planning on pin remapping via this but that may be possible.
For threading i hacked in an "offset" that moved Z just a small amount but I think I should just make the spindle "start" point settable to a relative distance or angle.  This would make threading without a compound easier and it would allow for multi start threads.
Finally i'm working on a "bounce" mode that will feed a direction and automatically bounce back to the starting position via a rapid.  This is 90% of your lathe cutting and it would be handy.  Wondering if I implement it in the UI or add it to the controller and manage it via the state machine.

Assuming you are using your tablet in landscape mode, most of the features that are needed could be placed in one main(home screen) and everything else can be kept away if they are not meant for operation itself(threading/feeding).

I still don't have my hardware yet, so I do not have the web server running to get the response, but from what i see, react is too heavy for such simple control unit. Combination of SVG's(optional) and JS/HTML/CSS should be more than enough and more lightweight.
WS does not need any framework to run, most of the time I use plain WS with Javascript and its sufficient. Nevertheless, I'll give you proper feedback once I have my test setup ready.
My initial plan was to control my lathe entirely via web application. As I said earlier I have an older lathe that also has a dedicated oil pump, light, coolant pump. So ideally I'd strip the web layer completely or move it to a different interface.
But I'd still like to help you with this version and the web layer also.
Regarding to motion being slaved to the spindle, instead of slaving everything to the spindle, creating a state machine that tasks spindle(encoder) and motion(stepper) in separate cores and purpose of core0 in this case can be only constantly tracking the position and if position is not changing(spindle off) taking an acceleration or rpm base from configuration to the rapids. To make sure that there is no jumping issue if you turn on the spindle while a rapid is happening, you can monitor the rpm and adjust only when it is stabilized for a certain duration. ofc considering all those happening only in feed mode. if you are in threading mode, your base is always encoder output(not slaved but dependant)


Specify function arguments to get parser

For organizational purposes (that have to do with 'overloading' in the research code, details not important), I would like to do:
import argparse

def myfunction(return_parser_and_quit: bool = False):
    parser = argparse.ArgumentParser()
    # ...

    if return_parser_and_quit:
        return parser

such that the documentation would be something like
.. argparse::
    :module: foo
    :prog: myfunction
    :func: myfunction
    :kwargs: "return_parser_and_quit = True"

(or whatever other convenient syntax)

This seems very niche, and the ability to create args is limited/difficult to do securely
I would suggest you create a function for doc purposes that calls your function with the requested args