JWE support

Hey,
First of all great work on the keycloak proxy. Looks pretty good!
A current use case we have is supporting JWE as we do not want to send plain JWTs to the clients in every case. Keycloak currently does not support this. What are your thoughts on configurable JWE support within the proxy. The scenario is basically to encrypt the tokens before being sent to the clients.

Admittedly they would be a fairy big change, as I don't believe the go-oidc lib i'm using supports JWE, I'd probably have to move to https://github.com/square/go-jose. Though i'm happy to take a look

Has this been done? It looks like your own oidc implementation supports JWE. I'm also running into the same desire for the proxy to support encryption, which it seems to do but then for me it fails to decrypt the token, which makes some sense to me as keycloak itself doesn't natively support encrypted tokens.

@boyand @mozesmagyar thanks for taking your time reporting this. The repository keycloak-proxy was moved to Keycloak organization and renamed to keycloak-gatekeeper. If you still think this issue is valid, please read https://www.keycloak.org/community.html and report your bug/feature request to https://issues.jboss.org/browse/KEYCLOAK.


https://github.com/leanprover-community/doc-gen/issues/10

switch to misaka for converting markdown to HTML in most places
keep markdown2 for generating TOCs
misaka doesn't support cuddled lists which appear in mathlib, so a mathlib patch will remove those

I'm still looking over the consequences of switching to misaka. It has some differences I'm not sure I like, such as how treple-backticks behave within lists.

Misaka introduces an issue of its own which is that it fails to recognize code blocks that are not separated from the text by blank lines. Instead it treats them as inline code which is not what anyone expects. So my ad-hoc approach here is not going to pan out. The right approach is to decide what flavor of markdown we are adopting and only use converters that adhere to that flavor, and within that constraint address bugs with math.


cyclonedx-gomod "DBG dependency not found ...", produces almost empty BOM

As suggested in this repository, I tried to reach out first via Stackoverflow cyclonedx-gomod "DBG dependency not found ...", produces almost empty BOM but I got no responses there for some time. If I got the wrong part of the SO fleet, then please direct me to the correct part of the SO community. I noticed that there is no tag dedicated to cylconedx.
Anyway: I'm unsuccessfully trying to generate a BOM from a Go module using cyclonedx-gomod. I've downloaded a binary version from the project's repository https://github.com/CycloneDX/cyclonedx-gomod/releases/tag/v1.0.0-alpha.4, for ARM64 to use on a Raspi 4 with Ubuntu.
Now, when I run cyclonedx-gomod app -json -output mymodule-bom.json -main cmd/myapp/main.go -licenses -std -verbose . while inside my module, I see lots of DBG complaints about dependencies, such as:
dependency not found<EMAIL_ADDRESS><EMAIL_ADDRESS>
However, these are public repositories and they have already been used for building, so they're present in the Go module cache. The resulting BOM JSON file consists of maybe four or five entries, but is completely useless because it lacks all dependencies.
What am I doing wrong?

Hi @TheDiveO, I saw your post on Stack Overflow and created #75. I stumbled upon it by accident, and I don't believe anyone of the CycloneDX team actively monitors SO. If you happen to run into issues, please raise them here.
Regarding your problems: You're doing nothing wrong, it's a bug in cyclonedx-gomod, see #75.
The dependency not found debug message you're seeing is somewhat unrelated to the underlying issue. Admittedly, the message is a bit misleading. It just means that<EMAIL_ADDRESS>(as taken from go mod graph's output) was not found in the list of modules required by your application or module.
This typically happens because go mod graph is very verbose. It shows dependencies to modules that are not actually needed by your module or application. For example, when running cyclonedx-gomod app ... you'll always get this log message for test dependencies like github.com/stretchr/testify.
In your case, cyclonedx-gomod failed to recognize all packages / modules required by your application. Thus the list of "selected modules" doesn't contain github.com/spf13/cobra.
Thanks for reporting, I'll work on a fix later today and will hopefully be able to publish it with v1.0.0-beta.2.
I'll also adjust the debug message to reflect more clearly what's actually happening.

@TheDiveO A fix has just been published with v1.0.0-beta.2. Could you please verify that it now works as expected from your end?

@nscuro Just tested and this now works as expected: the bom gets populated with dependencies of the main module. Thank you very much!


Introducing build directory.

Previous ext directory and all our build files *coffee and *less end up there. In case of deployement from these files we concat and create once the minified ones for production. Like that we avoid having different tasks for dev and prod.

Outdated


Remove Docker Vagrant-Ubuntu  Guide

I don't think we really need to be maintaining 2 vagrant guides. Let's stick with CoreOS guide to match the k8s guide.

personally i like having ubuntu vagrant setup - it's certainly useful from a dev perspective as Ubuntu has more freedom in terms of installation etc.
That said, is it really required as a tutorial - probably not.


_hex2dToCoordIJK() redundant code or something else

I found the following code  when learning your algorithm.
https://github.com/uber/h3/blob/d610a226df755b0a91d1012cb12496525b1a1926/src/h3lib/lib/coordijk.c#L67-L83
In this way, under any condition, r1==r2==0. Only this code
https://github.com/uber/h3/blob/d610a226df755b0a91d1012cb12496525b1a1926/src/h3lib/lib/coordijk.c#L78-L79
will execute and the following bunch of if statements make no sense, does it? There should be some judgment in previous version according to your comment(line 67 71). Seems that you had modified some code here, I want to know if this execution process can execute the algorithm correctly?

Hi, I believe this code is reachable in at least this case from the test files:
v.x = 17.499999999962203
v.y = -6.0621778265014115

In this case,
a1 = 17.499999999962203
a2 = 6.0621778265014115

x2 = 7.0000000000119407
x1 = 20.999999999968175

m1 = 20
m2 = 7

r1 = 0.99999999996817479
r2 = 0.000000000011940670674448484

I think the thing to note here is that m1 and m2 are integers, so lines 68 and 69 are truncating (rounding), which is why lines 72 and 73 are not necessarily 0. It might be clearer to explicitly cast to int in the code so that's clearer.

Thanks! I failed to notice data type.


PO File cant be renamed on Windows when it exists already

Error MEssage --> FileExistsError: [WinError 183]
FIX:
django-polyglot.py
Line 92 & Line 93 --> use os.replace insted of os.rename
Since Python 3.3, there is now a standard cross-platform solution, os.replace

Hi, I made the fix and merged it. Thank you for the issue 😘!


[Identity] Update logging and dependency versions for MSAL

Packages impacted by this PR
@azure/identity
Issues associated with this PR
To investigate https://github.com/Azure/azure-sdk-for-js/issues/23331
Describe the problem that is addressed by this PR

Updated versions for msal that adds more logging
Passing in the logging options set by the user to msal

Command used to generate this PR:**(Applicable only to SDK release request PRs)
Checklists

[x] Added impacted package name to the issue description
[ ] Added a changelog (if necessary)

/azp run js - identity-ci

/azp run js - identity - ci

/azp run js - identity - ci

API change check
API changes are not detected in this pull request.


Consider adding a getter for loop property

The loop property in Twig_Node_For is currently not accessible from outside the node class which causes problems in twig.js. Due to the fact that compilers for Twig are embedded inside the nodes themselves this works fine there (although a cleaner architecture IMO would be to separate the compilation logic from the AST in the long term).
I could also work around this using reflection, but adding a getter seems like the simplest solution.

You can access it via $forNode->getNode('_for_loop').


Add Pre-commit Hook

It is nice to have some pre-commit hooks for checking of spelling and things like this. If you want to see more information take a look at here.
Notice that I have just created one file called .pre-commit-config.yaml and run pre-commit install and then created a commit. All other files are staged automatically for changes.
There is also a bot in github marketplace which takes care of this pre-commit hooks in every pull request. So, we do not need to check for spelling errors and formatting styles. However, I can not install it to this repo, the owner himself should install it. To see an example of how it works take a look at one of my PRs at yolov5.
Here is the list of pre-commit hooks we can add. We can add spelling and lots of others if you want.

Up

Hi, I figured out that I forgot to mention how to install this thing. Perhaps it is because It should be done automatically after each commit.
To install it:
pip install pre-commit
pre-commit install

Hi, @alshedivat
Thanks for merging. I just wanted to mention that this pre-commit hook is not useful unless you assign the bot to automatically check for every pull request.
Also, It would be useful if you do:
pip install pre-commit
pre-commit install

And then do a dummy commit. This way this pre-commit hook gets activated on your local system and you see the changes it makes. For the first time, it would be a lot of files to commit. But after that, it would be less.


Path issues on Windows

