TypeError with protobuf 3.0.0, protobuf 3.0.0b2 works

With the current master on Ubuntu 16.04.2 LTS I get:
# python openbazaard.py start --help
Traceback (most recent call last):
  File "openbazaard.py", line 11, in <module>
    from api.ws import WSFactory, AuthenticatedWebSocketProtocol, AuthenticatedWebSocketFactory
  File "/root/OpenBazaar-Server/api/ws.py", line 17, in <module>
    from dht.node import Node
  File "/root/OpenBazaar-Server/dht/node.py", line 8, in <module>
    from protos import objects
  File "/root/OpenBazaar-Server/protos/objects.py", line 17, in <module>
    import countries as countries__pb2
  File "/root/OpenBazaar-Server/protos/countries.py", line 36, in <module>
    type=None),
  File "/usr/local/lib/python2.7/dist-packages/google/protobuf/descriptor.py", line 652, in __new__
    _message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors should not be created directly, but only retrieved from their parent.

pip install protobuf==3.0.0b2 fixes this (pointed out by @clehner at #326). Getting back to protobuf==3.0.0 brings the error again.

Confirmed, 3.0.0b2 resolved this for me. 2.4.1 had some other error. Commands:
sudo -H pip uninstall protobuf
sudo -H pip install protobuf==3.0.0b2

It doesn't fix it for me.

I tried Installing via Digital ocean using https://openbazaar.zendesk.com/hc/en-us/articles/207852873-Guide-to-Setting-up-OpenBazaar-Server-on-a-VPS and I got the following error
Traceback (most recent call last):
 File "openbazaard.py", line 11, in <module>
   from api.ws import WSFactory, AuthenticatedWebSocketProtocol, AuthenticatedWebSocketFactory
 File "/home/user/OpenBazaar-Server/api/ws.py", line 17, in <module>
   from dht.node import Node
 File "/home/user/OpenBazaar-Server/dht/node.py", line 8, in <module>
   from protos import objects
 File "/home/user/OpenBazaar-Server/protos/objects.py", line 17, in <module>
   import countries as countries__pb2
 File "/home/user/OpenBazaar-Server/protos/countries.py", line 36, in <module>
   type=None),
 File "/usr/local/lib/python2.7/dist-packages/google/protobuf/descriptor.py", line 652, in __new__
   _message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors should not be created directly, but only retrieved from their parent.

running the following two commands fixed the issue
sudo pip install protobuf==3.0.0b2
sudo pip install requests=2.13.0


[8.x] Simplify encryption mac validation

This started as a discussion (https://github.com/laravel/framework/discussions/33691), but all necessary information is mentioned in this PR.
Currently, Illuminate\Encryption\Encrypter.php uses two different measures to defend against timing attacks when performing MAC (Message Authentication Code) validation.

It uses hash_equals(), which is a timing safe string comparison function that was added in php 5.6.0.
It uses a randomized double HMAC technique.

This PR simply removes (2) since (1) should be sufficient. See for instance this article which explains both methods and also mentions that (1) is preferable where available. I'm guessing (2) is still there for historic reasons (secure implementation before php 5.6 was required).
The changes are non-breaking and only affects the validation side. The validation is performed in a simpler way by re-caculating the deterministic MAC and comparing with the received value.
Why making this change?

Performance is improved by removing two hash_hmac() computations and one call to random_bytes() for each MAC validation. This might be negligible in applications and no performance measurements are provided here, since performance optimization is not the main point of this PR. If requested, I can try to make some comparisons.

The MAC validation code is simplified quite a lot. Since Encrypter.php implements cryptography, simplicity and clarity is very important. Using built-in well-tested functionality and avoiding custom implementations is key in cryptographic implementations.

Since the current implementation is not insecure, I would only like to change this with input from a cryptography expert. As you noted on the discussion, you are not sure if the current code is needed or not.

I understand and I agree it's best to wait with changing this until such confirmation.
I will re-submit this if/when I have better references.

(I give the cryptography course at Linköping University where one of the topics is timing attacks. I've published research papers on Almost-Universal-2 Hash function families, although not on timing attacks in particular. I don't know if that counts as being knowledgeable on the issue.)
I looked at the code, and the only use for the double hash is precisely to make the comparison time independent of the actual payload mac, iv, and value. The hash_equals() function is already constant-time so it is better to use that.
I agree with the post that Martin links to: "If your programming language provides a solution to timing leaks (e.g. hash_equals() in PHP 5.6.0 and newer), use that. Otherwise, consider a Double HMAC Comparison strategy with a random key." Note the "Otherwise". There is no need to do double hashing here.

Interestingly enough, I found this thread on crypto.stackexchange.com with almost the exact same question for Laravel specifically, sorry I didn't see this earlier: https://crypto.stackexchange.com/questions/22470/performing-hmac-with-random-key-before-mac-comparison
I am not aware of anyone recommending both, which is pointless (they prevent the same attack) and costs even more than double HMAC - its main downside compared to constant time comparisons. - otus
There is also a reference to the commit that added the Double HMAC comparison, and it was added before the introduction of hash_equals: https://github.com/laravel/framework/commit/c3e6e84229f790077b9a2b43976d326f6ef12b24 (The comparison before that commit was indeed not timing-safe). When hash_equals was later introduced (replacing StringUtils::equals which may or may not have been timing-safe), the Double HMAC technique was kept.
Based on the input from @janakelarsson and the answers on crypto.stackexchange.com, hash_equals is today sufficient and the extra work of the two hmac calculations (resulting in four sha256() and some additional work) can be avoided.
Note that the following comment on crypto.stackexchange.com is of course given that the runtime doesn't (php does) provide a built in constant time comparison more reliable (and "simpler") alternative to constant time comparisons.


chore(main): release pixels 0.27.1

:robot: I have created a release beep boop
0.27.1 (2024-11-11)
Bug Fixes

pixels: add theme prop to Json component (53b915a)

This PR was generated with Release Please. See documentation.

:robot: Created releases:

pixels-v0.27.1
:sunflower:


Calico upgrade through operator doesn't remove deprecated k8s resources.

Expected Behavior
PSPs are removed from k8s 1.24 to 1.25. I upgraded calico from 3.25.0 to 3.28.1 using the operator by running:
 kubectl apply --server-side --force-conflicts -f https://raw.githubusercontent.com/projectcalico/calico/v3.28.1/manifests/tigera-operator.yaml

in my k8s 1.24 cluster. I was expecting the deprecated/retired resources/objects (PSPs) to get deleted automatically as they are no longer supported in new versions, but the resources are still there.
Current Behavior
Resources are still there:
kubectl get psp | grep calico
Warning: policy/v1beta1 PodSecurityPolicy is deprecated in v1.21+, unavailable in v1.25+
calico-kube-controllers      false          RunAsAny   MustRunAsNonRoot   MustRunAs   MustRunAs   false            configMap,downwardAPI,emptyDir,persistentVolumeClaim,projected,secret
calico-node                  true           RunAsAny   RunAsAny           MustRunAs   MustRunAs   false            configMap,downwardAPI,emptyDir,persistentVolumeClaim,projected,secret,hostPath
calico-typha                 false          RunAsAny   MustRunAsNonRoot   MustRunAs   MustRunAs   false            configMap,downwardAPI,emptyDir,persistentVolumeClaim,projected,secret

It seems the controller did get updated correctly to the latest image, so I am indeed in the latest calico version:
kubectl get pods -n calico-system -o yaml calico-node-srsql | grep image -i
    image: docker.io/calico/node:v3.28.1

Possible Solution
Manually removing all those resources? I am not sure what can happen and I don't want to leave some other cruft dangling.
Your Environment

Calico version 3.25.0 to 3.28.1
Orchestrator version (e.g. kubernetes, mesos, rkt): k8s (EKS)

IIUC, tigera-operator creates PSPs only if the cluster its installed on supports them.  It looks like while they are deprecated in your cluster, they still work, so operator maintains them to provide maximum compatibility.

I upgraded calico from 3.25.0 to 3.28.1 using the operator by running:
...
in my k8s 1.24 cluster

As per https://docs.tigera.io/calico/3.27/getting-started/kubernetes/requirements#kubernetes-requirements, Calico v3.28.1 does not support kubernetes 1.24.  You need to upgrade that.
In fact, it looks like the PSP support detection (and PSPs in general) were removed entirely in https://github.com/tigera/operator/pull/3374, because newer versions of operator do not support versions of kubernetes that have PSPs.


Type jar is default

type jar is default and must not be set
Signed-off-by: Stefan Eicher<EMAIL_ADDRESS>(github: stefaneicher)

You have accidentially included two other commits in this PR. Could you rebase your branch?


Teradata-BigQuery validation with json config

I am trying to compare a Teradata table (source) with a BigQuery table (target) using a json file as configuration.
Json used is the following:
{     "type": "Schema",     "source_conn":          {             "source_type": "Teradata",             "host": "<host>",             "port": "<port>",             "user_name": "<user_name>",             "password": "<psw>"         },     "target_conn": {         "source_type": "BigQuery",         "project_id": "<project_id>",         "google_service_account_key_path": null     },     "schema_name":"<source_schema>",     "table_name":"<source_table>",     "target_schema_name":"<target_schema>",     "target_table_name":"<target_table>",     "result_handler":{         "type":"BigQuery",         "project_id":"<project_id>",         "table_id":"<table_id>"     },     "exclusion_columns": [<list_of_columns_to_exclude>] }
For BigQuery tables, we have set as target_schema_name "project_id.dataset" and as target_table_name "table_id".
For Teradata, we have set as schema_name the teradata dataset name and as table_name the table name.
Unfortunately, I got the following error:
pandas.errors.DatabaseError: Execution failed on sql ' HELP COLUMN **_table_name_**.*;     ': [Version <IP_ADDRESS>] [Session 676412] [Teradata Database] [Error 3807] Object '**_table_name_**' does not exist.
NB: bold and italic words are our hidden table names.
How can we add the Teradata dataset name in a json as configuration?
Thank you.

Elena,
Not a direct answer to your question - since I am not familiar with the json config capability myself. However, this might be useful. We recently (Oct 16!) implemented a capability to pass JSON parameters which are directly passed along to the teradatasql library.
Check the documentation here and see if you can use that to pass parameters to the library.
If this is useful please download the latest develop branch to try this feature.
Thank you for using DVT.
Sundar Mudupalli

Hi @elena-gottardi-nttdata! You did it correctly actually, below I show you an example of it.
So I'd recommend you to make sure you're passing the Teradata's database name in the right capitalization (lower/uppercase), if no line break is being added by mistake, as well as making sure the database you're passing really contains the table name you're listing.
Regardless, let us know if even after checking all of it you still have problems, so can further investigate!
$ data-validation validate column -sc teradata -tc teradata -tbls Sys_Calendar.CALENDAR
{
    "type": "Column",
    "source_conn_name": "teradata",
    "target_conn_name": "teradata",
    "table_name": "CALENDAR",
    "schema_name": "Sys_Calendar",
    "target_schema_name": "Sys_Calendar",
    "target_table_name": "CALENDAR",
    "labels": [],
    "threshold": 0.0,
    "format": "table",
    "result_handler": None,
    "filters": [],
    "use_random_rows": False,
    "random_row_batch_size": None,
    "filter_status": None,
    "aggregates": [
        {
            "source_column": None,
            "target_column": None,
            "field_alias": "count",
            "type": "count"
        }
    ]
}

And thanks @sundar-mudupalli-work for mentioning the new feature!


Unable to see some files/folders in visual code explorer

VSCode Version: 1.3.1
OS Version: Windows 7 Entriprise - Service Pack 1

Steps to Reproduce:

I'm running the application in an virtual machine in a restrict access environment.
The project is versioned using SVN.

Some files and folders inside the Project Files Panel are not being displayed... I've tried to delete .vscode folders to check whether it was a configuration/cache issue, but nothing I've done has solved the problem. Opening the same project in atom has worked perfectly.
Unfortunately, I can't paste here any log or file, as the Visual Code is running in an restrict environment which I can't extract any file.

@geversoncarvalho what do you mean by 'Project Files Panel'? VS Code's Explorer:

Yes, exactly... The explorer is not displaying some files and when I opened one of these files through the File > Open File, the 'invisible' file becomes visible in the explorer until I restart the Visual Code. I tried several approaches as reopen the folder through File > Open Folder or removing .vscode folders, but nothing solved the problem.

@geversoncarvalho could be a permission problem. are these files files or folders that do not show up? do you see output printed to the developer console (Help > Toggle Developer Tools).

The Developer Tools didn't display any log, but after File > Close Folder and File > Open Recent > ..., the folders returned to the Explorer... I don't know exactly what was the problem's cause, but at least it working fine now. Thanks anyway.


Breaks link rendering

I'm trying to use this and links on the same editor. The links are created and stored correctly, but they aren't rendered. They render correctly when I remove the Autocomplete component and put all the props back onto the Editor component.
Aside from this, Autocomplete is working great!

I have a feeling it might be somthing to do with this:
https://github.com/Backelite/draft-js-autocomplete/blob/master/src/index.js#L92-L111
It looks like it completely replaces the decorator on the editor state. It would be great if it instead merged with the existing decorator, or if there was a prop that would let us pass an array of decorators that would be merged in with Autocomplete's ones.


X session won't wake up w/ power button press after screen turns off

We can wake up the device by touching the screen, because it moves the mouse. Controls generally seem completely wrong in sxmo, while working correctly in swmo.

This is a device-specific upstream bug, see here.
On the pinephone pro the power button was getting disabled with xinput instead of the touchscreen.


No response from music commands.

Hi, I wanted to play music with Nadeko so I set it up to host myself.
I've got the bot on my server and everything seems to work except for !m commands, which don't seem to be doing anything at all for me. No response from Nadeko in chat or anything in cmd.
I have ffmpeg set up correctly as far as I know (ffmpeg in cmd gives a response).
I've tried restarting Nadeko/my pc but still having the same problem, my first time using anything like this so no idea what I could be doing wrong :(

Did you set up all API keys?
Are you using !mq command?

I'm dumb :( I was copying the commands exactly from the wiki, I didn't think to try without a space, was using "!m q" "!m dv" this whole time, just tried "!mq" and "!mdv" and it worked. Thanks

No problem. :] Enjoy!

