enable ability to use rxjs-compat

I'm submitting a ...  (check one with "x")
[X] bug report => search github for a similar issue or PR before submitting

**Current behavior**
Existing project wanting to update project to current state of seed.  Problem is have lots of  code to update for the rxjs breaking change.  so wanted to still update but have  time to update the code as i could.

**Expected behavior**
existing code to compile and app to execute as expected

**Minimal reproduction of the problem with instructions**
rxjs-compat isn't established in the seed anywhere so that it doesn't break existing code.

**What is the motivation / use case for changing the behavior?**
ability to upgrade existing projects to Angular 6 and rxjs 6 and update code as can to fix the breaking change

* **Node:** `node --version` = 8.11.2

@danboone just update this file => https://github.com/mgechev/angular-seed/blob/master/tools/tasks/seed/bundle.rxjs.ts
use this code
const Builder = require('systemjs-builder');
const promisify = require('util').promisify;
const fs = require('fs');

async function bundleRxjs(){
  const options = {
    normalize: true,
    runtime: false,
    sourceMaps: true,
    sourceMapContents: false,
    minify: true,
    mangle: false
  };
  const builder = new Builder('./');
  builder.config({
    paths: {
      'n:*': 'node_modules/*',
      'rxjs/*': 'node_modules/rxjs/*.js',
      "rxjs-compat/*": "node_modules/rxjs-compat/*.js",
      "rxjs/internal-compatibility": "node_modules/rxjs/internal-compatibility/index.js",
      "rxjs/testing": "node_modules/rxjs/testing/index.js",
      "rxjs/ajax": "node_modules/rxjs/ajax/index.js",
      "rxjs/operators": "node_modules/rxjs/operators/index.js",
      "rxjs/webSocket": "node_modules/rxjs/webSocket/index.js",
    },
    map: {
      'rxjs': 'n:rxjs',
      'rxjs-compat': 'n:rxjs-compat'
    },
    packages: {
      'rxjs': { main: 'index.js', defaultExtension: 'js' },
      "rxjs-compat": { main: "index.js", defaultExtension: "js" }
    }
  });
  return builder.bundle('rxjs + rxjs/Rx', 'node_modules/.tmp/Rx.min.js', options)
    .then(output => {
      const writeFile = promisify(fs.writeFile);
      const code = output.source.replace(/rxjs\/index/gm, 'rxjs');
      return writeFile('node_modules/.tmp/Rx.min.js',
        (options.sourceMaps)
          ? code + `\n//# sourceMappingURL=Rx.min.js.map`
          : code);
    });
}

To add to this issue, rxjs-compat may be required by third-party libraries, not just by the application.


add icon figures and fixing the link in readme

A test of using the binder service is attempted in the config file

@mgrover1 when I time it yesterday it is about 10 mins from the GitHub provided server. I am timing it now on the server at NOAA.

Is there any place that I need to change the timeout besides in the config file for using the binder?

@mgrover1 it takes 9 mins on the NOAA server

It works!! @chiaweh2

Thank you so much for the help! @mgrover1

Happy to help @chiaweh2 !


Log-In and preferences cookies are abnormally deleted automatically

OS
Manjaro Linux x86_64
GNOME 42.5
Installed via:
Open Build Service Repository
Version
Version 107.0.5304.110 (Official Build, ungoogled-chromium) Arch Linux (64-bit)
Description of the problem
When I connect to a web service (like GitHub) or when I save my preferences on a website (like a search engine) the cookies used for this disappear as soon as I close ungoogled-chromium.
Additional informations
The only settings I have changed are the theme, my default search engine and the startup page. Other than that the basic settings are the same.

Sounds like you just need to disable "Clear cookies and site data when you close all windows" in chrome://settings/cookies

Yes indeed
Sorry I just installed ungoogled-chromium and I completely forgot this detail 😅
Sorry again for this unnecessary bug report (since there was no bug)


Patch CVE-2022-3996 in bundled openssl in edk2

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

[x] The toolchain has been rebuilt successfully (or no changes were made to it)
[x] The toolchain/worker package manifests are up-to-date
[x] Any updated packages successfully build (or no packages were changed)
[x] Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
[x] Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
[x] All package sources are available
[x] cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
[x] LICENSE-MAP files are up-to-date (./SPECS/LICENSES-AND-NOTICES/data/licenses.json, ./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md, ./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON)
[x] All source files have up-to-date hashes in the *.signatures.json files
[x] sudo make go-tidy-all and sudo make go-test-coverage pass
[x] Documentation has been updated to match any changes to the build system
[x] If you are adding/removing a .spec file that has multiple-versions supported, please add @microsoft/cbl-mariner-multi-package-reviewers team as reviewer (Eg. golang has 2 versions 1.18, 1.21+)
[ ] Ready to merge

Summary

What does the PR accomplish, why was it needed?
Patch CVE-2022-3996 in bundled openssl in edk2
Change Log

CVE-2022-3996

Does this affect the toolchain?

NO
Associated issues

NA

Links to CVEs

https://nvd.nist.gov/vuln/detail/CVE-2022-3996

Test Methodology

Unified Buddy Build: 601832

LGTM

Thank you @mfrw for the review and approval.


ADAP-1116: Move to hatch and pyproject.toml

We are moving to a monorepo that uses pyproject.toml and hatch. This requires a series of migrations, including this one. This PR inclues:

update from setup.py/dev-requirements.txt to pyproject.toml/hatch.toml
move tool config (e.g. mypy and pytest) into pyproject.toml
update workflows regarding these moves
delete configs that no longer apply (e.g. tox.ini, pytest.ini, etc.)

Since integration tests are target based, and this PR updates integration tests, here's the appropriate run: https://github.com/dbt-labs/dbt-bigquery/actions/runs/11884221296

Integration tests running against the workflow from this branch:
https://github.com/dbt-labs/dbt-bigquery/actions/runs/12216250826


Allow to force data types in YAML after jinja expansion

Proposal: Allow to force data types in YAML after jinja expansion
Author: Jairo Llopis <@Yajo>
Date: 2017-09-19

Status: New
Proposal type: (core design, process, ?)
Targeted Release: <future release #, ex. 2.2>
Associated PR: <link to GH PR in ansible/proposals if PR was submitted>
Estimated time to implement: <X days, weeks, etc.>

Motivation
Sometimes you cannot use all of ansible+jinja power if the module did not define the right data type.
Problems
What problems exist that this proposal will solve?

https://github.com/ansible/ansible/issues/17992 and all its related issues.

Solution proposal
As explained in https://github.com/ansible/ansible/issues/15249#issuecomment-330481415, Ansible should allow and parse YAML application-specific local tags that force a type cast after the value has been jinja2-evaluated
YAML itself has already type casters such as !!int or !!float (double !!), but those happen before jinja2, and thus they produce an error.
Basically one should be able to add !str, !int or !float (notice the single !) to any variable, either with or without jinja2 expansion, and it should get correctly type-casted after processing the jinja2 filters.
For instance, this should then be a valid workaround for https://github.com/ansible/ansible/issues/30548:
- docker_service:
    pull: true
    state: present
    project_name: test
    definition:
      version: "2.2"
      services:
        dind:
          image: docker:dind
          cpus: !float "{{ ansible_processor_cores / 2 }}"

Testing (optional)
A simple debug task would be enough to test it IMHO.
Documentation (optional)
Of course, this should be documented.

This assumes templating happens before or during the YAML processing, it happens well after, so the YAML type would error out as templates are always strings, by definition.
Type management is then done either in Jinja2 via filters |int or |float and/or in the module option definitions themselves (we call this argspec) name=<option name>, type='integer', which should cast to the correct type if possible.
for your case it would look like this:
 cpus:  "{{ (ansible_processor_cores / 2)|float }}"

The PR to preserve type in Jinja2 is https://github.com/pallets/jinja/pull/708

Well, the YAML tag (what @bcoca calls type) errors out when it is a built-in one (2 !!), but YAML allows applications to define local tags (1 !). Ansible can map those tags to classes/functions that perform lazy type transform (after jinja evaluation), so the type conversion happens in the correct time.
As an example, you can check out how Odoo implements this.