The SVG files are not found on Windows, unless a path is specified that is not manipulated by:
https://github.com/metonym/svelvg/blob/d3f655283c9ddc3e8e9d178b637a534e0a1d7e5c/src/create-library.ts#L80-L86
Probably an issue with path.join using \ on Windows.
So when referencing a local directory svgs, these paths do not work ("Converted 0 icons from ..."):
../svgs
..\svgs
../svgs/*.svg
..\svgs\*.svg
node_modules/../svgs
node_modules\..\svgs\*.svg

Only this one does:
node_modules/../svgs/*.svg

@metonym The regex fix should be unrelated to this, that was just something I noticed while looking at the code.


Footer not sticky

What happened:
The footer is not sticky.
The main part of the page should fill the space pushing it to the bottom.

What you expected to happen:
This to work.
How to reproduce it (as minimally and precisely as possible):
Create an empty page.
Anything else we need to know?:
/kind user-interface

Submitting a PR to fix this soon.

/assign @leodido


Ignore environmental LAUNCHABLE_BASE_URL

When testing CLI with a locally run server, we use this environment variable. This affects the behaviour of unit tests, which is undesirable

Looks like CI failed. Can you please check it?


chore(main): release 0.2.0

:robot: I have created a release beep boop
0.2.0 (2024-03-19)
Features

flake/handle no user / update for auth0 support (c3c00eb)

Bug Fixes

deps: update rust crate clap to 4.5.3 (232b6d6)
deps: update rust crate service_conventions to 0.0.6 (5d194a3)
deps: update rust crate toml to 0.8.12 (211fbe8)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/philipcristiano/hello_idc/releases/tag/v0.2.0 :sunflower:


Feat: add loading state for this page

We can't guarantee the connection speed between the server and the milvus cluster.
So we need the loading state for this page.

Does a collection need loading status? or this page?
My solution so far is to add loading status for the single collection and also provide users with a notification...

This page has 4 parts of data to load. I think each part needs a loading indicator.
we can just showing a loading indicator telling user that the page/data is loading. no need to send notifications.


support for iterable structures within state

Alright, I finally needed this so badly that I had to do it :) I haven't tested all available structures, but here is view of my Immutable.List of Immutable.Record instances within state.

Fixes #51, #66, #70

Good stuff, thank you! Anybody else wants to test drive this?

I think i do eventually at least

With a couple of changes, this will work for Map() as well, so I am closing #66 in favor of this more general solution.

Out in 1.1.0, let me know how it goes!


Regarding 2.0 preview, i didn't see any entry for national cloud - Mooncake

any plan for that?

Yes we plan to have it in November.

thx. closing


How is concurrency handled?

Hey,
how is concurrency handled?
When using rabbit.handle does it start sth like a worker that pulls a message, waits for  ack / nack / reject  and pulls the next one?
Or does just as much as it can?
Or does rabbit.handle just pull one message and you have to call it another time to get the next message?
Thanks in advance :)

wascally will let your code pull in more messages than it can really handle, really
i once had a backlog of about 65,000 message in a queue due to a bug in my code. i fixed the bug, re-deployed, and ate all of the memory on my server when my code tried to load all 65,000 messages all at once.
to fix that problem, i added the limit setting (aka consumer prefetch limit) to my consumer. i think i put the limit somewhere around 10 or 20 messages at a time, but i could have set it higher.
having the limit in place allowed me to process the messages in smaller chunks, preventing me from crashing my app server.
if you want to process one message at a time, set your consumer limit to 1. wascally defaults to noAck: false, meaning you will be required to manually ack your messages. this, with the limit of 1 message, means you will need to finish processing a message before the next one starts.

Awesome, that's the answer I was looking for, thanks a lot

@derickbailey @21stio - setting the consumer limit to 1 will slow things down a lot but guarantee message order.
If you need more concurrency and want to preserve message ordering within a particular context, you can use my hashqueue library to create N in-memory worker queues and have work distributed across those using consistent hashing. You'll need to have something that identifies the context for each message (we use correlationId on the message) that it can hash across.
HTH!


Port openfast-registry to C++ and change pointers

This pull request is nearly ready to be merged, but it will likely break SeaState so we may need to discuss
Feature or improvement description
This pull request contains a port of the openfast-registry to C++. The new registry doesn't support the dimspec command used in AD14 so they were replaced in the input file. This module will be removed soon and this feature is not used by other modules so it didn't seem necessary to keep this feature. AeroDyn_Registry.txt had a malformed line which was acceptable to the previous parser, but didn't work for the new one so the input file was updated. All other registry files are unchanged.
The registry implements specifying a target and a regular pointer pointer on the field name using & and * respectively. The registry treats TARGETs (&) the same as allocatable fields with respect to pack/unpack/copy. Essentially, target's own their memory and it is packed/unpacked/copied like an allocatable field. POINTERS (*) do not own their memory and are not packed/unpacked. The pointer association is maintained by the copy function.
typedef  ^  ^  FlowFieldType    *FlowField   - - -  "Pointer to field, does not own memory, should only be used to point to targets"
typedef  ^  ^  FlowFieldType    &FlowField  - - -  "Target pointer, owns memory, will be deallocated when Destroy is called"  -

Impacted areas of the software
Mainly affects openfast-registry, but due to some insignificant differences all _Types.f90 files have been regenerated.
Test results, if applicable

This pull request might create some conflict with the current implementation of SeaState (PR #1008 and PR #1578). Suggest holding off until PR #1008 and PR #1578 are merged in first. We can perhaps save this for version 4.1.

The commit associated with this pull request is cherry-picked into this branch. Currently working on updating SeaState and HydroDyn to be compatible with and to make full use of the new OpenFAST Registry capabilities with pointers to derived types. It should be done in time for v4.0.0 release.


Add rpc xsd

Pull Request Test Coverage Report for Build 156

0 of 0 (NaN%) changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 50.797%

Totals

Change from base Build 153:
0.0%

Covered Lines:
924

Relevant Lines:
1819

💛  - Coveralls

Pull Request Test Coverage Report for Build 156

0 of 0 (NaN%) changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 50.797%

Totals

Change from base Build 153:
0.0%

Covered Lines:
924

Relevant Lines:
1819

💛  - Coveralls

@NeGnail  The version should be 2.3.2


Update alb_zone_id of some missing regions

what

Append alb_zone_id map for missing regions.

why

Using unsupported regions(eu-north-1, etc..) fails with Error: Invalid index (See #136)

references

closes #136

I pushed some code unrelated to this PR, so I force-pushed.Please don't mind it

Merge please.

Please can you get this merged in? Need the missing mappings. Thanks.

Resolved conflict with master(cc92c16b66ec1f264bf32ea28343f0ef3fb02c4b)
Please review and merge this! :pray:


Homekit not showing accessories

Hello,
Please, by chance there is a solution when the Home App is not showing the accessories, already listed on HomeBridge?
Similar issue reported here [1] but solution doesn't worked for me.
Thanks in advance,
[1] https://www.reddit.com/r/homebridge/comments/11lj95k/homebridge_homebridgescreenlogic/

I am having the same issue. I see the accessories in Homebridge but not in Homekit. HomeBridge hub is connected to Home App.

Firstly,
Are you connecting a Homekit-compatible device? Incase of Homebridge that is another process.Configure your accessory on Homebridge then Connect Homebridge to Homekit.
Check if the accessory that you connected is turned on and even connected perfectly.
Ensure that your devices and Home are connected to the same wifi.
Restart your accessory and the Apple Home app.
If you are using the Home app on an iPhone /iPad - Consider clearing the background apps.
Hope that helped .


Publish 2/10/2021 10:30 AM PT

Docs Build status updates of commit ba1e7f0:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docset/windows/appx/Reset-AppxPackage.md
:white_check_mark:Succeeded
View (win10-ps)

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


Allow crate users to define custom models - alternative using generics

This

makes Simulation generic over any type that implements AsModel,
provides a derive macro to conveniently implement custom enums that encompass possible model types (sort of like how we used enum_dispatch),
removes enum_dispatch in favor of the above,
provides an example of adding a custom model in sim/tests/custom_models.rs.

The wins:

In theory, this should incur no extra overhead over what we had before this PR - we're only using zero-cost abstractions.
More idiomatic - there's (IMO) less unexpected stuff for new contributors to mull over.
Encoding information in Rust's type system rather than runtime generally leaves less room for error.

Next steps:

Possibly tests for the proc macro? It's very simple though.
A more thorough test in custom_models.rs - right now it doesn't test correctness, it just makes sure things compile with the derive macro used.
Since we're separating crates now, consider putting WebSimulation in a separate crate? sim_wasm sounds about right.

Codecov Report

Merging #10 (2137a35) into main (4135a9d) will decrease coverage by 0.43%.
The diff coverage is 61.70%.

@@            Coverage Diff             @@
##             main      #10      +/-   ##
==========================================
- Coverage   76.77%   76.33%   -0.44%
==========================================
  Files          21       23       +2
  Lines        2058     2092      +34
==========================================
+ Hits         1580     1597      +17
- Misses        478      495      +17

Impacted Files
Coverage Δ

sim/src/input_modeling/random_variable.rs
99.44% <ø> (ø)

sim/src/input_modeling/thinning.rs
0.00% <ø> (ø)

sim/src/input_modeling/uniform_rng.rs
93.75% <ø> (ø)

sim/src/models/exclusive_gateway.rs
70.37% <ø> (ø)

sim/src/models/gate.rs
65.55% <ø> (ø)

sim/src/models/generator.rs
64.63% <ø> (ø)

sim/src/models/load_balancer.rs
72.58% <ø> (ø)

sim/src/models/parallel_gateway.rs
68.75% <ø> (ø)

sim/src/models/processor.rs
50.67% <ø> (ø)

sim/src/models/stochastic_gate.rs
66.66% <ø> (ø)

... and 16 more

Continue to review full report at Codecov.

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

@uint

I'm thinking of it this way though: what use case would this solve? If there's a user wanting to use the crate as a dependency in their Rust project, why would they want to use the WebSimulation struct specifically?

The main use case is someone has a simulation problem that is best solved with a web application.  The user would:

Create a Rust project with a sim dependency and custom models
Compile to wasm and package/publish with npm
Use that npm package in a web application

Simulation is not (and currently can't be) wasm-bindgen exported like WebSimulation.  I know it's a fundamentally different approach, with its own benefits and drawbacks, but https://github.com/ndebuhr/sim/pull/8 does support custom models for WebSimulation.  Is there any way to combine and get the best of both solutions?  It may look like a rare use case, but personally, I have already seen WebSimulation custom model needs.  I think that allowing WebSimulation custom models is worth a performance and complexity cost.
What are your thoughts?

@uint
The main use case is someone has a simulation problem that is best solved with a web application. The user would:
1. Create a Rust project with a `sim` dependency and custom models

2. Compile to wasm and package/publish with npm

3. Use that npm package in a web application

This is possible. It's just that the user has to define their own bindgen API, but I suspect they would have to even with the other PR. I worry that if they create their own crate called simul that depends on sim, this simul crate won't be able to re-export WebSimulation (or its methods) to be used by JS. They would still end up creating their own version of WebSimulation from scratch and doing bindgen for it, wouldn't they?
Am I understanding wasm_bindgen_test correctly? I think it's just unit tests that run in the browser's WASM environment. It doesn't really test the API you export with wasm_bindgen, right?
I've been trying to confirm my suspicions with an example JS thingy, but I'm struggling a little with this in my environment currently.

Simulation is not (and currently can't be) wasm-bindgen exported like WebSimulation. I know it's a fundamentally different approach, with its own benefits and drawbacks, but #8 does support custom models for WebSimulation.

For the record, I don't think Simulation should be wasm-bindgen. I think the exported API should be thin and focused.

Is there any way to combine and get the best of both solutions?

There is always the possibility of doing generics like in this PR, but also making sure Box<dyn AsModel> can be used in a Simulation<Box<dyn AsModel>>. That sounds sane to me. The user can choose their own tradeoffs with Simulation then.
It would also be possible to create two versions of WebSimulaton - one with the trait object and one with the built-in enum to let the user choose the tradeoffs they want, though I'm not sure I like this idea all that much.
Would it be useful to discuss this on a video call?

@uint I merged https://github.com/ndebuhr/sim/pull/8 and will work on good automated tests.  After that, we will be in a good position to evaluate and benchmark alternative solutions, and to easily understand use case coverage.


Fix building NuGet locally and add support for DotNetWinRT in NuGet packages

Overview

Filters out the DotNetAdapter folder from being packaged in the NuGet package.

This prevents the csproj from being packaged, which would cause MSBuildForUnity (if present) to resolve its dependency and a duplicate DotNetWinRT DLL.

Adds a custom WSA.InEditor.Template.props, to add the DOTNETWINRT_PRESENT define and add a package reference to DotNetWinRT.
Adds https://api.nuget.org/v3/index.json to the package restore csproj, used during local NuGet packaging, due to the new DotNetWinRT dependency.

Changes

Fixes: #6244

Known Issues

The WSA Player DLL still needs to be updated with the define and reference. @andreiborodin is helping with the investigation.

/azp run

/azp run


To Do List/Priorities

As of 7/15/2016, here is the list of priorities we came up with, with an attempt at listing the steps in order of priority:

[ ] Attempt to implement "force closing" w/in C++ code. This finding a place w/in the C++ code, right after the integration finishes, to check that the cycles are closing and if not, force that to happen by choosing either the pool or fluxes as "truth".
[x] Finish implementing and testing the stage transitions so that we can run thru the transient stage and test the calibration.
[ ] Calibrate with PEST. This is multi-faceted. Will require first getting the code running with PEST, then we will have to be able to run thru the transient stage to evaluate how well the model is doing matching the historic measurements.
[ ] Finish implementing/refactoring the disturbance model (#119). First step will be re-basing the branch onto the current devel.
[ ] Implement the NetCDF outputs, which will be needed for regional runs.
[ ] Check that we are indeed able to run over a regional area. Historically this was a different "mode" from a single site run, so there was always a question about whether or not we could get things running in a "regional mode". After the refactor this shouldn't be too much of an issue.

Made a bunch of progress with getting dvmdostem to run under PEST++ and SLURM on atlas, so now run-times are actually small enough that we can experiment with PEST++ in earnest!
As far as I can tell the next critical path item is stage transitions so that we can run out thru the transient stage and evaluate the quality of a calibration.
The whole setup with pest++ on atlas and slurm is still a little cumbersome, but I tried to put a bunch of notes in the the slurm-job.sh script that is now in the pestdemo/tussock_full directory: https://github.com/tobeycarman/pestdemo/blob/tussock_full-take2/tussock_full/slurm-job.sh

Great news Tobey. I know Ruth is working on the stage transition right
now. Maybe she could give you an update on where she's at for
coordination between you guys.

Hélène Genet, PhD
Institute of Arctic Biology
University of Alaska Fairbanks
902 Koyukuk Drive
Fairbanks, AK 99775 - USA
Phone: +1<PHONE_NUMBER>
Email<EMAIL_ADDRESS>Skype: helenegenet
On 8/10/16 4:42 PM, tobey wrote:

Made a bunch of progress with getting dvmdostem to run under PEST++
and SLURM on atlas, so now run-times are actually small enough that we
can experiment with PEST++ in earnest!
As far as I can tell the next critical path item is stage transitions
so that we can run out thru the transient stage and evaluate the
quality of a calibration.
The whole setup with pest++ on atlas and slurm is still a little
cumbersome, but I tried to put a bunch of notes in the the
|slurm-job.sh| script that is now in the |pestdemo/tussock_full|
directory:
https://github.com/tobeycarman/pestdemo/blob/tussock_full-take2/tussock_full/slurm-job.sh
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/ua-snap/dvm-dos-tem/issues/194#issuecomment-239046973,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABtUlzU4Yu57Hyu4PlKgrzfuZ7nMLJc1ks5qenAOgaJpZM4JNpWV.

Yeah, it'd be great to get an update on the stage transition progress, as I will be looking into that next. It has been a while for me and I have forgotten what the issues are. If I recall we are pretty close to having it working and hopefully have just a few wrinkles to work out. When I figure out what specific issues I have, I will make a new github issue.
I copied the outputs from my first PEST++ run to atlas so you can all take a look at them:
/big_scratch/tem/initial-pest-outputs/master-00000/

It would be great if any/all of you could start familiarizing yourselves with the PEST output files so that we can know what to do next. The best file to start with would be the tussock_full.rec file which is the PEST "run record" file. It is the summary of the PEST run and is more or less human decipherable ;-).

OK, I got the stage transitions working, and added some notes to the wiki page for ["Run Stages"] (https://github.com/ua-snap/dvm-dos-tem/wiki/Run-Stages).
Looks good @rarutter , as you has indicated a while ago, this is basically finished/working. It took me a while to figure out or remember that I had to create the restart file "templates" before it would successfully change from one stage to the next.

Now I am finding myself wanting a way to view the outputs from subsequent stages on one time-serises, end to end, to be able to quickly make sure that each stage seems to be picking up where the last stage left off. Anyone have ideas for an easy way to do this?

maybe enable the inter-stage pause, archive the calibration json files at the end of each stage, and add a bit of code to calibration-viewer.py so it can read from multiple archives?

Well that wasn't too bad. I enabled the inter-stage pause. Then ran the model with this command:
$ ./dvmdostem -l note -p 10 -m 20 -s 30 -t 25 -n 20 -c

Then I modified the calibration-viewer.py (in a really temporary manner; need to clean up my code before committing anything). Then at each inter-stage pause I ran a command to archive the calibration json outputs:
$ tar -cjf pr-data.tar.gz /tmp/dvmdostem/
..... continue model, wait for equilibrium stage to finish...
$ tar -cjf eq-data.tar.gz /tmp/dvmdostem/
..... continue model, wait for spinup stage to finish...
$ tar -cjf sp-data.tar.gz /tmp/dvmdostem/
..... continue model, wait for transient stage to finish...
$ tar -cjf tr-data.tar.gz /tmp/dvmdostem/
..... continue model, wait for scenario stage to finish...
$ tar -cjf sc-data.tar.gz /tmp/dvmdostem/

And finally ran the modified calibration-viewer.py to get this plot:
$ ./calibration/calibration-viewer.py --from-archive pr-data.tar.gz

Which looks pretty reasonable at first glance.

It looks like pr and eq stages are using a static climate
it looks like sp and tr are using the same climate. In the long run, this is likely not what we want, but due to some settings that have been in place for development, this is expected.
it looks like scenario is using a different climate, which is good

As discussed, for now I implemented stage-specific JSON output storage. NetCDF will be an addition to that later.
Also, I verified that it will run for multiple cells (2) just with a change in the run mask. Still need to implement separate output for this, though.

Item 4 has been addressed by the PRs listed in the thread for issue #119
Item 5 is handled by PRs #257 and #265
Item 6 has been resolved by the refactor.


Gmail cookies problem

I have a default installation of php-proxy, which includes "Cookies" plugin, but when i try to login to gmail then i get "Oops! Your browser seems to have cookies disabled. Make sure cookies are enabled or try opening a new browser window."
Is there a way to fix it?
Thanx

... have the same issue @facebook.com...
any fix available?

Gmail and facebook are too complicated to deal with cookies properly at this  time.


chore: Headless browser testing with wasmer 3

This sets up the project to run tests in a headless browser when compiled to the wasm32 target.
I still haven't figured out how to run the headless browser tests inside nix flake check but you can run these locally in a nix direnv using cargo test --no-default-features --target wasm32-unknown-unknown --release. Note that you'll need chrome installed on your computer otherwise the chromedriver will fail to find a browser.
Not all the tests have been switched to the wasm_bindgen_test macro, but the important ones should be successful.

I get the below error if I run this locally inside the nix direnv
$ cargo test --no-default-features --target wasm32-unknown-unknown --release
    Finished release [optimized] target(s) in 0.67s
     Running unittests src/lib.rs (target/wasm32-unknown-unknown/release/deps/acvm_backend_barretenberg-cfeef9c21f20df0e.wasm)
Set timeout to 3000 seconds...
Running headless tests in Chrome on `http://<IP_ADDRESS>:34427/`
Try find `webdriver.json` for configure browser's capabilities:
Not found
driver status: signal: 9 (SIGKILL)
driver stdout:
    Starting ChromeDriver 112.0.5615.28 (e01c41304994a51cedfb5f0fac134687ba993bfb-refs/branch-heads/5615@{#494}) on port 34427
    Only local connections are allowed.
    Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
    ChromeDriver was started successfully.

Error: non-200 response code: 404
{"value":{"error":"invalid session id","message":"invalid session id","stacktrace":"#0 0x55bacf51ba23 \u003Cunknown>\n#1 0x55bacf249821 \u003Cunknown>\n#2 0x55bacf2791b1 \u003Cunknown>\n#3 0x55bacf2a72c6 \u003Cunknown>\n#4 0x55bacf2a34ab \u003Cunknown>\n#5 0x55bacf2a2a5a \u003Cunknown>\n#6 0x55bacf219e93 \u003Cunknown>\n#7 0x55bacf4dd75d \u003Cunknown>\n#8 0x55bacf4e160c \u003Cunknown>\n#9 0x55bacf4ea800 \u003Cunknown>\n#10 0x55bacf4e2703 \u003Cunknown>\n#11 0x55bacf4b53c5 \u003Cunknown>\n#12 0x55bacf218471 \u003Cunknown>\n#13 0x7fe62210624e __libc_start_call_main\n"}}

I've installed Chrome to check if that was the issue (I normally only have chromium installed) and ran into the same issue.

@TomAFrench That's the error I got when I didn't have chrome installed on the computer


Stencil 3.2 is not working with Nx (nxext)

Describe the bug
Stencil 3.2 with Nx 15.9.2 is not working with nxext
To Reproduce
Steps to reproduce the behavior:

Install nxext in your Nx project with Nx version (nx: 15.9.2).
Install stencil
try to build a component with npx nx build
you will receive a failed with the next message error:

NX   Cannot find module '@nrwl/workspace/src/utilities/ast-utils'

Expected behavior
Do you have some idea for solving this? Thank you
Additional context
:)

+1, same issue

+1, same issue!

+1
@DominikPieper When do you think you will have the fix for this issue? We are trying to do a POC in order to know the best option:

nx + stencil
nx + lit
Lit is winning because of this issue 😅

We are working on the update to Nx 16 for the stencil package. Unfortunately there are some changes who hit us harder than the other packages here😅

@DominikPieper is there any estimation how long it could take?

@erichstark there’s a 16.3 version released


Merge autonomous control to master

I'm gonna redirect this onto dev for now so that we can test this before merging to master.


support for puppeteer.connect?

Currently puppeteer.launch is used to start the browser, however, to connect to a remote instance, you need to use puppeteer.connect.
Perhaps the existence of browserWSEndpoint in the config options can be checked, and if present, use .connect over .launch?

Yeah, I like that idea.  I'd happily look at a PR if you wanted to take a crack at it.  If you don't have the time, I should be able to put something together when I'm back at my computer.

I'm not in a great position to do the code change as i'm generally not familiar with the best practices of modern day js coding, however, if you would be open to commenting on the following, then i will put in a PR if you think it's sufficient or can direct me to the best way to go about it.
NB: I wasn't sure why this.config never gets set to anything in init, so i've added a new variable to collect the config for now.
--- features/support/scope/BrowserScope.js.orig	2020-08-04 16:48:45.777042504 -0300
+++ features/support/scope/BrowserScope.js	2020-08-04 16:16:27.452018636 -0300
@@ -21,7 +21,13 @@
         this.close();

         this.config = {};
-        this.browser = await puppeteer.launch({...defaultOptions, ...puppeteerOptions, ...this.worldParameters});
+        let config = {...defaultOptions, ...puppeteerOptions, ...this.worldParameters};
+        if('browserWSEndpoint' in config) {
+            this.browser = await puppeteer.connect(config);
+        }
+        else {
+            this.browser = await puppeteer.launch(config);
+        }
         this.page = await this.browser.newPage();
     }

What you've got looks pretty good.  I would make a minor tweak like so, which actually fixes a problem that currently exists with the code (namely that this.config does look like it's being used :)
this.config = {...defaultOptions, ...puppeteerOptions, ...this.worldParameters};
if('browserWSEndpoint' in this.config) {
  this.browser = await puppeteer.connect(this.config);
} else {
  this.browser = await puppeteer.launch(this.config);
}

The one bit we'd need to test is how the BrowserScope.close() method is working.  Right now it always closes the Chrome instance, but if we're using connect, I think the better approach would be to just disconnect from Chrome.
We could do this by tweaking the close code like so:
if(this.browser) {
  if('browserWSEndpoint' in this.config) {
    await this.browser.disconnect();
  } else {
    await this.browser.close();
  }
}

Give it a test with the above disconnect code, and if it's working as expected, a PR would be great!  The one catch is that I'll be camping for the next week, so I won't be able to review anything until I'm back.

Indeed, that seems to work! My session closes at the end of the feature file.
PR pushed.
I'm off for a week as well. Cheers!

Thanks for the PR!  Hope you have a good week off.


[Nav] Add support for bar button icons and left buttons

NavigatorIOS supports four new properties:

rightButtonImageSource: The source of an image to display in the top right. This must be a static image since UINavigationController only supports UIImages. Adding support for UIImageViews (or arbitrary views) is more complicated because custom views do not fade on touch and do not have hit slop the same way that UIImage buttons do. Usage: rightButtonImageSource: ix('ImageName')
backButtonImageSource: Use a custom image for the back button. This does not replace the back caret (<) but instead replaces the text next to it.
leftButtonTitle: Text for the left nav button, which supersedes the previous nav item's back button when specified. The main use case for this is your initial screen/UIVC which has nothing to go back to (since it is the first VC on the stack) but need to display a left button. This does hide the back button if there would have been one otherwise.
leftButtonImageSource: Image source for the left button, supersedes the left button title.

Added UIExplorer example to demonstrate.

cc @ericvicenti as well.

Updated to use RCT_CUSTOM_VIEW_PROPERTY. I left the nav event in RCTUIManager for now, but was thinking they eventually belong in one of the RCTNav*Manager files.

It will be awesome if this feature is merged :)


Add: StatelessControl

Some controls don't require knowledge of entity state. Example, control that moves an entity constantly by a certain speed. These controls can be instantiated once and kept in cache for reuse.
entity.addControl(SomeStatelessControl.class);

No strong use case and no obvious advantages. We will now enforce a 1-1 relationship between Component and Entity


Fix incorrect alignment of header links

Fixes Issue
Closes #1680
Changes proposed
Fixed the header links alignment by tweaking HTML elements hierarchy.
Screenshots

Note to reviewers
Kindly let me know if any changes are required. Open to suggestions

Hi @rupali-codes thank you for your feedback.
For small screens, the width of the sidebar restricts the icons and GitHub stats link from being aligned in the same line. Here is what I came up with:

I have centered aligned the icons and GitHub stats and moved them into two different lines for small screens.


Upgrade RN CLI to v8 alpha.4

Summary
Upgrades the React Native CLI to v8 alpha.4. Includes --generate-static-view-configs metro flag for bundle command cc @dmitryrykun @kelset @cortinico
Changelog
[General] [Changed] - Upgrade RN CLI to v8 alpha.4
Test Plan
CI green.

Thanks for sending this over @thymikee


Add perl test section?

Apparently conda-build has some magic that makes the test.import section also work for perl.
For example here:
{% set name = "perl-data-dumper" %}
{% set version = "2.183" %}
{% set sha256 = "e42736890b7dae1b37818d9c5efa1f1fdc52dec04f446a33a4819bf1d4ab5ad3" %}

package:
  name: {{ name }}
  version: {{ version }}

source:
  url: https://cpan.metacpan.org/authors/id/N/NW/NWCLARK/Data-Dumper-{{ version }}.tar.gz
  sha256: {{ sha256 }}

build:
  number: 0
  # nothing provides perl >=5.32.1,<6.0a0 *_perl5 needed by perl-extutils-makemaker-7.36-pl5321hd8ed1ab_0
  skip: true  # [win]
  script:
    - perl Makefile.PL INSTALLDIRS=vendor NO_PERLLOCAL=1 NO_PACKLIST=1
    - make
    - make test
    - make install VERBINST=1

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('m2w64_c') }}  # [win]
    - make
  host:
    - perl
    - perl-extutils-makemaker
  run:
    - perl

test:
  imports:
    - Data::Dumper

about:
  home: https://metacpan.org/pod/Data::Dumper
  license: GPL-1.0-or-later OR Artistic-1.0-Perl
  license_family: OTHER
  summary: 'seeds germane, yet not germinated'
  license_file:
    - {{ environ["PREFIX"] }}/man/man1/perlartistic.1
    - {{ environ["PREFIX"] }}/man/man1/perlgpl.1

That magic lives here: https://github.com/conda/conda-build/blob/3cf75b660e73babd4772d2cf65ac0026406ca558/conda_build/create_test.py, and it actually supports R and Lua as well.
I've been mass migrating all my personal recipes and feedstocks I manage in conda-forge over to rattler-build (it's worth it when it's 60x faster for some builds) and the lack of this feature is a huge blocker for migrating Perl recipes.
A couple of thoughts on this:

This should support Perl, R, Lua, Ruby, and should probably also work for NodeJS (though shipping libraries for that ecosystem through Conda is not as useful).
Eventually it might be worth linting in conda-forge and bioconda (when they support rattler-build) for using this kind of mechanism instead of the user trying to hand code basic import tests which is prone to error
I don't really like the auto-generated tests for Perl from conda-build because they use a brittle mechanism to check if the version of the Perl module matches what is declared in the recipe.  Annoyingly a surprising number of Perl modules return a different value for Module->VERSION than what is on CPAN, which leads to test failures for something that isn't really important.

What is needed for this to be implemented?  I'm not a rust expert but happy to help as I can!

Hi @danielnachun thanks for stopping by! Yes, I sorta looked through all that magic as well back in the days, but for my taste it's too much magic :)
I would propose two things:
Like python as interpreter, we can make perl (and others) as a script interpreter work, so that the following would work:
script:
  interpreter: perl
  contents: |
    use strict;
    use warnings;
    use Config;

    print "Hello World!\n";
    print "Perl prefix: $Config{prefix}\n";

That would also give an "easy" way to roll your own import tests.
When that works, we could use this to create a perl test section.

@danielnachun I started the implementation for using perl as a script interpreter in #1229
To add a perl-specific test section we should come up with a list of entries we would like, for example:
tests:
  - perl:
      imports: [ ... ]? # is imports the right word for perl?
      check_version: true/false?

And that would be just a convenience wrapper around the script with interpreter perl, essentially. Maybe you have thoughts on what an ideal perl test section would look like.

Hi @danielnachun thanks for stopping by! Yes, I sorta looked through all that magic as well back in the days, but for my taste it's too much magic :)

Indeed upon examining that code in conda-build, it seems that since the old recipe format didn't have a way to explicitly specify the language being used for the import, conda-build tried to guess the language based on the recipe name.  I can imagine quite a few ways in which that could break very easily, so the new approach of explicitly specifying the language should be much more robust.

I would propose two things:
Like python as interpreter, we can make perl (and others) as a script interpreter work, so that the following would work:
script:
interpreter: perl
contents: |
use strict;
use warnings;
use Config;
print "Hello World!\n";
print "Perl prefix: $Config{prefix}\n";

That would also give an "easy" way to roll your own import tests.
When that works, we could use this to create a perl test section.

This is a great idea, and I'll write up below potential specifications for how this can be done with R, Ruby, Lua and NodeJS.

@danielnachun I started the implementation for using perl as a script interpreter in #1229
To add a perl-specific test section we should come up with a list of entries we would like, for example:
tests:

perl:
imports: [ ... ]? # is imports the right word for perl?
check_version: true/false?
And that would be just a convenience wrapper around the script with interpreter perl, essentially. Maybe you have thoughts on what an ideal perl test section would look like.

This is exactly what I had in mind.  I'll write out specifications below for what I think make sense for the different languages.

These are my current thoughts on how we could call various scripting languages as interpreters and what language-specific test sections could look like.  One overall decision that probably needs to be made is whether we would want to consolidate all the "import" tests to a single script, or to use single command invocations for each test.  I don't feel strongly about this either way - maybe we should just go by what is easiest to implement and maintain.
Perl
Perl scripts can be invoked simply by call perl script.pl, while single commands can be issued with perl -e. The equivalent to import for Perl is use, so test syntax could look like this:
perl:
  uses:
    - Module::Submodule

I'm not sure yet if the version check is actually worth adding.  The situation is even more complex than I first mentioned above because in modules specified by multiple files, the author may not keep the versions across these files in sync.  This has resulted in partial test failures where some module/submodules did have the right version and others did not.  It may be possible to have a syntax that allows the user to explicitly enable/disable the version check, but given that version checking isn't even done for other languages, I'm not sure it's important to do here.
R
R scripts can be invoked with Rscript, while single commands can be issued with R -e (note that these are different executables!).  The equivalent to import for R is library(library_name) (no quotes needed), so test syntax could look like this:
R:
  libraries:
    - library_name

Ruby
Ruby scripts can be invoked with ruby, while single commands can be issued with ruby -e. Unlike in most other languages, Ruby can also use ruby -r to directly test import of a gem, though a -e command must still be issue (usually exit 0).  It's probably simpler though to use a script or -e calls to be more consistent with other languages.  The equivalent to import for Ruby is require 'gem_name' (note the quotes), so test syntax could look like this:
ruby:
  requires:
    - gem_name

Lua
Lua scripts can be invoked with lua, while single commands can be issued with lua -e.  The equivalent to import for Lua is also require 'library_name' (note the quotes), so test syntax could look like this:
lua:
  requires:
    - library_name

NodeJS
NodeJS scripts can be invoked with node, while single commands can be issue with node -e.  The equivalent to import for NodeJS is also require, but it is invoked in the form const library_name = require("library_name"), so test syntax syntax could look like this:
node:
  requires:
    - library_name

I'll note here that as I mentioned above, there isn't a lot of value in bundling standalone NodeJS libraries, as the standard NodeJS practice is to bundle all the libraries together.  Most NodeJS recipes are CLI executables that can just be tested with a shell command, but the one scenario where it can be useful to package libraries is when they include native code to avoid vendoring pre-compiled native code in other packages that depend on that library.  I'm happy to explain this in more detail if needed.
Sorry for the huge info dump here, but I figured that all of these could probably end up being implemented more or less the same way aside from the minor syntactic differences


Core

[Change title]
[Brief description of the change]
Version introduced
[Version in which the breaking change first occurred (for example, 3.0 for .NET Core 3.0)]
Old behavior
New behavior
Reason for change
Recommended action
[ Suggested steps if user is affected go here:

Possible workarounds
Example of code changes to handle change
]

Category
[Choose a category from one of the following:

ASP.NET Core
C#
Core
Core .NET libraries
Cryptography
Data
Debugger
Deployment for .NET Core
Globalization
Interop
JIT
LINQ
Managed Extensibility Framework (MEF)
MSBuild
Networking
Printing
Security
Serialization
Visual Basic
Windows Forms
Windows Presentation Foundation (WPF)
XML, XSLT
]

Affected APIs
[ If no APIs are affected, this should read:
"Not detectable via API analysis"
If affected APIs are identifiable, include a link for each. The link takes the form:
[friendly description of API](link to API on docs.microsoft.com)
For example, `String.IndexOf(String)
For methods, if all overloads are affected, link to the general overloaded method page. For example:
https://docs.microsoft.com/dotnet/api/system.string.indexof
Otherwise, link to the individual method overload. For example:
https://docs.microsoft.com/dotnet/api/system.string.indexof#System_String_IndexOf_System_String_
]

Issue metadata

Issue type: breaking-change

@jorge-abraham What is the breaking change you are reporting?


Day46: 'Maximum Width of Binary Tree' solution

Maximum Width of Binary Tree
https://leetcode.com/problems/maximum-width-of-binary-tree/
Given the root of a binary tree, return the maximum width of the given tree.
The maximum width of a tree is the maximum width among all levels.
The width of one level is defined as the length between the end-nodes (the leftmost and rightmost non-null nodes), where the null nodes between the end-nodes that would be present in a complete binary tree extending down to that level are also counted into the length calculation.
It is guaranteed that the answer will in the range of a 32-bit signed integer.

Example 1:
Input: root = [1,3,2,5,3,null,9]
Output: 4
Explanation: The maximum width exists in the third level with length 4 (5,3,null,9).
Example 2:
Input: root = [1,3,2,5,null,null,9,6,null,7]
Output: 7
Explanation: The maximum width exists in the fourth level with length 7 (6,null,null,null,null,null,7).


[ARTEMIS-2401]: Implement the Pause method for a Topic

Adding support to pause a topic
Jira: https://issues.apache.org/jira/browse/ARTEMIS-2401

Since pausing an address is essentially just pausing all of the bound queues (i.e. not the actual consumers) I think the method names should reflect that. Therefore, I recommend using pause(), resume(), & isPaused(). The AddressControl should also expose paused so users can determine whether or not an address is paused administratively.

Persistence added
Commit message updated
Methods renamed

As this is a new feature can there be some docs added so users are aware or it and can understand.

@michaelandrepearce where does this doc live ?

I improved the tests and disocvered a few bugs. I will have to work on it tomorrow.

don't merge this yet

This was replaced by #2761


GEODE-8436: Several threads calling PdxInstanceFactory::create() causes seg fault

A segmentation fault is produced when PdxInstanceFactory::create() is called by several threads that are registering the same new pdx type.
The core is produced here:
void PdxInstanceImpl::toDataMutable(PdxWriter& writer) {
   auto pt = getPdxType();
   std::vector<std::shared_ptr<PdxFieldType>>* pdxFieldList =
       pt->getPdxFieldTypes();

getPdxType() returns nullptr, so in the next line, there is segmentation fault when calling pt->getPdxFieldTypes().
I have seen the problem appears when PdxInstanceImpl::getPdxType() calls PdxTypeRegistry::getPdxType() and this method returns nullptr due to it is not able to found an entry in its typeIdToPdxType_ map. But I have verified that at that point, the corresponding entry in pdxTypeToTypeId_ map exists, so the maps were not aligned.
I checked how they are updated, and I realized that two different locks are being used to update pdxTypeToTypeId_ map first and typeIdToPdxType_ after. So it seems the error is caused due to typeIdToPdxType_ is checked before it is updated.
The test case implemented does not fail every time it is executed (I have not been able to find a configuration to make it fail always) but I have not seen it failing after the change I have introduced in PdxTypeRegistry.

Hi @pdxcodemonkey , @pivotal-jbarrett , @moleske . I have not been able to create a test case that fails every time it is executed. Without the fix, the test case I have implemented fails 70-80% of executions. And with the fix, I have not seen it fail yet. Do you think it would be enough to approve the PR?

Hi @pdxcodemonkey , @pivotal-jbarrett , @moleske . I have not been able to create a test case that fails every time it is executed. Without the fix, the test case I have implemented fails 70-80% of executions. And with the fix, I have not seen it fail yet. Do you think it would be enough to approve the PR?

Yes, I am fine with it. It's pretty clear when you do that math that the original code is wrong from a concurrency standpoint. Good find!

Travis CI is failing due to a clang-format issue in the new test file.  Please run cmake --build . --target all-clangformat and check in the formatting changes.  Reminder, you will need clangformat v6 for compatibility.

I'm also hitting this on Windows builds now, though it appears to have come in with yesterday's PR for GatewaySenderEventCallbackArgument:
Z:\nativeclient\cppcache\integration\test\WanDeserializationTest.cpp(169): error C3861: 'sleep': identifier not found
continuing to investigate...

I'm also hitting this on Windows builds now, though it appears to have come in with yesterday's PR for GatewaySenderEventCallbackArgument:
Z:\nativeclient\cppcache\integration\test\WanDeserializationTest.cpp(169): error C3861: 'sleep': identifier not found
continuing to investigate...

Not sure how that ever worked given that's not really a standard function.
You want std::this_thread::sleep_for.
https://en.cppreference.com/w/cpp/thread/sleep_for

I'm also hitting this on Windows builds now, though it appears to have come in with yesterday's PR for GatewaySenderEventCallbackArgument:
Z:\nativeclient\cppcache\integration\test\WanDeserializationTest.cpp(169): error C3861: 'sleep': identifier not found
continuing to investigate...

Not sure how that ever worked given that's not really a standard function.
You want std::this_thread::sleep_for.
Also, sleeping in a test just makes it flaky.
https://en.cppreference.com/w/cpp/thread/sleep_for

Ok, Im going to fix in a separate PR.

Just to confirm: the problem for the revert is that the new test case of this PR fails on RHEL platform, or it is that the code changed is making other tests to fail?


feat: Reimplement the JS plugin using Ky instead of Axios

NOTE: this is experimental. The tests do not run yet (compilation errors), and more extensive testing needs to be done to make sure it functions properly.

@dOrgJelli What's the reason behind this change?


virt-controller can modify KubeVirt CRs

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug

/kind enhancement

What happened:
virft-controller has all rights on all kubevirt.io resources. This means that if someone gets access to the virt-controller service account, that person can delete KubeVirt or "upgrade" unobserved to a flawed kubevirt version.
What you expected to happen:
Let's move the KubeVirt CR into its own resource group. Something like operator.kubevirt.io or explicitly mention all resources which virt-controller should be able to modify.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:

KubeVirt version (use virtctl version):
Kubernetes version (use kubectl version):
VM or VMI specifications:
Cloud provider or hardware configuration:
OS (e.g. from /etc/os-release):
Kernel (e.g. uname -a):
Install tools:
Others:

Let's move the KubeVirt CR into its own resource group. Something like operator.kubevirt.io or explicitly mention all resources which virt-controller should be able to modify.

unfortunately, moving the KubeVirt CR to another operator group at this point is a fairly complex endeavor.
The simplest approach is to pick exactly what kubevirt.io APIs virt-controller is allowed to access. This is what we're doing for all our other components such as virt-api and virt-handler, so it's a consistent pattern we already use.
The change involves updating the virt-controller rbac in the pkg/virt-operator/creation/rbac/controller.go file. There's an entry that looks like this the following
                        {
                                APIGroups: []string{
                                        "kubevirt.io",
                                },
                                Resources: []string{
                                        "*",
                                },
                                Verbs: []string{
                                        "*",
                                },
                        },

That needs to be replaced with an entry that targets exactly the api's virt-controller needs access to. pkg/virt-operator/creation/rbac/apiserver.go has examples of how targeted access to kubevirt.io should look.

Hello, I think I have an initial fix to this problem following David's suggestion. I need permission to push code.
Currently, the rule for the API group kubevirt.io in the definition of the ClusterRole kubevirt-controller in pkg/virt-operator/creation/rbac/controller.go is

Resource API
API Group
Verbs

*
kubevirt.io
*

I changed the the rule specification code to specify 3 rules for specific custom resources, as below:

Resource API
API Group
Verbs

vm, vmi
kubevirt.io
get, list, watch, patch

vmireplicaset
kubevirt.io
get, list, watch, patch

vmim
kubevirt.io
create, get, list, watch, patch

vmpreset
kubevirt.io
list, watch

kubevirt
kubevirt.io
get, list, watch

I added a block to tests/access_test.go essentially runs the command
kubectl delete vm --as system:serviceaccount:kubevirt:kubevirt-controller
for the 8 verbs against the 6 target service objects.
I did not deal with other API groups with kubevirt.io extension, their rules are defined right now as:

Resource API
API Group
Verbs

*
snapshot.kubevirt.io
*

*
cdi.kubevirt.io
*

Correction:
kubectl delete vm --as system:serviceaccount:kubevirt:kubevirt-controller
-->
kubectl auth can-i delete vm --as system:serviceaccount:kubevirt:kubevirt-controller`

The open PR #4298 (with aim to improve this issue) just managed to pass all the functional test.
As a summary, the effort to refactor the RBAC rule of the kubevirt-controller ClusterRole with regard to the access of the resources in the kubevirt\.io API group did not find a more restrictive substitute. Not aware of the development history, the CI tests and life-cycles of VM, VMI appear to be heavily dependent on the existing rule (* for resources and * for verbs) setting.
Through the functional testing process (CI) in the scope of this PR, I learnt a few loose relationship of the specification of the rule(s) and some functional tests. They are explained as below:
Before the PR, all CI tests pass:

Rules tmp-name
API Group
Subject
Verbs

orig
kubevirt.io
*
*

Refactoring that allow cluster-deploy script to bring up the kv, but fails 22 functional tests in the 3 e2e CI tests. The failed tests were in vm_test, vm_watch_test, subresource_api_test, expose_test, pausing_test.

Rules tmp-name
API Group
Subject
Verbs

rule1-A
kubevirt.io
*
get, list, watch, patch, update, create

rule1-B
kubevirt.io
kv, vm, vmi, vmirs, vmipreset, vmim
get, list, watch, patch, update, create, delete

Note there are not many room for tweaking the specification between the orig rule and rule1 rule. To log the tweaking briefly, we used these loosely defined terms,

Term
Stands for

6-verbs
a specification of verbs that including get, watch, list, patch, update, create

7-verbs
a specification of verbs that including get, watch, list, patch, update, create, delete

8-verbs
a specification of verbs that including get, watch, list, patch, update, create, deletecollection

6-subjects
a specification of rule subjects that including kv, vm, vmi, vmirs, vmipreset, vmim

With these terms the rule tweaking is logged as below

Id
rule1-A subj.
rule1-A verb
rule1-B subs.
rule1-B verb
Failed tests

1
*
6-verb
6-subj
7-verb
22 fails (vm_test, etc.)

2
*
7-verb
6-subj
7-verb
2 fails (id: 3145, 4642)

3
*
8-verb
6-subj
8-verb
2 fails

4
*
8-verb
6-subj
*
2 fails

5
*
*
6-subj
7-verb
0 fail

The main conclusion from this table is that in order to keep the current CI tests, the rule has to use * for both the resources and verbs fields in the code.
The secondary findings (not explained) are:

In term of specification of the verbs in a RBAC rule, "*" covers more than the 8 verbs {"get", "list", "watch", "patch", "update", "create", "delete", "deleteconnection"}. Is there any other verb we have declared?
In term of specification of resource subjects in the RBAC rule in the kubevirt.io API group, "*" appears to be a superset of {vm, vmi, vmrs, vmpreset, vmim, kv}.

Following the minimalism practice, there is no reason to merge this PR. The code changes are:

pkg/virt-operator/creationg/rbac/controller.go : to leave trace of this attempt.
pkg/virt-operator/creationg/rbac/operator.go : cleanup, no functionality change.
tests/acctest_test.go , tests/acctest.go: a fast test targeted the rule in discussion.


sstore gas cost is 0??

Yellow paper says 20k for new storage, 5k to update storage and refund of 15k to clear storage. Has that changed?

Hey @robdoesstuff -- thanks for this issue.
The "0" gas cost is from the PyEthereum source file "opcodes.py." This was cited in References.bib, but not printed in the paper, so I've fixed that.
Here's the actual snippet:
    0x54: ['SLOAD', 1, 1, 50],  # 200 now
    # actual cost 5000-20000 depending on circumstance
    0x55: ['SSTORE', 2, 0, 0],

I thought the 5000-20000 referred to SLOAD, but I wasn't sure since the 5000-20000 was in a comment, so I left it out. I checked the YP which also said 5000-20000. A lot of information in the Yellowpaper is theoretical only, so I decided to trust the client implementation's default "0" until someone could confirm otherwise.
Thanks for correcting this!


Improvements to coho list-pulls.

Supports an environment variable (CORDOVA_GIT_ACCOUNT) to specify <username>:<apitoken> to avoid hitting GitHub rate limits.
Uses API to get most recent comment info, if available.

LGTM :shipit:

LGTM


Web Scraping Error on app launch

Hi there, great project.
I tried to run the project but while on app launch, web_scraping
episodes_provider > fetchSeasons() gets Null check operator used on a null value error while parsing Season Model.
I think the dom data from the southpark has been changed.
Can you fix this error?

I think that might be due geo-related reasons. Currently it's only working in germany but i've started reworking it to use a better method of gettting seasons and episodes.

Thanks for the reply. I look forward to it!


Correct import directives

The file Reachability.h was importing system headers that are not needed at that scope. Moving them within the implementation file reduces the chances of having cycle dependencies when importing Reachability in other parts of a project, especially when used with CocoaPods.

I’m not sure if it will fix an issue I’m having on a project at the moment.
But when I apply the fix locally, XCode compiles without any cycle
dependency.
Anyway, the fix won’t hurt for sure
On Tue, 5 Feb 2019 at 17:27, Ross Butler<EMAIL_ADDRESS>wrote:

Makes sense to me 👍🏻
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/rwbutler/Connectivity/pull/12#issuecomment-460704470,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQXUcPShBwrUBNno8VCn4iSockOUDogYks5vKbEPgaJpZM4ajVLa
.

--
.pm
Sent from Gmail Mobile


Feature: option to honor Stringer interface

If I have a large struct, logxi's map rendering of it can be too verbose.  I can implement String() on it, but logxi ignores it.  If I pass s.String() as the arg to logxi, I incur the Sprintf cost even when the log message is ignored, so I need to do this:
if log.isTrace() { log.Trace("the struct", s.String())}

Would be cool if logxi had a flag to enable using String() if implemented.

Agree. Kind of busy. Will try to sometime next week.


Fix a lock race and a data race in cleanupLoop

Cleanup loop was leaking the the lock around jobTracker.jobs because
it tries to grab it twice; once at the top of the method and once in
deleteJob or saveJob.
Additionally, there was a possible data race where we could be
removing fields from newly-partial jobs while another thread was
updating them. To fix that, we construct a new job object and swap
it in.

:+1: good find


Urql doesn't make a http request to the server on component remount and gets stuck on fetching.

Describe the bug
I'm making a request to graphql server for an object using it's id. But the id is incorrect and no such object exists. So, the resolver checks the id and database for the object and if it doesn't exists throws a GraphqlError. Urql client receives this error in the graphQLErrors list on error object returned from the query. I'm checking the error object and rendering error message to the screen.
The first time this page is rendered everything works fine and the error message is rendered. But if I navigate away from the page and come back to it since the component unmounts and remounts urql client again makes the fetch request to the server because error results are not cached by urql I presume.
The problem is that the refetch happens but urql client never sends a request to the server. I'm saying this because the fetching state returned from urql client turns to true. So, basically it gets stuck. Please look into this issue.
The codesandbox link I've attached shows two pages. User with id = 1 renders the data response. User with id != 1 renders the error response. Navigate away from the page and go back to it again. You can see the fetching state is stuck on fetching = true. In the network tab there's no request made to the server.
Reproduction
https://codesandbox.io/p/github/xoldyckk/urql_nextjs_error/draft/tender-keldysh
Urql version
urql v3.0.3
next-urql v4.0.0
Validations

[X] I can confirm that this is a bug report, and not a feature request, RFC, question, or discussion, for which GitHub Discussions should be used
[X] Read the docs.
[X] Follow our Code of Conduct

I've taken a look and can confirm that this is an issue with the loop protection. We did recently fix another issue with it here, for reference: https://github.com/urql-graphql/urql/pull/2831
The original implementation is here: https://github.com/urql-graphql/urql/pull/2737
What we basically likely didn't account for are cases where the same query triggers again across multiple pages, i.e. explicit operations being triggered by the consuming client.
We'd likely have to find a way to better differentiate between reexecuteOperation loops and actual triggers in Graphcache, I'd suspect we'll need to take teardowns into account to check for this.
I'll see whether I can start a fix soon, and I'll link it to here once we do :v:

Ok, this was actually rather simple to fix 😅 Sorry for the delay!


Unable to reproduce results

Hi,
I was tried to run the experiments on run_rmu_zephyr.ipynb, but for the evaluation, I was unable to use the same batch size as in the original code due to limited GPU memory. I was running the experiments on 4 V100 GPUs with 32GB of memory each.
Here is my commands:
python3 -m rmu.unlearn --max_num_batches 150 --batch_size=4 --retain_corpora wikitext,wikitext --forget_corpora bio-forget-corpus,cyber-forget-corpus --steering_coeffs 6.5,6.5 --alpha 1200,1200 --lr 5e-5 --seed 42 --output_dir models/zephyr_rmu --verbose
lm-eval --model hf --model_args pretrained=models/zephyr_rmu --tasks mmlu,wmdp --batch_size=2
This results is random performance for mmlu.
.
I don't think the batch size in the evaluation is the root cause. Can someone help to check what is the problem?
Thank you very much.
Tuan Hoang

Hi,
I tried to evaluate the released models with different batch size and the results are similar with the performance in the paper. So the batch size is not the problem.
Please help to check.
Thank you very much.
Best regards,
Tuan Hoang

Hi @hnanhtuan , can you try to check the fp16 or bf16 when loading the model?


Python scraping

write a couple python scripts to scrape the table data from:
https://glottolog.org/glottolog/language
and
https://glottolog.org/glottolog/family
into two .csvs in the datasets repo.
then write two python scripts to upload the csv data into postgres.
you'll need to figure out how to get additional pages from their API/table because their URL doesn't update when you click for a page, they just use AJAX and refresh the table data.

i looked through their downloaded data files but they looked too confusing to write a program to parse. i think it'll be faster to just scrape the website


chocolatey_package: remove package not working properly with source and options

Description

While trying to uninstall a package using chocolatey_package resource, it takes all the options as an input and does not check any invalid flags, which might be valid for other actions like installation. Seems like the given options are simply concatenated for all the actions(install/remove/upgrade).
It blows up as given under client output.
Chef Version
chef-client version: 14.10.9
Platform Version
Windows
Client Output

---- End output of C:\ProgramData\chocolatey/bin/choco.exe uninstall -y -u username -p password --force --all-versions -source https://www.myget.org/F/chocolatey-window/api/v2 Mahdi72.VSCodeNotify.WPF ----
Ran C:\ProgramData\chocolatey/bin/choco.exe uninstall -y -u username -p password --force --all-versions -source https://www.myget.org/F/chocolatey-window/api/v2 Mahdi72.VSCodeNotify.WPF returned 1
C:/opscode/chefdk/embedded/lib/ruby/gems/2.5.0/gems/mixlib-shellout-2.4.4-universal-mingw32/lib/mixlib/shellout.rb:297:in `invalid!'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.5.0/gems/mixlib-shellout-2.4.4-universal-mingw32/lib/mixlib/shellout.rb:284:in `error!'
/chef/lib/chef/mixin/shell_out.rb:131:in `shell_out_compacted!'
/chef/lib/chef/mixin/shell_out.rb:65:in `shell_out!'
/chef/lib/chef/provider/package/chocolatey.rb:177:in `choco_command'
/chef/lib/chef/provider/package/chocolatey.rb:124:in `remove_package'
/chef/lib/chef/provider/package.rb:155:in `block (3 levels) in <class:Package>'
...
/chef/lib/chef/application/client.rb:440:in `run_application'
/chef/lib/chef/application.rb:66:in `run'
/chef/bin/chef-client:25:in `<top (required)>'
/chefdk/gem/ruby/2.5.0/bin/chef-client:23:in `load'
l/chefdk/gem/ruby/2.5.0/bin/chef-client:23:in `<main>'

Replication Case

Recipe with options " -u .. -p ... " for the private source runs well for action :install. Change the action to remove as follows:
chocolatey_package 'Mahdi72.VSCodeNotify.WPF' do
    options                    '-u username -p password --force --all-versions'
    package_name        'Mahdi72.VSCodeNotify.WPF'
    source                     'https://www.myget.org/F/chocolatey-window/api/v2'
    version                    '1.11.3'
    action                     :remove
end

As per the documentation https://chocolatey.org/docs/commands-uninstall "-u & -p " are not valid options so existing behavior is correct.


Tuple destructuring results in unreachable warnings when _ is used

Reproduce
library tuples;

fn tuple() {
    let tuple = (5, true, ("Sway", 8));

    let(_, truthness, _) = tuple;
}

Screenshots

cc @sezna

This doesn't look like it has anything to do with tuples. The problem (afaict) is just that it's a private function which is never used, so it's body is never executed. For example, this:
library stuff;

fn private_fn() {
    let _ = 4;
}

pub fn public_fn() {
    let _ = 4;
}

gives these errors:
warning
 --> .../src/main.sw:4:5
  |
2 |
3 | fn private_fn() {
4 |     let _ = 4;
  |     ---------- This returns a value of type u64, which is not assigned to anything and is ignored.
5 | }
  |
____

warning
 --> .../src/main.sw:8:5
  |
6 |
7 | pub fn public_fn() {
8 |     let _ = 4;
  |     ---------- This returns a value of type u64, which is not assigned to anything and is ignored.
9 | }
  |
____

warning
 --> .../src/main.sw:4:5
  |
2 |
3 | fn private_fn() {
4 |     let _ = 4;
  |     ---------- This code is unreachable.
5 | }
  |
____

The real issue here is that we don't raise a warning for unused functions but instead raise a warning for their body being unreachable.

I've opened https://github.com/FuelLabs/sway/issues/1914 as a replacement.


File rescan not working

Error: The identifier fID is missing for a query of Concrete\Core\File\File
The rescan dialog returns no error:

Also no thumbnail images are being displayed, the file size is 0 the following error is in the properties dialog: Invalid file dimensions, please rescan this file.
Later in the stack error I see this error generated by Doctrine:
The identifier fID is missing for a query of Concrete\Core\File\File
I'm running a fresh C573 installation on PHP 5.5.14 and the file permissions are OK.

I can't reproduce this.

That error you are getting is when you are viewing the tools file, not the actual error when it is POSTed, either way, I can't reproduce this, I tested that functionality quite a bit when I was working on storage locations.

I tried to debug it, but I'm not familiar with Doctrine. The fID is coming through ok and outputs "1" in the getByID() method. It goes wrong when Doctrine comes into play. Any idea where to look?
On the same machine are other C573 websites running without problems (although they have been upgraded from C572).

Turns out Imagine is suppressing errors in the imagecreatefromstring function. The real error was: "No PNG support in this PHP build". Don't ask me why it's not installed, but now I know what the problem is!

Hmz, Yosemite is missing PNG support in the GD library: http://stackoverflow.com/questions/26493762/yosemite-php-gd-mcrypt-installation/26505558#26505558

Ah, yes. I encountered this on Yosemite too (with the built-in PHP) and had to switch to Macports. In the GD installation check we now check to see if imagepng is installed so this should hopefully not bite anyone installing from the newer versions of concrete5.


NullReferenceException

My editor raised an exception that 'Object reference not set to an instance of an object' after I pressed the run button, why?

Please check the FAQ on README ("AICommandWindow throws NullReferenceException").
You probably have to register your valid credit card.

I close this issue as answered. Please reopen it if it still reproduces.


Auto reload on save

Is your feature request related to a problem? Please describe.

Describe the solution you'd like:

Describe alternatives you've considered:

Additional context:

Closing as incomplete. Please feel free to add more information if you have any and we can re-open the issue.


The latest version of nuxt3 deployment server ran an error: This page is temporarily unavailable

Environment
Nodejs：v18.1.0
{
"devDependencies": {
    "@nuxt/devtools": "latest",
    "@types/node": "^20.8.9",
    "nuxt": "^3.8.0",
    "nuxt-icon": "^0.6.0",
    "typescript": "^5.2.2",
    "vite-plugin-prismjs": "^0.0.8",
    "vue": "^3.3.7",
    "vue-router": "^4.2.5"
  },
  "dependencies": {
    "@iconify-json/logos": "^1.1.37",
    "@iconify-json/octicon": "^1.1.49",
    "@iconify-json/ph": "^1.1.6",
    "@iconify-json/simple-icons": "^1.1.76",
    "@iconify-json/uil": "^1.1.5",
    "@nuxt/image": "^1.0.0",
    "@nuxt/ui": "^2.9.0",
    "@vueuse/core": "^10.5.0",
    "marked": "^9.1.3",
    "ohash": "^1.1.3",
    "prismjs": "^1.29.0",
    "sass": "^1.69.4"
  }
}

Reproduction
These are the network requests I encapsulated:
// utils/http.ts
import { hash } from 'ohash'

export function getBaseUrl() {
  if (process.server) {
    return 'https://xxx.com/api/'
  }
  return '/api/'
}

interface FetchOptions {
  method: 'get' | 'post';
  params?: IObject;
  body?: IObject
}

const baseUrl = getBaseUrl()

export function fetch<T>(url: string, options: FetchOptions): Promise<ResponseData<T>> {
  return new Promise((resolve, reject) => {
    const requestUrl = baseUrl + url
    const key = hash(JSON.stringify(options) + url)
    useFetch(requestUrl, {...options, key}).then(({data, error}) => {
      if (error.value) {
        throw createError({
          statusCode: error.value?.statusCode ?? 500,
          message: error.value?.statusMessage ?? error.value?.message ?? '未知错误'
        })
      } else {
        const value = data.value as ResponseData<T>
        if (!value) {
          throw createError({statusCode: 500, message: '未知错误'})
        } else {
          if (value.code !== 200) {
            throw createError({statusCode: value.code, message: value.message})
          } else {
            resolve(value)
          }
        }
      }
    }).catch(err => {
      reject(err)
    })
  })
}

// /api.index.ts
import { fetch } from '~/utils/http'
interface ArticleInfo {
  articleColumn: {
    id: string;
    name: string
  }
  content: string;
  description: string;
  id: string;
  keywords: string;
  publishTime: string;
  title: string;
  view: number
}
export function getArticleInfo(params: { id: string }) {
  return fetch<ArticleInfo>('article/front/info', {method: 'get', params})
}

Used on the page, taking the article details page as an example

<template>
  <UContainer :ui="{ constrained: 'max-w-4xl'}">
    <Page>
      <PageHeader :title="article.title" :description="article.description">
        <template #headline>
          {{ article.articleColumn.name }} ·
          <time class="text-gray-500 dark:text-gray-400"> {{ article.publishTime }}</time>
        </template>
      </PageHeader>
      <PageBody prose>

      </PageBody>
    </Page>
  </UContainer>
</template>

Describe the bug
The above methods are not a problem in the development environment, but when using the npm run build command to package and deploy files to the server for running, an error will be reported
development:

production:

Additional context
No response
Logs
No response

It seems I also encountered this problem. At the moment I cannot provide reproduction, but I will try to send details as soon as possible.
My project used nuxt 3.7.3, and today I decided to update it. I use github actions for deploy and launch application with pm2.
When I try to open the application, I get exactly the same error as in the message above. When I manually restart the PM process, the application starts working.
I saw the following error in the logs
[Vue warn]: Component <Anonymous> is missing template or render function.
node version v20.7.0

@nzuyanov https://github.com/nuxt/nuxt/issues/24060#issuecomment-1789075564 applies to you too then 👍🏻

@nzuyanov #24060 (comment) applies to you too then 👍🏻

I can provide a basic project example warehouse:  https://github.com/xxwangkaimin/nuxt-nest
Can you help me take a look?
Thank you.


Fix regression e2e tests using new baseSite

There are 10 e2e regression tests failing using electronics-spa.

Fix the tests
Make sure jenkins job for regression tests is working fine

e2e tests were fixed as part of GH-1321 (it was just merged).
Let's try the regression tests on the develop branch.  They should all pass now.


Please provide a brief overview over your project’s own dependencies.

@fixThisChris

Based on the code files provided, I couldn't find any information about the project's dependencies. The code files mainly contain code related to fetching and responding to issue comments on GitHub. To get an overview of the project's dependencies, you might need to check other files such as requirements.txt or package.json if they exist in the codebase. These files typically list the dependencies required by the project.


Support env vars and json escape strategy

This enables me to use twigc to generate configuration files. Almost all the configuration languages I use are a superset of JSON, so a simple json escaper goes a long way.

Of course! Sorry I wasn't paying attention for a month. I've updated the style as per your comments.

Cool!
Some future expansion possibilities:

If $_ENV is empty, emit a warning about needing to change the variables_order INI setting

Make --env optionally accept the name of an environment variable — that way, if the variables are already known, users don't have to mess with variables_order at all

I might do one or both of these before pushing the next release.
Thanks again!


m1/m2 need support

https://github.com/antimatter15/alpaca.cpp

I think you can export. Need better instructions


For R2: BluetoothControl: Remove devices from list before scan.

Move the fix to R2.

Blackduck scan failure details
Summary: 0 violations, 0 files pending approval, 1 file pending identification.

Protex Server Path: /home/blackduck/github/ThunderNanoServices/445/rdkcentral/ThunderNanoServices

Commit: ec5abaef54f70e9b6375ea0df566a0b35e550f3d

Report detail: gist


curl: (22) The requested URL returned error: 401 Unauthorized

Unable to clean up our private registry using you script. What am I missing.
We using a private registry by vmware/harbor

https://github.com/vmware/harbor

Here's the command:
:~# docker run -it -v /<path to reg>/registry:/registry -e REGISTRY_URL=https://docker-reg.mydomain.com -e CURL_INSECURE=true mortensrasmussen/docker-registry-manifest-cleanup
curl: (22) The requested URL returned error: 401 Unauthorized
Could not contact registry at https://docker-reg.mydomain.com - quitting

I haven't tested this on Harbor myself, but you're getting an HTTP 401 Unauthorized for your registry.
I assume you need to add username and password of a harbor admin user that is allowed to read and write to all repositories. Also, I'm not sure how Harbor stores the files, but if the storage scheme is the same as with Dockers own registry container, then it should work IMHO.
Please note again, I have not tested this, so I wouldn't start doing this on a production registry without having a backup.
If its still relevant and you have further questions, please reopen this ticket.


Setup NPM Publishing

We should have github actions setup to publish the latest packages to NPM.
We probably want to have an OpenSLO npm account for this.

I've created the organization https://www.npmjs.com/org/openslo 🎉 Reach @programmer04 or @davex98 to get membership when needed


feat: ownership provider to work with Lumos

[x] injectCapacity
[x] payFee
[x] collector
[ ] signTransaction

update(2023-03-20):

we should change constructor from {ckb: InjectedCkb} to {ckb: InjectedCkb , rpcUrl: string } since the ScriptConfig is required for the Provider https://github.com/ckb-js/nexus/blob/abadb896648b0587254b662535dd26d764f02540/packages/extension-chrome/src/services/ownership/backend/backendUtils.ts#L66-L87

:baby_chick: Download canary assets:
nexus--canary.127.4528887947.zip

I want to reuse lumos prepare signing entries method.
https://github.com/ckb-js/lumos/blob/e73ca0502b0feb3e98be848f76325a912052d0f0/packages/common-scripts/src/helper.ts#L186-L279
Thus, my code will seems like
  /**
   * request wallet to sign a transaction skeleton
   * @param txSkeleton The transaction skeleton, you can create it from transaction object via `@ckb-lumos` {@link createTransactionFromSkeleton}
   * @returns The signed transaction skeleton. To get the signed transaction object, please use {@link sealTransaction} with empty sealingContents(`[ ]`).
   */
  async signTransaction(txSkeleton: TransactionSkeletonType): Promise<TransactionSkeletonType> {
    const config = getConfigFromRpcUrl();

    prepareSigningEntries(txSkeleton, config);
    const groupedSignature = await this.ckb.request({
      method: 'wallet_fullOwnership_signTransaction',
      params: { tx: createTransactionFromSkeleton(txSkeleton) },
    });

    txSkeleton = txSkeleton.update('witnesses', (witnesses) => {
      return witnesses.map((witness, index) => {
        const [, signature] = groupedSignature[index];
        if (!signature) return witness;
        const witnessArgs = WitnessArgs.unpack(witness);
        return bytes.hexify(
          WitnessArgs.pack({
            ...witnessArgs,
            lock: signature,
          }),
        );
      });
    });

    txSkeleton = txSkeleton.update('signingEntries', (signingEntries) =>
      signingEntries.splice(0, groupedSignature.length),
    );

    return txSkeleton;
  }