@Infectious99 keep in mind recommended way is to go to data/config.json and change your music prefix from !m to !!


v1.1.25

This repository contains GitHub workflows for managing releases automatically.
Please name this issue what you would like the new release to be called. E.x. "v1.0.0"
The following slash commands are available to use in comments on this issue:

Command
Description
Parameters

/release
Creates a new released based on the current state of the master branch
frontend=<version>backend=<version>gitapi=<version>status=<version>dispatcher=<version>agnosticv=<version>anarchy=<version>poolboy=<version>

/promote
Promotes the created release to the next environment
N/A

/cancel
Cancels the current release (and closes this issue)
N/A

/finish
Completes the current release (and closes this issue)
N/A

/release frontend=v1.1.18 backend=v1.0.16 gitapi=v1.0.14 status=v1.0.0 dispatcher=v1.0.13

/promote

/promote

/finish


fix raft snapshot

fix raft snapshot
1.close engine
2.remove engine data
3.trigger snapshot copy dump file
4.re build engine
5.load dump file

fix raft snapshot


Provide a way to specify inverse link relationships.

In my use case, I need bidirectional communication between containers while setting -icc=false.
The newly introduced -link option allows to set a one-directional parent-child relationship between an already running container (the child) and the container being started (the parent). When starting the parent, I need to be able to tell docker that the child shall be able to access the parent as well. Clearly, service discovery through environment variables would not be possible in this case, but allowing network traffic should be enough.
I propose to add an additional option (in the form of -invlink, -allow, or similar) which takes a container ID/name and sets up a child-parent relationship.
Implementation wise, this would be the same as calling the Link.toggle method with parent and child inverted.

This is necessary for dockerizing zookeeper ensemble

Hi all, there is a sprint underway to upgrade the networking model of
Docker. Among other features it will allow for arbitrary grouping with
2-way discovery and connectivity. This is a collaborative effort with
various projects and companies in the Docker networking space: Socketplane,
Weave, Docknet, VMWare, Cisco etc.
It's still early but there's an IRC channel if you're interested in joining
the fun: #docker-network on Freenode.
On Thu, Jan 8, 2015 at 5:57 AM, Laurynas Tretjakovas <
<EMAIL_ADDRESS>wrote:

This is necessary for dockerizing zookeeper ensemble
—
Reply to this email directly or view it on GitHub
https://github.com/docker/docker/issues/2588#issuecomment-69181735.

For the time being, until this feature is implemented in a proper/fancy way upstream (docker networking 2.0), you guys can maybe use two-ways stateful linking as I implemented it in docker-fw:
https://github.com/gdm85/docker-fw#two-ways-linking

:+1:

+1

+1

You can create bidirectional links using a custom tiny DNS server. So instead of this
serviceb:
    image: username/serviceb

servicea:
    image: username/servicea
    links:
        - serviceb

Try this
dnsdock:
    image: tonistiigi/dnsdock
    volumes:
        - /var/run/docker.sock:/run/docker.sock
    ports:
        - <IP_ADDRESS>:53:53/udp
serviceb:
    image: username/serviceb
    dns: <IP_ADDRESS>

servicea:
    image: username/servicea
    dns: <IP_ADDRESS>

You can access the services with: <container-name>.<image-name>.docker hostname.
You can check <container-name> and <image-name> after docker-compose up in dnsdock logs.

Closing as this is now handled by the new service discovery added in #14051

@cpuguy83 do you see the container linking stuff going away eventually too?

@duglin --link utilizes the new services backend.

@cpuguy83 excellent - I didn't realize that.  Very cool.

@duglin So with the new service discovery is it possible to do this in docker compose?

Sorry to resurrect an old issue, its the top result on google at the moment. Did this feature ever make its way into a release? The pull referenced above has been merged but links are still one-directional.

@sampeka links are unidirectional. For bi-direcitonal the containers must share a common network, then you can reach them by name, network alias, or even by link-alias (which is container-local).


Add login key to cache after world login

See: https://github.com/solero/dash/issues/39

Nobody plays club penguin for 12 hours straight, right? :clueless:


buku: make bukuserver optional

Motivation for this change
bukuserver (an optional web GUI frontend for buku) depends on a large number of flask packages, which break in nixpkgs very often - I've been forced to remove buku from my system closure at least a couple times a year at this point, even though I have no use for this web interface. It currently does not build, which means buku cannot be used at all.
Once #156188 (or something similar that fixes flask-admin) is landed, it will at least build and can be turned back on by default - though with buku being primarily a command-line tool (plus optional browser extensions that can serve as an interface too), it seems unlikely that a majority of users even use this interface to begin with? We could also maybe consider adding pkgs.bukuserver rather than building them both together.
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
22.05 Release Notes (or backporting 21.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[ ] Fits CONTRIBUTING.md.

cc @dermetfan, do you still use this?

cc @dermetfan, do you still use this?

No, never really did, I just noticed the broken package when checking out buku at the time. I agree with this change.


updates API with Designated and Unavailable initializers

@d9chen this should update the API accordingly for better access with swift.

Hey @2020Deception, thanks for this! We're in the middle of overhauling this library to move from v2 of our public API to the new version, so unfortunately there'll be some changes. I've gotten all the PRs up now (#47, #48, #50, and #51) so hopefully that will be wrapped up within a week or so.
When that's settled I'll be able to take a look at this for you!

Hey @2020Deception, everything has settled down now and the transition to the v3 API is complete :) Feel free to rebase this!

@SSheldon @d9chen


Access Policy Runner Story

Problem:
Access Policy had no Runner stories.
Solution:
Added story runners for Access Policies. This also requires that the Runner be
independent of the archivist instance. i.e. one must create archivist instances
from the runner.
Signed-off-by: Paul Hewlett<EMAIL_ADDRESS>

Too old to rebase - will keep the branch as a source of ideas


Adding Tribler's Chapter

@rogierslag
We used your feedback to rewrite certain elements of the chapter, though the Radon-related metrics were such a large section of the chapter that we decided to keep those in. Could you check whether the quality is high enough for it to be added to the book?

Looking good, I'll let @avandeursen also take a quick look before merging

Closing as per email discussion.


404 at /compose/swarm/overview.md

I found a broken link : https://docs.docker.com/compose/swarm/overview.md

@szvictdo
Thanks for reporting the broken link issue. Could you let us know how you arrived at the broken link?


Improvements

This change is

These all look like good fixes, is there a reason why you closed the PR?


UST shows up in-game, but does not play

I made a UST for P-2's clean track, and it does not play, yet it still shows in the menu. I checked it using a JSON validator and it passed. What is the issue?
Here is the .ust file:

And here's a screenshot of the folder:

On a lighter note, the .png also does not show in the menu and is just a white square.

Removing the "global" section also seemed to do nothing.

@ZedDevStuff?

@ZedDevStuff?

Sorry I'm pretty busy recently. Try removing the global entry and iirc the icon only works if it's named icon.png

Found the solution:
You can't have spaces in your .mp3/.wav file
That's it :D


Review WIFI amplifier

