Card Number is not valid on payment edit

Describe the bug
When editing prefilled payment detail during the check process, it is not valid before chancing the card number.
To Reproduce
Steps to reproduce the behavior:

Go through the order process and enter vaild payment informations
At the placeOrder stage, press edit on payment detail
You are taken back to the payment stage
The form is filled out with all the payment details
Confirm again without editing the payment details and nothing happens.
The browser developer tools shows that a call is made to "CheckoutServices-SubmitPayment" but the response includes this: fieldErrors: [{dwfrm_billing_creditCardFields_cardNumber: "Please enter the Number as it appears on your card"}]
Delete just one number from the prefilled card number and write it again
Confirm again and you are taken to the placeOrder stage.

Expected behavior
When editing the payment details it should be possible to confirm without having to edit the card number. It works correctly for the expiration date and CVC.
Desktop (please complete the following information):

OS: MacOS 12.0.1
Browser: Chrome
Version: 96.0.4664.93

Hi @soerensiegjensen,
Thank you for raising this issue.
I was not able to reproduce your issue with our latest cartridge version.
What cartridge version are you experiencing this issue on?
Kind regards,
Wouter
Adyen

Hi @wboereboom
Thanks for a fast reply.
I am running on v20.1.3. I know it is not the newest version, but would like to wait until after the holiday season with updating. Could this issue have been fixed with PR #538? Because that would be easy to fix in my version of the Adyen Cartridge. If not, could you point me to the possible fix?
Best regards
Søren

Hi @soerensiegjensen ,
I've been trying to reproduce the issue, but it seems to work fine if I reproduce the steps you listed above.
I tested it on my side with v20.1.3 and SFRA version 5.3.0.
Which SFRA version did you test it with?
Thanks,
Bas Maassen
Adyen

Hi @maassenbas,
Thanks for the update. I am running on SFRA 5.1.0.
Thanks
Søren

Hi @maassenbas,
Just following up on this. Were you able to see a possible solution?
Thanks
Søren

Hey @soerensiegjensen,
Apologies for the late reply. @maassenbas is currently on leave.
We're still not able to reproduce the problem on our test sandboxes. Could you please share a screen recording of what happens? I will also try to reproduce it on older SFRA versions and see.
Regards,
Zaid
Adyen


electrs: 0.8.6 -> 0.8.7

Motivation for this change

version update

Things done

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

[ ] NixOS
[x] macOS
[ ] 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"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

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

1 package built:

electrs


Bootstrap modal not working with this template

I use a simple bootstrap modal from bootstrap 4.0 documentation, when I show the modal, modal is not visible and transparent layer will prevent me to click anywhere on the page.
This is the code of my modal:

Komplain

				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					×
				</button>

<?=dom_img_spinner?>

				<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
				<button type="button" class="btn btn-primary">Save changes</button>

Please share the HTML code of the element which triggers the modal.

please add the attributes data-toggle="modal" data-target="#modal_komplain" to the trggering element and remove the triggering through script.
Please refer http://getbootstrap.com/docs/4.1/components/modal/#live-demo for more details.

please add the attributes data-toggle="modal" data-target="#modal_komplain" to the trggering element and remove the triggering through script.
Please refer http://getbootstrap.com/docs/4.1/components/modal/#live-demo for more details.

I also have this problem with modal, I am used to open them from codebehind using an hidden button and a small piece of jscript, like this:
Launch demo modal

and this code behind call: ClientScript.RegisterStartupScript(Me.GetType(), "alert", "ShowModal();", True)
This works on all my other bootstrap project except the one where i'm using sb admin template.
I need to edit what the modal will show by changing its components texts and visibility and I don't know how to do this without using code behind. So I don't want to open them using  attributes data-toggle and data-target


Glass emits light underwater

Theres no light sources there, kinda weird

What other mods do you use?

Yep, I tested it without indium and the same thing happened

Yep, I tested it without indium and the same thing happened

So this is not an indium bug and should be closed.


fix(State): Load/Save state

:tada: This PR is included in version 2.2.2 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Add bindings

add bindings for AvaloniaObject ~ TextBox, Flyout

Add bindin of .net event.
Changed setter and compare function in IAvaloniaList<'T>'s binding to avoid unnecessary updates.
Code placement is tentative.

Really good work 👍
There are a few small things we need to do before merging (check comments).

I've made revisions based on the review comments. Please check

Thank you very much.
Please let me know if there is anything I should be doing to merge, because I'm missing out.

Thank you very much. Please let me know if there is anything I should be doing to merge, because I'm missing out.

I just merged it. Assumed the author can merge after a PR is approved.


Update UI shell to use ecosystem URLs

cc @y4izus @1ucian0. (Also can I please get Traige or Write access to this repo?)


Error: only named arguments may follow *expression

Hi
I installed handyspark on Google Dataproc cluster but I am unable to import it.
When I import it using from handyspark import * it gives me an error only named arguments may follow an * expression.
Can anyone please guide me on why this is happening.

Hi @Rajat700 ,
Are you using Python 2? This error has been reported in the past for a Python 2 environment - which is not supported.
If that's the case, the error should go away as soon as you upgrade the environment to Python 3.
Best


Fix broken build

Build was broken after some changes to hyperstart.go.

Build was not broken. I had not synchronized locally the recent changes to runv/hyperstart/api/json.


How to translate organizations

Q
A

Bug?
no

New Feature?
no

Sulu Version
1.5.3

Browser Version
Google Chrome Version 58.0.3029.110 (64-bit)

Is there any way to translate organizations? I'm using this information in front-end and would like to have possibility to get it in different languages.

Currently, there is no way to manage users/organizations in different languages. What usecase did you have? could also Snippets be an option for you?

I have 2 languages en (prim) and ru. You can check this page to get what i mean.

If you manage you contacts within the snippets (own template) you can translate them in the same languages than the pages. would that be a solution for you?

Yes, it could be the solution, not very comfortable, but nevermind... Thank you

@ilyasavitski I will close this issue. if you think it is not fixed for you feel free to reopen it!


Update eslint-config npm install command

The npm install script for outside usage instructions is outdated. Updated to match the package's current peer dependencies.

Great catch!
Thank you so much.


4.9 regression for visitEachChild

Bug Report
🔎 Search Terms
visitEachChild, SourceFile
🕗 Version & Regression Information

This changed between versions 4.8. and 4.9

💻 Code
I'm using ts-patch that allows me to apply a transformer, in this case I use https://github.com/kimamula/ts-transformer-keys.
What it does is that it traveres all nodes and does some simply modification on it, it stopped working on ts 4.9 though.
(see also https://github.com/nonara/ts-patch/issues/81)
After digging into it, it touched all nodes in 4.8:
visitNode SourceFile
visitNode ImportDeclaration
visitNode StringLiteral
... etc

but in 4.9 it didn't go any further after the first node (stopped after visitNode SourceFile), so I was looking into related changes and found https://github.com/microsoft/TypeScript/pull/50266/files#diff-044e53f5c31ee19a4e3fca606c4b4ab8d5618ec9b740aa2e01960a8fbbad6eb2R1288
If you compare the change with the preivous lines:
https://github.com/microsoft/TypeScript/pull/50266/files#diff-044e53f5c31ee19a4e3fca606c4b4ab8d5618ec9b740aa2e01960a8fbbad6eb2L1282
it turns out that                 visitLexicalEnvironment(node.statements, visitor, context, /start/ undefined, /ensureUseStrict/ undefined, nodesVisitor));
got some more parameters, especially the "nodesVisitor".
If I remove this paramter again, all things are working again! Therefore I assume this is a bug, but please double check my findings :)
🙁 Actual behavior
Not traversing the tree correctly.
🙂 Expected behavior
Should work like in ts 4.8

@DanielRosenwasser may I ask you that when the TS 4.9.4 patch being published?

Agreed, this is a pretty major patch for anyone who relies upon the typescript compiler ecosystem, which is a fairly large set of dependents.  Would be nice to at least see this in a dev release we can install directly to confirm the fix here.

Should be out now. Thanks for the patience!


Add PR template

Add a PR template to thanks for contributing and to explain our
suggested workflow.

/test 4.14-openshift-e2e

There have been some observation about the template, I'd like to discuss the format a bit more :)
/hold

Closing this in favor of pushing the template in the special med8k8s/.github repository to make it available to all other repos


regenie pull Error

Hi,
I was trying to pull an asset but getting error. I have used the below command:
refgenie pull hg38/bowtie2_index

Here is the last three  line of the error:
File "/usr/local/biotools/python/python-3.7.6/lib/python3.7/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I have used it earlier. It was working fine. Not sure what happened. Any suggestions?

can you show us your refgenie configuration file? It looks like an empty file?

I am using Python 3.7.10. and here is the version refgenie details.
refgenie --version
refgenie 0.10.0 | refgenconf 0.10.0

Here is the configuration file
config_version: 0.4
genome_folder: <data_path>/data/refgenie_data
genome_servers:
 - http://refgenomes.databio.org
genomes:
....

I have just pulled an asset using the same version of refgenie and refgenconf but with Python 3.9, so I wasn't able to reproduce this error.
For the config file, the part of interest is the genomes section which you skipped.
A couple of things so we can move further:

Paste the refgenie pull log
Paste the entire config file

I thought, you wanted the check the server and config details. Anyway, here is the entire config file.
config_version: 0.4
genome_folder: <data_path>/data/refgenie_data
genome_servers:
 - http://refgenomes.databio.org