Insufficient coverage of unit tests, can you add tests?

can you try the coverage detection method mentioned in this post?

can you try the coverage detection method mentioned in this post?

      <line num="138" count="10" type="cond" truecount="1" falsecount="0"/>

But it seems the coverage is wrong. jest tells me the if statement is full covered.

@IronLu233 could you comment for the payFee does not support unlocking DAO transaction yet


Add Japanese Localization

This node is used equally well in Japan as well.
I thought it would be nice to write in Japanese, I added a file.
Please merge if possible.

Thank you.
Not sure when I'll be pushing a new release at the moment, but I'll include this when I do.


[Bug (Maybe)] Frame Skipping Problem on Some Clients

In many clients, when you double-click on a weapon and select an object, the character turns in that direction. When you make a macro of this and keep pressing the macro while running, the character jumps and runs. For this, I added OF_NoDClickTurn_Char in addition to OF_NoTargTurn.
CClientEvent.cpp
under bool CClient::Event_DoubleClick( CUID uid, bool fMacro, bool fTestTouch, bool fScript )

	// Face the object

	// Face the item
	if (pObj->IsItem())
	{
		if (!IsSetOF(OF_NoDClickTurn) && (pObj->GetTopLevelObj() != m_pChar))
		{
			SetTargMode();
			m_Targ_UID = uid;
			m_pChar->UpdateDir(pObj);
		}
	}

	// Face the char
	if (pObj->IsChar())
	{
		if (!IsSetOF(OF_NoDClickTurn_Char) && (pObj->GetTopLevelObj() != m_pChar))
		{
			SetTargMode();
			m_Targ_UID = uid;
			m_pChar->UpdateDir(pObj);
		}
	}

