Abort on 10 consecutive OOM batches

Closes #281

Codecov Report
Patch coverage: 40.00% and project coverage change: -0.07 :warning:

Comparison is base (0ef74c3) 70.10% compared to head (d72f77f) 70.03%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #284      +/-   ##
==========================================
- Coverage   70.10%   70.03%   -0.07%
==========================================
  Files          44       44
  Lines        2368     2373       +5
==========================================
+ Hits         1660     1662       +2
- Misses        708      711       +3

Impacted Files
Coverage Δ

src/gnn_tracking/training/tcn_trainer.py
88.27% <40.00%> (-0.80%)
:arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


⚠ Bofrost.es has degraded performance

In 72a2c67, Bofrost.es (https://www.bofrost.es) experienced degraded performance:

HTTP code: 200
Response time: 1478 ms

Resolved: Bofrost.es performance has improved in 6d24c42 after 7 minutes.


expand  parameter "-incdirfile" for bin/syz-extract

usage:
~/work/src/github.com/google/syzkaller$ bin/syz-extract -arch arm64 -linux "kernel" -linuxbld "out" -incdirfile "cust_include/modulexxx_inc.txt" sys/test.txt
the content of cust_include/modulexxx_inc.txt,start with kernel dir:
xxx/include_path_1
xxx/xxx/include_path_2
bin/syz-extract read in the content of incdirfile,add -Ikernel/xxx/include_path_1  -Ikernel/xxx/xxx/include_path_2 to compile cmd
This is for modules which have customized  include paths

Initially I though that you are adding a flag that directly contains include paths, e.g. -incdir=serivers/foo/bar. That would be more or less OK as an ad hoc solution. But adding a separate file that lists include paths does not look right to me for 2 reasons:

We already have the right place to list additional include paths -- that is the txt file itself. Adding another file that lists some random subset of the declarative information is not right. We don't have separate files for includes, syscalls, flags, structs; that's all described in a single self-contained file.
There is no relation between files, so anybody who will try to reproduce your syz-extract run will get compilation errors. Then will need to figure out that that's due to a missing incdirfile flag and then figure out what's the right file and restart syz-extract.

Please extend description language to allow:
includedir "drivers/usb/gadget/udc"
directives. And then use that is syz-extract to automatically add necessary -I flags.
That will make description files self-contained and work out of the box.

Also you need to sign CLA and run 'go fmt' on the changes packages.

Fixed by #180


Make the use case more clear in the Readme

Hello,
I'm a backend developer, so I'm always looking for libraries which help me be more professional in the frontend. I stumbled upon this library but have some questions about the use case.
Is this library only for HTML files? Or does it also go through JavaScript and check if I somewhere apply a class via JS to a module? Also, what about php files? Let's say I'm building my class like this
$className = 'class-' . rand(0, 10);

This creates a "random" class name. What if I never use the class directly in HTML/JS but only in the php files. Will this be able to do this?
So in short: What files does the library check?
HTML ?
JS ?
PHP ?
Would be awesome if you could put this type of information somewhere.

For now it's check only HTML files. Parsing JS will be probably supported in future, PHP is very unlikely, but you can use ignore or ignoreRegexp options. So with your example ignoreRegexp: [/class-.*/] does the trick.


Fix Arbitrary Encodable Type to JSON Encoding

When encoding arbitrary encodable types to JSON for PostgresData, the JSONB version number was not being appended to the JSON data, causing an unsupported json version number error.

@calebkleveter oops, accidentally marked this draft PR as ready. Is it?

@tanner0101  Sure! I was hoping to fix some related errors with this, but I can put those fixes in a different PR.

This has been fixed on master. Sorry for forgetting about this one.


Rotate log

To avoid having that:
-rwxrwxrwx 1 www-data www-data 205G Dec  7 20:19 prod.log

Coverage remained the same at 97.19% when pulling d54a7aa0327f660b2e9319e5f163ab580570d157 on fix/rotate-log into 88ef53ab7cf46ee732d0cc4b7997b1b561284a65 on master.


Adding metadata

Request to provide feedback about format and any constraints on what you can and can't add.
For example, sometimes when you are presented with a text box where you are to enter your phone number, there is feedback out to the side or above that might look like this: (###)###-####

If attribute is required (Mike will check) add feedback for required. Red asterisk for all required fields.


Ability for HB to create Dataflow on existing VPC (not default VPC)

Expected Behavior
HB to create Dataflow on customer's VPC
Actual Behavior
HB creates Dataflow on default VPC only, if default VPC is not existed, then Dataflow will fail
The customer doesn't use default VPC due the security best practices.
Steps to Reproduce the Problem

Create HB job
Go go GCP --> Dataflow
Look for Dataflow worker subnet

Specifications

Version:
Platform:

Thanks for reporting this. There could be a few scenarios here

Single default subnet
Multiple VPC's exist, including default
Multiple VPC's, excluding default

I think the ideal behaviour here would be to select the VPC and Subnet for a list of available options.

Did the POC to launch a Dataflow job inside a VPC.
Next: Working on adding it as a feature.

Tested on the feature by running HB locally (not gcloud), here is the result:

Using custom VPC/Subnets in the project, it can successfully run HB
Using custom VPC/Subnets from Shared VPC, it cannot run. This is not permission issue, instead it cannot find the networks/subnet.

Error when launching dataflow on Shared VPC subnets:
Failed to start the VM, launcher-2023030801105316106672755625837005, used for launching because of status code: INVALID_ARGUMENT, reason: Invalid Error: Message: Invalid value for field 'resource.networkInterfaces[0].subnetwork': 'regions/asia-southeast1/subnetworks/sg-subnet1'. The referenced subnetwork resource cannot be found. HTTP Code: 400.
Normally using SharedVPC it requires to provide a complete URL path:
https://www.googleapis.com/compute/v1/projects/HOST_PROJECT_ID/regions/REGION_NAME/subnetworks/SUBNETWORK_NAME
https://cloud.google.com/dataflow/docs/guides/specifying-networks

Tested and confirmed working properly.
Note: make sure you give a role "Compute Network User" to default dataflow service account  in the host project.
E.g<EMAIL_ADDRESS>


Extension settings can not be stored or updated?

First of all, thank you for the ungoogled-chromium project. You are doing great work.
I use the Redirector chrome extension to automatically forward links to paid sites to my university's library proxy. This extensions saves me a few clicks and typing and my regex (stored in original chrome) looks like this:

However, I am unable to save any regex in the Redirector extension's options page in the ungoogled-chromium app. I was wondering if you had any ideas/intuition about why this might be happening?

I haven't worked with extensions in a while, but it could be possible that it's trying to save settings to the signed-in Google account instead of saving them locally in the browser profile. Does the developer tools page for the background page or options page say anything useful?

Thanks for the suggestion of looking into developer tools. It turns out that the problem was not a problem with ungoogled-chromium but rather the content_security_policy in the manifest.json. Somehow the following syntax for specifying the CSP is invalid (or incorrect)
"content_security_policy": "script-src 'self' https://*.googleapis.com https://*.bootstrapcdn.com; object-src 'self'"

and because of this  jquery was not being loaded from googleapis. I was able to fix the error by just downloading jquery to the extension folder and loading the unpacked extension.

Ah ok. Glad to hear a solution was found.


Implement RELAYMSG

I'm writing up an implementation of this now that it's forwarded on to v3.
So, few restrictions that I'm having in my impl that are unchangable:

Relayed nicks MUST ALWAYS have a separator char (likely /, likely not changeable).
Relaymsg can ONLY be used by ircops with a specific relaying priv and by channel opers, nobody else.
If someone tries to PM a nick that contains the separator char, we'll likely spit out a special message.

Did we decide that it's impossible to get DMs working in this setting?
I was thinking that our implementation should identify classes of nicks that are to be used for bridging (e.g., by a configurable list of glob expressions), and then these nicks cannot be used for any other purpose.

Yep, DMs not possible. Doing it might be possible with lotta spec changes and updates, but not possible as it stands and honestly that's not a huge loss compared to the massive improvement this makes to channel bridging.

This was completed in #1120.


homeassistant.exceptions.HomeAssistantError: Entity id already exists error in 0.63

Home Assistant release (hass --version): 0.63
Python release (python3 --version): 3.6.2
Component/platform: NA
Description of problem: On restart, I am seeing this Entity id already exists error. I am guessing it is related to #11979
Traceback (if applicable):
2018-02-10 20:01:40 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.6/asyncio/tasks.py", line 180, in _step
    result = coro.send(None)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 243, in _async_add_entity
    'Entity id already exists: {}'.format(entity.entity_id))
homeassistant.exceptions.HomeAssistantError: Entity id already exists: media_player.shield_android_tv

Which platform? Seems like the platform is handing out duplicate unique ids

I see this error from this component:
https://home-assistant.io/components/sensor.netatmo/
2018-02-11 19:39:11 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 180, in _step
    result = coro.send(None)
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 243, in _async_add_entity
    'Entity id already exists: {}'.format(entity.entity_id))
homeassistant.exceptions.HomeAssistantError: Entity id already exists: sensor.netatmo_vardagsrummet_radio


Create GitHub Actions Workflow

This workflow will automatically build this program upon a push or pull request to the main branch.
To-Do:

[x] Windows Building
[ ] Mac Building
[x] Linux Building

This is the error I get when trying to build on Mac:
Undefined symbols for architecture x86_64:
  "_genBiomes", referenced from:
      _main in main-094f80.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error: Process completed with exit code 1.

No clue what's causing this, will probably look into it later

I made it use make now, which might change things.

I made it use make now, which might change things.
I've changed it to use make now
It also solved my problems of mac building, so it should be ready to go now!


How to authenticate Headlamp with Azure AKS? Also tried using DEX as middleware.

I am able to login via Dex in Headlamp, but kubeconfig file is not getting generated, hence the cluster in not being loaded.
Can anyone please help me?
Sharing my config here:
dex-values.yaml
image:
tag: ""
config:
issuer: 'https://dex.poc.xxxxx.net'
storage:
type: kubernetes
config:
inCluster: true
web:
http: <IP_ADDRESS>:5556
allowedOrigins: ['*']
connectors:
- type: microsoft
id: microsoft
name: Microsoft
config:
clientID: XXXXXXX
clientSecret: XXXXXXXX
tenant: organizations
redirectURI: "https://dex.poc.XXXXt.net/callback"
scopes:
- openid
- profile
- email
staticClients:
- id: headlamp
redirectURIs:
- 'https://headlamp.poc.xxxx.net/oidc-callback'
name: Headlamp Dashboard
secret: XXXXXXXXXXXXX
enablePasswordDB: true
oauth2:
responseTypes: ["code", "token", "id_token"]
skipApprovalScreen: true
headlamp-values.yaml
config:
oidc:
clientID: headlamp
clientSecret: XXXXXXXXXXXXXXX
issuerURL: 'https://dex.poc.xxxxx.net'
scopes: "openid email profile groups"
 --> DEX dialog box
 --> 401 unauthorized, not loading anything.
 -->headlamp pod logs
