Errors in context.portfolio.portfolio_value

Dear Catalyst Maintainers and @lacabra
Description of Issue
I'm trying to use context.portfolio.portfolio_value and context.portfolio.cash to limit when I can buy I sell assets and control my leverage and handle all kind of exception but there are two problems with these values.
First Error: Update context.portfolio and cotext.account immediately after transaction completed
context.portfolio and context.account take too long to be updated. These are updated in the next cycle of scheduling function. However, if you decide to purchase multiple assets/coins on the cycle it can lead to errors.
Ideally, once the order has been successfully completed (i.e someone bought my coins I bought the coins I wanted) it should instantly update the values of both context.portfolio and context.account.
Secon Error: Even in the next cycle, the calculations are sometimes erroneous.
Example:
symbol: 'USDT_ETH'
initial_capital = $10,000
set_commision(0.0) to ensure correct calculations.
First day: I only make one purchase of $9,000. Since I can only purchase integer amount only $8,991 are purchase.

Before Purchasing:

asset_price = $11.10
context.account.total_positions_value = $0.0
context.portfolio.portfolio_value = $10,000
context.portfolio.cash = $10,000

After Purchasing: These are manually calculated since we have to wait till next day for values to update

asset_price = $11.10
order['amount'] = 810
context.account.total_positions_value = $8,991 <-- same as (810 * $11.10)
context.portfolio.portfolio_value = $10,000 <-- doesn't update till next cycle
context.portfolio.cash = $1,009 <-- same as ($10,000 - $8,991)

Second Day: I will sell my assets/coins at a lose. I bought at $11.1 sold at $10.09. That should mean my portfolio_value should go down about 9% of the 9k invested.

Before Selling:

asset_price = $10.09
order['amount'] = 810
context.account.total_positions_value = $8,172.89 <-- correct: shows the devaluation in my assets
context.portfolio.portfolio_value = $10,000 <-- correct: still havent sold
context.portfolio.cash = $1,827. <-- WRONG: It should be the $1,009 left from the first purchase since I haven't sold yet. Somehow it's subtracting `portfolio_value - total_positions_value` ands that's not the available cash.

context.portfolio.cash should be the $1,009 left from the first purchase since I haven't sold yet. Somehow it's subtracting portfolio_value - total_positions_value ands that's not the available cash.

After Selling: These are manually calculated and should match the Third-day values since I just sold everything

asset_price = $10.09
order['amount'] = 0 <-- since I sold all my shares.
context.account.total_positions_value = $0.0 <-- since I will sold all my shares
context.portfolio.portfolio_value = $9,181.9 <-- I lost value since I sold at a lost
context.portfolio.cash = $9,181.9 <-- I sold at a lost and sold everything so now this is same as portfolio_value

Third Day: Nothing will be done this day, except confirm values

After Selling: These values should be the same as Second Day After Selling

order['amount'] = 0 <-- correct
context.account.total_positions_value = $0.0 <-- correct.
context.portfolio.portfolio_value = $9,991 <-- incorrect
context.portfolio.cash = $9,991 <-- incorrect

Conclusion
Somehow I made a bad trade where I bought at a higher price than what I sold at. Yet the portfolio only reflects that I lost the 9 dollars that I was unable to buy because I can only buy integer number of shares. So those $9 dollars are lost, but that will be fixed once we are able to buy decimal values.
However, two other errors occur:

Where are the $818.18 dollars I should have lost from this bad trade?
On the Second Day, why did it reported to have more cash than it was available?

I believe the root of these errors have to do with how context.portfolio.cash is calculated.
It seems to be doing:
context.portfolio.cash = context.portfolio.porfolio_value - context.account.total_positions_value
But this is wrong since context.account.total_positions_value shows the updated devaluation of your assests due to price change. In this case cash should have updated when total_positions_value decreased. Once the cash value is correct it will also correct the context.porfolio_value which should be:
context.portfolio.porfolio_value = context.portfolio.cash + context.account.total_positions_value
Once cash value calculation is correct then the above formula for portfolio_value should be fixed.
Sincerely,
avn3r

I'm curious to hear from you if the second issue you report has been addressed with the 0.2.dev3 release that implements trading of fractional coins?

Yes, it seems to be fixed now, all the numbers are adding up perfectly. I'll edit the issue request to just the first error.
With respect to the first error. Basically, it will be nice to have a flag of when the transaction is completed to update the profile and account. that way I can do a waiting while_loop where I wait till the transaction is completed to move forward or if taking too long to complete the transaction I can cancel it.


Updated Project Portfolio and  Developer Guide with UI section

Coverage remained the same at 47.402% when pulling 320eb6d8a940791da2fc9fd40f3c5a98ce8cd74f on kianhong95:ProjectPortfolio into e3ed1a31d244c987dbbbd98d3416b316ff6587b2 on CS2113-AY1819S1-F09-2:master.

Look fine to me, I am going to merge it


Single host internal network suddenly becomes disconnected