Good idea. PR?

Contributor

Since I don't have git or any compiler ide on my computer right now, I can't make a pull request, so I sent all the changes here as an issue.

proposal: why not disable double-click rotation as a default in core.
Whoever wants to implement this feature, could implement it directly in the script pack.

To be honest i'd rather how it is now, in order not to break existing stuff. It can be a good point of discussion for new features and x script pack

doesnt this ini option already exist to handle this? OF_NoDClickTurn, i believe this has been around for a long time already. i do not turn when dclicking anything at all.

I finally found a solution in my own Fork, if the character is moving (last event walk) it is an update. Because this kr throwing event only happens when moving


W1D5T1 - calculate_cov_matrix invalid parameters

Hi,
In W1D5T1, exercise 1, the function calculate_cov_matrix takes corr_coeff as argument which should be in range [-1,1].
If a values of corr_coeff is passed that is outside this range, the exercise cell runs without error but the plot is generated with the last valid corr_coeff given.
This might be confusing, I think  calculate_cov_matrix should throw an error if corr_coeff is not in the correct range, or at the very least it should not produce a plot.

Thanks @FedeClaudi for reporting

but the plot is generated with the last valid corr_coeff given.

I don't think I understand this. What is happening that's it's ignoring invalid input but not raising an error? Also can you please show exactly what the code says in the version you're looking at, per the contribution guidelines? Thanks.