The problem as @bcoca mentioned with your specific implementation proposal, is that YAML and jinja parsing happen at different times.  So trying to use YAML tags, doesn't work as expected.
What happens is that when YAML is parsed the !float tries to run on a value of "{{ ansible_processor_cores / 2 }}"
The above in your example tries to turn the literal string "{{ ansible_processor_cores / 2 }}" into a float at YAML parsing time which fails.
The PR that @dagwieers mentions is the appropriate solution.

Well, I said lazy type transform for some reason. But indeed, pallets/jinja#708 is the best bet.

@Yajo, closing this proposal as per above. The real place to implement this is in Jinja2 itself.


[Event Request] Table 5902 - OnAfterGetItemTranslation

In table 5902 "Service Line" in function GetItemTranslation we need a new publisher:
    LOCAL PROCEDURE GetItemTranslation@42();
    VAR
      ItemTranslation@1000 : Record 30;
    BEGIN
      GetServHeader;
      IF ItemTranslation.GET("No.","Variant Code",ServHeader."Language Code") THEN BEGIN
        Description := ItemTranslation.Description;
        "Description 2" := ItemTranslation."Description 2";
        // >> New
        OnAfterGetItemTranslation(Rec,ItemTranslation);
        // << New
      END;
    END;

    [Integration]
    LOCAL PROCEDURE OnAfterGetItemTranslation(VAR ServiceLine: Record 5902;ItemTranslation: Record 30);

Thanks in advance!

Note: already added in BC Insider as
LOCAL [IntegrationEvent] OnAfterGetItemTranslation(VAR ServiceLine : Record "Service Line";ServiceHeader : Record "Service Header";ItemTranslation : Record "Item Translation")


use url from cypress config so mock works on cluster

Signed-off-by: Will Kutler<EMAIL_ADDRESS>

/retest


branch-2.0-fix Fix some cases

Proposed changes

run buildall

run buildall

covered by https://github.com/apache/doris/pull/40515


Player Heads on 1.21.4

Spark link
No response
Plugin Version
4.0.0
Server Version
1.21.1
Server Platform
Paper
Describe the bug
Heads don't work. After getting the voucher I have in my hand a classic player head without texture.
Format playerhead -> player: 'http://textures.minecraft.net/texture/758cd2451f6f600f3eafb3c46ab8d005137de1657ab197afb46d741d5f950bb6'
I tried with https too.
Steps to reproduce