Prerequisites

[x] I am running the latest version
[x] I checked the documentation and found no answer
[x] I checked to make sure that this issue has not already been filed
[x] I'm reporting the issue to the correct repository (for multi-repository projects)

Context
Check whether the current implementation of the wifi amplifier with the filter is okay.
A simulation would be great
What is the motivation/use case for changing the behaviour?
To increase the range of transmission

Review files can be found here

@ianmuchyri Kindly duplicate the same issue over at https://github.com/nakujaproject/internship2022/issues

The WiFi amplifier circuit looks okay.


[nrf fromtree] cmake: kconfig: preserved quotes for Kconfig string values

Fixes: #48950
Kconfig requires quoted strings in its configuration files, like this:

CONFIG_A_STRING="foo bar"

But CMake requires expects that strings are without additional qoutes, and therefore qoutes are stripped when loading Kconfig config filers into CMake.
This is particular important when the string in Kconfig is a path to a file. In this case, not stripping the quotes leads to an error as the file cannot be found.
When users pass a string to Kconfig through CMake, they are expected to pass it so that qoutes are correct seen from Kconfig, that is:

cmake -DCONFIG_A_STRING="foo bar"

In CMake, those qoutes are written as-is to Kconfig extra config file, and then removed in the CMake cache.
After Kconfig processing, the Kconfig settings are read back to CMake but without quotes. Settings that was passed through the CMake cache, for example using -D are written back to the cache, but this time without the qoutes. This results in Kconfig errors on sub-sequent CMake runs.
Instead of writing the Kconfig value setting back to the CMake cache, introduce an internal shadow symbol in the cache prefixed with CLI_. This allows the CMake cache to keep the value correctly formatted for Kconfig extra config creation, while at the same time keep existing behavior for CONFIG_ symbols read from Kconfig.
Signed-off-by: Torsten Rasmussen<EMAIL_ADDRESS>

Also seems like this would be included in https://github.com/nrfconnect/sdk-zephyr/pull/916

closed, as this is included with #916 which has now been merged.


How do I get a public gist?

How do I get a public gist?
I was interested in retrieving a public gist in Github.
Example:
Given the following gist:
- url: https://api.github.com/gists/abcc6208af09ddaff6725b87b05be034
- forks_url: https://api.github.com/gists/abcc6208af09ddaff6725b87b05be034/forks
- commits_url: https://api.github.com/gists/abcc6208af09ddaff6725b87b05be034/commits
- id: abcc6208af09ddaff6725b87b05be034
- node_id: MDQ6R2lzdGFiY2M2MjA4YWYwOWRkYWZmNjcyNWI4N2IwNWJlMDM0
- git_pull_url: https://gist.github.com/abcc6208af09ddaff6725b87b05be034.git
- git_push_url: https://gist.github.com/abcc6208af09ddaff6725b87b05be034.git
- html_url: https://gist.github.com/abcc6208af09ddaff6725b87b05be034
- files:
  - main.py:
    - filename: main.py
    - type: application/x-python
    - language: Python
    - raw_url: https://gist.githubusercontent.com/daanklijn/abcc6208af09ddaff6725b87b05be034/raw/e69e00be58406d956e2cd22f6c4c83569172db23/main.py
    - size: 680
- public: True
- created_at: 2021-01-11T14:45:30Z
- updated_at: 2021-01-11T14:45:31Z
- description: main
- comments: 0
- user: None
- comments_url: https://api.github.com/gists/abcc6208af09ddaff6725b87b05be034/comments
- owner:
  - login: daanklijn
  - id: 27863547
  - node_id: MDQ6VXNlcjI3ODYzNTQ3
  - avatar_url: https://avatars0.githubusercontent.com/u/27863547?v=4
  - gravatar_id:
  - url: https://api.github.com/users/daanklijn
  - html_url: https://github.com/daanklijn
  - followers_url: https://api.github.com/users/daanklijn/followers
  - following_url: https://api.github.com/users/daanklijn/following{/other_user}
  - gists_url: https://api.github.com/users/daanklijn/gists{/gist_id}
  - starred_url: https://api.github.com/users/daanklijn/starred{/owner}{/repo}
  - subscriptions_url: https://api.github.com/users/daanklijn/subscriptions
  - organizations_url: https://api.github.com/users/daanklijn/orgs
  - repos_url: https://api.github.com/users/daanklijn/repos
  - events_url: https://api.github.com/users/daanklijn/events{/privacy}
  - received_events_url: https://api.github.com/users/daanklijn/received_events
  - type: User
  - site_admin: False
- truncated: False

I then tried to run the code:
gh_client.gists.get('10199742')

However, this returned:
*** fastcore.basics.HTTP404NotFoundError: HTTP Error 404: Not Found

Is there any way to retrieve a public gist like the one above?
Note: This may not be the right place to make this issue. After reading contributing guidelines, I couldn't find where to point my questions so let me know if there is a better place.

Silly me - realised I was using the wrong ID field. 'abcc6208af09ddaff6725b87b05be034' would have been the right ID.

Silly me - realised I was using the wrong ID field. 'abcc6208af09ddaff6725b87b05be034' would have been the right ID.


dune: 1.3.0 -> 1.4.0

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/dune/versions.
meta.description for dune is: '"A composable build system"'.

Checks done (click to expand)

built on NixOS
/nix/store/myjgfb9yq2zrsjzq7q7dlrac7yyq67n5-dune-1.4.0/bin/dune passed the binary check.
/nix/store/myjgfb9yq2zrsjzq7q7dlrac7yyq67n5-dune-1.4.0/bin/jbuilder passed the binary check.
2 of 2 passed binary check by having a zero exit code.
2 of 2 passed binary check by having the new version present in output.
found 1.4.0 with grep in /nix/store/myjgfb9yq2zrsjzq7q7dlrac7yyq67n5-dune-1.4.0
directory tree listing: https://gist.github.com/2b56e3638846378268495d41b9d9ab0b
du listing: https://gist.github.com/73a8828c7bb210d7f44090d3a8b3c734

Instructions to test this update (click to expand)

One-time optional setup to skip building using Cachix:
nix-shell -p cachix --run 'cachix use r-ryantm'

Test this update by entering a nix shell, seeing what is inside the
result, and if applicable, running some binaries:
nix-shell --pure -I nixpkgs=https://github.com/r-ryantm/nixpkgs/archive/82b925c0d47c6d468516464bbc719f0993b8cf8e.tar.gz -p dune
ls -la /nix/store/myjgfb9yq2zrsjzq7q7dlrac7yyq67n5-dune-1.4.0

cc @vbgl for testing.

Success on aarch64-linux (full log)
Attempted: dune
Partial log (click to expand)
shrinking /nix/store/byf8f5nbzyk08w875qymb98l3w64ccig-dune-1.4.0/lib/ocaml/4.06.1/site-lib/dune/_stdune/stdune.cmxs
shrinking /nix/store/byf8f5nbzyk08w875qymb98l3w64ccig-dune-1.4.0/lib/ocaml/4.06.1/site-lib/dune/_ocaml_config/ocaml_config.cmxs
shrinking /nix/store/byf8f5nbzyk08w875qymb98l3w64ccig-dune-1.4.0/lib/ocaml/4.06.1/site-lib/dune/_dune_lang/dune_lang.cmxs
shrinking /nix/store/byf8f5nbzyk08w875qymb98l3w64ccig-dune-1.4.0/lib/ocaml/4.06.1/site-lib/dune/_caml/dune_caml.cmxs
gzipping man pages under /nix/store/byf8f5nbzyk08w875qymb98l3w64ccig-dune-1.4.0/share/man/
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/byf8f5nbzyk08w875qymb98l3w64ccig-dune-1.4.0/lib  /nix/store/byf8f5nbzyk08w875qymb98l3w64ccig-dune-1.4.0/bin
patching script interpreter paths in /nix/store/byf8f5nbzyk08w875qymb98l3w64ccig-dune-1.4.0
checking for references to /build in /nix/store/byf8f5nbzyk08w875qymb98l3w64ccig-dune-1.4.0...
/nix/store/byf8f5nbzyk08w875qymb98l3w64ccig-dune-1.4.0

Success on x86_64-darwin (full log)
Attempted: dune
Partial log (click to expand)
installing
Processing file dune.install as dune.
post-installation fixup
moving /nix/store/nw9642mhvrhr68k3wba8kcx5mnpnwi4w-dune-1.4.0/man to /nix/store/nw9642mhvrhr68k3wba8kcx5mnpnwi4w-dune-1.4.0/share/man
moving /nix/store/nw9642mhvrhr68k3wba8kcx5mnpnwi4w-dune-1.4.0/doc to /nix/store/nw9642mhvrhr68k3wba8kcx5mnpnwi4w-dune-1.4.0/share/doc
gzipping man pages under /nix/store/nw9642mhvrhr68k3wba8kcx5mnpnwi4w-dune-1.4.0/share/man/
strip is /nix/store/53nysl8bqwxihwzs1pgwka20nf8mbvlp-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/nw9642mhvrhr68k3wba8kcx5mnpnwi4w-dune-1.4.0/lib  /nix/store/nw9642mhvrhr68k3wba8kcx5mnpnwi4w-dune-1.4.0/bin
patching script interpreter paths in /nix/store/nw9642mhvrhr68k3wba8kcx5mnpnwi4w-dune-1.4.0
/nix/store/nw9642mhvrhr68k3wba8kcx5mnpnwi4w-dune-1.4.0

Success on x86_64-linux (full log)
Attempted: dune
Partial log (click to expand)
shrinking /nix/store/myjgfb9yq2zrsjzq7q7dlrac7yyq67n5-dune-1.4.0/lib/ocaml/4.06.1/site-lib/dune/_caml/dune_caml.cmxs
shrinking /nix/store/myjgfb9yq2zrsjzq7q7dlrac7yyq67n5-dune-1.4.0/lib/ocaml/4.06.1/site-lib/dune/configurator/configurator.cmxs
shrinking /nix/store/myjgfb9yq2zrsjzq7q7dlrac7yyq67n5-dune-1.4.0/bin/dune
shrinking /nix/store/myjgfb9yq2zrsjzq7q7dlrac7yyq67n5-dune-1.4.0/bin/jbuilder
gzipping man pages under /nix/store/myjgfb9yq2zrsjzq7q7dlrac7yyq67n5-dune-1.4.0/share/man/
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/myjgfb9yq2zrsjzq7q7dlrac7yyq67n5-dune-1.4.0/lib  /nix/store/myjgfb9yq2zrsjzq7q7dlrac7yyq67n5-dune-1.4.0/bin
patching script interpreter paths in /nix/store/myjgfb9yq2zrsjzq7q7dlrac7yyq67n5-dune-1.4.0
checking for references to /build in /nix/store/myjgfb9yq2zrsjzq7q7dlrac7yyq67n5-dune-1.4.0...
/nix/store/myjgfb9yq2zrsjzq7q7dlrac7yyq67n5-dune-1.4.0