Sorry I hadn't seen the guidelines, let me try to give more details.
In W1D5T1, Section 1, Exercise 1 students are asked to complete the function def calculate_cov_matrix(var_1, var_2, corr_coef): and then at the end of the exercise:
###################################################################
## TO DO for students: generate and plot bivariate Gaussian data with variances of 1
## and a correlation coefficients of: 0.8
## repeat while varying the correlation coefficient from -1 to 1
###################################################################
np.random.seed(2020)  # set random seed
variance_1 = 1
variance_2 = 1
corr_coef = 0

# Uncomment to test your code and plot
cov_matrix = calculate_cov_matrix(variance_1, variance_2, corr_coef)
X = get_data(cov_matrix)
plot_data(X)

It's my understanding, but correct me if I'm wrong, that corr_coef can only be in range [-1, 1]. However you can define corr_coeff to be any arbitrary value and calculate_cov_matrix will still give you a result.
I thought the correct behaviour would be for the function to throw an error if the value is outside the valid range, instead of giving an output that I'm not sure how it should be interpreted.
I hope this clarifies what I mean, but do let me know if you need more info.

Isn't calculate_cov_matrix a function that students need to complete?
Unless there's something in the tutorial itself that is going to pass a correlation coefficient outside of [-1, 1] into this function (is a widget doing this?), I don't think we need to worry about making them do rigorous input checking...
Sorry, it's early here and I didn't get much sleep, so I might be missing something.

