Latest Webpack version of CLI throws error

Please provide us with the following information:

OS?  Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Ubuntu latest 16.04 LTS
Versions. Please run ng --version. If there's nothing outputted, please run
When run ng --version the following error comes:
siva@siva:~$ ng --version Error while running script "/home/siva/Applications/node-v4.4.3-linux-x86/lib/node_modules/angular-cli/addon/ng2/models/config/config.ts": SyntaxError: Unexpected token ... at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:373:25) at Object.require.extensions..ts (/home/siva/Applications/node-v4.4.3-linux-x86/lib/node_modules/angular-cli/lib/bootstrap-local.js:30:14) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.<anonymous> (/home/siva/Applications/node-v4.4.3-linux-x86/lib/node_modules/angular-cli/addon/ng2/models/config.ts:7:16) at Module._compile (module.js:409:26) at Object.require.extensions..ts (/home/siva/Applications/node-v4.4.3-linux-x86/lib/node_modules/angular-cli/lib/bootstrap-local.js:30:14)

in a Terminal: node --version and paste the result here:

Repro steps. Was this an app that wasn't created using the CLI? What change did you
do on your code? etc.
The log given by the failure. Normally this include a stack trace and some
more information.
Mention any other details that might be useful.

Thanks! We'll be in touch soon.

try install npm install -g<EMAIL_ADDRESS>

have the same issue, but according to this thread #1883 you now need node6 and not node4

Updating node from 6.3.0 to 6.5.0 helped me too for this problem.

to fix this u need go ng init, coz angular-cli.json was modify !!
need to write about it on changelog !!.
go ng init, and go yes only for angular-cli.json

System: Mac OSX  El Capitan
$ ng --version
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
angular-cli: 1.0.0-beta.11-webpack.8
node: 6.5.0
os: darwin x64
Repro steps.
ng new projname
cd projname
ng serve
Errors
Project is running but the console reports tons of typings errors like the following
ERROR in [default] /Users/user/webProjects/test-angular2/webpack/node_modules/@angular/core/src/di/reflective_key.d.ts:18:11
Cannot find name 'Object'.
ERROR in [default] /Users/user/webProjects/test-angular2/webpack/node_modules/@angular/core/src/di/reflective_key.d.ts:23:23
Cannot find name 'Object'.
ERROR in [default] /Users/user/webProjects/test-
angular2/webpack/node_modules/@angular/core/src/di/reflective_key.d.ts:31:22
Cannot find name 'Object'.
ERROR in [default] /Users/user/webProjects/test-angular2/webpack/node_modules/@angular/core/src/di/reflective_provider.d.ts:71:13
Cannot find name 'Function'.
ERROR in [default] /Users/user/webProjects/test-angular2/webpack/node_modules/@angular/core/src/di/reflective_provider.d.ts:80:17
Cannot find name 'Function'.

This morning things were fine. Now when I create a project and run ng build or ng serve I observe all these errors.
Running on a MacbookPro / El Capitan:
ng --version
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
angular-cli: 1.0.0-beta.11-webpack.8
node: 6.2.1
os: darwin x64

Why in CHANGELOG.md the newest version is 1.0.0-beta.11-webpack.3 but everyone is installing 1.0.0-beta.11-webpack.8?

<EMAIL_ADDRESS>is what is installed with one installs angular-cli@webpack, which is recommended in the angular-cli installation page for RC5 / webpack.

I just install angular-cli@webpack and the version which I got is<EMAIL_ADDRESS>

it is a moving target! Hopefully this is a better version. I'll check it out right now and let you know what I observe.

I had really strange situation.
I run npm install -g angular-cli@webpack
Than I checked the version ng -v and it was angular-cli 1.0.0-beta.10
I decided to remove it npm uninstall angular-cli, than npm cache clean.
To ensure that it's deleted I run one more time ng -v and for my surprise the version was 1.0.0-beta.11-webpack.8
I don't have any idea what just happened

I love it! I just finished the same exercise and got 1.0.0-beta.11-webpack.8! I guess you had an optical illusion (happens to me lot, particularly while playing chess!)

IT has been suggested that upgrading to node 6.5.0 might solve the problem. Unfortunately, as shown by the logs below, this is not the case:
$ node --version
v6.5.0

$ npm --version
3.10.3

$ ng --version
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
angular-cli: 1.0.0-beta.11-webpack.8
node: 6.5.0
os: darwin x64

$ ng build
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
1019ms building modules
1ms sealing
0ms optimizing
1ms basic module optimization
1ms module optimization
0ms advanced module optimization
2ms basic chunk optimization
1ms chunk optimization
0ms advanced chunk optimization
0ms module and chunk tree optimization
3ms module reviving
0ms module order optimization
0ms module id optimization
1ms chunk reviving
0ms chunk order optimization
1ms chunk id optimization
2ms hashing
0ms module assets processing
6ms chunk assets processing
1ms additional chunk assets processing
0ms recording
1ms additional asset processing
76ms chunk asset optimization
193ms asset optimization
4ms emitting
Hash: 8633515b4611dd25238a
Version: webpack 2.1.0-beta.21
Time: 1329ms
            Asset       Size  Chunks             Chunk Names
   main.bundle.js    19.3 kB    0, 2  [emitted]  main
 styles.bundle.js      13 kB    1, 2  [emitted]  styles
        inline.js    5.53 kB       2  [emitted]  inline
         main.map    15.4 kB    0, 2  [emitted]  main
       styles.map    17.9 kB    1, 2  [emitted]  styles
       inline.map    5.59 kB       2  [emitted]  inline
       index.html  481 bytes          [emitted]
assets/.npmignore    0 bytes          [emitted]
chunk    {0} main.bundle.js, main.map (main) 13.8 kB {1} [initial] [rendered]
chunk    {1} styles.bundle.js, styles.map (styles) 12.7 kB {2} [initial] [rendered]
chunk    {2} inline.js, inline.map (inline) 0 bytes [entry] [rendered]

ERROR in ./src/main.ts
Module not found: Error: Can't resolve '@angular/platform-browser-dynamic' in '/Users/silveir/Projects/studies/ng2_router/src'
 @ ./src/main.ts 2:0-75
 @ multi main

.... many more errors of this nature

I was able to solve this problem with the following configuration:
Upgrade imy tools
 node --version
v6.5.0
$ npm --version
3.10.3
$ ng --version
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
angular-cli: 1.0.0-beta.11-webpack.8
node: 6.5.0
os: darwin x64

$ npm list -g
/usr/local/lib
├─┬<EMAIL_ADDRESS>│ ├──<EMAIL_ADDRESS>
...

├──<EMAIL_ADDRESS>
....

