Bingo kustomize

Fixes a few deprecation warnings and adds kustomize to bingo. Can't yet find a way to make string replacements in the urls though :(

@dtfranz, is there a diff in the resulting kustomize build * outputs after this change?

/retest DCO


Use rosdep to install python dependencies

In the RoboStack project that combines Conda with ROS we were running into problems building mqtt_bridge because of the custom pip install target. This PR removes this and uses standard rosdep to install the dependencies.

@Tobias-Fischer I found python3-msgpack and python3-paho-mqtt in ubuntu package repository. But I can't find python-inject there. Can you resolve this dependency in your envitonment?

I see. I found python-inject-pip here, so I think that python-inject-pip would be better.

https://github.com/ros/rosdistro/blob/master/rosdep/python.yaml


UI enhancement

changed files :
1- index.html
2- style.css
3- main.js

you also remove metadata and footer session.
Please check your changing

Hello
Sure I will check again
Thanks
On Fri, Feb 23, 2024, 10:49 AM Shadbalti @.***> wrote:

you also remove metadata and footer session.
Please check your changing
—
Reply to this email directly, view it on GitHub
https://github.com/ShadBalti/Age-Calculator-App/pull/27#issuecomment-1960765231,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARUVYRZHRC2UMMBVVVSKDC3YVAUWHAVCNFSM6AAAAABDU2OM22VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRQG43DKMRTGE
.
You are receiving this because you authored the thread.Message ID:
@.***>

added meta tags
and footer was already there

Thanks for contributing

no prob
anytime


[5.5] Prepare exception handling for PHP7+

@themsaid Can you please explain this changes?

@m1guelpf the reason is un-needed, this is self-described with PHP7+
Exception -> Throwable.

Throwable is the base interface for any object that can be thrown via a throw statement.  Allows you type typehint things like Exceptions and Errors.
It is similar to the Traversable interface, which allows you to detect if a class is traversable with foreach.

For reference: https://wiki.php.net/rfc/throwable-interface

I had some branches with similar changes here:
https://github.com/thecrypticace/framework/tree/feature/throwable-kernels
https://github.com/thecrypticace/framework/tree/feature/throwable-in-handler
https://github.com/thecrypticace/framework/tree/feature/throwable-pretty-much-everywhere
(each of the branches builds on the previous branch)
I didn't PR this because I ran into an issue with Ochestra TestBench. I brought it up on Twitter but didn't get a response and never got around to opening an issue/PR for a discussion. Ideally (I would think) the exception handler should typehint Throwable itself and create an instance of FatalThrowableError so you don't have to.

What is the issue with TestBench?

ErrorException: Declaration of Orchestra\Testbench\Console\Kernel::reportException(Exception $e) should be compatible with Illuminate\Foundation\Console\Kernel::reportException(Throwable $e)

TestBench has an exception kernel (used for integration tests iirc) but since it's not part of the package I can't change it with this PR. It would have to be updated first with the widened typehint to make the tests pass.
Though I guess in hindsight I could've made simultaneous PRs here and there for testing purposes.

 :)


💬 RFC: redundant API catalog views

🔖 Need
At the moment, we have two catalog views for the API entity:

the standard catalog view filtered by kind API: https://demo.backstage.io/catalog?filters[kind]=api&filters[user]=all

the api-docs view, provided by @backstage/plugin-api-docs
https://demo.backstage.io/api-docs?filters[kind]=api&filters[user]=all

Both views have minor differences:

header with title and sub-title
kind select field only in the catalog view
processing status filter only available at the catalog view
different default filter (all vs owned)

🎉 Proposal
Drop

route /api-docs
the nav entry
the page behind it (ApiExplorerPage)

at Backstage and only provide one view going forward instead of two similar/redundant views. Less confusion.
〽 Alternatives
All adapters can decide this on their own.
❌ Risks
No response
👀 Have you spent some time to check if this RFC has been raised before?