Add table aws_cloudtrail_ lookup_event

References
The existing table aws_cloudtrail_trail_event is fetching from CLOUDWatch instead / additionally we can fecth from Cloud trail events.
Reference
https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_LookupEvents.html

We already have a table called aws_cloudtrail_trail_event, which I think this new table would be ideally named. We could add functionality to the existing aws_cloudtrail_trail_event table, so that if a log group name were not given, it'd get results directly from CloudTrail (though throttling is heavy, I think 2 requests/second for LookupEvents), so it could take a while to get the last 2 weeks worth of events in a busy account.
Alternatively, we could create a new table, e.g., aws_cloudtrail_lookup_event, like suggested in the issue title, or another name, but I'm not sure what I'd call it.
We follow a similar pattern in table_aws_vpc_flow_log_event as well.

Cloudtrail to Cloudwatch not followed in all places due to log ingestion, storage and querying costs.

Commenting for keeping it alive

Should not be closed IMHO


Quick graphql readme cleanup

But frankly I'm wondering if it makes sense to keep that documentation at all, it is redundant with stargate.io.

@olim7t I had the same thought as well. I initially started this PR with the intent of removing the majority of this but kept it since this seems to go more in depth. This readme seems to be more of a technical "what" and the docs are more of a "how".
@polandll what are your thoughts?

I can go through this and incorporate anything that the docs are missing, and then this doc can be removed. Seems maybe the best way to do it. That way, you all don't have to keep maintaining.


Add logging and recipe for configuring handlers

This change adds logging message handlers (the outermost handler and
innermost handler).
The outermost handler is responsible for creating a
scope and capturing details about the logical operation. The innermost
handler logs the details of the actual request sent over the write. This
is important when you consider things like service discovery, auth or
caching as message handlers. The request the user crafted is not what
will be sent.
This is hardcoded into the system and happens after user code interacts
with the HttpMessageHandlerBuilder so that it's harder to mess up. If
you don't like it you can unregister the policy.

Additionally there are some Add* methods for adding handlers using the
HttpMessageHandlerBuilder.

Also moved the validation of the builder's state into a protected static
so that it's possible to reuse when subclassing the builder. This is
boilerplate that we expect anyone to want.

/cc @davidfowl @anurse

Why do we need stages? Why are we diverging from a very simple middleware pipeline?

Updated this with a simpler design approach and basic logging.
I don't want to dive deep on the logging right now as I want to open an issue and have a bigger discussion (involving people not at Microsoft 👍) to get feedback about logging before we try to do a really good jaerb.
Here's what it looks like now with scopes on:
info: System.Net.Http.HttpClient[100]
      => HTTP GET https://api.github.com/
      Start processing HTTP request GET https://api.github.com/

// Use your imagination and pretend there is service discovery here

info: System.Net.Http.HttpClient[200]
      => HTTP GET https://api.github.com/
      Sending HTTP request GET https://api.github.com/
info: System.Net.Http.HttpClient[201]
      => HTTP GET https://api.github.com/
      Recieved HTTP response GET https://api.github.com/ - OK

// Use your imagination and pretend there is a retry policy here for when this throws (or similar).

info: System.Net.Http.HttpClient[101]
      => HTTP GET https://api.github.com/
      End processing HTTP request GET https://api.github.com/ - OK

It sounds like the salient comments here are:

https://github.com/aspnet/HttpClientFactory/pull/22#discussion_r148717074
https://github.com/aspnet/HttpClientFactory/pull/22#discussion_r148716641

Regarding the IStartupFilter approach, it seems like a big hammer for this, but I'm not sure that's a real objection. I'm going to go ahead and code that up so we can look at it.
Regarding the 'IHttpClientBuilder' I'm going to go ahead and code that up as an extra commit.

@anurse @davidfowl updated

If either of you feel like there are more major design issues here that aren't blocking, I'd like to spin those off into follow ups.

@anurse any more important feedback? Hoping this is ready to merge


Add DIF3D Reader to CCCC

What is the change?
One of the outputs of a DIF3D run is, well, a file called DIF3D. This update adds a DIF3D binary reader to the CCCC stack.
Why is the change being made?
DIF3D contains a nugget of information we need: k-effective reported with double precision. This update allows us to use this value in our internal dif3d plugin with ease.

Checklist

[x] This PR has only one purpose or idea.
[x] Tests have been added/updated to verify that the new/changed code works.

[x] The code style follows good practices.
[x] The commit message(s) follow good practices.

[ ] The release notes (location doc/release/0.X.rst) are up-to-date with any important changes.
[x] The documentation is still up-to-date in the doc folder.
[x] The dependencies are still up-to-date in setup.py.

Keeping as draft while I perfect the PR

I'll see if I can handle the testing coverage, but other than that, let's see about getting this bad boy reviewed! opening from draft

@john-science @Nebbychadnezzar  updated! Check out my last two commits. I resolved comments one by one in them, and glad I opted to test the uncovered code because it works now!


Add Quantifer and Group to AST

Add in richer Quantifier and Group types to the AST.
Update the Lexer design (partially), as the parser most of
the time knows what kinds of tokens to be pulling in.

@swift-ci please test

Landing this, I have more stuff to base on top.


[full-ci][tests-only]Bump commit id for tests

Updates expected to fail for tests changed by https://github.com/owncloud/core/pull/40534
Part of: https://github.com/owncloud/QA/issues/791

needs this https://github.com/owncloud/core/pull/40540 PR to be merged and bump commit id again because the currently passing tests shouldn't pass

@SwikritiT I merged the core PR, so you can update the commit id.


supercronic doesn't like to send SIGTERM/SIGINT to my script

I start the tool with supercronic -debug my.crontab. When I press ^C, I expect SIGTERM/SIGINT is sent to my script (aka, supercronic would work as a signal proxy). However, supercronic doesn't send any signal to my script, it just waits for my script.
My configuration
*/5 * * * * * * ./cd.sh sys_sleep

(/cd.sh sys_sleep works perfectly with SIGTERM/SIGINT when I tried its own, see below)
Debug logging
INFO[2020-04-19T14:22:50+02:00] starting                                      iteration=7 job.command="./cd.sh sys_sleep" job.position=0 job.schedule="*/5 * * * * * *"
INFO[2020-04-19T14:22:50+02:00] :: sys_sleep: Sleeping 180 second(s). Use 'now' to wake up the sleeping script.  channel=stdout iteration=7 job.command="./cd.sh sys_sleep" job.position=0 job.schedule="*/5 * * * * * *"
^CINFO[2020-04-19T14:22:53+02:00] received interrupt, shutting down
INFO[2020-04-19T14:22:53+02:00] waiting for jobs to finish
WARN[2020-04-19T14:22:55+02:00] not starting: job is still running since 2020-04-19 14:22:50 +0200 CEST (5s elapsed)  iteration=7 job.command="./cd.sh sys_sleep" job.position=0 job.schedule="*/5 * * * * * *"
WARN[2020-04-19T14:23:00+02:00] not starting: job is still running since 2020-04-19 14:22:50 +0200 CEST (10s elapsed)  iteration=7 job.command="./cd.sh sys_sleep" job.position=0 job.schedule="*/5 * * * * * *"

My cd.sh signal trap is working
$ ./cd.sh sys_sleep
:: sys_sleep: Sleeping 180 second(s). Use 'now' to wake up the sleeping script.
^C:: sys_trap: Testing purpose: This is sys_trap
:: rclean: Cleaning up metric file /home/gfg/metrics.txt
:: sys_trap: Testing purpose: This is sys_trap
:: rclean: Cleaning up metric file /home/gfg/metrics.txt

When I used dumb-init as a signal proxy for my script, everything is working well. So I'm probably sure this is a problem/feature of supercronic.
Using dumb-init --> supercronic --> my script
In this configuration, supercronic is in front my script. When I press ^C, dumb-int  sends signal to supercronic, but supercronic stucks there . I have to pkill -9 supercronic to finish everything.
$ dumb-init --verbose -- ./testdump.sh
[dumb-init] Detached from controlling tty, but was not session leader.
[dumb-init] Child spawned with PID 426096.
[dumb-init] Unable to attach to controlling tty (errno=1 Operation not permitted).
[dumb-init] setsid complete.
INFO[2020-04-19T14:38:31+02:00] read crontab: ./supercronic.crontab
DEBU[2020-04-19T14:38:31+02:00] try parse(7): */5 * * * * * * ./cd.sh sys_sleep[0:15] = */5 * * * * * *
DEBU[2020-04-19T14:38:31+02:00] job will run next at 2020-04-19 14:38:35 +0200 CEST  job.command="./cd.sh sys_sleep" job.position=0 job.schedule="*/5 * * * * * *"
INFO[2020-04-19T14:38:35+02:00] starting                                      iteration=0 job.command="./cd.sh sys_sleep" job.position=0 job.schedule="*/5 * * * * * *"
INFO[2020-04-19T14:38:35+02:00] :: sys_sleep: Sleeping 180 second(s). Use 'now' to wake up the sleeping script.  channel=stdout iteration=0 job.command="./cd.sh sys_sleep" job.position=0 job.schedule="*/5 * * * * * *"
^C[dumb-init] Received signal 2.
[dumb-init] Forwarded signal 2 to children.
INFO[2020-04-19T14:38:36+02:00] received interrupt, shutting down
INFO[2020-04-19T14:38:36+02:00] waiting for jobs to finish
WARN[2020-04-19T14:38:40+02:00] not starting: job is still running since 2020-04-19 14:38:35 +0200 CEST (5s elapsed)  iteration=0 job.command="./cd.sh sys_sleep" job.position=0 job.schedule="*/5 * * * * * *"
WARN[2020-04-19T14:38:45+02:00] not starting: job is still running since 2020-04-19 14:38:35 +0200 CEST (10s elapsed)  iteration=0 job.command="./cd.sh sys_sleep" job.position=0 job.schedule="*/5 * * * * * *"
./testdump.sh: line 2: 426098 Killed                  ./supercronic -debug ./supercronic.crontab
[dumb-init] Received signal 17.
[dumb-init] A child with PID 426096 exited with exit status 137.
[dumb-init] Forwarded signal 15 to children.
[dumb-init] Child exited with status 137. Goodbye.