Changed "typescript": "^2.0.0"to "typescript": "2.0.0"in mypackages.json`
Executed the folling commands on my project root
$ rm -rf node_modules dist tmp typings
$ npm install --save-dev angular-cli@webpack

Thanks @dematic-rodrigo-silveira
Now i've upgraded the structure of my project comparing folders and files from a fresh ng new project, there are several differences.
Now i've got this errors and i can't figure out where to remove undefined from the path see the errors below
ERROR in multi main
Module not found: Error: Can't resolve '/Users/user/webProjects/musicollector/undefined/main.ts' in '/Users/user/webProjects/musicollector/node_modules/angular-cli/addon/ng2/models'
 @ multi main

ERROR in Entry module not found: Error: Can't resolve '/Users/user/webProjects/musicollector/undefined/polyfills.ts' in '/Users/user/webProjects/musicollector/node_modules/angular-cli/addon/ng2/models'

ERROR in   Error: Child compilation failed:
  Entry module not found: Error: Can't resolve '/Users/user/webProjects/musicolle  ctor/undefined/index.html' in '/Users/user/webProjects/musicollector/node_modul  es/angular-cli/addon/ng2/models':
  Error: Can't resolve '/Users/user/webProjects/musicollector/undefined/index.htm  l' in '/Users/user/webProjects/musicollector/node_modules/angular-cli/addon/ng2  /models'

Thanks @dematic-rodrigo-silveira also, as @kurtommy said, no more typings errors appear.
But, I still have issues with MS Visual Code and intellisense.
With:
$ nvm use v4
$ ng --version
angular-cli: 1.0.0-beta.10
node: 4.5.0
os: darwin x64
$ npm --version
3.10.7
$ npm cache clean
$ ng new test-10
$ code test-10

it works perfectly, as expected.
With:
$ nvm use v6
$ ng --version
angular-cli: 1.0.0-beta.11-webpack.8
node: 6.5.0
os: darwin x64
$ npm --version
3.10.7
$ tsc --version
Version 2.0.0
$ npm cache clean
$ ng new test-11
$ code test-11

MS Studio Code reports some problems (although it is compiled ok):

[ts] Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.
[ts] Cannot find name 'Promise'.

¿Any idea?

As was mentioned before you should do next steps to fix this bug:

Install typescript 2.0.0
npm uninstall typescript -g npm cache clean install<EMAIL_ADDRESS>-g
ng init in project folder
Change the line "typescript": "^2.0.0" to "typescript": "2.0.0"
run npm install
Enjoy your project.

For me it works good.
Versions:
angular-cli: 1.0.0-beta.11-webpack.8 node: 6.5.0 os: darwin x64

Nop. ng serve does not throw any error, but MS Visual Code still reporting the same errors.

When the next version of CLI likely to come out?

Closing as obsolete.
@siva636 please try the latest beta.14.
The<EMAIL_ADDRESS>- >2.0.0 issue was fixed in https://github.com/angular/angular-cli/pull/1993.
Errors in your editors are because they might not support typescript 2.0.0 yet, there might be a way to configure the editor but it varies.
For other problems please open separate issues.

Now (beta.14) it is working ok (like beta.10) with MS Visual Code.
(may be is the editor that has been updated to v1.5.2)
Thanks @filipesilva

I think the error is stable (ng serve, ng build) repeats when name of the parent folder have somewhere symbol ! (ex. C:/!my-folder). When I renamed it (C:/my-folder) I got success.


BetaFPV aio 1s board (matekf411rx_frsky)

Hi,
After choosing needed UART VTX settings not showing up and VTX is totally absent while running latest qs firmware.

fixed in v0.6.4-dev


Filter Streams  should order the available stream attributes in alphabetical order when building a query

Order seems a bit arbitrary at the moment


Social Image Link

Updated the main banner image and added the social meta image tags for all languages.

Awesome! I will merge this.


Implement tag cloud partial

[ ] Implement tag cloud
[ ] Add it to the 404 page
[ ] Display in sidebar

I think I will take a crack at this

Sure! Have a look at: https://www.sidorenko.io/post/2017/07/nice-tagcloud-with-hugo/

Added by https://github.com/schnerring/hugo-theme-gruvbox/pull/148

We could also add maxFontSize to limit the size of some tags.


[Project Moon TRPG] v0.7 Hotfix

Submission Checklist
Required

[x] The pull request title clearly contains the name of the sheet I am editing.
[x] The pull request title clearly states the type of change I am submitting (New Sheet/New Feature/Bugfix/etc.).
[x] The pull request makes changes to files in only one sub-folder.
[x] The pull request does not contain changes to any json files in the translations folder (translation.json is permitted)

New Sheet Details

The name of this game is: <   >  (i.e. Dungeons & Dragons 5th Edition, The Dresden Files RPG)

The publisher of this game is: <   > (i.e. Wizards of the Coast, Evil Hat)

The name of this game system/family is: <   > (i.e. Dungeons & Dragons, FATE)

[x] I have followed the Character Sheets Standards when building this sheet.

[ ] I have authorization from the game's publisher to make this an official sheet on Roll20 with their name attached.
[x] This game is not a traditionally published game, but a copy of the game rules can be purchased/downloaded/found at: https://drive.google.com/drive/folders/15nMYLz0sB5xWUiSOG4oN6IsteRJjpdZk
[x] This sheet is for an unofficial fan game, modification to an existing game, or a homebrew system.

Changes / Description
Fixes a critical bug with targeting making some sheets unable to attack in certain situations

Character Sheet Info Roll20 Internal Use only.


python3Packages.pbr: add setuptools dependency

Motivation for this change
If pbr is used in an environment without setuptools (e.g. a "pyproject"-format build), pbr will fail when importing pkg_resources because it is missing the setuptools dependency. This fixes that issue.
pbr doesn't list any explicit requirements, but it actually requires setuptools (for pkg_resources).
Ref:

https://bugs.launchpad.net/pbr/+bug/1868899
https://opendev.org/openstack/pbr/src/tag/5.6.0/pbr/version.py#L439

Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[ ] NixOS
[ ] macOS
[x] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip". NOTE: rebuilds 5800 packages. Tested only matplotlib.
[x] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Relase notes)

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

[x] Fits CONTRIBUTING.md.

Whoops. apologies about the wrong branch.


Well I am on chrome

On Chrome the browser can sometimes block full screen try moving to a different browser and use phosphorus

Im using chrome os :( I can not change browser

FIXED


Allow to use %spName% and %idpName% in error texts%idpName%

This issue is imported from pivotal - Originaly created at Jan 29, 2021 by Thijs Kinkhorst
We currently word error message texts in languages.*.php like this (mocked up):
"You do not have access to this Service Provider via %suiteName%. Please contact the service desk of your %organizationNoun% for help."
Displayed as:
"You do not have access to this Service Provider via SURFconext. Please contact the service desk of your institution for help."
The interpolated vars are useful. But I think we can improve the texts a lot if we have "%spName%" and "%idpName%" available for interpolation. Desired result:
"You do not have access to %spName% via %suiteName%. Please contact the service desk of %idpName% for help."
Displayed as:
"You do not have access to Elsevier Scopus via SURFconext. Please contact the service desk of Tilburg University for help."

Ik heb dit nagelopen en volgens mij zijn volgende errors van toepassing (de overige niet).
(Koen Cornelis - Mar 30, 2021)

Yes, this works in principle. However we need to review all messages on whether the info is actually available. it now attempts to use %spName% on the "Unknown SP" error. Of course this info will not be available there. (Thijs Kinkhorst - May 11, 2021)

Also the word "van" is missing before the last "%idpName%". (Thijs Kinkhorst - May 18, 2021)


Typo in docs

Checks

[x] I added a descriptive title to this issue
[x] I have searched (google, github) for similar issues and couldn't find anything
[x] I have read and followed the docs and still think this is a bug

Bug
There is a typo in install snipet. it shows pip install datamodel-code-generato. The r is missing at the end.
Upon inspecting the https://github.com/samuelcolvin/pydantic/blob/master/docs/datamodel_code_generator.md I found that there is no typo in it. I built the docs on my own system using make docs and it worked fine. I guess I different version of the file is being served.
https://pydantic.helpmanual.io/dev/pr-1635/datamodel_code_generator/#install

You're not using the main docs, but instead a deploy preview of an ancient pull request:
https://pydantic-docs.helpmanual.io/datamodel_code_generator/

Sorry my bad. Don't know how I missed that.


AngleSharp IElement extension methods do not work with IRenderedFragment.Find

Describe the bug
All IElement extension methods from AngleSharp which use type comparison (IsEnabled, IsDisabled, IsDefault, ...) do not work with elements received thru IRenderedFragment.Find.
Example:
Testing this component:
<button disabled="@IsDisabled"></button>

@code {
    [Parameter]
    public bool IsDisabled { get; set; }
}

With this test:
        [Test]
        public void RendersDisabledCorrect()
        {
            // Act
            var component = RenderComponent<ExampleComponent>(p =>
            {
                p.Add(c => c.IsDisabled, true);
            });

            // Assert
            var element = component.Find("button");
            Assert.That(element.IsDisabled(), Is.True);
        }

Results in this output:
Message:
  Expected: True
  But was:  False

Expected behavior:

Version info:

bUnit version: 1.23.1-preview
.NET Runtime and Blazor version: 8.0.0-preview.6.23329.11
OS type and version: Windows 11

Additional context:
Since the WrapperFactory inside Find is allways called with new ElementFactory<IElement>(...) the result will always be a wrapper for IElement. The result type of renderedFragment.Nodes.QuerySelector(...) should be taken into account.

Curious. Does the method element.HasAttribute("disabled") return true in your example code?
You can also get the original element back by calling element.Unwrap().
Anyway, I'm currently on vacation without a computer so I'll take a deeper look next week.

That works @egil.
IsDisabled() - which is an extension method from Angelsharp.Dom checks like this:
if (element is IHtmlAnchorElement)
{...}
else if(element is IHtmlButtonElement)
{...}

And HasAttribute is from the IElement itself - which then in fact is used by the ElementWrapper like this:  WrappedElement.HasAttribute(name);

Exactly.
I think the the cause for that is:
https://github.com/bUnit-dev/bUnit/blob/c8202c414f55a4070b109654f00ce462297a8302/src/bunit.web/Extensions/RenderedFragmentExtensions.cs#L29
This will always create a ElementWrapper (and not a HtmlButtonElementWrapper which would be need in this case).
Doing the switch case inside of WrapperFactory on the provided object from AngleSharp would probably resolve that.

Yes, simply speaking something like this:
public static IElement Find(this IRenderedFragment renderedFragment, string cssSelector)
{
	if (renderedFragment is null)
		throw new ArgumentNullException(nameof(renderedFragment));

	var result = renderedFragment.Nodes.QuerySelector(cssSelector);

	if (result is null)
		throw new ElementNotFoundException(cssSelector);

	return result switch
	{
		...
		IHtmlButtonElement htmlButtonElement => new HtmlButtonElementWrapper(
			new ElementFactory<IHtmlButtonElement>(renderedFragment, htmlButtonElement, cssSelector)),
		...
		_ => throw new InvalidOperationException($"Unknown type. Cannot create wrapper for {result}"),
	};
}

That would abolish the current factory. Thanks for the input, I will do some proper testing.

Hey @a2er - there should be a prerelease on Nuget (1.23.3) where you can find the fix for the reported issue.
It would be great if you could report back if all the cases you encountered are fixed.
Cheers
Steven

What I could test:
IsDisabled works on:

HtmlButtonElementWrapper
HtmlInputElementWrapper

IsChecked works now on:

HtmlInputElementWrapper

Thanks! You guys rock!


Add support for .patch files

as titled 🙏🏻

is this a git-related file? i'm not too familiar with them

is this a git-related file? i'm not too familiar with them

https://www.npmjs.com/package/patch-package

https://github.com/ds300/patch-package doesn't have offical logo or icon, is the icon below (in #36) suit?


[release-1.17] Bump github.com/moby/buildkit from 0.11.2 to 0.11.4

Manual cherrypick required.
#43875 failed to apply on top of branch "release-1.17":
Applying: Bump github.com/moby/buildkit from 0.11.2 to 0.11.4
Using index info to reconstruct a base tree...
M	go.mod
M	go.sum
Falling back to patching base and 3-way merge...
Auto-merging go.sum
Auto-merging go.mod
CONFLICT (content): Merge conflict in go.mod
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Bump github.com/moby/buildkit from 0.11.2 to 0.11.4
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Closing this for now. Will need manual updates for older releases.


Allow strings as custom emoji ids

Grammy's message entities represent custom emoji ids as strings. Also, numerical ids can be too big to accurately represent with javascript's numbers.

Grammy's message entities represent custom emoji ids as strings. Also, numerical ids can be too big to accurately represent with javascript's numbers.

Thanks for the PQ. The type should be just string, no number.


Running a schedule in execute gives warning about transpiler

Information

Qiskit Terra version: master
Python version:
Operating system:

What is the current behavior?
The docs (https://qiskit.org/documentation/tutorials/advanced/terra/pulse/getting_started_with_pulse.html) say that I can use the execute function for a schedule the same as a circuit.  However when I do I get the warning:
UserWarning:

Transpiling schedules is not supported yet.

but the job gets sent to the device.
Steps to reproduce the problem
What is the expected behavior?
Suggested solutions

https://github.com/Qiskit/qiskit-terra/pull/4100 is a possible solution


Merge 1.5.10

Codecov Report

Merging #656 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #656      +/-   ##
==========================================
+ Coverage   68.69%   68.69%   +<.01%
==========================================
  Files         382      382
  Lines       20598    20593       -5
==========================================
- Hits        14149    14147       -2
+ Misses       6449     6446       -3

Impacted Files
Coverage Δ

utils/analytics.rb
82.05% <0%> (-7.7%)
:arrow_down:

language/python.rb
37.19% <0%> (-0.31%)
:arrow_down:

rubocops/extend/formula_cop.rb
94.65% <0%> (+0.02%)
:arrow_up:

cask/lib/hbc/cask_loader.rb
93.8% <0%> (+0.05%)
:arrow_up:

diagnostic.rb
41.91% <0%> (+0.47%)
:arrow_up:

sandbox.rb
73.91% <0%> (+0.79%)
:arrow_up:

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 683b165...5b8fa3b. Read the comment docs.


use epiforecasts universe instead of github

closes #364

Failure is finding qra

I don't see a clear reason for that as qra has a release and the function obviously is present

some temporary r-universe glitch now due to package renaming which hopefully will be resolved in one of the upcoming hourly rebuilds


workflows: Fix expected IPsec keys during rotation

The key rotation test was failing because we were expecting an incorrect number of keys for the start of the rotation period. This commit fixes it by fixing the condition to compute that number of keys.
This is only happening on v1.13 because that's the only place where we have this IPv6-specific condition.

/ci-ipsec-e2e


Dumb quantize/selective recompile/recapitation?

tldr: can we get a way to bypass calibration/measurement and save a 'calibration.json'? Not to produce better models so much but to patch/hack them.
Does this belong in issues? I think at least as a feature request it does?
Recapitation - head replacement :)
Hi, I recently found I could do two convenient things with simple changes to QParams.py despite not actually being able to code (any more) or understand much of the maths involved here. One basically involve forcing the quantizer not to think/make fewer decisions and just follow an implicit recipe instead. The other is enabling higher precision for what might be a particularly sensitive structure.

Force quick 6 - 8bpw quants (naive llama.cpp style I guess?) by commenting out all but the last/last two lists of qparams_attn and qparams_mlp. this took quantization down to 2 minutes and produced ~the same model -b 8 would have for a llama3 8B. It also struck me that just pruning this list down a bit rather than truncating it would still hugely speed up model quantization at the expense of memory economy rather than potential underestimation of a layer's importance. A lazy quant mode with some preset "recipes" would be nice for this, just to get an exl2 model spun up ASAP. Strictly speaking this could be done with almost no memory at all - the likes of a VPS spring to mind - though that's not my use case and I've never had a quantize issue that swap couldn't solve.
For qparams_headoptions...

...
8: QParams(128, [8], [1.0], 4),
9: QParams(32, [8], [1.0], 4),

-hb """9""" works, not tested beyond that. My hunch is if h6 is worse than h8 measurably for llama3 (it is, after 3 tokens divergence is significantly more likely) then a hb "8.2" might be helping more. Should I try scale bits besides 4 too when I do test properly?
I tested the head bit accuracy of hb6 vs hb8 by reusing the -o output directory from one quant to 'resume' it two layers prior, modifying the job_new.json (the manual mentions this, and it really is useful). But this is fiddly, it requires keeping the job around and knowing in advance you want to experiment.
I'd like a way to drop in a new lm_head on an existing model without having to go through the measure/calibration process. Bonus points if I don't require the whole model, just the files containing the original tensor(s) (the 'abliterated' 70B model makes a good case study of this being useful for other layers too). I describe a more general purpose extension of this below.
I think a lot model hackers would have a use for a tool which lets you not only mix and match (the original model's*) tensors (which I assume I'd be able to do with just safetensors if I wanted?) but for one which actually generates them too.
I'm imagining "recipes" like this could produce an out_tensor directory ready to compile by just listing Tensor Name/QParam pairs in a .json or something. Be nice if this could include options for just copying (or even de-quantizing - at your own peril?) floating point tensors.
Maybe much this is already possible? How much would I need to change to implement this myself? Maybe VSCode would help me follow the execution of convert.py where Kate hasn't?
Now I've written this out it looks like a lot of work for something I could make in to a pull request instead of a beg with a few weeks of practice :sweat_smile:
What would be easy/hard about hacking something like this together myself?
thank you so much for your hard work turboderp and also: curse you for figuring out that -Ofast does actually work for compiling exllamav2. Now my build isn't faster than everyone else's.
*as opposed to the extra tensors that exl2 breaks simple blocks of floats down in to to quantize them - no intention of fiddling with that.

Hi, I recently found I could do two convenient things with simple changes to QParams.py despite not actually being able to code (any more) or understand much of the maths involved here.

You can do this, but please don't. I would really prefer not to have to go on a whole quest to try to explain to people why they shouldn't do this.
You say "at your own peril" but that's not how these things work out in practice. I already made a big mistake exposing the calibration dataset as a parameter, and now I regularly have to spend time explaining to people that calibration is not finetuning, and whenever people complain about the quality I have to spend time investigating if they're actually using an "rpcal" model that someone pushed to HF and described as "better at RP" or whatever. Of course most people don't complain, they just get a bad first impression and lose interest long before considering that they might have come across a broken quant.
For the specific case of 8bpw models, yes, you will get the same result whether you measure first or force the highest QParams option. This could change in the future if I add any > 8bpw layer options, but it's a very niche case either way because precision really doesn't improve noticeably after 6bpw. In fact at one point asking for an 8bpw model would often give you a ~6bpw model because the optimizer couldn't find enough layers that would benefit at all from being stored in maximum precision. Now, it just essentially pads the model with useless extra precision because too many people assume it's a bug when their 8bpw version isn't larger than the 7bpw version.
That's really what it comes down to: communication. I've recently had people suggesting that FP16 output layers are "required" for some models, I think because of some bug or odd design choice in llama.cpp (?) which manifests with Phi3 specifically, and while I could very easily accommodate these people by adding a 16 bit head option, what I can't easily do is communicate what the consequences of turning it on would be, least of all to people who didn't turn the option on themselves but just downloaded an EXL2 model converted by someone else, which then ends up consuming 4 GB of extra VRAM for no good reason.
As for pruning the list of layer options, yes, that would indeed speed up measurement. It would also negatively impact quality by reducing the granularity at which the optimizer works. If you did this and converted to anything lower than 8bpw you would get a worse quantized model out of it, and once again you'd have the problem of communication. How should a model converted in this way be tagged so people know what they're getting? Should the framework emit a warning every time one of these models is loaded? How many bug reports would I have to respond to when people start seeing that warning pop up all the time?
And you don't have to measure again to change the head layer. You do need to quantize again, although you could do as you did and just replace the output tensor before compiling. Alternatively you can technically set the progress to "quantize" and reduce "q_last_module_idx" by a few to revert the job to right before it quantized the head layer, then resume from there. Kinda dodgy but if you're careful to pick the idx of the last checkpoint (since the calibration state from the previous layer is required in order to quantize correctly) it should work fine.
The problem with turning this into a feature would be designing an interface for it. And it comes at a cost of complexity, extra points of failure and maintenance debt, so there needs to be a really compelling case for it. Or someone willing to take on the responsibility of maintaining the feature indefinitely, because I'm already spread way too thin.


chore(main): release 0.30.2

:robot: I have created a release beep boop
0.30.2 (2023-04-28)
Bug Fixes

main.js location for deployment (#65) (5a4ed39)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/samuele-cozzi/obsidian-marp-slides/releases/tag/0.30.2 :sunflower:


Q: Nested Gql field resolvers and auth

Hi, thank you for this great repo.
I have two questions.

How do you handle nested field resolvers when two related entities are in different modules? e.g.

query getUser($filterUser: GetUserFilter!, $filterWallet: GetFilterWallet!) {
   getUser(filter: $filterUser) {
    id
    wallets(filter: $filterWallet) {
      id
    }
  }
}

Where authentication and authorization belong?
Let's say in our system user can update only his wallet and other entities he owns and each entity is in separate module. Should user module be shared between all modules? Can I use nestjs guards for protecting endpoints/mutations/queries?

1, Resolvers are different from simple controllers since resolvers form a Graph which can contain things from multiple modules. So you could just create one (or multiple) big shared resolver(s) outside of modules folder. This way you'll avoid coupling between modules.

Alternative approach would be just create a field resolver for a wallet inside a wallet module, and use it from a user module, but this creates coupling between modules.
2, You can create Auth module for that and communicate with it using commands, for example send a LoginUserCommand to AuthModule and see the result. Using nestjs guards is fine too, but at some point you may want to separate AuthModule into a separate microservice and you'll need to communicate with it by sending commands to a message broker. It all depends on your app, if you want it simple just go with nestjs guards and share AuthModule between other modules


Which version is the playground using?

Which version of etcd(2/3) is used in the playground? Thanks

We use etcd 3 with embedded etcd. Here's dependency spec https://github.com/coreos/etcdlabs/blob/master/Gopkg.toml.

@gyuho Perfect, thank you.
You can close the issue as well.


Add configurable temperature step

Description:
Add configuration parameter temp_step to MQTT climate component to allow setting temperature steps lower than 1.0 degrees.
This is my first pull request, any comments highly appreciated. 🙇
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#6084
Example entry for configuration.yaml (if applicable):
climate:
- platform: mqtt
  name: Test
  initial: 21
  min_temp: 17
  max_temp: 30
  temp_step: 0.25
  temperature_command_topic: "hvac/temperature/set"

Checklist:

[X] The code change is tested and works locally.
[X] Local tests pass with tox. Your PR cannot be merged unless tests pass

If user exposed functionality or configuration variables are added/changed:

[X] Documentation added/updated in home-assistant.github.io

If the code communicates with devices, web services, or third-party tools:

[ ] New dependencies have been added to the REQUIREMENTS variable (example).
[ ] New dependencies are only imported inside functions that use them (example).
[ ] New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[ ] New files were added to .coveragerc.

If the code does not interact with devices:

[X] Tests have been added to verify that the new code works.

Hi @JariInc,
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!

Hi @JariInc,
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!


Go Wasm bindings are missing an abstract class for Module

Describe the bug
In the Wasm bindings for Go, the module does not implement an interface or abstract class defining the expected methods. Unless Go doesn't have interfaces, it seems this was somehow overlooked.

I found that a Module interface exists but is not implemented in the Wasm Go template


Jenkins pipeline Plugin not working

Hi,
i was trying to get dependency Check plugin working on our Jenkins (docker container running on a Kubernetes cluster). I ran into different types of errors i couldn't find any good descriptions. So i thought i open a issue here.
SetUp:
Jenkins Version: 2.70 (based on jenkinsci/jenkins:alpine)
Dependency Check Plugin: <IP_ADDRESS>
BuildImage (based on alpine:3.5) running oracle Java 1.8.131 for maven builds
Problem #1
Executing the following snippet (generated with Pipeline Syntax) to generate a Dependency Check Report
        stage("Dependency Check") {							  		             	step([$class: 'DependencyCheckBuilder',              	            	     datadir: '',              	            	    hintsFile: '',              	            	    includeCsvReports: false,              	            	    includeHtmlReports: true,              	            	    includeJsonReports: false,              	            	    isAutoupdateDisabled: false,              	            	    outdir: '',              	            	    scanpath: '',              	            	    skipOnScmChange: false,              	            	    skipOnUpstreamChange: false,              	            	    suppressionFile: '', zipExtensions: ''])          }
got me the following error i can't find a solution for (only problems from 2015 on much older plugin versions which are allready fixed )
java.io.NotSerializableException: hudson.ClassicPluginStrategy$AntClassLoader2 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184) 	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509) 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348) 	at hudson.remoting.UserRequest._serialize(UserRequest.java:218) 	at hudson.remoting.UserRequest.serialize(UserRequest.java:227) Caused: java.io.IOException: Unable to serialize org.jenkinsci.plugins.DependencyCheck.AbstractDependencyCheckBuilder$1@79b7cad6 	at hudson.remoting.UserRequest.serialize(UserRequest.java:229) 	at hudson.remoting.UserRequest.<init>(UserRequest.java:85) 	at hudson.remoting.Channel.call(Channel.java:837) 	at org.jenkinsci.plugins.DependencyCheck.AbstractDependencyCheckBuilder.perform(AbstractDependencyCheckBuilder.java:86) 	at org.jenkinsci.plugins.DependencyCheck.DependencyCheckBuilder.perform(DependencyCheckBuilder.java:194) 	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80) 	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67) 	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:49) 	at hudson.security.ACL.impersonate(ACL.java:260) 	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:46) 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 	at java.util.concurrent.FutureTask.run(FutureTask.java:266) 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 	at java.lang.Thread.run(Thread.java:745) Finished: FAILURE
The job is partly executed in a Kubernetes Pod where the Buildimage is started.

Anyone got an Idea for this? I read some stuff about Settings not getting passed from master to slave but i couldn't really make sense of it.
Problem #2
Running Dependency Check locally with the maven plugin is working just fine. But since i couldn't get the Plug into work i tried to include it in the maven build on Jenkins witch left me with the following error:
[INFO] No dependencies were identified that could be analyzed by dependency-check [INFO] Checking for updates [INFO] starting getUpdatesNeeded() ... [ERROR] IO Exception: Connection reset [ERROR] IO Exception: Connection reset [WARNING] Unable to download the NVD CVE data; the results may not include the most recent CPE/CVEs from the NVD. [INFO] If you are behind a proxy you may need to configure dependency-check to use the proxy. [WARNING] Unable to update Cached Web DataSource, using local data instead. Results may not include recent vulnerabilities. [ERROR] No documents exist
Researching this got me to the page https://jeremylong.github.io/DependencyCheck/data/index.html
were this problem is described.
But:

we are not behind a proxy
a curl from the container with the buildimage to https://nvd.nist.gov/vuln/data-feeds works just fine
the buildimage doesn't use openJDK but plain oracle java 1.8.131 (because of this i don't think the tls settings are involved)

any ideas to fix either one of the problems would be really appreciated since i really like the tool and plugin and want to include this in our CI.
Thanks in advance

For problem 1 (Jenkins), can you move the ticket over to https://issues.jenkins-ci.org/ please.

Done: https://issues.jenkins-ci.org/browse/JENKINS-45782

@BjoernWeiler for problem 2 - when you are running dependency-check in the Maven build can you provide any details about the configuration and how you are running dependency-check?  Also, running with -X can provide additional debugging information to figure out where the error occurred.

Dependency Check rusn with the first clean deploy from jenkins maven plugin with the following Configuration in the pom:
<plugins> 	<plugin>                 <groupId>org.owasp</groupId>                 <artifactId>dependency-check-maven</artifactId>                 <version>2.1.0</version>                 <configuration>                     <cveValidForHours>12</cveValidForHours>                     <failOnError>false</failOnError>                     <failBuildOnCVSS>10</failBuildOnCVSS>                     <jarAnalyzerEnabled>true</jarAnalyzerEnabled>                 </configuration>                               <executions>                     <execution>                     	<id>owasp-execution</id>		                         <goals>                             <goal>check</goal>                         </goals>                     </execution>                 </executions>             </plugin>			 </plugins>
Running with debug information gives the following errors:
[DEBUG] Checking for updates from: https://nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-2006.xml.gz [DEBUG] Available Protocols: [DEBUG] SSLv2Hello [DEBUG] SSLv3 [DEBUG] TLSv1 [DEBUG] TLSv1.1 [DEBUG] TLSv1.2 [ERROR] IO Exception: Connection reset [DEBUG] Exception details java.net.SocketException: Connection reset 	at java.net.SocketInputStream.read(SocketInputStream.java:210) 	at java.net.SocketInputStream.read(SocketInputStream.java:141) 	at sun.security.ssl.InputRecord.readFully(InputRecord.java:465) 	at sun.security.ssl.InputRecord.read(InputRecord.java:503) 	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973) 	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) 	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) 	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) 	at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559) 	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) 	at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153) 	at org.owasp.dependencycheck.utils.Downloader.getLastModified(Downloader.java:254) 	at org.owasp.dependencycheck.utils.Downloader.getLastModified(Downloader.java:221) 	at org.owasp.dependencycheck.data.update.NvdCveUpdater$TimestampRetriever.call(NvdCveUpdater.java:574) 	at org.owasp.dependencycheck.data.update.NvdCveUpdater$TimestampRetriever.call(NvdCveUpdater.java:547) 	at java.util.concurrent.FutureTask.run(FutureTask.java:266) 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 	at java.lang.Thread.run(Thread.java:748) [DEBUG] Setting: downloader.quick.query.timestamp='false' [DEBUG] Available Protocols: [DEBUG] SSLv2Hello [DEBUG] SSLv3 [DEBUG] TLSv1 [DEBUG] TLSv1.1 [DEBUG] TLSv1.2 [ERROR] IO Exception: Connection reset [DEBUG] Exception details java.net.SocketException: Connection reset 	at java.net.SocketInputStream.read(SocketInputStream.java:210) 	at java.net.SocketInputStream.read(SocketInputStream.java:141) 	at sun.security.ssl.InputRecord.readFully(InputRecord.java:465) 	at sun.security.ssl.InputRecord.read(InputRecord.java:503) 	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973) 	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) 	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) 	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) 	at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559) 	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) 	at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153) 	at org.owasp.dependencycheck.utils.Downloader.getLastModified(Downloader.java:254) 	at org.owasp.dependencycheck.utils.Downloader.getLastModified(Downloader.java:221) 	at org.owasp.dependencycheck.data.update.NvdCveUpdater$TimestampRetriever.call(NvdCveUpdater.java:574) 	at org.owasp.dependencycheck.data.update.NvdCveUpdater$TimestampRetriever.call(NvdCveUpdater.java:547) 	at java.util.concurrent.FutureTask.run(FutureTask.java:266) 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 	at java.lang.Thread.run(Thread.java:748)
Seems to be a handshake problem but i dont know why :/

@BjoernWeiler just confirming, using the maven plugin from your workstation is successful and the maven plugin fails when you attempt to run it from your CI?

yes.

@stevespringett does this look like the throttling issue we've seen?

In the case of the Jenkins plugin running multiple simultaneous jobs, the exceptions are a bit higher up the stack, specifically an UpdateException is thrown when the NVD send back a 403. However, I think a 403 with the server closing the connection will actually result in a connection reset, so this is something we should anticipate and educate users on.


Is it safe to create an app-level DataLoader instance that isn't cached?

I'm looking for more code examples of DataLoader.
I understand why there should be a new data loader for every request for cached data loaders per data type.
However for QueryLoaders, where the data is not cached, is it safe to make it an app-level data loader where its instance is created only once in app start?

I have a dozen app-level dataloaders that are shared among all requests. Each of those loaders is linked to a relatively small source, and will never cache more than ~5,000 records. I think the only issue with having a long-living dataloader is the risk of an unbound cache - as you load more data, it chews up more memory, potentially infinitely so. However, if your dataset is inherently limited (e.g. a list of all companies listed on Nasdaq) then your dataloader is naturally capped by your domain size.

@ashah888 I don't see any advantage of sharing a DataLoader instance at app level but without cache enabled. Maybe i've missed something and could you please explain more? thanks!
@eugene1g i have the similar idea as yours that each data model(entity) has a DataLoader instance at app level. But if a data model can have multiple query fields, there would be many loaders, e.g. idLoader, nameLoader ..., and you have to keep the data in sync among these loaders. So i am still looking for examples or stuff like best practices. As the memory concern you mentioned, i think it's not a problem because DataLoader constructor supports cache parameter, and we can pass a object such as lru-cache for memory management. I'd like to hear your opinions, thanks!

@luckydrq I haven't heard of lru-cache before, and it seems like a nifty way to cap memory usage for a single dataloader. Using it means we can set the memory cap for each loader independently. In regards to having multiple dataloaders for the same data (e.g. idLoader/nameLoader) - I have a only single dataloader responsible for fetching/building the object based on the primary key (eg id/slug/username). Then I have several mappers that will normalize other inputs into the main PK for the object. For example -
// I don't really do this
const user1 = await idLoader.load(1)
const user2 = await usernameLoader.load('john123')

// but rather this
const user1 = await userLoader.load(1)
const user2Pk = await mapToUserId({ username: 'john123'}) // or {email<EMAIL_ADDRESS>const user2 = await userLoader.load(user2Pk)

// which also backs this API
const searchResults = await matchUserIds({country: 'SG', gender: 'F'})
const matchingUsers = await userLoader.loadMany(searchResults)

So whether I end up with a user object by id or username or as part of a search query, it's always the same identical object (in the === sense). This way I don't have to sync data between multiple dataloaders, and only need to optimise my mapping/searching helpers for low latency. For example, the simple username->id helper keeps its own cache of {[username]: id} so the conversion incurs essentially no cost.

@eugene1g thanks for reply! I have a general idea about the mappers you mentioned, but how does the mapper resolve other key to PK? That is , when you do:
const user1 = await userLoader.load(1)
const user2Pk = await mapToUserId({ username: 'john123'})

What happens in mapToUserId? Does it have to fetch database again? I'm a little confused in here.

Does it have to fetch database again?
Pretty much. Or whatever the persistence layer is. This is a contrived example, but conceptually it could look something like this -

let lookupCache = {}
const mapToUserId = async ( username:string ) : Promise<number|null> => {
    if( !lookupCache[username] ) {
        const dbResult = await db.fetchRow('select id from person where username = ?', username)
        if( dbResult ) lookupCache[username] = parseInt(dbResult.id)
        // alternatively: lookup via Redis
    }
    return lookupCache[username] || null
}

If you squint hard enough, mapToUserId looks like a Dataloader itself.
So for performance reasons, I have to think about 3 scenarios:

No cache. One query in mapToUserId and one query in userLoader.
Partial cache. Either mapToUserId or userLoader has been envoked for a given entity, so there is only 1 query.
Full cache hit. Almost no cost to run both the mapper and the Dataloader, but I can use either one elsewhere as an independent building block.

An alternative implementation could be to make your Dataloader smart enough to know about all the possible primary keys in your model. So if we continue with this simple example with a user_id/username, the loader could look like this -
const fetchUsers = async (keys: <Array<string|id>>) : Promise<Array<UserType>> => {
	// assume that any PK passed as a string is a username
	const usernames = keys.filter( (key: any) : bool => (typeof key === 'string'))
	// assume that any PK passed as a number is an id
	const ids = keys.filter( (key:any) : bool => (typeof key === 'number'))

	// find rows matching the predicates
	const allRows = await pg.many('select * from user where username in ({usernames:csv}) or id in ({$ids:csv}', { usernames, ids} )

	//start building a cache for each requested key
	let byUsername = {}
	let byId = {}

	//register each result against the type of PK used to find it
	for( const row of allRows ){
		if(usernames.includes(row.username)) byUsername[row.username] = row
		if(ids.includes(row.id)) byId[row.id] = row
	}

	// return all records in the order that was requested in the original list of keys
	const orderedResults = keys.map( (key:any) : UserType|null => (byUsername[key] || byId[key] || null))
	return orderedResults
}

const userLoader = new DataLoader(fetchUsers)
// then free to use a singe dataloader like so
const users = await userLoader.loadMany(['john',12,null])

Though the 'complex dataloader' could get fragile as you'd have add smart filters to interpret which PK the end-user actually wanted (relying on typeof could be insufficient).

I got your point. To be honest, i still not very satisfy with this approach as it is complex and hard to maintain if the types of user land key grows fast. I'd think it about later and like to share with you in the future.
Now i have another question: how do you deal with the situation that keys-values are not matched with DataLoader?
Let's say there are three Posts in database:
// Posts
[{
  id: 1,
  author: 'john',
  content: '...'
}, {
  id: 2,
  author: 'john',
  content: '...'
}, {
  id: 3,
  author: 'alex',
  content: '...'
}]

The nameLoader would throw error if just call nameLoader('john') because there are two records for john. I'd like to hear your advice as i think this is also quite common.

Definitely, I don't like the idea of complicated dataloaders either, and that's why I ended up with several mappers to find a single primary key for a specified user request, then feed that PK to the Dataloader.

how to deal with the situation that keys-values are not matched
Can you please rephrase this point? Dataloaders operating on primary keys, so those would never clash (and that's enforced with unique values  on the database level as well).

Can you please rephrase this point?
My bad, the words are ambiguous. Yes, a none-primary(unique) key is what i mean. I understand the principle that DataLoader follows, but i want to use DataLoader as a complete solution for cache strategy that reduces network IO. When I say complete i mean more scenarios coverage, including what i mentioned above.  So i am looking for a solution that built on top of DataLoader.

If i have to do idLoader.load(id) and db.posts.select({ name: 'john' }) to cover different queries, it feels not quite elegant and also effcient because db.posts.select has no cache at all. Not sure if my point is clear. Thanks!

I'm also trying to understand the best design to handle loading records from a table using different query fields with data loader.
Seems this conversation was left hanging. Has anyone made progress on this?
I don't really like the mapping idea because it's an extra request. But I understand it's simplicity is attractive.

Fo those that want batching but not caching, Why can't find() or findMany() take multiple query field args instead of just a pk? Could that be done as is?

@dcworldwide now i realize that DataLoader is best used as per-request cache. I think this thread has made the point nice and clear. So maybe our expectations for what DataLoader can do us is over exceeded. Now i will have idLoaders(query by id field which is primary key) and other loader instances such as  nameLoaders(query by name field which is unique key).

@luckydrq thanks, I've settled on the same design too.

I believe this is safe only in very careful circumstances, but I wouldn't recommend the pattern.
Specifically it is safe if:

performing an access-control check after loading the data to ensure that two users with different access-control loading the same value does not break access-control rules.

the results do not contain any user-specific data and are never mutating the loaded results with any user-specific data that could accidentally be shared across requests and create a privacy issue.

In these cases, it would be safe to have application-level caches instead of request-level caches, however then you might consider keeping the cache to improve performance, just being cautious of memory growth, perhaps with an LRU cache.
Though in my personal opinion, the cost of a mistake is too high with this design and per-request instances of DataLoader dramatically reduces the cost of mistake by limiting shared information between requests.

@dcworldwide I've created this module trying to help improve convenience and performance to deal with relational database. Hope it will help :)


Show data from DB

Changes:

Make the following pages use DB data:

Block Index.
Block Detail.
Transaction Detail.
Transaction Index
Index

Add "seeds" for development.

How to test:

Run the db dump with make seed and check the details and index pages.

Update the README instructing to run make seed for local development

Closing this in favor of #104


🐛 No FluentLocalizations found.

Describe the bug
A clear and concise description of what the bug is.
The following assertion was thrown while handling a gesture:
No FluentLocalizations found.
MyApp widgets require FluentLocalizations to be provided by a Localizations widget ancestor.
The fluent library uses Localizations to generate messages, labels, and abbreviations.
To introduce a FluentLocalizations, either use a FluentApp at the root of your application to
include them automatically, or add a Localization widget with a FluentLocalizations delegate.

To Reproduce
Steps to reproduce the behavior:
Click Button
code:
import 'package:fluent_ui/fluent_ui.dart';
import 'package:system_theme/system_theme.dart';

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<StatefulWidget> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  int index = 0;

  @override
  Widget build(BuildContext context) {
    return FluentApp(
      localizationsDelegates: const [
        DefaultFluentLocalizations.delegate,
      ],
      supportedLocales: const [
        Locale('en'),
        Locale('zh'),
      ],
      locale: const Locale('zh'),
      theme: ThemeData(
        accentColor: Colors.blue,
        brightness: SystemTheme.isDarkMode ? Brightness.dark : Brightness.light,
      ),
      home: NavigationView(
        appBar: const NavigationAppBar(title: Text("Fluent Design App Bar")),
        pane: NavigationPane(
          selected: index,
          onChanged: (i) => setState(() => index = i),
          displayMode: PaneDisplayMode.auto,
          items: [
            PaneItem(
                icon: const Icon(FluentIcons.code),
                title: const Text("Sample Page 1")),
            PaneItem(
                icon: const Icon(FluentIcons.user_window),
                title: const Text("Sample Page 2"))
          ],
        ),
        content: NavigationBody(
          index: index,
          children: [
            ScaffoldPage(
              header: const Text(
                "Sample Page 1",
                style: TextStyle(fontSize: 60),
              ),
              content: Center(
                child: Button(
                  child: const Text("Click Me!"),
                  onPressed: () {
                    showDialog(
                        context: context,
                        builder: (context) {
                          return const ContentDialog(
                            title: Text("This is a content dialog"),
                            content: Text(
                                "Dialogs are modal UI overlays that provide contextual app information. They block interactions with the app window until being explicitly dismissed. They often request some kind of action from the user."),
                          );
                        });
                  },
                ),
              ),
            ),
            const ScaffoldPage(),
          ],
        ),
      ),
    );
  }
}

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
══╡ EXCEPTION CAUGHT BY GESTURE ╞═══════════════════════════════════════════════════════════════════
The following assertion was thrown while handling a gesture:
No FluentLocalizations found.
MyApp widgets require FluentLocalizations to be provided by a Localizations widget ancestor.
The fluent library uses Localizations to generate messages, labels, and abbreviations.
To introduce a FluentLocalizations, either use a FluentApp at the root of your application to
include them automatically, or add a Localization widget with a FluentLocalizations delegate.
The specific widget that could not find a FluentLocalizations ancestor was:
  MyApp
The ancestors of this widget were:
  ...
  [root]

When the exception was thrown, this was the stack:
#0      debugCheckHasFluentLocalizations.<anonymous closure> (package:fluent_ui/src/utils.dart:52:7)
#1      debugCheckHasFluentLocalizations (package:fluent_ui/src/utils.dart:73:4)
#2      showDialog (package:fluent_ui/src/controls/surfaces/dialog.dart:229:10)
#3      _MyAppState.build.<anonymous closure> (package:grasscutter_tools/app.dart:56:21)
#4      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:198:24)
#5      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:613:11)
#6      BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:298:5)
#7      BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:269:7)
#8      GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:157:27)
#9      GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:449:20)
#10     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:425:22)
#11     RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:329:11)
#12     GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:380:7)
#13     GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:344:5)
#14     GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:302:7)
#15     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:285:7)
#19     _invoke1 (dart:ui/hooks.dart:170:10)
#20     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:331:7)
#21     _dispatchPointerDataPacket (dart:ui/hooks.dart:94:31)
(elided 3 frames from dart:async)

Handler: "onTap"
Recognizer:
  TapGestureRecognizer#3385d
════════════════════════════════════════════════════════════════════════════════════════════════════

Hi there @RealHeart!
This looks weird, zh localization is included in latest 3.12.0. What version of FluentUI are you using ?

Hi there @RealHeart! This looks weird, zh localization is included in latest 3.12.0. What version of FluentUI are you using ?

3.12.0

Ok, so it seems like a valid issue, but I'm not sure why this is happening.

showDialog( context: context, builder: (context) { return const ContentDialog( title: Text("This is a content dialog"), content: Text( "Dialogs are modal UI overlays that provide contextual app information. They block interactions with the app window until being explicitly dismissed. They often request some kind of action from the user."), ); });

the showDialog function is using the context from the buildFunction. Wrap your button in a Builder and it should work fine

Closing as resolved


Move visdiff bucket configuration to env var

@jzila Here's a first step to changing the bucket config.

https://github.com/keybase/client/commit/b1163f4d45ec552ca0894cf16b4967998c20a7b6


Add ability to set default action

Extension
https://www.raycast.com/es183923/change-case
Description
Add ability to change default action form copy to clipboard to past to active app
Who will benefit from this feature?
No response
Anything else?
No response

u can submit a pr to do this, i don't have the time to do it right now


Improve firestore data access efficiency

Currently, we do not cache firestore data. Every query we run or document we access results in new server fetches. This generates a lot of reads per client. Additionally, each access hook instance is independent, so multiple components can fetch the same document on the same page from the server, rather than sharing a single read.
We can make data access more efficient by caching document reads and/or moving application state to a global scope so that access hooks share reads. Some options:

Try enabling offline persistenct on the firestore sdk. This only works on the first open tab, and requires us to load the firestore sdk components asynchronously, which involves some additional refactoring
Integrate redux-toolkit for global application state. This would also improve separation between UI and data access/reducer logic
Integrate a data fetching library that supports caching. react-query and swr are popular. If we integrate redux-toolkit, we can use RTK-query. These libraries are designed to run against a REST or Graphql endpoint, but we can likely adapt them for our use against our firestore database.

This hasn't proved an issue on the site. Even though we do duplicate reads on the page, the cost is negligable so it's not worth optimizing.


RefreshScope not working with CosmosClientBuilder

We are using azure-spring-data-cosmos and annotating CosmosClientBuilder with @Refreshscope so that when there is a change in the credentials cosmos builder will be recreated and injected to dependencies without restart of our app.
I followed a similar issue raised in the thread https://github.com/Azure/azure-sdk-for-java/issues/13876 which has been closed. I updated my dependencies as mentioned in the thread above. Still I am seeing an exception when annotate with @RefreshScope. When I remove @RefreshScope no error is observed. Error I am seeing is related to CosmosFactory reflection to get the userAgentSuffix field. Error below,
"java.lang.NoSuchFieldException: userAgentSuffix
at java.lang.Class.getDeclaredField(Class.java:2070) ~[na:1.8.0_251]
at com.azure.spring.data.cosmos.CosmosFactory.getUserAgentSuffixValue(CosmosFactory.java:86) [azure-spring-data-cosmos-3.5.0.jar:na]
at com.azure.spring.data.cosmos.CosmosFactory.updateCosmosClientBuilderWithUASuffix(CosmosFactory.java:75) [azure-spring-data-cosmos-3.5.0.jar:na]
at com.azure.spring.data.cosmos.CosmosFactory.createCosmosAsyncClient(CosmosFactory.java:70) [azure-spring-data-cosmos-3.5.0.jar:na]
at com.azure.spring.data.cosmos.config.AbstractCosmosConfiguration.cosmosAsyncClient(AbstractCosmosConfiguration.java:57) [azure-spring-data-cosmos-3.5.0.jar:na]
Our configurations below,
    ```
  @Bean