[X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

[X] I have read the Code of Conduct

Hmm, so I think this opens up another discussion with what the /catalog page will eventually become. Internally at Spotify we don't even have this page at all and it's not in the developers path for their daily use. We have a more specialised manage page which just shows you all the things that you own and care about, but of course you can use search to find other components by name.
That being said, that doesn't mean that this doesn't provide value to other end users and companies - I would like to suggest an approach that maybe the api-docs plugin doesn't just resurface the same data in the same view. I think that's what makes it a little bit unfortunate. Take the scaffolder as an example, look how you can see Templates in the /catalog view, but actually when you're in the /scaffolder route, you see these things as a different experience. It's much more rich and shows you information which you care about, but with similar search and filtering as the catalog view.
It's also arguable that even that is too close to the catalog view with the filters etc, but at least I think it's on the right track.
Thoughts?

I agree, it is confusing. The nice thing is that right now you have some control over this. In our case we just deleted the APIs option from the sidebar

Very similar to TechDocs' issue as well https://github.com/backstage/backstage/issues/3122
I'd say just like @awanlin, folks can remove the API sidebar item and not expose the two views to their developers.

Related #19911


Transitions for Tab Pills

This issue refers to the fact that at the moment, when you change the current opened tab with it's content the old active element will suddenly disappear and the new content will suddenly appear. We want to change this behavior and make some nice animations between the changes of the current active element, and the next one.
Example of nice transitions:

https://getbootstrap.com/docs/4.4/components/navs/#javascript-behavior
https://react-swipeable-views.com/demos/demos/#tabs
https://codemyui.com/accordion-tab-navigation-menu-hero-section-slider/
We could make use of one of these from tailwindcss:

https://tailwindcss.com/docs/transition-property/

https://tailwindcss.com/docs/transition-delay/

https://tailwindcss.com/docs/transition-property/

https://tailwindcss.com/docs/translate/

A smooth transition added for changing the tab pills in the tabs.js file.

A smooth transition added for changing the tab pills in the tabs.js file.


feat: CE-1066 update rationale to text field

Description
Change Rationale field type in CEEB decision from dropdown list to text field.
Fixes # (issue)
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

[ ] Test A
[ ] Test B

Checklist

[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes

Further comments

Thanks for the PR!
Deployments, as required, will be available below:

Frontend
Backend

Please create PRs in draft mode.  Mark as ready to enable:

Analysis Workflow

After merge, new images are deployed in:

Merge Workflow

@barrfalk I ran the failed cypress test locally and it's successful, the timeout issue again.


[Request - Product] Silverstripe framework

Full and short name of product
SilverStripe - general package name is silverstripe/framework
Does this product have LTS versions? What are the intervals between each LTS version?
No LTS versions.
What is the website for the product and for its version information?
https://www.silverstripe.org/software/roadmap/
Additional context
None

Silverstripe CMS has been added a few weeks ago by #3070. The link you provided here (https://www.silverstripe.org/software/roadmap/) is the same used on https://endoflife.date/silverstripe, so this issue can be closed.
@G-Rath let me know if I'm wrong and Silverstripe CMS has a different lifecycle than Silverstripe framework.


Upload Type Collections

Bug Report
It is related to "upload" type collections. First of all, it is impossible to upload new media files into the collection. Here is the error message:

In addition, already uploaded media files are not shown in the collection. There are a few requests with 500 errors.
Looks like an issue is in sorting by the "id" field (which is applied by default).

In the database, this property is called "_id" and everything works fine if I make the same request but with the correct name.

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce

Detailed Description

Hey @Jeluda — thank you for the report! We've identified the issue with sorting by ID and have just deployed a patch version of Payload that includes a fix (0.13.1).
As for the error related to uploading files, we can't replicate on our end just yet but we are continuing to explore why this might be.  Will report back shortly on that one!

Hello @Jeluda . Thanks for quick fix. Now upload collections works fine with Cosmos DB. But there are new issue appeared related to media id.

Hey @zaplvlad — #378 has been resolved in 0.13.5.
Thank you very much for reporting these items! Keep it coming!


README contents aren't updated after new package version is published

Thanks in advance for your bug report!

[X] Have you reproduced this issue in incognito/private browsing?
[X] Have you made sure you issue doesn't already exist?

Where is the URL that this occurs?
https://web.pulsar-edit.dev/packages/calculator-light-ui
What's your issue?
The README contents shown on this page are stale. I've published at least one new version since the README has been updated, but the change are not reflected on the page.
Which OS/Browser/Version does this happen on?
N/A
Steps to Reproduce/Additional Details:
No response

@savetheclocktower When's the last time you were able to replicate this behavior?
Since when you published this new version back in February, there was still a bug that wouldn't update the package's main metadata fields (including the Readme) properly. This has since been resolved in package-backend#126, but at the time you would've been affected by this bug.
Since at least for me personally, when publishing new package versions, the readme updates just like I'd expect

Yup, works fine now. I looked through the issues to see if this had been reported, but I didn't think to look through the PRs. Thanks!

Yeah no worries, glad this one was already fixed. But does remind me to try and resolve some of these retroactively lol


Reason for different json file output sizes and sample quality based on same model?

All notebooks working as specified on ubuntu 18.04 and gpu but I have a question concerning
the size of the my json output files compared to the provided repo examples.

'neuromancer_gpt2.json' is 410.4 kb and works with default gpt2 model (548 megs)

Size of 'Neuromancer.txt' is approximately 492.6 kb (depending on source)
The output is good for a small text and model.

Ran 'tuning_finetune.ipynb' on the above text using gpt-neo 2.7B (10.7 gigs)

Final 'neuromancer-cyclic-dropout-2-gpt-neo-2.7B-step-240.json' is only 314.8 kb (with 662.2 kb 'tokens.json' file)
The output via 'text_generation.ipynb' is ok but not as good.

I've tested current and recommended 'Adafactor hyperparameters' and the .json file sizes remain the same.

Attempted to recreate size and quality of the provided 'neuromancer_gpt2.json' (410.4 kb) with gpt2 small
but the final json size is only 95 kb (???)

The sampled text isn't as good as the original.
Am I missing a step here? The notebook should reproduce a similar json using the same model?
Would appreciate clarification.

The physical size of the resulting JSON is approximately equal to the product of the number of tokens in your initial prompt and the embedding dimension of your model (which can be found in your model's config.json as either n_embd or hidden_size, depending on the specific type of model). You need to choose a good initial prompt to get good quality.

Thanks for the quick reply.
Above is understood regarding prompt quality but it doesn't explain why the supplied ''neuromancer_gpt2.json'  based on gpt2 small is 410.4kb while my generated .json using the same text, model, and code is only 95kb or why using gpt-neo 2.7B only produces a 314.8kb json ?
BTW: Just generated another json @ 503.3 kb using gpt-j-6B. Not much bigger than the original generated with gpt2

Like I said, the size depends on the number of tokens in the initial prompt. I don't think the initial prompts used for the sample JSONs were given -- you probably didn't use the same ones.

Ahh, used a long single line 'Initial prompt length: 243 tokens'  and generated 498kb json using gpt2 small.
Longer initial prompt length = larger generated json using the same model.
That's the explanation I was looking for.
Thanks. Closing issue


build error on darwin stdenv-darwin-boot-3/setup ... syntax error near unexpected token `;'

What does this error mean? I'm getting it on some packages, and not on others.
/nix/store/hsyhlw6hqxiiwcppapwadqh9c7rdlkg0-stdenv-darwin-boot-3/setup: eval: line 859: syntax error near unexpected token `;'

what package?

Could we close this?  We can't troubleshoot beyond this without more information.

no problem.


Collapse the sidebar sooner

I noticed on the bevy docs that the sidebar collapses at a wider point than our site does. This is useful for having a side by side browser and tutorial. We should optimize this so that it just works fine around the same sort of size.

https://discord.com/channels/830184174198718474/1070481941863878697/1247645894174834718


Update ApplicationTest.kt

add application config, so the test does not fail.
Without it, for me test fails and throws errors, if creating a project from scratch following this tutorial
https://ktor.io/docs/creating-http-apis.html

@victororlyk did you changed the Configuration in option to HOCON file when creating a project as described here https://ktor.io/docs/creating-http-apis.html#create_ktor_project? In this case, testApplication should load modules specified in the application.conf file automatically (https://ktor.io/docs/testing.html#add-modules).

@victororlyk yep, the application { configureRouting() } code is added regardless of the selected configuration option but it's not required when HOCON is used because modules are added automatically. I'll add a corresponding note in the Automated testing chapter.

yeah, for me as a newbie in Kotlin, it was not clear that  is why wanted to help with  documentation.
When  I see what plugin generates against what is writen in learning notes ( the difference in that application... thing) it was making me think something is wrong.
And if not choosing hocon option it fails. So thought it will not harm to add that part)

@victororlyk ok, I agree that it's better to have application { ... } and show how to load modules explicitly to avoid such issues when going through a tutorial. I'll merge you PR but will remove the configureTemplating() module because it's missing in a tutorial. Thanks for your contribution!


Bump Batik dependency to 1.16

Rationale

Related Pull Requests

Changes

Closing in favor of https://github.com/LabKey/server/pull/339 against 22.11


add is-subnet and is-private-ip operators, test, docs. closes #14

This PR looks great to me.

@BrianJakovich Thanks for merging this. Somebody who is set up for development, and has write access to the repo still needs to run make bumpversion to release a new version with these changes

Actually, probably having git and make is  probably enough - clone the repo and run make bumpversion - That adds a new tag to the repo, and triggers a build on CircleCI, where the actual build and release work will be done.

Will do, Larry. And didn't realize you'd lost write permissions, added you back.

New release cut


Does materialize css integrate with this package?

Does materialize css integrate with this package?

Not easily :-(
The best, proper way would probably be to create your own custom templates for everything, and ignore the package templates, so that you could fully integrate materialize.css.
There might be a shortcut way where, using LESS, you re-use materialize.css styles on the package templates, but I'm not sure this is even easier.
I hope to completely rewrite the package templates to be more semantic and less opinionated as part of #82, which would make issue easier, but I have no timetable on it. Cheers.

OK Thank you


2 more exercises in README episode

Only the last commit adds content. The other commits are only formatting/cosmetics.

looks good to me, thanks :)


error: @intCast must have a known result type

branch: zip-0.11
$ zig version
0.11.0

zig build output:
Build Summary: 2/5 steps succeeded; 1 failed (disable with --summary none)

install transitive failure
└─ install zapexample transitive failure
   └─ zig build-exe zapexample Debug native 1 errors
/root/.cache/zig/p/1220104468d980763e5878db../src/proto/StartupMessage.zig:19:24: error: @intCast must have a known result type
 view.writeIntBig(u32, @intCast(payload_len));
                       ^~~~~~~~~~~~~~~~~~~~~
/root/.cache/zig/p/1220104468d980763e5878db.../src/proto/StartupMessage.zig:19:24: note: result type is unknown due to anytype parameter
/root/.cache/zig/p/1220104468d980763e5878db../src/proto/StartupMessage.zig:19:24: note: use @as to provide explicit result type
referenced by:
    auth: /root/.cache/zig/p/1220104468d980763e5878db../src/auth.zig:41:22
    auth: /root/.cache/zig/p/1220104468d980763e5878db../src/conn.zig:143:19
    newConnection: /root/.cache/zig/p/1220104468d980763e5878db../src/pool.zig:214:6
    init: /root/.cache/zig/p/1220104468d980763e5878db../src/pool.zig:55:19
    main: src/main.zig:5:27
    callMain: /root/.asdf/installs/zig/0.11.0/lib/std/start.zig:574:32
    initEventLoopAndCallMain: /root/.asdf/installs/zig/0.11.0/lib/std/start.zig:508:34
    callMainWithArgs: /root/.asdf/installs/zig/0.11.0/lib/std/start.zig:458:12
    posixCallMainAndExit: /root/.asdf/installs/zig/0.11.0/lib/std/start.zig:414:39
    _start: /root/.asdf/installs/zig/0.11.0/lib/std/start.zig:327:40

Hmm...the zig-0.11 branch works fine for me with zig 0.11.
The error reports:
StartupMessage.zig:19:24: error: @intCast must have a known result type
 view.writeIntBig(u32, @intCast(payload_len));

But in the zig-0.11 branch, that line of code is on line 20:
https://github.com/karlseguin/pg.zig/blob/zig-0.11/src/proto/StartupMessage.zig#L20
On the master branch, it's on line 19:
https://github.com/karlseguin/pg.zig/blob/master/src/proto/StartupMessage.zig#L19
Is it possible this was an issue with Zig's over-aggressive caching of dependencies?

issue with Zig's over-aggressive caching of dependencies

Exactly as you said, sorry, I didn't notice it.


The error of waymo dataset to semantic kitti/

Hi, thank you for sharing the great work!
I met the error below when I run the convert.py.
I found the error is in the 86th data.
[17] ----i ---- 85
[18] split:  training
[19] 85 :  segment-1773696223367475365_1060_000_1080_000_with_camera_labels.tfrecord
[20] ----i ---- 86
[21] split:  training
[22] 86 :  segment-16153607877566142572_2262_000_2282_000_with_camera_labels.tfrecord
[23] Traceback (most recent call last):
[24]   File "/SHFP12/xiaoquan.wang/01_bev/SphereFormer/data/waymo_to_semanticKITTI/convert_my.py", line 14, in <module>
[25]     coverter.convert_all_mp()
[26]   File "/defaultShare/SHFP12/xiaoquan.wang/01_bev/SphereFormer/data/waymo_to_semanticKITTI/lib/waymo2semantickitti.py", line 170, in convert_all_mp
[27]     self.process(i)
[28]   File "/defaultShare/SHFP12/xiaoquan.wang/01_bev/SphereFormer/data/waymo_to_semanticKITTI/lib/waymo2semantickitti.py", line 136, in process
[29]     for data in data_group:
[30]   File "/opt/conda/envs/sphereFormer/lib/python3.8/site-packages/tensorflow/python/data/ops/iterator_ops.py", line 787, in __next__
[31]     return self._next_internal()
[32]   File "/opt/conda/envs/sphereFormer/lib/python3.8/site-packages/tensorflow/python/data/ops/iterator_ops.py", line 770, in _next_internal
[33]     ret = gen_dataset_ops.iterator_get_next(
[34]   File "/opt/conda/envs/sphereFormer/lib/python3.8/site-packages/tensorflow/python/ops/gen_dataset_ops.py", line 3017, in iterator_get_next
[35]     _ops.raise_from_not_ok_status(e, name)
[36]   File "/opt/conda/envs/sphereFormer/lib/python3.8/site-packages/tensorflow/python/framework/ops.py", line 7215, in raise_from_not_ok_status
[37]     raise core._status_to_exception(e) from None  # pylint: disable=protected-access
[38] tensorflow.python.framework.errors_impl.DataLossError: {{function_node __wrapped__IteratorGetNext_output_types_1_device_/job:localhost/replica:0/task:0/device:CPU:0}} truncated record at 561276766' failed with Read less bytes than requested [Op:IteratorGetNext]

It works well in my side. Can you check whether the raw data is downloaded successfully?

Hi, thank you for help!
The below is my converted waymo dataset number.
Is it correct?


Numbered lists break codeblocks.

When a code-block is embedded in a numbered list

Thing

   $baz

Thing too

    foo
    $ bar

Renders as

Thing
$bax
Thing too
foo$bar

With a fresh installation of wok through pip.

This is an issue with Markdown, not wok. You'll notice GitHub does a similiar thing.
The correct way to do this would be

Foo
$foo

Bar
$bar

That is,
1. Foo

   ```
   $foo
   ```
2. Bar

   ```
   $bar
   ```


Fixed typo in ConsumerBuilder acknowledgmentGroupTime option

Motivation
Fixed typo in API method name before it gets released.

retest this please


Decouple Couchapp from the CouchDB spec

Impact of the new feature
Most of the WMCore services
Is your feature request related to a problem? Please describe.
As we migrate to python3, a hard coupling dependency was spotted in the couchdb15 spec file:
https://github.com/cms-sw/cmsdist/blob/comp_gcc630/couchdb15.spec#L39
This is a problem for the other services depending on the CouchDB spec, because it will bring in some of the python2 libraries  as well. So, it's not a problem if we are building a service on python2, but it will be if we build a service on python3, since there would be a mix of python2 and python3 libraries in the path (including the python binary itself).
Describe the solution you'd like
The final implementation is yet to be found, however, the required solution is to stop shipping python-related libraries with the CouchDB spec file, such that it does not cause any side effects on our WMCore services.
This would work fine for WMAgent, by adding the cmscouchapp dependency to the WMAgent spec file (since the agent and couchdb run on the same node). However, it would be a problem for central services, since those would no longer have the CMSCouchapp library in the same node, making it not possible to deploy central couchapps.
Describe alternatives you've considered
Alternative 1:

make sure that we migrate ALL the services depending on CouchDB to python3 "at the same time". Very hard to accomplish, but the cleanest!
Alternative 2:
create a new spec file for couchdb, which would bring in the python3 CMSCouchapp library. We might have to create new deployment scripts as well

Additional context
Some information in: https://github.com/dmwm/WMCore/issues/10303

Just found out why we are not able to push couchapps from the WMAgent python3 environment:
https://github.com/cms-sw/cmsdist/blob/comp_gcc630/spidermonkey.spec#L5
this dependency is bringing in python2 and setuptools, which mess up with the agent environment and fail to init the agent with:
cmst1@vocms0262:/data/srv/wmagent/current $ $manage init-agent
Initialising Agent...
/data/srv/wmagent/v1.4.9.pre1/sw.amaltaro/slc7_amd64_gcc630/external/python/2.7.13-comp2/bin/python
Traceback (most recent call last):
  File "/data/srv/wmagent/v1.4.9.pre1/sw.amaltaro/slc7_amd64_gcc630/cms/wmagentpy3/1.4.9.pre1/bin/wmagent-mod-config", line 14, in <module>
    standard_library.install_aliases()
  File "/data/srv/wmagent/v1.4.9.pre1/sw.amaltaro/slc7_amd64_gcc630/external/py3-future/0.18.2/lib/python3.8/site-packages/future/standard_library/__init__.py", line 453, in install_aliases
    __import__(newmodname)
ImportError: No module named reprlib
Traceback (most recent call last):
  File "/data/srv/wmagent/v1.4.9.pre1/sw.amaltaro/slc7_amd64_gcc630/cms/wmagentpy3/1.4.9.pre1/bin/wmcore-db-init", line 19, in <module>
    from WMCore.Configuration import loadConfigurationFile
ImportError: No module named WMCore.Configuration
Traceback (most recent call last):
  File "/data/srv/wmagent/v1.4.9.pre1/sw.amaltaro/slc7_amd64_gcc630/cms/wmagentpy3/1.4.9.pre1/bin/wmagent-couchapp-init", line 10, in <module>
    standard_library.install_aliases()
  File "/data/srv/wmagent/v1.4.9.pre1/sw.amaltaro/slc7_amd64_gcc630/external/py3-future/0.18.2/lib/python3.8/site-packages/future/standard_library/__init__.py", line 453, in install_aliases
    __import__(newmodname)
ImportError: No module named reprlib

And here is yet another spec bringing in python2 dependencies (python and setuptools):
https://github.com/cms-sw/cmsdist/blob/comp_gcc630/condor.spec#L10
I'm testing a few local changes for these two specs.

This issue has been resolved with: https://github.com/cms-sw/cmsdist/pull/6919
which provides a new spec file: couchdb16.spec, shipping the python3 version of CMSCouchapp (instead of python2). Closing.


Add user VSCode to save custom configurations

A very necessary function would be to be able to save my custom configurations and my extensions already installed, so when I migrate from one PC / laptop to another, I can not lose all my configurations. In web browsers have that functionality, just by logging into the software, those configurations and extensions are automatically imported. Then, it would be good to add users to Visual Studio Code, so that they can save their unique profile.

https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync


Error after using DTS file

I'm using SA6400 model 7.2.2
NVME creates a storage pool when DTS is not used.  The storage pool is normal.
However, if you create a storage pool after compiling DTS and then shut down and then restart the storage pool, an error will occur.
The following is some information about DTS
nvme_slot@1 {
pcie_root = "0000:00:01.0,00.0,03.0,00.0";
port_type = "ssdcache";
};
nvme_slot@2 {
pcie_root = "0000:00:01.0,00.0,07.0,00.0";
port_type = "ssdcache";
};

Run https://github.com/007revad/Synology_HDD_db

As long as you don't use DTS files
After powering off and on, the storage pool becomes normal.

But add DTS file
The storage pool is wrong when shutting down and then on again.

The only difference between the two situations is whether or not DTS files are used.

Please a little help, I thinking to add 2 m.2 unsupported to my ds1821+ to run my docker containers and my vm's
My question is when I reboot or update dsm all my data will be lost and I have to run the db script and add them from the beginning?
This is the only thing I didn't understand
Thanks in advance

@leotzian
You don't need syno_enable_m2 with a DS1821+ running DSM 7.2 or later. Instead just use Synology_HDD_db

After a reboot the volume on your 3rd party NVMe drives will be okay.
After a DSM update the volume on your 3rd party NVMe drives may not be mounted until after you run Synology_HDD_db again and reboot.


Thoughts on Replacing Default Ruby Formatter

I was wondering what your thoughts would be on replacing ruby-beautify with rubocop.
They both get the job done, but rubocop seems more active.

Vim-autoformat allows to have multiple formatter defaults per filetype. For instance, have a look in defauls.vim in de section where the C formatters are defined.
if !exists('g:formatters_c')
    let g:formatters_c = ['clangformat', 'astyle_c']
endif

So in a pull request you can just provide a default definition in g:formatdef_rubocop and a add it to the list of ruby formatters g:formatters_ruby


Updates to use composer

I have changed the code to use composer to install cs2pr
As this is written you could simply tag a v1 and call it a day - the v1 tag would then simply always pull the latest 1.* release of cs2pr
Releasing when you're ready to release this
On your action's repo's homepage you should get a banner like this:

That will bring you to the Release page but with several added options for Actions

This will also initiate listing it in the GitHub Actions Marketplace assuming that is something you wish.
The list of icons and colors are available here : https://haya14busa.github.io/github-action-brandings/

Let me know if you have any questions, I'm more than happy to answer!
Sorry this took so long to get up, I'm actually on paternity leave right now and times at a bit of a premium due to a new bundle of joy.

thank you very much for these high quality PRs.
I sent you an invitation to this repo, so you can do on your own what you think needs to be done.
if you are not sure, feel free to ping me for anything you might have questions about.
thanks again


Support federated credentials in on-behalf-of flow

1P documentation shows how to authenticate the service principal in the OBO flow with a federated credential instead of a secret or certificate. The request is essentially the same as for a certificate, however its assertion is the federated credential instead of a JWT signed by the app. Note that the 3P documentation doesn't mention federated credentials, so this may be a 1P-only feature.
First thoughts on implementation:

check whether and how MSAL supports this
OBO constructor could take a callback providing assertions instead of a cert. This would be a dual-use in that it enables the federated credential scenario and also cert scenarios in which the client app doesn't possess the private key e.g. because it's stored in Key Vault

/cc @scottaddie

Hi! Chiming in here to voice some 1P customer desire for this to be completed.
We run some nodejs tests in our Azure pipelines, and these tests make API calls to Azure. Right now these API calls are authenticated using service principal secrets.
As part of a compliance effrot, we need to move away from using service principal secrets, and what seems to be the way forward is federated credentials. We can connect service principals to our Azure pipelines using federated credential service connections, however, the @azure/identity package doesn't support federated credentials.

Hi! Chiming in here to voice some 1P customer desire for this to be completed.
We run nodejs tests in our Azure pipelines, and these tests make API calls to Azure. Right now these API calls are authenticated using service principal secrets.
As part of a compliance effrot, we need to move away from using service principal secrets, and what seems to be the best way forward is federated credentials. We can connect service principals to our Azure pipelines using federated credential service connections, however, the @azure/identity package doesn't support federated credentials.
To be totally clear, we're looking for something that can provide an implementation of this OAuth flow:
 Source: https://learn.microsoft.com/en-us/entra/workload-id/workload-identity-federation
I believe this is something @azure/identity would expose (though I assume quite a bit of the acutal implementation would be coming from MSAL).
Additional information on our speceific scenario:

Azure DevOps doc on setting up a service connection that uses federated credentials: https://learn.microsoft.com/en-us/azure/devops/pipelines/library/connect-to-azure?view=azure-devops#create-an-azure-resource-manager-service-connection-using-workload-identity-federation
The Azure DevOps API for getting an oidc token, I believe this is something that we would have to provide as part of making a "federated credential" object: https://learn.microsoft.com/en-us/rest/api/azure/devops/distributedtask/oidctoken/create?view=azure-devops-rest-7.1

I'm new to this space but aren't these different asks / scenarios? The first is support for federated credentials on-behalf-of a user, the second seems more related to https://github.com/Azure/azure-sdk-for-js/issues/27093 - just to make sure we have things tracked in the right place and partners can be informed of timelines

@maorleger I'm also new to the space of "federated credentials" so apologies if I stumbled upon the wrong issue. I agree that issue #27093 potentially sounds like more of the right thing.

@chlowell @KarishmaGhiya - FIC is supported by 3p.
There are 2 types of FIC:

with an external Identity Provider (e.g. GitHub). This allows a GitHub action to get access to KeyVault. See https://github.com/Azure/azure-workload-identity/tree/main/examples for examples for AKV, including with Azure SDK JS
with Managed Identity. You get an S2S token from MSI - leg1. And use this token as the client_assertion in the OBO flow (or any other confidential client flow) - leg2.

From MSAL perspective this is very simple - all MSALs allow for specifying a client assertion. Just note that most samples (including https://github.com/Azure/azure-workload-identity/tree/main/examples) are wrong, because you have to ensure the token from leg1 is valid when you pass it to leg2. So you need to cache tokens from leg1 and from leg2.
@robbie-microsoft will be looking into the sample https://github.com/Azure/azure-workload-identity/tree/main/examples to fix it.
Hope this helps.

Chatted with @bgavrilMS
Assuming we add support for client assertion in OBO, the user can probably do something like this -
managedIdentity = new ManagedIdentityCredential()

getAssertion()=>{
msiAccessToken = await managedIdentity.getToken(<scope>)
return msiAccessToken;
}

oboCredential = new OnBehalfOfCredential(<tenantId>,<clientId>,getAssertion,<userAssertionToken>)

await oboCredential.getToken(<scope>)

Related MSAL feature issue for requesting Client Assertion callback input instead of a string - https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/7013


Revisit hourly (annual) outputs

Philosophically - do the annual (as opposed to lifetime) outputs add anything? This is a placeholder for a discussion for converting all hourly outputs to lifetime variables to reduce redundancy and increase clarity. Earliest this would be acted on is the Fall 2022 release.

One nice thing about the annual outputs is that the index is a date and time. If we remove the annual outputs, I would encourage having an output with the clock time of each timestep so the same correlations could be performed.


How can you access $progress in composition API

How can you access $progress in the setup of the composition API?

duplicate, you can follow. https://github.com/aacassandra/vue3-progressbar/issues/1#issuecomment-773960631


Move environment hook to pkg pt2

This pull request includes:

[✔] adequate testing for the new functionality or fixed issue
[✔] adequate documentation informing people about the change such as

extended make help

functionally this PR does not change anything. It just

moves the environment_hook to pkg/splunk_logger so it can be used by image-builder too
unify behavior of github action and local test (by calling make from github action)
enables testing of pkg/splunk_logger (this was never tested I guess)
introduces make coverage-report as this is generated anyway and can be reviewed by humans like this

followup of #4301

just out of curiosity - is the coverage.txt (of the github actions) used somewhere?

just out of curiosity - is the coverage.txt (of the github actions) used somewhere?

We have a coverity action running on a schedule but I don't know if it uses that file or does it's own thing.

Thanks @croissanne for creating the newly split repo
I'll take care of
https://github.com/osbuild/splunk_logger/issues/1
which is a little more than just fixing a line :-/
can we merge this first (as this is waiting a while now)?
I'll immediately fix the new splunk_logger package afterwards (also here and in image-builder)

Thanks @croissanne for creating the newly split repo I'll take care of osbuild/splunk_logger#1 which is a little more than just fixing a line :-/
can we merge this first (as this is waiting a while now)? I'll immediately fix the new splunk_logger package afterwards (also here and in image-builder)

Fwiw, I'm fine with merging this first but also curious - what is the extra work (beyond fixing the go.mod)? The workflow or is there more to it?

Fwiw, I'm fine with merging this first but also curious - what is the extra work (beyond fixing the go.mod)? The workflow or is there more to it?

the things to be done are being collected in https://github.com/osbuild/splunk_logger/issues/1 right now

Obsolete due to #4316

Changes look fine to me. What's the end result WRT waiting for the external pkg to be used?

Not sure if I got your question right, but the splunk_logger is also used by image-builder or did you mean factoring out splunk_logger that's just more clean but can be done before or after this PR

I meant using the package from its own git repository and not from within this one.


lxd-p2c install problem

I've used lxd-p2c to migrate 100s of machines to LXD.
Never a problem building lxd-p2c, till today.
I've tried with go-1.11.1 + go-1.10.4 + looks like this has to do with some change to the lxd-p2c code which is now forcing a compiler flag setting which fails on gcc4.
If I build, then rebuild again, here's what appears to be the error message.
# go get -v -x github.com/lxc/lxd/lxd-p2c
WORK=/tmp/go-build212333649
github.com/lxc/lxd/shared
mkdir -p $WORK/b097/
cd /root/gowork/src/github.com/lxc/lxd/shared
CGO_LDFLAGS='"-g" "-O2" "-lutil" "-lpthread"' /usr/local/go/pkg/tool/linux_amd64/cgo -objdir $WORK/b097/ -importpath github.com/lxc/lxd/shared -- -I $WORK/b097/ -g -O2 -std=gnu11 -Wvla -std=gnu11 -Wvla ./network_linux.go ./util_linux_cgo.go
# github.com/lxc/lxd/shared
cc1: error: unrecognized command line option "-std=gnu11"
cc1: error: unrecognized command line option "-std=gnu11"

I've never coded any go, so unsure how to proceed.
If there's a work around, pass it along.
Thanks!

What OS are you building this on?
And yes, std=gnu11 has been added to all LXC & LXD codebases to harden our code.

# cat /etc/redhat-release
CentOS release 6.8 (Final)

# gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)

I could have sworn I'd build lxd-p2c on gcc4 machines before.
Maybe not.

The compiler hardening is somewhat new, it's been there for a week or so

Let me know if there's some simple way I can disable this, without editing many files + removing the flag.
Thanks.

I have a patchset which will fix static building of lxd-p2c, that should fix this issue too, or at least will let you build it on another system.

Great.
When you deploy your patchset, drop a note here about exactly how to install your code + I'll give it a try.
Thanks!

Should just be a matter of running make lxd-p2c, then a static binary should be built in ${GOPATH}/bin for you.

No, that should have worked, it could be that your tree is simply out of date, try running git pull.

Nope. Fails in various ways...
# cd /root/gowork/src/github.com/lxc/lxd

# ll
total 76K
drwxr-xr-x  2 root root 4.0K Oct  4 12:12 client/
drwxr-xr-x  2 root root 4.0K Oct  4 12:12 doc/
drwxr-xr-x  2 root root 4.0K Oct  4 12:12 fuidshift/
drwxr-xr-x  4 root root 4.0K Oct  4 12:12 lxc/
drwxr-xr-x  2 root root 4.0K Oct  4 12:12 lxc-to-lxd/
drwxr-xr-x 15 root root 4.0K Oct  4 12:37 lxd/
drwxr-xr-x  3 root root 4.0K Oct  4 12:12 lxd-benchmark/
drwxr-xr-x  2 root root 4.0K Oct  4 12:36 lxd-p2c/
drwxr-xr-x  2 root root 4.0K Oct  4 12:12 po/
drwxr-xr-x  3 root root 4.0K Oct  4 12:12 scripts/
drwxr-xr-x 17 root root 4.0K Oct  4 12:36 shared/
drwxr-xr-x  8 root root 4.0K Oct  4 12:12 test/
-rw-r--r--  1 root root  243 Oct  4 12:12 AUTHORS
lrwxrwxrwx  1 root root   19 Oct  4 12:12 contributing.md -> doc/contributing.md
-rw-r--r--  1 root root  12K Oct  4 12:12 COPYING
-rw-r--r--  1 root root 4.9K Oct  4 12:12 Makefile
-rw-r--r--  1 root root   63 Oct  4 12:12 mkdocs.yml
lrwxrwxrwx  1 root root   12 Oct  4 12:12 README.md -> doc/index.md

# git pull
remote: Enumerating objects: 79, done.
remote: Counting objects: 100% (79/79), done.
remote: Compressing objects: 100% (37/37), done.
remote: Total 79 (delta 55), reused 59 (delta 42), pack-reused 0
Unpacking objects: 100% (79/79), done.
From https://github.com/lxc/lxd
   83943a4..1374a14  master     -> origin/master
Updating 83943a4..1374a14
Fast-forward
 Makefile                    |    5 +
 client/util.go              |   49 ++++++++
 lxc/config/config.go        |    3 +
 lxc/config/remote.go        |   25 ++++
 lxc/main.go                 |    5 +
 lxd/daemon.go               |    8 ++
 lxd/devices.go              |   62 ++++++----
 lxd/main.go                 |    4 +
 lxd/main_checkfeature.go    |   43 ++++++--
 lxd/main_forkuevent.go      |  257 +++++++++++++++++++++++++++++++++++++++++++
 lxd/main_nsexec.go          |    3 +
 lxd/sys/os.go               |    1 +
 po/de.po                    |   89 ++++++++-------
 po/el.po                    |   89 ++++++++-------
 po/es.po                    |   89 ++++++++-------
 po/fa.po                    |   89 ++++++++-------
 po/fi.po                    |   89 ++++++++-------
 po/fr.po                    |   89 ++++++++-------
 po/hi.po                    |   89 ++++++++-------
 po/id.po                    |   89 ++++++++-------
 po/it.po                    |   89 ++++++++-------
 po/ja.po                    |   89 ++++++++-------
 po/ko.po                    |   89 ++++++++-------
 po/lxd.pot                  |   87 ++++++++-------
 po/nb_NO.po                 |   89 ++++++++-------
 po/nl.po                    |   89 ++++++++-------
 po/pa.po                    |   89 ++++++++-------
 po/pl.po                    |   89 ++++++++-------
 po/pt_BR.po                 |   89 ++++++++-------
 po/ru.po                    |   89 ++++++++-------
 po/sr.po                    |   89 ++++++++-------
 po/sv.po                    |   89 ++++++++-------
 po/tr.po                    |   89 ++++++++-------
 po/uk.po                    |   89 ++++++++-------
 po/zh.po                    |   89 ++++++++-------
 po/zh_Hans.po               |   89 ++++++++-------
 shared/i18n/i18n.go         |    2 +-
 shared/i18n/i18n_linux.go   |    1 +
 shared/network.go           |    5 +-
 shared/util_linux_notcgo.go |    5 +
 40 files changed, 1568 insertions(+), 1044 deletions(-)
 create mode 100644 lxd/main_forkuevent.go
 create mode 100644 shared/util_linux_notcgo.go
host.savingdinner.com # make
Missing custom libsqlite3, run "make deps" to setup.
exit 1
make: *** [default] Error 1

# make deps

# sqlite
Initialized empty Git repository in /root/gowork/deps/sqlite/.git/
remote: Counting objects: 9811, done.
remote: Compressing objects: 100% (5575/5575), done.
remote: Total 9811 (delta 7558), reused 5565 (delta 4125), pack-reused 0
Receiving objects: 100% (9811/9811), 18.00 MiB | 9.57 MiB/s, done.
Resolving deltas: 100% (7558/7558), done.
cd "/root/gowork/deps/sqlite" && \
		./configure --enable-replication --disable-amalgamation --disable-tcl && \
		git log -1 --format="format:%ci%n" | sed -e 's/ [-+].*$//;s/ /T/;s/^/D /' > manifest && \
		git log -1 --format="format:%H" > manifest.uuid && \
		make
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1966080
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for int8_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for intptr_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uintptr_t... yes
checking for sys/types.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for stdint.h... (cached) yes
checking for inttypes.h... (cached) yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for fdatasync... yes
checking for gmtime_r... yes
checking for isnan... yes
checking for localtime_r... yes
checking for localtime_s... no
checking for malloc_usable_size... yes
checking for strchrnul... yes
checking for usleep... yes
checking for utime... yes
checking for pread... yes
checking for pread64... yes
checking for pwrite... yes
checking for pwrite64... yes
checking for tclsh8.7... no
checking for tclsh8.6... no
checking for tclsh8.5... tclsh8.5
configure: Version set to 3.24
configure: Release set to 3.24.0
configure: Version number set to 3024000
checking whether to support threadsafe operation... yes
checking for library containing pthread_create... -lpthread
checking for library containing pthread_mutexattr_init... none required
checking whether to support shared library linked as release mode or not... no
checking whether to use an in-ram database for temporary tables... no
checking if executables have the .exe suffix... unknown
checking for library containing readline... no
checking for library containing tgetent... -lreadline
checking for readline in -lreadline... yes
checking readline.h usability... no
checking readline.h presence... no
checking for readline.h... no
checking for /usr/include/readline.h... no
checking for /usr/include/readline/readline.h... yes
checking for library containing fdatasync... none required
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for library containing deflate... -lz
checking for library containing dlopen... -ldl
checking whether to support MEMSYS5... no
checking whether to support MEMSYS3... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating sqlite3.pc
config.status: creating config.h
config.status: executing libtool commands
make[1]: Entering directory `/root/gowork/deps/sqlite'
gcc  -g -O2 -o mksourceid /root/gowork/deps/sqlite/tool/mksourceid.c
tclsh8.5 /root/gowork/deps/sqlite/tool/mksqlite3h.tcl /root/gowork/deps/sqlite >sqlite3.h
gcc  -g -O2 -o mkkeywordhash -DSQLITE_ENABLE_WAL_REPLICATION  /root/gowork/deps/sqlite/tool/mkkeywordhash.c
./mkkeywordhash >keywordhash.h
gcc  -g -O2 -o lemon /root/gowork/deps/sqlite/tool/lemon.c
cp /root/gowork/deps/sqlite/tool/lempar.c .
cp /root/gowork/deps/sqlite/src/parse.y .
rm -f parse.h
./lemon -DSQLITE_ENABLE_WAL_REPLICATION  parse.y
mv parse.h parse.h.temp
tclsh8.5 /root/gowork/deps/sqlite/tool/addopcodes.tcl parse.h.temp >parse.h
cat parse.h /root/gowork/deps/sqlite/src/vdbe.c | tclsh8.5 /root/gowork/deps/sqlite/tool/mkopcodeh.tcl >opcodes.h
./libtool --mode=compile --tag=CC gcc -g -O2 -DSQLITE_OS_UNIX=1 -I. -I/root/gowork/deps/sqlite/src -I/root/gowork/deps/sqlite/ext/rtree -I/root/gowork/deps/sqlite/ext/icu -I/root/gowork/deps/sqlite/ext/fts3 -I/root/gowork/deps/sqlite/ext/async -I/root/gowork/deps/sqlite/ext/session -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG  -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_WAL_REPLICATION  -DSQLITE_HAVE_ZLIB=1  -DSQLITE_TEMP_STORE=1 -c /root/gowork/deps/sqlite/src/alter.c
libtool: compile:  gcc -g -O2 -DSQLITE_OS_UNIX=1 -I. -I/root/gowork/deps/sqlite/src -I/root/gowork/deps/sqlite/ext/rtree -I/root/gowork/deps/sqlite/ext/icu -I/root/gowork/deps/sqlite/ext/fts3 -I/root/gowork/deps/sqlite/ext/async -I/root/gowork/deps/sqlite/ext/session -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_WAL_REPLICATION -DSQLITE_HAVE_ZLIB=1 -DSQLITE_TEMP_STORE=1 -c /root/gowork/deps/sqlite/src/alter.c  -fPIC -DPIC -o .libs/alter.o
In file included from /root/gowork/deps/sqlite/src/sqliteInt.h:167,
                 from /root/gowork/deps/sqlite/src/alter.c:15:
./sqlite3.h:9198: error: redefinition of typedef ‘sqlite3_wal_replication’
./sqlite3.h:9186: note: previous declaration of ‘sqlite3_wal_replication’ was here
make[1]: *** [alter.lo] Error 1
make[1]: Leaving directory `/root/gowork/deps/sqlite'
make: *** [deps] Error 2

Destroyed /root/gowork + rebuilt from scratch.
Same problem...
# github.com/lxc/lxd/shared
cc1: error: unrecognized command line option "-std=gnu11"
cc1: error: unrecognized command line option "-std=gnu11"

Worked fine here on CentOS6.
yum install wget tar git
wget https://dl.google.com/go/go1.11.1.linux-amd64.tar.gz
tar zxvf go1.11.1.linux-amd64.tar.gz
export GOROOT=/root/go/
export GOPATH=/root/gopath/
export PATH=/root/go/bin:/root/gopath/bin:${PATH}
go get -d github.com/lxc/lxd/lxd-p2c
cd /root/gopath/src/github.com/lxc/lxd
make lxd-p2c
lxd-p2c

The above created a working lxd-p2c executable.
Thanks.

Stephan, I have been trying to build this on ubuntu 18.04 and was getting Kernel Too Old when I moved the binary to centos 6. So I tried the steps you outlined above and I am getting closer:
[root@HOST lxd]# make lxd-p2c
CGO_ENABLED=0 go install -v -tags netgo ./lxd-p2c
github.com/lxc/lxd/lxc/utils
github.com/lxc/lxd/lxc/utils
lxc/utils/progress.go:28:19: undefined: termios.GetSize
lxc/utils/progress.go:108:7: undefined: termios.IsTerminal
make: *** [lxd-p2c] Error 2
[root@HOST lxd]#

You need to build the static version, there's a separate Makefile target for that.

Stephane, this fixed it:
https://github.com/lxc/lxd/pull/5330
Thank you!

def ‘sqlite3_wal_replication’
./sqlite3.h:9186: note: previous declaration of ‘sqlite3_wal_replication’ was here
make[1]: *** [alter.lo] Error 1
make[1]: Leaving directory `/root/gowork/deps/sqlite'
make: *** [dep

`
del this line:
typedef struct sqlite3_wal_replication sqlite3_wal_replication;
mod these lines:
typedef struct sqlite3_wal_replication {
......
struct sqlite3_wal_replication pNext; / Next registered WAL sync implementation */
.....
int (xBegin)(struct sqlite3_wal_replication, void *pArg);
int (xAbort)(struct sqlite3_wal_replication, void *pArg);
int (xFrames)(struct sqlite3_wal_replication, void *pArg, int szPage, int nFrame,
sqlite3_wal_replication_frame *aFrame, unsigned nTruncate, int isCommit);
......
int (xUndo)(struct sqlite3_wal_replication, void *pArg);
int (xEnd)(struct sqlite3_wal_replication, void *pArg);
`


Face feature identification

Is your feature request related to a problem? Please describe.
Recognizing face features like mouth, eyes, eyebrows, jaw and nose.
Describe the solution you'd like
Using OpenCV and a pre trained frontal face detector from dlib library and use it to obtain and highlight the features of the face.
Additional context
Opening this issue as GSSOC' 21 participant.
Please assign this to me if you approve @akshitagupta15june!

this already implemented

But ill be using dlib... the other one has been implemented with CNN

Add your implementation inside face detection folder

sure!


Submit additional Form Data

Hi
Since quite a long time i try to submit additional Form Data for each individual file upload. I just want 3 new form fields where i can put a date, a time and a name. Those three together should be the new file name.
It sounds easy and the wiki entry is very well written but it really won't work for me. I'm new to "ajax" and a noob in javascript.
So that is what i tried:
I put these things in the application.js:
 // Initialize the jQuery File Upload widget:

    $('#fileupload').fileupload({
    formData: {example: 'test'}
	});

    $('#fileupload').bind('fileuploadsubmit', function (e, data) {
    var inputs = data.context.find(':input');
    if (inputs.filter('[required][value=""]').first().focus().length) {
        return false;
    }
    data.formData = inputs.serializeArray();
});

And this is my index.html:


Program crashes on startup with duplicate Modbus address entries

Hi,
although not very grave in nature, I just wanted to give a heads up about the following crash on program startup:
Swift/NativeDictionary.swift:770: Fatal error: Duplicate values for key: '35121'
💣 Program crashed: Illegal instruction at 0x00007fa20fdcad12
Thread 1 crashed:
0 0x00007fa20fdcad12 assertionFailure(:_:file:line:flags:) + 354 in libswiftCore.so
1 specialized static ModbusDefinition.read(from:) + 1794 in modbus2mqtt at /swift/Sources/modbus2mqtt/ModbusDefinition.swift:121:27
2 startServing(modbusDevice:mqttServer:options:) + 147 in modbus2mqtt at /swift/Sources/modbus2mqtt/modbus2mqtt.swift:157:50
3 modbus2mqtt.run() in modbus2mqtt at /swift/Sources/modbus2mqtt/modbus2mqtt.swift:127
4 static AsyncParsableCommand.main() in modbus2mqtt at /swift/.build/checkouts/swift-argument-parser/Sources/ArgumentParser/Parsable Types/AsyncParsableCommand.swift:37
5 0x00007fa20fc450b0 completeTaskAndRelease(swift::AsyncContext*, swift::SwiftError*) in libswift_Concurrency.so
Backtrace took 2.41s
This happens if there are (at least) 2 entries with the same Modbus address in the JSON device spec file.

Thanx for the bug report. Have to make a test for that as it's a hinderance for novice users that want to add an entry.

I've added a test and an exact error about the duplicate entry on the development branch right now.


Shortcut mappings (composed annotations) not working or not supported

This annotation does not get picked up:
@PostMapping(value = "/transaction/receive", produces = MediaType.APPLICATION_JSON_VALUE)

This annotation does get picked up:
@RequestMapping(value = "/transaction/receive", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)

any luck?

I just stopped using the shortcut annotations :)


Upgrade to NAN v2.2.1 for Node.js v6.0.0-nightly compatability

node-serialport currently depends on NAN ~2.0.0 which is too old for Node.js v6.0.0-nightly20160307061ebb39c9. Installing node-serialport with Node.js v6.0.0-nightly20160307061ebb39c9 results in compile errors. Upgrading to NAN v2.2.1 solves the problem.
Note that this PR wasn't tested a lot.

Sorry, I appear to have messed that up. I need to learn how to use git. I'm going to close this PR as it now looks like junk.

reopened as #712


Order of commands

I just tried to create a diagram with "long equals signs" between nodes. To do this I used the double arrow and removed the head. However, the output code gives the \arrow options in the following order:
\arrow[dd, no head, Rightarrow]
The Right arrow overrides the no head. Changing the order to:
\arrow[dd, Rightarrow, no head]
solves the problem.

This is duplicate of #47 and should be fixed by #58 in the next release.


cleaning up old image

What type of PR is this?
Cleaning up old image - 6.7.5-main-09-12-2023-8fbde9ca

[ ] includes documentation
[ ] adds unit tests
[ ] tested upgrade from previous version

Special notes for your reviewer:
Release note:
none

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

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

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
2243

Relevant Lines:
2839

💛  - Coveralls


Fix failing documentation tests

I hope all the changes are right, still it's :green_apple: :)
Do I need to commit auto generated fastlane/README.md?

This is already fixed - sorry for not coming back earlier :+1:


The AGP_Pruner example provided can not run successfully, An error occurred: TypeError: unsupported operand type (s) for *: 'Tensor' and 'dict'

The error is:

The first epoch can run, but the second epoch reports an error.
The code is from  the sample main_torch_pruner.py（https://github.com/microsoft/nni/blob/master/examples/model_compress/main_torch_pruner.py）
code：
from nni.compression.torch import AGP_Pruner
import torch
import torch.nn.functional as F
from torchvision import datasets, transforms
class Mnist(torch.nn.Module):
def init(self):
super().init()
self.conv1 = torch.nn.Conv2d(1, 20, 5, 1)
self.conv2 = torch.nn.Conv2d(20, 50, 5, 1)
self.fc1 = torch.nn.Linear(4 * 4 * 50, 500)
self.fc2 = torch.nn.Linear(500, 10)
def forward(self, x):
    x = F.relu(self.conv1(x))
    x = F.max_pool2d(x, 2, 2)
    x = F.relu(self.conv2(x))
    x = F.max_pool2d(x, 2, 2)
    x = x.view(-1, 4 * 4 * 50)
    x = F.relu(self.fc1(x))
    x = self.fc2(x)
    return F.log_softmax(x, dim=1)

def train(model, device, train_loader, optimizer):
model.train()
for batch_idx, (data, target) in enumerate(train_loader):
data, target = data.to(device), target.to(device)
optimizer.zero_grad()
output = model(data)
loss = F.nll_loss(output, target)
loss.backward()
optimizer.step()
if batch_idx % 100 == 0:
print('{:2.0f}%  Loss {}'.format(100 * batch_idx / len(train_loader), loss.item()))
def test(model, device, test_loader):
model.eval()
test_loss = 0
correct = 0
with torch.no_grad():
for data, target in test_loader:
data, target = data.to(device), target.to(device)
output = model(data)
test_loss += F.nll_loss(output, target, reduction='sum').item()
pred = output.argmax(dim=1, keepdim=True)
correct += pred.eq(target.view_as(pred)).sum().item()
test_loss /= len(test_loader.dataset)
print('Loss: {}  Accuracy: {}%)\n'.format(
    test_loss, 100 * correct / len(test_loader.dataset)))

def main():
torch.manual_seed(0)
device = torch.device('cpu')
trans = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.1307,), (0.3081,))])
train_loader = torch.utils.data.DataLoader(
    datasets.MNIST('data', train=True, download=True, transform=trans),
    batch_size=64, shuffle=True)
test_loader = torch.utils.data.DataLoader(
    datasets.MNIST('data', train=False, transform=trans),
    batch_size=1000, shuffle=True)

model = Mnist()
model.to(device)

'''you can change this to LevelPruner to implement it
pruner = LevelPruner(configure_list)
'''
configure_list = [{
    'initial_sparsity': 0,
    'final_sparsity': 0.8,
    'start_epoch': 0,
    'end_epoch': 10,
    'frequency': 1,
    'op_types': ['default']
}]

pruner = AGP_Pruner(model, configure_list)
model = pruner.compress()

optimizer = torch.optim.SGD(model.parameters(), lr=0.01, momentum=0.5)
for epoch in range(10):
    pruner.update_epoch(epoch)
    print('# Epoch {} #'.format(epoch))
    train(model, device, train_loader, optimizer)
    test(model, device, test_loader)
pruner.export_model('model.pth', 'mask.pth', 'model.onnx', [1, 1, 28, 28])

if name == 'main':
main()
Thanks！

Hi @yeliang2258 , thanks for bringing up this issue！Could you try using nni v1.4? This is fixed in latest version.

Hi @yeliang2258 , thanks for bringing up this issue！Could you try using nni v1.4? This is fixed in latest version.

Hello, using cpu, AGP can work normally, but using cuda will report an error, the error message is as follows.Thanks！

Hi, @yeliang2258 , could you try add model = model.to(device) after line model = pruner.compress() and see if it works? It seems some buffers registered by pruner are not transfered into cuda, which caused the error. Thanks!

Hi, @yeliang2258 , could you try add model = model.to(device) after line model = pruner.compress() and see if it works? It seems some buffers registered by pruner are not transfered into cuda, which caused the error. Thanks!

Still not working, the error message is as follows：

Hi @yeliang2258, could you change pruner.export_model('model.pth', 'mask.pth', 'model.onnx', [1, 1, 28, 28]) into pruner.export_model('model.pth', 'mask.pth', 'model.onnx', [1, 1, 28, 28], device)?
default device for export_model is cpu, which cause the error.
If it works, you are welcome to submit a PR for this  outdated example. Thanks!

Hi @yeliang2258, could you change pruner.export_model('model.pth', 'mask.pth', 'model.onnx', [1, 1, 28, 28]) into pruner.export_model('model.pth', 'mask.pth', 'model.onnx', [1, 1, 28, 28], device)?
default device for export_model is cpu, which cause the error.
If it works, you are welcome to submit a PR for this outdated example. Thanks!

I modified it and found two problems. First, the pruner.export_model () function did not generate the corresponding file. Second, cuda still couldn't be used, and the same error was reported.

Hi @yeliang2258, after some debugging, it turns out there is a bug in code for transfering buffers between device. Since most examples set origin  buffers on cuda, the bug is not spotted. Anyway, I will fix this issue later and inform you after this issue is fixed and tested.

Hi @yeliang2258, after some debugging, it turns out there is a bug in code for transfering buffers between device. Since most examples set origin buffers on cuda, the bug is not spotted. Anyway, I will fix this issue later and inform you after this issue is fixed and tested.

Ok! thank you very much! Also, the pruner.export_model () function in AGP does not seem to work, it does not generate the corresponding file.

Hi, @yeliang2258 , the file is generated in the same directory as the directory you run the python command. example: python a/b/example.py then file is in directory a. Files are generated as expected in my machine. could you check if files are in other directory? Thanks!

Closing as the original problem is fixed. thanks @yeliang2258 and @Cjkkkk


Feature: has been added possibility changes baseURL from level twitte…

has been added possibility changes baseURL from level twitter4j using method like setRestBaseURL

Tell me why you need this feature now ?
For example, the labs endpoints will be shut down near future.

I need it to mock Twitter behavior, because i cant always sent tweet and fetch it and next valid that is same message. My application is working also on offline mode so...  :D

Could you approve this?


need terms for cell loss (sloughing, hair loss, etc.)

In order to describe iron homeostasis I would need terms to describe:
1- hair cell loss
2- epithelial cell sloughing
3- duodenal cell sloughing
This is not technically cell death (though it may lead to that), it is simply separation of cells from main organism by a variety of forces (mechanical, etc).
This is the main form of iron loss from the body of mammals and thus it is an important process that (indirectly) affects expression of several genes (eg HAMP)

Hi Pedro,
Sorry for taking so long to get to this one.  I'll get the terms added ASAP.  Can you provide some references?
Many thanks,
David

Presumably 'hair cell loss' = loss of hair follicle cells rather than loss of auditory hair cells ?
How's this for a general class:
'cell loss from epithelium': The process by which epithelial cells become separated from an epithelium and as a result are lost into the external environment.  Examples includes sloughing of cells from the epidermis and the epithelial linings of the gut and bladder.
cell loss from epithelium
.   hair follicle cell loss
.   epidermal cell sloughing
.   intestinal epithelial cell sloughing
.   .    duodenal epithelial cell sloughing

Yes, the hair cell loss that I mentioned is loss of hair follicle cells
(which cover the body), not the auditory hair cells. I require these terms
to annotate a model of iron homeostasis. The only loss of iron from mouse
(or humans for that matter) is either through bleeding or through the
natural process of epithelial cell sloughing and hair cell loss. These are
natural processes as both skin and hair are renovated continuously.
I think your class hierarchy looks fine (and would be enough for my
purposes)
I can try to find references for you but these will be from the iron
literature..
thanks
Pedro
On Thu, Jul 21, 2016 at 8:54 AM, David Osumi-Sutherland <
<EMAIL_ADDRESS>wrote:

Presumably 'hair cell loss' = loss of hair follicle cells rather than loss
of auditory hair cells https://en.wikipedia.org/wiki/Hair_cell ?
How's this for a general class:
'cell loss from epithelium': The process by which epithelial cells become
separated from an epithelium and as a result are lost into the external
environment. Examples includes sloughing of cells from the epidermis and
the epithelial linings of the gut and bladder.
cell loss from epithelium
. hair follicle cell loss
. epidermal cell sloughing
. intestinal epithelial cell sloughing
. . duodenal epithelial cell sloughing
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/geneontology/go-ontology/issues/12433#issuecomment-234244441,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACDyGmgH5O7eH9zk1DCCV7MfwwLp7_dyks5qX2wGgaJpZM4IS53f
.

--
COPASI modelling and simulation software for systems biology
http://www.copasi.org

Dear @pmendes
We need references and definitions to add the terms.
Thanks, Pascale

These terms seem out of scope as we could not annotate gene products to them (i.e. sloughing of skin by mechanical forces)

Right - it seems the hair loss is a phenotype of low iron.
I'll close this for now.


Bulk adding and removing Markers

I would like to use addLayers and removeLayers from Leaflet.markercluster.
I can see that if on the ctor I pass markers array it uses them, but how can I use these methods afterwards?
Something like:
mySubGroup .addLayers(markerList)
instead of:
for (let marker of marker_list) {
    marker.addTo(mySubGroup );
}

Hi again,
Hmm good point.
Internally, the subgroup will use MCG's addLayers when it is added to the map.
So if you add your markers one by one while the subgroup is off map, you would have no performance penalty.
Now if you really want to avoid the for loop, you could pass a Layer Group rather an array of markers. It will be added to MCG which now supports groups as if they were arrays. It should work, even though I have not tested it.
Using a Layer Group rather than an array should also cover the case where you are adding markers while the subgroup is already on map.
Hopefully you can switch to a Layer Group. If not, it could be interesting for this plugin to support arrays as well, since one of its main usage is with MCG.
Please feel free to submit a PR! :-)
Hope this helps.

On my case subgroups are already on the map.
I'm getting markers in chunks and I'm adding them to a previously added subgroup.
I didn't understand how to figure out what you have suggested with Layer Group.
I thought on just adding a method like _addLayers which will call the MCG addLayers method or do the foreach itself when !parentGroup instanceof LG.
Is this possible?

Hi,
I meant mySubGroup .addLayer(layerGroup), I think it should work (it should add layerGroup to the parent group, i.e. MCG, which will get the individual markers and internally use addLayers).
I agree this is not really optimal…
Did you solve your issue, since you closed the topic?

Work like a charm.
let layer_group = L.layerGroup(marker_list);
layer_group.addTo(mySubGroup);

Thank you for your feedback!
Sorry I realize I skipped a few steps in my explanation…


Expose more Kafka options for reliable message transmission

I don't have a strong opinion about that; it would be simpler not to thread things through an extra layer, but we would have to add more code to hop if we wanted it to take over interfacing with confluent-kafka. Maybe @mjuric and @adambrazier have opinions?


feat: add cadence

@williamboman
had to remove the bin part as it uses the flow-cli package as a dependency which can't be installed through npm.

@williamboman
When you have installed the flow-cli and then the cadence lsp you can use the cadence lsp via flow cadence language-server.

When you have installed the flow-cli and then the cadence lsp you can use the cadence lsp via flow cadence language-server.

I don't believe this package is meant to be installed directly by users? It seems like the Cadence language server is bundled with the flow cli itself? I am able to start it successfully via flow cadence language-server.

Yeah, it is a bit odd how they do it. Seems to be bundled into the flow cli itself

Closing this as it seems to be incorrect installation/usage of the package, thanks for the PR anyways!


[CMake] Remove invalid python modules

Split from #15368
@mrry Friendly ping.

Can one of the admins verify this patch?

@drpngx Friendly ping.

Jenkins, test this please.

The last CI build failed due to newly included tensorflow/contrib/lite/python importing tensorflow/contrib/lite/toco/python. @drpngx Please re-run the tests.

Jenkins, test this please.

How is this import supposed to be resolved?
ImportError: No module named 'tensorflow.contrib.lite.toco.python.tensorflow_wrap_toco'

You need a dependency to //tensorflow/contrib/lite/toco/python:tensorflow_wrap_toco. I suggest not adding them just yet, and adding them in a separate PR.

(The _wrap library, as its name implies, is a SWIG wrapped library. It links against protobuf, which gets statically linked, so adding it is probably unsafe to add it.)

Aren't these two lines supposed to include python:tensorflow_wrap_toco?
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/BUILD#L60
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/lite/python/BUILD#L18

Yes, but loading that library runtime is inherently unsafe, particularly on MacOS. I'd do that in another PR.

Do you want to merge these two lines now or in another PR?
tensorflow/contrib/lite/python
tensorflow/contrib/lite/toco/python

Okay, I have commented them out and left a TODO.

Jenkins, test this please.
Thanks!

The dreaded ERROR: Error fetching remote repo 'origin' again.
Jenkins, test this please.


[WIP] Debugging freetext intermittent

Hopefully this will shed some light on the final most prominent intermittent failure we seem to have left...

/botio integrationtest

Hm, interesting...
/botio-windows integrationtest

/botio-windows integrationtest

/botio-windows integrationtest

It never fails when you want it to...
/botio-windows integrationtest

/botio-windows integrationtest

/botio-windows integrationtest

/botio-windows integrationtest

/botio-windows integrationtest

/botio-windows integrationtest


Bug: BaseBatchProcessingError.child_exceptions doesn't handle None case

Expected Behaviour
This is a bit of a nitpick but something I noticed on my travels...
https://github.com/awslabs/aws-lambda-powertools-python/blob/1ca74d36af7165f41dc2d6b39a8f36caacd69677/aws_lambda_powertools/utilities/batch/exceptions.py#L11-L24
child_exceptions parameter is typed Optional[List[ExceptionInfo]] but the None case isn't handled anywhere before iteration over the attribute occurs in format_exceptions() method.
Current Behaviour
Instantiating the exception and calling format_exceptions() without providing a list for the child_exceptions param will raise an exception.
Code snippet
from aws_lambda_powertools.utilities.batch.exceptions import BaseBatchProcessingError

err = BaseBatchProcessingError(msg="something")  # types ok
err.format_exceptions("parent exception string")

Possible Solution
Most likely just make sure attrib is always a list without having to change the signature of the class.
class BaseBatchProcessingError(Exception):
    def __init__(self, msg="", child_exceptions: Optional[List[ExceptionInfo]] = None):
        ...
        self.child_exceptions = child_exceptions or []

Steps to Reproduce
See code snippet above.
AWS Lambda Powertools for Python version
latest
AWS Lambda function runtime
3.9
Packaging format used
PyPi
Debugging logs
No response

More likely to fail before this, so maybe child_exceptions should not be optional.
            raise SQSBatchProcessingError(
                msg=f"Not all records processed successfully. {len(self.exceptions)} individual errors logged "
                f"separately below.",
                child_exceptions=self.exceptions,
            )

@peterschutt if this is accepted as an 'issue', i made a PR (https://github.com/awslabs/aws-lambda-powertools-python/pull/1205) based on your fix.

I fully understand the risk of putting my unpaid time into this.
In this case, this is a bug and not a feature, so out of respect for my fellow Powertools users i submitted a fix PR for the one offending line
Feel free to drop these PRs or ignore until August 2022

hey @peterschutt thank you for flagging another piece we can improve :pray:. We'll look into it after some major changes in exposing the roadmap, list of maintainers, and our new end-to-end testing framework (internal, but we might explore ways to expose to customers).
If you however ran into an issue with Batch without explicitly calling format_exceptions, please do let us know and either of the maintainers[1] can prioritize it ASAP.
From memory, the Optional was a leftover type hint after several refactoring attempts (legacy SQS -> new SQS), and while we're passing an actual exception as part of our failure_handler mechanics.... we can surely do better - besides this, I just spotted a few other areas for internal improvements so we can handle them altogether.
[1] Currrent maintainers: @am29d @mploski @sthulb @heitorlessa.
Thank you!

At Fiserv, our developers run into this kind of misleading typing and error handling within the library all of the time. Hopefully some stability comes through.

A typing based via would actually have to be a breaking change:
As msg becomes a required parameter to allow for child_exceptions to be an none-optional list
patch below:
diff --git a/aws_lambda_powertools/utilities/batch/exceptions.py b/aws_lambda_powertools/utilities/batch/exceptions.py
index d90c25f1..f33f6aef 100644
--- a/aws_lambda_powertools/utilities/batch/exceptions.py
+++ b/aws_lambda_powertools/utilities/batch/exceptions.py
@@ -9,7 +9,7 @@ ExceptionInfo = Tuple[Optional[Type[BaseException]], Optional[BaseException], Op

 class BaseBatchProcessingError(Exception):
-    def __init__(self, msg="", child_exceptions: Optional[List[ExceptionInfo]] = None):
+    def __init__(self, msg: str, child_exceptions: List[ExceptionInfo]):
         super().__init__(msg)
         self.msg = msg
         self.child_exceptions = child_exceptions
@@ -27,7 +27,7 @@ class BaseBatchProcessingError(Exception):
 class SQSBatchProcessingError(BaseBatchProcessingError):
     """When at least one message within a batch could not be processed"""

-    def __init__(self, msg="", child_exceptions: Optional[List[ExceptionInfo]] = None):
+    def __init__(self, msg: str, child_exceptions: List[ExceptionInfo]):
         super().__init__(msg, child_exceptions)

     # Overriding this method so we can output all child exception tracebacks when we raise this exception to prevent
@@ -40,7 +40,7 @@ class SQSBatchProcessingError(BaseBatchProcessingError):
 class BatchProcessingError(BaseBatchProcessingError):
     """When all batch records failed to be processed"""

-    def __init__(self, msg="", child_exceptions: Optional[List[ExceptionInfo]] = None):
+    def __init__(self, msg: str, child_exceptions: List[ExceptionInfo]):
         super().__init__(msg, child_exceptions)

     def __str__(self):
diff --git a/tests/functional/test_utilities_batch.py b/tests/functional/test_utilities_batch.py
index a5e1e706..3db2ec20 100644
--- a/tests/functional/test_utilities_batch.py
+++ b/tests/functional/test_utilities_batch.py
@@ -908,3 +908,7 @@ def test_batch_processor_error_when_entire_batch_fails(sqs_event_factory, record

     # THEN raise BatchProcessingError
     assert "All records failed processing. " in str(e.value)
+
+
+def test_child_exceptions_is_required():
+    assert SQSBatchProcessingError(msg="required", child_exceptions=[]).format_exceptions("example") == "example\n"

A typing based change would actually have to be a breaking change:

Quite possible that somewhere downstream people are relying on self.child_exceptions being None if not passed in. If you accept that, then my original suggestion of child_exceptions or [] in __init__() isn't really a safe change either.
The safest change would be to address it right at the point of iteration in format_exceptions(), e.g., :
     def format_exceptions(self, parent_exception_str):
         ...
         for exception in self.child_exceptions or []:
         ...

... then could use warnings and deprecate the behavior of not passing in the child_exceptions param when instantiating the error with the aim to eventually have it all nice and tidy.
Another point, the exception class doesn't really care that the exceptions are a list or not, just that they can be iterated over in format_exceptions(), so probably the constructor could be typed a little more liberally as well, Iterable or Collection.

If you rely on "self.child_exceptions" being None, then you are likely running into the same bug and have a runtime error. Either runtime fix makes sense. My PR is for the simplest one.

If you rely on self.child_exceptions being None, then you are likely running into the same bug and have a runtime error.

... if the way you use the exception results in it getting serialized via __str__(), sure.

My PR is for your one.

If I was lodging the same bug again I'd definitely make the change in format_exceptions() and not in the constructor. It maintains the existing interface, ensures the class at least honors the existing interface, and eliminates any issues arising from the surface area of the change.
In any case, the impression that I get from @sthulb and @heitorlessa is that there are some higher level things worthy of more attention at the moment. I only lodged the report because it didn't look right, not because I was directly affected by the issue in any meaningful way.
@michaelbrewer Thanks for doing the PR though, and if @sthulb or @heitorlessa want to merge it, I'll be happy to make any changes at that point.

That’s correct Peter, we’d want to change format_exceptions instead— we’d
be more than happy to take your PR as a fix instead.
Thanks a lot!
On Wed, 18 May 2022 at 04:38, Peter Schutt @.***> wrote:

If you rely on self.child_exceptions being None, then you are likely
running into the same bug and have a runtime error.
... if the way you use the exception results in it getting serialized via
str(), sure.
My PR is for your one.
If I was lodging the same bug again I'd definitely make the change in
format_exceptions() and not in the constructor. It maintains the existing
interface, ensures the class at least honors the existing interface, and
eliminates any issues arising from the surface area of the change.
In any case, the impression that I get from @sthulb
https://github.com/sthulb and @heitorlessa
https://github.com/heitorlessa is that there are some higher level
things worthy of more attention at the moment. I only lodged the report
because it didn't look right, not because I was directly affected by the
issue in any meaningful way.
@michaelbrewer https://github.com/michaelbrewer Thanks for doing the PR
though, and if @sthulb https://github.com/sthulb or @heitorlessa
https://github.com/heitorlessa want to merge it, I'll be happy to make
any changes at that point.
—
Reply to this email directly, view it on GitHub
https://github.com/awslabs/aws-lambda-powertools-python/issues/1203#issuecomment-1129506767,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAZPQBAZZVFVICYYRII5OD3VKRJ2FANCNFSM5V5EHROQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

PR is already up

@peterschutt sure, i update the PR to match all of the feedback. As we use powertools in production at Fiserv, this will likely help us there too.

@heitorlessa I was curious why this wasn't already picked up by mypy - as you prob. know it is because that method itself is untyped so mypy is ignoring. Is more complete typing the sort of thing that you are working on?
I've been developing in python for quite a number of years now, we static check everything strict here and I'm using lambda and this library significantly for the first time. If I can help in any way, let me know how best to find something useful to do and I'll look to allocate a bit of time. This is a nice library, cheers!

@heitorlessa I was curious why this wasn't already picked up by mypy - as you prob. know it is because that method itself is untyped so mypy is ignoring. Is more complete typing the sort of thing that you are working on?
I've been developing in python for quite a number of years now, we static check everything strict here and I'm using lambda and this library significantly for the first time. If I can help in any way, let me know how best to find something useful to do and I'll look to allocate a bit of time. This is a nice library, cheers!

Exactly my thought too - it'd be great to hear from you on strategies to do that (strict mode) without increasing the bar to contribution too high for those inexperienced.
Mind shooting us an email and we can arrange a call?
<EMAIL_ADDRESS>Strict typing is new to us, we experimented with Cython, Mypyc, and MyPy in strict mode but far from experts. We introduced mypy last year and addresses roughly ~614 issues.
We tried mypy --strict earlier this year but had a number of false positives, areas we couldn't see solutions for, or changes that would affect performance negatively -- help here will be amazing.

Sure, I'm in UTC + 10, so I'll email when I'm in the office tomorrow.
It would be good to hear more about what you were trying to optimize with cython/mypyc. I've got a cython module in prod that I built well before typing was popular and have an upcoming opportunity to refactor it. I'm looking forward to experiment with those tools again and see how they look now.
Hopefully I can make some meaningful contribution.

@peterschutt @heitorlessa Pylance picks this up fine. However we can't add it as part of the project as the library still supports Python 3.6. Also MyPy has not been upgraded for a while.

With the fix applied

I did some work after adding the initial MyPy updates (#357 , #365 , #508 etc..), i started looking at the fixes recommended by Pylance and found that some of our code is just to make work around for MyPy
And example being this code in aws_lambda_powertools/utilities/parameters/appconfig.py

client: Any = None is a hack to make MyPy happy as the assignment would fail.

Hey @michaelbrewer. I haven't spent any time looking deeper at the typing yet, but appreciate the extra context. As per @heitorlessa's earlier message I've emailed to arrange a chat, just waiting on that as I don't really want to put the time into it until I understand what the objectives/constraints are and how the work would fit into their roadmap.

However we can't add it as part of the project as the library still supports Python 3.6.

I assume this library just has to track the lambda runtime environment support, which is August 17 per this (8 months after the true EOL of 3.6). Assuming that 3.7 is supported for as long after actual EOL, then we've probably got until early 2024 to support 3.7. Supporting 3.7+ with this work means we could use typing-extensions which has already dropped 3.6.

client: Any = None is a hack to make MyPy happy as the assignment would fail.

Mypy should just assume the type based on the self assignment in __init__() (ref). If I comment out the client: Any = None class variable assignment, mypy doesn't raise any issue for me (using project's mypy config). However, that is on line 63 in the develop branch, and on line 68 in your image above and the self.client assignment is different in the develop version to your image above, so maybe not comparing apples with apples.
I'll talk about typing all day @michaelbrewer but we seem to have jumped away from the original issue here and prob. just making unnecessary noise for the maintainers. Feel free to email me.


Windows installation doesn't work with Python 3.5

This is the same issue as #10 and I agree it isn't an issue with Fabric, but I wanted to call it out again as its still a problem. Specifically, this was fixed in the PyCrypto GitHub repo over 3 years ago:
https://github.com/dlitz/pycrypto/commit/10abfc8633bac653eda4d346fc051b2f07554dcd
And there hasn't been a PyPi update since then. It'd be nice if there was some workaround so people wouldn't have to know to specify a dependency on a package like:
<EMAIL_ADDRESS>I don't know what the best solution would be, but I wanted you to know about this.

It looks like PyCrypto is no longer being maintained. The last update to the git repo was on June 20, 2014.
Perhaps it would be prudent to port to a different crytpo library. My suggestion is Cryptography, but I haven't done the legwork to see if it has all the things that Fabric needs.
In fact, I went ahead and submitted issue fabric/fabric#1540 which suggests this very thing.

Whoops, looks like they already support Cryptography.
@kbarnes3 Have you tried updating paramiko? Doing that worked for me.
python -m pip install --upgrade paramiko

The latest versions of paramiko install Cryptography for me (and a brief test showed it worked fine). However, the Fabric3 setup file currently has this:
install_requires=['paramiko>=1.17.2,<2.0']

And paramiko version 1.17.2 uses PyCrypto.

This is in line with what upstream Fabric did in 1.12. I port the changes from 1.13 ASAP, which will solve those issues.

Porting 1.13 sounds like the best way to fix this, thanks. In the meantime, if anyone else hits this issue, I got a working combination by adding these lines to my requirements:
<EMAIL_ADDRESS>Fabric3==1.12.post1

Fabric3 1.13.1.post1 was release yesterday. I hope this solves the issue for you, if not, please file a new ticket (since it's most likely a new problem).

I blew away my venv and freshly installed Fabric3 1.13.1.post1. I was able to run my fabfile without any problems and without explicitly installing any dependencies. Thanks @mathiasertl!


[bug]: iOS Error initializing WalletConnect SDK shows on first install

Description
During first install of iOS, user have to allow internet connection in order to have the app to call any API.
But in modal component -> useConfigure -> initProvider https://github.com/WalletConnect/modal-react-native/blob/435c95700f65f5588fb52ba0443aa606167094d3/src/hooks/useConfigure.ts#L87-L117
The initial call of createUniversalProvider would lead to an error since there are internet calls inside of it, which will leads to the alert of Error initializing WalletConnect SDK.
Also a side problem is that I happen to notice that initProvider would be called several times during the app start up.
WalletConnect Modal SDK version
1.0.0-rc.2
Output of npx react-native info
System:
    OS: macOS 13.2.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 127.77 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v16.17.0/bin/yarn
    npm: 9.7.1 - ~/.nvm/versions/node/v16.17.0/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.3 AI-213.7172.25.2113.9123335
    Xcode: 14.3/14E222b - /usr/bin/xcodebuild
  Languages:
    Java: 17.0.5 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0
    react-native: 0.71.7 => 0.71.7
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Expo Version (if applies)
No response
Steps to reproduce
fresh iOS install launch
Snack, code example, screenshot, or link to a repository
No capable

For the side question Also a side problem is that I happen to notice that initProvider would be called several times during the app start up. I just found out why.
When rendering WalletConnectModal, I wrote inline object porp for providerMetadata, which will finally leads to Initialize provider Effect got called not once.

hey @m1heng 👋 is there a way you can render the modal after the permission is granted?
something like
`hasInternet && <WalletConnectModal ... />

We have a fork version of this, and we end up adding check in the useEffect
import { useNetInfo } from '@react-native-community/netinfo';
.
.
.
        if (!ClientCtrl.provider() && projectId && providerMetadata && netInfo.isConnected) {
            initProvider();
        }
    }, [projectId, providerMetadata, relayUrl, onDisplayUri, onSessionDelete, netInfo.isConnected]);

TBH, since this should be a globally used component, I think maybe it is better for component it self to well handle netinfo

https://github.com/WalletConnect/modal-react-native/issues/15

Hello.
Thus it works.
import { useNetInfo } from '@react-native-community/netinfo';

const netInfo = useNetInfo();

{netInfo.isConnected ? (
  <WalletConnectModal
    projectId={walletConnect.PROJECT_ID}
    providerMetadata={walletConnect.PROVIDER_METADATA}
    sessionParams={walletConnect.SESSION_PARAMS}
  />
) : null}

But I agree with @m1heng

@ignaciosantise Thanks for the reply, but is there such an attribute?
I didn't find it in the props.
export type Props = Omit<ConfigCtrlState, 'recentWalletDeepLink'> &
  ThemeCtrlState & {
    providerMetadata: IProviderMetadata;
    sessionParams?: ISessionParams;
    relayUrl?: string;
    onCopyClipboard?: (value: string) => void;
  };

@Z-Hayk no, it's not available yet. I was thinking out-loud other possibilities without adding netinfo. Sorry for bringing confusion.

FWIW, we recently started to hit this error and it wasn't because of a network connection issue.
We somehow got the app into a state where AccountCtrl.getAccount was throwing in signer.getAddress() (saying unknown operation).  We've been unable to get the app back into this state, unfortunately.
Uninstalling and reinstalling the app (to reset all state/storage) seemed to fix the issue.

@venables thanks for pointing this out! If you find it again, please provide us the steps to reproduce it 🙏  Either way, that logic in AccountCtrl will change in the next release 💪

hey guys, im closing this one as you can solve the issue by rendering the modal after the connection is established.
hasInternet && <WalletConnectModal ... />
If this brings problems in the future, we'll think another solution.

I had the same problem
When I connected a wallet and then reload app will receive error

WalletConnect SDK error:  [Error: unknown account #0 (operation="getAddress", code=UNSUPPORTED_OPERATION, version=providers/5.7.2)]

from blow code
  /**
   * Initialize provider
   */
  useEffect(() => {
    async function initProvider() {
      try {
        const provider = await createUniversalProvider({
          projectId,
          relayUrl,
          metadata: providerMetadata
        });
        if (provider) {
          ClientCtrl.setProvider(provider);
          provider.on('display_uri', onDisplayUri);
          provider.client.core.relayer.subscriber.on(SUBSCRIBER_EVENTS.deleted, onSessionDelete);

          // Check if there is an active session
          if (provider.session) {
            ClientCtrl.setSessionTopic(provider.session.topic);
            await AccountCtrl.getAccount();
          }
          ClientCtrl.setInitialized(true);
        }
      } catch (error) {
        console.log('WalletConnect SDK error:',error); // I added， and error here
        Alert.alert('Error', 'Error initializing WalletConnect SDK');
      }

could  the alert be removed?
and another problem is about Network Error
below is complete log
 INFO  {"context": "core"} Core Initialization Success
 INFO  {"context": "client"} SignClient Initialization Success
 LOG  WalletConnect SDK error: [Error: unknown account #0 (operation="getAddress", code=UNSUPPORTED_OPERATION, version=providers/5.7.2)]
 WARN  Possible Unhandled Promise Rejection (id: 0):
"Network Error"

I did not config sessionParams, and when I connect a wallet , the network is goerli and then I call setDefaultchain to  bnbt (chainId : 97), and read Contract method, I will receive Error:

[Error: underlying network changed (event="changed", network={"name":"goerli","chainId":5,"ensAddress":"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"}, detectedNetwork={"name":"bnbt","chainId":97,"ensAddress":null,"_defaultProvider":null}, code=NETWORK_ERROR, version=providers/5.7.2)]

So how request another network?

@dingcxx can you check if the network error still happens in v1.0.0-rc.5?

have the same problem and connot solve through adding netinfo.isconnected

The detailed error under it is:
TypeError: Cannot convert null value to object
    at getPrototypeOf (native)
    at H (http://<IP_ADDRESS>:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:337824:33)
    at Sa (http://<IP_ADDRESS>:8081/node_modules\@walletconnect\universal-provider\dist\index.cjs.bundle//&platform=ios&hot=false&lazy=true&dev=true&minify=false&modulesOnly=true&runModule=false&shallow=true:3926:26)
    at Bg (http://<IP_ADDRESS>:8081/node_modules\@walletconnect\universal-provider\dist\index.cjs.bundle//&platform=ios&hot=false&lazy=true&dev=true&minify=false&modulesOnly=true&runModule=false&shallow=true:3919:15)
    at anonymous (http://<IP_ADDRESS>:8081/node_modules\@walletconnect\universal-provider\dist\index.cjs.bundle//&platform=ios&hot=false&lazy=true&dev=true&minify=false&modulesOnly=true&runModule=false&shallow=true:4860:19)
    at forEach (native)
    at createProviders (http://<IP_ADDRESS>:8081/node_modules\@walletconnect\universal-provider\dist\index.cjs.bundle//&platform=ios&hot=false&lazy=true&dev=true&minify=false&modulesOnly=true&runModule=false&shallow=true:4856:125)
    at ?anon_0_ (http://<IP_ADDRESS>:8081/node_modules\@walletconnect\universal-provider\dist\index.cjs.bundle//&platform=ios&hot=false&lazy=true&dev=true&minify=false&modulesOnly=true&runModule=false&shallow=true:4810:102)
    at next (native)
    at asyncGeneratorStep (http://<IP_ADDRESS>:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:6079:26)
    at _next (http://<IP_ADDRESS>:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:6098:29)
    at tryCallOne (/private/var/folders/yw/6bx918xn4671rggfcdxz7fph0000gn/T/hermes/build_iphoneos/lib/InternalBytecode/InternalBytecode.js:53:16)
    at anonymous (/private/var/folders/yw/6bx918xn4671rggfcdxz7fph0000gn/T/hermes/build_iphoneos/lib/InternalBytecode/InternalBytecode.js:139:27)
    at apply (native)
    at anonymous (http://<IP_ADDRESS>:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:39706:26)
    at _callTimer (http://<IP_ADDRESS>:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:39585:17)
    at _callReactNativeMicrotasksPass (http://<IP_ADDRESS>:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:39630:17)
    at callReactNativeMicrotasks (http://<IP_ADDRESS>:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:39836:44)
    at __callReactNativeMicrotasks (http://<IP_ADDRESS>:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:3683:46)
    at anonymous (http://<IP_ADDRESS>:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:3457:45)
    at __guard (http://<IP_ADDRESS>:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:3656:15)
    at flushedQueue (http://<IP_ADDRESS>:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:3456:21)
    at invokeCallbackAndReturnFlushedQueue (http://<IP_ADDRESS>:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:3450:33)

@ignaciosantise sorry- can't provide a public repo to help with the above. Is there a way we can supress the "Error initializing WalletConnect SDK" alert that pops up and let the developer handle the error ourselves?

@CallbackDan  alerts will be removed in the next release. About the error you are having, about the public repo, i mean if you can create a basic example app that has the error
Running npx react-native@latest init ExampleWithError and adding the code that reproduces the issue you are having


Gradle import issue

I was trying to access the library from gradle , it always showing me the message:-
Error:(139, 13) Failed to resolve: com.github.JeroenMols:LandscapeVideoCamera:1.1.4
Can you please explain why this is happening.

Not a technical issue with the library.
Suggest to follow instructions on how to integrate and have a look at the example.