Please help me figure this out.

Maybe @yolossn knows.

@yolossn, please help me here..

@Pree-byte  Can you check these two things and share what you see?

Open Network tab in Headlamp and copy the Bearer Token that is used in the failed requests. Use any JWT debugger like jwt.io to check if the scopes are properly added to the token that is used.
Do you see any authentication logs in the kubernetes api server? If you see error logs with "user:anonymous" it is because the kubernetes api server is not able to identify the user with the bearer token, if you see other errors related to authorization then you will need to provide access to the user.

"sub": "CiRlOTRiZWQ5NC02NDcwLTQ2ZDMtOTEzMy04NjNjY2ZiYTBmYmESCW1pY3Jvc29mdA",
"aud": "headlamp",
"exp":<PHONE_NUMBER>,
"iat":<PHONE_NUMBER>,
"at_hash": "7vOMym9U8e_0Qt7Ac5EPig",
"c_hash": "8plRy2X_07nasXIcJh9DTg",
"email"<EMAIL_ADDRESS>"email_verified": true,
"name": "Preet Haresh Buhecha"
}
@yolossn, I am getting this in JWT debugger and also we are using AKS, so can't see the logs of the authentication.

Does you AKS cluster use Local accounts with Kubernetes RBAC or Microsoft Entra ID authentication with Kubernetes RBAC for Authentication and Authorization?

Hello @yolossn,
Please check this, we have mapped one group to the cluster-role binding and we normally add people to the particular groups from Entra ID and people gets the access to the cluster.

So how can I overcome this?  I want to authenticate my user if he is added in this group

the last time I checked I was not able to find the Entra ID URL for OIDC to configure in Headlamp.
@illume I remember that you also gave this a try. Were you able to integrate Headlamp Incluster with AKS + Entra ID.

@illume, Please help me..
Also @yolossn, is there any way I can achieve this in AKS?

Have the same issue as well

I also have this issue.


chore : added issue templates and PR templates

Fix #128
This PR contains

Added Standard issue templates in YAML format
Added PR template
Replace PR template in right place

cc @ankitchouhan1020

cc @ristri @aniketsingh0104 @ankitchouhan1020

You can change the language from English to Hinglish to be more "Desi".

Alredy fixed.


Revisit handling of negative multiplicity

References:

https://math.stackexchange.com/questions/382414/is-there-such-a-thing-as-a-multiset-with-a-negative-number-of-some-element
https://math.stackexchange.com/questions/4569276/distributive-property-for-signed-multiset

The standard Counter doesn't output counts below zero, which I've followed so far.

The multiset methods are designed only for use cases with positive values. The inputs may be negative or zero, but only outputs with positive values are created.

What appears to be the original reasoning: https://python-list.python.narkive.com/BBOudoVi/negative-counts-in-collections-counter#post4

For example, with sets:

set('abc') - set('cde') # gives set('ab')

Notice how subtracting 'e' did not produce a negative result?
Now with multisets, we want the same result:

Counter({'a':1, 'b':1, 'c':1'}) - Counter({'c':1, 'd':1, 'e':1})

So the design decision was to support multiset operations
that produces only results with positive counts.

This is probably more intuitive when doing subtraction since most games drop excess right-side elements after canceling, e.g. (a - b).count() or (a - b).sum() would not count excess members of b.
On the other hand this can interfere with associative / distributive properties, e.g. counts of -1 + -1 + 2 = 2 but 2 + -1 + -1 = 0, and 1 + (-1 & -2) = 1 but (1 + -1) & (1 + -2) = 0.
Another option would be to have the word version retain negative counts but the symbol version remove negative counts.
Side issue: rename disjoint_union to additive_union?

Added a keyword argument keep_negative_counts to the non-operator versions of +, -, &, |.
Renamed disjoint_union to additive_union. "Disjoint" has the false connotation that each element remembers which multiset it came from, whereas "additive" has the appropriate connotation that the counts are being added.

Later I put negative counts back. But should operators that don't handle negative counts produce an error if they see them, or treat them as zero?

Made the switches above. Calling keep() on a KeepGenerator with negative keeps will fall back to the MultisetExpression version.


Move 'presentation mode' and 'bookmarks' buttons in the secondary toolbar (bug 1789082)

Do we have any data that says that this functionality is used sparingly, or how was this decision made (since there's no additional context in the bug)? To me, it feels like this will result in (potentially lots of) bug reports from users who now can't (easily) find these buttons.

@rtestard ^^

Ideally we would have had data points but we don't have them at this point - given we're landing an additional 2 toolbar buttons we had to make a call about increasing toolbar complexity without further considerations or moving some items that feel lower value to the overflow. This change feels low risk because:

the bookmarks button is a pretty hard to understand/discover feature. I personally struggled to find people who understood what it does. I think this is valuable but would deserve better onboarding for users to understand what this is about. In any case it seems very low risk to move to overflow for now and better UI since retaining it seems to confuse users more than benefit them given it's just not obvious what the feature does even if you click the button.
presentation mode is also available through the browser full screen feature / F11 even though the pdf.js toolbar persists. Rather than having 2 separate entry points for a single feature it feels like we should let users rely on the browser full screen feature as opposed to having 2 separate entry points for very similar capabilities. We'll need to decide if we want to retain full screen with pdf.js toolbar and full screen without pdf.js toolbar (i.e keep both browser full screen and pdf.js full screen implementation) or just retain browser full screen with a change allowing to mask the pdf.js toolbar when in browser full screen. This last option feels more suited to me but we'll need to get UX input on this

In general users don't benefit from having too many toolbar options, especially when some are redundant or very corner case. These options will still be available from the overflow menu.

Ideally we would have had data points but we don't have them at this point

At least for PresentationMode, it'd probably not be that difficult to add telemetry for it (based on how how "simple" the editing-telemetry was to add).

presentation mode is also available through the browser full screen feature / F11 even though the pdf.js toolbar persists.

Those two modes are not identical though, quite far from it, and I've always felt that they rather complement each other.

Rather than having 2 separate entry points for a single feature it feels like we should let users rely on the browser full screen feature as opposed to having 2 separate entry points for very similar capabilities.

Note that doing so would lose the presentation-feature, which exists as a simple way to show a PDF document one page at a time without any background-colour. (While you could partially simulate that by manually setting appropriate scroll-mode, when the browser uses a light theme you'd then have a fully white background.)

In general users don't benefit from having too many toolbar options, especially when some are redundant or very corner case. These options will still be available from the overflow menu.

That might be very well be true for the "average" user (if such a term is even appropriate/meaningful to use), however note there's actually been (old) feature requests from users that wanted more of buttons available in the main toolbar :-)

Following up on https://github.com/mozilla/pdf.js/pull/15391#pullrequestreview-1095513124: I just saw https://www.reddit.com/r/firefox/comments/zcy0qf/no_more_pdf_bookmark_option/ which means that there's definitely users that relied on the viewBookmark button and are now having difficulty finding it.

@rtestard ^^

Apologies for delay.
We now have telemetry for all overflow items.
73% of use among overflow items is for rotation (clockwise and counter clockwise), third is document propertie, fourth is presentation mode (5% of use) and view bookmark is 7th with 2% of use.
Overall 0.05% of daily PDF viewers use presentation mode  and 0.03% of daily PDF viewers use view bookmark.
I agree that the change would have regressed the experience for some users but these numbers clearly show that they are a minority - per comments above we cannot retain low use features in primary UI since this tends to confuse users and make other more frequently used features harder to find when needed. I hope this helps gain confidence in our approach.


Add helpers for DList

#define CONTAINING_RECORD(address, type, field) ((type *)((char *)(address) - offsetof(type,field)))

not defined here.

Refers to: devdoc/doublylinkedlist_requirements.md:39 in d26d2d4. [](commit_id = d26d2d4d93ab15ba3f827d1f317db57684b3c9bf, deletion_comment = False)

#define CONTAINING_RECORD(address, type, field) ((type *)((char *)(address) - offsetof(type,field)))

Original author included this. Maybe to hint to the reader on how to obtain address of struct from PDLIST_ENTRY. Leaving as is.

In reply to:<PHONE_NUMBER>

Refers to: devdoc/doublylinkedlist_requirements.md:39 in d26d2d4. [](commit_id = d26d2d4d93ab15ba3f827d1f317db57684b3c9bf, deletion_comment = False)

#define CONTAINING_RECORD(address, type, field) ((type *)((char *)(address) - offsetof(type,field)))

I wanted to reply to the comment about this but could not! Because I think the original comment from Andrei was deleted.
Anyway, here is what I said:
"I think at some point CONTAINING_RECORD was in DLIST.
But as I recall we moved it out as it is more generic.
I suggest replacing this with a note that says that typically DLIST_ENTRY is used as part of a structure and the obtaining of the parent structure can be done with CONTAINING_RECORD. If you want to go the extra mile you can even give an example."

Refers to: devdoc/doublylinkedlist_requirements.md:39 in 341cf36. [](commit_id = 341cf36ad590e004ad718b5b09f4880e75f5eb69, deletion_comment = False)

#define CONTAINING_RECORD(address, type, field) ((type *)((char *)(address) - offsetof(type,field)))

Understood. Replacing this with example.

In reply to:<PHONE_NUMBER>

Refers to: devdoc/doublylinkedlist_requirements.md:39 in 341cf36. [](commit_id = 341cf36ad590e004ad718b5b09f4880e75f5eb69, deletion_comment = False)


Windows support

~Not sure why building with Debug build type fails on Windows.~ Remove compiler warnings as errors
Not sure why tests are failing on Windows also (#92).
After further consideration, I plan to merge this PR even with failing Windows tests. I will open an issue to keep track of it (#92).
I've set some Required GitHub Actions tests to pass before merging PRs in the repo's settings, and this excludes the Windows builds, but we should try to remember to check the Windows runs to make sure that at least the build step passes.
closes #6

do you have a Windows machine that you've been testing on or have you only been running on GH Actions?

I use a VM for the most part, but I do have a personal Windows machine if I really need to dig into something.

Before I merge this, I want to take a stab at uploading the built Windows binaries only if tests fail


How do I correct the vs code extension error: Extensions: Skipped synchronizing extension because the extension is not found?

How do I correct the vs code extension error: Extensions: Skipped synchronizing extension because the extension is not found?
The sync doesn't seem to migrate my extensions from one device to another. I have also tried copying them to  c:/users/name/.vscode/extensions folder without success.
Any assistance you can provide is greatly appreciated.
Thank you.
Originally posted by @UTexas80 in https://github.com/Visual-Studio-Code/.github/issues/43

How do I correct the vs code extension error: Extensions: Skipped synchronizing extensionthe extension is not found? The sync doesn't seem to migrate my extensions from one device to another. I have also tried copying them to c:/users/name/.vscode/extensions folder without success. Any assistance you can provide is greatly appreciated. Thank you.
Originally posted by @UTexas80 in Visual-Studio-Code/.github#43


extend interface to expose additional hw characteristics

Copy of the issue from old open-umd  repo - https://yyz-gitlab.local.tenstorrent.com/tenstorrent/open-umd/-/issues/5

At minimum:

query for amount of dram available
query for amount of system memory available (huge pages size)

This exists, if addition interface is needed we can open issues and provide it, closing this...


'sqlite3-binding.h' file not found with  include; use "quotes" instead

Wondering if anyone had library issues related to Apple M1 (not sure if this is the reason, just a wild guess)
Our project  is in Golang and uses Bazel, and build have been failing for me with ERROR '/private/var/tmp/_bazel_<usr>/6a928f809ee3a14ad8b957e75e243b76/sandbox/darwin-sandbox/8/execroot/,project/external/com_github_mattn_go_sqlite3/backup.go:10:10: error: 'sqlite3-binding.h' file not found with <angled> include; use "quotes" instead
I was trying to figure out a more generic way to fix this issue.
For a temp work around: I had to fix all of the following files’ #include <sqlite3-binding.h> to use “quotes” instead of <angled>, now my build is WORKING!

backup.go
callback.go
error.go
sqlite3.go
sqlite3_context.go
sqlite3_load_extension.go
sqlite3_type.go

MacOS: Monterey 12.3.1
Chip: Apple M1 Pro

@mattn

Which version of this library are you using? Because all the files you mentioned are already using #include "sqlite3-binding.h" since #868 was merged (so v1.14.10+).

Thanks @rittneje , turns out we are using 1.14.9, trying 1.14.10 now


Youtube videos occasionally get added to post

Ah sorry, I jumped the gun.

Haha, I'm causing all kinds of trouble.

hehe, you have license to do what you like; My position on this kind of thing tends towards being a bit more draconian and I'll review and understand changes in areas to find possible bugs where I'm familiar with the codebase.

Yeah my mistake was I've had a policy of accepting anything inside /sandbox without checking. I forgot this was your baby.


Added --existing flag, adopting protostar to existing project

W also have to create new repo if it not exists

I've just noticed that Protostar throws an error when a user cancels project configuration phase (cmd + c).


I found this bug when decoding strings in Python that were previously marshalled by Godot.
Problem: string paddings were not filled with zeroes and thus contained original "dirty" memory parts. For example, code net.put_var('asd') yielded the following binary data:
\x0c\x00\x00\x00\x04\x00\x00\x00\x03\x00\x00\x00asd\xae
The padding byte (\xae) changes randomly each time I send data from Godot.
This made my Python GodotSerializer class tests fail because unmarshal(marshal(obj)) == obj, but marshal(unmarshal(raw)) != raw.
This PR fixes it so that each padded byte is nullified and thus marshalling/unmarshalling process is consistent.

Thanks, looks good.

Cherrypicked into 3.0.3


daemon: Fix Envoy version check and add hidden option to skip it

Cilium agent should abort on mismatching Envoy version. The log level
was inadvertently changed from Fatal to Warn in commit 5f18a28b0e
("ct: enforce CT clean up from L3 to L7 policy changes on ingress").
Envoy has not updated its Bazel configuration to correctly set the
linkstamp for the version. Workaround by manually deleteting the
version_linkstamp.o file before build.
Add a new hidden boolean command line option
"--disable-envoy-version-check" that bypasses the version check on
startup. This option is bound to the environment variable
"CILIUM_DISABLE_ENVOY_BUILD" so that if that is defined as "true" or
non-zero the version check will also be skipped. If this environment
variable is defined (at all) when invoking "make" all make actions
within the envoy directory are skipped.
Fixes: 5f18a28b0e ("ct: enforce CT clean up from L3 to L7 policy changes on ingress")
Signed-off-by: Jarno Rajahalme<EMAIL_ADDRESS>

I don't particularly have an opinion on this but we have decided previously to indicate unhealthy critical dependencies by exiting (as opposed to reporting a bad health but not exiting). We do this for k8s version or no connection, and maybe etcd. Do we consider Envoy the same type of thing?

The dependency is actually even tighter to Envoy, more precisely to our filters that are linked into it.

test-me-please

@aanm Are you OK with this?

FYI I ported the Makefile changes from this PR into https://github.com/cilium/cilium/pull/3530. I haven’t ported the CILIUM_DISABLE_ENVOY_BUILD trick yet, so that will need to be fixed.


Developer Guide 8a: Simple Machine

This adds a planned page to the developer guide, covering how to make a simple input/output machine using recipes. It also updates links on the main Developer Guide page and at the end of Part 7.
I tried to follow the laid-back language and <br> formatting as best as I could, kind of using part 7 as a style reference. I hope it fits well enough.

I am sorry but I'll just say it straight that this will be rejected.
I appreciate the effort put into this but this is definitely not a welcome addition here.
There are very good reasons why these developer guides have not been written yet and your post contains a lot of wrong or outdated information.
You are using legacy classes which will be removed at some point and are not safe to use.
You probably couldn't have known this, so I am sorry.
But this way of adding machines is not here to stay and will be rewritten soon, one pull request towards this rewrite is already in review. So this is likely to become completely outdated by the time it is merged.
Again, sorry and I appreciate the effort.


Swagger fails to generate code for valid schema

Problem statement
When responses have "examples" section swagger 0.9.0 fails to generate code - the same schema is processed fine by swagger 0.8.0. It is difficult for me to deduce what causes it, so please, see attached examples.

samples_ok.yml, executing "swagger-new generate server -f ./samples_op2_ok.yml -t ./src", everything is fine, code generated.

samples_ok.yml.txt

Adding second operation - samples_op2_bad.yml, executing "swagger-new generate server -f ./samples_op2_bad.yml -t ./src", does not work, returning "object has no key "InfosItems0""

samples_op2_bad.yml.txt

Renaming items in response's "examples" (note, schema is valid, but tools like Swagger-UI and Swagger editor would not show "sample response"), samples_op2_ok.yml, executing "swagger-new generate server -f ./samples_op2_ok.yml -t ./src", code generation works again.

samples_op2_ok.yml.txt
Environment
swagger version: 0.9.0
go version: 1.8.1
OS:   Ubuntu 14.04

This is side effect of commit dbcac5349d0752aac851755aeb668f8e52018452:
`	var err error
var specDoc *loads.Document
opts.Spec, specDoc, err = loadSpec(opts.Spec)
if err != nil {
return nil, err
}
// Validate if needed
if opts.ValidateSpec {
	if err = validateSpec(opts.Spec, specDoc); err != nil {
		return nil, err
	}
}

`
introduces side effect - after validation specDoc is expanded which causes generation to fail in some cases or produce code different from case without validation.


add all required data fields to referral object and create db migrations

What does this pull request do?
adds the required data fields for draft referrals based on this document https://docs.google.com/spreadsheets/d/1gVKJpBklpx0XN-MG6igylE5KMkhwZJFf60NjTUP8zl4/edit#gid=1184237857
add the flyway scripts to update the production db with the required columns.
alters the type of completionDeadline from timestamp with time zone to date.
adds some sample data to the local db for running locally.
What is the intent behind these changes?
continue to build out the referrals api.

I don't think we should add any of these fields until we actually use them through the client. Until then, it's undefined data without a use case -- so it will likely change, so I don't see value in adding them now.

fair enough - personally, i think the use case is clear enough since these fields are contractually required. i also think having all the fields there before the front end needs to use them is beneficial since there is no 'catch up' required once they are added there.


REL: backports for 1.3.2

Any idea why the release notes v1.3.2 are not appearing at https://nsls-ii.github.io/ophyd/release_notes.html?

I suspect we did not merge this branch into master yet and that is built from master.


Suggestion: Edit Log - Add Cart or VT into above/current position in log

When editing a log and inserting a cart or VT, it would be very useful if the insert position was automatically calculated to be above the current event instead of 00:00:00.00.
This would make adding events much easier and quicker.
You could then use move up/move down to relocate the cart or VT if required.

Thanks for feedback, i have added this to the todo list and i will look in to this function.

Thank you.

The log editor has now time calculation. Will come with the next release unless you clone the repo, you can test it out.
Still need some testing.


does this go driver support connection load balancing

Hi,
Does this driver in the current phase support connection load balancing.

Hi @rajsameer
In the current phase this go client does not support connection load balancing.

Thanks. Any plans on adding the support.

@rajsameer It is penciled in to the roadmap, but nobody is actively assigned to it. Being open source, you're encouraged to contribute features. If not, the dev team can look at prioritizing such a feature if the need is immediate.

Is there any documentation around Vertica's load balancing protocol that could be used as a reference for work on this feature?

@watercraft The implementation of vertica-python might be a good reference: https://github.com/vertica/vertica-python/blob/6df1abec10ca189331d9f61bc56e11e1dcf86b18/vertica_python/vertica/connection.py#L422
Load balancing happens between the initial establishment of the client connection and enabling SSL.
LoadBalanceRequest Message
Int32 (value=8) | Length of message contents in bytes, including self.
Int32 (value=80936960) | The LoadBalance request code. The value is chosen to contain 1235 in the most significant 16 bits, and 0000 in the least 16 significant bits.
LoadBalanceResponse 'N' Message
Byte1 (value='N') | Identifies the message as a LoadBalance response. The server rejects the client LoadBalance request.
LoadBalanceResponse 'Y' Message
Byte1 (value='Y') | Identifies the message as a LoadBalance response. The server accepts the client LoadBalance request.
Int32 | Length of message contents in bytes, including self.
Int32 | The port number of the load balance target.
String | The host of the load balance target. The string is null terminated.

Below was my first attempt to translate the Python code before I read your reply.
I believe this is handling success correctly but I'm not sure about failure.
The BELoadBalanceMsg only has Host & Port, how do I get Byte1 ?
func (v *connection) balanceLoad() error {

	if err := v.sendMessage(&msgs.FELoadBalanceMsg{}); err != nil {
		return err
	}

	bMsg, err := v.recvMessage()
	if err != nil {
		return err
	}

	switch msg := bMsg.(type) {
	case *msgs.BEErrorMsg:
		return msg.ToErrorType()
	case *msgs.BELoadBalanceMsg:
		v.conn.Close()
		newURL, err := url.Parse(fmt.Sprintf("vertica://%s:%d", msg.Host, msg.Port))
		if err != nil {
			return err
		}
		v.conn, err = net.Dial("tcp", newURL.Host)
		if err != nil {
			return fmt.Errorf("cannot connect to %s (%s)", newURL.Host, err.Error())
		}
		return nil
	default:
		_, err = v.defaultMessageHandler(msg)
		if err != nil {
			return err
		}
	}

	return nil
}

@watercraft Thanks for doing that. For BELoadBalanceMsg, you might have to define two different message types, like BELoadBalanceSuccessMsg and BELoadBalanceFailMsg.

I've coded the two message in my fork (watercraft/vertica-sql-go), however, I'm confused by the behavior when the sever has load balancing enabled but the client is configured to not do load balancing.  The connection succeeds, however, the first command I make comes back with EOF.  Do I need to always issue the load balancing exchange to deal with this and perhaps ignore the response or must the client and server configurations be in sync?

@watercraft My guess is that in that case Vertica returns some kind of error that is not currently being handled by the driver, similar to https://github.com/vertica/vertica-sql-go/issues/51. I could be wrong though.

@watercraft If the client side disables load balancing, then following communications will use the initial connection, no LoadBalanceRequest Message will send to the server. Could you please write down the log of message communications? So that I can see why it returned a EOF.


hackage-packages: keep versioned aliases for default packages

Issue description
Apparently, the "default" version of a hackage package doesn't have an alias with its proper version. This can cause problems when using newer versions, that become default.
Steps to reproduce
The example is a current breakage with emacs2nix
0c0aa0413a43bcd4d2e1a6e57997bb5cb7a27262 makes aeson <IP_ADDRESS> the default, but gets rid of aeson_0_11_1_4 in the process. https://github.com/ttuegel/emacs2nix/blob/201f59f0d12d6e2ba1122b9247d0d110cfdb3680/shell.nix#L14 however, already depends on that name.
Technical details

System: 16.09-pre-01141a2b8d914a90 (Flounder)
Nix version: nix-env (Nix) 1.11.2
Nixpkgs version: 16.09-pre-ba221e4f00074840

cc @ttuegel @peti

If you want a specific version of a Hackage package, please use:
`callHackage "my-package" "my-version" {}`

The haskellPackage set itself is not going to keep old versions around any longer since we can generate any Hackage package we want on the fly.

@peti I think you're misunderstanding. This ticket is not about keeping old versions, but about providing a versioned package name, even for the default versions. Right now, future versions are named like xyz_1_23, but when they become default, they lose the suffix and are named like xyz. This is a problem for dependents, that are maintained manually. This ticket is about keeping a versioned alias, even for the default versions. This won't affect closure size at all. Please consider reopening and fixing this.

I want to go into the exact opposite direction. I'm working towards removing  all "non-default" packages from our package set, i.e. attributes with a version suffix will cease to exist entirely.


converting NULL to string is unsupported

Hi,
I have just converted to this driver, coming from godror.
I encounter a lot of converting NULL to string is unsupported errors though. The only fix I know of is either a pointer or ensuring that a string is never empty by doing NVL(field, ' ').
Is this the only way to solve this or is there a way of supporting NULL to string conversions?

use sql.NullString either as output or input

Thanks very much for your incredibly quick reply! I'll look into this and change the types.


[Error][Bug]adding silk middleware in MIDDLEWARE causes ImportError

I followed the docs and tried to add the middleware line in different positions in MIDDLEWARE settings file, but I am getting "ImportError: No Module named context_processors"
Below is my full stack-trace of my error:
Traceback (most recent call last):
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
    self.result = application(self.environ, self.start_response)
  File "/home/akki/rest_api/venv/local/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py", line 64, in __call__
    return self.application(environ, start_response)
  File "/home/akki/rest_api/venv/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 168, in __call__
    self.load_middleware()
  File "/home/akki/rest_api/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 44, in load_middleware
    mw_class = import_string(middleware_path)
  File "/home/akki/rest_api/venv/local/lib/python2.7/site-packages/django/utils/module_loading.py", line 26, in import_string
    module = import_module(module_path)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/akki/rest_api/venv/local/lib/python2.7/site-packages/silk/middleware.py", line 32, in <module>
    fpath = silky_reverse('summary')
  File "/home/akki/rest_api/venv/local/lib/python2.7/site-packages/silk/middleware.py", line 23, in silky_reverse
    r = reverse('silk:%s' % name, *args, **kwargs)
  File "/home/akki/rest_api/venv/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 522, in reverse
    app_list = resolver.app_dict[ns]
  File "/home/akki/rest_api/venv/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 329, in app_dict
    self._populate()
  File "/home/akki/rest_api/venv/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 269, in _populate
    for pattern in reversed(self.url_patterns):
  File "/home/akki/rest_api/venv/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 372, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/home/akki/rest_api/venv/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 366, in urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/akki/rest_api/rest_apis/urls.py", line 19, in <module>
    urlpatterns += patterns('', url(r'^silk/', include('silk.urls', namespace='silk')))
  File "/home/akki/rest_api/venv/local/lib/python2.7/site-packages/django/conf/urls/__init__.py", line 28, in include
    urlconf_module = import_module(urlconf_module)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/akki/rest_api/venv/local/lib/python2.7/site-packages/silk/urls.py", line 7, in <module>
    from silk.views.requests import RequestsView
  File "/home/akki/rest_api/venv/local/lib/python2.7/site-packages/silk/views/requests.py", line 1, in <module>
    from django.template.context_processors import csrf
ImportError: No module named context_processors
[03/May/2016 06:48:16] "GET /silk/ HTTP/1.1" 500 59

Below is my MIDDLEWARE settings:
MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'silk.middleware.SilkyMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

I'm getting the same issue

@shahakshay94
Do you know what version of Django you are running and what version of Silk you are trying to use?

This is likely caused by this change that trying to determine where to import csrf based on what version of Django.
https://github.com/django-silk/silk/commit/c1ed0eb2e735d72d1c3e9ef3e1a620f89b8dd5dd

I'm on Django 1.7.8 and Silk 0.5.7

I have found the issue.
The 0.5.7 release available at https://pypi.python.org/pypi/django-silk does not contain the code here: https://github.com/django-silk/silk/compare/0.5.7...master which is what github says is in 0.5.7

I have Django v1.7.1 and Silk v0.5.7

@shahakshay94 Release v0.6.0 should be available with the changes you are looking for. https://github.com/django-silk/silk/releases/tag/0.6.0


Save image to a folder

How can i configure the plugin or strapi to save the image to a folder on the bucket?
On the strapi configuration page, I see only the following options:

I tried using test.appspot.com\images as the bucket name, but strapi threw an error.

Hi,
When you upload a new file you can defined the path directly from strapi args like that (with ref, refId, field, ...) :
 const formData = new FormData();
    formData.append('files', file[0]);
    formData.append('ref', ref);
    formData.append('refId', refId);
    formData.append('field', type);
    formData.append('path', 'users/' + userId);

The folder will be created automatically, and the media will be uploaded into.
I will check if I can add a default folder in Bucket.

Just tested this and when I add
formData.append('path', 'testfolder/');

It continues to upload into the random 32 digit folder instead of mine, something like "4be815a61d504993b8a2702760aa3fa7", and different every time (which is HORRIBLE!!)
I noticed the docs say this:
path: (optional): The folder where the file(s) will be uploaded to (only supported on strapi-provider-upload-aws-s3 now).
Obviously I'm a much bigger fan of google cloud, so I'm hoping we can get the append to work with this package as well :)

@cpres
probably the '/' is the problem. Try uploading without one. Works fine for me.


Issue #146: CLOUDLAUNCH_PATH_PREFIX env var

Added an environment variable and setting for setting a path prefix for CloudLaunch, for when it is deployed behind a proxying server.

@machristie LGTM. I think the only additional thing we need is to update the ansible playbook (https://github.com/galaxyproject/ansible-cloudlaunch) so that the path_prefix is passed in for production deployments through supervisor: https://github.com/galaxyproject/ansible-cloudlaunch/blob/master/roles/cloudlaunch/templates/supervisor_config_cloudlaunch.j2

Yes I can do that too, just didn’t get to that yet. Thanks.
From: Nuwan Goonasekera<EMAIL_ADDRESS>Reply-To: galaxyproject/cloudlaunch<EMAIL_ADDRESS>Date: Monday, April 16, 2018 at 2:02 PM
To: galaxyproject/cloudlaunch<EMAIL_ADDRESS>Cc: "Christie, Marcus Aaron"<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [galaxyproject/cloudlaunch] Issue #146: CLOUDLAUNCH_PATH_PREFIX env var (#147)
@machristiehttps://github.com/machristie LGTM. I think the only additional thing we need is to update the ansible playbook (https://github.com/galaxyproject/ansible-cloudlaunch) so that the path_prefix is passed in for production deployments through supervisor: https://github.com/galaxyproject/ansible-cloudlaunch/blob/master/roles/cloudlaunch/templates/supervisor_config_cloudlaunch.j2
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/galaxyproject/cloudlaunch/pull/147#issuecomment-381695518, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AA3O_SRcZiYdohybuxTpWppPqo-I374Yks5tpNyigaJpZM4TWuv6.


Remove imp and just use importlib to avoid memory error when importin…

[ ] closes #13282

Remove imp from pandas.show_versions() to fix memory problem.

hmm, importlib is only available in PY3 I think.
can you hack something from this:
https://pypi.python.org/pypi/importlib (don't want to add as a dep)

import lib is in 2.7 but this is for python2.6?

oh, then that's ok

ok this looks good. ping when green.

thanks @nparley


Added fallback to nullableToResult.

Added fallback to nullableToResult so it will have the similar signature as nullableToValidate.
closes #162.

Thanksies :>


Getting error when trying to clone swiftlocation with cocoapod

Hi guys, anyone have any idea why did I got these error ? I'm using xcode 8.3.2
My pod config :

Pod Error :

Thank you in advance.

Same issue here

try this :

pod 'SwiftLocation', :git => 'https://github.com/malcommac/SwiftLocation.git', :branch => 'master'

Thank you, it's working perfectly.

Thank you for your contribution.
A new rewritten version is available both on master and CocoaPods (marked as 3.0.0-beta). It requires iOS9 and Swift 4.
If you encounter any other problem feel free to open an issue; I'll close because with the new version its now invalid.


Should error whenever an unvalidated env variable is used

I am looking for a way to ONLY allow using env variables that are defined in my env.ts schema.
As an example:
env.ts
import {defineConfig} from '@julr/vite-plugin-validate-env'
import {z} from 'zod'

export default defineConfig({
  validator: 'zod',
  schema: {
    VITE_LANGUAGE: z.string(),
  },
})

In the application code, the following should occur (desired behavior)
src/app.ts
// ✅ TypeScript: type "string", all good!
import.meta.env.VITE_LANGUAGE

// ❌ TypeScript: Key "VITE_WHATEVER" does not exist
import.meta.env.VITE_WHATEVER

I am aware this is not directly related to this library but rather to Vite's typing of ImportMetaEnv (see below). Feel free to close if you think this should not be discussed as part of this project. However I think it would be worth adding a documentation entry in this project's README if we'd find a solution for this - hence why I created an issue here.
node_modules/vite/types/importMeta.d.ts
interface ImportMetaEnv {
  [key: string]: any
  BASE_URL: string
  MODE: string
  DEV: boolean
  PROD: boolean
  SSR: boolean
}

Vite seems to add [key: string]: any as a default. I wonder whether there is a way we could overwrite that.  Since we have to use an interface to augment ImportMetaEnv and to make the module augmentation work I am not too sure how though.
I've already tried the following with:
env.d.ts
type ImportMetaEnvAugmented =
  import('@julr/vite-plugin-validate-env').ImportMetaEnvAugmented<
    typeof import('./src/env').default
  >

interface ImportMetaEnv extends ImportMetaEnvAugmented {
  [key: string]: never
}

Unfortunately, this is a limitation of typescript and module augmentation: you can't modify a previous declaration.
The only alternative I see would be to do this:
// lib/env.ts
type ImportMetaEnvAugmented =
  import("@julr/vite-plugin-validate-env").ImportMetaEnvAugmented<
    typeof import("../env").default
  >;

export const env: ImportMetaEnvAugmented = import.meta.env

And use only this env variable to access environment variables


4.9.x lock issue for DefaultMQPushConsumer order consume

The RebalanceImpl will not lock the related queue immediately when the order consumer first starts as in the following picture.

Related code:
https://github.com/apache/rocketmq/blob/0e43444081507b422c9911869748698c1d71b003/client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java#L368-L378
The locked field should be set to true when creating ProcessQueue cause it has been already locked.

#5466


Bundle update ruby 3.3.2

coverage: 93.495%. remained the same
when pulling 027f9e87b132d7e80a26eaafc7144d41db3cf15b on bundle-update-ruby-332
into 2e4bf04b6db59191a7d3ea27765fafe578396d24 on main.

I think this should get closed in favor of #2602.


Create vendor

Description
viewmymarket component/ createvendor/ searchmarkets working.  some changes needed.
Describe change or new feature here.
basic functionality to those pages.
Checklist
Remove any items which are not applicable.

[x ] I have performed a self-review of my own code
[ x] I have commented my code, particularly in hard-to-understand areas
[ x] I have made corresponding changes to the documentation
[ x] I have added tests that prove my fix is effective or that my feature works AND the tests pass

found error needs resolved before push


Unable to load local model :  id must be in the form 'repo_name' or 'namespace/repo_name'

Description of the bug
When loading a local model using this command :
python3 -m manifest.api.app \
    --model_type huggingface \
    --model_name_or_path /workspace/models/minotaur-15b \
    --device 0 \
    --model_generation_type text-generation

I get the following error message :
huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '/fsx/bigcode/experiments/pretraining/conversions/starcoderplus/large-model'. Use repo_type argument if needed.
The path is indeed or valid one pulled from https://huggingface.co/openaccess-ai-collective/minotaur-15b.
I tried by quoting "/workspace/models/minotaur-15b" or using a local path "./models/minotaur-15b".
To Reproduce
Clone the above repositor, and execute the specified command.
Expected behavior
It should load the model.
Environment (please complete the following information)

Runpod machine, 4090 GPU

After digging through the code it seems repo path meant /organization/repoID, but never local path. I saw I can use the --cache option to save the models locally. But this imply that I can't use a locally trained model ?

Hey. I haven't seen this error before. Did you finetune minotaur and are trying to load it from a saved checkpoint? My immediate guess is the checkpoint is in a weird format but not sure. I have been able to load lots of finetuned models before.

Same problem.
The local model cannot be loaded. It was downloaded from https://huggingface.co/NumbersStation/nsql-llama-2-7B

Did you just try passing NumbersStation/nsql-llama-2-7B as the model_name_or_path?


Build on Windows

I made my first attempt at building wampcc on Windows.
I was able to build all the dependencies on both Linux and Windows, including

openssl
libuv
jansson
jalson (separately, not in a subdirectory under wampcc)

No trouble building wampcc on Linux as usual, but on Windows MSVC/2015 reported 200 errors. Looking at the errors, one realizes that the source code was written for UN*X platforms only.
Do you plan to port it to Windows?

Hi,
I'd like to port it to windows, however presently my
priority is msgpack support, and then some wamp advanced protocols
features.  After that I plan to look at Windows.
Problem is that I don't have much experience building with MSVC++, which
is why I put it off. I think core wampcc code should be straight-forward
to port (since its just basic C++ really).  The hardest part I imagine
is the dependencies (including the json stuff in Jalson separate
project).  These are easy to build on Linux, but I don't think they ship
with MSVC solution files(?)
Would be great if you could provide me with some tips on how you managed
to set up the build of the dependencies.  E.g. what versions of the
openssl, libuv, jansson did you use?  Were there any other steps or
patches needed to get compiling on windows?
Thanks,
Darren
On Mon, 2017-05-08 at 18:42 -0700, petten wrote:

I made my first attempt at building wampcc on Windows.
I was able to build all the dependencies on both Linux and Windows,
including
  * openssl
  * libuv
  * jansson
  * jalson (separately, not in a subdirectory under wampcc)

No trouble building wampcc on Linux as usual, but on Windows MSVC/2015
reported 200 errors. Looking at the errors, one realizes that the
source code was written for UN*X platforms only.
Do you plan to port it to Windows?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Now I recall I had to modify a couple of spots in jalson to get it built on Windows. I believe they are use of "and" as a keyword, which MSVC/2015 does not seem to support. Also I worked on release 1.0 (not the master) that does not rely on msgpack-c.
Not sure whether it can be considered as a tip, but I used CMake, which is new to me, too. CMake generates almost everything build-related, including Windows project files, so you don't have to make them yourself.
For openssl, I used 1.0.2k (just linking to it, not building it using CMake). For jansson and libuv, I took the respective, latest releases (not the masters) found here (github).  Jansson has its own CMake files, which work right out of the box. Libuv does not have built-in CMake files, but one can find more than one made for it here (github); I picked this one: https://github.com/havoc-io/libuv-cmake.
I wrote CMake files myself for jalson and wampcc. Time permitting, I'll try to look into those compilation errors with wampcc on Windows just as I did with jalson.

Hi,
Thanks for this.  I'll try to get all the dependencies building over
next couple days, and then try to get wampcc building.  I suspect there
will be mostly minor code tweaks to get wampcc compiling, but some parts
will need windows-specific functions (eg, to get hostname & username).
Possibly those functions can be provided by libuv, I'll have to check.
Thanks,
Darren
On Tue, 2017-05-09 at 14:05 -0700, petten wrote:

Now I recall I had to modify a couple of spots in jalson to get it
built on Windows. I believe they are use of "and" as a keyword, which
MSVC/2015 does not seem to support. Also I worked on release 1.0 (not
the master) that does not rely on msgpack-c.
Not sure whether it can be considered as a tip, but I used CMake,
which is new to me, too. CMake generates almost everything
build-related, including Windows project files, so you don't have to
make them yourself.
For openssl, I used 1.0.2k (just linking to it, not building it using
CMake). For jansson and libuv, I took the respective, latest releases
(not the masters) found here (github). Jansson has its own CMake
files, which work right out of the box. Libuv does not have built-in
CMake files, but one can find more than one made for it here (github);
I picked this one: https://github.com/havoc-io/libuv-cmake.
I wrote CMake files myself for jalson and wampcc. Time permitting,
I'll try to look into those compilation errors with wampcc on Windows
just as I did with jalson.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

Hi,
I was able to get jansson and libuv building on windows.  Would it be
possible for you to share your jalson cmake file with me?
Thanks,
Darren
On Tue, 2017-05-09 at 14:05 -0700, petten wrote:

Now I recall I had to modify a couple of spots in jalson to get it
built on Windows. I believe they are use of "and" as a keyword, which
MSVC/2015 does not seem to support. Also I worked on release 1.0 (not
the master) that does not rely on msgpack-c.
Not sure whether it can be considered as a tip, but I used CMake,
which is new to me, too. CMake generates almost everything
build-related, including Windows project files, so you don't have to
make them yourself.
For openssl, I used 1.0.2k (just linking to it, not building it using
CMake). For jansson and libuv, I took the respective, latest releases
(not the masters) found here (github). Jansson has its own CMake
files, which work right out of the box. Libuv does not have built-in
CMake files, but one can find more than one made for it here (github);
I picked this one: https://github.com/havoc-io/libuv-cmake.
I wrote CMake files myself for jalson and wampcc. Time permitting,
I'll try to look into those compilation errors with wampcc on Windows
just as I did with jalson.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

I'll attach my cmake files for jalson and wampcc here on Monday.
Enjoy the weekend :-)

CMakeLists.txt
Attached please find my cmake file for jalson release 1.0. You may have to adjust things in your environment to make it work.
(First time trying this drag and drop on the box - not sure if it works.)

CMakeLists.txt
config.h.zip
I made these two files for wampcc. The second file was zipped because it has the extension of .cmake, which is not allowed by github for attachment (come on github, it's just a plain text file!). It's used by the first file to generate the config.h referred to by your source code.
In the second file I did not get all the macros found in the config.h generated by the configure script (not needed by cmake), because I don't know all the techniques necessary in cmake to make that happen. But it seems enough to satisfy the source code.
I'm not able to build wampcc all the way through on Windows. I'll post another comment about some of the issues I encountered.

In the first attempt I made at building wampcc on Windows (MSVC/2015) using the cmake files attached above, I got about 200 errors. I managed to get that number down to about ten, but I'm not able to figure out the errors related to libuv (see below).
On type of error is that MSVC does not seem to like the use of "and", "or", and "not" as C++ keywords. Replacing them with &&, ||, and !, respectively, is a reasonable solution.
Another type of error is the use of functions found on UNIX systems only, such as <regex.h>, for which I made the following using std::regex (though I'm nor sure if it's exactly the same as the code using regex.h):
`struct regex_impl
{
std::regex  re_;
regex_impl() : re_("(^([0-9a-z_]+\.)*([0-9a-z_]+)$)", std::regex::extended|std::regex::icase) {}

bool matches(const char * s) const {
    std::cmatch match;
    return (std::regex_search(s, match, re_) && match.size() > 1);
}

};
`
I think std::regex should work on all platforms. So perhaps you'd consider getting rid of the use of regex.h altogether.
A third type of error is related to the use of libuv. Certain data structures in the libuv interface appear to be defined differently on UNIX (uv-unix.h) and Windows (uv-win.h), with some "elaborate" macros involved. Your code refers to some members of some data structures found in the UNIX version only.

Hi,
Many thanks for this.  You've made lot of progress, not much for me to
do!
I'll take a look over next couple of days.
For the regex, I would prefer to use c++11, however, the regex
implementation is broken for lots of versions of gcc, very frustrating.
http://stackoverflow.com/questions/12530406/is-gcc-4-8-or-earlier-buggy-about-regular-expressions
That's why initially it seems a sensible idea to stick with posix.
Perhaps this can be isolated out, so use regex.h in linux, and
std::regex on windows.
As for libuv, that should be possible to work around.
On Mon, 2017-05-15 at 10:59 -0700, petten wrote:

In the first attempt I made at building wampcc on Windows (MSVC/2015)
using the cmake files attached above, I got about 200 errors. I
managed to get that number down to about ten, but I'm not able to
figure out the errors related to libuv (see below).
On type of error is that MSVC does not seem to like the use of "and",
"or", and "not" as C++ keywords. Replacing them with &&, ||, and !,
respectively, is a reasonable solution.
Another type of error is the use of functions found on UNIX systems
only, such as <regex.h>, for which I made the following using
std::regex (though I'm nor sure if it's exactly the same as the code
using regex.h):
`struct regex_impl
{
std::regex re_;
regex_impl() : re_("(^([0-9a-z_]+.)*([0-9a-z_]+)$)", std::regex::extended|std::regex::icase) {}
bool matches(const char * s) const {
std::cmatch match;
return (std::regex_search(s, match, re_) && match.size() > 1);
}
};
`
I think std::regex should work on all platforms. So perhaps you'd
consider getting rid of the use of regex.h altogether.
A third type of error is related to the use of libuv. Certain data
structures in the libuv interface appear to be defined differently on
UNIX (uv-unix.h) and Windows (uv-win.h), with some "elaborate" macros
involved. Your code refers to some members of some data structures
found in the UNIX version only.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

Hi,
For jalson project, I checked-in this file, with some modifications.  It
seems to work on Linux, and I think Windows.  Also made the fixes to get
the code compiling on Windows.
On Mon, 2017-05-15 at 10:27 -0700, petten wrote:

CMakeLists.txt
Attached please find my cmake file for jalson release 1.0. You may
have to adjust things in your environment to make it work.
(First time trying this drag and drop on the box - not sure if it
works.)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

Thank you Darren.
I think you can put the cmake files in the root source directory (as opposed to a cmake subdir). Of course it's ultimately up to you.
Now the real deal I'm waiting for is wampcc :-)

Subject extension: Build it on Mac
With minor adjustments to the cmake files (of wampcc and its dependencies as well), I was able to get compilation through on Mac to a similar point as on Windows.
All dependencies are successfully built, including jalson release 1.0 (for now I don't want the one more dependency of msgpack-c).
When the build flow reached wampcc, the first error I saw was that the Mac did not recognize SYS_gettid used as the argument to syscall(). Windows did not like this bit, either, of course. I think it's possible to replace syscall(SYS_gettid) with std::this_thread::get_id() on all platforms.

Got wampcc built on Mac (10.12 Sierra + Xcode 8.3.2 + CMake 3.8.1).
A number of changes are necessary, but not too many.

Hi,
I'm still continuing on the Windows build.  I've checked-in a first
version (in a branch called 'windows').  It resolves all of the build
errors for libwampcc, but the admin program doesn't compile due to
getopt -- would need to port that function also.
Next I plan to address all the compiler warnings, there are lots, and
then try to add a new cmake target, for some or all of the unit tests --
e.g., now that it compiles on windows, need to also check it functions
correctly (there is chance a bug was introduced in all these changes).
Or perhaps the some of the example programs will work (eg, embedded
router.
As for jalson & msgpack, that all builds fine on Windows. It uses
msgpack as header only, so nothing extra to compile. You will need to
take the head/master version of jalson, and, the head/master of msgpack.
Thanks for the cmakelists & config.h !
Darren
On Fri, 2017-05-19 at 15:16 -0700, petten wrote:

Subject extension: Build it on Mac
With minor adjustments to the cmake files (of wampcc and its
dependencies as well), I was able to get compilation through on Mac to
a similar point as on Windows.
All dependencies are successfully built, including jalson release 1.0
(for now I don't want the one more dependency of msgpack-c).
When the build flow reached wampcc, the first error I saw was that the
Mac did not recognize SYS_gettid used as the argument to syscall().
Windows did not like this bit, either, of course. I think it's
possible to replace syscall(SYS_gettid) with
std::this_thread::get_id() on all platforms.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

Darren, got a question for you.
Would it be possible (and easy?) to substitute std::future and related with boost::future (and related)?
Reason: Have to use Mac 10.7 SDK, which does not support std::future.
(Though with 10.8 SDK or above, wampcc can be built without problem.)

This might be possible. Could be introduced via a macro, eg., use FUTURE instead of std::future, and define it appropriately.    I haven't used boost::future, so would have to try it out.   I first want to complete the Windows port.  Even though libwampcc currently compiles, there are some functions left with place-holder implementations.

Mac 10.7 SDK does support std::future; so no need to use boost::future.
Wampcc can be built with:

Xcode 7(.3.1) + 10.7 SDK or above
Xcode 8(.3.2) + 10.8 SDK or above

Apple somehow decided not to make Xcode 8 work smoothly with 10.7 SDK as far as std::future is concerned. Though the combo still works together in general.

Oh, thanks good to know, thanks.  I've done futrher changes to the cmakelists.txt, now able to build one of the example programs on windows, and seems to work fine.  I next  want to test the openssl also;  so far cannot get that working in Windows.  During the windows port I've also noticed a memory leak, so need to be fixed soon.

Hi
I have merged all of the windows related changes into master.  I'm now going to prepare a new release to capture this version that supports windows, and fixes the memory leak.   Over time I'll add more of the example programs to the cmakelists.txt.

Awesome!  I'm eagerly awaiting your new release.
Meanwhile, may I ask a couple of questions, Darren?
My primary use of wampcc will have it run as a client (more like a server in the usual sense) that provides a set of RPC services; there will be a separate WAMP router that relays calls from various clients.
In your code examples, an EV thread is used to handle incoming requests. How many EV threads are there in wampcc? If there are many clients making requests, how does wampcc scale?

Hi
Right now wampcc has two internal threads.  One thread always services IO.  The other thread  ("EV" -- "event") services callbacks into the user program (e.g. RPC calls).  Two threads in total.   Later it could be a  design evolution to use additional EV threads, and balance active wamp sessions across them.  But also, user program can decide to have multiple instances of a wampcc kernel - but that would mean having to listen on multiple ports; not ideal.

I downloaded the master today and planned to build it on Windows.
Before doing that, I tried to build it on Linux. Two minor things were easily gotten around:

My compiler (option) says: protocol.h l.176 void send_msg(const json_array& j) override: argument j is not referred to in the function body.
wampcc::logger::stdlog was renamed as stream.

However, it no longer works when attempting to connect to the same bonefish router (as reported in issue #1):
LOG 20170601-15:42:04.89711432535  WARN session #1 handhake error: http header is not a websocket upgrade (wamp_session.cc:582)
LOG 20170601-15:42:04.89724232535  INFO session #1 closing (wamp_session.cc:1814)
I went back to the older version (of wampcc), which still works the same as before.

I fixed this in master, and new release 1.3.1.  Issue was parsing of http headers; had lost the case insensitive comparison when porting to windows.

OK, thank you.
I downloaded release 1.3.1 and verified that the new bonefish connection issue has been fixed.
Now I proceeded to build jalson and wampcc on Windows, but met link errors.
I have under C:\prj\all_libs:

libuv
jansson
jalson
wampcc
{possibly other libraries}
BUILD\debug
BUILD\release

Under either BUILD\xxx sub-directory (basically CMAKE_INSTALL_PREFIX), after building the libraries one by one:

libuv
jansson
jalson
wampcc
{possibly other libraries}
bin
include
lib

The good thing about the arrangement is that the source directories (PROJECT_SOURCE_DIR) are kept clean (all the original files checked out of the repository). All build artifacts and results are generated under the BUILD\xxx* directories, respectively.
Using the same cmake files, I was able to build all libs and executables on Linux w/o a problem, but on Windows, I was only able to build all the libraries. When it came to the test and sample programs specified in the wampcc cmake file, I got link errors, e.g.:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"C:\prj\all_libs\BUILD\debug\wampcc\Debug\test_misc.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:/prj/all_libs/BUILD/debug/lib" /LIBPATH:"C:/prj/all_libs/BUILD/debug/lib/Debug" kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib Debug\wampcc.lib "C:\prj\all_libs\BUILD\debug\lib\wampcc_json.lib" "C:\prj\all_libs\BUILD\debug\lib\jansson.lib" "C:\prj\all_libs\BUILD\debug\lib\uv.lib" "C:\prj\all_libs\BUILD\debug\lib\ssleay32.lib" "C:\prj\all_libs\BUILD\debug\lib\libeay32.lib" advapi32.lib iphlpapi.lib psapi.lib shell32.lib user32.lib userenv.lib ws2_32.lib /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcmtd.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:/prj/all_libs/BUILD/debug/wampcc/Debug/test_misc.pdb" /SUBSYSTEM:CONSOLE,"5.01" /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/prj/all_libs/BUILD/debug/wampcc/Debug/test_misc.lib" /MACHINE:X86 /SAFESEH  /machine:X86 test_misc.dir\Debug\test_misc.obj wampcc_json.lib(jalson.obj) : error LNK2019: unresolved external symbol "void __cdecl wampcc::apply_patch(class wampcc::json_value &,class std::vector<class wampcc::json_value,class std::allocator<class wampcc::json_value> > const &)" (?apply_patch@wampcc@@YAXAAVjson_value@1@ABV?$vector@Vjson_value@wampcc@@V?$allocator@Vjson_value@wampcc@@@std@@@std@@@Z) referenced in function "public: void __thiscall wampcc::json_value::patch(class std::vector<class wampcc::json_value,class std::allocator<class wampcc::json_value> > const &)" (?patch@json_value@wampcc@@QAEXABV?$vector@Vjson_value@wampcc@@V?$allocator@Vjson_value@wampcc@@@std@@@std@@@Z) [C:\prj\all_libs\BUILD\debug\wampcc\test_misc.vcxproj] C:\prj\all_libs\BUILD\debug\wampcc\Debug\test_misc.exe : fatal error LNK1120: 1 unresolved externals [C:\prj\all_libs\BUILD\debug\wampcc\test_misc.vcxproj]
Symbol wampcc::apply_patch() can be found in the wampcc_json.lib, but the linker disagrees. The above example was for test_misc.exe, but the same error occurred for example_basic_embedded_router.exe, too.
Note that I modified the cmake file a little bit, using the cmake find_library() to get and place the absolute paths to the few key libraries on the linker command line.

This is due to a change in the jalson library, for the windows port.  Can you try to download jalson-master, or jalson-1.3, builds & install that, and try again.  That symbol had a signature change (void --> bool).  Note that to use the newer jalson, you also need to download the source code of msgpack (must use the master version) and unzip it into the external folder.    Its header only, so no need to build.    Later on I would like  to merge the jalson code into the wampcc repo, to make this all a bit easier.
Right now the windows cmake support is minimal, ie, only a couple of targets.  I want to improve that though, add more example programs etc., better usage of cmake find_library etc.

Yep, I was using release 1.1.
The issue was mismatched return type for the function wampcc::apply_patch(). In the header file, it's void, but in the .cc file it's bool.
The build went through after I changed the header file to match the implementation.
Thanks!

Release 1.3.1 Mac (Xcode 7.3.1 + 10.7 SDK) build error:
data_model.cc:265:3: error: invalid operands to binary expression ('int' and 'std::function<void (const jmodel_subscription &)>')   THROW_FOR_INVALID_FN( on_change );   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Volumes/greg/prj/napi/l64/2/entsrv/trunk/3rdparty/wampcc/lib/data_model.cc:14:11: note: expanded from macro 'THROW_FOR_INVALID_FN' if (false == m_observer. X) throw std::runtime_error("observer." #X " must be valid");     ~~~~~ ^  ~~~~~~~~~~~~~

kernel.h:74:15: error: implicit instantiation of undefined template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'   std::string certificate_file;               ^
Perhaps should add #include  at the top of kernel.h.

Changing
if (false == m_observer. X) ...
to
if (! (m_observer. X)) ...
gets around the that error.
Or alternatively,
if (nullptr == m_observer. X)) ...

Thanks.  Updated master.  Also changed where version defined are located (moved to version.h, and renamed), so you might need to do minor changes.

For the first time today I did the same test on Mac as on Linux, with the identical result, but there was a warning in the log when the connection was made to the same WAMP router. Thought might be interesting to share here:
LOG 20170607-17:44:32.266643-1  INFO session #1 state: from init to sent_hello (wamp_session.cc:387)
LOG 20170607-17:44:32.269718-1  INFO session #1 state: from sent_hello to open (wamp_session.cc:387)
LOG 20170607-17:44:32.269952-1  INFO session #1 sending register request for 'node.api', request_id 1 (wamp_session.cc:979)
LOG 20170607-17:44:32.274130-1  WARN wamp error response has unexpected original request type 64 (wamp_session.cc:1513)

I looked at source code. The original request type 64 is wamp_msg_register.  I registered the 'node.api' RPC service (as shown in the 3rd logged line). The context in the source code handles a number of request types, but not wamp_msg_register, hence falls into the default case.

A question about logging for you, Darren:
Global objects like std::cout are not thread specific. My stream object for logging (passed to wampcc::logger::stream) is also currently not thread specific. But I'd like to use the thread_local keyword to make it thread specific.
That does not seem to be a good move if the stream object passed into wampcc::logger::stream is used subsequently in other threads than the one that initialized wampcc::logger::stream (with the stream object passed in as a reference). Right?
I'll try thread_local tomorrow and see what happens.

Hi.  Thanks for the bug report, will take a look.  Currently in the default loggers that are implemented in kernel.cc a mutex is used to protect write to the stream object:

  std::lock_guard<std::mutex> lock(m_mutex);
  m_stream << std::move(timestamp);
  m_stream << tid << " ";
  m_stream << level_str(l) << " ";
  m_stream << s;

This should mean that all threads can use the wampcc default loggers.  But yes, you are right, if another thread, owned by the application, uses the same stream object directly, that is not thread safe.   Am not sure thread_local will fix this, since std::cout  / std::cerr is a global object.
I can think of two solutions initially.  One is to just remove this function, ie, dont allow user to pass in std::cout / std::err.  Or, provide an additional argument to the stream logger which is a function that can lock and unlock access before and after the use the stream object.  I.e. application code has to provide the mutex in addition to the stream object.

I did the experiment.
After thread_local was added ahead of my log stream object, it's supposed to have one copy per thread, instead of a single, global one.
To my surprise, it can be passed to wampcc::logger::stream(), and inside when used by a different thread it simply does not do the work (logging), without adverse side effect.
Here is when my program attempted to connect to the WAMP router::
LOG 20170608-12:30:44.30137331910  INFO session #1 sending register request for 'node.api', request_id 1 (wamp_session.cc:979)
LOG 20170608-12:30:44.30171331912  INFO session #1 procedure 'node.api' registered with registration_id 104 (wamp_session.cc:1005)

Switching back to the older executable without the thread_local keyword ahead of my log stream object:
LOG 20170608-12:31:57.51499131967  INFO session #1 state: from init to sent_hello (wamp_session.cc:387)
LOG 20170608-12:31:57.51583531968  INFO session #1 state: from sent_hello to open (wamp_session.cc:387)
LOG 20170608-12:31:57.51599231966  INFO session #1 sending register request for 'node.api', request_id 1 (wamp_session.cc:979)
LOG 20170608-12:31:57.51632131968  INFO session #1 procedure 'node.api' registered with registration_id 105 (wamp_session.cc:1005)

So the first two lines with the word state were logged in a different thread from the one in which wampcc::logger::stream() was invoked.

In general, it's good to have the thread_local specifier on a log stream object. Because, without a mutex as in your code, the logged elements from two different threads may be mixed together using a global log stream object.
But when it comes to wampcc::logger::stream(), it's necessary to pass reference to a global log stream object.

GCC 5.4 (Linux) and MSVC/2015 support thread_local, but not Xcode 7.3.1 + 10.7 SDK (with option -stdlib=libc++).

I think solution can be to change the ::stream(...) so that it takes a std::ostreamstring& and, a std::unique_lock&  ... the latter lock is used to sychronise write to the stream.  However, I feel this is getting complex, and it perhaps it is better to not provide the stream logger, nor the console logger.  The end application would have to define their own logger object.

Today for the first time I tried it on Windows, getting the same error (unexpected original request type 64) as on Mac.
It did not work.
And I realized it did not work on Mac, either, yesterday, because at the time my program was also running on Linux, which actually provided the service.

I think solution can be to change the ::stream(...) so that it takes a std::ostreamstring& and, a std::unique_lock& ...

Well, on a platform with a compiler that supports thread_local and a log stream object is defined as such, instead of the ::stream(...) receiving a reference to the log stream object, it could receive a client-defined (free) function that returns a reference to the thread_local log stream object.
In other words, when the free function is called inside any wampcc thread, it should return a reference to the one log stream object in that thread's local storage. Hence the mutex locking inside wampcc can be eliminated.

For the registration problem, i've added a fix for this.  Notice that a new provide() function is added, which takes a call back, so that its possible to detect success/failure of the registration attempt

In the lastest master, I made a change to the stream(...) logger.  It no longer takes ostream&.  Instead it takes a reference to a new type, lockable_stream.  This type brings together an actual ostream& and a lockable behaviour.  The lockable behaviour latter is provided via two methods, lock() and unlock().     So to provide your own stream-type to the stream logger, you can derive a class from lockable_stream and implements it's virtual methods.  If you are certain that your own implementation uses thread_local storage (and so doesn't need lock/unlock), then those virtual methods of  lockable_stream can just perform no action.  Hope this help.  Also note, you don't need to use the stream logger API, you can just create a custom logger instance, and assign the write and wants_level methods.

I realized over the weekend that the failures on Mac and Windows had been due to the fact that my Linux machine had already registered the service with the WAMP router.
Came in this morning, shut down Linux, and confirmed that Windows and Mac behaved the same as Linux as long as the service was not yet registered with the router.
So the code base works on all the three platforms (Linux, Win, Mac) as of release 1.3.1.

For the logger, perhaps you can offer an alternative (overload):
    stream(thread_local ostream& os, ...);

It should work in principle. Internally you no  longer need to use lock.

Hi.  Well,  there was definitely a bug in the handling of the registration replies, so was fortunate that you stumbled upon it.  Also, its better now that the the provide() function has ability to be called back upon success.     I'll look at the thread_local appraoch; it can sit aside the current solution.  Problem is that I dont think thread_local works with std::cout, there will always be a need for a mechanism to make access to the console (cout) logger synchronized.

Indeed, std::cout is (still) global, so can't be thread_local, at least for backward compatibility.
I think you can keep the existing class stdout_logger, but make another logger class to use a passed-in thread_local std::ostream&. Say,
class tl_stdout_logger
{
public:
  tl_stdout_logger(thread_local std::ostream& __os, bool __incsource)
    : m_stream(__os), m_incsource(__incsource)
  {
  }
  ....

private:
  ....

  thread_local std::ostream& m_stream;
  bool m_incsource;
};

Compared to class stdout_logger, this one does not have the std::mutex m_mutex; member; and tl_stdout_logger::write(...) does not need to use lock.

Hi,
I don't think C++ allows a parameter to have a  thread_local qualification.  gcc 4.8 gives this error :  storage class specifiers invalid in parameter declarations  ... for the code above.
Note that in latest master, the stdout_logger no longer exists.  It is replaced by the code in logger::stream, and this new code does not use a mutex.   Instead the locking is deferred to the virtual methods of lockable_stream.

OK, GCC 5.4 does not like thread_local as a qualifier of a function parameter, either. And C++ probably does not allow it in general.
I switched to the master/trunk, and came up with the following lockable stream:
class My_log_stream : public std::ostream { ... };
thread_local My_log_stream slog;

struct My_lockable_stream : wampcc::logger::lockable_stream
{
    std::ostream& stream() override { return slog; }
    void lock() override {}
    void unlock() override {}
};

Initially logging from inside wampcc stopped working for me. Then I made it work again by modifying `wampcc::logger::stream(lockable_stream& ...)' as follows.
    ....
    //| oss << std::endl;

    ostr.lock();
     try {
       ostr.stream() << oss.str() << std::endl;    //| commented out above, added here
     } catch (...) {}
    ostr.unlock();
    ....

The reason is that My_log_stream relies on std::endl (or more specifically std::stringbuf::sync(), which is overridden) to redirect the log line to the intended destination (similar to what wampcc::logger does).
So returning a thread_local std::stream as a std::stream& does work; the thread of execution upon going inside wampcc::logger::stream(lockable_stream&  ...) gets a reference to the std::stream specific to that thread.

Added the std::endl fix to master.

Thank you Darren!
I'm marking this issue as closed.


Gcc 4.8 is picky, strdup is not available in C99...

This is a libc issue, not a gcc issue (strdup is part of libc, not the C compiler). Also, the correct way to fix this is using the feature test macros.
On the two systems I have available (glibc 2.15, and glibc 2.20, which is the latest stable glibc release) the man page says:
       strdup():
           _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE >= 500 ||
           _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
           || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L
       strndup():
           Since glibc 2.10:
               POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700
           Before glibc 2.10:
               _GNU_SOURCE

and the src/Makefile.am does set _XOPEN_SOURCE=700.
Can you take a look at your libc and see what feature test macros it wants?

Yeap, retested - everything seems to be OK, I did not use all the flags to compile files...


Link to LatteDB use cases

Once LatteDB is properly set up, we should also link in the docs to the LatteDB project.
See also lattedb issue 48 for one use case.

Addressed in paper. Closes once shortpaper branch is merged.

Closed with #37


Method Resolution Error on CreateDeployStep

https://github.com/jenkinsci/pipeline-aws-plugin/blob/2cbd6200a8545ecde900f421288d514435a8ce9a/src/main/java/de/taimos/pipeline/aws/code/deploy/CreateDeployStep.java#L155
Example above. I'm trying to understand if I am missing something. I don't see getter methods for the properties on this class. There are ~12 errors in the project as a result. Is there a setting I should be disabling in Intellij (v2020.1.1)? JDK version is 8_271.
Thanks in advance!

Disabling wasn't the issue. Fresh install of Intellij didn't have the plugin Lombok installed/enabled. Plugins > Lombak > Install > Restart IDE resolved this.


Sort order: "no date" should be after filled dates

Kanboard is great :+1:
When I sort tasks by date, in order to see the most urgent tasks, I can either have descending order, that is the last ones first, or ascending order with... the "no dates" first...
Don't you think tasks with no date could be considered as less urgent than tasks with dates?

I agree this is an annoyance, and I would like to see "no dates" ordered to the end for ascending order. However, I temporarily work around this by picking some too far in the future date (1/1/2020 usually). It's an added extra step which ideally wouldn't need to occur.

:+1:  in terms of sorting from "closest due date" to "last due date"

+1

I took a look into this issue. A schema change may be required to resolve this issue, as tasks without a due date have a date_due value of 0 and thus sort before the list of earlier due dates:
sqlite> select id,date_due from tasks where project_id = 6 and is_active = 1 order by date_due asc;

...
290|0
291|0
292|0
261|1526529600
263|1527825600

in pure sql you can always add addtional sort criterias to get what you want without data model changes, here first a sort that ensures all values > 0 are first:
         select id,date_due from tasks where project_id = 4 and is_active = 1
         order by case when date_due >0 then 1 else 0 end desc, date_due asc;

however

most of the time this does not work well with tools that map tables to objects
you have to be careful to select a logic that works in all databases
and there are probably more reasons ....

This issue has been closed automatically by a bot for inactivity. For more information, read the FAQ.


App that is minimized/running in the background cannot be opened from tray (v0.0.6RC4)

Version: v0.0.6RC4
OS: Windows 10
Computer used for testing Spacemesh lab 1
Expected:
User selects ‘run in background’ after clicking the exit button of the application. App is minimized and a spacemesh icon appears in the tray. User left clicks on icon in tray, and the app reopens.
Actual:
User left clicks on icon in tray, and nothing happens, even after repeated attempts.
Repro steps:

Uninstall application and make sure no spacemesh processes are running.
Install app from scratch.
Set up wallet and smeshing.
When app indicates it is actively smashing, exit, and select ‘run in background’.
Click on icon in tray.

Note: The user can open the app by right clicking and selecting 'show app', but a normal left click does nothing.

Can't reproduce on lab1 and mac os

Can still reproduce in build v.0.0.6RC5. Please see video:
https://files.slack.com/files-pri/T6AU7S14G-F01179NLAAU/20200401_162521_1_.mp4

To clarify, app should be opened on single-click and on double click on the tray icon like most windows tay icons behave. Currently it is only accessible from the tray icon menu on right-click.

fixed in #495


Error on serve and build after upgrade to Angular 18 and native federation 18.0.0

I have a working project with angular 17 and plugin 17.1.8. I'm trying to upgrade to angular 18 and plugin 18.0.0. When I start or build the app I get the following error:
An unhandled exception occurred: Package subpath './src/builders/application' is not defined by "exports" in<EMAIL_ADDRESS>Do you have any hint on what the issue could be?

@ZissisT thank you, this worked!

after run postinstall script ng serve-original not working
An unhandled exception occurred: (0 , private_1.purgeStaleBuildCache) is not a function

after run postinstall script ng serve-original not working An unhandled exception occurred: (0 , private_1.purgeStaleBuildCache) is not a function

https://github.com/angular-architects/module-federation-plugin/issues/590


Added dynamic cluster messages

It might be useful during or after the failover to show custom messages to DBA team, e.g. if some failover operations fail and cluster recovery requires manual actions to be executed.
Each message can be acknowledged and removed from cluster page.
Resolves https://github.com/openark/orchestrator/issues/1086

@shlomi-noach , can you please take a look on this PR? :)

I'm on vacation/ooo (as my status indicates) so will only look at this when I'm back.

Hi again. While reviewing the code (and associated issue #1086) I'm not sure I understand the use case. Can you please give an example scenario? What happens, what's missing; how you would use the new changes?
On first looks, it seems to put some functionality into orchestrator that can be put elsewhere (are those playbooks for your team? Can these be opened as a GitHub issue or a Jira ticket instead?)

Hi,
When manual or auto failover happens we realized that status messages on the cluster page can be helpful to quickly understand is everything is going OK or our failover process has been failed and we need to do some manual actions. Likely in case of crash I'm going to check orhestrator page firstly and after will read logs, alerts, metrics, etc.
Creating Jira tickets is a good alternative but it seems like a solution for long-running or not urgent  problems, e.g. investigate the root cause of the failover.
Screenshot how it might looks like:

If our VIP migration is failed, it would be possible to understand just looking on this page. It is important because orchestrator can rebuild the topology successfully but to move the traffic to a new master we have to migrate the VIP.

Excuse me, the VIP switching information displayed on the picture is, we are writing directly in the hook script.


change default xml engine

defusedxml failing on python3 (3.11.6) and defusedxml-0.7.1

Related to the issue #11

probably not the best solution due to possible vulnerability  to xml injections


[HOLD for payment 2023-09-27] [$500] Login - /r/undefined shows in address bar after login new account

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Logout if already logged in
Login with new email
Observe browser address bar

Expected Result:
Url shouldn't show /undefined
Actual Result:
Url shows /undefined
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android / native
[ ] Android / Chrome
[ ] iOS / native
[ ] iOS / Safari
[x] MacOS / Chrome / Safari
[ ] MacOS / Desktop

Version Number: v1.3.66-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/115492554/1e35f2c5-a6b0-4384-b5fb-5c3ca7144c28
https://github.com/Expensify/App/assets/115492554/4fc40d34-af48-4211-b0d3-198bd16b8272
Expensify/Expensify Issue URL:
Issue reported by: @situchan
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693317302453489
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~010b8fbd47ec15094c
Upwork Job ID:<PHONE_NUMBER>565389824
Last Price Increase: 2023-09-12
Automatic offers:

bernhardoj | Contributor | 26666941
situchan | Reporter | 26666943

@rmm-fl thanks for your proposal. Could you find out the offending PR? This is a recent regression (within a month or so)

@situchan I don't think @rmm-fl proposal has a correct RCA because this only happen with the new account.

I didn't say their RCA is correct 😄
Also, this happens on existing account as well

@situchan I don't think @rmm-fl proposal has a correct RCA because this only happen with the new account.

I didn't say their RCA is correct 😄 Also, this happens on existing account as well (see @izarutskaya's video)

Not overdue

Payment summary:

Bug Reporter > @situchan $50, paid on Upwork
Contributor > @bernhardoj $500 + 50% urgency bonus, $750, paid on Upwork
Code Review > @thesahindia $500 + 50% urgency bonus, $750, to be requested in NewDot

@thesahindia what are you thinking for regression steps?

Sorry @bernhardoj - corrected!

Just waiting on @thesahindia for checklist + regression steps above

Closing

$750 payment approved for @thesahindia based on this summary.


Hack fix issue #1017

@roramirez I wonder what is causing the tests to fail on three out of four platforms... none of them are related to the weather module. Maybe there are errors in the console that we can't see.

Yes, this is something we need to fix. Its random cases

I'm not sure this is a fix. That API returns data in 3 hour increments vs a daily.  So you would have to calculate the low and high across all 3 hour increments for a day to see the daily high & low.

@kmcrawford Send me an email at<EMAIL_ADDRESS>with your email. I will send you an API key that was grandfathered into daily endpoint access.

What does this fix do? I don't understand it's purpose.

Hopefully I have time tomorrow to start working on a new weather integration to overcome the API issue. Before I do: did anyone already started working on this?
My plan is to make one new module that replaces both the current weather as well as the forecast module. It will have multiple sources (user can choose).

I haven't yet started on it.  But your approach would be the same approach I would do.  These apis are pretty simple and straightforward.

@MichMich Which service would you plan on using? Dark Sky is free unless you make 1,000 calls in a day. I've never used Apixu, but it sounds just as promising. In a perfect world, we would make it pluggable (i.e. bring your own weather provider) but that adds lots of complexity.

@nhubbard. Thats sort of the plan: multiple providers. More can be added in the future.
If you like to contribute to the discussion, Please join Slack.

What is the Slack channel?
I was bored in a meeting to made the changes in a new branch.
https://github.com/kmcrawford/MagicMirror/tree/new-api
On Wed, Sep 20, 2017 at 12:35 PM, Michael Teeuw<EMAIL_ADDRESS>wrote:

@nhubbard https://github.com/nhubbard. Thats sort of the plan: multiple
providers. More can be added in the future.
If you like to contribute to the discussion, Please join Slack.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/MichMich/MagicMirror/pull/1024#issuecomment-330909022,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACeUxbFU1sDBRd_87xbZjDcPBNXXOX2ks5skT7DgaJpZM4PZqTW
.

https://forum.magicmirror.builders/topic/4759/magicmirror-in-slack-we-ll-see-you-there

@MichMich The purpose if the openweather api return an  401 code when you use a  new account for forecast daily will to  change the other endpoint where is work.

FYI: https://github.com/MichMich/MagicMirror/commit/ef172592b8b1657a92ceea5a56b6b0629abf6046

Look good!. But If we'll use forecast I would maintain the behavior included in this change.

@kmcrawford I just pushed a fix that should solve the three hour increment. Could you give it a try?