@RefreshScope
public CosmosClientBuilder cosmosClientBuilder() throws IOException, SecurityException, NoSuchFieldException {
	log.info("Initializing cosmosClientBuilder..");
	Path path = Paths.get("/Users/aaaaa/Desktop/cosmosSetting.properties");
	DirectConnectionConfig directConnectionConfig = new DirectConnectionConfig();
    GatewayConnectionConfig gatewayConnectionConfig = new GatewayConnectionConfig();
    this.azureKeyCredential = new AzureKeyCredential(Files.readAllLines(path).get(1));
    CosmosClientBuilder cosmosClientBuilder = new CosmosClientBuilder();
    cosmosClientBuilder.endpoint(Files.readAllLines(path).get(0))
    		          .key(Files.readAllLines(path).get(1))
    		          .directMode(directConnectionConfig, gatewayConnectionConfig)
    		          .connectionSharingAcrossClientsEnabled(true)
    		          .contentResponseOnWriteEnabled(true);
    		          .userAgentSuffix("my-application1-client");
    return cosmosClientBuilder;
}

    @Bean
@Override
@RefreshScope
public CosmosConfig cosmosConfig() {
	log.info("Initializing cosmosConfig..");
	return CosmosConfig.builder().responseDiagnosticsProcessor(new ResponseDiagnosticsProcessorImplementation())
			.enableQueryMetrics(true).build();
}

