[feat] [SoftFork] Use a part of the block reward to give out an basic income / universal dividend

Use a part of the block reward / fees to give out an basic income / universal dividend.
Why?
This would reduce the environmental impact of dogecoin while on the same time help to make a true currency from the people for the people.
If the amount of your basic income / universal dividend depends on the participation in the doge economy  this would also help drastically to increase adoption of doge since you are incentivized to use doge.
How?
This could be implemented as a soft fork in a second layer like for example dash did it with the master nodes rewards.
Layer one would still be the good old dogecoin like now and can be slowly improved.
Layer two can be activated in a soft fork. The fall back would always be layer one.
As basis for implementation the cosmos technology could be used, which should right now provide a big chunk of the needed features.

How are you going to defend against Sybil attacks?

"How are you going to defend against Sybil attacks?"
First of all in worst case, if all try to cheat, the fall back would be like with proof of use / proof stake. In this case the more you use / stake the coins the more you get. Which would be better then now burning all for POW.
But now back to the question:
There are mainly two solutions that can be combined (bottom up / vs top down)
Bottom up - Web of Trust:
At best we would make "doge parties" around the world, where people can verify each other, same way like they do already now with PGP, but with a "little" bit more fun.
A currency that implemented already a web of trust plus basic income is Duniter:
https://duniter.org/en/
In short they use a web of trust where you need to have a max distance to X% to the sentries.
While a sentry has certain conditions like being connected to X% of the sentries over a max distance.
It would start with an initial web of trust and then be extend with time (the possible verifications per time per member are limited).
Top down - Verificators
Additionally / Alternatively we could require to be verified through verificators.
The verificators could be voted in / out using blockchain based liquid democracy techniques.
If needed each new person could be assigned two random chosen verificators (4 eyes principle).
Both methods could be combined. For example we could use a web of trust between sentries, which then have the task to vote in / out verificators.
Dividing in Groups / Regions
Optionally we could also divide people in groups / regions to optimize verification process / and or the web of trust.
Economic Incentives:
Additionally we could give an economic reward for finding double accounts.
We could also require that you need to have people which pledge for you, which then have to pay the penalty if you cheated.
In short: We don't need to find all double accounts, we needs to find most of the double accounts in an acceptable time period. Which method (top down or bottom up or a combination of both) is best for that time will tell.

By the way here are some suggestions of how to secure the network in layer two:

(Master Nodes) Do it like dash does it. Each master node needs a certain amount of doge.
(Proof of Stake) Use proof of stake like cosmos does
(Proof of Members) Use instead of the staked coins the people who are verified and participated with at least X coins

I think a nice way of solving the Sybil problem would be to to make a competition between different member verification projects. The one with the best outcomes (number of double accounts that managed to sneak in / vs growth grate / ease of use) can then be used. Or even better a continues competition could be allowed while economically incentivizing projects that manage to have more active participants with less double accounts.

Interesting. What numbers / percentages are you thinking? Is it a nontrivial amount, and does it change over time?
I think this is actually an intriguing idea. Let's engage with actual present numbers if possible.
After that, can discuss if incentives line up.

Interesting. What numbers / percentages are you thinking? Is it a nontrivial amount, and does it change over time?
I think this is actually an intriguing idea. Let's engage with actual present numbers if possible.

I think the actual amount depends very much on many factors that are not yet known. Ideally there should be a system the community can vote on the parameters.
As a roadmap I would suggest to go the following way:

Do a prototype to see which functions / parameters are needed. I did already a very very basic one just to get a feeling. Its super basic, no crypto in it yet / no server nothing, just a simple program to test how it would look / feel.
Use something like Cosmos or Cardano to implement a first "functional" prototype which allows to add / verify multiple people. With this the first test could be run. (bringing this to run I could need some help)
Run it in a second layer with a one way peg to doge. For example by donating / burning some doge you can create doge X in the second layer.  This can already run on its own without the need of any change to doge core or core devs.
Once it proofs to work and has the acceptance of the community a certain % of the blockreward / fees can be additionally distributed as basic income through a soft fork.

How big this % would be depends very much on how much is still needed for POW once there is a second layer securing the chain is in place. I think here we can learn from how dash did it with the second layer master nodes, which use a kind of softfork to use a part of the block reward for their treasury and master node reward.
If you are interested, i wrote a more detailed early draft doc with some basics (mainly about economics) how it could look. If you are interested just write me at martin_auer (at) gmx.net

Sybil resistant identity is a non-trivial effort. It is like the holy fail of blockchain. If we have sybil-resistant identity, we won't even need PoW anymore. But it is really hard to achieve. As much as I love duniter (trying to join for several years, but it is restricted to france) I think it is not sybil-resistant at global scale. Web of trust works only locally.
And even centralized verification doesn't work that well and is risky.  Id-card fraud, registering accounts with stolen or abused documents is quite common in blockchain-sphere.
I think the most realistic option so far is idena.io, as much as i would love it to be duniter (which has more sustainable cryptonomics than any other project)

Sybil resistant identity is a non-trivial effort. It is like the holy grail of blockchain. If we have sybil-resistant identity, we won't even need PoW anymore. But it is really hard to achieve. As much as I love duniter (trying to join for several years, but it is kind of restricted to France) I think it is not sybil-resistant at global scale. Web of trust works only locally.

Great to have one from Duniter! Also loved it very much (helped to find some bugs), then suddenly they dropped all Englisch... always these French :/ Also i was missing some economic incentives there like connecting the amount of basic income you get with the amount of participation.
Yea its the holy grail, but as said, I dont think that it needs to be 100% perfekt. The worst fall back would be something similar to proof of stake / use, since my plan is to connect the amount of basic income / universal dividend you get with how much you use the coin.
Also I think giving the right economic incentives could help a big deal to find double accounts, so that they wont take over.
On a global scale dividing the network of trust in different regions could help a lot. These regions could then be tested / people can try to create double accounts. The more double accounts a certain region lets in the less high their basic income could be relative to the other regions.

I think if sybil resistance is not 100% secure, it will fail to provide value. I like the idea of regional shards, but again you would need to be able to prove which region people do come from. It is pretty easy to use VPN and claim to be from whatever Continent you like.
Until last year I was following a project that did try  to make use of official passport-certificates. Ubic.app
The dev made it secure and the tech is just fine, but no matter that at some point suddenly a unknown Player started to register thousands of passports within short time, with no community growth behind it. Probably stolen data or abused passports of people in a travel agency. It turns out even KYC is vulnerable without additional security measurements, if you try to decentralize it.
Here is another hint at KYC-data beeing leaked and traded all the time
https://e.vnexpress.net/news/news/personal-data-leak-affects-thousands-of-vietnamese-4279503.html
An argument against web of trust approaches on the other hand is the lack of privacy protection. People at duniter wot are mostly known with their faces or at last easy to track.
But I hope someone finds a way. It is really worth trying out.
I strongly recommend you to really look into idena.io
The downfall of that idea is, that it consumes a lot of time and effort to verify your anonymous unique identity, but at last it seems sybil resistant in opposite to WoT or KYC-solutions

This would be perfect for another coin! Closing this per #2110 point 4.

This proposal is a protocol change (soft fork) with use case "basic income / universal dividend".  This proposal is not about a hard fork or an new coin. A possible solution to implement it would be to have in the end a two way peg to a layer two who can handle the needed complexity. So one doge would be one doge. Looking at the updated issue submission rules it would be a "grey" area (none of 1-8). Maybe add a point 9, protocol change too big / complex to discuss here and provide some clear rules where to discuss these (don't think that reddit is a good place for that).


[WIP] Test SS.py

This PR adds tests of the functions in SS.py.

@hdoupe Do you think it is ok to use pickle files to have cached the inputs and outputs for testing as I am doing here?  I've had it recommended that it might not be a good idea to have binary files in the repo, but there are so many objects of different types, that if I try to save inputs/outputs to JSON, the many objects (e.g., all the Numpy arrays) do not have their type preserved.

@jdebacker I haven't had much experience with pickling files in general. I usually try to save the data in some kind of plain-text format like JSON or CSV. My main concern with saving pickled data is that there may be issues with reading it in both Python 2 and Python 3. Or, there could be an issue if the NumPy or Pandas version changes, etc.
However, I also understand that it is convenient to load and unload NumPy objects. Perhaps, there is some standard way to serialize the numpy data before you write it to the file.

@hdoupe Thanks for your comments.  The Python 2 vs 3 issue is important - and why I used JSON for a similar caching of data for B-Tax.  But since OG-USA is run only on 2.7 (and I hope jump straight to Python 3.6 without having to be compatible with both), I used pickle's here.
You can serialize a Numpy array in JSON, but the issue is that I wanted to cache a large tuple of parameters in one file.  If I dump it all to JSON, then I can't just load that JSON and have my original datatypes back.  What were Numpy arrays will not be lists and I'll have to cast each one as a Numpy array again after loading.
Unless you have a real problem with it, I'm inclined to go with the pickle format for now then try to use JSON in the future.  My priority is to get some testing of these functions up ASAP since I have a backlog of things I want to do to add to OG-USA, but want to ensure they don't change output.

@jdebacker That makes sense to me. Using the pickle sounds like a good idea. At some point in the future, we can take another look at this problem.

This PR now fixed a bug introduced to get_micro_data.py in PR #351.  Start years from 2013-2016 should now run without issue.
I've had to narrow the upper bounds of the Frisch and growth rate parameters that the model can handle.  I'm not sure why the tests weren't passing with the previous range, but we should look out for this.  My hunch is that the need to change the upper bound of the Frisch elasticity parameter change might have come from the addition of the stitching function in the household.marg_ut_lab() function.  But I think these issues of the model not running with values outside this relatively narrow range are due to the poor starting values we have (I've run this model with Frisch values of 1.5+ with different starting values).  Future PRs will improve these starting values and robustness.  Just need more testing  before doing that.
cc @rickecon


python3Packages.python-lsp-server: 1.2.2 -> 1.2.3

Motivation for this change
Update to latest upstream release 1.2.3
CHange log: https://github.com/python-lsp/python-lsp-server/releases/tag/v1.2.3
Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 140596 run on x86_64-linux 1

2 packages failed to build:

cq-editor
python38Packages.spyder

12 packages built:

python38Packages.pyls-flake8
python38Packages.pyls-isort
python38Packages.pyls-spyder
python38Packages.pylsp-mypy
python38Packages.python-lsp-black
python38Packages.python-lsp-server
python39Packages.pyls-flake8
python39Packages.pyls-isort
python39Packages.pyls-spyder
python39Packages.pylsp-mypy
python39Packages.python-lsp-black
python39Packages.python-lsp-server


Split user log and runtime log into seperate files

This change contains following chanages:

Collect DockerCotainerLog to runtime.docker.pai.error
Collect YarnContainerLog to runtime.yarn.pai.error
Collect user log to user.pai.error