No I think you're getting it right.
There's nothing in the tutorial itself that uses a corr_coeff out of range, but the exercise encourages the students to play around with corr_coeff to see what the resulting plots look like.
Although the exercise states to use corr_coeff in range[-1, 1]:
## repeat while varying the correlation coefficient from -1 to 1

some of my students decided to play with larger values and where confused by the function's output they got. Both them and myself would've expected to get an error or no results, instead you get values that at first glance appear legit.
As you say, the students need to complete the function themselves, but they're not instructed to enforce that the corr_coeff is in the correct range.
It would be simple to add to the function:
if corr_coeff < -1 or corr_coeff > 1:
    raise ValueError(f'The correlation coefficient is not defined outside the range [-1, 1]. {corr_coeff} was passed instead')

this way there's no risk of confusion if a student accidentally passes an out of range value. In fact, in that case they'd be reminded that corr_coeff is only defined in range [-1, 1].

We can leave the issue open for discussion during post-course revisions. I would be inclined to say that this is a good example of a situation where the Peer Programming approach can help resolve the confusion and lead to a deeper understanding than if the student just encountered an exception.
In general, I don't think we can or should commit to doing the kind of input validation that you would do in production code. But thanks for reporting!


Field names starting with underline is not supported

According to the data modeling documentation  data model field names can start with underline ([A-Za-z_][A-Za-z0-9_]*) but both prisma2 and prisma vscode extension throw error.
The underlined fields are very helpful when you need cross compatibility with MongoDB (e.g. _id)