Rancher versions:
rancher/server: 1.6.10
rancher/agent: 1.2.6
Infrastructure Stack versions:
healthcheck: 0.3.3
Docker version: (docker version,docker info preferred)
Containers: 23
Running: 22
Paused: 0
Stopped: 1
Images: 32
Server Version: 1.12.6
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 224
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: apparmor seccomp
Kernel Version: 4.8.0-58-generic
Operating System: Ubuntu 16.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 31.16 GiB
Name: db-1
ID: WM6W:RH7N:3UHE:GVKG:KNG7:FRPM:YMAX:VKE4:Q4TI:5RA2:25B3:AYIT
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Insecure Registries:
<IP_ADDRESS>/8
Operating system and kernel: (cat /etc/os-release, uname -r preferred)
Ubuntu
4.8.0-58-generic
Type/provider of hosts: (VirtualBox/Bare-metal/AWS/GCE/DO)
Bare metal
Setup details: (single node rancher vs. HA rancher, internal DB vs. external DB)
single node, internal db
Environment Template: (Cattle/Kubernetes/Swarm/Mesos)
Cattle
Steps to Reproduce:
3 different environments, between 3-8 host machines per environment
Results:
Suddenly a host will become disconnected from the rancher internal network.  I can ping inside the same machine.  I can ping out to the internet.  But I can't ping other hosts from inside that host.  Other hosts can ping services inside each other, but not ping services inside of that host.  It's happening to a random host every 1-2 days.  It happens on different environments.
time="2017-10-19T03:41:12Z" level=warning msg="Hit websocket pong timeout. Last websocket ping received at 2017-10-19 03:40:57.665948396 +0000 UTC. Closing connection."
time="2017-10-19T03:41:12Z" level=error msg="Received error reading from socket. Exiting." error="read tcp x.x.x.x:60036->y.y.y.y:443: use of closed network connection"
time="2017-10-19T03:41:12Z" level=error msg="Failed to connect to websocket proxy: %vread tcp x.x.x.x:60036->y.y.y.y:443: use of closed network connection"
time="2017-10-19T03:41:19Z" level=error msg="Error processing event &events.Message{Status:\"die\", ID:\"b3b106b02868d466dba5767846ab554558e5e12176f8d02da17748d48b406e69\", From:\"rancher/scheduler:v0.8.2\", Type:\"container\", Action:\"die\", Actor:events.Actor{ID:\"b3b106b02868d466dba5767846ab554558e5e12176f8d02da17748d48b406e69\", Attributes:map[string]string{\"image\":\"rancher/scheduler:v0.8.2\", \"io.rancher.container.mac_address\":\"02:c6:26:18:5d:73\", \"io.rancher.container.uuid\":\"5433fbb8-dbbc-479d-a649-3ae5439af891\", \"io.rancher.environment.uuid\":\"3eaf60dc-e00d-4ad7-a135-a8af3afe7841\", \"io.rancher.stack.name\":\"scheduler\", \"io.rancher.stack_service.name\":\"scheduler/scheduler\", \"io.rancher.cni.wait\":\"true\", \"io.rancher.container.agent_service.scheduling\":\"true\", \"io.rancher.container.create_agent\":\"true\", \"io.rancher.container.ip\":\"<IP_ADDRESS>/16\", \"io.rancher.container.system\":\"true\", \"io.rancher.service.launch.config\":\"io.rancher.service.primary.launch.config\", \"exitCode\":\"0\", \"io.rancher.cni.network\":\"ipsec\", \"io.rancher.container.name\":\"scheduler-scheduler-1\", \"io.rancher.project.name\":\"scheduler\", \"io.rancher.service.deployment.unit\":\"a9434bff-c73a-405c-8c66-eb0f9b2c16be\", \"io.rancher.container.agent_id\":\"396\", \"io.rancher.project_service.name\":\"scheduler/scheduler\", \"io.rancher.service.hash\":\"ed6a3f7d68f4dde633fb9fe6e844e637215435d4\", \"name\":\"r-scheduler-scheduler-1-5433fbb8\"}}, Time:1508384469, TimeNano:1508384469139165620}. Error: Post https://rancher.zzz.com/v1/containerevents: net/http: request canceled (Client.Timeout exceeded while awaiting headers)"
time="2017-10-19T03:41:27Z" level=error msg="Failed to get rancher client for host-api startup: Get https://rancher.zzz.com/v1: net/http: request canceled (Client.Timeout exceeded while awaiting headers)"
time="2017-10-19T03:41:42Z" level=error msg="Failed to get rancher client for host-api startup: Get https://rancher.zzz.com/v1: net/http: request canceled (Client.Timeout exceeded while awaiting headers)"
time="2017-10-19T03:41:57Z" level=error msg="Failed to get rancher client for host-api startup: Get https://rancher.zzz.com/v1: net/http: request canceled (Client.Timeout exceeded while awaiting headers)"
time="2017-10-19T03:42:02Z" level=info msg="Hit websocket pong timeout. Last websocket ping received at 2017-10-19 03:40:57.593272429 +0000 UTC. Closing connection."
INFO: Starting agent for 29ACEACBE6C1242665AE
INFO: Starting agent for 29ACEACBE6C1242665AE
INFO: Starting agent for 29ACEACBE6C1242665AE
INFO: Starting agent for 29ACEACBE6C1242665AE
INFO: Access Key: 29ACEACBE6C1242665AE
INFO: Config URL: https://rancher.zzz.com/v1
INFO: Storage URL: https://rancher.zzz.com/v1
INFO: API URL: https://rancher.zzz.com/v1
INFO: IP: x.x.x.x
INFO: Port:
INFO: Required Image: rancher/agent:v1.2.6
INFO: Current Image: rancher/agent:v1.2.6
INFO: Using image rancher/agent:v1.2.6
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
INFO: Downloading agent https://rancher.zzz.com/v1/configcontent/configscripts
INFO: Updating configscripts
INFO: Downloading https://rancher.zzz.com/v1//configcontent//configscripts current=
INFO: Running /var/lib/cattle/download/configscripts/configscripts-1-f0f3fb2e1110b5ada7c441705981f93a480313a324294321cff467f0c3e12319/apply.sh
INFO: Sending configscripts applied 1-f0f3fb2e1110b5ada7c441705981f93a480313a324294321cff467f0c3e12319
INFO: Updating pyagent
INFO: Downloading https://rancher.zzz.com/v1//configcontent//pyagent current=
INFO: Running /var/lib/cattle/download/pyagent/pyagent-1-9e3dcab12585149a65d818082279708965cd826df1937a55b24f48428f8f0c0644fc1033b5be15c88dcf9540b1c04c67/apply.sh
INFO: Updating host-api
INFO: Downloading https://rancher.zzz.com/v1//configcontent//host-api current=1-9608ead804f8cebbfe95b9f114701d8a5ac4244d603d196068043c902b1a0bdf
INFO: Already up to date
INFO: Sending host-api applied 1-9608ead804f8cebbfe95b9f114701d8a5ac4244d603d196068043c902b1a0bdf
INFO: Updating python-agent
INFO: Downloading https://rancher.zzz.com/v1//configcontent//python-agent current=1-006597b7de613bf359a79e8eec7b7c3b114e6f49584aa04993d3163f3fab9f37
INFO: Already up to date
INFO: Sending python-agent applied 1-006597b7de613bf359a79e8eec7b7c3b114e6f49584aa04993d3163f3fab9f37
INFO: Sending pyagent applied 1-9e3dcab12585149a65d818082279708965cd826df1937a55b24f48428f8f0c0644fc1033b5be15c88dcf9540b1c04c67
INFO: Starting agent /var/lib/cattle/pyagent/apply.sh
INFO: Executing /var/lib/cattle/pyagent/agent
INFO: Updating host-config
INFO: Downloading https://rancher.zzz.com/v1//configcontent//host-config current=host-config-1-5b8d58878ed11fbf976b700d9cdecdfadfacbb901812d2758e139ff6f46ba6e5
INFO: Already up to date
INFO: Sending host-config applied 1-5b8d58878ed11fbf976b700d9cdecdfadfacbb901812d2758e139ff6f46ba6e5
time="2017-10-19T03:50:01Z" level=info msg="Launching agent"
time="2017-10-19T03:50:01Z" level=info msg="Listening for events on https://rancher.zzz.com/v1"
time="2017-10-19T03:50:01Z" level=info msg="launching hostapi"
time="2017-10-19T03:50:01Z" level=info msg="Serialize compute requests: false, driver: aufs"
time="2017-10-19T03:50:01Z" level=info msg="Initializing event router" workerCount=250
time="2017-10-19T03:50:01Z" level=info msg="Starting event router."
time="2017-10-19T03:50:01Z" level=info msg="Connection established"
time="2017-10-19T03:50:01Z" level=info msg="Starting websocket pings"
time="2017-10-19T03:50:01Z" level=info msg="Connecting to proxy." url="wss://rancher.zzz.com/v1/connectbackend?token=zzz"
time="2017-10-19T03:50:10Z" level=info msg="Received event: Name: storage.image.activate, Event Id: 95048d17-2ffd-4957-ae26-2ca0f66ed8cf, Resource Id: 1ispm2712"
time="2017-10-19T03:50:10Z" level=info msg="Reply: 95048d17-2ffd-4957-ae26-2ca0f66ed8cf, storage.image.activate, 1ispm2712:imageStoragePoolMap"
time="2017-10-19T03:50:10Z" level=info msg="Received event: Name: storage.volume.activate, Event Id: 3c0c66ab-e5de-4211-b565-b42506be36cb, Resource Id: 1vspm3505"
time="2017-10-19T03:50:10Z" level=info msg="Reply: 3c0c66ab-e5de-4211-b565-b42506be36cb, storage.volume.activate, 1vspm3505:volumeStoragePoolMap"
time="2017-10-19T03:50:11Z" level=info msg="Received event: Name: compute.instance.activate, Event Id: c0f15d50-fd75-43c3-b566-90c719b75b34, Resource Id: 1ihm2716"
time="2017-10-19T03:50:11Z" level=info msg="rancher id [2848]: Container with docker id [8256bd105752a32fce4106264a3d087b439bbd37e6e20a7adae4149198a86734] has been started"
time="2017-10-19T03:50:11Z" level=info msg="Reply: c0f15d50-fd75-43c3-b566-90c719b75b34, compute.instance.activate, 1ihm2716:instanceHostMap"
time="2017-10-19T03:50:13Z" level=info msg="Received event: Name: compute.instance.inspect, Event Id: 76ed316f-f277-488f-bf45-58ba4640a6e4, Resource Id: "
time="2017-10-19T03:50:13Z" level=info msg="rancher id []: Container with docker id [b3b106b02868d466dba5767846ab554558e5e12176f8d02da17748d48b406e69] has been inspected"
time="2017-10-19T03:50:13Z" level=info msg="Reply: 76ed316f-f277-488f-bf45-58ba4640a6e4, compute.instance.inspect, :instanceInspect"
time="2017-10-19T03:50:21Z" level=info msg="Received event: Name: storage.volume.remove, Event Id: ce453e25-e3d2-4c11-a49b-0270ae15c7aa, Resource Id: 1vspm820"
time="2017-10-19T03:50:21Z" level=info msg="Received event: Name: storage.volume.remove, Event Id: 4121ba4c-1207-4a85-bcc5-89b615e5d56a, Resource Id: 1vspm3445"
time="2017-10-19T03:50:21Z" level=info msg="rancher id [1vspm3445]: Volume with name [] has been removed"
time="2017-10-19T03:50:21Z" level=info msg="Reply: 4121ba4c-1207-4a85-bcc5-89b615e5d56a, storage.volume.remove, 1vspm3445:volumeStoragePoolMap"
time="2017-10-19T03:50:21Z" level=info msg="rancher id [1vspm820]: Volume with name [] has been removed"
time="2017-10-19T03:50:21Z" level=info msg="Reply: ce453e25-e3d2-4c11-a49b-0270ae15c7aa, storage.volume.remove, 1vspm820:volumeStoragePoolMap"
time="2017-10-19T03:50:22Z" level=info msg="Received event: Name: storage.volume.activate, Event Id: dc8f2060-0944-4e9a-bd64-bc4e10484266, Resource Id: 1vspm3506"
time="2017-10-19T03:50:22Z" level=info msg="Reply: dc8f2060-0944-4e9a-bd64-bc4e10484266, storage.volume.activate, 1vspm3506:volumeStoragePoolMap"
time="2017-10-19T03:50:22Z" level=info msg="Received event: Name: compute.instance.activate, Event Id: 6c36db9d-ee57-486b-9fbd-7dd8bbdd803e, Resource Id: 1ihm2717"
time="2017-10-19T03:50:22Z" level=info msg="Reply: 6c36db9d-ee57-486b-9fbd-7dd8bbdd803e, compute.instance.activate, 1ihm2717:instanceHostMap"
time="2017-10-19T03:50:31Z" level=info msg="Received event: Name: storage.volume.remove, Event Id: 8acaf16f-78c0-42f6-99c7-473ac8f25211, Resource Id: 1vspm3506"
time="2017-10-19T03:50:31Z" level=info msg="rancher id [1vspm3506]: Volume with name [] has been removed"
time="2017-10-19T03:50:31Z" level=info msg="Reply: 8acaf16f-78c0-42f6-99c7-473ac8f25211, storage.volume.remove, 1vspm3506:volumeStoragePoolMap"
time="2017-10-19T03:50:36Z" level=info msg="Received event: Name: storage.volume.remove, Event Id: c9c84a71-93fe-4590-860e-7665cfde8aac, Resource Id: 1vspm3495"
time="2017-10-19T03:50:36Z" level=info msg="rancher id [1vspm3495]: Volume with name [] has been removed"
time="2017-10-19T03:50:36Z" level=info msg="Reply: c9c84a71-93fe-4590-860e-7665cfde8aac, storage.volume.remove, 1vspm3495:volumeStoragePoolMap"

Are you saying you also have network connectivity issues on the host itself? How are the specs and how is the health of the system (load/mem/swap/disk)
Also, ifconfig output could be handy here.
Is there anything in front of the rancher/server?

The host is in good shape load/mem/swap/disk -wise.  The host has network connectivity out to the internet just fine.  I haven't tried pinging internal rancher services from the host.  I fixed the issues already and the machines are working.  If it happens again I can try the other ping and do an ifconfig.
We have cloudflare orange cloud in front of the rancher/server machine.  It looks like cloudflare recycles socket connections every once in a while.  I'm wondering if rancher has a hard time re-establishing the connection when the socket drops sometimes?  It's worked fine in the past on earlier versions of rancher.  The issue seemed to start recently.

Ok, if you could collect those and report back, that would be great. Earlier versions are all before v1.6.10?
Also, if you can't ping other hosts from a host, that's not really related to something in front of rancher/server. The errors in the log could be however.

Another host went down today in the way I described above.  I did some research and found that the host that disconnected could ping other host machines fine.  But if I tried from the down host machine to ping the ip address of a container on another host that would fail.

Please supply logs from rancher/server and affected rancher/agent so we can investigate, pretty hard to say anything about this.

Hi,
I think i have the same issue :
host setup :
Containers: 19
Running: 16
Paused: 0
Stopped: 3
Images: 19
Server Version: 1.12.6
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 208
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: host overlay bridge null
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: apparmor seccomp
Kernel Version: 4.4.0-57-generic
Operating System: Ubuntu 16.04.1 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 3.674 GiB
Name: sat-aws-14
ID: BVMH:NNAB:CNBF:GBCZ:BYLJ:AIYU:RP2B:KX4G:CPCH:RDM3:CE4Z:JFB4
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Labels:
provider=amazonec2
Insecure Registries:
<IP_ADDRESS>/8
Rancher : 1.6.10  (cattle)
container rancher running on the given host :

rancher/healthcheck:v0.3.3
rancher/net:v0.11.9
rancher/dns:v0.15.3
rancher/net:holder
rancher/network-manager:v0.7.8
rancher/net:v0.11.9
rancher/metadata:v0.9.4
rancher/agent:v1.2.6

What i can tell :
From times to times containers on host A or the host A cannot ping a container on host B
It will not work until i restart IPSEC. Then (whithout doing anything else) everything goes back to normal.
The host is not disconnected or anything, it just looks like part of the network was lost. Usually it does not affect the entire network meaning maybe A cannot reach a container on host B but can reach a container on host C.
We had this issue multiple times and restarting rancher infrastructure containers seems to fix the issue. However it might come back latter on.
Attaching logs for IPSEC as well as the agent and rancher. (before restarting to fix the issue)
We have nothing in front of rancher no proxy nothing.
Please let me know if the format is wrong or if you need anything else.
agent.log
ipsec.log
rancher.log

There have been quite some improvements on ipsec regarding dropping connections. Please try v1.6.14.
@asciiman If you are still experiencing issues, let me know so we can investigate.

Fixed by upgrading to rancher/server:stable and updating internal services
Thanks


Build crash [Android]

Is this a bug report?
No

Have you read the Contributing Guidelines?
No
Environment
Environment:
OS: macOS Sierra 10.12.6
Node: 8.4.0
Yarn: 1.3.2
npm: 5.5.1
Watchman: 4.7.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 2.3 AI-162.4069837
Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: 0.51.0 => 0.51.0
Target Platform: iOS (8.0)
Steps to Reproduce