genomes:
  2230c535660fb4774114bfa966a62f823fdb6d21acf138d4:
    aliases:
     - hg38
    assets:
      fasta:
        tags:
          default:
            seek_keys:
              fasta: 2230c535660fb4774114bfa966a62f823fdb6d21acf138d4.fa
              fai: 2230c535660fb4774114bfa966a62f823fdb6d21acf138d4.fa.fai
              chrom_sizes: 2230c535660fb4774114bfa966a62f823fdb6d21acf138d4.chrom.sizes
            asset_parents: []
            asset_path: fasta
            asset_digest: 59fed5ec3c3a95bc5709b24b8f2cf7bf
            asset_children:
             - 2230c535660fb4774114bfa966a62f823fdb6d21acf138d4/bowtie2_index:default
        default_tag: default
      bowtie2_index:
        tags:
          default:
            seek_keys:
              bowtie2_index: 2230c535660fb4774114bfa966a62f823fdb6d21acf138d4
            asset_parents:
             - 2230c535660fb4774114bfa966a62f823fdb6d21acf138d4/fasta:default
            asset_path: bowtie2_index
            asset_digest: 04880a3192a69bbfdc36da25b67203cb
        default_tag: default
      refgene_anno:
        tags:
          default:
            seek_keys:
              refgene_anno: 2230c535660fb4774114bfa966a62f823fdb6d21acf138d4_refGene.txt.gz
              refgene_tss: 2230c535660fb4774114bfa966a62f823fdb6d21acf138d4_TSS.bed
              refgene_exon: 2230c535660fb4774114bfa966a62f823fdb6d21acf138d4_exons.bed
              refgene_intron: 2230c535660fb4774114bfa966a62f823fdb6d21acf138d4_introns.bed
              refgene_pre_mRNA: 2230c535660fb4774114bfa966a62f823fdb6d21acf138d4_pre-mRNA.bed
            asset_parents: []
            asset_path: refgene_anno
            asset_digest: 4d0ff5d90ac529a4fffdd5704d8ec6d9
        default_tag: default
      ensembl_gtf:
        tags:
          default:
            asset_digest: 247fa6fbf98ce6b5773cbed0bdd86fef
            asset_children:
             - 2230c535660fb4774114bfa966a62f823fdb6d21acf138d4/feat_annotation:default
            seek_keys:
              ensembl_gtf: 2230c535660fb4774114bfa966a62f823fdb6d21acf138d4.gtf.gz
              ensembl_tss: 2230c535660fb4774114bfa966a62f823fdb6d21acf138d4_ensembl_TSS.bed
              ensembl_gene_body: 2230c535660fb4774114bfa966a62f823fdb6d21acf138d4_ensembl_gene_body.bed
            asset_parents: []
            asset_path: ensembl_gtf
        default_tag: default
      ensembl_rb:
        tags:
          default:
            asset_digest: d743c316efe1e13ce8a2546fbe3adf69
            asset_children:
             - 2230c535660fb4774114bfa966a62f823fdb6d21acf138d4/feat_annotation:default
      feat_annotation:
        tags:
          default:
            seek_keys:
              feat_annotation: 2230c535660fb4774114bfa966a62f823fdb6d21acf138d4_annotations.bed.gz
            asset_parents:
             - 2230c535660fb4774114bfa966a62f823fdb6d21acf138d4/ensembl_gtf:default
             - 2230c535660fb4774114bfa966a62f823fdb6d21acf138d4/ensembl_rb:default
            asset_path: feat_annotation
            asset_digest: 3549873db4390b9643173b134837d497
        default_tag: default
      gencode_gtf:
        tags:
          default:
            seek_keys:
              gencode_gtf: 2230c535660fb4774114bfa966a62f823fdb6d21acf138d4.gtf.gz
            asset_parents: []
            asset_path: gencode_gtf
            asset_digest: 55cad7e24235fa842628a3c1f9542c1f
        default_tag: default
    genome_description: The GCA_000001405.15 GRCh38_no_alt_analysis_set from NCBI

Here is the log for refgenie pull hg19/fasta.
Compatible refgenieserver instances: ['http://refgenomes.databio.org']
No local digest for genome alias: hg19
Setting 'hg19' identity with server: http://refgenomes.databio.org/v3/genomes/genome_digest/hg19
Traceback (most recent call last):
  File "<data_path>/.local/lib/python3.7/site-packages/refgenconf/refgenconf.py", line 1400, in pull
    genome = self.get_genome_alias_digest(alias=alias)
  File "<data_path>/.local/lib/python3.7/site-packages/refgenconf/refgenconf.py", line 1621, in get_genome_alias_digest
    return self[CFG_GENOMES_KEY].get_key(alias=alias)
  File "<data_path>/.local/lib/python3.7/site-packages/yacman/alias.py", line 223, in get_key
    raise UndefinedAliasError("No key defined for: {}".format(alias))
yacman.exceptions.UndefinedAliasError: No key defined for: hg19

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<data_path>/bin/refgenie", line 8, in <module>
    sys.exit(main())
  File "<data_path>/.local/lib/python3.7/site-packages/refgenie/cli.py", line 226, in main
    size_cutoff=args.size_cutoff,
  File "<data_path>/.local/lib/python3.7/site-packages/refgenconf/refgenconf.py", line 1404, in pull
    genome=alias, servers=[server_url], create_genome=True
  File "<data_path>/.local/lib/python3.7/site-packages/refgenconf/refgenconf.py", line 1769, in set_genome_alias
    digest = download_json(url_alias)
  File "<data_path>/.local/lib/python3.7/site-packages/refgenconf/helpers.py", line 304, in download_json
    return resp.json()
  File "/usr/local/biotools/python/python-3.7.6/lib/python3.7/site-packages/requests/models.py", line 897, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/biotools/python/python-3.7.6/lib/python3.7/site-packages/simplejson/__init__.py", line 525, in loads
    return _default_decoder.decode(s)
  File "/usr/local/biotools/python/python-3.7.6/lib/python3.7/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/local/biotools/python/python-3.7.6/lib/python3.7/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Note: I have replaced some of the data path that has some system user info. Hope that is fine to explain the issue

Thanks @arpanda.
I was able to identify the issue, of of the endpoints in the new refgenieserver version is not backwards-compatible with the old refgenconf package due to this change: https://github.com/refgenie/refgenieserver/issues/67
So just upgrade refgenie and refgenconf. The command below should solve it:
pip install --upgrade refgenie

it solves the issue. Thanks for your quick response.


chore(release): 1.2.1

Version bump in package.json and package-lock.json for release 1.2.1

:tada: This PR is included in version 1.3.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


push_back doesn't work for serializing containers

This is probably more of a feature request than a bug, but would be really great if it could behave like an arbitrary container.
struct foobar
{
  std::string foo;
  std::string bar;
};

void to_json(json& j, const foobar& p)
{
  j = json {
            {"foo", p.foo },
            {"bar", p.bar }
  };
};

void from_json(const json& j, foobar& p)
{
  j.at("foo").get_to( p.foo );
  j.at("bar").get_to( p.bar );
};

json j;
foobar f("foostr", "barstr");

j.push_back(f);
j.push_back(foobar("foostr2", "barstr2"));
j.erase(f);

error: no matching function for call to ‘nlohmann::basic_json<>::push_back(foobar&)’

That works just fine, except for the j.erase(f) and that you don't have a constructor for foobar, though changing from foobar() to foobar{} works for that.
https://godbolt.org/z/1vc7nE1fa

The j.erase(f); doesn't work for std::vector<foobar> either, and that's basically what j is emulating here.

Actually it doesnt work. The only way I could get this to work is to create a container for the container like so:

struct foobars
{
    std::vector<foobar> f;
}

then the to_json, and from_json ..

I am using this for storing redis entries, so it reads and writes to/from json strings. I would like a way to read the string into a json object and push_back or erase without having to parse it back into the struct object first.

Did you look at the link I included?  That shows it compiling.  Is there something in your code that you didn't include in your sample that makes it not work?

Also, according to documentation erase should work too.

// delete an entry
o.erase("foo");

That's for an object, this is an array.

I am using this for storing redis entries, so it reads and writes to/from json strings. I would like a way to read the string into a json object and push_back or erase without having to parse it back into the struct object first.

The push_back function is for arrays.  Sounds like you want an object instead.
j["key"] = json::parse(string).
j.erase("key");

Sounds like you want an object instead.

Yes, I want push_back for objects. Sorry I guess I didn't explain myself very well.

That's not a valid json.  You can't have an object as top level inside an object like that.
You can have an array of objects:
[
   { "foo": "foostr", "bar":"barstr"}
]

You can have just an object:
{ "foo": "foostr", "bar":"barstr"}

Or you can have a nested object:
{
   "baz": { "foo": "foostr", "bar":"barstr"}
}

The formats of push_back and += that work when j is an object look like this "add these members to the object j."
void to_json(json& j, const foobar& p)
{
    j.push_back(json::object_t::value_type{"foo", p.foo });
    j.push_back({"bar", p.bar });
    j += json::object_t::value_type{"foo", p.foo };
    j += {"bar", p.bar };
};

For normal nlohmann::json, aka nlohmann::basic_json<>, json::object_t::value_type is std::map<std::string, json>::value_type which is std::pair<const std::string, json>.

Is there anything to be done here?


Fixed onTrial Method

Argument 1 passed to Carbon\Carbon::lt() must be an instance of Carbon\Carbon

Fix tests?

Why tests?
src/Laravel/Cashier/Billable.php

@mobelio You broke our unit tests, so you must adjust them, or fix your implementation to pass.

@GrahamCampbell, @taylorotwell oh sorry, just make it at monday =)


Added Video Tutorial for Docker.

Coverage remained the same at 82.567% when pulling 728e9a78fcbd0d81b52d3f001146be764bb232f1 on namantechlabs:patch-3 into 6034c5ba82a76b05c5d4cff26af4cbc8975dbe39 on CircuitVerse:master.


Implement battery failsafe

It it would be nice for the user to specify a battery charge threshold at which the vehicle enters RTL mode.

@AndreasAntener @thomasgubler FYI

Please consider, that RTL is not always the best and most secure method for operations.
We would appreciate if you leave a door open to not use this function (perhaps use 0.0v for RTL - means desabling RTL). Thanks.

@severinleuenberger Sure, this will be optional and probably disabled by default.

About the OBC failsafe, regarding the discussion yesterday:
https://pixhawk.org/users/failsafe
I'm not saying that this has to be exposed to the user in QGC, I think it's good to limit that to the very basic options. But it makes sense to consider all failsafe options in the firmware implementation so the whole state handling is in one place.
(Thomas is better suited to point at the code if necessary :))

The 2 most important pointers to the code:

Here the detected failures are evaluated and a mode is requested from the navigator (search the individual variables e.g. gps_failure to see how they are set https://github.com/PX4/Firmware/blob/master/src/modules/commander/commander.cpp#L1637)  https://github.com/PX4/Firmware/blob/master/src/modules/commander/state_machine_helper.cpp#L529
here the mode set above is evaluated https://github.com/PX4/Firmware/blob/master/src/modules/navigator/navigator_main.cpp#L425 you can see that already some parameters are evaluated as well (for switching between normal and OBC mode)

The first part is more concerned about which state we can go in given the sensors/subsystems which still are healthy. The 2nd one is about what we do exactly in this state

@thomasgubler Thanks for the pointers, I will look into it and probably get back to you.

@tumbili This is something you should really, really look into next week.

Done!


chore: add pypi action and oa-atomacos and oa-pynput packages

What kind of change does this PR introduce?
Address https://github.com/OpenAdaptAI/OpenAdapt/issues/404
Summary
Add pypi github action after successful release to enable pip install openadapt.
Checklist

[x] My code follows the style guidelines of OpenAdapt
[x] I have performed a self-review of my code
[x] If applicable, I have added tests to prove my fix is functional/effective
[x] I have linted my code locally prior to submission
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation (e.g. README.md, requirements.txt)
[x] New and existing unit tests pass locally with my changes

How can your code be run and tested?

Other information
Check out the published dependencies here:

oa-atomacos
oa-pynput

@abrichr This is Ready for Review! I was able to successfully add the dependencies via poetry. After this is merged, it should trigger the publish action to pypi, and hopefully we can then do poetry add openadapt  🙏


json output format support

fixed: #244
Through the api, our logger should now be initialized by calling
;; (log/setup format, any data needed by that format)
;; for example:

;; println
(log/setup "println" {:stream my-stream})
;; or
(log/setup "json" {:my-json data})

When running, this can be setted through the --format/-f option:
moclojer ... --format json

For now, the supported formats are plain println and json.

Summary by CodeRabbit

New Features

Introduced JSON format logging support, enabling users to choose between println and json output formats.
Added a new -f, --format command-line option for specifying logging format.
Added a new viesti/timbre-json-appender dependency to enhance logging capabilities.

Enhancements

Improved logging setup to dynamically select appenders based on the specified format key.

Documentation

Updated README and release notes to include details about the new logging features and options.

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

@avelino Are you sure about editing the linked issue to be #245 , instead of #244 ?

btw @avelino i just sent the documentation changes you asked for, but I failed to understand what exactly do you mean with

dockerfile support format param

Could you please explain what's missing in the Dockerfile related to the config option? AFAIK, --format could be passed only through args/opts.

@coderabbitai redo the Assessment against linked issues. The previous linked issue #245 was wrong. We're now linking the correct one #246

big thanks @J0sueTM 🎉

@avelino there are a couple of things that I mistakenly forgot to update in the branch you just merged:

the PR link in next.md is invalid (as stated by @coderrabitai)
the flags --format/-f in README.md are invalid, since we're using the new naming --log-format/-l


Navigation Loaded Twice, Causing Badge SQL Query to Run Twice

Package
filament/filament
Package Version
v3.2
Laravel Version
v11
Livewire Version
No response
PHP Version
8.2
Problem description
While preparing a video based on the official filament demo, noticed two queries running for the badge:

Debugged a bit deeper and discovered that the whole menu is being loaded twice.
Confirmed that I'm not alone, by two discussions opened by the same person:

https://github.com/filamentphp/filament/discussions/10285
https://github.com/filamentphp/filament/discussions/10204

But those discussions didn't lead to any issues opened, at least I haven't found, so creating one.

Made a bit of a source-dive. Managed to locate the problem but didn't manage to fix it.
Discovered that new NavigationManager() is called twice: https://github.com/search?q=repo%3Afilamentphp%2Ffilament new NavigationManager&type=code

In FilamentServiceProvider
And in HasRoutes concern

There seems to be a check to prevent double-loading but for some reason it doesn't trigger for me: https://github.com/filamentphp/filament/blob/d00919cbac22c9b8648b114815ab635aaac6d509/packages/panels/src/Navigation/NavigationManager.php#L49
if (! $this->isNavigationMounted) {
    $this->mountNavigation();
}

P.S. Interesting part: during my testing, seems that the Cluster part of the menu (Products + Categories + Brands) is loaded only once, not twice. So there's some separate different logic for clusters, probably.
Expected behavior
There should be one SQL query: either by not duplicating the query, or not duplicating the navigation manager call.
Steps to reproduce
Just load the official demo locally and load any page with Laravel Debugbar and see the queries
Reproduction repository (issue will be closed if this is not valid)
https://github.com/filamentphp/demo
Relevant log output
No response

Donate 💰 to fund this issue

You can donate funding to this issue. We receive the money once the issue is completed & confirmed by you.
100% of the funding will be distributed between the Filament core team to run all aspects of the project.
Thank you in advance for helping us make maintenance sustainable!

It looks like this issue was introduced by @danharrin as part of #11292 (Boost Octane performance further) in a47673bc44a57cfc115bc7067164dfaf9f329c90 and modified further in 12cc2730b7a545240eba3c2b9e629743cbb513cb, where it was intentionally switched from loading from the service container to newing up a fresh NavigationManager.

A fast workaround for big tables that slowing down the display of the table is to use Cache, until the final fix, e.x.
$newMails = Cache::remember('filamentMailsBandge', now()->addSeconds(30), function () {
    return static::getModel()::where('created_at', '>=', Carbon::now()->subHours(12)->toDateTimeString())->count();
});


List of errors in build and seg fault on inference

I started off from update_submodule branch
/oos/bark.cpp/bark/bark.cpp:2048:43: error: use of undeclared identifier 'encodec_verbosity_level'; did you mean 'bark_verbosity_level'?
        encodec_model_path, n_gpu_layers, encodec_verbosity_level::LOW);
                                          ^~~~~~~~~~~~~~~~~~~~~~~
                                          bark_verbosity_level