**Dependencies**

<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.0</version>

<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-spring-data-cosmos</artifactId>
<version>3.5.0</version>
</dependency>

<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos</artifactId>
<version>4.13.0</version>
</dependency>

<dependency>
<groupId>io.projectreactor.netty</groupId>
<artifactId>reactor-netty</artifactId>
<version>1.0.4</version>
</dependency>

<dependency>
    <groupId>io.projectreactor.netty</groupId>
    <artifactId>reactor-netty-http</artifactId>
    <version>1.0.4</version>
</dependency>

<!-- https://mvnrepository.com/artifact/io.projectreactor.netty/reactor-netty-core -->
<dependency>
    <groupId>io.projectreactor.netty</groupId>
    <artifactId>reactor-netty-core</artifactId>
    <version>1.0.4</version>
</dependency>

Please let us know if there is a solution to this problem.

Hi Team, Just an fyi same approach worked with older version of the cosmos spring which is, below
<dependency> 			<groupId>com.microsoft.azure</groupId> 			<artifactId>azure</artifactId> 			<version>1.3.0</version> 		</dependency> 		<dependency> 			<groupId>com.microsoft.azure</groupId> 			<artifactId>spring-data-cosmosdb</artifactId> 			<version>2.2.4</version> 		</dependency> 		<dependency> 			<groupId>com.microsoft.azure</groupId> 			<artifactId>azure-cosmosdb-direct</artifactId> 			<version>2.6.8</version> 		</dependency>
Config classes
`
@Bean
@Primary
@RefreshScope
public CosmosDbFactory cosmosDbFactory(CosmosDBConfig config) {
log.info("Initializing CosmosDbFactory..");
return new CosmosDbFactory(config);
}
@Bean
@Primary
@RefreshScope
public CosmosTemplate cosmosTemplate(CosmosDBConfig config) throws ClassNotFoundException{// TODO Auto-generated method stub
log.info("Initializing CosmosTemplate..");
return new CosmosTemplate(this.cosmosDbFactory(config), this.mappingCosmosConverter(),
config.getDatabase());
}
@Bean
@RefreshScope
public CosmosDBConfig getConfig() {
log.info("Initializing CosmosDBConfig..", cosmosSetting.isPopulateQueryMetrics());
this.cosmosKeyCredential = new CosmosKeyCredential(cosmosSetting.getKey());
CosmosDBConfig cosmosdbConfig =
CosmosDBConfig
.builder(cosmosSetting.getUri(), this.cosmosKeyCredential, cosmosSetting.getDbName())
.build();
cosmosdbConfig.setPopulateQueryMetrics(cosmosSetting.isPopulateQueryMetrics());
cosmosdbConfig
.setResponseDiagnosticsProcessor(new ResponseDiagnosticsProcessorImplementation());
cosmosdbConfig.getConnectionPolicy().userAgentSuffix(
"/xxxxxxx");
log.info("PopulateQueryMetrics is set to {}", cosmosSetting.isPopulateQueryMetrics());
return cosmosdbConfig;
}
`