Expected Behavior

my project should run.
Actual Behavior

Android build built successfully but crashing on Launch.
Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

my Package.json looks like :
{
"name": "LuxSocial",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.0.0",
"react-native": "0.51.0",
"react-native-fcm": "^10.0.3",
"react-native-image-progress": "^1.0.1",
"react-native-iphone-x-helper": "^1.0.1",
"react-native-keyboard-aware-scroll-view": "^0.4.1",
"react-native-loading-spinner-overlay": "^0.5.2",
"react-native-modal-dropdown": "^0.5.0",
"react-native-read-more-text": "^1.0.0",
"react-native-router-flux": "^3.41.0",
"react-native-splash-screen": "^3.0.6",
"react-native-vector-icons": "^4.4.2",
"react-redux": "^5.0.6",
"redux": "^3.7.2",
"redux-thunk": "^2.2.0"
},
"devDependencies": {
"babel-jest": "21.2.0",
"babel-preset-react-native": "4.0.0",
"eslint": "^4.14.0",
"eslint-plugin-react": "^7.5.1",
"jest": "21.2.1",
"react-test-renderer": "16.0.0"
},
"jest": {
"preset": "react-native"
}
}

@ershubhamgarg did you fix it? :)


chore: bump up node to 20 and fix vulnerabilities

why
A warning is being displayed from GitHub Actions.
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: slack-workflow-status@master. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

what i did
As title

Hi @d-seion - is there a reason why you closed this PR? We would love to accept your contribution

@rsyvarth
I closed this Pull Request temporarily as it was untested. After conducting tests, I have reopened it, so please review it

Looks good!


Aniwave extension is not working

Source information
Aniwave 14.74 (English)
Source language
English
Steps to reproduce

Expected behavior
Show episodes
Actual behavior
Giving this error "JsonDecoding Exception: Unexpected JSON token at offset 23: Expected string literal but 'null' literal was found at path: $.result
Use 'coerceInputValues = true' in 'Json {}' builder to
coerce nulls if property has a default value. JSON input: {"status":403,"result":null,"message":"Request is invalid.","messages":["Request is invalid."]}"
Aniyomi version
<IP_ADDRESS>
Android version
Android 14
Other details
No response
Acknowledgements