Using dumb-init  --> my script
This is a simple setup and it's working well. I press ^C and dumb-init send correct signal to my script, and my script just exists correctly as expected.
$ dumb-init --verbose -- ./testdump.sh
[dumb-init] Detached from controlling tty, but was not session leader.
[dumb-init] Child spawned with PID 426230.
[dumb-init] Unable to attach to controlling tty (errno=1 Operation not permitted).
[dumb-init] setsid complete.
:: sys_sleep: Sleeping 180 second(s). Use 'now' to wake up the sleeping script.
^C[dumb-init] Received signal 2.
[dumb-init] Forwarded signal 2 to children.
:: rclean: Cleaning up metric file /home/gfg/metrics.txt
:: rclean: Cleaning up metric file /home/gfg/metrics.txt
[dumb-init] Received signal 17.
[dumb-init] A child with PID 426230 exited with exit status 130.
[dumb-init] Forwarded signal 15 to children.
[dumb-init] Child exited with status 130. Goodbye.

This is by design. When you interrupt Supercronic, it stops scheduling new instances of your jobs, but it doesn't interrupt the current ones. If you want to interrupt the jobs themselves, then you should send them a signal.
IIRC, when signalled, dumb-init forwards signals to its descendant process group, so that sends it Supercronic and your children jobs, and those get terminated.
So, to summarize, it's not that Supercronic doesn't "like" to signal your script — it's just that it's not what it does, because as a default it's usually not a great idea for a job runner to unconditionally kill everything when you ask the job runner to stop running new jobs (the reason why that's not a great default is because you can simply kill everything yourself if that's what you want, which is what you did here).
As an aside, Supercronic doesn't create a new process group for your jobs, so if you signalled kill -$PID (note the - here), then that would signal the entire group, including your jobs.