Testing Done:
Just test the basic function for redirection command

Coverage increased (+0.01%) to 52.943% when pulling d9a7b508ae80e3fe70522ddf9cb8e6bde0d33492 on runtime_error_spec into 06f73114dc61f909eef53d5f34c8cc33caeae684 on master.

To avoid breaking change, let's first merge all our PR (Runtime, Launcher, RestServer, etc) into errorspec branch. And only until all are ready in Phase 2, we will merge errorspec branch to merge branch.
@Binyang2014 , @sunqinzheng , is that ok or any better suggestions?

Per yuqi request, close this PR and create a new to errorspec branch


Useless script for installing required certificates

The "batch" file (cmd) above in Option 3 (https://docs.microsoft.com/en-us/visualstudio/install/install-certificates-for-visual-studio-offline#option-3---install-certificates-as-part-of-a-scripted-deployment-of-visual-studio) is using a dependency (certmgr.exe) that you only have on your machine, after you have installed Visual Studio.  Since this is documentation for installing Visual Studio, OBVIOUSLY you do not yet have this tool thus you cannot use that script to install the certificates. Its a chicken and egg problem.  Please rewrite Option 3 to use built in OOTB PowerShell instead of relying on a Visual Studio tool!

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

ID: 4e4bce72-0471-4ff0-6948-671f2e1f9f9f
Version Independent ID: 3a255b89-a741-5bcc-4342-e4e4943197e1
Content: Install certificates required for Visual Studio offline installation - Visual Studio
Content Source: docs/install/install-certificates-for-visual-studio-offline.md
Product: visual-studio-dev15
GitHub Login: @TerryGLee
Microsoft Alias: tglee

@brettjacobson Thanks for your feedback; we appreciate it! Your request is on record and in the queue. We'll report back on its status, soon.

I'm not sure how correct this is, but this is what I'm using
Import-PfxCertificate -FilePath .\certificates\manifestSignCertificates.p12 -CertStoreLocation Cert:\LocalMachine\CA
Import-PfxCertificate -FilePath .\certificates\manifestSignCertificates.p12 -CertStoreLocation Cert:\LocalMachine\Root
Import-PfxCertificate -FilePath .\certificates\manifestCounterSignCertificates.p12 -CertStoreLocation Cert:\LocalMachine\CA
Import-PfxCertificate -FilePath .\certificates\manifestCounterSignCertificates.p12 -CertStoreLocation Cert:\LocalMachine\Root
Import-PfxCertificate -FilePath .\certificates\vs_installer_opc.SignCertificates.p12 -CertStoreLocation Cert:\LocalMachine\CA
Import-PfxCertificate -FilePath .\certificates\vs_installer_opc.SignCertificates.p12 -CertStoreLocation Cert:\LocalMachine\Root

@tydunkel A quick reminder of this issue; we'll want to add some PowerShell scripts to the page.

@tydunkel A quick reminder of this issue; we'll want to add some PowerShell scripts to the page.

@TerryGLee thanks, we have this on our backlog and will update in the near future.

The doc has been updated to use certutil.exe which ships with Windows. #please-close


Patch routing issue by product area

https://sentry.sentry.io/issues/4509116827/?project=5246761&query=is%3Aunresolved&referrer=issue-stream&statsPeriod=24h&stream_index=0&utc=true
Fixes this

I'm going to close this, as I'm not quite sure why slack triage notifications aren't sending to #feed-ospo. Going to revert https://github.com/getsentry/eng-pipes/pull/636 instead.


Updated Label name is still visible in the DevPortal

When we update and change a label name from the admin portal it gets removed from the publisher used Microgaetways and it appeared as a new micro gateway. But the old name is still visible in the dev portal and as it has removed from used Micro gateways by the publisher Micro gateway URLs are missing.
In the ss I have changed earlier name Depo to Deyot.

label related issues https://github.com/wso2/product-apim/issues/6063


Update README.md

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

See my comment https://github.com/SenseNet/sn-client/pull/427#issuecomment-541436034


Add billing tags

Added tags.

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement
Learn more about why HashiCorp requires a CLA and what the CLA includes
Have you signed the CLA already but the status is still pending? Recheck it.


Subsetting vectors

Perhaps a very recent change, but this code (seen in #62) no longer works<EMAIL_ADDRESS>let x: int = (1, 2, 3)
x = x[4]

with the error (in the LSP and transpiler)
cannot use `[` on type `int`

Similiarly for a character vector. No harm, no foul - new language, so breakage is entirely understandable.

It seems I broke this long ago and had no test to catch it.
I can see the error, it's right here
https://github.com/vapourlang/vapour/blob/5b69a2805629476032c1e5c71fa445700bd6807a/walker/types.go#L116
The function checks that "accessor" infixes, at least that's what I called them ([, $, [[) are executed on the right type but it seems it is not justified?
Testing some things in R it seems that we can call [, $, [[ on pretty much anything but surely past me must have put this check in for a reason; I just can't quite find which it is...
If you have any ideas/pointer please do let me know. Perhaps that should be removed entirely?
Thanks for reporting.

I wonder if the complication is the lack of scalars in R? In any other language I'd expect to need to differentiate between int and vec<int>, for which only the latter can be subset. In that case, things become a bit cleaner because the accessor will only produce a scalar int, over which one would need to map. You can index into a length-1 vector, but it will either be the value itself or one of the NAs.
In terms of the NA issue, both (1:3)[4] and (1:3)[NA] produce a vector of NA_integer_ so I wonder if instead of a newtype int | na it's reasonable to expect just int, of which NA_integer_ is a value.

It could be because there is not scalar indeed.
I think NA should not be a type, it's just a value as you indicate. I would have liked to handle it nicely because it can cause issues downstream (e.g.: if(NA){}) but it may not be possible.
Though for some reason accessing out of range on a list (and thus data.frame results in an error instead of NA.


what is going on???

Description
After you merged the senders branch the specs were still broken - I fixed the specs on the senders branch and github said it was all good to merge - so I did
but then master was still broken
this PR fixes most of the broken specs on master - there are some failing specs which I dont know why they changed related to Indices - not quite sure if everything is as expected or not - but could you check this and master to see what has happened?

I think this may be somehow related to tokoroten - I noticed it appeared in the shards file


Add Github issue templates

Add issue templates that help us structure the discussions, cut through the noise and push the project forward.
I added two templates. Feel free to add more if needed.

We need to figure out how to get CircleCI to run builds on non-organization-member pull requests

We need to figure out how to get CircleCI to run builds on non-organization-member pull requests

Yeah. From my experience CircleCI doesn't support non-org members building. 🤷♂

statechannels circleci setting was to not build forked pull requests (which is the default setting). I flipped the setting. After closing and re-opening this PR, the CI workflow was triggered. I am hoping that for future PR's from non-org members, CI workflow will trigger automatically. Looking forward to (and appreciate) your contributions @junjizhi.

https://circleci.com/gh/statechannels/monorepo/10887#config/containers/0
^ It seems an environment variable NODE_ENV was missing in the config. Not sure how your CI passed in your other merged PRs (I couldn't see those CI build details). Could you do the open-reopen trick again to trigger the build? @kerzhner

@junjizhi would you be able to rebase your PR using the latest master branch?

@kerzhner I did. This PR has already been rebased on latest master.

@kerzhner You sent an invite to the repo, but when I clicked to accept the link and nothing happened. 🤣

FYI, you should be able to see (and maybe even rerun) CircleCI jobs and workflows without needing to close + reopen the PR: https://circleci.com/gh/statechannels/workflows/monorepo. Let me know if you are not able to open that link.

@kerzhner I could see the CI but couldn't rerun. The Rerun drop-down items were all greyed out. I think it had something to do with me not being a member of the org.

I understand why CircleCI is failing on your PR: https://circleci.com/docs/2.0/oss/#pass-secrets-to-builds-from-forked-pull-requests. Environment variables are not passed to the build.

@kerzhner Are you a CircleCI admin? Can you check if the settings for forked PRs are right? https://circleci.com/docs/2.0/oss/#pass-secrets-to-builds-from-forked-pull-requests


Add pipeline stage to simplify types

We're introducing a number of wrapper types to distinguish different types as we process them through the pipeline; this stage flattens all of those types just prior to generating the actual code.
Prerequisite for #255

Coverage increased (+26.8%) to 72.813% when pulling d79f9bb7d5d651fe72359c843678ed9fbc7b5a9d on feature/simplify-types into 1419a12f90aa22c0b92ec1719cfa8d9eedbc21c5 on master.


Update repo

What does this PR change? What problem does it solve?

Was the change discussed in an issue or in the Discussions before?

PR Checklist

[ ] This change adds/updates translations and I have used the template present here.
[ ] I have enabled maintainer edits for this PR.
[ ] This change adds a Social Icon which has a permissive license to use it.
[ ] This change does not any CDN resources/links.
[ ] This change does not include any unrelated scripts such as bash and python scripts.
[ ] This change updates the overridden internal templates from HUGO's repository.

update repo


Switch OkHttpImagesPlugin to be Call.Factory-based

This is a binary-compatible change that changes the underlying semantics to use a Call.Factory rather than OkHttpClient directly. This allows for a few benefits:

Not tightly coupled to OkHttpClient
Allows for lazy/delegating/deferred initialization
Matches other OkHttpClient-dependent libraries' APIs, namely Retrofit and Apollo GraphQL

👍

It was hard to notice in PR, but create(okHttpClient); without explicit cast to Call.Factory introduces stackoverflow because it is recursively calling itself

d'oh, good catch. Sounds like a good use case for tests :)


@Api description ignored in 1.5.1-M2

REST resource with annotation:
@Api(value = "/sample", description = "my sample resource")

is converted to json:
"tags": [
{
"name": "sample"
}
]

but based on petstore demo should be:
"tags": [
{
"name": "sample",
"description": "my sample resource"
}
]

Currently description is completly gone.
I'm using swagger-jaxrs 1.5.1-M2.

@m-radzikowski - due to a change in the spec, we had to rework how tags are generated. While /sample would indeed be converted to sample as a tag, it will not take its description due to possible conflicts.
The way to configure the description now is different. You can take a look at the sample to see how it works - https://github.com/swagger-api/swagger-core/blob/master/samples/java-jaxrs/src/main/java/com/wordnik/swagger/sample/Bootstrap.java#L35-L45.

It's sad it cannot be done by annotations any more. Isn't it doubling the "tags" - in @API annotations and by Swagger#tag()?
So isn't now description in @Api redundant? Or leaved only by backwards compatibility reasons? At lease javadoc should be updated.

When moving from 1.3 to 1.5, we left the annotations as-is besides adding a few new fields. This was done to be as backwards-compatible as possible.
To keep a similar behavior to previous versions, the @Api#value() is converted to a tag, but we indeed added @Api#tags(). This allows you to set multiple tags, and will override the value() if one is provided.
The description is indeed redundant now. Still WIP, but I'm updating the javadocs as you can see here - https://github.com/webron/swagger-core/blob/annotation_docs/modules/swagger-annotations/src/main/java/com/wordnik/swagger/annotations/Api.java#L60-L66.

Ok, that's the way we will probably do this. Thank you for the detailed info.

this seems utterly weird, why description of API endpoint is now forced to be placed bootstrap code, is not the whole point of @Api annotation (or any other annotation) to place relevant information near the class/interface?

@okigan - that's a fair question. The change is derived from the difference in Swagger 2.0's grouping method. With it, @Api can now affect multiple groups (aka, tags). In fact, there could be multiple @Apis with the same tags, and conflicting descriptions.
One way would be to apply the description to all the tags, allow the last-read to override whatever was found before, but that may very well lead to confusion when hitting unexpected results.

Looks like swagger already creates a default tag by @Api annotation, then consider following behavior: if only default tag is present show the default description, if custom tag is provided do not show default tag/description and display according to custom tag with tag's description.
Much easier transition path, and no ambiguity which description is applied.
default_tagA defaultA_description
   method A1
   method A2

default_tagB defaultB_description
   method B1
   method B2

custom_tag custom_description
   method A1
   method A2
   method B1
   method B2

There's still ambiguity. You can still have two @Apis with the same value() and a different description(). Also, documenting the suggested behavior in a way people would be able to follow is quite challenging.


Update service metrics config.

I like it because it’s purely for the service metrics, which have their own endpoints. But this is partially because the metric exposing configs have ambiguous naming. I’ve been meaning to re(name|factor) that as well

On Dec 16, 2019, at 11:11 PM, Josh Curl<EMAIL_ADDRESS>wrote:

@joshwget commented on this pull request.
In pkg/controller/store/mysql/schema.sql:

@@ -318,6 +318,7 @@ create table if not exists applications (
name varchar(100) not null,
description longtext not null,
scheduling_rule longtext not null,

service_metrics_config longtext not null,
What if we just use metrics_config for this? I'm not sure if prepending with service_ explains or disambiguates things at all.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Good point, will change

On Dec 16, 2019, at 11:09 PM, Josh Curl<EMAIL_ADDRESS>wrote:

@joshwget commented on this pull request.
In pkg/controller/store/mysql/store.go:

@@ -1843,6 +1865,14 @@ func (s *Store) scanApplication(scanner scanner) (*models.Application, error) {
return nil, err
}
}

if serviceMetricsConfigStr == "" {

application.ServiceMetricsConfig = make(map[string]models.ServiceMetricConfig, 0)

You could just do make(map[string]models.ServiceMetricConfig)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Yeah, sounds like a good move

On Dec 16, 2019, at 11:07 PM, Josh Curl<EMAIL_ADDRESS>wrote:

@joshwget commented on this pull request.
In pkg/controller/service/conn.go:

@@ -108,8 +108,19 @@ func (s *Service) serviceMetrics(w http.ResponseWriter, r *http.Request,
vars := mux.Vars(r)
service := vars["service"]

app, err := s.applications.GetApplication(r.Context(), applicationID, projectID)
if err != nil {

http.Error(w, err.Error(), http.StatusInternalServerError)

return

}
serviceMetricsConfig, exists := app.ServiceMetricsConfig[service]
if !exists {

serviceMetricsConfig.Port = 2112

Can we make these constants in models/metrics.go?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Haha, I was thinking the same thing

On Dec 16, 2019, at 11:07 PM, Josh Curl<EMAIL_ADDRESS>wrote:

@joshwget commented on this pull request.
In pkg/controller/service/conn.go:

@@ -108,8 +108,19 @@ func (s *Service) serviceMetrics(w http.ResponseWriter, r *http.Request,
vars := mux.Vars(r)
service := vars["service"]

app, err := s.applications.GetApplication(r.Context(), applicationID, projectID)
It's a shame we have to do this lookup again. I think all with functions should pass along the full resource rather than just the ID of the resource. Refactor for another time though.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.


PubSup child module deployment may lead to Error 400: regions not allowed by the project's organization policy

When deploying a pub/sub topic (module.realtime-asset-monitor.module.slos.google_pubsub_topic.alerting), this error raised:
Error: Error creating Topic: googleapi: Error 400: The requested message storage policy contains the following GCP regions that are not allowed by the project's organization policy: europe-central2, europe-north1, europe-west3. The organization policy may be updated by your project or organization administrator.
These parameters are defined in the terraform variables, with their default value.
variable "pubsub_allowed_regions" {
  type = list(string)
  default = ["europe-central2", "europe-north1", "europe-west1", "europe-west3", "europe-west4"]
}

Link: https://github.com/BrunoReboul/terraform-google-realtime-asset-monitor/blob/main/variables.tf
It is possible to change these variables in tfvars file.
However during calls to child RAM modules, as here for "slos" which deploys the alerting topic, these variables are not propagated.
resource "google_pubsub_topic" "alert" {
  project = var.project_id
  name = var.alerting_topic_name
  message_storage_policy {
    allowed_persistence_regions = var.pubsub_allowed_regions
  }
}

Link: https://github.com/BrunoReboul/terraform-google-realtime-asset-monitor/blob/main/modules/slos/main.tf
Values used are those defined by default in the module, instead of updated ones:
https://github.com/BrunoReboul/terraform-google-realtime-asset-monitor/blob/main/modules/slos/variables.tf
Terraform does not really have global vars management, if we do not pass them to the module call, it uses those of the child module.
The call is here:
module "slos" {
  # Create SLOs once the log based metrics have been created
  depends_on = [module.metrics]
  source="./modules/slos"
  project_id = var.project_id
  notification_channels = var. notification_channels
  ram_e2e_latency = var.ram_e2e_latency
}

Link: https://github.com/BrunoReboul/terraform-google-realtime-asset-monitor/blob/main/main.tf
We should add this var to call:
pubsub_allowed_regions = var.pubsub_allowed_regions
Maybe we have this kind of behavior on other child modules variables.

Good catch !! thanks :-)

removed all default values for this setting in the child modules
added the missing setting propagation as suggested

Released as v0.5.3


formatted as table for readability

Coverage remained the same at 100.0% when pulling 412150211dd5d1b589ed32cae2ba09391e2a9aca on hb1998:master into a8e7172b6c411ec320d6045fd4afbd2abc1b4bde on epoberezkin:master.

Coverage remained the same at 100.0% when pulling 412150211dd5d1b589ed32cae2ba09391e2a9aca on hb1998:master into a8e7172b6c411ec320d6045fd4afbd2abc1b4bde on epoberezkin:master.

Hey @hb1998 - this text is just the output from the benchmark run, so the code has to be updated too to format it like this (which would be ok - there is “table” utility e.g.), not just readme file

Hey @hb1998 - this text is just the output from the benchmark run, so the code has to be updated too to format it like this (which would be ok - there is “table” utility e.g.), not just readme file
Otherwise it would be too difficult to update if/when something is added.

ok man, will try to update the code

看起来测试结果在较新的 Node 中发生了变化。
It looks like the test results have changed when I use newer Node(v14.15.5).
fast-deep-equal x 278,555 ops/sec ±0.45% (97 runs sampled)
fast-deep-equal/es6 x 250,303 ops/sec ±0.52% (97 runs sampled)
fast-equals x 286,511 ops/sec ±0.41% (88 runs sampled)
nano-equal x 185,102 ops/sec ±3.94% (87 runs sampled)
shallow-equal-fuzzy x 133,618 ops/sec ±0.47% (95 runs sampled)
underscore.isEqual x 85,738 ops/sec ±1.44% (90 runs sampled)
lodash.isEqual x 32,946 ops/sec ±3.72% (84 runs sampled)
deep-equal x 71.35 ops/sec ±2.89% (53 runs sampled)
deep-eql x 33,187 ops/sec ±4.61% (83 runs sampled)
ramda.equals x 10,761 ops/sec ±0.56% (92 runs sampled)
util.isDeepStrictEqual x 52,014 ops/sec ±0.41% (97 runs sampled)
assert.deepStrictEqual x 328 ops/sec ±1.59% (87 runs sampled)

The fastest is fast-equals

所以我们还需要继续完成这个 PR嘛？如果需要的话，我会继续提交代码。
So do we still need to finish this PR? If so, I will continue to submit the code.


[MultiKueue] Provide more details about the mis-configuration in the message for Active=False

What would you like to be added:
More details in the message for the "Active=False" condition for ClusterQueue in case of mis-configuration.
Currently we have the reason field determined here: https://github.com/kubernetes-sigs/kueue/blob/82b62260d6e12d4cd1dddbdc79af711da1b1dc73/pkg/cache/clusterqueue.go#L234, but the message remains generic "Can't admit new workloads."
Why is this needed:

To phrase the configuration issue in a more human-readable way, I find "FlavorIndependentAdmissionCheckAppliedPerFlavor" is hard to understand
To provide more details which AdmissionCheck or ResourceFlavor is mis-configured, which can be handy when there are more than one.

Completion requirements:
This enhancement requires the following artifacts:

[ ] Design doc
[ ] API change
[ ] Docs update

The artifacts should be linked in subsequent comments.

+1

+1
Granular messages would always be helpful for actual cluster operation.

The message can be made more human readable and maybe include the missing flavor name, AC name and so on. Trimming it should not be necessary since it can hold 32K.

/assign

/retitle [ClusterQueue] Provide more details about the mis-configuration in the message for Active=False


C5 is dependent on hardcoded id's, which prevent its usage on master-master DB's

With the release of version 8.1, it’s clear that C5 is moving to be more enterprise friendly.  The support for external file storage and database backed sessions are great moves.  We are already using both of these in our production environments.  However, we’ve encountered a problem with our master-master DB setup (MariaDB with Galera).
The problem:
MySQL and MariaDB both have the settings "auto_increment_increment" and "auto_increment_offset" to manage auto increments in master-master databases.  They are used to ensure that two inserts do not have colliding ID’s before syncing between nodes can be completed.
Functionally, this means that not only is the first auto-inc ID of a table not 1, but that it is impossible to predict what the next ID will be.  ID's are not guaranteed to be sequential.
Sources:
http://codership.blogspot.com/2009/02/managing-auto-increments-with-multi.html
https://mariadb.org/auto-increments-in-galera/
Concrete5 operates on the assumption that some of its key database rows have an ID of 1.
Examples:
concrete/bootstrap/configure.php :: 311
const HOME_CID = 1;
and
concrete/src/Site/Type/Service.php :: 24
public function getDefault()
{
    return $this->getByID(1);
}

Possible Solutions:
Our solution is to just load in a database with the correctly set ID's directly and bypass the installer.  This appears to work without issue.  However, ideally C5 would not have hardcoded IDs.  Ex.
concrete/src/Site/Type/Service.php :: 24
public function getDefault()
{
    return $this->getByID(1);
}

could be replaced by
concrete/src/Site/Type/Service.php :: 24
public function getDefault()
{
    return $this->getByHandle('default');
}

This database field is already set as unique, so this approach should be safe.
Others are more difficult to solve, such as the HOME_CID constant, which is used in many more places. While I’m sure refactoring around this problem would take a bit of effort, I think it would greatly contribute to making C5 more enterprise friendly.

This should be resolved now (see https://github.com/concrete5/concrete5/issues/7675)


Cargo.lock is outdated in 1.2.1 release

$ cargo build --locked
error: the lock file Cargo.lock needs to be updated but --locked was passed to prevent this

--- Cargo.lock
+++ Cargo.lock.updated
@@ -442,7 +442,7 @@

 [[package]]
 name = "wayshot"
-version = "1.2.0"
+version = "1.2.1"
 dependencies = [
  "clap",
  "env_logger",

Hi! I'll fix this as soon as possible, there's also a man-page related issue that needs to be fixed. I'll fix both and tag a release ❤ Thanks for the help!

I've tagged 1.2.2

I've tagged 1.2.2


Avoid complaints during startup, add Unsupported

If a program using this library doesn't have clipboard manipulation as
its main feature (just a useful extra), this library always complaining
to stderr during init, where it can't be stopped, makes those programs
verbose during startup on systems where there is no clipboard (eg,
headless servers).
Rather than complain to stdio in a library, move the complaint into an
error return to make it clearer what's going wrong.
In addition, export a package variable Unsupported which client
programs might use to inhibit use of the clipboard functions, for
smoother integration.

Thank you for your pull request!
LGTM


[Off-canvas] Example Code in Documentation has FOUC problems - not usable

Searching for the solution for #8659 I am going through everything from zero.
The example linked from the off-canvas documentation comes with a FOUC problem. This is not acceptable.
You just can not publish an example with such a heavy FOUC problems and say "people, look, this is how it is done!". This is a serious problem, not an aside, somebody in your house is missing this.
You just can not publish unusable amateurish examples and keep on writing about "world class" and "enterprise" and stuff like that. You are generating a reputation problem not only for your company, but for everybody who uses zurb foundation.
Please update that example to a production grade quality or just remove it.

What browser and OS are you using? I see no FOUC. Only the small nav shows on the small breakpoint, and only the desktop nav shows from medium and up.
The only thing that doesn't load right away for me is the placeholder image below the navigation bar, but that is normal and has nothing to do with FOUC.

What an agressive bug report !!!!!
I'm pretty sure you're seing a FOUC where it's a normal behavior:
Small size -> drilldown menu
Widen the window, reaching the medium breakpoint and replace with a dropdown menu
Continue to widen, and the ZURB left toolbar will appear, toolbar wich is "off example" but which will size down the main content thus resizing it under small breakpoint -> It will fire the small breakpoint and the drilldown will replace the dropdown. It's normal, because of the left toolbar appearence resizing the content...
Continue to enlarge and the dropdown will fire after medium-breakpoint.
To polish things a bit, the solution would be force to force breakpoints of the example to lower values, so the ZURB left toolbar would not fire the small breakpoint.
Am I right ?

@gehasia that's the only thing that I can see that looks "off" with this example, but I'm not sure if that's even what @COLABORATI is referring to. I wouldn't consider that FOUC.

@COLABORATI I'm going to close this issue, assuming the FOUC you are referring to has to do with the iframe width changing between breakpoints (not to be confused with Foundation's breakpoints inside the iframe) on the building blocks site. As @gehasia mentioned, this is because the left toolbar changes widths, which makes the iframe width change.

Well, of course you should copy the code that is shown on that example page an test it in its own html file - there is a very clearly visible FOUC in all browsers I tested (Linux, Apple, Windows). This is not visible on the "Zurb University" Page where this example is presented.

@gehasia: yes, I am really frustrated with Foundation 6, since it was released I stumble from one bug or problem to another, this would have been absolutely no problem at all if it was still in alpha or beta status - but releasing this as "production ready" is the thing here that makes me feel bad. Wasted many, many hours with pre-alpha quality code. Hopefully F 6.5 will be on a good way to release quality, but until then much pain.

@COLABORATI thank you for clarifying. Not sure why this doesn't happen on the Building Blocks site, but I was able to reproduce locally. The same code that is recommended for preventing FOUC of the responsive navigation will work here:
SCSS
/* To prevent FOUC */
.no-js {
  @include breakpoint(small only) {
    .top-bar {
      display: none;
    }
  }

  @include breakpoint(medium) {
    .title-bar {
      display: none;
    }
  }
}

CSS
/* To prevent FOUC */
.no-js .top-bar {
  display: none;
}

@media screen and (min-width: 40em) {
  .no-js .top-bar {
    display: block;
  }

  .no-js .title-bar {
    display: none;
  }
}

@kball @rafibomb please add the above SCSS & CSS to building block: http://zurb.com/building-blocks/top-bar-with-off-canvas
We should add this to the docs too.

Thanks, Colin, for the professional handling of this issue.
However, the Zurb University example still has not been changed and has this problem - please fix that example or remove it, thanks!

I can not find it here

@DanielRuf the building block is probably gone now. Between the time this issue was active and now, the building blocks were revamped and off-canvas was rewritten.
@brettsmason do you know of any FOUC issues with the newer off-canvas? Is this still something we should consider adding to the off-canvas docs?

Closing as this may not be relevant anymore.


btcd testnet panics on start

While following the instructions, i get the following error while running btcd testnet.
btcd --testnet --txindex --rpcuser=cbarraford --rpcpass=<password>                                                  2 ↵  02:16  12:17:43
2018-07-04 12:18:33.074 [INF] BTCD: Version 0.12.0-beta
2018-07-04 12:18:33.075 [INF] BTCD: Loading block database from '/Users/cbarraford/Library/Application Support/Btcd/data/testnet/blocks_ffldb'
2018-07-04 12:18:33.107 [INF] BCDB: Detected unclean shutdown - Repairing...
2018-07-04 12:18:33.109 [INF] BCDB: Database sync complete
2018-07-04 12:18:33.109 [INF] BTCD: Block database loaded
2018-07-04 12:18:33.117 [INF] INDX: Transaction index is enabled
2018-07-04 12:18:33.117 [INF] INDX: cf index is enabled
2018-07-04 12:18:33.117 [INF] CHAN: Loading block index.  This might take a while...
2018-07-04 12:19:31.147 [INF] CHAN: Chain state (height 1126006, hash<PHONE_NUMBER>032fb64bbd363ad62c9c8819187956ce851b755b3de8c39e2b8812, totaltx 13928880, work<PHONE_NUMBER>70348490798)
2018-07-04 12:19:31.157 [INF] RPCS: RPC server listening on <IP_ADDRESS>:18334
2018-07-04 12:19:31.157 [INF] RPCS: RPC server listening on [::1]:18334
2018-07-04 12:19:31.157 [INF] RPCS: RPC server listening on [fe80::1%lo0]:18334
2018-07-04 12:19:31.178 [INF] AMGR: Loaded 3262 addresses from file '/Users/cbarraford/Library/Application Support/Btcd/data/testnet/peers.json'
2018-07-04 12:19:31.179 [INF] CMGR: Server listening on [::]:18333
2018-07-04 12:19:31.180 [INF] CMGR: Server listening on <IP_ADDRESS>:18333
2018-07-04 12:19:31.185 [INF] CMGR: 36 addresses found from DNS seed testnet-seed.bitcoin.jonasschnelli.ch
2018-07-04 12:19:31.185 [INF] CMGR: 38 addresses found from DNS seed seed.tbtc.petertodd.org
2018-07-04 12:19:31.266 [INF] CMGR: 3 addresses found from DNS seed testnet-seed.bluematt.me
2018-07-04 12:19:31.511 [INF] SYNC: New valid peer <IP_ADDRESS>:18333 (outbound) (/Satoshi:0.15.0/)
2018-07-04 12:19:31.511 [INF] SYNC: Syncing to block height 1350093 from peer <IP_ADDRESS>:18333
2018-07-04 12:19:31.528 [INF] SYNC: New valid peer <IP_ADDRESS>:18333 (outbound) (/Satoshi:0.16.0/)
2018-07-04 12:19:31.563 [INF] SYNC: New valid peer <IP_ADDRESS>:18333 (outbound) (/Satoshi:<IP_ADDRESS>/)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x60 pc=0x1383503]

goroutine 53 [running]:
github.com/roasbeef/btcd/database/ffldb.rollbackOnPanic(0xc4292a41b0)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/database/ffldb/db.go:1889 +0x77
panic(0x159cae0, 0x1ab1040)
	/usr/local/Cellar/go/1.10.3/libexec/src/runtime/panic.go:502 +0x229
github.com/roasbeef/btcd/blockchain/indexers.dbStoreFilterIdxEntry(0x17fdd00, 0xc4292a41b0, 0x1a81d90, 0x10, 0x10, 0xc43942bb00, 0xc4396fe360, 0x20, 0x20, 0x0, ...)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/blockchain/indexers/cfindex.go:71 +0xb3
github.com/roasbeef/btcd/blockchain/indexers.storeFilter(0x17fdd00, 0xc4292a41b0, 0xc42b8b64d0, 0xc4325a5ef0, 0x0, 0x24, 0xc42e243170)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/blockchain/indexers/cfindex.go:171 +0x2b1
github.com/roasbeef/btcd/blockchain/indexers.(*CfIndex).ConnectBlock(0xc42013c820, 0x17fdd00, 0xc4292a41b0, 0xc42b8b64d0, 0xc431204cc0, 0xc439329d00, 0x112e76)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/blockchain/indexers/cfindex.go:212 +0x76
github.com/roasbeef/btcd/blockchain/indexers.dbIndexConnectBlock(0x17fdd00, 0xc4292a41b0, 0x17fb900, 0xc42013c820, 0xc42b8b64d0, 0xc431204cc0, 0x0, 0x0)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/blockchain/indexers/manager.go:87 +0x128
github.com/roasbeef/btcd/blockchain/indexers.(*Manager).ConnectBlock(0xc420144690, 0x17fdd00, 0xc4292a41b0, 0xc42b8b64d0, 0xc431204cc0, 0xc1, 0x0)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/blockchain/indexers/manager.go:535 +0xa0
github.com/roasbeef/btcd/blockchain.(*BlockChain).connectBlock.func1(0x17fdd00, 0xc4292a41b0, 0xc4292a41b0, 0x0)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/blockchain/chain.go:647 +0x1d6
github.com/roasbeef/btcd/database/ffldb.(*db).Update(0xc4201362c0, 0xc438cba640, 0x0, 0x0)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/database/ffldb/db.go:1946 +0x9b
github.com/roasbeef/btcd/blockchain.(*BlockChain).connectBlock(0xc420067380, 0xc42bfce230, 0xc42b8b64d0, 0xc431204cc0, 0xc4202e6a00, 0xc1, 0xc1, 0x0, 0x3d00000000000003)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/blockchain/chain.go:614 +0x2f8
github.com/roasbeef/btcd/blockchain.(*BlockChain).connectBestChain(0xc420067380, 0xc42bfce230, 0xc42b8b64d0, 0xc400000000, 0x0, 0x0, 0xc4329fbad8)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/blockchain/chain.go:1072 +0x1de
github.com/roasbeef/btcd/blockchain.(*BlockChain).maybeAcceptBlock(0xc420067380, 0xc42b8b64d0, 0x0, 0x0, 0x0, 0x1ac5a20)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/blockchain/accept.go:78 +0x21b
github.com/roasbeef/btcd/blockchain.(*BlockChain).ProcessBlock(0xc420067380, 0xc42b8b64d0, 0xc400000000, 0xc432b90000, 0x0, 0x0)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/blockchain/process.go:228 +0x2b5
github.com/roasbeef/btcd/netsync.(*SyncManager).handleBlockMsg(0xc42016a370, 0xc42e45d200)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/netsync/manager.go:569 +0x205
github.com/roasbeef/btcd/netsync.(*SyncManager).blockHandler(0xc42016a370)
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/netsync/manager.go:1152 +0x548
created by github.com/roasbeef/btcd/netsync.(*SyncManager).Start
	/Users/cbarraford/go/src/github.com/roasbeef/btcd/netsync/manager.go:1374 +0xe3

Ok, after a bit of painstaking debugging, here's the issue...
line 71 panics because the previous line (line 70) return nil for the idx value. And the current code doesn't do anything to check for nil values which eventually causes a panic.
Taking an even deeper dive into why my dev env is getting a nil value at all, is because of line 322 where we generate the error

leveldb: not found

We then swallow the error, print nothing, and just return nil. Which as you can imagine, doesn't give the user much insight/knowledge into what the actual problem is.
Proposal
At line 322, we add a error print statement with the error so its more obvious later what the problem is. Thoughts? If people agree, i can open an PR.

Well, "not found" isn't referencing leveldb not being installed itself, its refering to a key not being found in the database. Back to the drawing board...

I finally figured out my issue, there seems to be some bad data files in the block database folder. Rm'ing all the files in the testnet (~/Library/Application Support/Btcd/data/testnet/blocks_ffldb)


Bug: "MinecraftObject" Bob config does not spawn vanilla structures in 1.16

The blocks config option for spawning vanilla Minecraft structures does not generate objects in OTG 1.16
i.e. MinecraftObject(0,0,0,minecraft:igloo/igloo_bottom) in the .bo3 config

This hasn't worked for a long time I think (even for 1.12.2), will need to re-implement it. We can spawn these from registry (similar to Registry(), but they will still use their own spawn requirements/checks. Also I assume we'll have to spawn all normal bo blocks first, then the MinecraftObjects, to prevent them from being overridden.


Reinstate selfupdate tag to make builds without self-update work

Revert what seems to be a typo introduced as part of the fix for #2041
in 2018 7d0f2eaf24cffe6f45d7980a39791a08f5ba4d8e.
xbuild does not look like a go build/tag keyword to me, I failed to
find documentation for it and using go install -tags '!selfupdate' ...
has no effect, i.e. self-update code is still compiled.
+build however works;  updating the OpenBSD port/binary package
security/restic to apply this PR and pass -tags '!selfupdate' results
disabled self-update functionality, as expected:
	$ restic help | grep self
	$ restic self-update
	unknown command "self-update" for "restic"

(Using go:build now as per restic's style and gofmt.)
Previously, using restic-0.14.0p1 on OpenBSD/amd64 7.2-current would
check for a newer version and probably attempt replacing the system wide
root-owned executable (on a read-only filesystem) as unprivileged user:
	$ restic version
	restic 0.14.0 compiled with go1.19.2 on openbsd/amd64
	$ restic help | grep self
	  self-update   Update the restic binary
	$ restic self-update
	writing restic to /usr/local/bin/restic
	find latest release of restic at GitHub
	restic is up to date

(It never tried to actually write besaid path;  doing so would fail, so
the current message can be considered misleading.)

What does this PR change? What problem does it solve?

Was the change previously discussed in an issue or on the forum?

Checklist

[x] I have read the contribution guidelines.
[x] I have enabled maintainer edits.
[x] I have added tests for all code changes.
[x] I have added documentation for relevant changes (in the manual).
[x] There's a new file in changelog/unreleased/ that describes the changes for our users (see template).
[x] I have run gofmt on the code in all commits.
[x] All commit messages are formatted in the same style as the other commits in the repo.
[x] I'm done! This pull request is ready for review.

I have added tests for all code changes.

No functional code changes, so I ticked this box as "all" is considered zero/nothing.


feat: add node build action

📣 For new features and bugfixes, please create an issue first
✔ Checklist
Please review our Contributor Docs for more details

[x] Fixes #10
[] I have run npm version [patch, minor, major] (considering (semantic versioning)[https://semver.org/#summary)) for a new release if needed
[ ] If the package version changed, this PR's title is prefixed with release([VERSION]):
[ ] I have added typedoc-style comments to my changes to improve the developer experience

⏩ Next steps:

Please ensure that all the automated pipeline steps pass
Once your PR is opened, CODEOWNERS will be requested as reviewers. At least one review from a CODEOWNER is required to merge your PR
Once approved, a CODEOWNER will merge your changes and perform any other necessary release tasks

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


Inaccurate Probabilities: Update Probabilities based on Multiplier

This may be a duplicate of #48, but I'm making a new issue because I have long example and I don't want to crowd that issue
Probabilities are not always accurate in Turnip Prophet. I’ll give an example.
Scenario:
Last week was Decreasing. So according to Ninji:
P(Fluctuating) = 0.25
P(Large Spike) = 0.45
P(Decreasing) = 0.05
P(Small Spike) = 0.25
Okay, so lets move forward to Monday morning:
Sunday = 94
Monday AM = 83
So our Monday rate is:
R = (Monday AM)/(Sunday) = 83/94 = 0.88
R = 0.88
Lets say if R >= 0.85 and R <= 0.90 on Monday morning, we call this event A
Event A is a pretty common occurrence on the stalk market. It always happens at the start of Large Spike and Decreasing patterns. Updating our probabilities based on event A is important for providing accurate chance calculations.
P(A | Fluctuating)  = 0
P(A | Large Spike) = 1
P(A | Decreasing)  = 1
P(A | Small Spike) = ?
Starts to get a little complicated here.
Small spike starts with [0 to 7] days of decreasing prices starting at R = [0.4 to 0.9]
So the probability that we start with decreasing is 7/8, because we could get 0 days.
Suppose that we do start with decreasing:
The probability that R will be 0.85 ≤ R ≤ 0.9 is
(0.9 - 0.85) / (0.9 - 0.4) = 0.1
So P(A | Small Spike) = 0.1 * 7 / 8 = 0.0875
P(A | Small Spike) = 0.0875
Now we will find the probability of A.
P(A) = P(A | Fluctuating)*P(Fluctuating) + P(A | Large Spike)*P(Large Spike) + P(A | Decreasing)*P(Decreasing) + P(A | Small Spike)*P(Small Spike)
= 0 + 0.45 + 0.05 + 0.0875*0.25 = 0.521875
P(A) = 0.521875
So let’s recap:
P(Fluctuating) = 0.25
P(Large Spike) = 0.45
P(Decreasing) = 0.05
P(Small Spike) = 0.25
P(A | Fluctuating)  = 0
P(A | Large Spike) = 1
P(A | Decreasing)  = 1
P(A | Small Spike) = 0.0875
P(A) = 0.521875
To get our new probabilities for each pattern, we need
P(Fluctuating | A) = ?
P(Large Spike | A) = ?
P(Decreasing | A) = ?
P(Small Spike | A) = ?
We know from dependent probability multiplication that
P(X and Y) = P(X)*P(Y | X) = P(Y)*P(X | Y)
With a little algebra we can get:
P(X | Y) = P(X)*P(Y | X) / P(Y)
Plugging everything in, we get
P(Fluctuating | A) = P(Fluctuating)*P(A | Fluctuating) / P(A) = 0.25*0/0.521875
P(Large Spike | A) =  P(Large Spike)*P(A | Large Spike) / P(A) = 0.45*1/0.521875
P(Decreasing | A) = P(Large Spike)*P(A | Decreasing) / P(A) = 0.05*1/0.521875
P(Small Spike | A) = P(Large Spike)*P(A | Small Spike) / P(A) = 0.25*0.0875/0.521875
P(Fluctuating | A) = 0
P(Large Spike | A) = 0.8622754491
P(Decreasing | A) = 0.09580838323
P(Small Spike | A) = 0.04191616766
So
Chance of Fluctuating = 0.00%
Chance of Large Spike = 86.22%
Chance of Decreasing = 9.58%
Chance of Small Spike = 4.19%
Here is what Turnip Prophet reports:
Last pattern: Decreasing

Pattern % Chance    Sunday  Monday ...
                    AM  PM  AM  PM ...
Large spike 8.94%   94      83  84 to 132 ...
Large spike 8.94%   94      83  77 to 81 ...
Large spike 8.94%   94      83  77 to 81 ...
Large spike 8.94%   94      83  77 to 81 ...
Large spike 8.94%   94      83  77 to 81 ...
Large spike 8.94%   94      83  77 to 81 ...
Large spike 8.94%   94      83  77 to 81 ...
All patterns    —   94      83  77 to 132 ...
Small spike 4.35%   94      83  84 to 132 ...
Small spike 4.35%   94      83  77 to 81 ...
Small spike 4.35%   94      83  77 to 81 ...
Small spike 4.35%   94      83  77 to 81 ...
Small spike 4.35%   94      83  77 to 81 ...
Small spike 4.35%   94      83  77 to 81 ...
Small spike 4.35%   94      83  77 to 81 ...
Decreasing  6.96%   94      83  77 to 81 …

And here is what it should report:
Last pattern: Decreasing

Pattern % Chance    Sunday  Monday ...
                    AM  PM  AM  PM ...
Large spike 12.32%   94      83  84 to 132 ...
Large spike 12.32%   94      83  77 to 81 ...
Large spike 12.32%   94      83  77 to 81 ...
Large spike 12.32%   94      83  77 to 81 ...
Large spike 12.32%   94      83  77 to 81 ...
Large spike 12.32%   94      83  77 to 81 ...
Large spike 12.32%   94      83  77 to 81 ...
All patterns    —   94      83  77 to 132 ...
Small spike 0.60%   94      83  84 to 132 ...
Small spike 0.60%   94      83  77 to 81 ...
Small spike 0.60%   94      83  77 to 81 ...
Small spike 0.60%   94      83  77 to 81 ...
Small spike 0.60%   94      83  77 to 81 ...
Small spike 0.60%   94      83  77 to 81 ...
Small spike 0.60%   94      83  77 to 81 ...
Decreasing  9.58%   94      83  77 to 81 ...

The  percentage for decreasing on Sunday was 5%, but it went up when your value on Monday was between .85 and .9 of your base price! Probability is very counter intuitive sometimes.
This is just an example. We would need to change the odds for each previous pattern, not just Decreasing. There may be other changes to the algorithm that would improve Turnip Prophet, I will keep my eye out! Please let me know if you have questions or need clarification.
Thanks for creating such an awesome app!

same issue #48, current algorithm is using R fall into interval 0.4~0.9 instead of R=0.88 as event A, this is how it give probabilities.

I should pin out that in that example above, the event A is still price X fall into interval (85,90) assuming base price is 100, so PR #105 actually not  Make probability accurate by condition probability on the **_value_** but by range


Install PHP 7.1

Resolves: https://github.com/Islandora-CLAW/CLAW/issues/1007
Based on @kayakr's work in that issue
I tried to get a single location to add/edit the php_version but it keep missing it and defaulting to PHP 7.2.
If anyone has a suggestion please let me know, but Ansible variables are the stuff of nightmares.
I have tested it in Ubuntu and Centos and it seems to work.
Once this is confirmed we should also update the composer.lock files for the Crayfish microservices and Crayfish-Commons as well.

@kayakr not sure why it worked for me, but I'll wrap it.

fwiw, this works fine for me.

I can confirm Ubuntu is good to go.  Testing CENTOS now.

Hrm... oddly, changing ISLANDORA_DISTRO in the Vagrantfile to centos/7 fails and running vagrant up fails, but $ ISLANDORA_DISTRO="centos/7" vagrant up works just fine.  Anyway, serves me right not to read the README when trying Centos (I prefer Ubuntu).
Anyway, from Cent:
daniel@daniel-Latitude-3560:~/Code/Environments/claw-playbook$ vagrant ssh
Last login: Fri Feb  8 18:41:08 2019 from <IP_ADDRESS>
[vagrant@claw ~]$ php --version
PHP 7.1.26 (cli) (built: Jan  9 2019 08:02:33) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies


Translate SQL array to Java array via casting

Allows users to consume SQL arrays more-or-less directly as the Scala
type they choose. Under the hood, it uses a cast to translate the
java.sql.Array object's contents to your desired type.
This is somewhat more dangerous than most of the type coercion performed
by jdub, as it's not being translated through the ResultSet object. It
may be advisable to handle possible type exceptions when using this
method.

+1


chore: bdd-spring-1583829986 to 0.0.1

chore: Promote bdd-spring-1583829986 to version 0.0.1

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:
If they are not already assigned, you can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


Too many updates in paused state

The media_player entity has unnecessary updates every 2 seconds when in paused state. The only attribute being updated is media_position_updated_at (current timestamp). This results in a lot of database writes (in my setup the entity with the most updates is a HASS.Agent media_player - more than 100K records for the last 10 days).
Also, as I understand, even in playing state, the media_position_updated_at attribute shouldn't update every 2 seconds - only when media_position is changed (user skipped to a different position in a track), but when playing normally, there should't be any attribute changes.

Very sharp, thank you for this @aksyonov, will fix ❤

I'm seeing the same thing.  It's very annoying.  Please fix soon.  Otherwise a great piece of software.


Why are ChEMBL.TARGET-UniProt cross references given the predicate has_part?

Here's the code in question:
https://github.com/RTXteam/RTX-KG2/blob/ee9bd0c82b64761962804b0ffc062e04ce35a0cb/chembl_mysql_to_kg_json.py#L369-L373
This leads to edges like: (see KG2.8.3pre)
match (n) where n.id="CHEMBL.TARGET:CHEMBL3629" return n

This is surprising given that those exact nodes are listed as cross references here for ChEMBL and here for UniProt:
'

Further, they have the same name:


Code editors like VSCode are not using by default project prettier config

Hi, I'm working on a project with this template and I noticed all members are having the same problem, with using the formating of code editors like VSCode, for example, the format on save, it's not formatting the code following the configuration defined on .prettierrc.cjs, it's using the default configuration of every member on VSCode.
I think the problem happens because this project is using .prettierrc.cjs instead of .prettierrc file.
It's a minor problem, but it would be great if It could be fixed, thanks.

I mean, right now if you use the command npm run format, It's formatting the code right following prettier configuration defined on .prettierrc.cjs
What I wanted to say, is that It could be cool to configure the project, so when you run format code with VSCode, code get formated with the rules defined on .prettierrc.cjs instead of the default rules of VSCode.
In all the other projects I worked before, VSCode was always taking the configuration of the project to format the code, but it's not working like this on this project.

And what I'm saying is my experience is different. It's working for me. And nobody else has complained about this either. So it sounds like there may be an issue with your editor configuration.

I'm sorry seems it's working, i guess I was confused by how it was formatting the code.

I'm glad to hear it's working!


doing print() causes page print to occur when running

Some people(like me) who are ultra familiar with python syntax may accedently do print() instead of console.log(). This results in the page print prompt to show up on chrome(haven't tested on any other browsers) when running.
### Tasks

Hi @BrightTheBackpack  ,I'll say you will face that in any browser,( except your regular node native without browser) cause the JS print() invokes the printer utility in windows. so console.log() is the only way my friend you'll be able to make a simple print() just like python.
I know it's hard to switch the familiarity.

I feel like there should be a warning before you click run if you have a print() statement.


Horizontal scrollbar on "3D Card Flip"

Wild horizontal scrollbar appears because of text-indent: -10000px; on the flip buttons.
Possible Solution:
Add overflow hidden to the .front and .back div
sc-card .front,
sc-card .back {
  backface-visibility: hidden;
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  overflow: hidden; /* <- here */
}

Side effect:
On certain (medium sized) displays, there are now no scrollbars. But if the card reaches its max size when animating and the cards gets now bigger than the viewport a vertical scrollbar appears (only for the short time the card is bigger than the viewport). This leads to a "jumping/jiggle effect" because the viewport is now narrower (width of scrollbar) than before.
Possible Solution:
Always show the horizontal scrollbar.
body {
  overflow-x: hidden;
  overflow-y: scroll;
}

Strange: The side effect seems to only appear on the first flip/animation ... confused :/
It also makes me wonder that transform causes scrollbars ... mhmm

Or you could just add overflow: hidden; to the button element only.
sc-card button {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: none;
  border: none;
  text-indent: -10000px;
  overflow: hidden; /* <- here */
}

This also causes the content to be scaled out on page load due to lack of initial-scale

closed - PR #47
@ramlmn maybe open a new issue for the scale bug on mobile?


Increased footer width

In the book donation page ...the heading is now made visible

please add screenshots and provide a link after hosting it. So requests can be fast-forwarded .

Here is the screenshot!
https://drive.google.com/file/d/1Vs-QNVupI9wiSMznySEDbWJ3RkwXcGXy/view?usp=sharing


I don't see Other (Advanced Settings) under technology when registering custom chatbot

Describe the bug
I have created a *.js file under resources but the Other (Advanced Settings) is not showing up.
To Reproduce

Install CE Botium Box through docker
Add *.js under resources folder
Register a new chatbot
Validate that there's no Other (Advanced Settings) under technology

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots and Log files

Botium Flavour:

Botium Box

Botium Version
Build Branch: release/2.6.1
Additional context
Followed the steps here: https://medium.com/@floriantreml/botium-in-a-nutshell-part-6-e2e-testing-with-botium-box-9bd8acdf5a70

The "Other" option is at the very bottom of this dropdown selector, and it is only visible when the chatbot record is already created

register chatbot
open the chatbot record, and go to Settings menu - there this option is available


Feature/comment

I have added view_commentAPI.py and test_comment.py.
Changes in models.py and serializers.py are not mine. I have just copied the latest version of them to my branch to implement my code properly.

Fetched to the local and resolved merge conflicts with practice_app. Haven't tested the endpoints, those who will merge the branch must test the functionalities comprehensively.


Transaction.nativeValue is empty

I'm trying to implement back end validation for purchases using an npm module that requires an object (JSON or JS) that represents the receipt, looking through issues/docs on that modules page suggests the object should look something like this:
"data":{
"packageName":"com.fanhero.floridacup",
"productId":"com.fanhero.subscription.monthly",
"purchaseTime":1486056847995,
"purchaseState":0,
"developerPayload":"474E6yrV6JDFWBobm7DrBu",
"orderId":"GPA.1331-4662-9366-45997",
"purchaseToken":"gjbemoolbkmdedknfodeibai.AO-J1OwpS4EPqxR72fPO2zfBe1IB4ZmCNZVNQwkBoGFmq3qLeT7JTyo_qHOlEYc1d-XYDZ74AT0gNqfKBHLqzU_JT3s5879W66ARA7EPF8W7c_SbwAfzT-GKICRMZHpjnc1JlICrj-aSYx0VeHU_0L813i3Q0LM32Q",
"autoRenewing":true
}

I've pulled the above sample data from here : https://github.com/voltrue2/in-app-purchase/issues/79

I believed Transaction.nativeValue would be the correct way to get this data, however whenever I return it from my test device it is an empty object {}
I have also tried returning the entire Transaction object to my back-end but the result is the same.
I am currently testing on android.
Just a question, however if I returned the raw Transaction.transactionReceipt string, could I decode it myself using the Transaction.signature to get the original receipt object?

Hey @rohanrichards , the nativeValue property is an org.json.JSONObject instance. So I think you will need to stringify that before sending it to the plugin. Another way would be for yourself to create the above JSON object by using the properties of the Transaction object itself. You can see the mapping that is done here:
https://github.com/PeterStaev/nativescript-purchase/blob/bc02f758f9da6e83dfa89cab52c47a1e7418f435/transaction/transaction.android.ts#L23-L56

@PeterStaev Thank you for this, I think my mistake was not realising or noticing the distinction between a org.json.JSONObject instance and just a plain JSON object string.
I will play around with stringifying tomorrow at work and will get back to you, I dare say this is the solution though.
Thank you for the snippet too for the mapping, I can at least manually create it if all else fails!


Updated Eval Pipeline

Peer Review Information
Updated evaluation pipeline to use metricsdir argument to provide path to save metrics json file.
Pull Request Check List

[ ] Tested kubeflow run for changed code.

Have you tested this pipeline?

Have you tested this pipeline?

yes I did.


S-3.5: As a user, I want to be able to see the Shuttle Bus Schedule.

User will be able to check the full shuttle bus schedule from SGW to Loyola and vice versa.
Details:
A sheet will display the Concordia shuttle bus schedule.
The table can be accessed from the sidebar
Acceptance Criteria:

[ ] Given that the sidebar is open, when I press on the shuttle bus schedule, a sheet with the shuttle bus schedule is displayed on my screen.

@MichelRahme @andrelegault so by closing #95 and #88, is this resolved?

I don't think so

Although I haven't really touched this part of the code, so I couldn't say.

@MichelRahme @andrelegault so by closing #95 and #88, is this resolved?

No, i still need to setup the schedule table. I'm moving this back to In Progress.

Assigned @Alex-Hayeur and @RdtBui to work on this after my failed attempt.
Moving it back to backlog.


Add RSA pubkey for OSDF issuer

We are working on creating a new issuer for the OSPool namespace in the OSDF.
Unfortunately, OA4MP doesn't support EC keys so we need to create a new RSA key solely for this purpose.

Link check failures are unrelated.  Merging anyway.


2021 edition, remove UB, clippy fixes and winapi -> windows-rs switch

Hey!, first of all great work with the library!
We're using this patched version in one of our projects and thought you might want to include the changes upstream.
Let me know what you think or feel free to close it if this is not something you would like to merge :).

Closing per my latest comments in #1. Sorry about the noise.

FYI I finally got around to pulling some of this out into a branch, I'll try to play around with it soon!


Fix suggesting wrong type in empty record-literal with strand annotation

Purpose
$title
This is how we are suggested with the completions now

Fixes #35995
Approach

Describe how you are implementing the solutions along with the design details.

Samples

Provide high-level details about the samples related to this feature.

Remarks

List any other known issues, related PRs, TODO items, or any other notes related to the PR.

Check List

[x] Read the Contributing Guide
[ ] Updated Change Log
[ ] Checked Tooling Support (#)
[x] Added necessary tests

[ ] Unit Tests
[ ] Spec Conformance Tests
[ ] Integration Tests
[ ] Ballerina By Example Tests

[ ] Increased Test Coverage
[ ] Added necessary documentation

[ ] API documentation
[ ] Module documentation in Module.md files
[ ] Ballerina By Examples

@dulajdilshan can you please analyze the reason for the LS test failure?

function demo() {
    future<int> f = @strand {<cursor>}
}

This gives the following errors on the @strand {} annotation

annotation not attached to a construct(BCE0524)
invalid usage of 'object constructor expression' with type 'future'(BCE2606)
missing object constructor expression(BCE0531)

We shouldn't give strand related completions in  position right? @IMS94

@dulajdilshan when considering the users' writing pattern, writing the annotation first can be a common pattern. Therefore, LS have to provide suggestions here. Question is whether the semantic API is able to identify the strand annotation here (without an attached node).

@dulajdilshan when considering the users' writing pattern, writing the annotation first can be a common pattern. Therefore, LS have to provide suggestions here. Question is whether the semantic API is able to identify the strand annotation here (without an attached node).

@dulajdilshan Thoughts?

@dulajdilshan when considering the users' writing pattern, writing the annotation first can be a common pattern. Therefore, LS have to provide suggestions here. Question is whether the semantic API is able to identify the strand annotation here (without an attached node).

@dulajdilshan Thoughts?

Case 1:
function demo() {
    future<int> f = @strand {}
}

Syntax tree:

Case 2:
function demo2() {
    future<int> f = @strand {} start
}

Here, in Case 1, the node near the cursor position is identified as a object constructor

Invalid since we don't support this anymore


Question: How is app-routing.module.ts intended to be used?

Please provide us with the following information:

OS?

Windows 10

Versions.

Please run ng --version.
1.0.0-beta 16

Repro steps.

Create a new project.

My question around app.routing.module.ts; when you create a new project using beta 16 you get this new module, yet this module is not used anywhere (that I can determine), and the README indicates that routing is not supported currently.
What is the purpose of this module and how is the CLI is intended to use this module, and if we want to upgrade our current application created using beta 15 version?

I too would like clarification on this. Currently I use an app.routing.ts file and am wondering if this is a new paradigm which replaced my current structure.

@daBishMan @gelliott181 Not too much change in the code. earlier app.routing.ts was just a file which got imported in app.module.ts just like a module which was confusing. Now you can see that app-routing.module.ts is also a module just removing that confusion.
Why rename the file ? (My idea)
Just to not hurt people who were using the older app.routing.ts. Totally overriding it would have made it hard for people. with new file, copy paste is easier.

I follow so far if you do not mind can you elaborate on how you would add that to the application since it does not seem to be used anywhere?  Additionally, can you elaborate on how you would extend the routing for feature modules, would this pattern cause anything to change?

Add your routes to the array inside app-routing.module.ts
Add it as an import inside app.module.ts

It did used to just export RouterModule.fromRoot(routes) but I guess they turned it into a module to allow you to add additional functionality to that down the line.

Also for anyone coming across this thread check out the Style Guide docs. It covers naming conventions and file organization techniques such as this one https://angular.io/styleguide

@intellix i do this but i still get Uncaught (in promise): Error: Cannot match any routes:
i have 1 route only
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {DashboardComponent} from "./dashboard/dashboard.component";

const routes: Routes = [
  {path: 'dashboard', component: DashboardComponent},

];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule],
  providers: []
})
export class MenumanagerRoutingModule { }

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';

import { AppComponent } from './app.component';
import { HeaderComponent } from './header/header.component';
import { DashboardComponent } from './dashboard/dashboard.component';
import {MenumanagerRoutingModule} from './app-routing.module';
@NgModule({
  declarations: [
    AppComponent,
    HeaderComponent,
    DashboardComponent
  ],
  imports: [
    MenumanagerRoutingModule,
    BrowserModule,
    FormsModule,
    HttpModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

oh figured it out in the end. the routing worked fine. It just didn't catch anything in the root path.
added this in the routes constant
```  {path: '', redirectTo: 'dashboard', pathMatch : 'full'},``

I tried just adding the app-routing.module.ts export to my imports in app.module.ts like this
app-routing.module.ts
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { Routes, RouterModule } from '@angular/router';

const routes: Routes = [
  { path: '', component: AppComponent }
];

@NgModule({
  imports: [
    AppComponent,
    RouterModule.forRoot(routes)
  ],
  exports: [RouterModule],
  providers: []
})
export class RoutingModule { }

app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { MaterialModule } from '@angular/material';

import { AppComponent } from './app.component';
import { NavbarComponent } from './components/navbar/navbar.component';

import { RoutingModule } from './app-routing.module';

@NgModule({
  declarations: [
    AppComponent,
    NavbarComponent
  ],
  imports: [
    BrowserModule,
    RoutingModule,
    FormsModule,
    HttpModule,
    MaterialModule.forRoot()
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

however the app wont load and I receive this error in the browser Uncaught Error: Unexpected directive 'AppComponent' imported by the module 'ComJiveC3rCrPortalRoutingModule'     metadata_resolver.js:227


Adjust Kserve's python image uid for ODH

/kind feature
Describe the solution you'd like
The uid needs to change for python images to something compatible for ODH.
Right now kserve needs to run with uid 1000 for python images because it creates files that have permissions based on that id.
This needs to change as now the user needs to allow uid 1000 on OCP, the latter requires a special scc.
See discussion https://github.com/opendatahub-io/odh-manifests/pull/838#discussion_r1236922732 for more.
Anything else you would like to add:
N/A

cc @danielezonca

I don't think it is as you do not target/support those runtimes, rigth?
But, it would be if you want to support the runtimes that KServe has. KServe runtimes run as uid=1000 which will not work on OCP without anyuid. But images can be rebuilt with another use if necessary.

Reducing priority to minor, and ejecting from Sprint.


Correcting legacy "Unspecified" user types

Correct "Unspecifed" user types from existing user accounts. After #3812 is closed, this will no longer be an option and we'll need to fix any user accounts that have used it. "Unspecified" was removed because it wasn't informative with respect to NSF reporting.
Requirements:

Create a modal dialog that requires users to provide a new user type  if "Unspecified" was previously selected.
Prevent users from interacting with HS features until a new user type has been specified.

@jtpollak I tried to summarize your thoughts from #3812, please add corrections as necessary.

@Castronova this looks good! The modal dialog should pop-up as soon as a user authenticates.

@Castronova @jtpollak do you want the dialog that pops up also to ask for Country and State/Province.  These are required fields now "unspecified" for many users.  Does the same logic need to apply to them for consistency.
Do we need any user messaging about this, i.e. warning to tell users that this is about to happen.  This will be a surprise and change the log in experience for many users as soon as it is deployed.  Is this what you want.

@hyi - @Castronova and I just discussed @dtarb comments and we want to make Country, State/Province required as well so it should have the same behavior as Unspecified user types.

@jtpollak Yes, I already made Country and State/Province required in addition to user type, and after my PR for correcting legacy users to ask them to input all missing required fields is reviewed and deployed, the user will be prompted to input any missing required fields including State/Province and Country.

But accounts are being created today that do not have user type
https://www.hydroshare.org/user/8106/ no user type (and promotional spam account)
https://www.hydroshare.org/user/8105/ no user type (and promotional spam account)
https://www.hydroshare.org/user/8104/ no user type (but did give title as “professor”)
I wonder if some browsers, or mobile configuration is allowing creation of accounts without giving a user account type.

@dtarb I am working on a fix to treat all whitespaces as empty for user types and state/province fields that allow users to type in anything they want. This is the only hole we found in the system that allows a user to get around the required constraint.

@Castronova I believe this issue can be closed.

@Castronova I believe this issue can be closed.

@hyi I believe that correcting existing user types has not yet been resolved.


Unable to register remote key with keymanager API

Description
When attempting to register a remote key as per https://ethereum.github.io/keymanager-APIs/?urls.primaryName=v1.0.0#/Remote Key Manager/importRemoteKeys , Teku returns code 200, and a json result with status error and message Not able to add validator
Steps to Reproduce (Bug)
curl -k -m 60 -s --show-error -o /tmp/result.txt -w '%{http_code}' -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'Authorization: Bearer mybearertoken' --data @/tmp/apidata.txt https://consensus:7500/eth/v1/remotekeys
With apidata.txt for example
{
  "remote_keys": [
    {
      "pubkey": "0xb69d83500fd0b171e4af7fa41890af7a6d1658fdd9df28d2fe98d652d74a069a8882dc81aedd484e0e738dc142547ec7",
      "url": "http://web3signer:9000"
    }
  ]
}

Versions

Software version: teku/v23.4.0/linux-x86_64/-eclipseadoptium-openjdk64bitservervm-java-17

Hey there! Thanks for raising.
I did a quick test of this and it does appear to be working, just wondering if your key is available on web3signer?
  Was your web3signer url known to teku?

Ah that’s the difference, I am not passing the signer url through in parameters, as it’s in the registration. Let me change that, that should do it.

That did the trick. Thanks for the help!

awesome! Glad we could figure it out :)


Corrected structured doc link

It was pointing to the semi-structured document.

@chinmaya-n : Thanks for your contribution! The author(s) have been notified to review your proposed change.


All query on array (any workarounds?)

I have been trying to find out how to do the following query without any success.
I have a set of Tag objects that I want to query for. I want to have all posts that contains all the Tags in the set. Is there any way to do this currently? I am currently using: var query = Post("ANY tags = %@", tags) but it returns all post containing any of the tags. Is there any workaround to this case that I can use until the All operator is implemented?
Post {
    tags: [Tag]
    text: String
}

Tag{
   tag: String
}

Until Realm adds support for ALL predicates, you'll have to combine your queries like so:
var query = Post.allObjects()
for tag in tags {
  query.objectsWhere("tags CONTAINS %@", tag)
}
// `query` contains all `Post`s whose `tags` property includes all the queried `tags`

@jpsim thanks for the fast response however with that method I get the following error:
RLMArray predicates must contain the ANY modifier'
The working query for me was:
var query = Post.allObjects()
for tag in tags {
  query = query.objectsWhere("ANY tags = %@", tag)
}


Fix masses and inertials

Current in the car urdf, I reverted the mass of the car parts to be very small. The reason being we weren't able to see the car moving in gazebo. However, the long term solution is to uncomment out the <!-- mass / --> tags and remove the small-mass ones. Then, we'd need to modify the max_torque in sim_car_interface.cpp and potentially the <inertials /> in urdf.

http://gazebosim.org/tutorials?tut=inertia


pass ~ symbol as prop to component

This is a feature request. User should be able to customize "~" when displaying range.

@vikramkute fixed


Create zh-trans:kubeadm-alpha.md

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Remember to delete this note before submitting your pull request.
For pull requests on 1.15 Features: set Milestone to 1.15 and Base Branch to dev-1.15
For pull requests on Chinese localization, set Base Branch to release-1.14
For pull requests on Korean Localization: set Base Branch to dev-1.14-ko.<latest team milestone>
If you need Help on editing and submitting pull requests, visit:
https://kubernetes.io/docs/contribute/start/#improve-existing-content.
If you need Help on choosing which branch to use, visit:
https://kubernetes.io/docs/contribute/start#choose-which-git-branch-to-use.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

sorry, I might not be able to review translations recently.
/uncc

/hold
/retest

/hold
Please correct the file name content/zh/docs/reference/setup-tools/kubeadm/zh-trans:kubeadm-alpha.md  .

@zhangx501 Please fix the file reference problem so we can proceed.
/approve cancel

/retest


Inconsistent indentation in the example

In the example, under the section "Parameters to select a template at runtime", the 2 conditional steps have been indented. Although this is valid YAML, all other examples on the MS pages indent the dictionary items to the same level as "steps", so moving each of the lines following "steps:" would be more consistent.
[Enter feedback here]

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

ID: 6724abea-bbdc-bf66-ed5e-3214fa6c3e66
Version Independent ID: 4f8dab21-3f0e-da32-cc0e-1d85c13c0065
Content: Templates - Azure Pipelines
Content Source: docs/pipelines/process/templates.md
Product: devops
Technology: devops-cicd-process
GitHub Login: @juliakm
Microsoft Alias: jukullam

This will be update shortly.


Data-entry input consistent width styling

Apply a consistent width styling to all input controls so they are the same column width.

[x] Foreign-key drop down controls should not change widths when operated
[x] Long text should only allow dragging of height and follow same width as other controls
[ ] If/when we have multiple record entry, behavior of columns and sizing should be sane

The first 2 points have been addressed, but I'll save the third one after we implement multi-record entry.

The third bullet point has been addressed in #415. A demo can be found here to review this issue.


[Bug]: Chat stream active wait blocks flask request thread

Bug Description
The method StreamingAgentChatResponse.response_gen, which is designed to generate responses, currently exhibits a high CPU usage issue due to an active wait implemented within a loop. This behavior is causing significant performance degradation, especially when integrated into a Flask endpoint. The issue seems to stem from the use of block=False in self._queue.get(block=False), leading to an active wait loop that consumes 100% CPU. As a result, this prevents the openai request thread from executing properly. In my case, the problem does not manifest when running the code in a local file.
I would like to understand the initial reasoning behind the explicit use of block=False in the queue get method. Changing this to block=True with a reasonable timeout (e.g., timeout=0.1) resolves the issue by preventing active waiting, but I'm concerned there might have been specific considerations for the original implementation.
Version
0.9.38
Steps to Reproduce
def flask_endpoint():
    def generate():
        from llama_index import VectorStoreIndex
        from llama_index.llms import OpenAI
        from llama_index import ServiceContext
        import os
        os.environ["OPENAI_API_KEY"] = ""

        service_context = ServiceContext.from_defaults(llm=OpenAI(temperature=0.1, model="gpt-3.5-turbo"))
        index = VectorStoreIndex.from_documents([], service_context=service_context)
        chat_engine = index.as_chat_engine()
        resp = chat_engine.stream_chat('Hi')
        for message in resp.response_gen:
            if message is not None:
                yield str(message)

    response = Response(stream_with_context(generate()), mimetype='text/text-stream')
    response.headers['X-Accel-Buffering'] = 'no'
    return response

Relevant Logs/Tracbacks
No response

Hmmm thanks for identifying this. I had block=False since I thought I remembered it nit working with block=True, let me check.

can we try adding timeout

@logan-markewich
Hey Logan I have this a quick test with the following file:
import os

from llama_index.vector_stores import PineconeVectorStore
from llama_index import VectorStoreIndex

from llama_index.query_engine.retriever_query_engine import (
    RetrieverQueryEngine,
)

os.environ["OPENAI_API_KEY"] = "..."

def chat_responses():
    # Initialize the PineconeVectorStore
    vector_store = PineconeVectorStore(
        ...
    )

    index = VectorStoreIndex.from_vector_store(vector_store=vector_store)
    chat_engine = index.as_chat_engine()
    response_stream = chat_engine.stream_chat("Hi")

    for message in response_stream.response_gen:
        if message is not None:
            yield str(message)

def __main__():
    print("hello")
    for message in chat_responses():
        print(message)

if __name__ == "__main__":
    __main__()

I modified llama_index/llama_index/chat_engine/types.py:163
delta = self._queue.get(block=True, timeout=1)

and was getting a response that seemed good to me!

@jayantverma2809 Yes, i went from ~14% usage to ~38%, which still seems a bit high, but definitely not 100%

hmm, so CPU usage went up with the change?
tbh I think I need to try replcating this issue myself. We've deployed agents to prod servers, and haven't observed the same behaviour (to my knowledge) 🤔

Although I suppose the stuff I worked with before was async in fastapi, not threaded in flask

@logan-markewich to be clear, I went from 14-38% during my test, compared to Lorenzo's claim of 100%. I'll retest both today and see if I can replicate the initial 100% usage.

@Sammyjroberts I used the following code, but tbh I didn't see any crazy CPU usage on my M2 Mac
import time
from flask import Flask

from llama_index import VectorStoreIndex, SimpleDirectoryReader

documents = SimpleDirectoryReader(input_files=["./README.md"]).load_data()

index = VectorStoreIndex.from_documents(documents)

chat_engine = index.as_chat_engine()

app = Flask(__name__)

@app.route("/")
def index():
    return "Hello, World!"

@app.route("/run")
def run():
    def generate():
        stream = chat_engine.stream_chat("Hello, how are you")
        for token in stream.response_gen:
            yield token

        my_msg = "\nCan you write me a poem about raining cats and dogs?\n"
        for token in my_msg.split(" "):
            yield token
            yield " "
            time.sleep(0.5)

        stream = chat_engine.stream_chat("Can you write me a poem about raining cats and dogs?")
        for token in stream.response_gen:
            yield token

    return app.response_class(generate(), mimetype="text/plain")

if __name__ == "__main__":
    app.run(host="<IP_ADDRESS>", port=8000)

(@Lorenzo-N  ^^)

Hello, thank you for your interest. I've conducted additional tests with the code:
import time
from flask import Flask

from llama_index import VectorStoreIndex
index = VectorStoreIndex.from_documents([])

chat_engine = index.as_chat_engine()

app = Flask(__name__)

@app.route("/")
def index():
    return "Hello, World!"

def timeout_stream(response):
    # replace method response.response_gen:
    while not response._is_done or not response._queue.empty():
        try:
            delta = response._queue.get(block=True, timeout=0.1)
            response._unformatted_response += delta
            yield delta
        except queue.Empty:
            # Queue is empty, but we're not done yet
            continue
    response.response = response._unformatted_response.strip()

@app.route("/run")
def run():
    def generate():
        stream = chat_engine.stream_chat("Hello, how are you")
        for token in stream.response_gen:
            yield token

        my_msg = "\nCan you write me a poem about raining cats and dogs?\n"
        for token in my_msg.split(" "):
            yield token
            yield " "
            time.sleep(0.5)

        stream = chat_engine.stream_chat("Can you write me a poem about raining cats and dogs?")
        for token in stream.response_gen:
            yield token

    return app.response_class(generate(), mimetype="text/plain")

@app.route("/timeout_run")
def timeout_run():
    def generate():
        stream = chat_engine.stream_chat("Hello, how are you")
        for token in timeout_stream(stream):
            yield token

        my_msg = "\nCan you write me a poem about raining cats and dogs?\n"
        for token in my_msg.split(" "):
            yield token
            yield " "
            time.sleep(0.5)

        stream = chat_engine.stream_chat("Can you write me a poem about raining cats and dogs?")
        for token in timeout_stream(stream):
            yield token

    return app.response_class(generate(), mimetype="text/plain")

if __name__ == "__main__":
    app.run(host="<IP_ADDRESS>", port=8000)

and I continue to obtain the same results. The observed CPU values refer to the CPU usage of the Python process running Flask (obviously not the entire CPU of the machine, but of the process where active waiting in the response_gen method occurs).
On an M1 Mac:

Calling the /run endpoint correctly returns the response, and the CPU usage of the Python process running Flask reaches 100% during response generation.
Calling the /timeout_run endpoint correctly returns the response, with the CPU usage of the process reaching a maximum of 10%.

On a Linux server within a Docker container:

Calling the /run endpoint doesn't generate any response, and the CPU usage of the Python process running Flask goes to 100% for a couple of minutes, after which the HTTP request fails.
Calling the /timeout_run endpoint correctly returns the response, with the CPU usage of the process reaching a maximum of 15%.

I'm not sure why it's getting stuck on the server, but it's possible that the Flask process is preventing the GPT call thread from executing, leading to a deadlock. In any case, setting a timeout appears to resolve the issue in my tests.

(This should be fixed IMO, with the PR I merged above)