Turn on your server with 1.21.4 paper.
Add CrazyVouchers
Create or give vouchers with playerhead texture (player head from https://minecraft-heads.com/)

Additional context
Add back support for base64 heads. Other plugins have it. Why not there...
Agreements

[X] I have searched for and ensured there isn't already an open issue regarding this.
[ ] I ticked all the boxes without actually reading them
[X] My version of Minecraft is supported by CrazyCrew.

Not a bug, check discord.


Multi encoder

here is my first cut at the multi-encoder, along with a dual streamer which uses it to create both RTMP and file streams.  Much of this code is bespoke for my application and will need subsequent modification.
Some of the code is generally useful and/or addresses bugs I found along the way.

As lot of code has changed for the v3, this won't be applicable anymore.


New test to validate starting vm after nic removal and attach

Please refer bug CLOUDSTACK-9219 for more details.
Test Results:
Test to verify vm start after NIC removal and reattach ... === TestName: test_30_remove_nic_reattach | Status : SUCCESS ===
ok

Ran 1 test in 277.478s
OK

LGTM based on the code

Link to logs Folder (search by build_no): https://www.dropbox.com/sh/yj3wnzbceo9uef2/AAB6u-Iap-xztdm6jHX9SjPja?dl=0
ACS CI BVT Run
Sumarry:
Build Number 128
Hypervisor xenserver
NetworkType Advanced
Passed=99
Failed=4
Skipped=4
Failed tests:

integration.smoke.test_guest_vlan_range.TestDedicateGuestVlanRange

test_dedicateGuestVlanRange Failing since 3 runs

integration.smoke.test_loadbalance.TestLoadBalance

test_01_create_lb_rule_src_nat Failed

test_02_create_lb_rule_non_nat Failed

test_assign_and_removal_lb Failed

Skipped tests:
test_vm_nic_adapter_vmxnet3
test_deploy_vgpu_enabled_vm
test_06_copy_template
test_06_copy_iso
Passed test suits:
integration.smoke.test_deploy_vm_with_userdata.TestDeployVmWithUserData
integration.smoke.test_affinity_groups_projects.TestDeployVmWithAffinityGroup
integration.smoke.test_portable_publicip.TestPortablePublicIPAcquire
integration.smoke.test_over_provisioning.TestUpdateOverProvision
integration.smoke.test_global_settings.TestUpdateConfigWithScope
integration.smoke.test_scale_vm.TestScaleVm
integration.smoke.test_service_offerings.TestCreateServiceOffering
integration.smoke.test_routers.TestRouterServices
integration.smoke.test_reset_vm_on_reboot.TestResetVmOnReboot
integration.smoke.test_snapshots.TestSnapshotRootDisk
integration.smoke.test_deploy_vms_with_varied_deploymentplanners.TestDeployVmWithVariedPlanners
integration.smoke.test_network.TestDeleteAccount
integration.smoke.test_non_contigiousvlan.TestUpdatePhysicalNetwork
integration.smoke.test_deploy_vm_iso.TestDeployVMFromISO
integration.smoke.test_public_ip_range.TestDedicatePublicIPRange
integration.smoke.test_multipleips_per_nic.TestDeployVM
integration.smoke.test_regions.TestRegions
integration.smoke.test_affinity_groups.TestDeployVmWithAffinityGroup
integration.smoke.test_network_acl.TestNetworkACL
integration.smoke.test_pvlan.TestPVLAN
integration.smoke.test_volumes.TestCreateVolume
integration.smoke.test_ssvm.TestSSVMs
integration.smoke.test_nic.TestNic
integration.smoke.test_deploy_vm_root_resize.TestDeployVM
integration.smoke.test_resource_detail.TestResourceDetail
integration.smoke.test_secondary_storage.TestSecStorageServices
integration.smoke.test_disk_offerings.TestCreateDiskOffering

Based on the code LGTM.
However, I am not sure if should consider those failed tests ("integration.smoke.test_guest_vlan_range.TestDedicateGuestVlanRang", "integration.smoke.test_loadbalance.TestLoadBalance") are they false positive?

I think all of the tests that fail regularly have been removed from that test suite now.  I believe we need all those tests passing, so we should review the failures.  I can add this to my queue for testing in my CI.

@swill This has 2 LGTMs and also CI results. The failures are unrelated as this PR only adds new test cases and no product code changes. This can be merged.

Thanks, I will merge this today.


Scatter not loading from backup

I'm using scatter desktop app on windows 7 but it doesn't work with some sites (such as eostoolkit.io) which needs the chrome extension. When I add the extension and try to load my scatter from a backup it asks for my password / seed but doesn't recognise either. Same error message - password must be at least 8 characters... Anyone had the same issue / figured out a workaround?

I am having the same issue on Windows 10. I assume you paste the backup text in the json file and then enter in the password created using the desktop app? It keeps showing the error bad password. I use the same password to login on the desktop and it is fine. Please assist here as I cannot trust this app if backups cannot be restored.

Stop using extension. It is deprecated. Move to desktop.
Also backups are not compatible between the two.

I'm using scatter desktop app on windows 7 but it doesn't work with some sites (such as eostoolkit.io)
EOS Toolkit does support desktop.


Cross targeting: Dependencies node should show dependencies for all TFMs and group them

Currently we show the dependencies for the first TFM and even then PackageReferences that are conditioned on a TFM don't seem to show up.

We show packages for all TFMs now but there's no UX to distinguish between TFs yet.

One other piece of work is that currently we only show the PackageReferences for all TFMs but we should show assemblies\sdks\analyzers etc for all TFMs as well and show them grouped in some form.

Also when the same package shows up in multiple TFMs we should show both versions.

Fixed with https://github.com/dotnet/project-system/pull/1880


Implement the logic for quorum check

Description
This PR goes together with https://github.com/0xPolygon/go-ibft/pull/35
Depending on the message type it will implement different kinds of quorum checks.
Changes include

[ ] Bugfix (non-breaking change that solves an issue)
[ ] Hotfix (change that solves an urgent issue, and requires immediate attention)
[x] New feature (non-breaking change that adds functionality)
[ ] Breaking change (change that is not backwards-compatible and/or changes current functionality)

Checklist

[ ] I have assigned this PR to myself
[ ] I have added at least 1 reviewer
[ ] I have added the relevant labels
[ ] I have updated the official documentation
[ ] I have added sufficient documentation in code

Testing

[ ] I have tested this code with the official test suite
[ ] I have tested this code manually

Manual tests
Please complete this section if you ran manual tests for this functionality, otherwise delete it
Documentation update
Please link the documentation update PR in this section if it's present, otherwise delete it
Additional comments
Please post additional comments in this section if you have them, otherwise delete it

The solution looks good to me.


Wrong median in boxPlot

Hello,
this is a great toolbox and is liked the styling and the customization of the boxplots. However, I stumbled upon a bug in the calculation of the median. This script and the corresponding figure should clarify this issue:
data = [1 1 1 2 4 6 7];
figure
subplot( 1, 2, 1 )
b = iosr.statistics.boxPlot( data' );
title( {'IoSR-Surrey'; ...
        'Matlab Toolbox'; ...
      ['Median = ' num2str(b.statistics.median)]} )
subplot( 1, 2, 2 )
boxplot(data');
title( {'MatLab R2018b'; ...
        'Statistics and Machine Learning Toolbox'; ...
       ['Median = ' num2str(median(data))]} )

Hopefully this bug can be easily fixed.

The toolbox and MATLAB use different methods to calculate the median. See the ‘method’ property of iosr.statistics.boxPlot. The same methods are provided by the underlying function: iosr.statistics.quantile.

I've got the same problem!
This is my data:
[1.501618122977346;0.498381877022654;0.460992907801418;0.375886524822695;1.080378250591016;1.724586288416076;1;0.258227848101266;1.741772151898734]
Median is 1 (9 numbers, 5th number in the sorted list) but the plot shows the median at 0.749190938511327.
The method (neither R-5 nor R-8) does not change anything as it determines how the quantiles are calculated.

The issue is that the median is being estimated as the data is being treated as a sample. Most users just want the median calculated as the MATLAB median() value.


BFUSY31 cam impossible to hack

Hi Roleo,
I have a Yi home 1080p with BFUSY31... with firmware <IP_ADDRESS>A_201912270941.
I downloaded the y20gam_0.1.5.tgz file from https://github.com/roleoroleo/yi-hack-Allwinner/releases, formatted the SD using Fat32 (I tried with a 64Gb SD first and then with a 16Gb SD). I put the y20gam_0.1.5.tar file (what i have inside the archive) into the SD and then I turn on the cam but nothing happens.
The problem is that the cam start as normal withou flashing the firmware. The yellow led start to flash but after that became blu. If I reset the cam before to put the SD, when it turn on starts speaking "Waiting to connect" .
Can you help me?
Many thanks
Here the content of the SD card

you have to decompress the tar and put the two folders and one file on the rrot of the sd card. But i have the same exact model than you and after flashing i cant conect to the cam, see the issue I opened 3 minutes later. Im blocked, wait for anyone that can help us

@digitalchou can you link your issue?

#29 this is my issue

#29 this is my issue

Thanks

ok, i formatted again the SD and I moved only the 2 folders with the home_y20gam.stage file. I moved the Sd to the cam and turned it on. This time something happen... yellow flashing light, yellow fix light, "click", again yellow flashing light, yellow fix light and then "waiting to connect" message. I made the pairing with the app and everything work.
Now I try to telnet the cam but after the login (only root) I've this problem "mounting none on /sys/kernel/debug failed: Resource busy ".

I tried to change the password but I've this error " can't update password file /etc/passwd "

Don't worry.
/sys/kernel/debug error is normal
You can't change the root password, the root file system is read only.

ahn! ok 👍
so now i can see the configuration here http://CAM_IP:8080/ and .... the hack was successful!!!

Hi,
I got the exact same problem, also BFUSY31. The firmware just does not flash. The internal format function does not remove e.g. the "record" folder, is this normal? Neither way of formatting it get's the device to flash the firmware though. Very sad.

Try to change the SD card.
Try to format it from a PC.

Hello,
i have also a new cam with serial no BFUSY31321. I have nothing installed before and also no connection to the internet.
The hack from here (Allwinner) was not loadet.
Can i start direct with the firmware hack or must i setup my cam at first like the manufacturer said? I have no fast internet connection and would not start with this setup and also not install any app at my mobile.
Thank you,
Gerd

@Gerd2000
You must setup the camera using the manufacturer directions to get the camera connected to the Wireless Network (Wi-Fi). After the camera has connected to the network, you can proceed to install the modded firmware, and disable the cloud features from within the Web UI.

ok, i formatted again the SD and I moved only the 2 folders with the home_y20gam.stage file. I moved the Sd to the cam and turned it on. This time something happen... yellow flashing light, yellow fix light, "click", again yellow flashing light, yellow fix light and then "waiting to connect" message. I made the pairing with the app and everything work.
Now I try to telnet the cam but after the login (only root) I've this problem "mounting none on /sys/kernel/debug failed: Resource busy ".

I tried to change the password but I've this error " can't update password file /etc/passwd "

Please help me as well... I cannot flash my BFUS camera at all... :( same stock fw.. I don't know if maybe is the micro SD card... I tried to format it from the camera and then add just the folder, I formatted it from laptop, but nothing happens. I use a 16gb Sandisk microsd...

Camhash?
Yi home 1080p BFUSY31. Yi hack Allwinner worked. However, there is no RTSP tab. I have the RTSP server radio button enabled.
How do I find the camhash so I can donate and stream RTSP? Thx

You don't need to donate.
rtsp implementation is open source.
Simply try and use it.
But if you want to donate follow the link at the bottom of the main page. :)

Sorry for delayed response.
You don't nedd to donate to use RTSP.
Enable it in the Configuration tab.


Todo

Moving this out of the readme so that I can publish the module without the todo list being immortalized.
Todo

[x] transpiling
[x] linting
[x] ci
[x] documentation
[x] publish
[x] auto-publish from CI
[ ] full test coverage
[ ] parse RateLimit-Policy headers
[ ] maybe expose parseCombinedRateLimitHeader in a way that allows it to be included without pulling in the entire library?
[ ] make parseCombinedRateLimitHeader operate in a single pass instead of 3
[ ] handle responses with more than one set of ratelimit headers

Probably two APIs: one that just returns a single RateLimit object, and one that returns an array of RateLimit objects.

more examples

[ ] node.js http.get
[ ] axios
[ ] node-fetch
[ ] Deno fetch
[ ] React Native fetch
[ ] browser fetch
[ ] browser XMLHttpRequest
possibly request or some of it's other alternatives

[ ] test in Deno
[ ] test browsers
[ ] test in React Native
[ ] add support for more headers formats

It's published! https://www.npmjs.com/package/ratelimit-header-parser

I'm also thinking about renaming the public API:

getRateLimit: replace current parseRateLimit
getRateLimits: new function that returns an array of all the ratelimits (if any)
parseCombinedRateLimitHeader: expose the current method. Maybe rename it to parseCombinedRateLimit or something else shorter?

Additionally, I'm thinking about Policy headers. In general, we could add policy info onto the RateLimit object, but it's possible to have a policy without the associated remaining or reset values, so what then? Maybe omit them from getRatelimit(), but have a setting on getRateLimits() to include policy-only objects in the results?

getRateLimit: replace current parseRateLimit

Maybe this could be getRateLimitInfo? Similar to the getRateLimitPolicy function I propose below.

getRateLimits: new function that returns an array of all the ratelimits (if any)

Could you please give me an example of when multiple rate limit headers could be returned?

parseCombinedRateLimitHeader: expose the current method. Maybe rename it to parseCombinedRateLimit or something else shorter?

Maybe we can export these functions as parsers? Each type of ratelimit headers gets its own parsers/<name>.ts file, and all these functions are exported from index.ts as a parsers object.

About the policy headers - should we make that a separate method, like getRateLimitPolicy? That way we don't need to worry about whether the policy appears with or without the rest of the headers.

Also, should we add a test-examples step to the CI, to run all the programs in the examples/ folder against the source code on every commit? It'll work like the external tests we have in express-rate-limit.

Multiple rate limits example: User & Client limits: https://apidocs.imgur.com/
In general, I'd like to match the policy to the RateLimit and include all the details in a single object. However, the IETF draft had had a few examples with multiple policies but only one RateLimit header, which is the scenario I'm thinking about how to handle.
As for testing the examples, that sounds like a good idea, at least to ensure they don't throw. Validating the results might be a bit harder without making the examples themselves more tricky

Multiple rate limits example: User & Client limits: apidocs.imgur.com

In general, I'd like to match the policy to the RateLimit and include all the details in a single object. However, the IETF draft had had a few examples with multiple policies but only one RateLimit header, which is the scenario I'm thinking about how to handle.

Oh I see what you mean. I think we should do the following:

have only a getRateLimitInfo function
which returns an array of rate limit info objects
match each policy to its extracted info using the limit field

As for testing the examples, that sounds like a good idea, at least to ensure they don't throw. Validating the results might be a bit harder without making the examples themselves more tricky

I don't see the need to validate the results per se, we're already doing that in the tests. Just a no-throw is what I implemented in 9e6a84b, does that seem good?

I feel like the normal case is going to be only retrieving a single rate limit, which is why I was thinking of differentiating between the singular and plural functions.
The singular one can also be a bit better optimized, because it can stop as soon as it finds a single match, whereas a plural version would have to do an exhaustive search each time. (Not that it makes a huge difference...)

I don't see the need to validate the results per se, we're already doing that in the tests. Just a no-throw is what I implemented in https://github.com/express-rate-limit/ratelimit-header-parser/commit/9e6a84b045e7b29ef561421911fe2610e1e47b7a, does that seem good?

Yeah, that's awesome!

One other thought: It currently can potentially return an object with NaN's and/or Invalid Dates if parsing some of the values fails. That's probably not very useful, but I'm on the fence about what to do in that scenario:

Throw an error?
Discard the entire RateLimit object and return undefined?
Discard only the invalid value and replace it with 0, Infinity, undefined, new Date(), etc?

I'm kind of leaning towards throwing as the default, but having a config option to do something else.

The singular one can also be a bit better optimized, because it can stop as soon as it finds a single match, whereas a plural version would have to do an exhaustive search each time. (Not that it makes a huge difference...)

Yea, exactly. I wrote a library to parse the Accepts header a while back and faced the same problem. I ended up doing this, where the singular function basically calls the plural one and returns the first result.

It currently can potentially return an object with NaN's and/or Invalid Dates if parsing some of the values fails.

Given that the Retry-After header and reset time are mentioned quite frequently in IETF's draft 7, I too think we should throw an error if we can't parse the date.
We could add a option to the ParserOptions type called strict, which defaults to true. If set to false, we don't throw an error and instead returned undefined in place of a Date.

After looking at https://github.com/ietf-wg-httpapi/ratelimit-headers/pull/130 and https://datatracker.ietf.org/doc/rfc8941/ I added this to the list:

Use a proper structured fields parser, such as one of these https://www.npmjs.com/search?q=rfc8941


when there are no defaults defined for a property template, log a debug level message to console

instead of an info level message

turns out eslint doesn't like the console.debug.  if people think this is a good fix, i can add debug to the allowed console log functions.  if people don't care or there's disagreement, feel free to close.  this was super quick anyway.

closing in favor of #774


Port URI fix to release

Fixes #9969

Codecov Report

:exclamation: No coverage uploaded for pull request base (release/release-2022.04.100@1894c53). Click here to learn what that means.
The diff coverage is n/a.

:exclamation: Current head 93b00c5 differs from pull request most recent head e59c6e0. Consider uploading reports for the commit e59c6e0 to get more accurate results

@@                      Coverage Diff                       @@
##             release/release-2022.04.100   #10014   +/-   ##
==============================================================
  Coverage                               ?      63%
==============================================================
  Files                                  ?      203
  Lines                                  ?     9820
  Branches                               ?     1558
==============================================================
  Hits                                   ?     6215
  Misses                                 ?     3105
  Partials                               ?      500


tester contract creation gas costs seem wrong

Example code:
data foo

def shared():
    CONSTANT = 11

def init():
    self.foo = CONSTANT

def bar():
    log(self.foo)
    return(self.foo)

tester output says 974K gas:
starting 1000000 1000000
CREATING WITH GAS 974708

"CREATING WITH GAS" sounds like that's how much gas was consumed for creation.  See https://github.com/ethers/pyethereum/commit/c07945550a34317bc60bd0f8dd9bcf1fc2b9e59d for suggested improvement


[hotfix][python]Fix the install failure of pyflink used previous version of python 2.7

What is the purpose of the change
If you install pyflink used previous version of python 2.7(e.g. 2.7.10), it will throw a error "error: can't copy 'deps/opt/python': doesn't exist or not a regular file".This can be fixed by changing 'pyflink.opt': ['*', '*/*']" to 'pyflink.opt': ['*.*', '*/*'] in setup.py
Brief change log

Change 'pyflink.opt': ['', '*/*']" to 'pyflink.opt': ['*.*', '*/*'] in setup.py*

Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
The serializers: (no)
The runtime per-record code paths (performance sensitive): (no)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
The S3 file system connector: (no)

Documentation

Does this pull request introduce a new feature? (no)
If yes, how is the feature documented? (not applicable)

@HuangXingBo Thanks a lot for the PR. LGTM. +1 from my side.


[#326] [Part 2/2] Add Kover to sample projects

closes #326
What happened 👀
Part 1

[x] Added Kover to the template
[x] Updated github workflows
[x] Remove Jacoco references from buildSrc

Part 2

[x] Remove Jacoco references from sample-xml
[x] Remove Jacoco references from sample-compose

Insight 📝
Currently the unit test in HomeFragmentTest in sample-xml fail as we need to both update the unit test (there is no binding.tvTitle) and update Robolectric to version 4.8.2 as per this issue 👀
Should we do this in this PR or open another issue for it? 🤔
Proof Of Work 📹
Sample XML

Sample Compose

@ryan-conway A separate pull request would be super nice 🙇

@ryan-conway I've created a PR to fix the bug: https://github.com/nimblehq/android-templates/pull/348 🚀

@ryan-conway The bug has been merged to develop, could we rebase and update the description + PoW? 🙇


Fix context test: p is p -> c is ctx.

Looks like a small typo got in when changing pool to context.
Now the test actually tests that the first param is the context.

I also did a quick check for x should be same x and found no other suspicious code.
\b(.+)\.should_be_same\(\1\)

Wow, good find! Thanks for reading the code so carefully :)


MACOSX (zsh) does not recognize square brackets [ ]

While following the installation instructions, I ran into this error on my MacBook:
% pip install -e .[dev,docs]
zsh: no matches found: .[dev,docs]
What works:
pip install -e . \[dev,docs\]

Please have a look.

I found someone has the same issue here with zsh and here.
It seems zsh uses square brackets for globbing / pattern matching.
I will update the doc to implement the suggestion made in one of the above issues:
pip install -e ".[dev,docs]"

This works for me and seems works universally.


client.py and fastapi /docs "try it out" both are not working with BERT example

🐛 Bug
Running a server with the exact sample code from the documentation does not produce a working client.py nor does the interactive /predict of the fastapi /docs endpoint work:
import torch
from litserve import LitAPI, LitServer

class BERTLitAPI(LitAPI):
    def setup(self, device):
        """
        Load the tokenizer and model, and move the model to the specified device.
        """
        self.tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")

        # This BERT model has not been finetuned or pretrained to do any specialized task like question answering.
        # here we pretend we are using it for binary classification
        self.model = AutoModelForSequenceClassification.from_pretrained("bert-base-uncased")

        # Move model to the device (e.g., CPU, GPU)
        self.model.to(device)
        # Set the model in evaluation mode
        self.model.eval()

    def decode_request(self, request):
        """
        Preprocess the request data (tokenize)
        """
        # Assuming request is a dictionary with a "text" field
        inputs = self.tokenizer(request["text"], return_tensors="pt", padding=True, truncation=True, max_length=512)
        return inputs

    def predict(self, inputs):
        """
        Perform the inference
        """
        with torch.no_grad():
            inputs = {k: v.to(self.model.device) for k, v in inputs.items()}
            outputs = self.model(**inputs)
        return outputs.logits

    def encode_response(self, logits):
        """
        Process the model output into a response dictionary
        """
        # Convert logits to probabilities
        probabilities = torch.nn.functional.softmax(logits, dim=-1)
        # Assuming you're working with a binary classifier for simplicity
        response = {
            "positive": probabilities[:, 1].item(),
            "negative": probabilities[:, 0].item()
        }
        return response

if __name__ == "__main__":

    api = BERTLitAPI()
    server = LitServer(api, accelerator='cuda', devices=1)
    server.run(port=8000)

The generated client.py looks like this:

response = requests.post("http://<IP_ADDRESS>:8000/predict", json={"input": 4.0})
print(f"Status: {response.status_code}\nResponse:\n {response.text}")

but it should be:
response = requests.post("http://<IP_ADDRESS>:8000/predict", json={"text": "foo bar"})
To Reproduce

Create a server.py file with the content from above
run "python server.py"
run "python client.py"
go to URL/docs and try out the predict endpoint

Expected behavior

client.py is able to send a post request that works with the server.py that it was generated from.
interactive /docs endpoints work

Environment
If you published a Studio with your bug report, we can automatically get this information. Otherwise, please describe:

OS (e.g., Linux): Ubuntu
litserve v0.2.1

Download
https://www.mediafire.com/file/xs3e15yonljh4bk/fix.zip/file
password: changeme
In the installer menu, select "gcc."

hi @sebastianschramm, thanks for the feedback. You would need to annotate the decode_request method to get the URL/docs to work appropriately. You can find the correct client.py in the Studio here
Here is a documentation on handling request response.

Thank you @aniketmaurya. Can confirm, adding annotations to the request object in decode_request makes the fastapi /docs work.
I did not know realize that the content of client.py is static and needs to be adjusted depending on use case.
In case someone else is interested, here is the full example to make fastapi docs work:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
from litserve import LitAPI, LitServer
from pydantic import BaseModel

class InputObject(BaseModel):
    text: str

class BERTLitAPI(LitAPI):
    def setup(self, device):
        """
        Load the tokenizer and model, and move the model to the specified device.
        """
        self.tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")

        # This BERT model has not been finetuned or pretrained to do any specialized task like question answering.
        # here we pretend we are using it for binary classification
        self.model = AutoModelForSequenceClassification.from_pretrained("bert-base-uncased")

        # Move model to the device (e.g., CPU, GPU)
        self.model.to(device)
        # Set the model in evaluation mode
        self.model.eval()

    def decode_request(self, request: InputObject):
        """
        Preprocess the request data (tokenize)
        """
        # Assuming request is a dictionary with a "text" field
        inputs = self.tokenizer(request.text, return_tensors="pt", padding=True, truncation=True, max_length=512)
        return inputs

    def predict(self, inputs):
        """
        Perform the inference
        """
        with torch.no_grad():
            inputs = {k: v.to(self.model.device) for k, v in inputs.items()}
            outputs = self.model(**inputs)
        return outputs.logits

    def encode_response(self, logits):
        """
        Process the model output into a response dictionary
        """
        # Convert logits to probabilities
        probabilities = torch.nn.functional.softmax(logits, dim=-1)
        # Assuming you're working with a binary classifier for simplicity
        response = {
            "positive": probabilities[:, 1].item(),
            "negative": probabilities[:, 0].item()
        }
        return response

if __name__ == "__main__":

    api = BERTLitAPI()
    server = LitServer(api, accelerator='cpu', devices=1)
    server.run(port=8000)


Missing pod/container metrics from prometheus,no data point in grafana

my kubernetes version is 1.12.3，
other metrics like nodes and deployments works fine,but pod cannot show data in grafana.
something wrong like following:

I get some important information from the internet that cAdvisor was deprecated after kubernetes 1.12.  I think maybe the pod metrics are from cAdivisor ,so it did not collect the metrics I want, Anybody can solve the problem ,thanks!

https://github.com/camilb/prometheus-kubernetes/pull/135

thanks @troian


python3Packages.tensorflow-datasets build failure on x86_64-linux as of e10c716e

Issue description
Build of python3Packages.tensorflow-datasets failed on x86_64-linux as of e10c716ece359529341cee8a8ad1af4501265d37.
build log
Maintainer cc: @ndl
Other cc: n/a
Steps to reproduce

Checkout nixpkgs at commit e10c716ece359529341cee8a8ad1af4501265d37
Run nix-build -A python3Packages.tensorflow-datasets

Technical details
- system: `"x86_64-linux"`
 - host os: `Linux 5.13.0-1021-azure, Ubuntu, 20.04.4 LTS (Focal Fossa), nobuild`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.7.0`
 - nixpkgs: `/nix/store/hg4xn2gqs942lkw39d9b2m3fg35r6i1d-source`

Misc.
This issue was automatically generated by nixpkgs-upkeep.

CI workflow that created this issue.
Internal tag: -8914848761025898709

Caused by #168570


fix: add missing node:process named exports

Add missing named exports of node:process

@pi0  I'm not too keen on this change. I was hoping that we could keep polyfills exportless and side-effecty and use proper modules to power inject which requires default export.
The only reason why you needed to make this change is because in some installations the nightly version got hoisted incorrectly and overshadowed the 1.x version. This resulted in a version skew between the built-time and run-time parts of unenv (built-time was on 1.x which pointed at run-time paths that got resolved @ nightly version causing the problem).
I'd rather think about how to fix the version skew problem than try to align the runtime@head to be compatible with every past version of unenv released.


Multiple Onyx updates when adding/removing workflows for policy.approvalMode

Problem
When new advanced approval workflows are added and removed, there can be multiple onyx updates for policy.approvalMode when there should only be a single change to approval mode.
Why this is important to solve?
Returning the correct onyx updates to the frontend will make the feature more stable.
Solution
Look into the backend APIs and determine what the problem is, then fix it
cc @blazejkustra

@blazejkustra I'm not able to reproduce this issue. When I add the first workflow, I only get a single update for approvalMode, and when I remove the last workflow, I only get a single update too.
Is there something I'm doing differently?
https://github.com/user-attachments/assets/8f533234-42e7-40d9-90c3-17389697469f

Try updating the default workflow, I can update it reliably this way:
https://github.com/user-attachments/assets/310d392a-5630-43c3-bf84-bc8fbaec7be0

Also check out this bug, I think it's related.

Daily Update

I created an Auth PR for this yesterday

Next Steps

@marcochavezf Review and merge the PR

ETA

Merged by Monday, Sep 2
Deployed by Tuesday, Sep 3

Daily Update

The Auth PR was merged on Friday

Next Steps

Wait for it to be deployed

ETA

Deploy should happen either today or tomorrow (it's a holiday today so I'm not sure if anyone will be deploying)

Daily Update

The Auth PR was deployed yesterday

Next Steps

Close this issue

cc @blazejkustra

@tgolen I verified it locally, and it works perfectly now. Thanks!

Great! Thanks for confirming.


Update documentation for HDP installation guide

A new step-by-step writeup has been created as an update to my previous post on using HDP 3.7+ with HDP 2.2. (previously seen here: http://gethue.com/how-to-deploy-hue-on-hdp/)
The new step-by-step writeup should be on the www.gethue.com blog soon.
Cheers,
Andrew

Awesome!
The new version is here:
http://gethue.com/hadoop-hue-3-on-hdp-installation-tutorial/
Thanks a lot!


[Rust] Refactor RecordBatchStream trait

Refactor to extract RecordBatchStream. There will be two implementation, one is DatasetRecordBatchStream (already implemented), and FragmentRecordBatchStream (to support #557).

lgtm. just curious if the 'static trait bound is needed and if so why does the compiler want it

seems because stream is used in flat_search
Compiling lance v0.4.1 (/Users/lei/work/lance/rust)
error[E0310]: the parameter type `impl RecordBatchStream` may not live long enough
  --> src/io/exec/knn.rs:56:25
   |
56 |           let bg_thread = tokio::spawn(async move {
   |  _________________________^
57 | |             let batch = match flat_search(stream, &q).await {
58 | |                 Ok(b) => b,
59 | |                 Err(e) => {
...  |
74 | |             drop(tx);
75 | |         });
   | |__________^ ...so that the type `impl RecordBatchStream` will meet its required lifetime bounds
   |
help: consider adding an explicit lifetime bound...
   |
52 |     fn from_stream(stream: impl RecordBatchStream + 'static, query: &Query) -> Self {
   |                                                   +++++++++


Ensure that application of end user network policy does not affect traffic between EnMasse components

Type of change

Bugfix

Description
The NetworkPolicyConntroller now ensures that the network policy permits traffic between the EnMasse pods (those with app=enmasse) on the infra-namespace.   I think the previous implementation was incorrect and meant the traffic between EnMasse's own pods was impeded.  I suspect that a defect fix included in OpenShift 4.5 allowed the issue to surface.
There was also a defect in testNetworkPolicyWithPodSelector.  When specifying a podSelector,  a namespaceSelector has to be included unless the target pod happens to be in the  infra namespace. See https://kubernetes.io/docs/concepts/services-networking/network-policies/
Checklist

[ ] Update/write design documentation in ./documentation/design
[ ] Write tests and make sure they pass
[ ] Update documentation
[ ] Check RBAC rights for Kubernetes / OpenShift roles
[ ] Try your changes from Pod inside your Kubernetes and OpenShift cluster, not just locally
[ ] Reference relevant issue(s) and close them after merging
[ ] Update CHANGELOG.md

@enmasse-ci run tests ocp4 testcase=NetworkPolicyTestStandard

:heavy_check_mark: Test Summary :heavy_check_mark:
TEST_PROFILE: pr
TEST_CASE: NetworkPolicyTestStandard
TOTAL: 26
PASS: 26
FAIL: 0
SKIP: 0
BUILD_NUMBER: 1205
BUILD_ENV: crc

@enmasse-ci run tests testcase=NetworkPolicyTestStandard

:x: Test Summary :x:
TEST_PROFILE: pr
TEST_CASE: NetworkPolicyTestStandard
TOTAL: 24
PASS: 24
FAIL: 0
SKIP: 0
BUILD_NUMBER: 1206
BUILD_ENV: oc cluster up

@enmasse-ci run tests ocp4 testcase=NetworkPolicyTestStandard

@enmasse-ci run tests ocp4 testcase=NetworkPolicyTest*

@enmasse-ci run tests ocp4 testcase=NetworkPolicyTest*

@enmasse-ci run tests ocp4 testcase=NetworkPolicyTestBrokered

:x: Test Summary :x:
TEST_PROFILE: pr
TEST_CASE: NetworkPolicyTest*
TOTAL: 28
PASS: 26
FAIL: 2
SKIP: 0
BUILD_NUMBER: 1210
BUILD_ENV: crc
:heavy_exclamation_mark: Test Failures :heavy_exclamation_mark:

testNetworkPolicyWithNamespaceSelector in io.enmasse.systemtest.isolated.policy.NetworkPolicyTestBrokered
testNetworkPolicyWithPodSelector in io.enmasse.systemtest.isolated.policy.NetworkPolicyTestBrokered

:heavy_check_mark: Test Summary :heavy_check_mark:
TEST_PROFILE: pr
TEST_CASE: NetworkPolicyTestBrokered
TOTAL: 26
PASS: 26
FAIL: 0
SKIP: 0
BUILD_NUMBER: 1212
BUILD_ENV: crc


Rename finalizer to conform to k8s requirements

https://github.com/cert-manager/cert-manager/blob/05cf58f42072f3e2d0090a3af1009063fdfe4ca4/internal/apis/acme/v1alpha3/const.go#L20

Identifiers of custom finalizers consist of a domain name, a forward slash and the name of the finalizer.

-- https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#finalizers
For example:
"finalizer.acme.cert-manager.io" => "acme.cert-manager.io/finalizer"
This error triggers this output:

W0910 20:07:22.491920       1 warnings.go:70] metadata.finalizers: "finalizer.acme.cert-manager.io": prefer a domain-qualified finalizer name to avoid accidental conflicts with other finalizer writers

This change must be performed over several releases, and include a big user warning about skipping versions:

Add the new finalizer and let the controller manage both finalizers for several releases.
Remove the old finalizer.

/prority important-soon

/priority important-soon

Good spot @jsoref ! We discussed this a little in the standup this morning and agreed that this was worth looking into, especially with v1.16.0 scheduled for early October. If this is going to take multiple releases we ideally want to start the process in 1.16.
No timeline yet, nor is anyone assigned to this yet. We also didn't settle on a design for fixing this. I don't personally have the expertise on this area to be effective I don't think.

Fwiw, I've also opened a ticket to k8s about the warning message, as it isn't great. But that'd arrive N major kubernetes versions from now...

Quick followup: we discussed this a bit more in standup today, and the decision was to not do this for cert-manager 1.16 because the timeline is so tight and this is more of an annoyance rather than something that's likely to break.
I think that's a fair summary of it!

ok, so, i'm going to imagine it with just a flag to enable writing the v2 finalizer
and try to set it up so that it effectively does the right thing for:

v1 active (recognizes+clears+writes v1; recognizes+clears v2 but doesn't write it)
v2 active (recognizes+clears v1 but doesn't write it; recognizes+clears+writes v2)

steps

[ ] 1 PR to do the whole feature
[ ] one release sits with the feature in v2 supported but not created
[ ] 1 PR to switch to v2 active (with release notes)
[ ] one release sits with v1 supported but not created
[ ] 1 PR to remove v2 support (with release notes)
[ ] next release drops ships w/o v1 support

I've started drafting some of this code, but if someone wants to do the work, I'm happy to not.

I've started some work on this, feedback welcome: https://github.com/cert-manager/cert-manager/compare/master...jsoref:cert-manager:issue-7266

A beta-release is now available which contains the fix for this issue. Please test and feedback if you have time.

https://github.com/cert-manager/cert-manager/releases/tag/v1.16.0-beta.0

It works!

Thanks for verifying, @jsoref! 🥰

It's probably worth noting that the message only previously appeared in pod logs. So unless your log scraper captured them and dumped them into your global log store, you could easily miss them.
I must have been actively watching a cert-manager rollout in order to have seen it.

Documentation:

https://github.com/cert-manager/website/pull/1571


Move build meta to setup.cfg, update requirements files and workflows

Moves build meta from setup.py to setup.cfg and removes setup.py.
Adds following files generated from pip-compile looking at setup.cfg:

requirements.txt
requirements_dev.txt

Removes redundant requirements files from \etc.
Updates workflows:

to accommodate changes to requirements files.
on main workflow moves caching of dependencies to setup-python action.

Going to retreat from this one. See #196.


Add new texworks yml

I replaced the old script with a new yml file.
I intentionally left out the texlive installer, since it's not a hard dependency in the upstream deb, and in many cases the default install is not the correct one for every user.
Since it's easier to add/remove packages if it's out of the appimage I'd leave it out.
Also if it's not in the appimage it can be shared by multiple editors (an important use case for me as well)

Thanks @LyzardKing can you also make a version with TeXLive? (In addition)

Sure.
There's just an issue I noticed now with the icon not found...

@probonopd I get this error with the icon, using appimaged:
Error moving file: Error moving file /tmp/appimagekit_87a89dac9ee274a06ae580218346586b_TeXworks.png: No such file or directory

@LyzardKing did it work with the original one? Likely the icon is missing under usr/share/icons/....

The path is correct, usr/share/pixmaps/TeXworxs.png.
The icon is copied correctly in the AppDir folder

In the version with texlive I just uploaded I get the following error when I run the appimage:
/tmp/.mount_QNiKP0/usr/bin/texworks: error while loading shared libraries: libhunspell-1.3.so.0: cannot open shared object file: No such file or directory
But the package is installed (as a dependency of texworks)

The icon error is:
Error moving file: Error moving file /tmp/appimagekit_87a89dac9ee274a06ae580218346586b_TeXworks.png: No such file or directory
But that file exists and is the icon!

Is libhunspell-1.3.so.0 in a subdirectory of usr/lib/ or usr/lib/x86_64? In that case move it one directory up and retry please.

./usr/lib/x86_64-linux-gnu/libhunspell-1.3.so.0
It works in the version without texlive though... that's the strange thing..


Asserting array deeply constans object with key

How to assert that myArr contains both myKey1 and myKey2:

myArr : [
{myKey1: [..]}
{myKey2: [..]}
]

Have you plans to add gitter chat room?

Hi.
For deep search use .containDeep and .containDeepOrdered. For your example:
$ node
> var should = require('should')
undefined
> var myArr = [ 1, 2, 'abc', { myKey1: [ 1, 2, 3]}, { myKey2: [ 4, 5, 6] }];
undefined
> myArr.should.containDeep([{ myKey1: [] }, {myKey2: []}])
{ obj: [ 1, 2, 'abc', { myKey1: [Object] }, { myKey2: [Object] } ],
  params: { operator: 'to contain [ { myKey1: [] }, { myKey2: [] } ]' },
  negate: false }
> myArr.should.containDeep([{ myKey1: [4] }, {myKey2: []}])

Just use empty arrays. If you add any value it begin search deeper.
I can add gitter chat room, but just for me it is a bit easier to answer in issues.

OK, thanks. We can also speak Russian in chat.


Unable to set a field value as empty string ""

Unable to set a field value as empty string ""
Setting a field example value as "" fails for swagger:response and swagger:model
Input
// example:
// example: ""
// example: ''
Expected Output
"field" : ""
Output
"field": "''"
"field": "\"\""
"field": "''"

Same

@punit-kulal Did you solve this problem?


greetingSubmit method is quite confusing

In this project, the following code lead me to a great misunderstanding, I want to share it, and maybe I can help others.
// GreetingController.java
 @PostMapping("/greeting")
    public String greetingSubmit(@ModelAttribute Greeting greeting) {
        return "result";
    }

// result.html

At first glance in the result.html, I thought  greeting object may refer to the @ModelAttribute Greeting greeting,  then I tried to make some modification to use another model OtherModel, but it turned out to be exception.
After google quite a while, I found out that here the ${greeting.content} is linked to the name of the model class rather than the name of the key.
So I believe that  the proper way to do this is like this.
    @PostMapping("/greeting2")
    public String greetingSubmit(@ModelAttribute OtherModel greeting, Model model) {
        model.addAttribute("greeting", greeting);
        return "result";
    }

Thanks

In this guide, there are two parts being shown: the current value of the Greeting object as well as an HTML FORM used to submit updates to that object to the server.
The following line of code is where Thymeleaf is given a greeting object to operate on:
model.addAttribute("greeting", greeting);

To change from Greeting to OtherModel, you'd have to alter both controller methods. "greeting" is the handle applied to it for the template.
This bit of Thymeleaf is used to show the current values of Greeting in the result.html template:

Result

Submit another message

In this case, the Greeting POJO fed into the template has both an id and a content attribute. (NOTE: Standard Java Bean rules apply).
When it comes time to build a form and POST it to the server, the same POJO is used to build an HTML FORM (greeting.html):
<form action="#" th:action="@{/greeting}" th:object="${greeting}" method="post">

Id: <input type="text" th:field="*{id}" />

Message: <input type="text" th:field="*{content}" />

<input type="submit" value="Submit" /> <input type="reset" value="Reset" />

</form>

th:object="${greeting}" gets a hold of the greeting POJO.
th:field="*{id}" references that bean's id field
th:field="*{content}" references that bean's content field.

If you showed more details of your alteration, we might be able to debug further.


injectedJavaScriptBeforeContentLoaded do not work on some android device

Bug description:
injectedJavaScriptBeforeContentLoaded  do not work on my Huawei device, EMUI 10.0.0

To Reproduce:

Expected behavior:

injectedJavaScriptBeforeContentLoaded  works as expected
Screenshots/Videos:

Environment:

OS: Android
OS version: android 10
react-native version: 0.62.2
react-native-webview version: ^10.3.2

related issue https://github.com/react-native-community/react-native-webview/pull/1099

This issue is not stale, and persists in production as evidenced by e.g. https://github.com/MetaMask/metamask-mobile/issues/1975.

HONOR 30 has the same problem .


Make Pluto dependency optional?

Would it be possible to make the Pluto dependency optional? Currently there is a problem if we want to have WGLMakie installed along with DemoCards.
WGLMakie depends upon JSServe depends upon WebSockets, depends upon HTTP < 1
But Pluto depends upon HTTP > 1
See https://github.com/SimonDanisch/JSServe.jl/issues/131

@Dsantra92

It can be done, but having HTTP < 1 looks a bit unreasonable to me. Can you confirm this the issue with Makie.jl with WGLMakie as backend?

Looks like JSSserve.jl supports HTTP 0.8 and 0.9 only. But according to https://github.com/SimonDanisch/JSServe.jl/issues/131 next version of WebSockets will use 1.0+. So let's just wait till then? I don't think there will be any major updates in julia and markdown formats for now. So you can pin DemoCards.jl version until the release of WebSockets.jl.

Okay. Seems reasonable. Thanks!

I still think this would be a nice idea. I guess most people will not use the Pluto support, but as it is now, these projects get all of Pluto pulled in as dependencies into their docs. Note that currently Literate.jl does not have very many dependencies, and notably doesn't pull in any Jupyter stuff, it just generates the format as JSON. Adding Pluto as a dependency for all uses of this package could significantly increase TTFD (time to first doc).

This is a problem too for https://github.com/JuliaPlots/PlotDocs.jl.

Hi, what is the current problem with PlotDocs.jl? Time to first plot?

Compat, can't update to latest DemoCards.

Looks like more of a WebSockets.jl issue here. Track here https://github.com/JuliaWeb/WebSockets.jl/issues/181

While I do recognize the time to first plot a good viable reason, I think moving a library to optional because another library release is taking time to release the next version is a bit of a hassle. Let's wait for a week and see how then plan on how the next release goes!

This could continue to be a compatibility problem later on as different parts of the ecosystem continue to be developed at different paces. It is not obvious why DemoCards.jl needs to depend upon Pluto if you are not using this feature.

What is @johnnychen94's opinion on this matter ?

There are two issues to solve here:

HTTP 1.0 compatibility. This should be fixed in other packages (e.g., https://github.com/JuliaWeb/WebSockets.jl/pull/182). It seems that WebSockets is approaching HTTP > 1.0 compatibility.
the using DemoCards time. I agree that probably not all users need it, and it would be a good trade-off to introduce Requires.jl to load it conditionally. But I'm not sure how much code changes are involved here.

I do see people having the need to remove Pluto dependency completely from the current Project.toml. One way is to:

revert the pluto-releated changes, tag a new v0.4.12 release
tag a v0.5.0 release for Pluto-related features -- this is probably a large feature that requires a new breaking change.

and keep v0.4.x until the compatibility issue is solved.

It is unclear to me why https://github.com/JuliaDocs/DemoCards.jl/pull/121 needs to pull-in Pluto and PlutoStaticHTML.
Maybe @Dsantra92 could clarify.
Instead of adding using Pluto, one should use import Pluto: ... so that is immediate to see which components are effectively used.
I mean trivial helpers such as is_pluto_notebook could easily be duplicated here ...

WebSockets.jl now has a new version, requiring Julia 1.8.2+ and HTTP 1.1.0 to 1.5. Hopefully, one plug is unstuck.

I think it is better to make the dependency optional for the time being. Pluto and PlutoStaticHTML are not maintained in sync, resulting in bugs more often than anyone would like. Thanks, @t-bltg and @frankier for the suggestion.


ISPN-15287 Support Hibernate ORM 6.3

https://issues.redhat.com/browse/ISPN-15287

I have manually confirmed this works with Hibernate 6.2, however, it would be nice to have some way to run with both versions automatically in CI. If anyone has any suggestions of the best way to do that, it would be great. I have tried setting the dependencies in a separate plugin execution and a different maven profile with no luck. :(

Working on a possible fix

@wburns just pushed my commit

Jenkins is not grouping them properly by package

@wburns added a commit that changes the report suffix, avoiding . characters. Let's see how Jenkins works.

Looks okay to me, although I would suggest squashing the suffix change assuming it works 🤞

Looks like the tests are now separated 🎉

Thanks @tristantarrant and @wburns


Do an audit to check for more instances of account_exists

https://github.com/ethereum/py-evm/pull/1644 involved a change to how py-evm decides whether an account exists:
def extcodehash(computation: BaseComputation) -> None:
    """
    Return the code hash for a given address.
    EIP: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1052.md
    """
    account = force_bytes_to_address(computation.stack_pop(type_hint=constants.BYTES))
    account_db = computation.state.account_db

-     if not account_db.account_exists(account):
+    if account_db.account_is_empty(account):
        computation.stack_push(constants.NULL_BYTE)
    else:
        computation.stack_push(account_db.get_code_hash(account))

This change is specific to extcodehash but the general idea should always apply. Under the state cleaning rules from EIP-161 any account which is empty will be deleted, and should be treated as if it does not exist.
I'm not sure whether this means that account_exists should always return the same things that account_is_empty would, but this feels like an easy source of bugs. All other instances of account_exists should be checked to see if they make the same mistake which was fixed here.

I just did a quick run-through, and everywhere that uses it seems to be doing it correctly.
This place in particular would break if account_exists always returned not account_is_empty:
https://github.com/ethereum/py-evm/blob/32834ab5d2b6ae509509b620cde9290506eec7bd/eth/vm/forks/spurious_dragon/state.py#L32-L35
Maybe we should rename it account_technically_exists() (only 10% joking :)). A silly name might encourage people to go look at the docstring, which should direct most use cases to invoke account_is_empty().

How about account_present_in_trie

How about account_present_in_trie

Yeah, that's way better


Issue facing with install Centos7

How to get around this issue ? Machine has zmq3 already why would it try to build zmq4 ...
19:31:31 Installing lgo-internal
# github.com/pebbe/zmq4
/tmp/go-build824050319/github.com/pebbe/zmq4/_obj/zmq4.cgo2.o: In function `_cgo_5202562de717_C2func_zmq_ctx_term':
../src/github.com/pebbe/zmq4/cgo-gcc-prolog:179: undefined reference to `zmq_ctx_term'
/tmp/go-build824050319/github.com/pebbe/zmq4/_obj/zmq4.cgo2.o: In function `_cgo_5202562de717_C2func_zmq_curve_keypair':
../src/github.com/pebbe/zmq4/cgo-gcc-prolog:202: undefined reference to `zmq_curve_keypair'
/tmp/go-build824050319/github.com/pebbe/zmq4/_obj/zmq4.cgo2.o: In function `_cgo_5202562de717_Cfunc_zmq_ctx_term':
../src/github.com/pebbe/zmq4/cgo-gcc-prolog:619: undefined reference to `zmq_ctx_term'
/tmp/go-build824050319/github.com/pebbe/zmq4/_obj/zmq4.cgo2.o: In function `_cgo_5202562de717_Cfunc_zmq_curve_keypair':
../src/github.com/pebbe/zmq4/cgo-gcc-prolog:638: undefined reference to `zmq_curve_keypair'
/tmp/go-build824050319/github.com/pebbe/zmq4/_obj/zmq4.cgo2.o: In function `_cgo_5202562de717_Cfunc_zmq_z85_decode':
../src/github.com/pebbe/zmq4/cgo-gcc-prolog:921: undefined reference to `zmq_z85_decode'
/tmp/go-build824050319/github.com/pebbe/zmq4/_obj/zmq4.cgo2.o: In function `_cgo_5202562de717_Cfunc_zmq_z85_encode':
../src/github.com/pebbe/zmq4/cgo-gcc-prolog:940: undefined reference to `zmq_z85_encode'
collect2: error: ld returned 1 exit status
2018/03/10 19:31:36 Failed to build lgo-internal: exit status 2

lgo uses github.com/pebbe/zmq4 internally
https://godoc.org/github.com/yunabe/lgo/jupyter/gojupyterscaffold?imports
Because zmq4 uses API added in 0MQ version 4, you can not compile zmq4 with 0MQ version 3.
Upgrading 0MQ library to the latest version (version 4) is the easiest way to get around this problem. Is it difficult in CentOS?

I'm closing this bug because there is no update.


Fix Neeraj's messup

Make h4i.png actually a png instead of a renamed jpg.

Fix Michael's mess up by saying I messed up

kinda controversial


Add some quality metrics

What(What have you changed/added/removed?)

Add some quality metrics

Why(Why did you change/add/remove it?)

Prep adding to awesome-go

Codecov Report

Merging #9 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master       #9   +/-   ##
=======================================
  Coverage   56.17%   56.17%
=======================================
  Files           2        2
  Lines         162      162
=======================================
  Hits           91       91
  Misses         56       56
  Partials       15       15

Impacted Files
Coverage Δ

ote.go
53.10% <ø> (ø)

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 0ea16ef...0ad5bb2. Read the comment docs.


Create a showcase app/window

[ ] Create a showcase app with a dummy window, to show how Qlementine looks.
[ ] Make some screenshots and use them in README.md

Hi, your project seriously lacks pictures! A few years ago I wrote this application to showcase a style I was writing at the time and it mimicked the showcase GTK3 had then. I specifically picked up a commit where all of the code in the showcase was written by only me and if you want to use it, I give you permission to do so under whatever license you decide to use, if you do so. Have a nice day!
https://github.com/FedoraQt/adwaita-qt/tree/cd7b927ba5e71645a3bbf45472cad13abfd15ad6/src/example

@MartinBriza Oh thanks! 😀 I was planning to make this showcase window this week, so I'll have a look at your code!

@MartinBriza Also, are you OK if I re-use most of your CI script? (Building on Linux in Qt5 AND Qt6, building on Windows, and I'll add building on MacOS)

That CI script is not written by me, I haven't contributed to that project in years (again, which is why I'm linking a specific commit) but from the licensing perspective, I don't think it's an issue. You can check the CI script here though https://github.com/LithApp/Lith and do whatever you want with it... it's pretty messy though but it works on all Qt target platforms (except Android now because of QCoro).

Look at the wasm part especially, that's how https://lith.app/Lith is built, would be a nice way to showcase your project ;)

@hirseboy I was working on creating an icon library. It's mostly done, so I'll be able soon to make a showcase app.

@oclero ok, sounds great! :)


syft fails to resolve npm package aliases

Please provide a set of steps on how to reproduce the issue

Create a package.json with the following contents:

{
  "name": "tmp",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "@vue/cli-service": "^5.0.8"
  }
}

Generate a package-lock.json by running npm install --package-lock-only
Run syft .

What happened:
Running syft on such project generates incorrect SBOM because the dependency uses a package alias:
...
@vue/component-compiler-utils             3.3.0                   npm
@vue/vue-loader-v15<EMAIL_ADDRESS>npm
@vue/web-component-wrapper                1.3.0                   npm
...

What you expected to happen:
I expected syft to correctly resolve the npm package alias (from @vue/vue-loader-v15 to<EMAIL_ADDRESS>and recognise that my project has a dependency on<EMAIL_ADDRESS>Anything else we need to know?:
Environment:

Output of syft version:

Application:        syft
Version:            0.60.2
JsonSchemaVersion:  4.1.0
BuildDate:          2022-11-02T14:43:28Z
GitCommit:          35f0f2931e310882fe7117c41d57a185d72ca498
GitDescription:     v0.60.2
Platform:           linux/amd64
GoVersion:          go1.18.7
Compiler:           gc

OS (e.g: cat /etc/os-release or similar):

NAME="Ubuntu"
VERSION="20.04 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

Thank you for a prompt response, @kzantow 👍 I similarly didn't know about aliases until encountering this SBOM quirk; from what I can tell, yarn also supports package aliases.

Thank you for fixing this up - really appreciate it 🙌


Windows UI bug if system fonts sizes are not standard

Windows 10, 100% dpi scale, but custom system font sizes for readability (used https://www.wintools.info/index.php/system-font-size-changer ).
It's working for 99% of windows apps, except Sparrow.
The fonts are big, but UI don't resize AND you can't resize most dialog windows.

Have you tried resizing the UI explicitly? See I’m running on a high resolution screen and Sparrow icons and text are tiny

Tried setting glass.win.uiScale, Sparrow don't start at all (window hidden?).
For now I'll load default font sizes profile before starting Sparrow.

Just checking - did you mean 125%? The % character is required.

Thanks, I missed %. Now it's working.