@HosseinAgha : As a workaround for now i would provide a custom underlying name for the field like this: id String @map("_id")

I made a doc fix PR in case you don't want to support underscore-prefixed field names: https://github.com/prisma/prisma2/pull/365/files (I personally think they should be supported)

As documentation and reality don't match, I would consider this a bug for now.
(We can of course change it to be a feature request if this is after all considered new functionality (that is documented, but not implemented yet) or back to a discussion if is is not clear at all if we actually want this.)

Current behavior confirmed by @pantharshit00 via Slack:

This is a fundamental design decision in Prisma 2, that we are unlikely to change. @map helps you to keep using your existing database design.

You can use Prisma with column or table names starting with an underscore, you will just need to map them to a name that does not start with an underscore:
https://www.prisma.io/docs/concepts/components/prisma-schema/data-model#mapping-model-names-to-tables-or-collections
https://www.prisma.io/docs/concepts/components/prisma-schema/names-in-underlying-database#map-field--column-names
If you use Introspection, Prisma takes care of that automatically for you.
That will indeed require you to use the non underscored version in your application then. Is that a problem?

Hi @janpio thanks for your reply.
Yes, I've read through the documentation and built a proof-of-concept using the map solution, however this doesn't solve my problem. I'm less concerned with the column names in the database, and more concerned with the property names in Javascript.
I'm trying to retrofit Prisma into an existing application that uses _propertyName all over the place: it's our convention to indicate a specific type of field in our application. We expose these properties over our API and it is what our developers are accustomed to. Given that a lot of our codebase is Javascript, there's a high risk that during the retrofit, some of these properties may be incorrectly mapped, which could lead to data not being persisted properly in the database, or our API serving an incorrect response.
Furthermore, we intend to use Prisma alongside our existing NoSQL data store, with which we will continue to use the _propertyName convention. This puts extra cognitive overhead onto developers as they need to consider which datastore they are dealing with for a given entity and therefore which convention to use. This isn't a good developer experience and opens us up to a whole class of errors that I'd prefer to avoid.
The combination of all the above makes adoption of Prisma far more risky and error-prone than I'd like, despite all the other benefits your library provides.
I've considered building some kind of conversion wrapper around the "Delegate" class for each entity that would convert _propertyName -> propertyName before passing data through to Prisma (and vice versa), but this is non-trivial to get working with the correct Typescript definitions. Do you have any other ideas?

No, although I understand your problem I do not have other options available.
I started a conversation internally about this limitation, but as it has been there for 5+ years (this comes from Prisma 1) it made its way into many areas of the product. Removing it will definitely come with tradeoffs and additional validations we need to implement, so even if we figure out all the places where it causes problems, this will definitely be a lot of work. And as honestly not that many people seem to care or be blocekd by it, it will be really hard to prioritize.

Hello @janpio, thanks for sharing the context on this. Perhaps it is just @dabrowne and my team, but this is definitely painful for our incremental adoption of Prisma. I'm surprised to hear that more people haven't been impacted by this. My intuition is that most large applications using typescript & mongo would have tons of instances of ._id throughout. Co-mingling id and _id makes the migration to Prisma much more error prone.
I wonder whether this will become a more frequent issue as using Prisma with mongo becomes more popular.


⚠ DesiTorrents has degraded performance

In e96dd16, DesiTorrents ($DST) experienced degraded performance:

HTTP code: 200
Response time: 2111 ms

Resolved: DesiTorrents performance has improved in af17018.