Hi @kushagraThapar , could you help to look into this issue? Thanks~

@abuinteam  - Instead of using @RefreshScope on the configuration and cosmos client builder bean, can you just refresh the key inside the AzureKeyCredential object reference.
The main purpose of using AzureKeyCredential is that when you need to refresh the keys, just set the new keys in the same AzureKeyCredential object, and Cosmos SDK will automatically pick up the new keys.

Hi @kushagraThapar I will give a try on this.
We got another rare scenario where the connection URL of the CosmosDB needs to be updated on the fly. Is there any way we can do it?

@kushagraThapar Thats right data center fail over is automatic from Azure SDK. There were scenarios such as a network outage on our end and during which we cant able to use the load balanced cosmos db URL and was particularly have to point to particular region based URL.
So basically, we would like to see if we can achieve refreshing connections on demand without app restart, the feature supported by spring-data-cosmos https://github.com/microsoft/spring-data-cosmosdb/issues/353. Same kind of URL refresh is available part of other relational DB we are handling right now so it will be cool if it is available for CosmosDB


Localize system context menu

Take into account this PR is only addressing those elements that are appended by us, I brought up a bigger conversation here to figure out what to do with the ones added by default by the OS.
Details

Fixed Issues

$ https://github.com/Expensify/App/issues/13414
PROPOSAL: GH_LINK_ISSUE(COMMENT)
Tests / Offline tests / QA Steps
On mac desktop app:

Make sure the app is in English
Open the desktop application menu
Verify the menu looks like the following image:

Click on Check For updates, the modal should show up in English.
Make sure the History menu is still appended to the bar and the items Back and Forward are in English:

Change the language of the app to Spanish in Profile> Preference and repeat the steps above. This time the highlighted menu items should be in Spanish:

Test for the rest of the platforms:

Go to profile > preferences and change the language
Verify the language is changed no matter how many times you switch back and forth.

[x] Verify that no errors appear in the JS console

PR Author Checklist

[X] I linked the correct issue in the ### Fixed Issues section above
[X] I wrote clear testing steps that cover the changes made in this PR
[X] I added steps for local testing in the Tests section
[X] I added steps for the expected offline behavior in the Offline steps section
[X] I added steps for Staging and/or Production testing in the QA steps section
[X] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[X] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[X] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
[X] I included screenshots or videos for tests on all platforms
[X] I ran the tests on all platforms & verified they passed on:

[X] Android / native

[X] Android / Chrome
[X] iOS / native
[X] iOS / Safari
[X] MacOS / Chrome / Safari
[X] MacOS / Desktop
[X] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[X] I followed proper code patterns (see Reviewing the code)
[X] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[X] I verified that comments were added to code that is not self explanatory
[X] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[X] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[X] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[X] I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[X] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[X] I verified the JSDocs style guidelines (in STYLE.md) were followed
[X] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[X] I followed the guidelines as stated in the Review Guidelines
[X] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[X] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[X] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[X] I verified that if a function's arguments changed that all usages have also been updated correctly
[X] If a new component is created I verified that:

[X] A similar component doesn't exist in the codebase

[X] All props are defined accurately and each prop has a /** comment above it */
[X] The file is named correctly
[X] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[X] The only data being stored in the state is data necessary for rendering and nothing else
[X] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[X] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[X] All JSX used for rendering exists in the render method
[X] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
[X] If any new file was added I verified that:

[X] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[X] If a new CSS style is added I verified that:

[X] A similar style doesn't already exist

[X] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
[X] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[X] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[X] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[X] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web
https://user-images.githubusercontent.com/6474442/208486653-0d356546-aa18-425a-b021-8a678b984dda.mp4

Mobile Web - Chrome
https://user-images.githubusercontent.com/6474442/208925604-f60cbbaa-9ec1-43f4-8bf4-f7e447bd1bf7.mp4

Mobile Web - Safari
https://user-images.githubusercontent.com/6474442/208925621-548d6630-8065-4ab1-ae76-57f8dafc76a9.mp4

Desktop
https://user-images.githubusercontent.com/6474442/208483096-b23b2dda-7fe3-40a3-9edf-157bfe13a5de.mp4

iOS
https://user-images.githubusercontent.com/6474442/208922750-805e413e-42db-4256-93a1-aec5f510baf3.mp4

Android
https://user-images.githubusercontent.com/6474442/208521651-a46165e8-39d6-4870-9dd1-8e6c64ad5b4d.mp4

Oh, and it would be great to include a link to the Electron issue that explains why we have to only show/hide menu items rather than re-creating the app menu dynamically.

Thank you for all the comments, they were super helpful! The only one that I didn't manage to get it working is this one https://github.com/Expensify/App/pull/13430#discussion_r1050250335. If I don't leave the callback inside onyx, it won't get run. Not sure if I am missing something there.

It should be ready for review.

Updated and retested! Everything is still working

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by @roryabraham in version: 1.2.44-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by @chiragsalian in version: 1.2.44-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Potential for out-of-range error to overwrite a user's reset_offsets instruction?