[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
[X] I have written a short but informative title.
[X] I have updated the app to version <IP_ADDRESS>.
[X] I have updated all installed extensions.
[X] I have tried the troubleshooting guide.
[X] If this is an issue with the app itself, I should be opening an issue in the app repository.
[X] I will fill out all of the requested information in this form.

Can confirm that I've been getting this error too, but was also receiving a 404 HTTP error before that whenever I tried watching episodes.

It seems that this may be an issue with the VRF tokens. Consider the code that fetches the episodes for a given anime. At the return, a GET request is sent to /ajax/episode/list with a VRF token generated from the anime ID and an encryption key. Looking at similar entries in the Wayback Machine and sorting them by newest, there are many records as recent as yesterday that do resolve with the correct data:
{
    "status": 200,
    "result": "[HTML data omitted for brevity]"
}

I don't know much about VRF tokens, but my understanding is that they are a kind of temporal access key. Providing any incorrect or outdated VRF token resolves with the JSON input observed in the error message.
It also seems that Aniwave recently made updates to their VRF tokens, judging by how these got considerably longer from August 16 onwards (which corresponds to when this problem started). Updating the encryption key to match Aniwave's new VRF tokens might solve this issue.


Update product description help text in CMS

Pre-Flight checklist

[x] Screenshots and design review for any changes that affect layout or styling

[x] Desktop screenshots

[x] Migrations

[x] Migration is backwards-compatible with current production code

[x] Testing

[x] Code is tested
[x] Changes have been manually tested

What are the relevant tickets?
Closes #179
What's this PR do?

Updates the help text for the description field in the product/course model

How should this be manually tested?

Visit any existing course page or create a new one under the courses page
Hover over the description field and you should see an updated description message (See screenshot for ref)

Screenshots (if appropriate)

@briangrossman Can you take a look at the screenshot in the description and let me know if there are any concerns.

@briangrossman Can you take a look at the screenshot in the description and let me know if there are any concerns.

@arslanashraf7 : Screen shot looks good to me 👍

Codecov Report

Merging #201 (626e209) into main (7c1eade) will increase coverage by 6.29%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #201      +/-   ##
==========================================
+ Coverage   90.71%   97.01%   +6.29%
==========================================
  Files         214      121      -93
  Lines        6279     2780    -3499
  Branches      309        0     -309
==========================================
- Hits         5696     2697    -2999
+ Misses        496       83     -413
+ Partials       87        0      -87

Impacted Files
Coverage Δ

courses/messages.py

users/management/commands/block_users.py

main/message.py

openedx/api.py

main/context_processors.py

authentication/middleware.py

openedx/tasks.py

cms/exceptions.py

users/models.py

openedx/__init__.py

... and 82 more

Continue to review full report at Codecov.

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


Implement stateless protocol decoders

For UDP (or potentially any other connectionless protocol) decoders we can't save deviceId in the object variable because same decoder instance is used for all devices.

This is already supported.


Missing UTF-8 support, environment variable LANG not set

Environment variable LANG not set, leading to missing UTF-8 support and Jenkins unable to handle non ASCII characters.
Workaround To get UTF-8 support add following to Dockerfile
ENV LANG="en_US.UTF-8"

You can also just set that env variable on the pod/container you're running, I would assume?

In general we don't explicitly set a LANG on any of our images.

I can make my own jenkins, with a dockerfile like:
FROM openshift/jenkins-2-centos7
COPY plugins.txt /opt/openshift/configuration/plugins.txt
RUN /usr/local/bin/install-plugins.sh /opt/openshift/configuration/plugins.txt
ENV LANG="en_US.UTF-8"

I would prefer using using the solution right out of the box, and I expect more users not to familiar with such configurations ending up spending much time chasing down the problem and finding a solution.
In the container UTF-8 is already set for Jenkins, but the shell where it is running is not. The effect is that I can make a new project in Jenkins with non ASCII characters like Å (LATIN CAPITAL LETTER A WITH RING ABOVE) and it will show correctly in the GUI, however I can not delete it as java.nio access to delete the work area will throw an exception, the same goes for working with source files having UNICODE letters in their path.
A short example from  running bash in a openshift/jenkins-2-centos7 container:
(Probably need UNICODE support in browser to )
Create file and show ls output:
$ docker exec -i -t $(docker ps|grep jenkins|awk '{print $1}') bash
bash-4.2$ touch /tmp/æøå_ÆØÅ.tmp
bash-4.2$ ls -lrt /tmp/*.tmp
-rw-r--r--. 1 default root   90382 Apr 25 05:13 jffi7904311933604650928.tmp
-rw-r--r--. 1 default root       0 Apr 25 05:17 ????????_??????.tmp

Setting LANG and filename is shown correctly:
bash-4.2$ export LANG="en_US.UTF-8"
bash-4.2$ ls -lrt /tmp/*.tmp
-rw-r--r--. 1 default root   90382 Apr 25 05:13 jffi7904311933604650928.tmp
-rw-r--r--. 1 default root       0 Apr 25 05:17 åæøå_ÆØÅ.tmp

Jenkins is started with file.encoding UTF8
bash-4.2$ ps -ef |grep java
default       1      0 15 05:12 ?        00:00:54 java -XX:+UseParallelGC -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m -Duser.home=/var/lib/jenkins -Dfile.encoding=UTF8 -jar /usr/lib/jenkins/jenkins.war
default     188    137  0 05:18 ?        00:00:00 grep java

Thanks for the additional background.  I've got an open PR to add the variable:
https://github.com/openshift/jenkins/issues/280


how to solve this

def extract_fingerprints():
all_fingerprinted_images = []
all_fingerprints = []
bitwise_accuracy = 0
BATCH_SIZE = args.batch_size

# transform gt_fingerprints to
gt_fingerprints  = "0100"
fingerprint_size = len(gt_fingerprints)
'''z = torch.zeros((args.batch_size, fingerprint_size), dtype=torch.float)
for (i, fp) in enumerate(gt_fingerprints):
    z[:, i] = int(fp)
z = z.cuda()'''
# xiu
fingerprint_batch = torch.tensor([[int(c) for c in gt_fingerprints]] * BATCH_SIZE, dtype=torch.float32)
z = fingerprint_batch.cuda()
# xiu

dataloader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=False, num_workers=0)
#dataloader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=False, num_workers=0)

for images, _ in tqdm(dataloader):
    images = images.to(device)
    #xiu
    batch_size = images.shape[0]
    if batch_size != BATCH_SIZE:
        fingerprint_batch = torch.tensor([[int(c) for c in gt_fingerprints]] * batch_size, dtype=torch.float32)
        z = fingerprint_batch.cuda()
    #xiu
    fingerprints = RevealNet(images)
    fingerprints = (fingerprints > 0).long()

    #bitwise_accuracy += (fingerprints[: images.size(0)].detach() == z[: images.size(0)]).float().mean(dim=1).sum().item()
    #xiu
    bitwise_accuracy += (fingerprints.detach() == z[: batch_size]).float().mean(dim=1).sum().item()

    all_fingerprinted_images.append(images.detach().cpu())
    all_fingerprints.append(fingerprints.detach().cpu())

dirname = args.output_dir
# if not os.path.exists(dirname):
#     os.makedirs(dirname)

all_fingerprints = torch.cat(all_fingerprints, dim=0).cpu()
bitwise_accuracy = bitwise_accuracy / len(all_fingerprints)
print(f"Bitwise accuracy on fingerprinted images: {bitwise_accuracy}") # non-corrected

error
Traceback (most recent call last):
File "detect_watermark_cifar10.py", line 195, in
main()
File "detect_watermark_cifar10.py", line 191, in main
extract_fingerprints()
File "detect_watermark_cifar10.py", line 136, in extract_fingerprints
bitwise_accuracy += (fingerprints.detach() == z[: batch_size]).float().mean(dim=1).sum().item()
RuntimeError: The size of tensor a (64) must match the size of tensor b (4) at non-singleton dimension 1

sorry to bother you I think the problem is the decoder return a (64,64) tensor ,but thr correct size should be (64,4) so if the model is the problem?

Thank you for the interest in the work.
A first impression: there are some dimension issues in your code, and it should be mentioned that the resolution for cifar is 32x32, otherwise it is 64x64 for all other datasets.
I will take a look at your case. Before that, you can provide the arguments used in your code. e.g., dataset, hyperparameter, etc.

ok i think where is the problem when i train the encoder and decoder the bit length is 64 but the detect is 0100 is 4


Document how to clear the start and end expiration months in Build Pallet

When using a QR code to scan a box, the product and expiration date will default to whatever the previous box contained -- including the beginning and ending months.  That is valid behavior.  The product and expiration date can be adjusted as needed.  However, if the previous box had a non-zero start and end month, the start and end month for this box cannot be set back to zero.

Alternately allow the start and end months to be reset to zero to clear


adds aws-publish task for deploying to S3

For deploying to AWS S3 😸  #246
cc: @nsonnad @yanofsky
Instructions:

$ cp config.json.example config.json
populate config.json file with your S3 options/creds.
$ gulp publish

console output:
[21:21:52] Using gulpfile ~/projects/Chartbuilder/gulpfile.js
[21:21:52] Starting 'publish'...
[21:21:55] [create] cdnassets/chartbuilder/index.html
[21:21:56] [create] cdnassets/chartbuilder/css/main.css
[21:21:59] [create] cdnassets/chartbuilder/js/main.js
[21:21:59] Finished 'publish' after 6.09 s

@yanofsky Any objections?

Thanks @bradoyler! One thing, shouldn't the publish task require the build task to be completed first?  Eg
gulp.task('publish', ['build'], function() { ... })

That's prolly a good idea. Although I always run build first anyway.

@nsonnad cool to merge now? Then I'll get cracking on #165 😈

Hey Brad, thanks. I made a couple minor changes here https://github.com/Quartz/Chartbuilder/pull/252 (sorry to create a new PR, but github won't let me edit your filez)

moved/renamed gulp/aws-config.json -- was a bit confusing to have multiple config files.
added an npm script so that you can npm run aws and don't need global gulp
added some docs.

Can you verify that that is all good, and if so, we can merge it in. Thanks again!

close in favor of #252


License on pypy is INTERNAL

On https://github.com/openshift/doozer/blob/master/setup.py#L24 we say that license is internal, but then we publish the code... shouldn't it be adapted and add a proper LICENSE file to this repo?
Thanks

Good catch. I'll update that soon... this used to be purely internal and that just never got updated.

Thanks Adam, it will be also good to add a LICENSE file to the repo :-)


Some codes might can be further normalized?

Bug Reports

5.0.1
R build tools 3.4.1
windows 10

My R package for the VIC model has been completed and I try to release it to CRAN. However there is still one WARNING in the R CMD Check (the R packages with ERROR or WARNING would not pass):
* checking whether package 'VICmodel' can be installed ... WARNING
Found the following significant warnings:
  vic/vic_run/src/CalcBlowingSnow.c:308:1: warning: control reaches end of non-void function [-Wreturn-type]
  vic/vic_run/src/CalcBlowingSnow.c:487:1: warning: control reaches end of non-void function [-Wreturn-type]
  vic/drivers/shared_all/src/input_tools.c:44:1: warning: control reaches end of non-void function [-Wreturn-type]
  vic/drivers/shared_all/src/input_tools.c:135:1: warning: control reaches end of non-void function [-Wreturn-type]
  vic/drivers/shared_all/src/input_tools.c:169:1: warning: control reaches end of non-void function [-Wreturn-type]
  vic/drivers/shared_all/src/input_tools.c:224:1: warning: control reaches end of non-void function [-Wreturn-type]
  vic/drivers/shared_all/src/input_tools.c:276:1: warning: control reaches end of non-void function [-Wreturn-type]
  vic/drivers/shared_all/src/input_tools.c:300:1: warning: control reaches end of non-void function [-Wreturn-type]
  vic/drivers/shared_all/src/print_library_shared.c:51:9: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:71:9: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:158:5: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:159:5: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:260:5: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:261:5: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:263:13: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:268:9: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:269:9: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:271:17: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:273:17: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:274:9: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:276:17: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:278:5: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:299:5: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:476:5: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:477:5: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:478:5: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:479:5: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:480:5: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:483:5: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:485:5: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:493:5: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:524:5: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:541:9: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:567:5: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:568:5: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:579:17: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:582:13: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:618:9: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:622:9: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:648:17: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:651:13: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:1147:5: warning: too many arguments for format [-Wformat-extra-args]
  vic/drivers/shared_all/src/print_library_shared.c:1206:5: warning: too many arguments for format [-Wformat-extra-args]

If it is proper and useful I could help to revised those problems.
And the source code of the R package have been upload to GitHub (https://github.com/Sibada/VICmodel) and welcome to try and comment.

@Sibada - a pull request fixing any of these warnings would be appreciated.


Expand entity

Related issues
Refs: fixes #152.
Describe the changes made in this pull request

Create definitions for objects duplicated over person and entity
Add all entity fields
Fixes #152
According to https://json-schema.org/understanding-json-schema/reference/combining.html#id5, proper fixing of #103 in JSON Schema cannot be done with draft 7, hints to fixing in draft 8 though
Fix bad tel definition, add tel ref
Add test data for entity

Instructions to review the pull request
git clone this repo
git checkout this branch
python3 -m venv env
source env/bin/activate
pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
python3 schema_poc.py -d data.yml -s schema.json  # <- should be quiet

Closing as set against wrong branch.


Back Button not Working

I was looking for a method similar to [self.navigationController popViewControllerAnimated:YES]; Using the SWRevealViewController.
my problem is I go from View 1 to View 2 and I want to be able to press a back button and go back View 1.
here is how I get to View 2
swSegue.performBlock = ^(SWRevealViewControllerSegue* rvc_segue, UIViewController* svc, UIViewController* dvc) {
        UINavigationController* navController = (UINavigationController*)self.revealViewController.frontViewController;
        [navController setViewControllers: @[dvc] animated: YES ];
        [self.revealViewController setFrontViewPosition: FrontViewPositionLeft animated: YES];

    };

Any help would be great.

how to back previous ViewController ..?


Error in local server env

Hi @TimothyJones, thank you for share your code.
I'm follow 2b scenario
below is my configuration
I'm using local env, so I removed /Prod

And I add some code in routes.js
app.get('/', (req, res) => {
    res.send(`

  login

`)
  }

but I saw error

As far as I know, state is optional. am I wrong?
Can you some advice me?

A side point - With the local dev server, you can use the "run discovery" button rather than typing in the URLs.
To your main point - your login link should point at Cognito rather than github - using this endpoint:
https://docs.aws.amazon.com/cognito/latest/developerguide/authorization-endpoint.html
It will look something like:
https://<your cognito domain>/oauth/authorize?client_id=<your cogntio client id>...etc

As the github app is configured to callback to cognito, I suspect the problem is because your login link hits GitHub directly, which calls back to cogntio, which isn't expecting the response, hence "invalid state".

Thank you for your advice.
I changed endpoint to
https://<cognito domain>/oauth2/authorize
with 4 query paramter
{
  client_id:  'cognito client id'
  response_type: 'code',
  redirect_uri: 'https://deptno-shim.localtunnel.me',
  scope: 'openid'
}

this redirect Github and I click Authorize
it redirects error page like below

Do I action more?

That error is unrelated to this shim. It's between the Cognito hosted signin pages and your app, not between Congito and the shim.
The error means that the response code flow (which you're asking for) isn't an allowed OAuth Flow in your Cognito setup. You can fix this by ticking "Authorization code grant" under Allowed OAuth Flow in the AWS console when looking at your App client settings.
For more information, see here:
https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-app-integration.html


Parse data as it comes in off the wire in the .NET client and server

Change websockets and the POST end point to send data unbuffered.
Update tests to handle partial frames

Fixes #1704

not ok 52 hubConnection using json over LongPolling transport throws an exception when invoking streaming method with invoke
    ---
      - message: Expected 'Server returned handshake error: An unexpected error occurred during connection handshake. InvalidDataException: Missing required property 'protocol'.' to be 'The client attempted to invoke the streaming 'EmptyStream' method in a non-streaming fashion.'.
        operator: toBe
        expected: The client attempted to invoke the streaming 'EmptyStream' method in a non-streaming fashion.
        actual: Server returned handshake error: An unexpected error occurred during connection handshake. InvalidDataException: Missing required property 'protocol'.

Investigating.

Looks good. I need some clarity around the timeout change, but the rest are minor things that aren't really essential.

Mistake 😄


propogate otel context to parse and call

This PR is a repoint of https://github.com/guardrails-ai/guardrails/pull/869 against a feature branch.  Since the 0.5.0-dev branch was deleted after merge, the PR was undesirably closed.

Closing in favor of https://github.com/guardrails-ai/guardrails/pull/939 which is these changes up to date with main.


fix(artifacts): when committing artifacts, don't retry 409 Conflict errors

Fixes WB-10937
Description
Conflicts during artifact-commit can arise for two reasons:

Concurrent runs are attempting to commit new versions of the same artifact; they race to grab the next version-index; one wins, and the other gets rejected because that version-index is now taken. (see https://wandb.atlassian.net/browse/WB-10808 )
The server is wrong to return a 409 in this case: it should be a 500, because (a) it should be impossible and (b) it's transient. This is fixed in https://github.com/wandb/core/pull/10765 .

Two runs try to commit different versions at the same time; the two versions both added a file with digest abcdef, so each version thinks it “owns” that file. One artifact is committed first; the other, then, can’t be, because its manifest claims that it created this file which actually already exists.
The server is right to return a 409 in this case, and no number of retries will help. We should not retry this.

Testing
Triggered both of the ^above failure modes:

Code:
for i in {1..3}; do F="temp.$i.txt"; (date; echo $i) > "$F"; python3 -c 'import wandb, sys; r = wandb.init(project="spencerpearson-artifacts"); a = wandb.Artifact("conflict-demo","dataset"); a.add_file(sys.argv[1], name="temp.txt"); r.log_artifact(a)' "$F" & done; wait

Output:
<...snip...>
wandb: Waiting for W&B process to finish... (success).
wandb: Waiting for W&B process to finish... (success).
wandb: Waiting for W&B process to finish... (success).
wandb: ERROR Error while calling W&B API: An internal error occurred. Please contact support. (<Response [500]>)
wandb: ERROR Error while calling W&B API: An internal error occurred. Please contact support. (<Response [500]>)
<...snip...>
wandb: ERROR Error while calling W&B API: An internal error occurred. Please contact support. (<Response [500]>)
wandb: Synced fast-feather-161: https://wandb.ai/wandb/spencerpearson-artifacts/runs/216enedk
<...snip...>
wandb: Synced unique-microwave-160: https://wandb.ai/wandb/spencerpearson-artifacts/runs/12bv3kjp
<...snip...>
wandb: Synced soft-sunset-159: https://wandb.ai/wandb/spencerpearson-artifacts/runs/3rbajign
<...snip...>
[1]   Done                    python3 -c 'import wandb, sys; r = wandb.init(project="spencerpearson-artifacts"); a = wandb.Artifact("conflict-demo","dataset"); a.add_file(sys.argv[1], name="temp.txt"); r.log_artifact(a)' "$F"
[2]-  Done                    python3 -c 'import wandb, sys; r = wandb.init(project="spencerpearson-artifacts"); a = wandb.Artifact("conflict-demo","dataset"); a.add_file(sys.argv[1], name="temp.txt"); r.log_artifact(a)' "$F"
[3]+  Done                    python3 -c 'import wandb, sys; r = wandb.init(project="spencerpearson-artifacts"); a = wandb.Artifact("conflict-demo","dataset"); a.add_file(sys.argv[1], name="temp.txt"); r.log_artifact(a)' "$F"
~/s/client (spencerpearson/no-retry-conflict) $

All the artifacts were created successfully, as expected.

Code:
F="temp.txt"; date > "$F"; for i in {1..2}; do WANDB_BASE_URL=http://api.wandb.test python3 -c 'import wandb, sys; r = wandb.init(project="p1706"); a = wandb.Artifact("conflict-demo","dataset"); a.add_file(sys.argv[1], name="temp.txt"); r.log_artifact(a)' "$F" & done;

Output:
<...snip...>
wandb: Waiting for W&B process to finish... (success).
wandb: Waiting for W&B process to finish... (success).
wandb: ERROR Error while calling W&B API: An internal error occurred. Please contact support. (<Response [500]>)
<...snip...>
wandb: ERROR Error while calling W&B API: conflict detected for file digest +IBy2j2t2lxTKyZYkIMNMg==, rebase required (<Response [409]>)
Exception in thread Thread-12:
Traceback (most recent call last):
<...snip...>
File "/Users/pears/src/client/wandb/filesync/step_upload.py", line 222, in _maybe_commit_artifact
    self._api.commit_artifact(artifact_id)
<...snip...>
File "/Users/pears/.pyenv/versions/example/lib/python3.9/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 409 Client Error: Conflict for url: http://api.wandb.test/graphql

<...hanging...>
^C

As expected one of the runs uploaded an artifact successfully; the other did not.

Overall, it make sense to me. The only point is that for local server users the first case you described will return 409 instead of 500 (until they update to the relevant version of the server), and hence will not retry this case?

This is a good point! I've spent two months kinda wringing my hands about this.
I think it's worth merging anyway. We only started retrying 409s in late June anyway (#3843) -- I bet the intersection of [people who are attached to this behavior] and [people who haven't upgraded their single-tenant installs and have good reasons to not do so] is small compared to the set of [people who wish we wouldn't hang indefinitely when they have multiple concurrent runs creating new versions of an artifact].

Ya I agree with Spencer here, the current behavior of hanging user's scripts indefinitely seems a lot worse in my opinion. I propose we merge this.


Revert getOwningQPDF, and add getQPDF that returns a reference

@m-holger Does this work for you? I'm looking at the other issue of clearing owning_qpdf for nested objects.

@m-holger I believe this addresses the issues we have been discussing as far as we can go without breaking things that are relying on direct objects being able to have multiple owners.

I'm still tweaking this. I gave it some more thought, and while I believe what is here is correct, I'm going to change some comments and change reset() to disconnect(). I have reached the conclusion that it should be fine to put a direct object from one file in another. The issue of objects having multiple parents is unrelated to this problem. I'm going to clean up my notes on this.

Unless my head people think of something else, I'm done with this change.

@m-holger I'm going to go ahead and merge this so I can push other changes behind it. Your comments are still welcome though feel no obligation. We've discussed all the changes here, so this is mainly for your information and review in case I missed something.


refactor code according to reviews

update build.gradle to unify the version

rename PEMManager to PEMKeyStore, P12Manager to P12KeyStore

modify cryptoInterface param when deploying/call contracts to CryptoKeyPair

Codecov Report

:exclamation: No coverage uploaded for pull request base (dev-jar@ed59ac1). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             dev-jar     #122   +/-   ##
==========================================
  Coverage           ?   23.79%
  Complexity         ?      166
==========================================
  Files              ?       76
  Lines              ?     2807
  Branches           ?      288
==========================================
  Hits               ?      668
  Misses             ?     2041
  Partials           ?       98

Continue to review full report at Codecov.

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


CCD interrupts music playing if device is part of a group

I have a Chromecast group called "main floor". If I start playing music on the group, it is interrupted by the dashboard cast.
Presumably this is because the device I'm casting the dashboard to is not the device name that's playing, it's the group it's part of.
Hopefully there's a way to check the group membership

Hi, I haven't tried creating a group within Google Home and if it's compatible with this integration but I can take a look when I get some time soon and figure out a solution 👍

Hello and congratulations on this project. I also have several Nest Hubs in my house and when I try to play music on them the CCD stops the music

I have fudged this to work as I was getting complaints from the family! The catt 'status' does not return anything useful when the device is in group mode. However, if you call catt 'info' if will return additional information that can be used to detect whether the device is active. I have added some code to detect whether the display_name = Backdrop which is my screensaver, this will be something else when active. If this is showing then we assume the device is doing nothing and therefore allow the cast to occur.

Can you share the changes for those like me who are not capable? Thanks

@b0mbays any news on when this topic will be fixed? Currently, CCD can't be used because the media being played is always stopping if the device is assigned to a group.

@LukasSolf Apologies. I'll take a look today

I have a fix working for this, I'll upload a new release tomorrow! 🚀
You will be able to supply the name of a speaker group per device. I just need to do some more testing in the morning before releasing 😄

I have fudged this to work as I was getting complaints from the family! The catt 'status' does not return anything useful when the device is in group mode. However, if you call catt 'info' if will return additional information that can be used to detect whether the device is active. I have added some code to detect whether the display_name = Backdrop which is my screensaver, this will be something else when active. If this is showing then we assume the device is doing nothing and therefore allow the cast to occur.

The incoming fix will work by calling the speaker group using 'catt -d  status' which is given per device in the config and if it's playing, then skip the cast. Google creates a new 'device' essentially (just like another hub) when you create a new group which we can then call and ask for it's status 👍

Awesome, thanks for the fast reaction! I'll give it a try later.

I have published a new release v1.3.1 - after updating to the new version, update your configuration then restart again.
Let me know if you have any issues 👍 CCD should now skip any devices that are playing audio on a speaker group.


cleanup: io/ioutil

Signed-off-by: cndoit18<EMAIL_ADDRESS>
What type of PR is this?
/kind good-first-issue
What this PR does / why we need it:
Please see https://golang.org/doc/go1.16#ioutil
Which issue(s) this PR fixes:
Does this PR introduce a user-facing change?
None

other Note

@cndoit18 Very appreciate for your work to upgrade io/ioutil.  and based on https://go.dev/doc/go1.16#ioutil introduction, we need to replace io/ioutil with io or os library.

@cndoit18 Very appreciate for your work to upgrade io/ioutil. and based on https://go.dev/doc/go1.16#ioutil introduction, we need to replace io/ioutil with io or os library.

Hi, Do I need to do anything else?

@cndoit18 Very appreciate for your work to upgrade io/ioutil. and based on https://go.dev/doc/go1.16#ioutil introduction, we need to replace io/ioutil with io or os library.

Hi, Do I need to do anything else?

@cndoit18 no, and i will take a review and give you feedback.

/approve


Fix categories with commas

Bug-fix - search/filter where value contains a comma.
https://trello.com/c/Fi4N1ypL/382-categories-with-a-comma-in-name-broken

Left a comment, see what you think... fine as-is if you don't think it's worth extracting a utils method for this :+1:

Have decided to come back to the utils question another day... feeling virtuous enough that I've referenced the similar function :)


add module type to package.json

convert imports to ES6 syntax at index.js
convert export to ES6 syntax at eto.js and format.js

Convert to ES6 syntax

Could you check the conflict as it wants to update GOT to 12.x.x - while currently the package uses 11.8.x - just want to make sure it doesn’t break the functionality..

On 29-Mar-2022, at 21:10, Angyal Zoltán @.***> wrote:
Convert to ES6 syntax
—
Reply to this email directly, view it on GitHub https://github.com/MTry/homebridge-smart-irrigation/pull/27#issuecomment-1082037996, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQP4KMGA2QWJP4VVP5WGHMDVCMP7VANCNFSM5R62ZSTQ.
You are receiving this because you are subscribed to this thread.


Collect transport fallback errors to provide better errors

Fixes https://github.com/aspnet/SignalR/issues/2887
Moved from https://github.com/aspnet/SignalR/pull/3325

@anurse Could you re-approve since we now block on approvals

@halter73 I added a new exception type. I'll merge by lunch if there is no more feedback.


lint: use flake8-bugbear plugin

See https://github.com/PyCQA/flake8-bugbear

Codecov Report

Merging #68 (c7f41da) into master (fa3e98b) will increase coverage by 0.02%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master      #68      +/-   ##
==========================================
+ Coverage   32.23%   32.25%   +0.02%
==========================================
  Files          67       67
  Lines        4191     4188       -3
==========================================
  Hits         1351     1351
+ Misses       2840     2837       -3

Impacted Files
Coverage Δ

lona/middlewares/sessions.py
0.00% <0.00%> (ø)

lona/shell/commands/lona_middlewares.py
0.00% <0.00%> (ø)

lona/shell/commands/lona_static_files.py
0.00% <0.00%> (ø)

lona/shell/commands/lona_templates.py
0.00% <0.00%> (ø)

lona/view_runtime.py
16.92% <0.00%> (ø)

lona/worker_pool.py
27.77% <0.00%> (ø)

Continue to review full report at Codecov.

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

@maratori this list of plugins gets pretty long. I have no experience with most of them. Are you willing to maintain this list? Or maybe linting as whole?

@fscherf sure, I can maintain them.
I'm not an expert in python linters either (yet :)
However I have a lot of experience with linters in golang.
I add only linters with minimal impact. Most probably we will not have any problems with them.

@maratori cool :) Then i am ok with all the plugins :)

@maratori: Why do you add variables with leading underscore in some hunks, and remove it in others?

@fscherf Good question. I no answer :)
I reverted unnecessary changes.
Underscore in variable name stresses that it is not used.

@maratori Looks much cleaner now :) Thanks!


contrib/gcc: shared state reuse issues

The gcc recipes in contrib on dunfell and later branches might need refreshing based on changes that have gone in upstream, to address some problems with shared state not getting used, triggering redundant from-scratch builds of many packages.

Turns out that this isn't an issue in meta-tegra, but an issue in OE-Core with the interaction between pseudo-native and shared state handling.  The sstate packaging for pseudo-native was recently changed to be per-host-OS, even for universal builds. So if you populate an sstate mirror with one host OS (e.g. Ubuntu 20.04), users that do builds an another host OS (e.g. Ubuntu 20.10) will have to rebuild pseudo-native rather than getting it from the shared-state mirror. That then incorrectly triggers rebuilds of just about everything.
The workaround is to explicitly bitbake pseudo-native before running any other builds. That will populate it in the local sstate cache.  Once present in the cache, the extra rebuilds are no longer triggered.

Got confirmation from RP that this is expected behavior now.  So this isn't related to our gcc recipes at all - libgcc (along with just about everything else) was getting rebuilt because pseudo-native was getting built from scratch.
That said, I did pull in changes to the .inc files in our gcc-8 recipes to line them up with the latest in OE-Core, just to be sure we don't run into other issues at some point.


Revert "Disable modules 300 and 301 after grpc version bump (#282)"

Revert "Disable modules 300 and 301 after grpc version bump (#282)"
This reverts commit 2f424cb50aef696f8d9803e85f1ee5c6635e43a2.
Issue is fixed by https://github.com/quarkusio/quarkus/pull/26132

CI is green, merging


Move enableMicrobuild setting up to the jobs level

should be a job parameter, not a property

See https://dnceng.visualstudio.com/internal/_build/results?buildId=320186 for example

Internal test build https://dev.azure.com/dnceng/internal/_build/results?buildId=324621 started successfully 😃

Test build https://dev.azure.com/dnceng/internal/_build/results?buildId=324621 hit a couple of test failures but successfully real-signed deliverables in Windows Release job. This PR is ready to go.


fix(visitor): unconsumed rbrace in (*traverser).decodeObject()

https://github.com/bytedance/sonic/issues/653

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.zhongxinghong seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Notice banner and navigation bar not resizing on narrower screens

On mobile screens, the notice on the home page does not fit the width of the screen.

Also the navigation bar cuts off on the right side of a narrower screen.

#8 pull request

✅ Merged. Thanks for the contribution!


Added DeWitt County, IL

@iandees The SITUS has city/zip postfixed, I can't recall a situation in the past where that has been the case. Any thoughts on how we can extract the street name from this within OA?

Hmm. I don't know if we have a good solution for this. I think we were talking about bringing in support for libpostal to parse strings like this into the parts but never did.


Ability to define font family for the icons

Great bar, thanks for your work!
Atm your bar support icons from fontawesome project.
This carry many problems with weird fallbacks which depends on the font set installed by the user (to my knowledge) (I've seen several issues about fontawesome missing/mispatched fonts etc.).
Is it possible/hard to implement the possibility for the user to select a different font for the icons?

I know that this can be performed by using the pango markup as in:
"your character"

You can make it (kinda) work setting your font like this in style.css :
`css

{
font-family: Roboto, "Font Awesome 5 Pro Solid", "Font Awesome 5 Brands";
}

Obviously you have to replace with the fonts you want. The problem with this is that some characters, for instance the "Clock" in FA5, render as a ~ in text fonts, and because CSS tests fonts from left to right, Roboto is used to display it.
Maybe there is a way to target only the icon with a selector like #clock .icon. I've tried this one, and it does not work.

I think this is more of a bug, if you set the {icon} placeholder to the left of text with a space in between, the space gets rendered with the icons font, and at least "Material Design Icons" font doesn't have the space glyph (0x0020), so a weird placeholder glyph shows up.

Had also issues with some icons not showing up. I tinkered a while until I found out, that my AUR package ttf-ms-fonts (Arial probably) "overwrote" some glyps (volume-up, down for example).
I tried the suggestion above (put FontAwesome in styles.css). It works, but for me all other characters were now slightly different and colons were misplaced. Not as pretty as before.
I uninstalled ttf-ms-fonts now, and all icons and fonts are as expected.

@Alexays and @dtnmr
Does Waybar support his style? For example:
@font-face
{
  font-family: "Twemoji";
  font-style: "normal";
  font-weight: "normal";
  src: url("../../.local/share/fonts/Emoji e ícones/Twitter Colour Emoji.ttf") format("truetype");
}

#custom-flag
{
  font-family: "Twemoji", sans-serif;
}

I want to set this font to the specific module, while I keep JoyPixels as system emoji font. I prefer the non-wavy rectangle flag (Twitter Color Emoji) instead of rounded flag (JoyPixels) and of wavy flag (Apple Color Emoji and Noto Emoji).

I second this. It would be great if all icons were wrapped in ... by default. That way we could explicitly set which font to use for an icon and not have to rely on complicated font fallback behavior.

Yes, @gusbemacbe were you able to get a module specific font-family to work?
For me it only seems to pick the main one and ignores the module specific one.

Yes, @gusbemacbe were you able to get a module specific font-family to work?
For me it only seems to pick the main one and ignores the module specific one.

I have tested it a dozen times, but it didn't work. It captures still rounded flags of JoyPixels instead of rectangular flags of Twemoji. I uninstalled JoyPixels and Noto Emoji fonts, left only Twemoji font, and the emojis in that module ended up being tofu.

I second this. It would be great if all icons were wrapped in ... by default. That way we could explicitly set which font to use for an icon and not have to rely on complicated font fallback behavior.

Was this ever opened/implemented?

Pango markup doesn’t support ..., so I came up with another workaround: wrapping all icons in the Waybar config in ... and adding a font “alias” into font-config /etc/fonts/local.conf:
<fontconfig>
  ...
  <alias>
    <family>icon</family>
    <prefer>
      <family>Font Awesome 5 Free</family>
    </prefer>
  </alias>
</fontconfig>

Which font family should cover "", "", "", "", "", "", "", "", ""? Is it Symbols Nerd Font?

Which font family should cover "", "", "", "", "", "", "", "", ""? Is it Symbols Nerd Font?

Font Awesome, apparently, but I'm not able to find the corresponding package in Ubuntu repo.

Any news or solution on this?
even if it's a really dumb fix I would rather go for it

Any news or solution on this? even if it's a really dumb fix I would rather go for it

I just simply fix it by install fontawesome and setting font-family: 'Font Awesome 6 Free'; at style.css.

I'm using the piece:
* {
  font-family: "Symbols Nerd Font", "LXGW WenKai";
  font-size: 14px;
}

I'll recommend "Symbols Nerd Font" which does not include ascii characters and has many more symbols beyond fontawesome, the next candidate fonts will be used for regular characters.


[Fix #6] Fix the refreshing of the argument list

I've made sure that:

When I remove the reparseFiles workaround, the bug described in the TODO really does occur
Setting arguments to a new value fixes the bug just as well as the workaround does
Issue #6 doesn't occur with the new code. It's intermittent, so who knows really, but the new code is simpler and faster anyway.

This fixes #6 (hopefully)

Fixed in more simple way=)


How to set the token acquired by extra/credential-fetcher into Masterchat?

How to set the token acquired by extra/credential-fetcher into Masterchat?
const credentialsB64 =  token_acquired_by_credential_fetcher;

const credentials = credentialsB64
  ? JSON.parse(Buffer.from(credentialsB64, "base64").toString())
  : undefined;

await Masterchat.init(id!, { credentials });

Is it okay to look like this?
I referenced this url.

You can just pass base64 encoded string to Masterchat:
https://holodata.github.io/masterchat/interfaces/MasterchatOptions.html#credentials
const credentials = token_acquired_by_credential_fetcher;

await Masterchat.init(id, { credentials });

Hello, thank you for your reply😄
I made a PR about what you taught me. https://github.com/holodata/masterchat/pull/8

Thanks👍


errase cockies

[Enter feedback here]

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

ID: ac54ebce-b330-44e7-4052-cfbdb878df19
Version Independent ID: 805fc71b-6b54-3b09-95ef-4254de5e0036
Content: Windows Package Manager
Content Source: hub/package-manager/index.md
Product: dev-environment
Technology: ****
GitHub Login: @denelon
Microsoft Alias: denelon

Hello @youceflabed can you elaborate on the issue with the documentation?

We're closing this issue due to lack of information. Please feel free to reopen this issue with specific details about your feedback.


Status of 2.0 branch?

Hi, there's an undocumented 2.0 branch — just wondering what the status of that is? At this point I think I'd prefer to advise people to use an beta branch than to use glTF1 assets, and there are a lot of people looking for a way to convert glTF1 to glTF2.

The 2.0 branch here is very Cesium-centric right now and probably not best to recommend for general use yet. The models produced here use the KHR_technique_webgl extension.
There has been some work on a different branch called cleanup which aims to be the next version of gltf-pipeline but this is too early to recommend as well.
One of the toughest questions right now is how to convert the materials from glTF 1.0 style to PBR. Even figuring out which uniforms represent the diffuse and specular components requires some guesswork. As far as I can tell, KHR_technique_webgl isn't widely supported.

Thanks for clarifying! The KHR_technique_webgl extension was never finalized (indeed, the spec says "DO NOT IMPLEMENT" 😁  ) so we do not support it in three.js or A-Frame.
FWIW, the glTF Blender exporter does convert lambert/phong materials to PBR in a way that seems "good enough". If there were a task list of issues that must be solved to make glTF 2.0 ready for public alpha/beta testing, I think we could probably rally some support around that. Perhaps this issue, or a new milestone tracking all related issues? Hopefully finalization and adoption of the KHR_technique_webgl extension is not a blocker here.

Yes a more concrete task list would help a lot and I'll get one together soon. Having the community help move this project along would be great! Minus the material translation, we already support a good deal of the 1.0-2.0 conversion so I'm hoping this is closer than it seems.
For the material conversion I'm more referring to how glTF 1.0 material property names are generic, and you don't know that something called "diffuse" is actually the diffuse color. The generic technique/shader approach doesn't seem to map easily to glTF 2.0 concepts, but it should still be doable.
I'm definitely on board with KHR_technique_webgl not being a blocker here, I'd like to make that completely optional.

@donmccurdy I opened a 2.0 roadmap here: https://github.com/AnalyticalGraphicsInc/gltf-pipeline/issues/330

Thanks! Closing this issue and following #330.


Command

Question
How to execute command from console
Plugin Version
2.8.0

There is a action for that...
Make sure u have permission 2 and u have turned on all the events in settings


fix: import also run add hook

Closes https://github.com/popomore/projj/issues/22

<EMAIL_ADDRESS>

cc @dead_horse


Images embedded in blog posts break mobile responsiveness

Featured image at the the top of the post is fine, but any images inside the actual post body don't resize properly and stay a constant width even when the screen width decreases, which pushes content to the sides and off the screen

Warning from build logs:
warning Specifying fullWidth images will ignore the width and height arguments, you may want a constrained image instead. Otherwise, use the breakpoints argument.
Might have something to do it


feat: Add support for additional Anthropic models

This commit updates the Claude class to support additional models provided by the Anthropic API:

claude-2.0
claude-2.1
claude-3-opus-20240229
claude-3-haiku-20240307
claude-3-sonnet-20240229

The __init__ method of the Claude class has been modified to include a list of supported models. When creating an instance of the Claude class, the model parameter can be set to any of the supported model names. If an unsupported model is provided, a ValueError is raised with a message indicating the supported models.
This change allows users to utilize the newly added models for generating completions using the Anthropic API.

Thank you. Why do we need to check for the supported names

Checking for supported model names ensures compatibility and prevents errors when using the Anthropic API. It provides a clear error message to users if they attempt to use an unsupported model, guiding them to use the correct model names. This validation step improves the user experience and reduces potential issues caused by using incompatible or incorrect model names, saving time and effort in debugging and troubleshooting. We check for supported models on other API providers like OpenAI too which has conditions like if name in gpt-4 then it routes to chat if instruct it routes to completion models otherwise raises an error which is not obvious at all --- you end up troubleshooting twenty other things which have nothing to do with the root cause which is wrong model name. @okhat

If there are no issues with this? Could you please merge this? Checking for supported model names by Anthropic only makes it more maintainable and improves the UX for the developers. So instead of going down wrong rabbit holes you are provided with correct error messages. We can always expand this list... The existing LM class only supported one model claude-2 instant and it's not obvious at all if you run it with other models when it breaks what the problem is to people who are not very familiar with the dspy env.

But this means whenever Anthropic adds new models we’ll have to update our class. Why not let the Anthropic API just raise its own exception

Agreed on having Anthropic API raise its own errors when triggered (and users can reference this documentation as needed). Let us know if you have any other concerns with this approach @Arbaaz-Mahmood !

I agree @arnavsinghvi11 @okhat. I have defaulted the model to claude-3-opus and allowed for arbitrary selection of models instead of raising value errors from my side. One thing I did notice however is that, the main repo's functionality for claude and other recent additions is not available when installed via pip. Someone should look into that.

@okhat ruff his has been applied. Kindly re-run

Hi! @okhat I think this is safe for merge. Could you merge?


feat: submit answer

Closes #23

Hmmm, I actually don't know if I prefer doing cargo aoc run -S 1 and cargo aoc run -S 2 or submitting both like it's currently doing :thinking:

Why not add both?!
https://docs.rs/clap/latest/clap/struct.Arg.html#method.num_args

Why not add both?!
https://docs.rs/clap/latest/clap/struct.Arg.html#method.num_args

Sure :man_shrugging:

Looks good in general! What do you think about moving the submit logic into util/submit.rs?
Agree! I'll move it into util/submit.rs
Also have you submitted an answer with this already smiley ?
I actually haven't tried to submit the correct answer, but I'll try it now! :sweat_smile:


Additional provider-specific configuration

Closes #313
When providers were introduced, defaultBeamArgs and pipelineRoot remained global configuration options.
This PR makes both these fields configurable per provider.
Further work will be required to allow additional provider-specific options like non-beam runner configuration.

ok to test


Query Parameter Requirement, Company Relationship Service : Count

Query Parameter Requirement,
'Company Relationship Service : Count'
AKT Sachin wants to know count of companies which service attached count is zero.

Company : Service Count
Parameter Introduced
Comes under Company Group


Add space after branch icon

The leaf_selected icon does this and without it, only half of this double-width character gets highlighted when you select its line. It wastes a tiny bit of horizontal space (that wasn't used by the line selection highlight anyway), but it looks so much better with it.
With the space:

Without the space:

This is very dependent on the font and terminal one is using. The current default settings look fine to me, but of course users can make changes while setup function if its looking misaligned to them.


f5-sdk 3.0.20: add_to_trust() complains about LazyAttributesRequired in commandOutput

Hello,
I am trying to setup a HA cluster, starting with adding a trusted member. It looks like this:
>>> from f5.bigip import ManagementRoot
>>> mgmt = ManagementRoot('lb1.example.com', 'admin', 'xxxxxxxxxx')
>>> trust = mgmt.tm.cm.add_to_trust.exec_cmd('run', name='Root', device='<IP_ADDRESS>', deviceName='lb2.example.com', username='admin', caDevice=True, password='xxxxxxxxxx')
>>>

As can be seen no exception is thrown, but inspecting trust.commandOutput shows a problem:
>>> trust.commandOutput
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/user/py3_virtualenv_f5/f5_virtualenv/lib/python3.5/site-packages/f5/bigip/mixins.py", line 95, in __getattr__
    raise LazyAttributesRequired(error_message)
f5.sdk_exception.LazyAttributesRequired: ('"allowed_lazy_attributes" not in', 'container._meta_data for class Add_To_Trust')

Is there something missing to make this work as expected? I ran into https://github.com/F5Networks/f5-common-python/issues/1301 and based this on the linked test code.

We've been using this method which seems to work well. This particular snippet hasn't been tested, though i picked it out of some working code we're using to bootstrap new pairs of F5. Sorry its not a direct answer to your particular question.
from f5.bigip import ManagementRoot
from f5.multi_device.cluster import DeviceGroup, ClusterManager
mgmt1 = ManagementRoot(mgmtIp1, username, password, debug=True)
mgmt2 = ManagementRoot(mgmtIp2, username, password, debug=True)
bigip_list = [mgmt1, mgmt2]

cluster_mgr = ClusterManager()
cluster_mgr.create(
        devices=bigip_list,
        device_group_name = "MyDscName",
        device_group_type = 'sync-failover',
        device_group_partition = 'Common'
)
device_group = DeviceGroup( devices = bigip_list, device_group_name="MyDscName",
        device_group_type='sync-failover', device_group_partition='Common')
print(device_group.ensure_all_devices_in_sync())

@eest The correct property name of the object you should be accessing is commandResult, which is what is the key under which REST sends command results. If ever in doubt, I suggest using 'raw' property of the objects to see what properties it carries, the example below is a different endpoint but the principle is the same:
>>> from f5.bigip import ManagementRoot
>>> mr = ManagementRoot('<IP_ADDRESS>', 'admin', 'admin')
>>> time = mr.tm.util.bash.exec_cmd('run', utilCmdArgs="-c time")
>>> time.commandResult
'\nreal\t0m0.000s\nuser\t0m0.000s\nsys\t0m0.000s\n'
>>> time.raw
{'kind': 'tm:util:bash:runstate', 'utilCmdArgs': '-c time', 'command': 'run', 'commandResult': '\nreal\t0m0.000s\nuser\t0m0.000s\nsys\t0m0.000s\n', '_meta_data': {'container': <f5.bigip.tm.util.Util object at 0x10d794320>, 'bigip': <f5.bigip.ManagementRoot object at 0x10c8b0da0>, 'icr_session': <icontrol.session.iControlRESTSession object at 0x10cd4d6d8>, 'icontrol_version': '', 'uri': 'https://<IP_ADDRESS>:443/mgmt/tm/util/bash/', 'minimum_version': '11.5.0', 'allowed_commands': ['run'], 'required_command_parameters': {'utilCmdArgs'}, 'exclusive_attributes': [], 'object_has_stats': True, 'minimum_additional_parameters': set(), 'required_json_kind': 'tm:util:bash:runstate'}}

if there are any issues feel free to reopen

@wojtek0806 To be clear the initial reason i opened this issue was that even after running the above mentioned trust establishment command there would not appear a node in the Device Trust ->  Peer List page in the GUI. Finding the error message in commandOutput was a side effect of me trying to debug that.
I have now tested this some more and the reason it didn't work was that the node being joined already had an entry for the first node from a previous setup. In this case nothing happened. It did however work if both Peer lists were empty, or if it existed only in the node being part of the mgmt connection.
The be specific, given:
>>> from f5.bigip import ManagementRoot
>>> mgmt = ManagementRoot('lb1.example.com', 'admin', 'xxxxxxxxxx')
>>> trust = mgmt.tm.cm.add_to_trust.exec_cmd('run', name='Root', device='<IP_ADDRESS>', deviceName='lb2.example.com', username='admin', caDevice=True, password='xxxxxxxxxx')

Setting up a trust works in some scenarios but no all:

[x] Peer list is empty in both nodes
[x] Peer list entry only exists in lb1.example.com
[ ] Peer list entry only exists in lb2.example.com

I happened to be in the last situation, where a lingering trust from a previous example was still there.
From what I can tell, the content of commandOutput and commandResult is identical when it comes to my error:
>>> trust.commandOutput
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/user/f5_virtualenv/f5_virtualenv/lib/python3.7/site-packages/f5/bigip/mixins.py", line 95, in __getattr__
    raise LazyAttributesRequired(error_message)
f5.sdk_exception.LazyAttributesRequired: ('"allowed_lazy_attributes" not in', 'container._meta_data for class Add_To_Trust')
>>> trust.commandResult
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/user/f5_virtualenv/f5_virtualenv/lib/python3.7/site-packages/f5/bigip/mixins.py", line 95, in __getattr__
    raise LazyAttributesRequired(error_message)
f5.sdk_exception.LazyAttributesRequired: ('"allowed_lazy_attributes" not in', 'container._meta_data for class Add_To_Trust')
>>>

... what is even more interesting is that even when the trust is missing in both devices and the command succeeds in adding it, the above error messages are still there. Not sure why that is.
Except for the unclear state of the error message I also notice the add_to_trust invocation does not appear to care about any of the SSL verification properties listed in the API documentation like sha1Fingerprint, (requires login, sorry): https://devcentral.f5.com/wiki/iControlREST.APIRef_tm_cm_add-to-trust.ashx maby this is an oversight?
@vsnine Thanks a lot for showing an example of how you are doing things, it is very helpful! Your example seems to reflect the documented approaches seen in the comments under f5/multi_device that I found just now when investigating your example code.
Maby this is the preferred approach over manually creating trusts like I have been trying to do. While that code does not seem to validate any SSL fingerprints either I guess it might no be as important given that you can create the two ManagementRoot instances with verify=True for overall certificate verification of the nodes.


Problem with 174H machine starting and online reading

I have the same problem, This is the code:
`import win32com.client
testo_toolbox = win32com.client.Dispatch("Tcddka.tcddk")
serial_number = "37719945"
device_code = "testo174-2010"
timeout = 4000
result = testo_toolbox.InitSerial(serial_number, device_code, timeout)
if result == 1:
print("Initialization successful")
if testo_toolbox.NumCols > 0:
testo_toolbox.Get
for i in range(testo_toolbox.NumCols):
if testo_toolbox.IsNonNumeric(i):
msg = str(i) + " " + testo_toolbox.StringVal(i)
print(msg)
else:
value = testo_toolbox.RecentVal(i)
unit = testo_toolbox.Unit(i)
msg = f"{i} {value:0.1f} {unit}"
print(msg)
else:
print("Initialization failed")`
The output is not true:
Initialization successful
0 0.0 °C
1 0.0 %rH
By the way, I got this outcome with the status "End" shown on the testo174H screen, so I tried use ”Start“ function first and then read the data, but I failed. Would you pls provide VB (or other language) code sample on how to use the start function and read the data? There's no code sample about this on 17ba.hlp. Thank you!

Sorry for not commenting on the other issue. You will need to replace t17b.dll with this one. The customer from the other ticket had received this file already, but I forgot to put it online. We will publish a new release soon, which will include the file as well.
Access for testo 174-2010 is via the property tcddk::Instrument supplying a T17baInstrument type. You also have to add a reference to the t17ba typelib to your project.
Dim tcd As tcddk
Dim Inst As T17baInstrument
Set tcd = New tcddk
bInit = tcd.InitSerial(0, "testo174-2010", 3000)
If (True = bInit) Then
Set Inst = tcd.Instrument
...
Set Inst = Nothing
tcd.Exit
End If
Set tcd = Nothing

T17baInstrument contains a nested object:
Program	T17baProg
Most modifications require a break in the measurement for ITxxxAProg::Save. In order to save the instrument has to be in _MOD_WAIT, _MOD_END or _MOD_TM mode.
T17baProg has start and stop methods
You can call Program.Start
Later read out the memory content as seen above or explained in the documentation at hhtcde.chm.
Does this help?

Hi, thank you for your information! Now I can successfully start and stop the sensor. However, I still cannot read the data.
#connect and use Instrument
tcd = win32com.client.Dispatch("tcddka.tcddk")
bInit = tcd.InitSerial("37719945", "testo174-2010", 4000)

if bInit:
    print("Initialization successful")

    inst = tcd.Instrument

inst.Program.Start()
#wait for 5 mins

inst.Program.Stop()

inst.Program.Save()

Then I want to use the "Item" method to read the data.
inst.Program.Item(0)

But failed. I noticed that I can also use the "Get" and "RecentVal" method to read the data, so I set inst as "None" first, then use the RecentVal method to get the data, but it's still 0. (I also tried these before setting inst as None, also failed, there're no such methods under "Instrument")
b = tcd.RecentVal(1)
b

I also use Item method which under the "Protocols" after I set the Instrument as None, but the return is "None".
a = tcd.Protocols.Item(0)
a

Now my understanding of the sequence is :
InitSerial → Instrument → Program.Start → Program.Stop → Program.Save → Exit Instrument (set as None) → Get → Rencent Val (or Protocols → Item)
The outcome is still 0. So I would like to inquire whether there's any problem with the sequence of methods? Thank you!

You are probably lacking the Get call to prot, please take a look at this sample:
Dim inst As tcddk
Dim bRet As Boolean
Dim prot As Protocol
On Error GoTo ErrorLabel
Set inst = New tcddk
bRet = inst.InitSerial(0, "xxx", yyy)
If True = bRet Then
If (inst.Protocols.Count > 0) Then
Set prot = inst.Protocols.Item(0)
**prot.Get**
Set prot = nothing
End if
End If
GoTo EndLabel
ErrorLabel:
MsgBox Err.Description
EndLabel:
Set inst = Nothing

Hi! Thank you for your information. I tried to add Get to the code, but it is still incorrect. I tried online measurement, but the result is still 0. Then I tried to read from Protocol, and use the Protocols.Get, but it only allowed me to read one set of data each time I run the Get, and it is inconsistent with what is displayed on the 174-2010 screen. Below are the codes and results for the two methods used:
'''
#online measurement
import win32com.client
tcd = win32com.client.Dispatch("tcddka.tcddk")
bInit = tcd.InitSerial("37719945", "testo174-2010", 4000)
if bInit:
print("Initialization successful")
inst = tcd.Instrument
inst.Program.Start()
#wait for 5 mins
inst.Program.Stop()
inst = None
tcd.numCols
output: 2
tcd.Get
output: True
print('Whether the Channel 0 Value is non num: ', tcd.IsNonNumeric(0))
print('Whether the Channel 1 Value is non num: ', tcd.IsNonNumeric(1))
print('Channel 0 Value by Using Val(): ',tcd.Val(0))
print('Channel 1 Value by Using Val(): ',tcd.Val(1))
print('Rencent Channel Value by Using RecentVal(): ', tcd.RecentVal(0))
print('Print String Information: ', tcd.StringVal(0))
#output: Whether the Channel 0 Value is non num:  False
#Whether the Channel 1 Value is non num:  False
#Channel 0 Value by Using Val():  0.0
#Channel 1 Value by Using Val():  0.0
#Rencent Channel Value by Using RecentVal():  0.0
#Print String Information:
'''
Method 2 - Protocol data reading:
'''
import win32com.client
inst = win32com.client.Dispatch("tcddka.tcddk")
bRet = inst.InitSerial("37719945", "testo174-2010", 4000)
if bRet:
for prot in inst.Protocols:
prot.Get
    key = prot.NumKey

    print(key)

    a = prot.Val(0,0)
    print('Val(0,0) Value: ', a)

    b = prot.Val(0,1)
    print('Val(0,1) Value: ', b)

output: 0
Val(0,0) Value:  29.399999618530273
Val(0,1) Value:  63.70000076293945
'''
For me, online measurement would be more suitable, but I don't know why the data read is still 0. Do you have any suggestions or solutions for this matter? I appreciate your assistance. Thank you!

Just to be sure: you replaced the DLL above, right?

Just to be sure: you replaced the DLL above, right?

Yes I replaced the DLL.

Can we please to this over email, as it might take a bit to figure out the actual problem.
Please email me via<EMAIL_ADDRESS>

I'm sorry, I should have stated more explicitly that the DLL is supposed to be exchanged at C:\Program Files (x86)\Common Files\Testo Shared


Issue with cuda

Hi
When I run command line: sudo ./setup.sh box. I face this issue:
docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].
Failed, Please check stdout above
Would you like to help me to solve?
Best regards,
PeterPham

Hi, @ThanhPham1987
In setup.sh, Line 23
docker run -it --rm -u root --gpus all ...

You can see the --gpu option which need the "NVIDIA Container Toolkit".
I forgot to add the "NVIDIA Container Toolkit" on the built with section in README.
You can refer these pages. (nvidia-docker, contrainer-toolkit installation)
Actually, I guess it could be run without --gpu option but it's not tested.
Please check what you can do and reply for update.
Thanks.

It looks like you are on the next step. (#2)
So I'm closing this but feel free to reopen.


Add containerHost information

What changes are proposed in this pull request?
Add containerHost information on the worker page.

Codecov Report

Merging #13861 (bc54217) into master (19655ac) will decrease coverage by 26.12%.
The diff coverage is 0.00%.

@@              Coverage Diff              @@
##             master   #13861       +/-   ##
=============================================
- Coverage     43.60%   17.47%   -26.13%
+ Complexity     9097     2664     -6433
=============================================
  Files          1386     1386
  Lines         80634    80662       +28
  Branches       9812     9814        +2
=============================================
- Hits          35158    14098    -21060
- Misses        42534    65320    +22786
+ Partials       2942     1244     -1698

Impacted Files
Coverage Δ

...mon/src/main/java/alluxio/util/webui/NodeInfo.java
0.00% <0.00%> (ø)

...mon/src/main/java/alluxio/shell/CommandReturn.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...mon/src/main/java/alluxio/util/ExceptionUtils.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...n/src/main/java/alluxio/wire/AlluxioProxyInfo.java
0.00% <0.00%> (-100.00%)
:arrow_down:

.../src/main/java/alluxio/wire/AlluxioMasterInfo.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...src/main/java/alluxio/job/meta/JobIdGenerator.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...n/src/main/java/alluxio/stress/BaseParameters.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...src/main/java/alluxio/client/UnderStorageType.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...main/java/alluxio/underfs/options/ListOptions.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...main/java/alluxio/worker/block/io/BlockReader.java
0.00% <0.00%> (-100.00%)
:arrow_down:

... and 663 more

Continue to review full report at Codecov.

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

@apc999 I think there is no style problem with the code at least, is there a problem with the ci test?

@apc999 I think there is no style problem with the code at least, is there a problem with the ci test?

I will  merge this PR after CI passed

The failed CI check seems not caused by this PR, @apc999 Would you please to help to re-run the CI checks?

alluxio-bot, merge this please


cph and ctv .plot() method should accept subset of column to display.

api should be similar to pandas get_dummies


Allow users to add notes/description to logs

Users should be able to add some description associated with the logs to provide some context of the logs posted.

fixed in https://github.com/maheshmnj/pastelog/commit/130a0fe5a63642fb878a190fc3516fe2f219fb60


Update render with Google API Environment variables (S)

Maintenance
Acceptance Criteria
A/C 1: Render is updated with variables
Implementation Notes
Note 1: Update render with Google API Environment variables
eg. In order to connect to the database we need the add a .env file to … with the required environment variables DB_HOST, DB_USER, DB_NAME DB_PORT, etc.

@AnthonyMogotlane can you close the issue as well if it is done


Support for processes

Looks like the failure is because we now technically support Nengo from Git rather than Nengo 2.0.1... I'll modify Travis to account for this.

Otherwise, LGTM!

Testing against Nengo code from Git makes me very angry! :rage1:

@neworderofjamie I'm happy to merge this if you are.

Yey! first submission!
On 2 June 2015 at 16:37, Andrew Mundy<EMAIL_ADDRESS>wrote:

Merged #5 https://github.com/project-rig/nengo_spinnaker/pull/5.
—
Reply to this email directly or view it on GitHub
https://github.com/project-rig/nengo_spinnaker/pull/5#event-320150075.


Irish: add count particle before "náid"

(it's included everywhere else)

Thanks! This looks good to me but let me confer with a colleague (@rwsproat) who knows more about Celtic real quick. ;)

Looks fine to me.
On Sun, Jan 1, 2023 at 12:08 AM Kyle Gorman @.***>
wrote:

Thanks! This looks good to me but let me confer with a colleague (
@rwsproat https://github.com/rwsproat) who knows more about Celtic real
quick. ;)
—
Reply to this email directly, view it on GitHub
https://github.com/google-research-datasets/uninum/pull/12#issuecomment-1368239400,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AE4X2G2M3DJEF6MOARAZHXTWQBD5ZANCNFSM6AAAAAATNSSEIY
.
You are receiving this because you were mentioned.Message ID:
@.***>

Looks fine to me.
On Sun, Jan 1, 2023 at 12:08 AM Kyle Gorman @.***>
wrote:

Thanks! This looks good to me but let me confer with a colleague (
@rwsproat https://github.com/rwsproat) who knows more about Celtic real
quick. ;)
—
Reply to this email directly, view it on GitHub
https://github.com/google-research-datasets/uninum/pull/12#issuecomment-1368239400,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AE4X2G2M3DJEF6MOARAZHXTWQBD5ZANCNFSM6AAAAAATNSSEIY
.
You are receiving this because you were mentioned.Message ID:
@.***>


Use the server IP for the AWX database host when the rails config is no good

Previously we would check the database configuration (database.yml)
then if that host wasn't set or was localhost we would try to use the
docker host gateway.
But we have a better option. We can use the server's ip instead.
This leaves the docker gateway as the last option as that will probably
still be needed for development environments.
Before this change AWX was failing on appliances if the appliance was running the database locally.

Gaprindashvili backport details:
$ git log -1
commit 0a4364cbb1e81fcef0d37ab16358e5f27afd9d6f
Author: Brandon Dunne<EMAIL_ADDRESS>Date:   Fri Dec 8 07:41:09 2017 -0500

    Merge pull request #16621 from carbonin/use_server_ip_for_awx_database_host

    Use the server IP for the AWX database host when the rails config is no good
    (cherry picked from commit 5842a945ca6bc61ee80bb55d9898e176d8c3a17a)


Introduce the "proximity" package

The purpose of this pull request is to introduce the entire proximity package, featuring a ProximityMap - which works mostly like HashMap except for its get() method: it does not necessarily perform an exact match, actually returning the value associated with the nearest key according to the given distance function.
For a practical example of the new code infrastructure, please refer to the locale-based map of dictionaries in my Hermes library - which returns a dictionary based on the locale closest to the requested one:

source file
test file
distance function

I have adhered almost completely to the coding standards and to the directory structure of the Rimbu library, while also introducing a few micro-enhancements.
The new package is tested and documented; furthermore, it is also indirectly tested by the test suite in my Hermes library.

Wow that looks really good, great job! I'll do a more extensive review somewhere this weekend.

It was a pleasure to explore the source code while adapting my algorithm to the existing infrastructure! Rimbu is a brilliant and inspiring library, indeed!

Thanks for the contribution! And finally I'm no longer the only name in the contributor list :)

I've used TypeScript for almost 4 years now, but Rimbu not only has a fascinating design - it also managed to teach me a few 🌟brilliant tricks: it's a great library, indeed. 🎩🍻

The API documentation for the proximity package appears to be missing from the API page page, but running docusaurus in the docs directory shows it just as expected! Is there some flag that needs to be updated?

I'm also adding a few links in the documentation - and I'm going to open a related mini-PR... stay tuned! 🎉