@krallin May I ask you how I support my script in Docker container?
Let's say I have a docker container that contains my script, which is working well. Now I want to add superconic in between, so that I can have a cron-liked feature.
What I understand is that supercronic idea is to support not-well-behavior script (e.g, some script doesn't respect sigterm/sigkill). but my script / my job isn't that case.
Thanks so much

I think there's a bit of confusion here. It seems to me that you think Supercronic is a process manager. It isn't — it's a cron runner.

What I understand is that supercronic idea is to support not-well-behavior script (e.g, some script doesn't respect sigterm/sigkill). but my script / my job isn't that case.

No; your understanding is incorrect here. Supercronic's design is that when it is signalled, it'll stop scheduling new jobs, and wait for existing jobs to exit. Supercronic is not a process manager. Its responsibility isn't to do process management and watch after and / or signal daemons.
This is not about handling scripts that don't respect signals, it's simply the semantics of what signalling Supercronic itself meeans.

Let's say I have a docker container that contains my script, which is working well. Now I want to add supercronic in between, so that I can have a cron-liked feature.

I don't know what your cron like feature is, so that's hard to say. That said, Supercronic is designed to run periodic jobs. If your job is actually a daemon that doesn't exit and expects to be signalled to exit, then perhaps running it through Supercronic isn't what you should be doing?
If you want to mix some periodic tasks along with a daemon process, then I would recommend you use a process manager to start your app AND Supercronic as separate processes.

I understand that supercronic is not a process manager.
What confused me, actually, the description of the project itself (https://github.com/aptible/supercronic#why-supercronic)

They often don't respond gracefully to SIGINT / SIGTERM, and may leave running jobs orphaned when signaled. Again, this makes sense in a server environment where init will handle the orphan jobs and Cron isn't restarted often anyway, but it's inappropriate in a container environment as it'll result in jobs being forcefully terminated (i.e. SIGKILL'ed) when the container exits.

SIGTERM triggers a graceful shutdown (and so does SIGINT, which you can deliver via CTRL+C when used interactively)

So what is exactly graceful shutdown here?

SIGTERM triggers a graceful shutdown (and so does SIGINT, which you can deliver via CTRL+C when used interactively)

I'm sorry if this was unclear — it means that Supercronic will stop starting new jobs and wait for exiting jobs to finish. I.e. nothing gets killed.

I think triggering a graceful shutdown is something else (aka, sending some signal to jobs...) So yes that's confusing me quite a lot.
Thanks a lot for your time, and I'm very sorry that I can't use the tool in my case. The tool is just so great.

I was similarly confused by the description of the project and also thought it would help facilitate the passing of the signals down to the running jobs as well...
@icy were you able to find a good solution for this? I'm currently having issues getting my configuration set up correctly to handle a graceful shutdown of a php script which is being run by cron in a debian based docker container...
@krallin is there a reason why supersonic can't pass these signals on to the jobs it's managing? Maybe this could be an option via a flag?
If term/int signals need to be sent to the child processes as well as supersonic itself, do you have a suggestion of how that would be done in the context of docker? or even further in a kubernetes cluster? I'm trying to test this locally by using docker stop, but eventually I would want this to work in kubernetes when we rollout updates to the pods.

Hi @andersryanc ,
Thanks for your asking. As said in my previous comment, signal processing is important for my tool and I can't use supercronic for that purpose. I use dump-init and also rewrite the tool to act as a cronjob, but it relies on a self counter: When the internal counter reaches some limit, the program signals itself to exit.
It's interesting, but the "root" cause for us is to avoid some memory "leak"-like issue, as seen in https://github.com/golang/go/issues/20135 . I suggested an idea here https://github.com/kubernetes/kubernetes/issues/85752 but not many people have the same issue. Well, I have an option to use k8s cronjob, or to rewrite the golang program/supportive script, but I think I decide to keep the golang code more friendly to me, and k8s cronjob is time-based .
Hope that helps and I wish you find your own way soon.

Hello everyone, I'm experiencing an issue that bears some similarity to the current discussion.
@krallin, my perspective is that the lack of signal propagation to child processes isn't optimal. Ideally, such a behavior should be controlled by a configurable flag.
This becomes crucial when dealing with cron tasks that are time-intensive and may need intervention in the form of a SIGTERM signal.
To illustrate, in my specific scenario, I have a task set up to generate and email PDF invoices for a customer list. This task is quite lengthy, hence, when a single invoice is completed, and a SIGTERM signal is received, I'd prefer the task to terminate rather than commence with a new invoice. While I can allow for the completion of a single invoice, waiting for the entire process isn't feasible, especially during a scale-in phase. For instance, with AWS ECS, a task must be terminated within a maximum of 120 seconds!
Therefore, I believe it's essential to have a mechanism that allows sending signals to child processes.
Nevertheless, I appreciate the excellent work you've shared. Thank you!


Simplify cachedMerge

What kind of change does this PR introduce?
refactoring
Did you add tests for your changes?
no
If relevant, link to documentation update:
N/A
Summary
cachedMerge is only called with 2 two arguments. It doesn't need to recursive.
Does this PR introduce a breaking change?
no

Thanks


include the QT_BREAKDOWN_PATH insert liquibase scripts

Looks like this has been taken care of as part of the changes with new eurekaclinical-ontology project


How to check that user blocked and stop bot?

How to check that user blocked and stop bot?
Can't found this in docs or code.

You can try sending a message and check if the err is equal to ErrBlockedByUser.
msg, err := b.Send(&tele.User{ID: id}, "Hello")

if err != nil {
fmt.Println(err)
}

fmt.Println(err == tele.ErrBlockedByUser)

I blocked the bot and tried to send a Message, and in this case, it printed true in console:


Trident allocating too much storage (10%) for LUN metadata

Describe the bug
When creating PVCs in Kubernetes, a volume is created in Ontap based on the following calulation:
Total volume size = [(PVC request size)/(1 -(snapshotReserve percentage)/100) * 1.1
Based on this calculation, when snapshotReserve=0, the volume size in Ontap is always 10% larger than the useable storage in Kubernetes.
This means that if I create a 6TB PVC, I will be able to use 6TB, but the allocated space in Ontap will be 6.6TB (600GB for LUN metadata). In an HA cluster, maybe even 1.2TB will be used for LUN metadata.
This seams unreasonable.
The calculation is taken from the following KB:
https://docs.netapp.com/us-en/trident/trident-use/ontap-san-examples.html#backend-configuration-options
I was asked by NetApp support to open an issue here, since they weren't able to help me.
Environment
Provide accurate information about the environment to help us reproduce the issue.

Trident version: 22.10
Trident installation flags used: "storageDriverName": "ontap-san","spaceReserve": "volume",
Container runtime: containerd://1.6.9
Kubernetes version: v1.25.6
Kubernetes orchestrator: Kubernetes
OS: Rocky Linux 9.3
NetApp backend types: Ontap Select 9.8P19, two node cluster (1 HA Pair)

To Reproduce
Create a pvc. For example a 100GB PVC. Can be created from the example in the trident installation folder under: sample-input/pvc-samples/iscsi-pvc-basic.yaml
In Kubernetes, the PVC and PV will appear as 100GB. In Ontap, the LUN will appear 100GB and the volume will appear as 110GB.
Expected behavior
The larger the LUN will be, the smaller the percentage of extra space allocated for LUN metadata.
Additional context
N/A

Not to diminish the request in any way, but just for additional clarity: Unless you explicitly configure it otherwise, everything will be thin provisioned. So none of that extra space is actually used/taken, the volume size is just a number that specifies the upper limit.

Thanks for your comment.
Are you sure about that? I'm not sure this is the case when using Thick provision for the volumes themselves as we do in our environment. Although, even if it's thin provision, it has the capability to use 10% and then we will be over provisioned...
Our problem is that we purchased a license for the specific amount of storage and since this is a production environment, we preferred using thick provision. We were not able to create all the volumes due to insufficient storage, regardless of our calculation (Which of course didn't take into consideration the 10%)
So either something else is consuming this storage, or the LUN metadata is thick provision.

See https://docs.netapp.com/us-en/trident/trident-use/ontap-san-examples.html#backend-configuration-options-for-provisioning-volumes

spaceAllocation --> This is for the LUN itself, by default "true" so the LUN space is reserved (e.g. the actual size of your PVC)
spaceReserve --> This is for the underlying volume, by default "none" so the space of the volume (which is 1.1 times the size of the PVC) is thin provisioned

Not sure at which value your license enforcement is looking, might be provisioned capacity, in which case I understand the pain.


move user lookup to Provision

The earlier implementation looked up the user details in the UnmarshalCaddyfile, which is the wrong layer because then the module is not usable through the JSON config.
I also removed the Validate func because it's not doing anything and it's optional.

Thanks. I'll merge.
Note that I've pushed a readme that explains why this concept and module
can't possibly work correctly on Unix
On Thu, 25 Jan 2024, 12:26 Mohammed Al Sahaf, @.***>
wrote:

The earlier implementation looked up the user details in the
UnmarshalCaddyfile, which is the wrong layer because then the module is
not usable through the JSON config.
I also removed the Validate func because it's not doing anything and it's
optional.
You can view, comment on, or merge this pull request online at:
https://github.com/miekg/caddy-user/pull/1
Commit Summary

59f5e23
https://github.com/miekg/caddy-user/pull/1/commits/59f5e23b9df8b08f4cf0533f75c21e0e91aa6745
move user lookup to Provision

File Changes
(1 file https://github.com/miekg/caddy-user/pull/1/files)

M user.go
https://github.com/miekg/caddy-user/pull/1/files#diff-40377b7a7613e54bce00e5f123d734c2a159862c936abae1c69305f5dad35eaf
(25)

Patch Links:

https://github.com/miekg/caddy-user/pull/1.patch
https://github.com/miekg/caddy-user/pull/1.diff

—
Reply to this email directly, view it on GitHub
https://github.com/miekg/caddy-user/pull/1, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACWIW7PNW6SQQVHPQQ4WN3YQI6ORAVCNFSM6AAAAABCKLHYICVHI2DSMVQWIX3LMV43ASLTON2WKOZSGEYDAMJXGE2DMMI
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Nope, that just allows you to so setuid. But you still change the entire
process' owner
On Thu, 25 Jan 2024, 13:07 Mohammed Al Sahaf, @.***>
wrote:

Note that I've pushed a readme that explains why this concept and module
can't possibly work correctly on Unix
Wouldn't the running service just need cap_setuid?
—
Reply to this email directly, view it on GitHub
https://github.com/miekg/caddy-user/pull/1#issuecomment-1910067206, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AACWIW3756XZ3THHVTIVAV3YQJDINAVCNFSM6AAAAABCKLHYICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJQGA3DOMRQGY
.
You are receiving this because you commented.Message ID:
@.***>


How to create a Custom Operator with extra parameters in Python?

say if I have a layer need some input parameters e.g. size = 10 .
How to set that in Custom Operator? I didnt see any examples in
http://mxnet.io/how_to/new_op.html

You can set them like defining a python class in __init__.For example:

class Softmax(mx.operator.CustomOp):
    def forward(self, is_train, req, in_data, out_data, aux):
        x = in_data[0].asnumpy()
        y = np.exp(x - x.max(axis=1).reshape((x.shape[0], 1)))
        y /= y.sum(axis=1).reshape((x.shape[0], 1))
        self.assign(out_data[0], req[0], mx.nd.array(y))

    def backward(self, req, out_grad, in_data, out_data, in_grad, aux):
        l = in_data[1].asnumpy().ravel().astype(np.int)
        y = out_data[0].asnumpy()
        y[np.arange(l.shape[0]), l] -= 1.0
        self.assign(in_grad[0], req[0], mx.nd.array(y))

@mx.operator.register("softmax")
class SoftmaxProp(mx.operator.CustomOpProp):
    def __init__(self):
        super(SoftmaxProp, self).__init__(need_top_grad=False)

    def list_arguments(self):
        return ['data', 'label']

    def list_outputs(self):
        return ['output']

    def infer_shape(self, in_shape):
        data_shape = in_shape[0]
        label_shape = (in_shape[0][0],)
        output_shape = in_shape[0]
        return [data_shape, label_shape], [output_shape], []

    def create_operator(self, ctx, shapes, dtypes):
        return Softmax()

Here is a example about Softmax, we can see that there are not any parametres in __init__, it just extend its father class, if you wanna add some parameter, you can set them in __init__, and this is  same as creating op by entending mx.operator.NDArrayOp. Just see that like a simple python class

@saicoco  it works! thanks a lot!

nice zan!!!

Is it able to add parameters that are not string, but self defined classes ?
I pass the class in while all the parameters are converted to str @saicoco

@pengwangucla
You may use cPickle to do that. When defining the symbol, passing parameters by
certain_param=cPickle.dump(self_defined_things)
And inside the operator, using cPickle.loads(self_defined_things)
I use this one when passing easydict object to operator.

Means that you wanna pass a class as arg to your operator?
@pengwangucla

@Oh233 How do I do that in python3?


Contactform 7: Issue with refreshing

Hello community,
I've got a problem with my own website http://www.overtref.nl/. I'm building an interactive "Start Project" http://overtref.nl/start-project/  in combination with contact form 7 and SmoothState.js.
Step 1 : Grafisch ontwerp
Step 2 : Restyle huidige huisstijl
Step 3 : Submit the form
After submitting the Contact form 7 the AJAX script conflicts and my page starts reloading. If i disable my SmoothState script it wont reload my page and the AJAX script of contact form 7 wont conflict.
I've been searching the whole forum for a solution but it wont work for me. Is there a possibility to let it work. So i can run SmoothState and Contact form 7 like brothers.
My SmoothState script below
$(function() {
        var $page = $('#main'),
        options = {
        prefetch: true,
        pageCacheSize: 4,
        // blacklist anything you dont want targeted
		 blacklist: '.no-smoothState',
		 development : false,
          onStart: {
            duration: 500, // Duration of our animation
            render: function ($container) {
              TweenMax.to($container.find('#content'), 0.5, {ease: Power2.easeIn, opacity:0});
			  TweenMax.to($container.find('.breadcrumb'), 0.5, {ease: Power2.easeIn, opacity:0, paddingTop:10});
            }
          },
          onReady: {
            duration: 0,
            render: function ($container, $newContent) {
              // Inject the new content
              $container.html($newContent);
              TweenMax.from($container.find('#content'), 0.5, {ease: Power2.easeOut,opacity:0});
			  TweenMax.from($container.find('.breadcrumb'), 0.5, {ease: Power2.easeOut, paddingTop:10, opacity:1});

			  		$(document).ready();
					$(window).trigger('load');

            }
          }
        },
        smoothState = $page.smoothState(options).data('smoothState');
});

Thanks in advance for you help or time.
John Verhagen

Hello,
Try this:
$(function() {
	var $page = $('#main'),
	options = {
		prefetch: true,
		forms: 'form',
		pageCacheSize: 4,
		blacklist: 'form, .no-smoothState',
		development : false,
		onStart: {
			duration: 500, // Duration of our animation
			render: function ($container) {
				TweenMax.to($container.find('#content'), 0.5, {ease: Power2.easeIn, opacity:0});
				TweenMax.to($container.find('.breadcrumb'), 0.5, {ease: Power2.easeIn, opacity:0, paddingTop:10});
			}
		},
		onReady: {
			duration: 0,
			render: function ($container, $newContent) {
				// Inject the new content
				$container.html($newContent);
				TweenMax.from($container.find('#content'), 0.5, {ease: Power2.easeOut,opacity:0});
				TweenMax.from($container.find('.breadcrumb'), 0.5, {ease: Power2.easeOut, paddingTop:10, opacity:1});
				$(document).ready();
				$(window).trigger('load');
			}
		}
		onAfter: function($container) {
			$('div.wpcf7 > form').wpcf7InitForm();
		}
	},
	smoothState = $page.smoothState(options).data('smoothState');
});

P.S. Great site!

Thanks for your reaction!
I have added your code to my script but unfortunately it doesnt change anything to the problem.
It results in:
http://overtref.nl/start-project/#wpcf7-f131-o1

This solution doesn't seem to work anymore since the wpcf7InitForm(); function was removed in Contact Form 7 v4.8.
A new function was added in v4.8.1:
wpcf7.initForm
I've found this code to work well:
function initContactForm() {
  $( 'div.wpcf7 > form' ).each( function() {
    var $form = $( this );
      wpcf7.initForm( $form );
    if ( wpcf7.cached ) {
      wpcf7.refill( $form );
    }
  });
}

Which is then called onAfter using initContactForm();
Discussion on Contact Form 7 forum can be found here:
https://wordpress.org/support/topic/init-function-wpcf7initform/

garethmorgans problem is the form submits 3 times on the initial page load and submits 2 times after you click to a next page.

This is what worked for me and I hope this helps someone else. I've read this thread about 20 times and implemented the advice given, but nothing was working.
My understanding of the problem:
Contact Form 7, which usually submits via AJAX (without page refresh) is initiating a page refresh when smoothstate is active. If you disable smoothstate, CF7 works as expected.
My Solution
My understanding is that smoothstate is designed to work on forms as well as links by default. So to stop this happening on CF7, which already submits with JavaScript, I added .wpcf7-form to the blacklist.
See code below:
;(function($) {
        'use strict';
	var $body = $('html, body'),
    	content = $('#main').smoothState({
			blacklist: '.wpcf7-form',
			// Runs when a link has been activated
			onStart: {
				duration: 500, // Duration of our animation
				render: function ($container) {

					// Add your CSS animation reversing class
					$container.addClass('is-exiting');

					// Restart your animation
					//smoothState.restartCSSAnimations();
				}
	        },
			onReady: {
				duration: 0,
				render: function ($container, $newContent) {

					// Scroll user to the top, this is very important, transition may not work without this
					$body.scrollTop(0);

					// Remove your CSS animation reversing class
					$container.removeClass('is-exiting');

					// Inject the new content
					$container.html($newContent);

					// Trigger load functions
					$(document).ready();
                	                $(window).trigger('load');
				}
		    },
		    onAfter: function($container) {
	                initContactForm();
	            }
  		}).data('smoothState');
})(jQuery);`

I hope this helps!


removed unused code

Description
removed unused code
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:

[x] Code compiles correctly
[ ] Created/updated tests
[x] Unit tests passing

Codecov Report

Merging #96 (965cfc6) into main (4745eb3) will increase coverage by 2.20%.
The diff coverage is 0.44%.

@@            Coverage Diff             @@
##             main      #96      +/-   ##
==========================================
+ Coverage   43.98%   46.19%   +2.20%
==========================================
  Files          48       48
  Lines        2512     2392     -120
==========================================
  Hits         1105     1105
+ Misses       1399     1279     -120
  Partials        8        8

Impacted Files
Coverage Δ

internal/scanners/afd/afd.go
0.00% <0.00%> (ø)

internal/scanners/afw/afw.go
0.00% <0.00%> (ø)

internal/scanners/agw/agw.go
0.00% <0.00%> (ø)

internal/scanners/aks/aks.go
0.00% <0.00%> (ø)

internal/scanners/apim/apim.go
0.00% <0.00%> (ø)

internal/scanners/appcs/appcs.go
0.00% <0.00%> (ø)

internal/scanners/appi/appi.go
0.00% <0.00%> (ø)

internal/scanners/cae/cae.go
0.00% <0.00%> (ø)

internal/scanners/ci/ci.go
0.00% <0.00%> (ø)

internal/scanners/cosmos/cosmos.go
0.00% <0.00%> (ø)

... and 16 more


Check alignment of Ibex bus interface with "OBI" bus standard

The OpenHW group, which continues the development of the ETH/PULP RISCY core as CV32E40P, has published a more complete description of the bus interface that also Ibex uses at https://github.com/openhwgroup/core-v-docs/blob/master/cores/cv32e40p/OBI-v1.0.pdf (no source code or HTML version is available AFAIK). We should check if our interface matches their description, and document compatibility or divergence as needed (at least the reset signal is named differently from what I've seen on a first look).
We also should add a protocol checker to our code base to ensure that we stay compliant with it.
@Silabs-ArjanB do you have a protocol checker in your code base (e.g. something like the one we have in OpenTitan for TL-UL at https://github.com/lowRISC/opentitan/blob/master/hw/ip/tlul/rtl/tlul_assert.sv (docs), or do you have plans for such a module? It would be good if we can share the development effort for such a module.

We are developing assertions for the OBI protocol. It is my intention that these will be open-sourced (I will come back about this to get it confirmed). I don't think we need to be concerned about the exact naming if the only difference is prefixing or postfixing  (see introduction of section 3.1)


Adapt generation of callable names to be able to detect built-in functionstions

I have noticed that build-in functions (C-defined functions) are not detected by stubdoc.
This is due to the inspect.isfunction is used which does not include build-in functions. Switching it to inspect.isroutine solves this issue. It includes both python functions and build-in functions.

Hi @tobiasah
Thanks a lot for sending that PR!
I've merged and released v0.1.12


Latest releases not visible in electronjs.org/releases/

https://electronjs.org/releases shows older betas, but not 2.0.0-beta.8.
Likewise it shows 1.8.4 but not 1.8.5 or 1.8..6

https://github.com/electron/releases#releases looks right, so it must be an issue in our dependency updater thingy. I will take a look later today.


How to determine which hand generated input event?

I have a VR game with guns, working in Unity, C#. The guns subscribe to a button event. The gun knows which hand it is being held in:
                gunTriggerOneHanded.AddOnChangeListener(OnShootOneHandedActionChange, hand);
                attachmentParentName = interactable.GetComponentInParent<Hand>().name;
                Debug.Log("Attached to " + attachmentParentName);

But when I get an event, I can't tell which controller was used, so if you're holding a gun in your left hand and you pull the right trigger, it still shoots.
        // THIS DOES NOT WORK ... JUST SAYS "ANY"
        Debug.Log("SteamVR_Input_Source = " + inputSource);

        if (inputSource == SteamVR_Input_Sources.LeftHand) {
            Debug.Log("LEFT hand shooting");
        } else if (inputSource == SteamVR_Input_Sources.RightHand) {
            Debug.Log("RIGHT hand shooting");
        }

I thought of adding left and right trigger pull events but then my script has to subscribe to both and that seems very inefficient. So what's the correct way to tell if the event happened on the controller I'm currently parented to?
Thanks in advance.
P.S. There are so many redirections for "where to ask for help with SteamVR 2.X" that I may be posting in the wrong place; if so please redirect me.

Not sure I understand  how you've defined the variable: inputSource
If it helps, this is how I handle it in my projects:

Declare a public variable where you can define the input action you wish to respond to:

public SteamVR_Action_Boolean myAction;

Declare another public variable to define the type of hand you are interested in:

SteamVR_Input_Sources source

Then you can listen for events like so:

myAction.GetStateDown(source)

Is the hand parameter you're passing into AddOnChangeListener left or right hand? If it's Any you will always get Any out.

ataylor09, thanks for the reply.

Not sure I understand how you've defined the variable: inputSource

This comes back from the subscribed event. I was hoping it would carry some extra information, so even if I subscribe to "Any" hand, the actual input source might tell me which one generated the event, ideally the gameObject itself, then I could compare to the hand holding the pistol without the left/right distinction appearing in my code. Also if humans develop third hands or, uh, tentacles, the code would still work.
FYI this is the function which receives the inputSource, although it's unable to tell where the inputSource was:
    private void OnShootOneHandedActionChange(SteamVR_Action_Boolean actionIn,
                                              SteamVR_Input_Sources inputSource,
                                              bool newValue) {

        // should never be true because we deregister when not attached
        if (interactable.attachedToHand == null) { return; }

        // trigger not being pulled, do nothing
        if (!newValue) { return; }

        Shoot();

If it helps, this is how I handle it in my projects:
...

That actually does look fairly straightforward, but am I right in saying your gun (where this script is sitting) still needs code to see which hand it is being held in? So you need to set source to left or right hand based on that before calling myAction.GetStateDown() ... I think. So, it would work. The code looks a bit unfamiliar to me because I was working from the "planting" tutorial in the SteamVR documentation, which is all about those AddOnChangeListeners.

zite thanks for the reply.

Is the hand parameter you're passing into AddOnChangeListener left or right hand? If it's Any you will always get Any out.

That may be the solution - it was indeed set to Any and I expected to get more information back. I'll test this later and close the issue if it works. I'm a bit disappointed that I can't make my code agnostic to the number of limbs/appendages or (joking aside) controllers the player has, as explained in the previous comment, but thanks for spotting that.

Sorry didn't mean to close the issue. Will close if the issue is resolved.

OK, confirmed working; this can probably be refined if the InputSource enum is available through the attachment Parent but for now it does exactly what I was trying to to.
Thank you very much for the help. For the record here is the relevant code which is called when we (the pistol) are attached to a new parent (assumed to be a hand), plus the equivalent weAreNotAttached method.
    private void weAreAttached() {

        // to what are we attached?
        attachmentParentName = interactable.GetComponentInParent<Hand>().name;
        Debug.Log("Attached to " + attachmentParentName);

        // if left hand, subscribe to left hand events
        if (attachmentParentName == "LeftHand") {
            Debug.Log("Listening to LEFT HAND");
            hand = SteamVR_Input_Sources.LeftHand;

        // if right hand, subscribe to right hand events
        } else if (attachmentParentName == "RightHand") {
            Debug.Log("Listening to RIGHT HAND");
            hand = SteamVR_Input_Sources.RightHand;

        // otherwise default to "any hand" and try to figure it out later!
        } else {
            Debug.Log("Listening to ANY HAND");
            hand = SteamVR_Input_Sources.Any;
        }
        gunTriggerOneHanded.AddOnChangeListener(OnShootOneHandedActionChange, hand);
    }

    private void weAreNotAttached() {
        Debug.Log("Not attached to hand; detaching events from " + attachmentParentName);

        // the time for half measures and talk is over. Also, listening.
        gunTriggerOneHanded.RemoveOnChangeListener(OnShootOneHandedActionChange, hand);
    }


IndexError: list index out of range

Same error as #236.

Thanks to https://github.com/thumbor/thumbor/commit/f488ae7861bb214699a3cc7b186334a63120fe66 this is not an issue anymore :+1:


feat(jellyfish-api-core): add blockchain getMempoolDescendants RPC

What this PR does / why we need it:
This PR implements blockchain.getMempoolDescendants() from ain
Which issue(s) does this PR fixes?:
Part of #48
Additional comments?:

What happened if you passed in txid that the length is not 64?


feat(scm): add BasicAuth to stash

PR plugins doesn't support BasicAuth even though Username is provided.
Test
I have no idea to test this module. I have tested manually over a bitbucket server.
Additional Information
Tradeoff
Potential improvement
add BasicAuth support to the other plugins

I am targeting an other release over the weekend or early next week


SVG Animations causing massive jank on mobile

I have 5 pages, only 1 of them currently have animations in (the one show in the gif). As you can see when i scroll there is massive jank. When i remove the animations the jank is gone. I have tried making SVGs absolute, but nothing has helped so far. I have also tested this on my ipad and gotten the same result.

Also in chrome on android it stops playing when you are scrolling.

This is genuinely crippling.

SVG by its nature creates a lot of elements and DOM manipulation when animating which can be performance intensive particularly on mobile.  You'll definitely want to ensure things aren't animating when they're not in view, perhaps even stopping all of them while scrolling.
If you're still having performance issues with SVG, you may also want to consider using the canvas exporter for your output. You're asking a lot of the browser renderer using this many animations in one mobile page while scrolling.

Hmm ok. Thank you for the help. I think I may just end up using GIFs on mobile due to widespread support.


Extracted filter functionality from broadcast-method.

Extracted optional filter into two separate methods:
broadcast(Message message, String... identifierFilter);
-->
broadcast(Message message) and
broadcast(Message message, String identifierFilter)

:+1:


更新后无法载入，安装requirements出现错误

安装requirements时出现以下错误：
Collecting docopt>=0.6.0 (from psd-tools->-r requirements.txt (line 32))
Using cached docopt-0.6.2.tar.gz (25 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "C:\Users\Administrator\AppData\Local\Temp\pip-install-6r75t6nz\docopt_b13b1bd8dc90403b9d906e8d923b7952\setup.py", line 3, in
from docopt import version
ModuleNotFoundError: No module named 'docopt'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
启动comfyui出现以下提示：
dzNodes: LayerStyle -> Find 20 LUTs in D:\lut
dzNodes: LayerStyle -> Find 207 Fonts in C:\Windows\Fonts
Traceback (most recent call last):
File "D:\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1879, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 940, in exec_module
File "", line 241, in call_with_frames_removed
File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_LayerStyle_init.py", line 60, in
imported_module = importlib.import_module(".py.{}".format(name), name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "importlib_init_.py", line 126, in import_module
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_LayerStyle\py\loadpsd.py", line 8, in
from psd_tools import PSDImage
ModuleNotFoundError: No module named 'psd_tools'
Cannot import D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_LayerStyle module for custom nodes: No module named 'psd_tools'
Please 'pip install xformers'
Please 'pip install apex'
Please 'pip install xformers'

same

same   No module named 'psd_tools'

this works https://github.com/chflame163/ComfyUI_LayerStyle/issues/113#issuecomment-2141182990

https://github.com/GoogleCloudPlatform/gcloud-python-wheels/blob/master/wheelhouse/docopt-0.6.2-py2.py3-none-any.whl
下载上面的文件，然后手动安装，搞定了


Feature request: Make all config secrets templatable

Currently, we can't securely put alertmanager config in source control because secrets such as email smpt_auth_password must be in-lined in the config file.
Some configs like pagerduty service_key don't have the issue because they are templatable. Templates can easily be mounted individually as secrets without being part of source control, and then "referenced" by the config file.
My suggestion is to make all config secrets (documented here) tmpl_secrets instead. This would allow us to put the config file in source control without in-lining any secrets.

I'd suggest to adopt the practice of being able to source secrets from other file, like we do in prometheus (password_file).

Being able to read certain secrets from files isn't anything to do with avoiding putting secrets in files - they're still in files after all, and nothing prevents the usual pattern of checking in the config file with a placeholder and interpolation before laying it down.
Reading secrets also from separate files is supported only where it is common that the secret is updated/rotated by an automated process that's completely independent of the regular config file reload cycles (e.g. kubernetes bearer tokens), which I think is safe to say is not the case for any of the secrets that we're talking about in the alertmanager which are all very static with any rotation being rare and manual. In addition having only some templating fields come from separate files would be a bit weird and confusing, kinda similar to how users confuse some secrets being templatable for being a security feature rather than a risk.

The generic http_config block uses the password_file convention @roidelapluie referred to which is a convenient way of providing the basic_auth credentials in a secret for http-based alerts. It would be nice to be able to provide SMTP credentials in the same way.
@brian-brazil would you have any objection to the addition of a parameter like smtp_auth_password_file that would be mutually exclusive with smtp_auth_password? I'd be open to digging into the code and providing a PR.

What's your reason for wanting to add it? I've already covered how we approach these things in my above comment.

For consistency with the way we use secrets to pass basic_auth credentials for http-based clients. It's not obvious to me why SMTP credentials would be treated differently?

That was already answered in https://github.com/prometheus/alertmanager/issues/1704#issuecomment-679870168 above.

Reading secrets also from separate files is supported only where it is common that the secret is updated/rotated by an automated process that's completely independent of the regular config file reload cycles (e.g. kubernetes bearer tokens), which I think is safe to say is not the case for any of the secrets that we're talking about in the alertmanager

If you're referring to this, as best as I can understand, you seem to be grouping credentials into "dynamic" and "static" buckets to justify treating them differently.
Even if it were appropriate to lump plain basic_auth credentials into the "dynamic" bucket, it's not clear to me why alertmanager should think about them differently. What if I am deploying to an environment where the password for the SMTP service account is rotated on a daily basis? This distinction imposes AM's idea of what are "static" credentials, and makes it more inconvenient to use.

What if I am deploying to an environment where the password for the SMTP service account is rotated on a daily basis?

If you were, you would have provided that as your argument. However that is not the argument you provided, nor have I ever heard of such a setup. I prefer to base design decisions on users' actual use cases, not hypotheticals as those could be used to justify anything. I've already explained the reasoning, I don't feel the need to get involved in an further argument around this point.

I do agree with Brian, and I would also add that you can safely use the tools provided by your config management to store secrets in git, e.g. I am using ansible-vault for this purpose.

I prefer to base design decisions on users' actual use cases, not hypotheticals as those could be used to justify anything.

Do you think I would be spending my time posting on this issue, and even offering to even help code an enhancement, if this were just a hypothetical scenario that I dreamed up? Frequent rotation of credentials for production systems that you think of as "static" are a common practice, and it's a trend that will continue as secrets management in platforms like k8s makes it easier to do.
I hope you will reconsider this impediment to the use of AM in production scenarios at some point in the future, and I would be glad to help in whatever way I can. Thanks for your time.

It seems that all sides have been heard here, but anyway, the scope is beyond alertmanager as we'd like to keep this consistent within all the projects.
Can you please contact the Developers mailing list about your proposal: https://groups.google.com/g/prometheus-developers where more people will be able to discuss this matter, and we can adopt the same point of view in all the Prometheus projets.
Thanks!


feat(trading): show commission earned on referrer stats from last 30 days

Related issues 🔗
Closes #5203
Description ℹ
Show commission earned on referrer stats from last 30 days

@bglownia I think we should get a market-sim test made for this.
@dalebennett1992 Will have his referrals PR in soon that you can use as the base for the tests.
It might be worth speaking to dale before he leaves as he is set up on a windows machine.


Use UTC type for all datetimes in doctrine

Coverage increased (+0.006%) to 73.417% when pulling 4fa3e67975d9e1961c77e1e2d5d1f27217cdc774 on doctrine-utc-datetime into c2949d7617eb23458d5bf5be1813314191994ac1 on master.

Coverage increased (+0.006%) to 73.417% when pulling 4fa3e67975d9e1961c77e1e2d5d1f27217cdc774 on doctrine-utc-datetime into c2949d7617eb23458d5bf5be1813314191994ac1 on master.


Assets are not precompiled after modifying files inside app/javascript

Configuration is the same as: https://github.com/paketo-buildpacks/rails-assets/issues/35
It seems that the layer is always reused if app/assets checksum matches, this can be seen on:
https://github.com/paketo-buildpacks/rails-assets/blob/main/build.go#L47-L51
The expected behaviour is that if we modify anything inside app/javascript the assets are recompiled again.

Hey @matiasgarcia. Do you have documentation around the expected behavior regarding the app/javascript directory? From the rails asset pipeline docs, I don't see it referenced. https://guides.rubyonrails.org/asset_pipeline.html#how-to-use-the-asset-pipeline

Hi @genevieve docs should be in https://edgeguides.rubyonrails.org/webpacker.html. Both Webpacker and Sprockets live in a Rails 5/6 app.

We should also include lib/assets and vendor/assets in the checksum so that we recompile if they include changes: https://edgeguides.rubyonrails.org/asset_pipeline.html#asset-organization.


fix: Fix technical bugs in resource-scope documentation

Description
I discovered a few mistakes in the .rst documentation leading to incorrect display. Hopefully this fixes the problems. Is there any way to preview the site before merging?
QC

[x] The PR contains a test case for the changes or the changes are already covered by an existing test case.
[x] The documentation (docs/) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake).

Also labelled two other sections as belonging to Snakemake 7.11

No preview so far. One could generate an artifact after the docs are built in github actions and display it here for download though.


Comparison to MViTv2

Hi authors,
Thanks for sharing the work. Just curious: how does the compare to a recent MViTv2 work in terms of FLOPs/accuracy trade-off?
Thanks,
Junwei

Hi @JunweiLiang,
Thanks for your attentions about our work. Since LightViT mainly focuses on the light-weight models, we only have architecture variants with a largest FLOPs of 3.9G (LightViT-B). In contrast, the smallest network in MViTv2 variants is with 4.7G FLOPs (MViTv2-T). Therefore, we cannot directly compare the FLOPs-accuracy trade-off in these two papers. Maybe we will develop some variants of LightViT with larger FLOPs, so that it would be better to compare LightViT with other ViTs.


Facebook Login is broken in dummy app

We're seeing
ember.debug.js:17634 TypeError: Cannot add property nextObject, object is not extensible
    at Object.defineProperty (ember.debug.js:21542)
    at applyMixin (ember.debug.js:20576)
    at MixinPrototype.apply (ember.debug.js:20770)
    at Object.A (ember.debug.js:37397)
    at Class.init (query-string.js:35)
    at new Class (ember.debug.js:36118)
    at Function._ClassMixinProps.create (ember.debug.js:36306)
    at Class.buildQueryString (oauth2-code.js:110)
    at Class.buildUrl (oauth2-code.js:120)
    at Class.open (oauth2-code.js:137)

which is here.

This needs to be fixed in torii actually.


Groupe Capstone project :100:

Our group is consist of two people @kelwilson and @Said-laasri .
The link for the project

Hi Team,
Good job so far!
There are some issues that you still need to work on to go to the next project but you are almost there!
To Highlight 💯

Descriptive information ✔
Tasks are distributed equally ✔

Required Changes ♻

[ ] Kindly assign all tasks in your project as per this requirement. Now the group tasks aren't assigned to anyone.

Optional suggestions
Every comment with the [OPTIONAL] prefix is not crucial enough to stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better.
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.
Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.

As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.

Hi @Said-laasri,
Your project is complete!  There is nothing else to say other than... it's time to merge it :shipit:
Congratulations! 🎉
Optional suggestions
Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better. Some of them were simply missed by the previous reviewer and addressing them will really improve your application.
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.

As described in the Code reviews limits policy  you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.


Summarisation of user reviews

Going though a lot of user reviews takes time. Having a summary view of all the issues would be a great feature to have.

I'm interested in working on this issue!

Assgined.

@MadaraUchiha-314 Interested in working on this issue as well!
Will take a stab at it. :)


show available prebuilt themes in docs

Bug, feature request, or proposal:
feature request documentation
What is the expected behavior?
In the docs users should see a list of available prebuilt themes and a link to a sample page of each theme.
What is the current behavior?
No information of what themes are available and how they look like.
What are the steps to reproduce?
Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: https://goo.gl/DlHd6U
What is the use-case or motivation for changing an existing behavior?
I like to use this great library but the documentation could be improved to make the start easier.
Which versions of Angular, Material, OS, browsers are affected?
Is there anything else we should know?

@jelbourn
Issue question:
Where should these examples be created?
/src/lib/examples/theme-NameofTheme-overview ?
Just one and then reference the other defaults, or all 4 themes?
Extra question:
Also are there going to be more default themes? / a theme builder ?

We should list all of the prebuilt themes in the theming guide.
We will add more prebuilt themes before final.
We do want to add a theme builder to the docs site eventually, but that's more of a nice-to-have.

@M-a-c Are you looking into this?

Yeah I was going to tackle it Monday if thats ok. I don't have a pr for it right now.
I think this Add theming to docs should be re-added, for when there are more themes, before going gold.

Sounds good! Thanks.

Is sample link to each theme necessary ?
If its possible can someone open a P4 on the 'theme builder' and describe how it would work? I would love to work on something like that.

I think for now we only want to list all prebuilt theme paths in the theming guide.
We could do that with a Dgeni processor or just with gulp transform.

Reading up on Dgeni now, sorry for the confusion. I had no idea this existed. I was wondering how exactly this sorta magic happened. I'll dig for an example to figure this out.

I'm not sure this is something that needs to be done with tooling; the prebuilt themes will change infrequently enough that i'm okay with just manually listing them in the guide.

@jelbourn is it ok If I submit a pr for a static one, and open a less 'important task' for a tooled one later? I would like to try my hand at that, it might be useful to learn, and its one less thing to worry about later. Plus I would love to feel more comfortable with whats going on with the project so I can make larger contributions.

@DevVersion @jelbourn I'm a bit confused with who to follow, I'm pretty sure I'm more than half way done tooling a solution. Is it ok if I continue on that?

Please do what @jelbourn proposed.
I initially thought that a dynamic solution would be appropriated but since we don't have frequent changes with the prebuilt-themes I can see Jeremy's point.

@DevVersion Thanks for the clarification.

@DevVersion can you pr my pull request #3826 its small 🌮

@jelbourn This issue can be closed too 😃
Also is there a way that I can create a pr such that a merge closes the issue?

@M-a-c if your PR says "Fixes #3550" in the description it will close the issue automatically when merged.