/oos/bark.cpp/bark/./bark.h:23:12: note: 'bark_verbosity_level' declared here
enum class bark_verbosity_level {
           ^
/oos/bark.cpp/bark/bark.cpp:2047:37: error: no matching function for call to 'encodec_load_model'
    struct encodec_context * ectx = encodec_load_model(
                                    ^~~~~~~~~~~~~~~~~~
/oos/bark.cpp/encodec.cpp/./encodec.h:193:26: note: candidate function not viable: requires 2 arguments, but 3 were provided
struct encodec_context * encodec_load_model(
                         ^
/oos/bark.cpp/bark/bark.cpp:2060:5: error: use of undeclared identifier 'encodec_set_sample_rate'
    encodec_set_sample_rate(ectx, sample_rate);
    ^
3 errors generated.
make[2]: *** [CMakeFiles/bark.dir/bark.cpp.o] Error 1
make[1]: *** [CMakeFiles/bark.dir/all] Error 2
make: *** [all] Error 2

I added fixes here:
https://github.com/PABannier/bark.cpp/pull/132
https://github.com/PABannier/encodec.cpp/pull/34
But even then, the example ./bark/build/examples/main/main -m ./ggml_weights/ -p "this is an audio" will produce noise, and any string other than "this is an audio" will cause a segmentation fault. This is on M macOS.
Cmake version:
cmake version 3.28.3
CMake suite maintained and supported by Kitware (kitware.com/cmake).

This should be fixed with #139 . Could you give it another try?


Upsert Compaction Executor: CRC mismatch robustness

During the execution of the Upsert Compaction task, we perform a three-way equality check of CRCs from different sources of truth: (Ref).

Segment ZK Metadata CRC: This is pushed as a task-config from generator to executor.
ValidDocID Bitmap CRC: We fetch the validDocID bitmap for the segment from one of the replica servers. In the response, we also get the segment CRC for that node.
Segment CRC (deepstore/server): The minion task execution fetches the segment from deepstore first, and if that fails, it fetches from one of the replica servers. The zipped segment also contains the CRC info.
Recently, we found segments not compacted after being queued by the task generator, even though the task output was marked as a success. Upon deeper investigation, we found these WARN entries in the log:

CRC mismatch for segment: {tablename}__4__308__20240621T2134Z, expected: 276873240, actual crc from server:<PHONE_NUMBER>

There are several scenarios that can lead to this situation, all involving replicas having different CRCs. If the replicas didn't have different CRCs, this issue would not arise at all.
Scenario 1: Segment ZK Metadata CRC = Segment CRC deepstore != ValidDocID Bitmap CRC
The leader server uploads to ZK metadata and deepstore but is not called during the ValidDocID bitmap fetch from the minion.
In this scenario, ZK metadata CRC and deepstore CRC would match. During minion task execution, we fetch the validDocID bitmap from one of the replica servers. If that server was not the leader in uploading to ZK and deepstore during segment commit, we will end up with an inequality.
Scenario 2: Segment ZK Metadata CRC != Segment CRC deepstore
I'm not entirely sure about all the cases where this scenario would occur, but thinking out loud, it seems this might happen during a deepstore-upload-retry task. In the deepstore-upload-retry task, we randomly choose a replica server to upload to deepstore. If the chosen replica server has a different CRC compared to the segment ZK metadata, we may encounter this issue.
This can also happen when both the replicas update ZK and upload to deepstore during segment-commit. Say one replica updates ZK but is slower in uploading to deepstore but the other replica updates ZK and uploads to deepstore first. In this scenario, ZK data will be of the second replica but deepstore will have data of the first replica.

Scenario 1 is resolved by #13489.
For scenario 2, we should fundamentally solve it to prevent Segment ZK Metadata CRC != Segment CRC deepstore altogether. I will see the cases where we encounter this. If the solutions are intrusive then specifically for upsert-compaction, I am planning to introduce skipCrcMismatch config to solve it temporarily.


[Bug]: On Mac M1 chip, ts-jest cannot report the error message correctly when test cases are failed

Before All

This issue only happens on a Macbook with a M1 chip
When test cases are all passed, everything works just fine

Version
27.0.5
Steps to reproduce

Clone this repo: https://github.com/weapon-master/bugs-reproduce.git
yarn
yarn jest

Expected behavior
show the proper error msg which includes the test case location, Expect Value，Received Value.
FAIL  tests/tests/utils/utils.test.js
✕ should works (1 ms)
● should works
expect(received).toBe(expected) // Object.is equality

Expected: 4
Received: 3

  2 |
  3 | test("should works", () => {
> 4 |   expect(add(1, 2)).toBe(4);
    |                     ^
  5 | });
  6 |

Actual behavior
it reports something has not relation with the failed test cases.
FAIL  tests/tests/utils/utils.test.ts
● Test suite failed to run
TypeError: Cannot read properties of undefined (reading 'fromArray')

  at new BasicSourceMapConsumer (node_modules/source-map/lib/source-map-consumer.js:334:26)
      at Array.map (<anonymous>)

Debug log
It Fails right after my test case's failure,  the uncaught exception call stack like this picture

Additional context
Pure JS jest tests is OK。This occurs only when I write TS test cases. It seems that some source-map related stuffs, which may be used to show the source code in error message, report the err.
I also encountered the same issue when using other npm packages. Those issues can be resolved by upgrading to the latest version. But I am using the latest version of ts-jest v27.0.5
Environment
System:
MacBook Pro (13-inch, M1, 2020)
Chip Apple M1

node version: v16.10.0
yarn version: 1.22.11

Maybe you should clear cache? This exception doesn’t come from ts-jest itself but comes from another 3rd party library which you use in your project. This is out of scope for ts-jest to control and fix unfortunately

Internally, ts-jest doesn’t use source-map dependency. The source map which is produced automatically by TypeScript compiler.
We can do these 2 things to debug further if you don’t mind:

Set sourceMap: false in tsconfig to see if the error still appears. This will prove at least that if error appears, it must be TypeScript itself.
You will need to open ts-jest-transformer.js in node_modules and put a console log inside process function (at the end before return and see what it prints out.

If upgrading node_modules helps, it seems to be something funny there. Unfortunately I don’t see any workarounds for that. I don’t have Mac M1 here so it is also difficult to help. You can try to ask the question in Jest discord community https://www.reactiflux.com/

Internally, ts-jest doesn’t use source-map dependency. The source map which is produced automatically by TypeScript compiler.
We can do these 2 things to debug further if you don’t mind:

Set sourceMap: false in tsconfig to see if the error still appears. This will prove at least that if error appears, it must be TypeScript itself.
You will need to open ts-jest-transformer.js in node_modules and put a console log inside process function (at the end before return and see what it prints out.

ts-jest produces source map but Jest does the processing source map part. So this error could come from processing part rather than producing part
If upgrading node_modules helps, it seems to be something funny there. Unfortunately I don’t see any workarounds for that. I don’t have Mac M1 here so it is also difficult to help. You can try to ask the question in Jest discord community https://www.reactiflux.com/

Finally！ I got the rootCause of this issue, which has nothing to do with jest / ts-jest。
Yarn installs the broken source-map/array-set.js file on my machine at my first installation of source-map. Since yarn has cache, it install the broken file everywhere in my computer. Every package whose source-map dependency version matched the cache would use this broken module. So I got ArraySet is undefined everywhere.
Here is how I figured this out, in case that someone run into similar issues:

I check the js which report the error in node_modules/source-map/lib/array-set.js。It has an uncompleted ArraySet definition.
At first, I think it's the version issue, So I copy the corresponding file content from source-map's github master branch to local. It works.
Check source-map github in TAG 0.6.1 (which is the local version). It has a complete ArraySet definition.
4.Then I  remove the node_modules and reinstall by yarn. The file is still uncomplete.
remove the node_modules and reinstall by npm. Everything is fine. So it must be yarn's cache issue
yarn cache clean && reinstall. It works fine.

Thanks to @ahnpnl ~

Nice debugging session! Thank you too 👍


templateUrl in directives/components using the old style syntax.

I have an existing app that I have been working on but I'm coming up with a 404 error on templates. I will eventually upgrade to the modular type environment, but right now I would prefer to continue with my app 'as is' due to time constraints.
Error: [angular-meteor][err][404] client/home/home.view.html - HTML template does not exists! You can disable this error by following this guide http://www.angular-meteor.com/api/1.3.11/templates
I'm on the latest version of everything AFAIK.
I am still learning Angular, Meteor, etc, so I may have made an elementary mistake somewhere. Indeed, any hints on better coding will be welcome.
I've (hopefully) uploaded an example of the error here...
https://github.com/TWKDreamState/templateUrl
If it's missing anything, please let me know.
For me, no matter what I change templateUrl to, it simply produces this error, whereas previously I did not have any issues. This has been referenced in a few other places but the latest angular-templates does not fix this for me.
https://github.com/Urigo/angular-meteor/pull/1397
https://github.com/Urigo/angular-meteor/issues/1391
Any help/thoughts would be appreciated.

#1412 Should fix it

Brill. Thank you for this. I'll wait for the merge.
I started to move towards 'modularising' my app but this will help a great deal during the changeover.


Create prototypes of design for the detailed app page and dangerous permissions

Ideally this would be something to review before the meeting to discuss the data model change
@JDBnhs checkout exodus-privacy project
https://reports.exodus-privacy.eu.org/en/

Here is the mockup for the dangerous permissions. I think keeping it as simple as possible is the best option right now and as we develop the "scoring" guide we can add more complexity.
https://www.figma.com/proto/43R5coYJakUB0MFyyeTAeF/COVID19-App-Tracker?node-id=115%3A2&viewport=-941%2C-5078%2C0.7793903946876526&scaling=min-zoom

This is complete.


Can we push blob files from a different uri in cloud

Can we push blob files from say S3 to oci repository and not from current working directory or system.

Possibly - we’d need a remote s3 storage provider implemented and it would be akin to copy. This might be something you could make a custom class for.


Update KeycloakGuard.php

Allow developers to extend the guard

but if I want to override the authenticate() function I will not be able to access the $decodedToken property as it is private


KeyError: 'weather_interval' in 1.2.0

Version of home_assistant

2021.3.0b3
Version of the custom_component

1.2.0
Describe the bug
Integration doesn't load, looks like missing weather_interval, but how to add it?
Debug log

2021-02-27 18:18:52 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Wuerzburg for dwd_weather
Traceback (most recent call last):
  File "/srv/ha/lib/python3.8/site-packages/homeassistant/config_entries.py", line 251, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/home/homeassi/.homeassistant/custom_components/dwd_weather/__init__.py", line 40, in async_setup_entry
    time_window = entry.data[CONF_WEATHER_INTERVAL]
KeyError: 'weather_interval'

Thanks for the report, I changed the update info to inform others prior to updating.
I added a new configuration option and I don't know how to keep backwards compability with this. Sorry for the inconvenience, you have to remove the entity and re-add it.

you have to remove the entity and re-add it.

Good to know.
Thanks for your quick response and for this integration.


Port 8369: Support module.exports.name = expr format for JavaScript m…

Fixes #
…odule

@mhegazy Can you take a look

can we also port the tests please.

👍 after the tests has passed.

:+1:


Add better Camry Hybrid fingerprint detection

From sentry logs the Toyota Camry Hybrid creates unsupported car exceptions because 865:8 is missing

Have you confirmed with the owner of this EON and this vehicle that this message is indeed present when the EON is installed and the vehicle is in stock mode or EON code were made?

That's on the private radar bus

If a msg is on radar bus, shouldn't need to be in fingerprint.

@DoubleCapCrimpin can confirm this


Don't eagerly load all JS assets

Realized that Bluesky is currently eagerly loading all languages and some code that was meant to be lazily-loaded, then noticed that Expo? Webpack? generates an asset-manifest.json which contains the actual entrypoint scripts to put on the HTML file.
Anyway, that saved time from having to figure out plugins like webpack-assets-manifest which is what I was about to pull beforehand.

(top: this PR, bottom: main.bsky.dev)
This pull request shaves ~2 MB of JS assets and some precious processing time spent during initial page load. It's still not ideal, but better than where we were before.

#3925 pulls in react-image-crop which requires us to import a CSS file. Thankfully it seems that the manifest adds in css files into the entrypoint array, I can account for that in this pull request if needed.


Include a readable repr for ModelInfo

This includes the start of a better __repr__ for the ModelInfo class, started from this issue: https://github.com/huggingface/huggingface_hub/issues/31
This is based on what I've started for the AdaptNLP
A few points of difference that could be done here is we could also programmatically include the tasks available for it, similar to what was done in AdaptNLP, but I guess the key information is what would be the best-case scenario for a model repr? Currently what I have lets it look like so:
Model Name: "gpt2", Tags: ['pytorch', 'tf', 't5'], Task: ['summarization']

For adapt I go a bit further (with the whole programmatic way I mentioned early) by checking what tags are also tasks and assigning them then.
The last thing is if we want something like:
Model Name: "gpt2-hybrid", Author: "username", Tags: ..., Task: ...

What are your thoughts?
cc: @LysandreJik

I think the proposition of making repr more understandable is great! Thinking about from a high-level perspective, I understand that the difference between __repr__ and __str__ is that the former is for developers (useful when debugging), should be unambiguous, while the latter is for end-users and supposed to be readable.
To that end, I'm wondering if it wouldn't be better to have a __repr__ that shows a bit more information, like the __dict__, while the __str__ outputs the current __repr__ output. What do you think?

@LysandreJik I do like that idea, let me work on that this weekend and I'll get back to you with what I come up with in regards to a presentable format/strings

@LysandreJik apologies it took so long, had some final exams and projects that needed to get done!
Here's my adjustments I've made, the __repr__ now gives an output like so:
ModelInfo: {
	modelId: distilgpt2
	sha: None
	tags: ['pytorch', 'tf', 'tflite', 'rust', 'gpt2', 'lm-head', 'causal-lm', 'en', 'dataset:openwebtext', 'exbert', 'license:apache-2.0', 'text-generation']
	pipeline_tag: text-generation
	siblings: [<huggingface_hub.hf_api.ModelFile object at 0x7efdbba60090>, <huggingface_hub.hf_api.ModelFile object at 0x7efdbba600d0>, <huggingface_hub.hf_api.ModelFile object at 0x7efdbba60110>, <huggingface_hub.hf_api.ModelFile object at 0x7efdbba60150>, <huggingface_hub.hf_api.ModelFile object at 0x7efdbba60190>, <huggingface_hub.hf_api.ModelFile object at 0x7efdbba60210>, <huggingface_hub.hf_api.ModelFile object at 0x7efdbba60250>, <huggingface_hub.hf_api.ModelFile object at 0x7efdbba60290>, <huggingface_hub.hf_api.ModelFile object at 0x7efdbba602d0>, <huggingface_hub.hf_api.ModelFile object at 0x7efdbba601d0>]
	private: False
	key:
}

Which I think is more aligned to what you were wanting, while the str has the original, IE:
Model Name: distilgpt2, Tags: ['pytorch', 'tf', 'tflite', 'rust', 'gpt2', 'lm-head', 'causal-lm', 'en', 'dataset:openwebtext', 'exbert', 'license:apache-2.0', 'text-generation'], Task: text-generation

Before we merge, you seem to have code quality issues, could you run the following from the root of your clone?
pip install .[quality]
make style
make quality

@LysandreJik it seems to have picked up an unrelated file with it, but I ran the code quality

Fantastic, thanks a lot for working on this!


V4 SDK -> generating extra forward slash as a prefix in resource links

When generating resource links, SDK is prefixing the link with extra forward slash.
This is causing issues with permissions API:
Here is the incident raised by a customer : https://portal.microsofticm.com/imp/v3/incidents/details/194001154/home

Remove the extra prefix slash from resource link generation.
Current tests just cover the basic Permission CRUD APIs. Add some tests to cover permissions applicability, i.e. permissions are actually working while creating or reading documents.

This has been fixed already.


[BEAM-8841] Support writing data to BigQuery via Avro in Python SDK

This PR modifies WriteToBigQuery to be able to do file loads via Avro format. Using Avro allows bypassing some limitations of newline-delimited JSON loads, including the ability to support NaN and Inf float values.
Changes include:

Add a temp_file_format option to WriteToBigQuery and BigQueryBatchFileLoads to select which file format to use for loading data.
Move implementation of get_table_schema_from_string, table_schema_to_dict, and get_dict_table_schema to bigquery_tools module.
Add bigquery_avro_tools module with utilities for converting BigQuery TableSchema to Avro RecordSchema (this is a port of what's available in the Java SDK, with modified behavior for logical types).
Modify WriteRecordsToFile and WriteGroupedRecordsToFile to accept schema and file format, since in order to be read by BigQuery, the Avro files must have schema headers.
Parameterize relevant tests to check both JSON and Avro code paths.
Add integration test using Avro-based file loads.
Introduce JsonRowWriter and AvroRowWriter classes which implement the io.IOBase interface and are used by WriteRecordsToFile and WriteGroupedRecordsToFile.

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[x] Choose reviewer(s) and mention them in a comment (R: @username).
[x] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[x] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

R: @chamikaramj
R: @pabloem

Thanks for the contribution. Pablo will you be able to review ?

Yes, I will be thrilled to review this : )

Retest this please

retest this please

Run Python 3.7 PostCommit

Retest this please

Run Python 3.7 PostCommit

Run Python 3.5 PostCommit

Run Python 3.7 PostCommit

The PreCommit failures look like they're being fixed by #10982 .
The failing Python 3.7 PostCommit integration tests might be flaky? I was not able to reproduce it--got the following instead:
INFO:apache_beam.io.gcp.tests.bigquery_matcher:Result of query is: [(None, None, None, datetime.date(3000, 12, 31), None, None, None, None), (None, None, None, None, datetime.time(23, 59, 59), None, None, None), (0.33, None, None, None, None, None, None, None), (None, Decimal('10'), None, None, None, None, None, None), (None, None, None, None, None, datetime.datetime(2018, 12, 31, 12, 44, 31), None, None), (None, None, None, None, None, None, datetime.datetime(2018, 12, 31, 12, 44, 31, 744957, tzinfo=<UTC>), None), (None, None, None, None, None, None, None, 'POINT(30 10)'), (None, None, b'\xab\xac', None, None, None, None, None), (0.33, Decimal('10'), b'\xab\xac', datetime.date(3000, 12, 31), datetime.time(23, 59, 59), datetime.datetime(2018, 12, 31, 12, 44, 31), datetime.datetime(2018, 12, 31, 12, 44, 31, 744957, tzinfo=<UTC>), 'POINT(30 10)')]

retest this please

Retest this please

restest this please

jenkins is the worst : )

restest this please

retest this please

Run Python 3.7 PostCommit

Run Python 3.7 PostCommit

I think I need to fix a few of the integration tests that don't provide a schema or use SCHEMA_AUTODETECT.

I am able to run the integration test apache_beam.io.gcp.bigquery_file_loads_test:BigQueryFileLoadsIT but for some reason if I use the same procedure to run tests from apache_beam.io.gcp.bigquery_write_it_test.py:BigQueryWriteIntegrationTests, I get the following error:
[chuck.yang ~/src/beam/sdks/python cyang/avro-bigqueryio+]
% ./scripts/run_integration_test.sh --test_opts "--tests=apache_beam.io.gcp.bigquery_write_it_test.py:BigQueryWriteIntegrationTests.test_big_query_write_without_schema --nocapture" --project ... --gcs_location gs://... --kms_key_name "" --streaming false
>>> RUNNING integration tests with pipeline options: --runner=TestDataflowRunner --project=... --staging_location=gs://... --temp_location=gs://... --output=gs://... --sdk_location=build/apache-beam.tar.gz --requirements_file=postcommit_requirements.txt --num_workers=1 --sleep_secs=20
>>>   test options: --tests=apache_beam.io.gcp.bigquery_write_it_test.py:BigQueryWriteIntegrationTests.test_big_query_write_without_schema --nocapture
/home/chuck.yang/src/beam/sdks/python/test-suites/tox/py37/build/srcs/sdks/python/target/.tox-py37-gcp-pytest/py37-gcp-pytest/lib/python3.7/site-packages/setuptools/dist.py:476: UserWarning: Normalizing '2.21.0.dev' to '2.21.0.dev0'
  normalized_version,
running nosetests
running egg_info
INFO:gen_protos:Skipping proto regeneration: all files up to date
writing apache_beam.egg-info/PKG-INFO
writing dependency_links to apache_beam.egg-info/dependency_links.txt
writing entry points to apache_beam.egg-info/entry_points.txt
writing requirements to apache_beam.egg-info/requires.txt
writing top-level names to apache_beam.egg-info/top_level.txt
reading manifest file 'apache_beam.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'README.md'
warning: no files found matching 'NOTICE'
warning: no files found matching 'LICENSE'
writing manifest file 'apache_beam.egg-info/SOURCES.txt'
Failure: ImportError (No module named 'apache_beam') ... ERROR

======================================================================
ERROR: Failure: ImportError (No module named 'apache_beam')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/chuck.yang/src/beam/sdks/python/test-suites/tox/py37/build/srcs/sdks/python/target/.tox-py37-gcp-pytest/py37-gcp-pytest/lib/python3.7/site-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/home/chuck.yang/src/beam/sdks/python/test-suites/tox/py37/build/srcs/sdks/python/target/.tox-py37-gcp-pytest/py37-gcp-pytest/lib/python3.7/site-packages/nose/loader.py", line 418, in loadTestsFromName
    addr.filename, addr.module)
  File "/home/chuck.yang/src/beam/sdks/python/test-suites/tox/py37/build/srcs/sdks/python/target/.tox-py37-gcp-pytest/py37-gcp-pytest/lib/python3.7/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/home/chuck.yang/src/beam/sdks/python/test-suites/tox/py37/build/srcs/sdks/python/target/.tox-py37-gcp-pytest/py37-gcp-pytest/lib/python3.7/site-packages/nose/importer.py", line 79, in importFromDir
    fh, filename, desc = find_module(part, path)
  File "/usr/lib/python3.7/imp.py", line 296, in find_module
    raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named 'apache_beam'

----------------------------------------------------------------------
XML: nosetests-.xml
----------------------------------------------------------------------
XML: /home/chuck.yang/src/beam/sdks/python/nosetests.xml
----------------------------------------------------------------------
Ran 1 test in 0.002s

FAILED (errors=1)

Run Python 3.7 PostCommit

retest this please

retest this please

Run Python 3.6 PostCommit

Run Python 3.6 PostCommit

Run Python 3.6 PostCommit

LGTM. Thanks so much @chunyang

Can you squash your commits?
Github has a squashing option, but it would mark me as the author. If you squash them, I can merge and preserve your authorship.

Thanks for the review @pabloem ! I've rebased off of master and squashed my changes.

retest this please

retest this please

Run Python PreCommit

yup it seems like flaky/unrelated

exciting. thanks @chunyang


Add Nong Song: surface

Song Name
surface
Artist Name
kellbender
Source
Youtube
Youtube Link
https://youtu.be/NoLjX2Re3Tw?si=ZOzQsfLlXDLSK2Gm
Direct File Link
No response
Song ID
4971
Start Offset [ms]
No response
Extra
No response

reject. has nothing to do with the original song

reject. has nothing to do with the original song

and? 🤨


STM32L432KC Nucleo Reference board SWD problem after programming with Zephyr

I am developing an application currently running on STM32L432 KC Nucleo reference board. I have created an STMCubeMX startup file and simple application that works flawlessly.  I can program and reprogram at 4000 kHz using the STMCube  programmer tool.    I want to use Zephyr RTOS so I’ve built the Zephyr 2.5.0 L432KC project exactly as documented: https://docs.zephyrproject.org/2.5.0/boards/arm/nucleo_l432kc/doc/index.html
I can build either the “Blinky” or “HelloWorld” and load the image the first time flawlessly using The onboard ST-LINK at 4000 kHz.   However as soon as the Zephyr project is loaded, the SWD becomes troublesome.  West Flash loses complete control.  Moving back to STM tools I can sometimes connect.   I can not communicate at any speed other that 5 kHz. Sometimes not at all.   Usually it requires a power cycle and holding reset to erase (at 5 kHz) to reprogram.   Then I can use West Flash again.
Most interesting, I can program the STMCubeMX image and reprogram multiple times at 4000 kHz.  If I move over to the Zephyr tools and image, I can use West Flash the first time at full speed and subsequently I can reprogram the Zephyr image at 480 kHz.  If I remove power from the target, I have to go back to the STM Programmer to erase the Zephyr image at 5 kHz and start the process again.  It appears at the Zephyr image is not initializing at least one register at startup.  Once the register is set using the STMCubeMX image, as long as power is not removed, the Zephyr image works OK (not great since programming speed is only 480 kHz.)
Has anyone else seen this or resolved this issue?  It appears that something is not being initialized completely.  I will continue the research, as well as try this on other STM boards.
I did try this on a Nucleo STM32F401 and it does not seem to exhibit the problem.  It works flawlessly.

I did update the ST-LINK Firmware without success.  I've tested this function on numerous other boards (Mostly "F") boards and the problem does not exist on them.  I've ordered 4 new "L" boards with different processors to test the functionality.

I have same problem with stm32L4a6.

With stm32CubeProgrammer I connect at speed 15 ... 125K  then do mass erase.
Then I able flash at hight speed. Then I can work normal until  power off/on. After this swd  speed decrease again, and I must repeat step 1.
I use  zephyr v2.5.
CPU power 1.8V
It looks software problem - (maybe MPU or corruption system registers ...)

I have same problem with stm32L4a6.

Thanks for keeping us informed. I guess this is a custom board, right ?
(this could be a potential clue in the analysis)

Yes, this is custom board.  But I found chucklink report.
He using nucleo board. So possible system error.
I dont have problem with swd speed before.

I dont have problem with swd speed before.

@DariusBabrauskas Are you suspecting a regression ? If yes, can you share some details ?

After investigation, possible we found cause of problem. It looks that swd can't connect if mcu sleeping (wfi). (our custom board dont have hardware reset connected to swd- if it can help).
My test code in init.c file before main:
.....................
int cnt=0;
while(1){
k_msleep(1);//swd can connect
//k_msleep(3);//swd can't connect
printk("%04d.\r\n",cnt++);
}
extern void main(void);
main();..................

Solution for stm32:
#if CONFIG_DEBUG_SWD == 1
#include "stm32l4xx_ll_system.h"
#endif
#if CONFIG_DEBUG_SWD == 1
LL_DBGMCU_EnableDBGSleepMode();//
#endif

Thanks @DariusBabrauskas for reporting this.
If that's the solution we're looking for for this issue, then ok, I don't think this could be harmful.
What I'm not sure to understand is why this would be needed now, as this is not specific to a L4xyz specific variant, not L4 specific at all.
Is that a new issue that appeared recently or would it be because of your custom board specifics ("our custom board dont have hardware reset connected to swd- if it can help") ?
@chucklink Can you have a try with the proposed solution and see if fixing your issue ?
Btw, I just got hands on a nucleo_l43kc board this morning.
I'm sorry to say that I don't reproduce exactly the point you're mentioning ("impossible to flash a zephyr image following a power off on a board using zephyr image").
What I do see, though, in the same condition, is that openocd complains, but finally manages to get back on its feet and eventually flashes. Cf log below
Error: mem2array: Read @ 0xe0042004, w=4, cnt=1, failed
Error executing event examine-end on target stm32l4x.cpu:
/local/mcu/zephyrproject/sdk/zephyr-sdk-0.12.2/sysroots/x86_64-pokysdk-linux/usr/share/openocd/scripts/mem_helper.tcl:6: Error:
in procedure 'ocd_process_reset'
in procedure 'ocd_process_reset_inner' called at file "embedded:startup.tcl", line 288
in procedure 'mmw' called at file "/local/mcu/zephyrproject/sdk/zephyr-sdk-0.12.2/sysroots/x86_64-pokysdk-linux/usr/share/openocd/scripts/target/stm32l4x.cfg", line 108
in procedure 'mrw' called at file "/local/mcu/zephyrproject/sdk/zephyr-sdk-0.12.2/sysroots/x86_64-pokysdk-linux/usr/share/openocd/scripts/mem_helper.tcl", line 36
at file "/local/mcu/zephyrproject/sdk/zephyr-sdk-0.12.2/sysroots/x86_64-pokysdk-linux/usr/share/openocd/scripts/mem_helper.tcl", line 6
Info : Previous state query failed, trying to reconnect
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800145c msp: 0x20000740
Polling target stm32l4x.cpu failed, trying to reexamine
Info : stm32l4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : device idcode = 0x10016435 (STM32L43/L44xx - Rev: Z)
Info : flash size = 256kbytes
Info : flash mode : single-bank
Warn : Adding extra erase range, 0x08003468 .. 0x080037ff
auto erase enabled
wrote 13416 bytes from file build/nucleo_l432kc/zephyr/zephyr.hex in 0.875596s (14.963 KiB/s)

And I can actually see the exact same behavior on other L4 board (disco_l475_iot1).
About programming speed, indeed STM32CubeProgrammer offers to flash using higher speed than current openocd configuration in Zephyr. I'm not sure that we can change openocd setting, but you can use stm32cubeprogrammer runner.
Cf for instance boards/arm/nucleo_g071rb/board.cmake

@chucklink Did you have time to looked at upper comment ?

It seems to me, that @erwango used openocd. I am using pyocd. Maybe theys scripts different.  Openocd at start used low connection speed.


add v5 ws execution

Added a subscription for order execution

docs: https://bybit-exchange.github.io/docs/v5/websocket/private/execution


wrap text in status bar

When a hydra is active, the status bar shows the available actions. This message should automatically be wrapped to fit.

Now using a popup menu instead of the status bar, so this is no longer an issue.


Ocaml Janestreet Packages: fix installation path of stub dlls.

Motivation for this change
The install phase of Jane Street's ocaml packages puts any .so libs in site-lib/stublibs, while findlib (?) looks for them in site-lib/$name. This moves the .so where they should be.
Things done

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

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

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Fits CONTRIBUTING.md.

Can you please show an example of something that is broken, so as to better understand the issue you are addressing?

core was not usable in utop, because it failed to load libstubbase.so (from base) and libstubexpect_collect.so (from expect_ppx)

I’m not sure that the issue comes from where the libraries are installed. See #34981 for an other approach.

Agreed, #34981 is probably better. lambdaterm and nocrypto move their stubslibs, I don't know if it's useful.

I finally understood that the hook that I proposed in #34981 does not belong to utop but rather to findlib. See #37161.

Does this mean that this PR is obsolete?

Closing because PR appears to be obsolete.


Use subscription based events handling

This is a redesign of the event system to approximate a rough observable model.
There is no longer a removeEventListener methods. Subscribing to an event will return a subscription handle which you hold onto as long as you need the event. It's the equivalent of a smart point for events streams.
EventListener is defined as a simple function and a subscription handle as a std::shared_ptr to void. shared_ptr can take a custom deleter and this is leveraged to perform the unsubscribe when all copies of the shared pointer are gone.
    using EventListener = std::function<void(Event&)>;
    using Subscription = std::shared_ptr<void>;

There are various way to subscribe and unsubscribe.
        // subscribe and unsubscribe when the Subscription is disposed.
        [[nodiscard]]
        Subscription subscribe( EventListener listener);
        // subscribeForEver but you can set the unsubscribe field on the event to true if you want
        void subscribeForEver( EventListener listener);
        // subscribe with listener and unsubscribe after the first event
	void subscribeOnce(EventListener listener);
        // subscribe with listener until s fires an event then unsubscribe
        void subscribeUntil(EventDispatcher &s, EventListener listener);

The unit test shows how the above works

#include "threepp/core/EventDispatcher.hpp"
#include "threepp/materials/MeshBasicMaterial.hpp"

#include <catch2/catch_test_macros.hpp>

using namespace threepp;

TEST_CASE("Test subscribe") {

    EventDispatcher evt;

    int nCalls = 0;
    {
        auto s0 = evt.subscribe( [&](Event& e) {nCalls++; });

        REQUIRE(nCalls == 0);
        evt.send(Event{});
        REQUIRE(nCalls == 1);
        evt.send(Event{});
        REQUIRE(nCalls == 2);
    }
        evt.send(Event{});
	REQUIRE(nCalls == 2);

}

TEST_CASE("Test addEventListenerOneOwned") {

    EventDispatcher evt;

    int nCalls = 0;
    evt.subscribeForever([&](Event& e) {
        nCalls++;
        if (nCalls == 2) { e.unsubscribe = true; } });

    REQUIRE(nCalls == 0);
    evt.send(Event{});
    REQUIRE(nCalls == 1);
    evt.send(Event{});
    REQUIRE(nCalls == 2);
    evt.send(Event{});
    REQUIRE(nCalls == 2);
}
TEST_CASE("Test subscribeOnce") {

    EventDispatcher evt;

    int nCalls = 0;
	evt.subscribeOnce([&](Event& e) {nCalls++; });
	REQUIRE(nCalls == 0);
    evt.send(Event{});
	REQUIRE(nCalls == 1);
	evt.send(Event{});
	REQUIRE(nCalls == 1);
}

Mouse and Keyboard listeners are now broken into separate objects. The Orbit controller is a good example of how clean it is now.
            auto& mouse = scope.pimpl_->canvas.mouse;
            mouse.OnMouseUp.subscribeOnce([&](MouseButtonEvent& e) {
                onMouseUp(e, scope);
	    });
            mouse.OnMouseMove.subscribeUntil(mouse.OnMouseUp, [&](MouseEvent& e) {
                onMouseMove(e, scope);
            });

here after the mouse down we subscribe once to the mouse up and subscribe to the mouse move until mouse up fires.
To see how unsubscribe works looks at OrbitControls.cpp and OrbitControls::Impl
struct OrbitControls::Impl {

    /// Holds the subscriptions and follows rule of zero in that no
    /// destructor is required in the holding class to remove subscriptions.
    /// They are simply unsubscribed when the holding object subs_ is
    /// destroyed which happens when the instance of Impl goes out of scope.
    Subscriptions subs_;

    Impl(OrbitControls& scope, PeripheralsEventSource& canvas, Camera& camera)
        : scope(scope), canvas(canvas), camera(camera)
	  {
        subs_ << canvas.keys.Pressed.subscribe([&](auto& e) mutable { onKeyPressed(e, scope); });
        subs_ << canvas.keys.Repeat.subscribe([&](auto& e) mutable { onKeyRepeat(e, scope); });

        subs_ << canvas.mouse.Down.subscribe([&](MouseButtonEvent& e) {
            this->onMouseDown(e, scope);
        });

        subs_ << canvas.mouse.Wheel.subscribe([&](MouseWheelEvent& e) {
            this->onMouseWheel(e, scope);
		});

        update();
    }

}

Thanks for the work. This is quite a change, however, so I need to think about it.
Note that instancing example chrases when InstancedMesh is destroyed. On your first iteration this was fixed by keeping the copy then iterate approach, but this still crashes on the latest version. Have not looked much into it yet.

I'm not entirely happy with the pull request design. In principle it works fine. However it is a fairly rough hack on what should be a more rounded concept, one which I didn't have time to fully flesh out. I would refer to
https://github.com/victimsnino/ReactivePlusPlus
as a better model. For example instead of
object.mouse.OnMouseDown.subscribe([](Event e){ // do something });

It would be better
object.mouse.OnMouseDown
   | rpp::operator::subscribe([](Event e){ // do something });

That in itself is no improvement but now you can do things like
object.mouse.OnMouseDown
    | rpp::operator::throttle(std::chrono::milliseconds{300})
    | rpp::operator::subscribe([](Event e){ // do something });

There are all sorts of fun operators available that make processing event streams easier

Unfortunately the lib is c++20 only.

The following code will crash the program as subs go out of scope:
Modified GLRenderer.hpp
GLRender
        if (programs.empty()) {
            // new material
            subs.emplace_back(material->OnDispose.subscribe( [this](Event& event) {
                this->deallocateMaterial(static_cast<Material*>(event.target));
                event.unsubscribe = true;
            }));
        }

will crash the program as subs go out of scope.
The lifetime of event is something that has been an issue from the get go. Initially I used weak_ptrs where the shared_ptrs  were provided by the user. However, this was cumbersome.

Can you create and push  unit test demonstrating the crash?
On Mon, 4 Mar 2024, 13:04 Lars Ivar Hatledal, @.***>
wrote:

The following code will crash the program as subs go out of scope:
Modified GLRenderer.hpp
GLRender
    if (programs.empty()) {
        // new material
        subs.emplace_back(material->OnDispose.subscribe( [this](Event& event) {
            this->deallocateMaterial(static_cast<Material*>(event.target));
            event.unsubscribe = true;
        }));
    }

will crash the program as subs go out of scope.
The lifetime of event is something that has been an issue from the get go.
Initially I used weak_ptrs where the shared_ptrs were provided by the user.
However, this was cumbersome.
—
Reply to this email directly, view it on GitHub
https://github.com/markaren/threepp/pull/237#issuecomment-1976430700,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAEJ4XNPSYNEWTBHPQPRYLYWRPNDAVCNFSM6AAAAABEB34RQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZWGQZTANZQGA
.
You are receiving this because you authored the thread.Message ID:
@.***>

That is clearly bad code because the subs must live longer than the object they are subscribed to. Objects are disposed in reverse order they are created. So subs are destroyed last. One should just use subscribeForever or subscribeOnce if there is no need to actually unsubscribe before the event generator itself is destroyed. We could ensure that all instances of TEventDispatcher are handled via shared_point and enable_shared_from_this and then
        [[nodiscard]] Subscription subscribe(EventListener listener) {
            size_t current_id = id_;
            id_++;
            listeners_.insert({current_id, listener});
            return utils::at_scope_exit([this, current_id]() { unsubscribe(current_id); });
        }

becomes
        [[nodiscard]] Subscription subscribe(EventListener listener) {
            size_t current_id = id_;
            id_++;
            listeners_.insert({current_id, listener});
            return utils::at_scope_exit([weak_self=shared_from_this(), current_id]() {
                 if (auto self  = weak_self.lock())
                     self->unsubscribe(current_id);
            });
        }

I have figured out how to solve the real problem I have had. While destructing GLRenderer et.al, I need to hook into all references to materials and geometries and clear their dispose subscribers. This allows objects to outlive the GLRenderer, which is what I have been struggeling with. For this PR it only means that we need a clear() function available.

I think the EventDispatcher should generate subscriptions that hold weak pointer references just in case the user gets the lifetimes wrong. If you know the lifetime of the EventDispatcher is less than the observer then it is better to use SubscribeForever but maybe it's not always obvious and some safety could be built in. I might have a go at that when I get some time.

Or maybe subscription objects are held by both the generator and the observer and when the observer goes out of scope it clear all subscription objects so they can't fire again.

At least the internal listeners are now cleared as part of destruction. Any referenced texture, material, geometry and rendertarget are forced to dispose when the GLRenderer destructs. InstancedMesh, however is not tracked internally, so that one is not cleared. Since dispose is used, this PR did not need any change.

I am mostly in favor of merging this PR more or less as it is now. However, I do wonder how generic events ought to be handled?   Any insights? On the flip side, one could say that this is something to be solved in "user land".

I am mostly in favor of merging this PR more or less as it is now. However, I do wonder how generic events ought to be handled? Any insights? On the flip side, one could say that this is something to be solved in "user land".

I added some comments about this idea above. Pairing with an observable pattern library or at least making sure that it is adaptable would be good.
https://github.com/markaren/threepp/pull/237#issuecomment-1976031304


Update partial routing in pdk/finfet

This PR updates partial routing in align/pdk/finfet:
if NEW_PARTIAL_ROUTING_FEATURE:
  route single transistor primitives up to m1 excluding gate
  route double transistor primitives up to m2 to improve matching

@soneryaldiz The TAMU router folks are working on fixing some of these violations. If we care about the cases that are failing now but would disappear with this change, then we might want to create that example someone in a unit test.
We should probably communicate changes here to #1001

@stevenmburns , no need to work on fixing tests/pdk/finfet_pdk/test_circuits_partial_routing.py
I will update #1001.


Error activating current tab link in Firefox 57.0

Firefox Quantum got fast again... so fast that even broke our demo snippet, especially line 142.
Expected outcome:
The active link in the demo navigation should have active attribute.
Actual outcome
The following error is thrown:
TypeError: this.$.nav.querySelector(...) is null

Steps to reproduce

serve any element demo locally (e. g. vaadin-dropdown-menu)
open demo page in Firefox 57
refresh the page (the error seems to be thrown occasionally)

So it seems that setTimeout in the related code should be replaced (or increased, but that would cause noticeable active link flash).

I also remember seeing this earlier this week, but at least now I'm unable to reproduce this in Quantum (tried windows and mac). But was able to reproduce when I changed the setTimeout for 1 millisecond so it is definitely something with that nav querySelector.


Update libraries-and-tools.md

Add link to etcd-rest library.

@cdancy Can you please format your commit message according to https://github.com/coreos/etcd/blob/master/CONTRIBUTING.md#format-of-the-commit-message?
doc: update libraries-and-tools.md

@xiang90 should be good to go.

LGTM. Thanks!


Investigate/Fix CPU utilization

Loungy is pretty heavy on CPU. It's not acceptable for it to use 1.5% of my CPU while running in the background, draining my battery.
Even worse, it seems after some sleep/wakeup cycles Loungy sometimes goes into a state of hogging the entire CPU, making my MacBook run hot and draining the battery insanely fast. I have yet to figure out what causes this.

I fixed the wakeup issue in GPUI, waiting for feedback from upstream if the fix can be upstreamed, but for Loungy purposes it works nicely.

Another issue is the current clipboard implementation. If you have a big image in the clipboard, it's bytes get hashed every second, which causes huge CPU utilization. Instead of polling arboard I should implement a platform specific clipboard watcher that notifies the clipboard module somehow.


[Program Card Images] Polish the admin UI

Description
A whole host of UI polish to the program image upload UI based on feedback from Ron and Shreya. A list of changes:

Move the alt-text form to be above the image upload form
Minor update to the alt-text form label
Disable the image upload form until alt-text has been provided (and add text explaining that to the user)
Minor update to the file max size hint text
Add additional hint text about image being cropped to 16x9 (based on feedback from Seattle)
Make the file upload box take the whole column width (that's the _uswds-theme-custom-styles.scss change)
Center the program card preview within its column

Release notes
Checklist
General
Read the full guidelines for PRs here

[x] Added the correct label: < feature | enhancement | bug | dependencies | infrastructure | ignore-for-release | database >
[x] Assigned to a specific person, civiform/developers, or a more specific round-robin list.
[x] Created unit and/or browser tests which fail without the change (if possible)
[x] Performed manual testing (Chrome and Firefox if it includes front-end changes)

User visible changes

[x] Manually tested at 200% size
[x] Manually evaluated tab order

Instructions for manual testing
As an admin, navigate to the program image upload page and check out the cool new digs :)
Issue(s) this completes
Part of epic #5676

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

Current dependencies on/for this PR:

main

PR #6425

PR #6447   👈

This stack of pull requests is managed by Graphite.

I also wanted to raise that with the current behavior it's possible to save the alt text without adding an image which results in something like this

Hmm, I don't think that should be happening? We only add an image to the view if the actual file key is present: https://github.com/civiform/civiform/blob/cce0552baec4746f118423a64f6c37c09c7f2c5d/server/app/views/ProgramImageUtils.java#L45-L47.
What could've happened that I've experienced before is that if I add an image to a program then kill & restart bin/run-dev later, the image will be gone from cloud storage because we kill and restart LocalStack which is what stores the images. So then if you look at the program with the new bin/run-dev, the image can't be found so the browser falls back to showing alt text. Can you try creating a new program, only filling in alt text, and see if it still repros?

Can you try creating a new program, only filling in alt text, and see if it still repros?

I just tried that and am still seeing the alt text show up in the preview and when publishing the program.

Is that not happening for you?

Weird, that behavior isn't happening to me... let me look further.

Paired offline, and we realized that you can click "Save image" even if you haven't uploaded an image and that will cause the program card to show just the alt text like the screenshot Rocky showed. https://github.com/civiform/civiform/pull/6465 will disable the button unless there's actually an image there, and we may also want to throw an error somewhere before saving to the database if the file key is empty.


Alignment get messed up when docblock is present

Alignment get messed up when docblock is present
Code before cs-fixer
    /**
     * @param $param
     * @return mixed
     */
        public function length($string)
    {
        return strlen($string);
    }

Code after cs-fixer
    /**
     * @param $param
     * @return mixed
     */
        public function length($string)
        {
            return strlen($string);
        }

command used php-cs-fixer fix --level=psr2 File.php

I don't think that's a bug? That looks like the correct behaviour. The indentation of the function was matched with the definition.

May be I didn't explain it properly.
Please check these two files

Before cs-fix https://gist.github.com/anonymous/21b3eee6f6d3e54390fa
After cs-fix https://gist.github.com/anonymous/c411cd0a2e509b2728a7

methodFirst is properly indented in both the files.
Please check what happen to methodSecond and methodThird after you run cs-fix, they are not aligned with the with the methodFirst

You did explain it right, and I don't think this is a bug.

Is there any way align all the methods of class when the doc block is present. They only align whey doc is not there.

I agree our fixers don't fix all cases, but that's not really a bug.

We just need more fixers.

Of course it is a bug. The indentation fixer should fix incorrect indentation, no?

No, It just matches the function body with that of the definition.

That is "fixing" it.

OK. I still think it is a bug. When there are no comments present, the indentation is normalized a expected:
class test
{
public function one()
{
}

          public function two()
            {
            }
}

is formatted as
class test
{
    public function one()
    {
    }

    public function two()
    {
    }
}

When there are comments though, the indentation is not normalized, e.g.:
class test
{
// Comment
public function one()
{
}

          // Comment
          public function two()
            {
            }
}

is formatted as
class test
{
    // Comment
public function one()
{
}

          // Comment
          public function two()
          {
          }
}

That to me is not expected behavior.

@svenax :heavy_plus_sign: :one:

Thank you for report. Could you send a PR with fix for that please?

Is this still happening?

Is this still happening?

it is on master atm

still relevant on 2.2

Fixed, will be released soon. thanks to @julienfalque !


Component: DynaForm "Advanced features" showcase broken since 14.0.7 (Button does not submit via AJAX)

Describe the bug
The "advanced features" tab of the DynaForm showcase seems to be broken since 14.0.7. Not sure what the issue is exactly. It's working fine locally with the 14.0.6 tag and below, and doesn't work with 14.0.7 and 14.0.8. At first glance, I didn't see any change that might be responsible, though.
Reproducer

Pull the current master branch and start the showcase
Go to http://localhost:8080/showcase-ext/sections/dynaform/advancedFeatures.jsf
After 1-2 seconds, an error is logged to the console (Widget for var 'dynaFormWidget' not available!) and the page becomes blank

The JS error seems unrelated -- the widget calls PF(...) to check if the widget exists and that just logs an error message.
What seems to be happening is that the showcase set the autoSubmit property on the DynaForm to true. The client side JavaScript then submits the form. The server, when it processes that POST request, notices a CSP nonce mismatch and throws an exception. This results in an unfinished response, which probably explains the blank page. The main issue seems to be that the submit is not made via AJAX anymore, see comment below.
Java logs a CSP issue:
org.primefaces.csp.CspException: CSP nonce mismatch
	at org.primefaces.csp.CspState.getNonce(CspState.java:90)
	at org.primefaces.csp.CspPhaseListener.initCsp(CspPhaseListener.java:96)
	at org.primefaces.csp.CspPhaseListener.beforePhase(CspPhaseListener.java:68)
	at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:77)
	at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:259)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:206)
	at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1459)

Expected behavior
Behaves as befores: It submits the form and displays the result in a dialog.
PrimeFaces Extensions version
14.0.7
JSF implementation
None
JSF version
No response
Browser(s)
No response

Another difference between 14.0.6 and 14.0.7 is that previously, the POST was sent via AJAX, but now seems to be sent as a normal POST request. And the AJAX submit JS code seems to be missing from the button:
14.0.6

14.0.7

Yep has to be CSP related.

It's the only thing that really changed between these versions was enabling CSP on the showcase

I think I found the issue now. Enabling CSP is definitely the reason why the onlick attribute is missing. Instead, the CspResponseWriter renders a JavaScript at the end of the body like PrimeFaces.csp.register('dynaForm:search', ...) to handle the search. The problem is though, that this happens too late.
The DynaForm code that checks for the autoSubmit attribute and submits the form is run when the widget is created, and that happens on page load before PrimeFaces.csp.register(...)  gets run.


Add etcdctl

is 3.2.1 the same version of etcd on k2?

Just a question about version, otherwise LGTM

It depends on the k2 configuration file. By default, v3.1.0 is specified.
I am not opposed to installing the latest patch version for the default minor version, it's probably a good idea. The documented support policy could bite us if/when someone starts depending on the output of etcdctl.
Note that I am purposely not installing etcdctl such that it can be (easily) versioned at this time. I want to avoid such a situation if at all humanly possible.

May be worth on being consistent with our default version and allow k2 dev to decide if their cluster and tooling should be consistent.

I think its a little bit of a boondoggle though.  Is there anything stopping us from using etcd in a container so that the version always matches whatever the cluster was configured to use?

I think it will be less error prone if we avoid DnD and pulling images at runtime. As for the latter benefit, if we pull the image at build time then we have the same version mismatch problem we were trying to avoid.

Pulling executables at runtime...hmm.   (I get the version concern).
I suppose the longer startup time isn't an issue.   But it just feels wrong.
(I have no solution though).

@mikeln Agreed that pulling at runtime is disagreeable. Since all I really want is a version of etcdctl to support etcd liveliness checks for now, is there any disagreement to tabling the version concerns for now?


CSV output in CLI does not account for embedded commas (at least for persons)

Could not replicate


cnn_face_detection_model_v1 doesn't seem to batch properly

Hi Davis,
I'm investing this, but would like to write it, in case you have any idea or suggestion that could save me some time. I have a great need for a face detection & recognition pipeline that's fast, so I'm batching images together (hence the PR I just made).
Batched face detection seems to be already implemented, but here are my scores:
On 1042 images, "batched" one by one:
total detect time: 62.365166902542114
mean detect time: 0.0597940238758793

On the same 1042 images, batched by group of 75:
total detect time: 53.905285120010376
mean detect time: 3.8503775085721696

Quick maths, 75 * 60ms ~= 4.5s. The gain is clearly not substantial enough, an looks like the batching is not happening.
I'm investigating. If you have any idea in the meantime... please let me know :)

Yeah or maybe you aren't actually batching.  No idea.

I'm investigating then :) Thanks for letting me know. The other PR should be ready very soon.

Okay, most of the time is spent in the net. Is there a way for me to check the time spent in each layer individually?

I would add logging/timing statements to the code.

Closing since I couldn't find any obvious way to speed things up and I moved on with a custom face detector with Pytorch.

@Vermeille  Hi ! Please which face detector did you use in Pytorch  ? If you could share a link or the code would be great ! Thanks in advance !


Enhance shell app with index.html

Just clone the repo and execute qbrt run shell to have a hello world page.

Thanks for the contribution! I'm curious about how this differs from qbrt run example, which seems to do the same thing. I wonder if there's a way for the shell app to provide a different experience. Alternately, perhaps we don't need the example app with these changes to the shell?

I think the benefit of using shell app is you can define some XUL specified features. And the question would be: what kind of features are XUL limited?(i.e. can not be implemented by js, html, jsm). But, I doubt how many developers are interested in XUL development. lol.

I think the benefit of using shell app is you can define some XUL specified features. And the question would be: what kind of features are XUL limited?(i.e. can not be implemented by js, html, jsm). But, I doubt how many developers are interested in XUL development. lol.

Indeed, there may not be very many developers who are interested in building XUL apps. But it could still be valuable to demonstrate one. How about creating an examples/ directory and putting a new XUL app into it, calling it something like examples/hello-world-xul/? Then we could move the example/ directory to examples/hello-world-html/ and use the two directories to compare an HTML app to a XUL one!
(The reason I suggest a separate app, instead of reusing the shell app, is that the shell app is used internally to implement running/packaging of a URL, so I'd like to avoid including code in it that is just for demonstration purposes.)

Understand. I update a commit, please have a look!

how about this?

how about this?

It looks good! Two small nits, which I'll fix when merging:

According to the XUL tutorial, "You cannot embed text directly into a XUL file without tags around it and expect it to be displayed. You can use two XUL elements for this purpose." Strangely, the "Hello, World!" text in index.xul does get displayed. But it'd be more correct to use a <label> element.
Empty elements in XUL like <script src="app.js"></script> are generally written as an empty-element tag (a.k.a. the "self-closing syntax"), i.e. <script src="app.js"/>.

Merged with those changes. Great work, thanks @hankchiutw!
Note: I'd be happy to see more example apps in the examples/ directory, as well as new features in the existing example apps. So if there's something you're interested in demonstrating, feel free to propose and/or implement it!
(For the "hello-world" apps, as I mentioned before, it would be ideal if the two apps had equivalent features, so it's possible to compare the implementation in HTML to the implementation in XUL. For other example apps, however, there's no need to implement two different versions. A single app, whether HTML or XUL, is just fine.)

Thanks! Looking forward to seeing the project growing up!


Can Hawck work on runit?

Is it possible to use Hawck on a runit system (void, artix...)? The documentation seems to mention only systemctl and after installing on artix, I could not find a runit service.
I have very little experience with runit (close-to-none). I installed the AUR hawck-git package then I think I managed to create a runit service that I named hawck with:
#!/bin/sh
exec /usr/bin/hawck-inputd --no-fork

Once symlinked in the right folder, I get a correct-looking output for sv:
$ sudo sv check hawck

ok: run: hawck: (pid 23178) 842s

hawck-macrod seems to run without problems.
But after that hawck-add still fails:
$ hawck-add ~/.config/hawck/scripts/example.hwk

realpath: /home/xav/.local/share/hawck/scripts//example.lua: No such file or directory
/usr/bin/hawck-add: line 56: : No such file or directory
/usr/bin/hawck-add: line 58: cd: /home/xav/.local/share/hawck/scripts/: No such file or directory
lua5.3: module 'init' not found:
        no field package.preload['init']
        no file '/usr/share/lua/5.3/init.lua'
        no file '/usr/share/lua/5.3/init/init.lua'
        no file '/usr/lib/lua/5.3/init.lua'
        no file '/usr/lib/lua/5.3/init/init.lua'
        no file './init.lua'
        no file './init/init.lua'
        no file '/usr/lib/lua/5.3/init.so'
        no file '/usr/lib/lua/5.3/loadall.so'
        no file './init.so'
stack traceback:
        [C]: in function 'require'
        [C]: in

Thanks a lot for the package, haven't tried it yet but it looks really powerful!

Following the hint for permission issue on https://github.com/snyball/Hawck/issues/28#issuecomment-637578650 helped a bit.
Now hawck-macrod creates error notifications popups.
The first one complained that it could not access .local/share/hawck/scripts. After creating the dir manually,  hawck-macrod yields a new error popup, which look identical to a part of what I got from hawck-add earlier:
Hawck Script Error
module 'init' not found:
        no field package.preload['init']
        no file '/usr/share/lua/5.3/init.lua'
        no file '/usr/share/lua/5.3/init/init.lua'
        no file '/usr/lib/lua/5.3/init.lua'
        no file '/usr/lib/lua/5.3/init/init.lua'
        no file './init.lua'
        no file './init/init.lua'
        no file '/usr/lib/lua/5.3/init.so'
        no file '/usr/lib/lua/5.3/loadall.so'
        no file './init.so'

After
(1) running https://github.com/snyball/Hawck/blob/master/bin/hawck-user-setup.sh
(2) enabling UNSAFE keys,
it seems to work 👍 👍


Tiny spelling correction in Polish localization

I know it's nitpicking and apologize for that. In Polish - unlike in many other languages - we write names of nationalities with lowercase letters and newly added Czech was the only one standing out.
Nonetheless, great to see the project in Czech. Great job @MichalBryxi!

Really nice that you're caring for the small details – Once again, thank you very much! 😊


Micro typos in synthetic.md

Two missing periods (.)

Solved in "Content open safely learning" as paragraph this PR relates to changed.  Closing PR.


Skip TypeNameHandling CodeQL issue from Azure and Blobs packages

#minor
Description
This PR skips the TypeNameHandling.All restriction for Azure and Blobs Storage serializes.

/promoted 6592


Sync Vulnerability patches from Master -> Development

fixes issue with devise, eslint-utils.
Also  attempts to fix the randomly failing annotations test

thanks @xsrust


Save x3d file

when i export to x3d format.
some times the x3d file missing some tages like  or  and
i wrote a code to verify  and  tags but for  i cant find a way how edit x3d exported file.

sorry I don't understand the question.. (i'm afraid i'm not an expert of x3d anyway.. )

I use Exportwindows  to save current windows and use it in web .
The exported file is an HTML and x3d file .
X3d file is a XML file and there are many tags. There tag's have a opening and close section like
 <\Scene>
When a I export windows, the x3d and HTML files create. But in x3d file content, some tag's dose not closed.
So I don't understands why this happens or whe, because its a randomly behaviors.

I've looked into both html and x3d files generated by the examples/other/export_x3d.py but i could not see any unclosed tags

Of course, this problem occurs for a large file. For example, when the exported file is about 30 MB, there is just one unclosed tag. for a larger file, there are many unclosed tags.  I wrote the below code to solve the problem, but I know this is not a good solution and have some bugs.
with open('main.x3d') as f:
    for line in f:
        pass
    last_line = line

modified = last_line.split('  ')

loadfile = open('main.x3d','a+')
if modified[-1] == '</Transform>\n':
    for i in range(len(modified)-1-2):
        loadfile.write('</Transform>\n')
    loadfile.write('</Scene>\n')
    loadfile.write('</X3D>')
if modified[-1] == '</Scene>\n':
    loadfile.write('</X3D>')
loadfile.close()

You may want to play around with the settings of the class https://vtk.org/doc/nightly/html/classvtkX3DExporter.html
by making a custom exporter function:
import vtk
from vedo.docs import x3d_html
exporter = vtk.vtkX3DExporter()
exporter.SetBinary(binary)
exporter.FastestOff()
exporter.SetInput(vedo.settings.plotter_instance.window)
exporter.SetFileName(fileoutput)
exporter.Update()
exporter.Write()
x3d_html = x3d_html.replace("~fileoutput", fileoutput)
wsize = settings.plotter_instance.window.GetSize()
x3d_html = x3d_html.replace("~width", str(wsize[0]))
x3d_html = x3d_html.replace("~height", str(wsize[1]))
outF = open(fileoutput.replace('.x3d', '.html'), "w")
outF.write(x3d_html)
outF.close()
print("\save Saved files:", fileoutput, fileoutput.replace('.x3d', '.html'))

i check it, i think my solution is a temporary solution if some one have problem with this exporter , so i closed the issue.


Add comment linking to vanilla Javascript version

Following up on #2, adds link in README to the vanilla Javascript version.

Awesome! Thanks a lot, merging


NO-JIRA: Bump the github-dependencies group with 13 updates

Bumps the github-dependencies group with 13 updates:

Package
From
To

github.com/Azure/azure-sdk-for-go/sdk/azcore
1.9.1
1.9.2

github.com/IBM-Cloud/power-go-client
1.5.6
1.5.9

github.com/IBM/ibm-cos-sdk-go
1.9.4
1.10.2

github.com/IBM/platform-services-go-sdk
0.56.3
0.56.4

github.com/IBM/vpc-go-sdk
0.46.0
0.48.0

github.com/aws/aws-sdk-go
1.44.298
1.50.19

github.com/coreos/ignition/v2
2.16.2
2.17.0

github.com/hashicorp/go-uuid
1.0.1
1.0.3

github.com/kubernetes-csi/external-snapshotter/client/v6
6.0.1
6.3.0

github.com/onsi/gomega
1.30.0
1.31.1

github.com/opencontainers/image-spec
1.1.0-rc2.0.20221005185240-3a7f492d3f1b
1.1.0

github.com/operator-framework/api
0.10.7
0.22.0

github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring
0.57.0
0.71.2

Manually fixes for https://github.com/openshift/hypershift/pull/3597

/test verify
/test unit
/test images
/test e2e-aws

/retest

/close
closing mine in favor of https://github.com/openshift/hypershift/pull/3617