( @emmett9001 I got thinking about this while reviewing #265, but since I shouldn't be heaping multiple issues into the same thread as I've done in the past, here's a fresh ticket :))
I believe that in the usage model that @zsimpson describes in #253 -- where you'd start a new consumer, then immediately call reset_offsets() on it -- there's a special case where you might end up with the default auto_offset_reset value, rather than whatever you just passed to reset_offsets(). Here's the sequence of events (or the theory, anyway):

user starts a new consumer
in start(), fetch_offsets() runs, which happens to obtain a bunch of stale offsets (this is the special case -- maybe it's because the topic's just been compacted; whatever)
the fetch-worker starts, enters fetch(), grabs a bunch of fetch locks
user calls reset_offsets()
reset_offsets() blocks trying to get a lock that the fetch-worker holds
the fetch-worker gets a response with OffsetOutOfRangeError on all partitions (not necessarily all, but that's the easiest case to reason about)
the fetch-worker then releases locks on those partitions
this means the user's reset_offsets() call can now grab those locks, and do its work
the fetch-worker waits for that to finish, then continues with its own resets
end result: the user-provided offsets got clobbered

I suspect it's really hard to get a test case written that demonstrates this reliably, but if we're happy to merge a fix without that test case, I'd think not releasing the locks before resetting, and instead using an RLock should do the trick. Happy to take a shot at that.

On reconsidering this, I don't think it's likely to be a common scenario. I do believe fixing it would be worthwhile, because it would also simplify that code a little bit, but I'll drop it to the very bottom of the list on waffle.io

I agree this isn't high-priority, since the preferred way to reset offsets after starting a consumer is to simply set reset_offsets_on_start=True in the consumer constructor.


[DOCS] AnimationPlayer prop API fixed

I believe this should fix the problem since I've switched the exposed API back to normal.
The only properties modified now are just the ADD_PROPERTY tidbits that don't have any risks attached since they're just binding the prop name to a getter and setter. I'm no longer changing the names of those getter/setter.

cc @akien-mga

@akien-mga LGTM, the error message by godt start (irc) is gone. Thanks.


Add QRCodeReaderViewController support

I am not a professional ios programmer, If you can support the qr code reading, that's very nice. I think it must be useful for many apps, and will be very welcome.
https://github.com/yannickl/QRCodeReaderViewController

:+1:

https://github.com/lwansbrough/react-native-camera/commit/60fe613bd1ad2ad8efca3d22e5219d173eabd6ef


Feat/todo

What type of PR is this? (check all applicable)

[ ] ♻ Refactor
[x] ✨ New Feature
[ ] 🐛 Bug Fix
[ ] 📝 Documentation Update
[ ] 👷 Example Application
[ ] 🧑💻 Code Snippet
[ ] 🎨 Design
[ ] 📖 Content
[ ] 🧪 Tests
[ ] 🔖 Release
[ ] 🚩 Other

Description

This PR integrates the todo component with web5.
Related Tickets & Documents

Resolves #74
Mobile & Desktop Screenshots/Recordings

https://github.com/user-attachments/assets/5c42a6a9-d9ed-45c4-9de9-0d134598bbd1
Added code snippets?

[x] 👍 yes
[ ] 🙅 no, because they aren't needed

Added tests?

[ ] 👍 yes
[ ] 🙅 no, because they aren't needed
[ ] 🙋 no, because I need help

No tests? Add a note

Added to documentation?

[ ] 📜 readme
[ ] 📜 contributing.md
[ ] 📓 general documentation
[x] 🙅 no documentation needed

No docs? Add a note

[optional] Are there any post-deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?

@blackgirlbytes @leordev @acekyd this is ready for review

Hey @taniashiba ..after we remove the leaderboard action from github..we need to manually add 10 points for @Johnnyevans32 to the leaderboard because this PR he did two issues in one..a large and a medium


Adds PUT Metadata API + appCommand metadata.

Description
New API to allow modification of mutable metadata attributes.
Adds appCommand as first mutable metadata attribute.
This is useful to link external state into the sidecar metadata.
Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: https://github.com/dapr/cli/issues/249 https://github.com/dapr/cli/issues/273
Checklist
Please make sure you've  completed the relevant tasks for this PR, out of the following list:

[X] Code compiles correctly
[ ] Created/updated tests
[ ] Unit tests passing
[ ] End-to-end tests passing
[ ] Extended the documentation
[ ] Specification has been updated
[ ] Provided sample for the feature

/ok-to-test


trackedTask value isn't updated

I'm trying to adopt resources in a large Ember project.  We use ember-concurrency for loading and refreshing our data.  So, ember-resources' ember-concurrency utilities are perfect for us. We have existing tasks that look like this:
refreshData = restartableTask(async () => { /* load the data */ return data; };

We jump through a bunch of hoops to figure out when to perform refreshData, most notably with render modifiers like this:

  Data here: {{this.refreshData.lastSuccessful.value}}

So, using ember-resources, we can eliminate the did-insert/did-update modifier usage by creating a resource.  The task and trackedTask look like this:
refreshData = restartableTask(async () => { /* load the data */ return data; }; // unchanged

latest = trackedTask(this, this.refreshData, () => [this.args.something]);

And the template updated to this:

  Data here: {{this.latest.value}}

So this mostly works great.  However, I'm running into a problem because we have tasks that are performed with manual triggers as well as when args change.
I assumed that I could use {{this.latest.value}} in my templates as a drop-in replacement for {{this.refreshData.lastSuccessful.value}}.
I was surprised to learn that latest.value and refreshData.lastSuccessful.value are sometimes not the same.  Specifically, when you perform the task independently, this.latest.value will not always reflect the latest value.  For example, if I update the template like this:

  Data here: {{this.latest.value}}
  <button {{on "click" (perform this.refreshData)}}>refresh</button>

If that button is pressed while the task is already running, then this.latest.value will not reflect the updated response from refreshData.
Is this expected behavior?  Is there a more idiomatic way I can use a resource here without rewriting the existing ember-concurrency tasks?
I have an demonstration of this here: https://stackblitz.com/edit/ember-cli-editor-output-u3yoew?file=app%2Fcomponents%2Fexample.gjs

I think this is, in part, an issue with ember-concurrency not supporting derived data natively.
For example, if you were to add
{{this.slowEcho.isRunning}}

or

{{this.slowEcho.last.isRunning}}

to your template, you get the infinite rendering error:
Uncaught Error:
Assertion Failed:
  You attempted to update `last` on `<Task:slowEcho>`,
  but it had already been used previously in the same computation.
  Attempting to update a value after using it in a computation can cause logical errors,
  infinite revalidation bugs, and performance issues, and is not supported.

`last` was first used:

- While rendering:
  -top-level
    application
      example
        Child
          this.slowEcho.last.isRunning
            this.slowEcho.last

This error happens because last is tracked in ember-concurrency, and is immediately invoked via trying to render latestResults (which synchronously invokes the task).
And the way tasks are invoked in ember-resources/util/ember-concurrency, https://github.com/NullVoxPopuli/ember-resources/blob/main/ember-resources/src/util/ember-concurrency.ts#L238-L242
uses the return value of perform, to get the TaskInstance and use the tracked data off that object.
So, without making changes to ember-concurrency, I would recommend a slight refactor of your code (if you wanted to stay in derived data land).
The main thing is to not use ember-concurrency.
Ember-concurrency is best used for handling concurrent user-interactions (typing, clicks, submissions, etc).
// a different utility, trackedFunction
latest = trackedFunction(this, async () => {
  // content here
});

get value() {
 return this.latest.value;
}

Docs: https://ember-resources.pages.dev/funcs/util_function.trackedFunction
This utility has a retry method built in: https://ember-resources.pages.dev/classes/util_function.State#retry

Thanks!
It looks like the retry method is exactly what I need.  And I guess I'll just have to use the keepLatest utility to replace the other behavior from ember-concurrency since the "old" value is not kept while the function resolves.


docker hub readme: build number for ltsc2022 wrong

Describe the bug
Build numbers for ltsc2022 tagged images are wrong on docker hub. See e.g. https://hub.docker.com/_/microsoft-windows-nanoserver for an example.
ltsc 2022 has 10.0.20348.x as build number while on the README (full tag listing) it's written as 10.0.14393.x which is windows server 2016.

thanks for fixing and pointing me to the links - I wasn't aware there is an MCR portal :)


Scenario compute percentage incorrect

We created a constant of -1001 to mean that the compute had reached 100%. I forgot to update the % value to be the correct number after getting the -1001 value:

This is now fixed:

todo: I should check the other computes? Alternatives, alt comp reports?
This fix is in branch update_index

please check the other computes, thank you.

Alternative percent is correct:

Alt comp report is correct:

terrific thank you


 node cause "This operation is not supported." exception

Type (choose one):

Bug

NPE version: NuGet Package Explorer - Store - X64 - (5.4.1+e95bd234fd)
OS version: Windows 10 1903
Installed from: Microsoft Store
In case of a BUG:

What is the current result?

If my package contains a <icon> node, when I click Publish it will casue an exception.

What is the expected result?

Works well even if contains  node.

Please post full exception details in case of an Exception (message, stacktrace, inner exceptions).

This operation is not supported.

Are there any workarounds? yes/no

No.

Is there a version in which it did work?

Never try.

Is there a package on Nuget.org which shows the bug?

Please try the latest version, 5.5.28. That should have working icon support.

I have try 5.5.28 just now, but has same issue.

This line throws the exception: https://github.com/NuGet/NuGet.Client/blob/c5c6ba438f4929e7ebe75e45ad69a8b113f7c388/src/NuGet.Core/NuGet.Packaging/PackageCreation/Authoring/PackageBuilder.cs#L630
In the PackageHelper the files from the ZipArchive package are added to the PackageBuilder. But zip streams don't support accessing its Length property.
https://github.com/NuGetPackageExplorer/NuGetPackageExplorer/blob/9a3863db2003a1f3b6ac33f5d9afaf756d9ccf7a/PackageViewModel/Utilities/PackageHelper.cs#L25
Steps to reproduce:

Open a package from a NuGet feed which uses an<icon> (like Newtonsoft.Json) or open a local package which uses an <icon>.
Remove package signature if there is one.
File -> Publish... or File -> Save as... or File -> Save

A possible fix would be to check for an icon file, extract it from the zip and supply that instead.

Was really hoping to avoid extracting icons as temporary files :/

This issue also affects "Readme" files in the release: NuGet Package Explorer - Zip - X64 - (5.10.4+4ab9498d27)


Change the languages icon to only show the sign language icon

In user testing, the compound icon was very confusing and difficult to understand.

New icon design in Figma: https://www.figma.com/file/AXufBnFAVHvGdsxnQMVhNF/The-Accessibility-Exchange-Wireframes?node-id=1155-10218&t=BCO4xxOfSTtmLBAX-0


React 16 configuration

React 16 broke the test so I fixed it. You now need to add in: import Adapter from 'enzyme-adapter-react-16'; ( http://airbnb.io/enzyme/docs/installation/react-16.html )
Changed the configuration in babel as it was also deprecated.
babel-preset-es2015 - > babel-preset-env
babel -> babel-cli
The test utils for 16 are included in React DOM. You can import them like so:import ReactTestUtils from 'react-dom/test-utils';
NODE_MODULES are still under 200mb.

Thanks for the PR @pgerochi but there's a merge conflict here... Could you please rebase from master branch and push this PR again?


Card titles should be blue to show clickable state.

Similar to the actionable + Selectable cards we should update the quickstarts card to have a blue title to indicate it is the clickable target.

Looks like the quickstart card title is referencing .pf-c-conent--p. which is making it 14px.
On the card component it uses:

Title

As a result the title in Quickstarts is 14px instead of 16px and it also doesn't use the Red Hat Display font.

i'll update it so that it's not getting wrapped in the content


feat: add Sparky

Hey there,
I designed/developed this pretty simple theme called Sparky; its based on Enter Shikari's The Spark and Nothing is True & Everything is Possible.
Its a little similar to Solarized but I guess it has its own spin of post-hardcore British rock.

Hello, please keep the file format with comments, also remove the 3 dashes at the end.
Thank you!

There, reformatted the YML to have comments and removed the 3 dashes; also switched to apostrophes just in case.
PD: This also made me realise that I had incorrectly filed my scheme (set my darks as brights) so I guess this mistake also came with a good ending heh.


Strict typing of global formats

Is your feature request related to a problem? Please describe.
Similar to how we support strict typing of messages, we could provide strict typing for formats.
Describe the solution you'd like
Allow the user to define IntlFormats to enable this.
Describe alternatives you've considered
Not providing strict formats.

Hey, I think I might be interested in implementing this. I was thinking of setting it close to their type definition for messages, like:
import en from './messages/en.json'
import formats from '~/i18/request.ts'

type Messages = typeof en;

declare global {
  // Use type safe message keys with `next-intl`
  interface IntlMessages extends Messages {}
type IntlFormats = typeof formats

}

If you're up for it, that would be 💯!
As far as I know, it has to be an interface in order to work. Interfaces have this special ability in TypeScript that declarations can be merged when re-declared.
Based on the implementation for the messages, I think these are the required steps:

Add a local type in use-intl/types that will be used for type checking within this repo:
https://github.com/amannn/next-intl/blob/aa60ddebea13ddbd9bf8377b28774c4a9839cd7d/packages/use-intl/types/index.d.ts#L1-L3
Use the type were relevant:
https://github.com/amannn/next-intl/blob/aa60ddebea13ddbd9bf8377b28774c4a9839cd7d/packages/use-intl/src/react/useTranslations.tsx#L24

Now, when a consumer installs the package, the IntlMessages type is not available, therefore defaulting to any. As soon as the consumer declares the type on the global namespace, this type will be picked up where relevant.
Maybe with a condition we could still ensure that only a string is accepted for a local format in case no IntlFormats are provided? That would probably be something to be researched.
Let me know in case I can help with something! 🙌

If you're up for it, that would be 💯!
As far as I know, it has to be an interface in order to work. Interfaces have this special ability in TypeScript that declarations can be merged when re-declared.
Based on the implementation for the messages, I think these are the required steps:

Add a local type in use-intl/types that will be used for type checking within this repo:
https://github.com/amannn/next-intl/blob/aa60ddebea13ddbd9bf8377b28774c4a9839cd7d/packages/use-intl/types/index.d.ts#L1-L3
Use the type were relevant:
https://github.com/amannn/next-intl/blob/aa60ddebea13ddbd9bf8377b28774c4a9839cd7d/packages/use-intl/src/react/useTranslations.tsx#L24

Now, when a consumer installs the package, the IntlMessages type is not available, therefore defaulting to any. As soon as the consumer declares the type on the global namespace, this type will be picked up where relevant.
Maybe with a condition we could still ensure that only a string is accepted for a local format in case no IntlFormats are provided? That would probably be something to be researched. EDIT: Out-of-the-box, we support the date formats full, long, medium and short—maybe we could consider that as a default (including & {} to allow user-specified strings)? For number formatting there are defaults for currency and percent.
Let me know in case I can help with something! 🙌

Thanks. Will look into it when I have some free time.


fix windows bootstrap; replicate chef/chef/pull/9839 by Chad Jessup

This fixes bootstrapping on Windows. All credit goes to Chad Jessup<EMAIL_ADDRESS>but since the original PR was left without DCO I'm replicating it here, with valid DCO.
Signed-off-by: Marc Chamberland<EMAIL_ADDRESS>
Description

Related Issue

Types of changes

[X] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

[X] I have read the CONTRIBUTING document.
[X] I have run the pre-merge tests locally and they pass.
[X] I have updated the documentation accordingly.
[X] I have added tests to cover my changes.
[X] All new and existing tests passed.
[X] All commits have been signed-off for the Developer Certificate of Origin.

Thanks @bobchaos


Document nix::sys::wait Module

I'm trying to use waitpid in Ion, but I cannot figure out what each of the WaitStatus variants and their fields represent.

Yeah, pretty much everything in src/sys/wait.rs needs docs. A lot of this should be discernible by reading the man pages on waitpid, as we're just providing a safe interface to that functionality. The main functionality should be identical.

Sadly, the man pages for waitpid aren't enough for me to understand how to use it. What's the difference between each of the variants? For example, what's the difference between Continued and StillAlive, or Stopped and Signaled?

Continued probably maps to the WIFCONTINUED wstatus value. StillAlive probably means it hasn't received any signals. Stopped and Signaled should correspond to WIFSTOPPED and WIFSIGNALED respectively. those WIF* constants are described in the waitpid man pages for more details. I'm not familiar with waitpid, so hopefully that gives you a little direction. Let me know if you get stuck again.

I'm going to work on documenting this module, after having implemented it in the Ion shell and figuring it out.