Let mypy infer the correct context vars types

Description
Hi there! Just a little problem related to mypy and type checking.
You use the reinterpret cast in __new__ method (it's not quite good, but not an error though), hence in the next code the device object's type is inferred as Scrapli.
from scrapli import Scrapli
def test_():
    device = Scrapli(**{})
    device.open()
    device.send_command("?")

But in the next example the device type is inferred as a Driver, cause this is the ancestor where an  __enter__ method is
declared in and the return value is annotated as "Driver"
from scrapli import Scraply
def test_():
    with Scraply(**{}) as device:
        device.send_command("?")

The problem is that neither Driver nor BaseDriver declares not send_command method, hence the above code breaks the rules.
Letting mypy do its job with no additional hints fixes it.
All the same is for the asynchronous versions of the drivers.
Type of change
Please delete options that are not relevant.

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

How Has This Been Tested?
Before:

After:

Checklist:

[x] My code follows the style guidelines of this project (no GitHub actions complaints! run make lint before
committing!)
[x] I have commented my code, pydocstyle and darglint are happy, docstrings are in google docstring format, and all
docstrings include a summary, args, returns and raises fields (even if N/A)
[x] I have added tests that prove my fix is effective or that my feature works, if adding "functional" tests please
note if there are any considerations for the vrnetlab setup
[x] New and existing unit tests pass locally with my changes

Hey @erwinkinn
Thanks for opening this. I see what you are saying from the screenshot, however I think this is a vscode issue not mypy. Pycharm correctly figures out device methods without any changes. Also, removing the return type will cause mypy to complain about not having any return type specified of course.

The Scrapli "factory" returns an instance of Scrapli (or AsyncScrapli in the async one of course), which the editor should be smart enough to see is in fact a NetworkDriver (or AsyncNetworkDriver) (because the "factory" class inherits from the respective network driver). So I don't think there is any issue with mypy or the typing here, and I'm inclined to leave things the way they are unless there is something im not understanding?
Carl

Hey @erwinkinn
Thanks for opening this. I see what you are saying from the screenshot, however I think this is a vscode issue not mypy. Pycharm correctly figures out device methods without any changes. Also, removing the return type will cause mypy to complain about not having any return type specified of course.

The Scrapli "factory" returns an instance of Scrapli (or AsyncScrapli in the async one of course), which the editor should be smart enough to see is in fact a NetworkDriver (or AsyncNetworkDriver) (because the "factory" class inherits from the respective network driver). So I don't think there is any issue with mypy or the typing here, and I'm inclined to leave things the way they are unless there is something im not understanding?
Carl

Hello, Carl!
Thanks for answering ) It's an interesting case though. Looks like mypy doesn't track an obvious problem.
Please consider the next case:
class B:
    def __enter__(self) -> "B":
        return self

    def __exit__(self, *_) -> None:
        ...

class D(B):
    def foo(self) -> int:
        ...

def bar(x: D):
    x.foo()

def main():
    with D() as d:
        bar(d)

main()

As far as the base class' method returns an instance of the base class (even if call it from the descendant), we will have a base class instance that has no foo method, hence we cannot pass such an object to the bar function.
I think that mypy is just smart enough to infer the type of a returned instance correctly and may be this is the case when "practicality beats purity" and contexts are handled the special way.
I think I should ask mypy devs about this.
Thanks again ;)

@carlmontanari, guys from gitter.im have helped me understand this. Consider the code below.

Mypy start claiming this as a bug right after I have added a return type to my main function.
Also it detects an error when it's run in the strict mode. This like:

So this is definitely not a VSCode problem. This is the Liskov rule which is broken here.

@erwinkinn sorry I've been busy and haven't gotten back to this. So what is the final setup that will appease mypy?

@carlmontanari, thanks for returning to this )
I just wanna say that obviously you want your __enter__ method to return an instance of the class the method was called for. So you have to just let mypy to infer a type rather than defining it manually (this is what my PR actually does).
class Driver has no send_command method, but this is the place where the __enter__ method is defined. This context method is inherited in GenericDriver and this last guy does have send_command method. Finally when I so smth like
with GenericDriver() as driver: ..., I expect the driver to be of type GenericDriver rather than just Driver. But, I have Driver, cause this is the declared type for the context to return.
Please consider this example. This is exactly the same what happens in scrapli's code, isn't it?

Ok I get what you are saying and am good with it (thanks for bearing with me!) -- one thing remains though: what do we do to tell mypy to not complain about this? I feel like just a type: ignore is probably not the "right" thing to do here, but of course mypy is complaining about no return information as it sits now. Is there a "nice" way to signify to mypy that it should just infer things here and not complain about lack of return information?

@carlmontanari, pardon me for such a long delay, I'm so crazy busy at my work... Yes, I understand your question. Actually if mypy isn't run in this --strict mode, it must not to report an absence of the return information for you __aenter__ method. Another option is to use a Generic Type for the method if you wanna keep a return value. Let me add just yet another commit...

I've added a Generic type. Now we have both -- the type defined and a normal behaviour for the descendants.
Oh, BTW, I have found just yet another problem I want to ask about. When I enter an "exit" command, the remote server terminates a session (it must do so though). Right now scrapli doesn't handle this situation. It eagers to read until a prompt is received, getting an empty byte string again and again from the underlaying transport.
Is handling such a leave-the-session command as "exit" a use case for scrapli? I could make a PR if so.

hey @erwinkinn
It looks like mypy is still upset, now about the new typevar not having an open method, though I imagine it would complain about the next method too if that object for some reason had an open method.

When I enter an "exit" command, the remote server terminates a session (it must do so though). Right now scrapli doesn't handle this situation.

In most (all?) cases, if you are using a "network" platform, this should be handled for you in the "on_close" function. Those functions just do something like: conn.channel.write("exit") -- if you don't have a platform/are doing custom stuff you could just exit like that.

Oh, I'm sorry. Of course this typevar must be bound to the type it refers to. One more commit follows.
About "exit" functionality. Well, OK. I thought that. Actually I'm trying to use scrapli not as a network engineer to automate some boring stuff, but for my testing framework. That's why this special case is not an option for me.  I mean I understand that normally one has to just close the connection or leave the connection context in order to exit a session, but I'm trying to make a Device abstraction that must handle both of the device.console.run("exit") and the device.console.run("ls -l") all the same way. It looks like I have to make a workaround, cause leaving a session this way is not the case for scrapli.

Ok, here's the commit. It looks like everything is ok for now.

This is what mypy-0.971 (newer than yours) says.  I see no the subject related errors

>mypy --strict scrapli
scrapli\helper.py:10: error: Library stubs not installed for "pkg_resources" (or incompatible with Python 3.10)
    import pkg_resources  # pylint: disable=C0411
    ^
scrapli\helper.py:10: note: Hint: "python3 -m pip install types-setuptools"
scrapli\transport\plugins\paramiko\transport.py:5: error: Library stubs not installed for "paramiko" (or incompatible with Python 3.10)
    from paramiko import Channel
    ^
scrapli\transport\plugins\paramiko\transport.py:5: note: Hint: "python3 -m pip install types-paramiko"
scrapli\transport\plugins\paramiko\transport.py:5: note: (or run "mypy --install-types" to install all missing stub packages)
scrapli\transport\plugins\paramiko\transport.py:5: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
scrapli\transport\plugins\paramiko\transport.py:7: error: Library stubs not installed for "paramiko.rsakey" (or incompatible with Python 3.10)
    from paramiko.rsakey import RSAKey
    ^
scrapli\transport\plugins\paramiko\transport.py:8: error: Library stubs not installed for "paramiko.ssh_exception" (or incompatible with Python 3.10)
    from paramiko.ssh_exception import AuthenticationException
    ^
scrapli\transport\plugins\paramiko\transport.py:80: error: Unused "type: ignore" comment
                self.session = _ParamikoTransport(self.socket.sock)  # type: ignore
                ^
scrapli\decorators.py:105: error: Module has no attribute "SIGALRM"
                    old = signal.signal(signal.SIGALRM, self._signal_raise_exception)
                                        ^
scrapli\decorators.py:106: error: Module has no attribute "setitimer"
                    signal.setitimer(signal.ITIMER_REAL, self.transport_timeout_transport)
                    ^
scrapli\decorators.py:106: error: Module has no attribute "ITIMER_REAL"
                    signal.setitimer(signal.ITIMER_REAL, self.transport_timeout_transport)
                                     ^
scrapli\decorators.py:111: error: Module has no attribute "setitimer"
                            signal.setitimer(signal.ITIMER_REAL, 0)
                            ^
scrapli\decorators.py:111: error: Module has no attribute "ITIMER_REAL"
                            signal.setitimer(signal.ITIMER_REAL, 0)
                                             ^
scrapli\decorators.py:112: error: Module has no attribute "SIGALRM"
                            signal.signal(signal.SIGALRM, old)
                                          ^
scrapli\decorators.py:286: error: Module has no attribute "SIGALRM"
                    old = signal.signal(signal.SIGALRM, self._signal_raise_exception)
                                        ^
scrapli\decorators.py:287: error: Module has no attribute "setitimer"
                    signal.setitimer(signal.ITIMER_REAL, self.channel_timeout_ops)
                    ^
scrapli\decorators.py:287: error: Module has no attribute "ITIMER_REAL"
                    signal.setitimer(signal.ITIMER_REAL, self.channel_timeout_ops)
                                     ^
scrapli\decorators.py:292: error: Module has no attribute "setitimer"
                            signal.setitimer(signal.ITIMER_REAL, 0)
                            ^
scrapli\decorators.py:292: error: Module has no attribute "ITIMER_REAL"
                            signal.setitimer(signal.ITIMER_REAL, 0)
                                             ^
scrapli\decorators.py:293: error: Module has no attribute "SIGALRM"
                            signal.signal(signal.SIGALRM, old)
                                          ^
Found 17 errors in 3 files (checked 67 source files)

It looks like I have to make a workaround, cause leaving a session this way is not the case for scrapli

Yeah I think probably I'd say that is outside of scrapli "normal" scope -- I think/hope you should have all the tools available within scrapli to make that happen, but as you say would have to roll your own.
Thanks for sticking with me on this one! LGTM, will merge this and try to sort some of the ci issues (I'm still unclear why the Darwin builds are just never completing... haven't had time to look at it yet!)


[PY] Teams SSO - Classes + Samples

### Tasks
- [ ] https://github.com/microsoft/teams-ai/issues/1319
- [ ] https://github.com/microsoft/teams-ai/issues/1320

Marking as triaged due to incomplete/broken implementation on botbuilder python side. will re-prioritize once complete.
https://github.com/microsoft/BotBuilder-Samples/issues/3829
https://github.com/microsoft/botbuilder-python/issues/2088
https://github.com/microsoft/botbuilder-python/issues/2090
https://github.com/microsoft/botbuilder-python/issues/2103

test comment


Feature request: Add caching of lookups

When the lookup is used in a host or group var. The lookup is performed again and again by Ansible each time that variable is used. So each task that uses that variable triggers a new lookup (for every host that has to run the task). I assume this is normal Ansible behaviour, but this slows down the plays and even passbolt itself when running a big play over many hosts.
So it would be handy to have the lookup plugin cache recently looked up passwords so that it does not need to query passbolt for the same password over and over again within a play.
I understand this is a possible security risk, and should be handled very carefully, but I think it would be a great enhancement. I don't think the caching should be long lived, at max 5 minutes or so,

I added the ansible-cached-lookup into our AWX Execution Environment containers and now call all passbolt lookups using the cached lookup which indeed seems to work correctly. Currently using the on-disk caching as otherwise I will need to set up a local pypi repo for a localy compiled version from that in-memory change request.
So I still think it would by nice if (in-memory) caching would be included natively in the passbolt lookup plugin.

Hi @RobinR1
I published a new 0.0.14 release of the passbolt lookup plugin.
I included the in-memory version of the lookup plugin, you should be able to use it with lookup('anatomicjc.passbolt.cached', 'anatomicjc.passbolt.passbolt', 'Your-secret-name')
Let me know if it is ok on your side :-)


Browserify usage

I'm sorry for a kind of support question, but is there some easy way to browserify the es6 modules syntax without setting up a grunt file, etc.

One other quick, on-off question: if I enhance your schema objects with methods named open, delete, and cmp, do you expect I might run into any conflict problems with your method names in the future? I think it would be most convenient for me to allow the user to chain idb-schema commands into the other db.js commands as opposed to requiring the user to build their own idb-schema object and supply it as an option or something.

Hey, I've just published<EMAIL_ADDRESS>to npm. ES6 is compiled with babel, so you can easily use it with browserify.

For second comment, I don't think, that idb-schema should depend on any library semantic, it's just a way to describe onupgradeneeded callback. If you wish, you can extend it with different methods, but it will be a different library.

Thanks re: browserify.
Re: method extension, sure...I am just asking about whether my extending it for my own library will possibly run into conflicts with your library later if I you ever decide to use those 3 method names.

Well, I can't say for sure, but 3.x definitely won't. Feel free to rely on current implementation using semver's ^3.0.0 and you will be safe ;)


Add clarfication and screens for generating wildcard cert for PKS API

Applicable to 1.2 and later releases. Thanks.

Thanks, @lparis!


fix: series limit solution for source is query

SUMMARY

This allows a datasource being a query to create a time series line chart.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

[ ] Has associated issue:
[ ] Required feature flags:
[ ] Changes UI
[ ] Includes DB Migration (follow approval process in SIP-59)

[ ] Migration is atomic, supports rollback & is backwards-compatible
[ ] Confirm DB migration upgrade and downgrade tested
[ ] Runtime estimates and downtime expectations provided

[ ] Introduces new feature or API
[ ] Removes existing feature or API

/testenv up

/testenv up


docs: add a notice about the portable_pdb descrition being moved to the https://github.com/dotnet/designs repo

Description
Like https://github.com/dotnet/core/blob/main/Documentation/diagnostics/source_link.md  page which has a notice that points to the new location at https://github.com/dotnet/designs/blob/main/accepted/2020/diagnostics/source-link.md
The page at https://github.com/dotnet/core/blob/main/Documentation/diagnostics/portable_pdb.md should also have a notice that points to the new location at https://github.com/dotnet/designs/blob/main/accepted/2020/diagnostics/portable-pdb.md

I think the redirect is automatic and the PDB file was not moved. Any thoughts on this @tmat ?


Fix idiosyncratic way of returning

ah, ok, horrible by design, I see. It would be nice to get rid of this return behaviour at some point (function &)

A test that Ad did showed that doing return false from this function does work, even with error_reporting set to E_ALL.
Furthermore, the PHP manual has this to say:
    Note: Unlike parameter passing, here you have to use & in both places - to indicate that you want to return by reference, not a copy, and to indicate that reference binding, rather than usual assignment, should be done for $myValue.

I checked all occurrences of this function, but none of them adheres to this. This means that they all create a regular variable, rather than a reference.
In addition, the stated reason it returns a reference in the first place is because the return value is sometimes passed into a function that takes an argument by reference. But that is not needed - you can create a regular variable and pass it into a function that takes a variable by reference without any issue:
function test(&$var)
{
    $var++;
}
$var = 2;
test($var);
var_dump($var);

Output:
int(3)

No it doesn't...
PHP Notice:  Only variable references should be returned by reference in ...test.php on line 28
Notice: Only variable references should be returned by reference in ...test.php on line 28

http://php.net/manual/en/language.references.return.php

Which bit are you reacting to? The statement about your test? I didn't see any error output on your screen, so I must have misread it.
The rest still stands, though, especially the point about how this function is called in our code.


missing grass support for fireflies

The AbyssalCraft, Botania, RandomThings, Tinker's Construct, Natura and Betweenlands grasses still don't support fireflies. :(

The firefly effect is tied to specific grasses/plants and is not generalized.  Also, fireflies are limited to biomes that have some level of humidity and isn't too hot.  For example, desert/arid biomes/hot will not have the firefly effect.
AbyssalCraft - I elected not to add firefly effects to that grass.  The AbyssalCraft biomes in Overworld have an end particle effect and it would seem to be a bit much.
Botania - flowers already have a shimmering/spark particle effect.  Not aware of any other grass.
Tinkers slime grass - to me it didn't right to have firefly particles.
Natura - don't see grass as part of the mod.  It does have shrooms and crops - I avoid tying fireflies to those.
Betweenlands - not there yet.  I been looking at that mod and it's on my list to provide support.
This being said I am looking at increasing the frequency of fireflies from Vanilla items.  Just need to figure out a good way to balance it against having BoP installed.

So why not give the choice in the config for adding manually the grass for supporting fireflies ?

You can do that already using external configuration files.

Okay thanks, I will look at it. ;)

I'm increasing the spawn rate of fireflies for the Vanilla red, yellow, and double tall plants.  Should be about 40% more frequent.

Try this condition string: "weather.isNotRaining && isNight && !biome.isDry && ONEOF(biome.temperature,'mild','warm')"
And the chance is low.  Essentially it says 1 in 10.  Try something like 30-40.

Oh wait it works now, I made made an error in the condition, I had written "isNotRaining" instead of "weather.isNotRainning".

Oh wait the chance is reversed, more the value is high, less there are fireflies.

Yep

It's not really normal. ^^'

Anyway I still think you give a support for all the grasses I put in my own external config. ;)

Posted a BETA to CurseForge that increases the number of fireflies around Minecraft flowers.  Regular Minecraft "tallgrass" does not have this block effect.  Other modded plants will be handled via mod support.


Add anchor tags to section headers

https://cdn.discordapp.com/attachments/1100364112862646332/1100364494372352080/CleanShot_2023-04-25_at_03.15.192x.png
This allows us to link out to any section without scrolling up to the ToC sidebar on the right.

railwayfix.webm
i made a pr that will add the (#) fragment-identifier to the titles but i was not able to overwrite the span that which was already present there.

Closed in #261


[Bug] morph动画期间触发交互会报错;

https://visactor.com/vchart/demo/storytelling/bar-to-scatter?version=1.12.2

fixed in vrender: https://github.com/VisActor/VRender/pull/1422

fixed in v1.12.4


[!]

Whatever apk i choose it always come with unable to run dx....How to fix it...Plz help

Here's the code in backdoor-apk.sh that is relevant:
$DX --dex --output="$MY_PATH/$RAT_APK_FILE" $MY_PATH/bin/classes-processed.jar >>$LOG_FILE 2>&1
rc=$?
if [ $rc != 0 ]; then
  echo "done."
  echo "[!] Failed to run dx on proguard processed jar file"
  cleanup
  exit $rc
fi
echo "done."


Update string npm package vulnerability

https://nodesecurity.io/advisories/536
Fix has not been merged into master yet so we need to wait
https://github.com/jprichardson/string.js/pull/217

We are going to remove dependency with string library at js-sdk version 3.0.0 at all.
Here is the PR: #42


feature enhancement for quick adapter

check out this adapter, it will give an even better view of the structure from the implementation.
@cymcsg tell me what u think and if it is possible implement it. awesome implementation

I think some feature of the adapter is really helpful.I'll try to find which is the best way to implement it.

thats a good idea.

@cymcsg  lets add this on the 0.4 milestone

there is still outstanding instability issue from the abmob list view and its recycled items during the process. we will need to test it with the real issue first.

@cymcsg mentioned from the google group the issue could be related to "the same method name confused" the recyclerview to run. Could it be the [onCreateViewHolder] (https://github.com/cymcsg/UltimateRecyclerView/blob/dev/UltimateRecyclerView/ultimaterecyclerview/src/main/java/com/marshalchen/ultimaterecyclerview/AdmobAdapter.java#L130) that is being confusing??

I have discovered that the crash is related to the animation. When the items are scrolled too fast and some of the recycled items were not yet to be prepared it initiated the crash.

looks like this is gonna be helpful source

Does this problem occur when items are scrolled too fast and used animation at the same time?I'm not quite sure about this problem.Let's try to find a way to fix it.

As from the discussion online, this bug is pointed to the google library bug that need to be fixed by their own. We are now looking forward to the new support library recycler view that comes with the patch to fix these issues. V23.2.1 will works. #342


UserFeed issues + template

Hello!
i need some help with this please
the normal feed.run(); with he templates works fine for me showing TAG_NAME images
but when i tried to use userFeed with the templates it not working and no data or div in the page
here is the code

//
var userFeed = new Instafeed({
get: 'user',
limit: '20',
userId: myuserid,
accessToken: 'myaccesstoken'
template: ''
});
userFeed.run();
//

also i tried this but same result
//
var feed = new Instafeed({
get: 'user',
limit: '1',
userId: myuserid,
accessToken: 'myaccess'
template: '',
});
feed.run();

//
when i removed template line it works fine
how i can use the template with user feed?

What errors are you seeing in your console @martinltz ?


Ability to select multiple tags at a time?

Would it be possible to edit the tag filters on the home page so that you could select as many tags as you want? Therefore if I selected a few tags, it would filter the results to only show anything that has any of the selected tags?
I am imagining this to work as so...
When you click a tag, it changes the background color of the tag button like it currently does. But if you click another tag afterward, it would select that tag as well and obviously change the background color of it too. Instead of changing to that tag like it currently does.
Thanks!

Thanks for the idea.
In my opinion, tags should not have too much functionality on a personal site - it's still a personal site, not a catalog or an online store.

Sure thing.
I get that. This is the first starter I found that has close to the tag filter functionality I am looking for, so I am trying to adapt it to be a multi-purpose site I could use for multiple different kinds of sites.
If you know of a starter that has the functionality I am looking for I would greatly appreciate it if you shared it with me.
This is a little unrelated but I have been messing with the CSS for hours trying to get it to display 4 articles per row but I seem to be getting nowhere. It is not that I don't know how to accomplish this, I have done it on multiple sites before but this one is coded so differently than I am used to. I think part of the problem is how the posts seem to get separated by year, I found where to turn off yearSeparator in gatsby-config.js but that seemed to just remove the separator title that displays the year. They seem to still be getting separated into different divs. None of the divs have a class I can target easily and all the elements that do have classes seem to be getting generated automatically. So I have no idea how to add custom classes to the containers to make things easier on me.
I admit I am fairly new to Gatsby and I have never experienced a Gatsby site before that uses a theme and has so much done through node_modules like this one does. So I don't expect you to teach me how to do everything I need to learn to make this work. But I just wanted to bring it up in-case you could point me in the right direction or maybe give you an idea for another starter you could create that would work the way I wish this one did =). I do love how easy everything is to do with this starter if there wasn't so much I wanted to redevelop to make it more multi-purpose. If I just wanted to create a blog, it would be perfect as is.
I would appreciate any help you can give me or any other starters you can refer me to that do what I want. But I will close this issue and won't be upset if you don't reply to this comment.

About CSS and styles. In Chronoblog, I use a rather unusual approach to styles. There, in general, it is not assumed that someone will manage the styles using css. If you need to go so deep into managing styles (beyond what the style settings allow https://github.com/Chronoblog/gatsby-theme-chronoblog#style-settings), then maybe you need to make your website without use of third-party themes.
At the expense of tags and filters. In fact, in my implementation of tags and filters, Gatsby is not particularly important. Gatsby is a React, and if you need functionality with filters, tags, etc., it might be better to look for libraries and examples of implementation in the React ecosystem.

Thanks. I will look into that. I appreciate the help!


Ability to initialize with null/unselected value

Currently, if I initialize the widget with a null value in current property, it will throw an error Index out of range, It would be nice if the provided value is not in the values property, it init properly but with no option selected.

Thanks for the feature request :)
So do you want no value to be selected if it is not in the list, or only if it is null?

for my needs, a null value is enough, could be only if the generics allows it <int?>, maybe an error state (border/background color) when it's not in values range instead of throwing an error?

I think it makes more sense to throw an error because it's not something that's supposed to happen. But I'm thinking about how best to implement the fact that no value is selected, since this feature has been requested several times now.

@olsonjb @talski I would appreciate it if you could take a look at my current approach to this issue. On unselected_value these changes are implemented and an example of how to use the feature. For using it in your projects, you can use the following lines in your pubspec.yaml:
animated_toggle_switch:
  git:
    url: https://github.com/splashbyte/animated_toggle_switch.git
    ref: unselected_value

I have now updated the branch to the probably final version. Now values for current are allowed, which are not in values, as you suggested @talski.


suggestion: Multi window support

@marc2332 Is there temporary solution to this?
Is there a way to first create a window with then renderer ui?

@marc2332 Is there temporary solution to this? Is there a way to first create a window with then renderer ui?

No, there is no solution for this right now

I believe Dioxus supports this, is there any way to bring this to Freya?

I believe Dioxus supports this, is there any way to bring this to Freya?

It is probably possible but needs research and big refactors


Apply a concrete type to the props of the InvoiceStatus component

Hello
I was studying through next learn and came across the InvoiceStatus component.
It takes a status prop and I saw that it is defined as a string type.
I'm using the status prop to handle conditional statements, but I think it would be better if it was declared as a concrete type.

Hey! Thank you for the suggestion. I am okay with leaving it as is. But feel free to keep your version this way!


fix(biome_migrate): add FixKind to NurseryRules migration

Summary

This was missed before #2885 was merged.

Test Plan

Tests pass now.
cargo nextest run -p biome_migrate

I forgot to apply the same fix to the pull_request.yml workflow. That's why the CI test on windows still fails. I will make a PR on main to fix this.


Unable to show Angular 2 Google Map

Issue description
I faced this issue when I am compiling my app using Visual Studio 2017 Angular 2 template + Angular 2 Google Map
An unhandled exception occurred while processing the request.
Exception: Call to Node module failed with error: Error: Uncaught (in promise): TypeError: this._elem.nativeElement.querySelector is not a function
TypeError: this._elem.nativeElement.querySelector is not a function
Steps to reproduce and a minimal demo of the problem
From the main.server.js, the codes in question are as follows:
SebmGoogleMap.prototype.ngOnInit = function () {
// todo: this should be solved with a new component and a viewChild decorator
var container = this._elem.nativeElement.querySelector('.sebm-google-map-container-inner');
this._initMapInstance(container);
};
I have included this map at the app.component.html
<sebm-google-map [latitude]="maplat" [longitude]="maplng" [zoom]="mapzoom" (mapClick)="mapClicked($event)">
<sebm-google-map-marker *ngFor="let project of projects" [latitude]="project.latitude" [longitude]="project.longitude">
<sebm-google-map-info-window [disableAutoPan]="true">
{{project.title}}

Description : {{project.description}}
Category : {{project.category}}
Project Type : {{project.projectType}}
Project Status : {{project.status}}

<button type="button" class="btn btn-primary" (click)="onProjectEdit(project.id)">Edit
<button type="button" class="btn btn-primary" (click)="onProjectDelete(project.id)">Delete

What steps should we try in your demo to see the problem?
Current behavior
Expected/desired behavior
angular2 & angular-google-maps version
@angular/cli: 1.0.0
node: 7.5.0
os: win32 x64
@angular/cli: 1.0.0
@angular/common: 2.4.10
@angular/compiler: 2.4.10
@angular/core: 2.4.10
@angular/forms: 2.4.10
@angular/http: 2.4.10
@angular/platform-browser: 2.4.10
@angular/platform-browser-dynamic: 2.4.10
@angular/platform-server: 2.4.10
@angular/router: 3.4.10
angular2-google-maps 0.17.0
Other information

Hello ! The directive had been renamed to agm-map.
https://github.com/SebastianM/angular-google-maps/blob/master/src/core/directives/map.ts
The documentation is clearly not up to date on https://angular-maps.com/

@jeremlb I'm working on a new documention right now

@SebastianM Thank you for your hard work :)

Seems like you are running your app on the server. That is not supported right now but there's already an issue for that.

I am having the same issue with either angular2-google-maps/core or @agm/core (with the new directives).
I'm running VS2017.  Is there are a work-around for this?  I need to get my map going...
Thanks for all the awsome work you're doing on these frameworks!


Hi Benjamin! Thank you for Code.

How did you add more than 10000 nft to OpenSea. Are there any automatic way?

You need to build your own smart contract and web app. Have a look at the Alchemy Docs: https://docs.alchemy.com/alchemy/tutorials/nft-minter


add scripts and workflow to build on GitHub Actions

This is a workflow for Github Actions that will build macOS binaries for Ungoogled Chromium in 2-3 sequential steps and then upload them as artifact.
It is triggered by pushing to any release/* branch.
Build times are in the range of 11 to 13 hours.
See here for an example of a finished run.
I hope by this people can better trust the binaries.

Perhaps it would be better to move all github_*.sh files to the .github/workflows/ directory?

Perhaps it would be better to move all github_*.sh files to the .github/workflows/ directory?

I have no strong opinion on that. They could be moved to the .github/workflows/ directory, so that everything concerning the github actions build is in one place. On the other hand they might be useful for people wanting to modify their local build scripts and would be more visible in the main directory.
Other arguments on where to keep these files? Or the repo maintainer may decide…

Perhaps it would be better to move all github_*.sh files to the .github/workflows/ directory?

Generally, .github/workflows/ is used only for workflow files. So another directory, say, .github/scripts/ can be used to place them.

I agree with @anshul78, I think they should be placed in .github/scripts. I don't see a use-case where our typical user would want to run the GitHub workflow scripts on their machine instead of running the build scripts already in this repo.
Also, why would you trigger the build on any release/* branch? We don't have any branch scheme like that right now, so what are you proposing?

I agree with @anshul78, I think they should be placed in .github/scripts. I don't see a use-case where our typical user would want to run the GitHub workflow scripts on their machine instead of running the build scripts already in this repo.

I've moved the github specific scripts to .github/scripts

Also, why would you trigger the build on any release/* branch? We don't have any branch scheme like that right now, so what are you proposing?

The idea here was to prevent running a full build on changes to the documentation, i.e. anything not build related.
I've changed the triggers in the yaml file to specify paths and files that should trigger a build, or ones that should be ignored.

I've just converted this PR to draft status. I want to include a step to publish a release with the generated diskimage. I will update status when this is working.

I don't see why the workflow needs to be run on pull request. If it is run, it should only check whether the binary gets compiled.
For commits, it should run on all push (which should include merged pull request?) except changes to specific files/folders.

This has finally finished building and creating a release is working too, see here – opening again for review
The idea would then be to directly link to the latest GitHub release on the binaries web-site


This can detect scenarios where the test makes assumptions that are only fulfilled by global state manipulated by a previous test, but are not true in the actual logic to be tested.
In case such a randomly ordered test run fails, the random seed can be found in the GHA log so that this particular ordering can be replicated locally.
Relevant Technical Choices

Add a randomly ordered test run to the GHA workflow
Adds a single PHPUnit run that is randomly ordered.
This can detect scenarios where the test makes assumptions that are only fulfilled by global state manipulated by a previous test, but are not true in the actual logic to be tested.
In case such a randomly ordered test run fails, the random seed can be found in the GHA log so that this particular ordering can be replicated locally.
Note: This PR also fixes some tests that failed during these randomly ordered test runs, but not all. There are simply too many issues with the tests, which requires another big overhaul.
Adds new HasSiteSetup  and HasSiteRemoval interfaces
Eliminates the procedural setup_new_site() code by moving logic attached to site setup/teardown in Multisite to the individual services. Basically implementing #7494
Added bonus: rewrite rules are no longer flushed twice upon plugin activation (once by the service container and once by setup_new_site().
Renames existing similar interfaces accordingly:

PluginActivationAware
PluginDeactivationAware

PluginFactory
Replaces get_plugin_instance() with a dedicated PluginFactory and a simple bootstrap_plugin() function which is hooked to plugins_loaded.
Before that, the plugin was executed right away and not attached to any particular action.
Link_Controller / Hotlink_Controller
Fixes a bug in Link_Controller which unexpectedly caused an external HTTP request.
Slightly refactored both classes to be more aligned and use wp_http_validate_url() for URL validation.
Updates tests accordingly.
To-do

Split up integration tests and unit tests (#5473)
Make use of DependencyInjectedTestCase
Fix all the issues with the tests ⚠

User-facing changes

N/A
Testing Instructions

[x] This is a non-user-facing change and requires no QA

Reviews
Does this PR have a security-related impact?

Does this PR change what data or activity we track or use?

Does this PR have a legal-related impact?

Checklist

[ ] This PR addresses an existing issue and I have linked this PR to it in ZenHub
[x] I have tested this code to the best of my abilities
[x] I have verified accessibility to the best of my abilities (docs)
[x] I have verified i18n and l10n (translation, right-to-left layout) to the best of my abilities
[x] This code is covered by automated tests (unit, integration, and/or e2e) to verify it works as intended (docs)
[x] I have added documentation where necessary
[x] I have added a matching Type: XYZ label to the PR

Fixes #

This is the last thing - https://github.com/google/web-stories-wp/pull/8792#discussion_r701941575 then I will approve.


Mercury buff

About the PR

I saw it was in the TODO list and since cryptobiolin formally has a "confusing" effect i thought i might as well add it.

Changelog
:cl: Ubaser

tweak: Mercury now gives you brain damage like cryptobiolin.

error looks unrelated

Maybe change the CL a bit?


Fixed Windows install commands

curl does not have a -k or -L flag on Windows, these slightly simplified commands work perfectly well and accomplish the same task.

Windows PowerShell has a curl alias for Invoke-WebRequest that does in fact not have -k and -L flags, however that only applies for PowerShell. Using the curl command in the command prompt works just fine!

Windows PowerShell has a curl alias for Invoke-WebRequest that does in fact not have -k and -L flags, however that only applies for PowerShell. Using the curl command in the command prompt works just fine!

Interesting, good catch! Repo maintainers, would you rather the README reflect how to use in both PWSH and CMD instead of this change?


Service Request: Add LinkedIn Darkmode

Service Request: Add LinkedIn Darkmode

LinkedIn is now supported.

Thanks... hmmm doesn't seem to be working for me though.

Doesn't seem to work for me, either. Should this be reopened?

Thought I'd bump since it still is an issue and any workaround previously stated don't seem to work for me. Only one that works right now is constantly refreshing and ~5% of the time it will reload into dark mode. This has to be repeated every time Ferdi ends a session.

Just found one other workaround. Open Ferdi Settings -> Your Services -> LinkedIn -> Save service.

@ducfilan Hey just checking to see if you've had any luck with this. Looks like dark mode is "turning on" now in Ferdi but just needs to have some CSS styling changes for it to be implemented in a usable way.

Closing since LinkedIn has dark mode now and I just got it... finally!
https://www.linkedin.com/help/linkedin/answer/a524473/switch-between-dark-and-light-mode?lang=en


Not supposed to have passed

Challenge Size your Images has an issue.
User Agent is: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
 It might be helpful.

I would like this test replaced with a regex
"assert($(\"img\").hasClass(\"smaller-image\"), 'message: Your img element should have the class smaller-image.');"
NOTE: like in the OP's code, unquoted CSS attributes are vaild, as per the HTML standard

@johnny1701d We need this issue open so people know about the issue and we can get a fix for it.
Thanks for pointing the issue out.


OSFS.unsyspath on paths 6 chars long

OSFS.unsyspath seems to special case paths that are 6 chars long (some Windows thing?), But that logic seems to mess up paths on Macs. For example:

from fs.OSFS import OSFS
fs = OSFS('/')
fs.unsyspath(fs.getsyspath('abcde'))
u'abcde\'

The original 'abcde' was corrupted to 'abcde\'

I think I can fix that by checking for the platform.

pushed a quick fix


Fix method annotation callback do not work problem

What is the purpose of the change
fix #6833 when use method annotation like below，callback method dose not work
@DubboReference(check = false,methods = {@Method(name = "sayHello",oninvoke = "methodCallback.oninvoke",onreturn = "methodCallback.onreturn",onthrow = "methodCallback.onthrow")})
private HelloService helloServiceMethodCallBack;

Brief changelog
Verifying this change

[x] Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
[ ] Format the pull request title like [Dubbo-XXX] Fix UnknownException when host config not exist #XXX. Each commit in the pull request should have a meaningful subject line and body.
[ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
[x] Run mvn clean install -DskipTests=false & mvn clean test-compile failsafe:integration-test to make sure unit-test and integration-test pass.
[ ] If this contribution is large, please follow the Software Donation Guide.

Codecov Report

Merging #7754 (8336a4b) into master (e845e16) will decrease coverage by 0.24%.
The diff coverage is 90.00%.

@@             Coverage Diff              @@
##             master    #7754      +/-   ##
============================================
- Coverage     59.28%   59.03%   -0.25%
+ Complexity      529      527       -2
============================================
  Files          1077     1080       +3
  Lines         43565    43674     +109
  Branches       6368     6358      -10
============================================
- Hits          25826    25785      -41
- Misses        14879    15027     +148
- Partials       2860     2862       +2

Impacted Files
Coverage Δ
Complexity Δ

...ain/java/org/apache/dubbo/config/MethodConfig.java
95.65% <84.21%> (-3.09%)
0.00 <0.00> (ø)

...beans/factory/annotation/ReferenceBeanBuilder.java
93.44% <100.00%> (+1.44%)
0.00 <0.00> (ø)

...ng/transport/dispatcher/all/AllChannelHandler.java
62.06% <0.00%> (-27.59%)
0.00% <0.00%> (ø%)

...ntext/event/AwaitingNonWebApplicationListener.java
48.48% <0.00%> (-24.25%)
0.00% <0.00%> (ø%)

...bo/rpc/cluster/support/FailbackClusterInvoker.java
52.45% <0.00%> (-18.04%)
0.00% <0.00%> (ø%)

...dubbo/common/status/support/LoadStatusChecker.java
46.15% <0.00%> (-15.39%)
0.00% <0.00%> (ø%)

...rg/apache/dubbo/remoting/utils/PayloadDropper.java
76.92% <0.00%> (-15.39%)
0.00% <0.00%> (ø%)

...ng/transport/dispatcher/WrappedChannelHandler.java
47.82% <0.00%> (-15.22%)
0.00% <0.00%> (ø%)

...bo/config/event/listener/LoggingEventListener.java
50.00% <0.00%> (-12.50%)
0.00% <0.00%> (ø%)

...in/java/org/apache/dubbo/common/utils/JVMUtil.java
81.13% <0.00%> (-11.33%)
0.00% <0.00%> (ø%)

... and 52 more

Continue to review full report at Codecov.

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


KeyError: 'snapshotTime' in fetch_historical_prices_by_epic_and_date_range

epic = 'CS.D.EURUSD.MINI.IP'
resolution = 'm'
start_date = datetime.datetime(2017,9,11,9,5,0)
end_date = datetime.datetime(2017,9,11,10,10,0)
response = ig_service.fetch_historical_prices_by_epic_and_date_range(epic, resolution, start_date, end_date)

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 2442, in get_loc
    return self._engine.get_loc(key)
  File "pandas/_libs/index.pyx", line 132, in pandas._libs.index.IndexEngine.get_loc (pandas/_libs/index.c:5280)
  File "pandas/_libs/index.pyx", line 154, in pandas._libs.index.IndexEngine.get_loc (pandas/_libs/index.c:5126)
  File "pandas/_libs/hashtable_class_helper.pxi", line 1210, in pandas._libs.hashtable.PyObjectHashTable.get_item (pandas/_libs/hashtable.c:20523)
  File "pandas/_libs/hashtable_class_helper.pxi", line 1218, in pandas._libs.hashtable.PyObjectHashTable.get_item (pandas/_libs/hashtable.c:20477)
KeyError: 'snapshotTime'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/trading_ig/rest.py", line 836, in fetch_historical_prices_by_epic_and_date_range
    data['prices'] = self.format_prices(data['prices'])
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/trading_ig/rest.py", line 751, in format_prices
    df = df.set_index('snapshotTime')
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandas/core/frame.py", line 2830, in set_index
    level = frame[col]._values
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandas/core/frame.py", line 1964, in __getitem__
    return self._getitem_column(key)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandas/core/frame.py", line 1971, in _getitem_column
    return self._get_item_cache(key)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandas/core/generic.py", line 1645, in _get_item_cache
    values = self._data.get(item)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandas/core/internals.py", line 3590, in get
    loc = self.items.get_loc(item)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 2444, in get_loc
    return self._engine.get_loc(self._maybe_cast_indexer(key))
  File "pandas/_libs/index.pyx", line 132, in pandas._libs.index.IndexEngine.get_loc (pandas/_libs/index.c:5280)
  File "pandas/_libs/index.pyx", line 154, in pandas._libs.index.IndexEngine.get_loc (pandas/_libs/index.c:5126)
  File "pandas/_libs/hashtable_class_helper.pxi", line 1210, in pandas._libs.hashtable.PyObjectHashTable.get_item (pandas/_libs/hashtable.c:20523)
  File "pandas/_libs/hashtable_class_helper.pxi", line 1218, in pandas._libs.hashtable.PyObjectHashTable.get_item (pandas/_libs/hashtable.c:20477)
KeyError: 'snapshotTime'

@elemolotiv
resolution = 'm' is possibly linked to this issue.
Can you try again with one of these choices for resolution ? (they are case sensitive)
1Min
2Min
3Min
5Min
10Min
15Min
30Min
1H
2H
3H
4H
D
W
M

to clarify, what appears to happen is that resolution = m is being treated as meaning "month", and no month-end data is found for that start-end range.

Resolved, closing


Histogram of random variables

Hi,
Thanks for this great library, I just discovered. Really useful.
I've been performing some tests on the outcomes one may get out of this just to check I understand the documentation correctly. You may see it here.
As you can see, it's just creating random data and histogramming it. From the results
here, I observe that constraining the variables makes the histogram weird. What am I doing wrong ?
Thanks !

Hi Cayetano,
Thank you for the feedback and creating a testcase (very helpful!).
I'll certainly investigate further and let you know what I find. At this
point, I wouldn't necessarily conclude that you're doing anything wrong.
I would like to have the option of including an abstracted version of
the testcase in the PyVSC test suite. I see that the file doesn't have a
license header. Is it okay if I include code from this test in the
Apache-licensed PyVSC package?
Thanks and Best Regards,
Matthew
On Mon, Jun 1, 2020 at 11:19 AM Cayetano Santos<EMAIL_ADDRESS>wrote:

Hi,
Thanks for this great library, I just discovered. Really useful.
I've been performing some tests on the outcomes one may get out of this
just to check I understand the documentation correctly. You may see it
here https://gitlab.com/ip-vhdl/pyvsc-test/-/blob/master/test.py.
As you can see, it's just creating random data and histogramming it. From
the results
here https://gitlab.com/ip-vhdl/pyvsc-test/-/jobs/576046746, I observe
that constraining the variables makes the histogram weird. What am I doing
wrong ?
Thanks !
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/fvutils/pyvsc/issues/5, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAKHLBNQLDHM6ZA43JWHABTRUPWKVANCNFSM4NQBCR6A
.

Sure, feel free to use this code.

Okay, so some good news and (maybe) bad news. I'm able to reproduce the issue, and it actually appears that a project I already had underway to determine the rough actual domain of variables based on constraint expressions will really help with randomness. After applying these changes, here are the histograms I'm seeing for the first three variables:
self.rand_bit_1 histogram is: [95, 105, 118, 103, 129, 116, 120, 106, 108]
self.rand_bit_2 histogram is: [29, 40, 48, 37, 28, 37, 30, 37, 33, 31, 32, 28, 36, 35, 40, 29, 38, 25, 42, 38, 32, 23, 31, 35, 41, 35, 33, 37, 40]
self.rand_bit_3 histogram is: [15, 11, 17, 20, 16, 13, 12, 20, 14, 22, 13, 20, 14, 14, 19, 13, 10, 13, 18, 8, 16, 15, 19, 12, 21, 24, 16, 13, 18, 13, 19, 18, 13, 22, 15, 15, 15, 12, 18, 22, 10, 14, 14, 12, 17, 20, 14, 14, 22, 14, 11, 18, 11, 12, 14, 12, 13, 11, 10, 18, 23, 15, 10, 15, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Clearly, not perfect yet (especially on the third), but getting better.
I'm still working on resolving the last few bugs with this, so it will be a bit (~week or so) before this will be available.
Thanks again for raising this issue!
Best Regards,
Matthew

Hi Cayetano,
Okay, after a bit more work things are looking quite good. The work I had been doing to account for the impact of top-level constraints on reachable domains seems to be resulting in much-better distributions on constrained variables. This code is now available in the Git repository, and available as a 0.0.2 release from PyPi.
Thanks again for raising this issue and providing a testcase!
Best Regards,
Matthew

Much better indeed indeed, thanks !


Automatically update dependencies for samples during releases

This almost worked.
Instead of updating the quarkus langchain4j version it updated the project version itself

I think that the issue is that it uses -pl (that works with artifactId) instead of -f (that works with path).

Let me try to fix that.


generate image doesn't work.

LocalAI version:
LocalAI Version v2.19.4 (af0545834fd565ab56af0b9348550ca9c3cb5349

Environment, CPU architecture, OS, and Version:
debian 12, no gpu, inel core i5

Describe the bug
When I try to use text to image I get the error :grpc process not found: /tmp/localai/backend_data/backend-assets/grpc/stablediffusion. some backends(stablediffusion, tts) require LocalAI compiled with GO_TAGS
This is true with model stablediffusion-cpp or hermes-2-theta-llama-3-8b or any other model I tried - same error
 it seems the version of lama installed doesn't have GO_TAGS
To Reproduce

Expected behavior

Logs

Additional context

For anyone, I'm getting this error:
ERR failed starting/connecting to the gRPC service error="rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial tcp <IP_ADDRESS>:36899: connect: connection refused\""
ERR Server error error="failed to load model with internal loader: grpc service not ready" ip=<IP_ADDRESS> latency=40.033585474s method=POST status=500 url=/v1/images/generations

Checkout the second one: failed to load model with internal loader: grpc service not ready. I have installed from the install.sh, but the same error is raised if I download the binary from github.


If you need a new feature...

Hello
Well, currently due to strange decisions from our (RU) country, i have hard time to find time to do anything with YaPB besides basic bug fixes.
But, there is a fork of SyPB bot (which is itself fork of YaPB) called CS-EBOT, by @EfeDursun125 that is actively (it seems) maintained.
So i believe it's would be good decision to forward global "things" there, especially for custom mods (like zombie) support, and switch to this fork if you need something new, as YaPB is only for classic / csdm modes and not actively updated at this time. I hope author don't mind i have posted this.
Have fun.

Hello first of all
I'm sorry that you are in a difficult situation, I hope your problem is solved as soon as possible, you can continue with the project you are left with, solve all the bot problems because too many topics have been opened.

@jeefo Thank you

The shooting method of the robot is too accurate and difficult. Can you modify it? The robot can easily kill the real player


Mobile web theme

Jaxboards needs a mobile-first design/theme/template. Forums/topics/posts should use all available screen space (no board background).
This should be done purely through CSS / media queries.

We might also want to have IMs be able to exist in their own page? Not sure the window approach really works well for mobile.


[AppCenter Data] Read documents with custom PartitionKey

Describe the solution you'd like
User AppCenter.Data for accessing documents where "PartitionKey" value is different either from "user" or "readonly".
Since Data.ReadAsync<T>(string id, string partition) takes a string value for the partition, it means that I could provide my custom values.
Describe alternatives you've considered
Current alternative is to access CosmosDB directly, avoiding the AppCenter.Data SDK.
Maybe I'm wrong, but there is no meaning on excluding documents with dedicated values for PartitionKey.
Additional context
When I try to read documents with custom PartitionKey value
await Data.ReadAsync<ToDoItem>("document-id", "A CUSTOM VALUE");
I get the following error:
com.microsoft.appcenter.data.exception.DataException: Partition name can be either 'readonly' or 'user' but not 'A CUSTOM VALUE'.

The way our current architecture is set up, collections must use the value PartitionKey, which in turn means we don't support custom PartitionKey values. The current reason we do this is because it enables us to differentiate between private and public documents. The String PartitionKey parameter should either be DefaultPartitions.UserDocuments or DefaultPartitions.AppDocuments.
This is something we can investigate though. Can you tell me more on why custom values are important in your use case and what limitations the current architecture has to you due to lack of custom value capabilities?

Thank you for your answer @Zakeelm.
I don't know which are you architecural desing criteria, but in my case I would like to partition my data based on the user-id without being worried about restrictions: public vs private.
According to the documentation)

The list of all the top restaurants in your area would be visible to all app users. Say you define a top restaurant using ratings and popularity metrics. As this information isn't tied to a specific user and is global, it would be stored in a public document and exist in the public read only logical partition.

and to this other documentation

The partition that the document will live in. You will most likely be using the DefaultPartitions.UserDocuments option to store this within a specific user's partition.
Note
Public documents are read-only.

I can use DefaultPartitions.AppDocuments (i.e., readonly) to put all my data into the public partition, which is accesible to every one.
It means that there is one and only one readonly partition, which will grow very very fast and it will be the biggest partition in my collection (risking also to exceed the limit of 10GB per partition).
According to CosmosDB's statements:

Any field / value can be used for partioning data

In my opinion, it would be easier to allow setting a custom value for the PartitionKey field, without being worried about the privateness and the publicness of the data.
This solution increases the DoF (Degrees of Freedom) on structuring data, also at AppCenter.Data SDK level.
For data publicness / privateness the current approach of concatenation of user- string can still be used. While readonly and other strings can be allowed for further partitions.
Currently I have removed AppCenter.Data SDK from my solution (iOS and Anroid apps), and based everything on DocumentClient.
Nevertheless, I think that my current solution is not very smart, considering that AppCenter.Data SDK has been "invented" for keeping Azure intergration easier.

From our perspective, we believed 10GB per partition was sizable for the average documents. Our recommendation when dealing with potential huge documents is putting the large payload in blob storage and specifying a link to it within the Cosmos DB document.
We also plan on implementing shared documents, which will likely belong in a shared partition. I think this may give you the desired DoF you would like as it can be as "private" or "pubic" as you would like and gives you much more freedom in how we you structure your data.
I do understand completely where you're coming from with the variability of partitions. While we don't have current plans to change our current architecture, I can definitely leave this open for now, and give others the opportunity to give feedback on this as well. If this is something others are interested in, we can definitely investigate this further internally.

@Zakeelm - Shared Documents would address the gap I see in AppCenter.Data for my applications.  However, I did not see this on the Roadmap.  Is Share Documents a planned feature or just a feature under consideration?

@Zakeelm - nevermind.  I just found #864

@baskren Yep! Shared Documents is planned work, would the scenarios outlined in this comment be enough for your use cases or are there additional scenarios you would like to see within shared documents?

Thank you so much for all of your requests. We announced this week in a blog post that we’re retiring the Auth and Data services later this year and recommending customers transition to Azure Active Directory B2C and Azure Cosmos DB instead. Let me know if you have any additional questions about this transition and i'll make sure to get them answered! Closing this issue.


elm-install frequently fails when >1 build is run in parallel

I get this error a lot on my build server:
error: git '--git-dir=/var/lib/jenkins/.elm-install/github.com/elm-lang/html/.git' '--work-tree=/var/lib/jenkins/.elm-install/github.com/elm-lang/html' checkout '1.0.0'  2>&1:fatal: Unable to create '/var/lib/jenkins/.elm-install/github.com/elm-lang/html/.git/index.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.. Use --trace to view backtrace

The problem is easy enough to work around by either:

Making parallel builds run sequentially
Containerizing every build to ensure they do not interfere with each other.

So perhpas it is unfair to rase this as an issue against elm-github-install?
But it would be nice if it were possible to have a centralized cache under ~/.elm-install and for parallel builds to be able to run.

I think understand the problem.

So perhpas it is unfair to rase this as an issue against elm-github-install?

I don't know :smile: maybe it's possible to wait for a process to exit using the git gem but I need to look into that.
If the builds are running in a different directory you can use the --cache-directory flag to avoid this.

I will try the --cache-directory flag to set up each build with its own cache. I made the build serial but it takes too long now, at least that will get it back to parallel. Thanks.


enhancement throw detailed msg for backup or restore (#42288)

Proposed changes
Issue Number: close #xxx

run buildall


[3.5] Fix change to signed shader conditional flags

This change was missing from commit d3d8ccea60fb846a87d221bea659b09c0f46afe1; therefore, it's a fixup for #62226.
Fixes #62243.
And probably #62244.

Thanks!


wezterm flapak no longer builds, with obscure error message

Can you help me figure out what to do about this?
https://github.com/flathub/org.wezfurlong.wezterm/pull/16
https://buildbot.flathub.org/#/builders/5/builds/11888
{
    "errors": [
        "finish-args-unnecessary-xdg-config-access"
    ]
}

is this because I have:
"finish-args": [
    ...
    "--filesystem=home:ro",

The purpose of this is to allow the terminal to read the wezterm config from the home directory.
wezterm also makes use of flatpak-spawn to launch the user's shell in the host system.
What's the path to resolve this?
Thanks!

Why do you need this:
https://github.com/flathub/org.wezfurlong.wezterm/blob/master/org.wezfurlong.wezterm.json#L13

wezterm's config can be found in ~/.wezterm.lua and also in ~/.config/wezterm/. It is my understanding that I need both lines 12 and 13 for the application to read those files from the user's home directory.

it should use the XDG standard directories. This wasn't in the original submission. And the linter didn't enforce it due to a bug.

Could you please spell out for me what action I should take; it has been a long time since I had to read anything about flatpak and I have limited bandwidth.

Hmmm, seems to be this line: https://github.com/flathub-infra/flatpak-builder-lint/blob/707d159fbf23cbec3b3e555553079ac1dd4f6fdd/flatpak_builder_lint/checks/finish_args.py#L38
With the earliest incarnation of this line being here (I think): https://github.com/flathub-infra/flatpak-builder-lint/blob/0dc7f804c156d7682c20530ea7ec4af6e257d64e/flatpak_builder_lint/checks/finish-args.py#L34
But there's no comments or related PR, so I'm not sure why it's not recommended to have
"finish-args": [
...
        "--filesystem=xdg-config/wezterm",
...
    ]

Ah, the footnote 5: https://docs.flatpak.org/en/latest/sandbox-permissions-reference.html

xdg-{cache, config, data} binds mount the paths from host to the per-app sandbox directory. Inside the sandbox $XDG_CACHE_HOME, $XDG_CONFIG_HOME and $XDG_DATA_HOME is set to $HOME/.var/app//{cache, config, data}. So this permission is not needed unless access to the host directory, bind mounted to $HOME/.var/app//{cache, config, data} is desired.

But, for my own use case, it definitely is desirable to have ~/.config/wezterm be mounted as ~/.config/wezterm inside the sandbox, because that way I can switch back and forth between the flatpak version and the distribution-packaged version and the built-from-source-during-development versions and share configuration
I think I saw some mentions of "exceptions" in a few places, do we need to ask for an exception?

Found the process at least: https://docs.flathub.org/docs/for-app-authors/linter#exceptions

But, for my own use case, it definitely is desirable to have ~/.config/wezterm be mounted as ~/.config/wezterm

Then you can make an override for that. I don't see any reason to make that the default.

@bbhtt the user's dot files live in their home directory on the host. They are created by the user. wezterm doesn't write to them unless the user has written some lua to do that explicitly. The user expects them to have paths relative to their home directory, and often hard code additional paths (such as to background images, or their various git repos for workspaces) with home-directory-relative paths.

Can you open a PR for the exception?

@bbhtt done in https://github.com/flathub-infra/flatpak-builder-lint/pull/271, thanks!


FIx scaling of rotated elements

Was möchte wer tun?
As a designer, I want rotated elements to behave in the expected way when I scale them.
Warum möchte man es tun?
To intuitively interact with rotated elements.
Zusätzlicher Kontext
TODO: Someone needs to specify what exactly is expected

Closed because it is already fixed.


Unify ExclusiveSystemParams with normal SystemParams

Objective
Remove ExclusiveSystemParam and ExclusiveFunctionSystem in favor of just SystemParams, and define a system's exclusivity based on its parameters' SystemParam::is_exclusive return value.
Solution

Removed ExclusiveSystemParam, ExclusiveFunctionSystem, and ExclusiveSystemParamFunction.
Changed apply_deferred into a custom System implementation. As a byproduct, this reduces the memory usage of each apply_deferred instance significantly (from minimum 320 bytes to just 4 bytes).

This change is necessary because of the differing implementations of System for FunctionSystem and ExclusiveFunctionSystem.

&mut World, &mut QueryState<D, F>, and &mut SystemState<P> now implement SystemParam.

&mut World registers exclusive access, so it cannot be used alongside any parameter that accesses the world
&mut QueryState and &mut SystemState don't hold access to the world, so can be used alongside it

As SystemParams:

&mut QueryState now will automatically update its archetypes via SystemParam::new_archetype
&mut SystemState will now have its deferred mutations automatically applied via SystemParam::apply

DeferredWorld's init_state was updated to align with &World and &mut World

TODO

Observers cannot be allowed to use &mut World, but this PR in its current state allows it.

We should allow them to use DeferredWorld, however. We should consider splitting "exclusivity" into "structural exclusivity" and "deferred exclusivity".

Decide if &mut QueryState and &mut SystemState shouldn't do their things above automatically.
Consider adding new lints to bevy_lint to tell users not to use two &mut Worlds in a system or &mut World + Query/Res/etc

Testing
Most pre-existing tests are passing currently, will need to add some new ones before merging.

Showcase
Systems with &mut World no longer require it to be the first parameter (or second if using system input). It can now be placed anywhere in the function arguments:
// Before:
fn do_stuff(world: &mut World, local: Local<usize>, query: &mut QueryState<&Foo>) {}
// or
fn do_stuff_with(In(v): In<i32>, world: &mut World, local: Local<usize>, query: &mut QueryState<&Foo>) {}

// Now also possible:
fn do_stuff(local: Local<usize>, world: &mut World, query: &mut QueryState<&Foo>) {}
// or
fn do_stuff(local: Local<usize>, query: &mut QueryState<&Foo>, world: &mut World) {}
// or
fn do_stuff_with(In(v): In<i32>, local: Local<usize>, query: &mut QueryState<&Foo>, world: &mut World) {}
// or
fn do_stuff_with(In(v): In<i32>, local: Local<usize>, world: &mut World, query: &mut QueryState<&Foo>) {}

Migration Guide
TODO

How are you handling parameters like &Archetypes and Query<Entity> that have no Access but still rely on the structure of the world not changing?  That is, a system like
fn do_something(world: &mut World, archetypes: &Archetypes, query: Query<Entity>) {}

would be UB, since the &mut World could change archetypes or add entities.  But those params currently register no access and don't look different from Local, so I think your change might allow them.
I think that's why #4166 had enum WorldAccessLevel.

Added the controversial tag since there was a pr with this approach, but we merged the current approach instead.
You should add tests for the current SystemParams that conflict with &mut World, since that's now a safety concern.

A fun thing this would enable is putting &mut World inside a ParamSet so you can switch between full access and typed parameters.  That's not any more powerful than putting the other params in a SystemState, but it might be more ergonomic in some cases.
Another thing this would enable is adding SystemParamBuilder<SystemState<P>> and SystemParamBuilder<QueryState<D, F>> implementations in the future, which would make it easier to use dynamic queries in exclusive systems.


fix: retry after HasLatestLocally success

I have the exactly same problem as the comments, and sadly it takes me 1 day to get here.

Good catch!


Adding **kwargs to event handlers Interface

Hi Everybody,
while I am playing with justPy it turns out that I find the way additional objects are passed to event handlers a little unpythonic and from an OOP point of view not clean. I personally don't like to take an object (the emitter of the event in this case) as a vehicle to inject other objects into the handler routine in order to gain access to them.
My suggestion would be to go the python way and add the **kwargs to the standard interface of the event handlers and of course pass them from the registering function. The advantage would be a better readability of the code and no mixing or forgotten objects that are bound to other objects that have nothing to do with each other. Furthermore the in my opinion not really advisable practive to use functions inside function for the sake of having access to the former UI objects would not be needed any more.
# from your examples but with an additional button to make clear the difference
import justpy as jp

def my_click(self, msg):
    self.d.text = 'I was clicked'
    print(msg.event_type)
    print(msg['event_type'])
    print(msg)

def event_demo():
    wp = jp.WebPage()
    d = jp.P(text='Not clicked yet', a=wp, classes='text-xl m-2 p-2 bg-blue-500 text-white')
    b = jp.Button(text='Click me', a=wp)
    b.d = d                                     # you often do this, passing the reference of the div tag via the button instance
    b.on('click', my_click)
    return wp

jp.justpy(event_demo)

I would suggest the following changes:
import justpy as jp

def my_click(emitter, msg, **kwargs):                              # add keyword arguments to the interface
    kwargs['mymessagebox'].text = 'I was clicked'            # Reference to the div Tag via kwargs
    print(msg.event_type)
    print(msg['event_type'])
    print(msg)

def event_demo():
    wp = jp.WebPage()
    d = jp.P(text='Not clicked yet', a=wp, classes='text-xl m-2 p-2 bg-blue-500 text-white')
    b = jp.Button(text='Click me', a=wp)
    b.on('click', my_click, mymessagebox=d)      # Add the reference of the dic Tag as arbitrary kwarg
    return wp

jp.justpy(event_demo)

...or with inline event linking like that
def event_demo():
    wp = jp.WebPage()
    d = jp.P(text='Not clicked yet', a=wp, classes='text-xl m-2 p-2 bg-blue-500 text-white')
    b = jp.Button(text='Click me', a=wp, click=my_click, mymessagebox=d)
    return wp

jp.justpy(event_demo)

Or here a function in function example from your sessions example code. You create the event handler inside the WebPage function because you want to access the session_data dict. Of course this can be done, but it is a little hacky.
import justpy as jp

session_dict = {}

def session_test(request):
   wp = jp.WebPage()
   if request.session_id not in session_dict:
        session_dict[request.session_id] = {'visits': 0, 'events': 0}
   session_data = session_dict[request.session_id]
   session_data['visits'] += 1
   jp.Div(text=f'My session id: {request.session_id}', classes='m-2 p-1 text-xl', a=wp)
   visits_div = jp.Div(text=f'Number of visits: {session_data["visits"]}', classes='m-2 p-1 text-xl', a=wp)
   b = jp.Button(text=f'Number of Click Events: {session_data["events"]}', classes='m-1 bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-full', a=wp)
   b.visits_div = visits_div

   def my_click(self, msg):
       session_data = session_dict[msg.session_id]
       session_data['events'] += 1
       self.text =f'Number of Click Events: {session_data["events"]}'
       self.visits_div.text = f'Number of visits: {session_data["visits"]}'

   b.on('click', my_click)
   return wp

jp.justpy(session_test)

...would have the minimalistic change of:
import justpy as jp

session_dict = {}

def session_test(request):
   wp = jp.WebPage()
   if request.session_id not in session_dict:
        session_dict[request.session_id] = {'visits': 0, 'events': 0}
   session_data = session_dict[request.session_id]
   session_data['visits'] += 1
   jp.Div(text=f'My session id: {request.session_id}', classes='m-2 p-1 text-xl', a=wp)
   visits_div = jp.Div(text=f'Number of visits: {session_data["visits"]}', classes='m-2 p-1 text-xl', a=wp)
   b = jp.Button(text=f'Number of Click Events: {session_data["events"]}', classes='m-1 bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-full', a=wp)
   # b.visits_div = visits_div            # OLD
   b.on('click', my_click, session_data=session_data, visits_div=visits_div)      # NEW with objects passed via kwargs
   return wp

def my_click(emitter, msg, **kwargs):             # Not a function in a function anymore, just to access session_data
    kwargs['session_data']['events'] += 1
    emitter.text =f'Number of Click Events: {kwargs["session_data"]["events"]}'
    kwargs['visits_div'].text = f'Number of visits: {kwargs["session_data"]["visits"]}'

jp.justpy(session_test)

Looks not like a big difference, but if you have a lot of reference to be passed into the handler this could improve code readability.  So there would be no more Objects bound to other Object instances that will stay there forever.
The good news is that this would not be very hard to include and at the same time keep complete compatibility to code made with the "glueing objects to objects" approach.
Just a suggestion maybe you consider to make this possible in future code.
Thanks for this great project.
regards
Chris

Thank you for this suggestion. This is an interesting suggestion that I think is easy to implement. I'll take a look an think that I can add this to the next version. The only issue is the inline call to the keyword argument. That needs a different syntax from the one you proposed (to differentiate between kwargs for the event handler and kwargs for the component instance) so I think at first the feature will not be available for inline.

It would be absolutely OK not to implement this for inline event binding. I do prefer the explicit version.
Great that you like the idea. I am looking forward to the next release.
Thank you advance
Cheers
Chris

see #685


more examples in the docs

I've been trying to achieve some fake generator calls and I've spent some time on reading the source code and "trial and error" stuff, e.g. passing undefined-alike parameters to faker.js calls. Or executing RandExp from the schema.
I think the docs could include more examples. What do you think @pateketrueke? Which branch should they be included in? By the way, what is the current state of gh-pages branch - is it a work-in-progress-that-has-been-cancelled-prematurely?

more examples in docs: I think I will put it into the readme.md, because this is the most obvious place to put docs into. But the question is shall I put it on master immediately or shall I put it into develop?
gh-pages: I think I've got an idea. Do you know browserify? I've made a proof-of-concept: https://github.com/tkoomzaaskz/json-schema-faker/tree/online-demo. This could run the jsf in the browser, so that people may use it. This would be a cool feature, a guess. What do you think about that?

more examples in docs

Well, I think we need a CONTRIBUTING.md for some guidelines:

Yes, any PR must be against the develop branch

gh-pages

Surprisingly I did the same: http://json-schema-faker.js.org/ so I think we're in the same channel. :beers:
We can work on a nice UI for that?
I was thinking on:

Semantic-UI/UI-Kit
CodeMirror for editing JSON
Use localStorage for storing schemas/refs
A bulk functionality to download all compiled schemas

I suggest to move the gh-pages UI thing into a separate issue and stay with more examples in the docs here.
Ok, so I'll provide more examples on develop and make a PR...

I created more examples and pushed them into the demo page.
Moreover, I have refactored the demo page a little bit, it's lot less shitty now :) @pateketrueke I know you wanted to rewrite it to react - feel free to do so :) But please reuse my browserify/require-globify solution there. Put simply, it loads all json files in schema dir and makes them available using a function - you don't have to require each schema explicitly - it's handed for you.
PS let me know on your advancements with react.

Since I added some more examples... and this issue was opened for too long, I'm closing it. If anyone feels like adding new examples, feel free to open another issue and/or add new example - now it's easier.


ci: lint runtime modules

In addition to making sure that all the module runtimes are being properly linted, this also ensures that the go.mods are kept up to date!
This is important, so that we don't see these go.mods not reflecting the state of reality (see the report in https://github.com/dagger/dagger/issues/7284, which mis-identifies the source of the issue - the dependency in question was always being installed, but the go.mod wasn't accurately reflecting that).

Test failure is a known panic, current discussion is in discord (private): https://discord.com/channels/707636530424053791/1234820699365969981/1237374164684247100

This is one step closer to replace having to commit all the dagger.gen.go in docs with a function that finds all those directories and lints their modules concurrently.


Man-hours regex matches suggested replacement of "Human-hours"

This rule will trigger itself if you use "human-hours" as a replacement for 'man-hours'
https://regexr.com/5ssh6

Thanks for reporting, I would like to find a way to remove this as the preferred mechanism is for users to provide their own.


typo error

Describe the bug
A typo error of this website of pulsar
To Reproduce
Steps to reproduce the behavior:

Go to http://pulsar.apache.org/docs/en/standalone
Click on 'Deployment > bare-metal-multi-cluster '
Scroll down to 'Provisioning new tenants'
See error

$ bin/pulsar-admin tenants create test-tentant \
  --allowed-clusters us-west \
  --admin-roles test-admin-role

the test-tentant maybe typo test-tenant.  if we can't fix it，it can run normal .

@huangdx0726 would you like to fix it?

em，I'll try.

Thanks for your contribution~


Loading additional ath10k firmware

I am having trouble with a requirement for additional firmware.
The Alpine Linux image that you provide with this deployment apparently requires additional Ath10K firmware in order to get the onboard wireless NIC correctly initialized. From the handy included console, the Linux kernel complains about missing firmware. How does one go about 'injecting' additional Atheros firmware into the provided freebsd-wifibox-appliance.snapshot-<n>.img ?
In case it helps:
The WiFi chip in question is a QCA6174, as reported by both FreeBSD & Linux, although printed on the actual hardware itself it says it is a QCNFA-324 device.
The firmware that gets loaded by Arch Linux for this chip appears to be:
https://github.com/kvalo/ath10k-firmware/blob/master/QCA6174/hw3.0/4.4.1/firmware-6.bin_WLAN.RM.4.4.1-00157-QCARMSWPZ-1
Any pointers on how to get this done would be greatly appreciated.

Currently, injection of any kind of extension over the prepackaged contents is a bit laborious but not impossible effort.  Please study the wifibox-alpine(5) man page to learn how to modify the virtual machine image yourself.  According to the Alpine Linux web site, the necessary firmware files are provided by the linux-firmware-ath10k.
# mount -o remount,rw /
# apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
v3.15.0-161-g8cb73c5080 [http://dl-cdn.alpinelinux.org/alpine/v3.15/main]
OK: 4809 distinct packages available
# apk add linux-firmware-ath10k
(1/1) Installing linux-firmware-ath10k (20211027-r0)
1 error; 323 MiB in 72 packages
# ls -lh /lib/firmware/ath10k/
total 36K
drwxr-xr-x    3 root     root        4.0K Dec 31 10:24 QCA4019
drwxr-xr-x    4 root     root        4.0K Dec 31 10:24 QCA6174
drwxr-xr-x    3 root     root        4.0K Dec 31 10:24 QCA9377
drwxr-xr-x    3 root     root        4.0K Dec 31 10:24 QCA9887
drwxr-xr-x    3 root     root        4.0K Dec 31 10:24 QCA9888
drwxr-xr-x    3 root     root        4.0K Dec 31 10:24 QCA988X
drwxr-xr-x    3 root     root        4.0K Dec 31 10:24 QCA9984
drwxr-xr-x    3 root     root        4.0K Dec 31 10:24 QCA99X0
drwxr-xr-x    3 root     root        4.0K Dec 31 10:24 WCN3990
wifibox:~# ls -lh /lib/firmware/ath10k/QCA6174/
total 8K
drwxr-xr-x    2 root     root        4.0K Dec 31 10:24 hw2.1
drwxr-xr-x    2 root     root        4.0K Dec 31 10:24 hw3.0
wifibox:~# ls -lh /lib/firmware/ath10k/QCA6174/hw3.0/
total 3M
-rw-r--r--    1 root     root      618.5K Oct 29 08:09 board-2.bin
-rw-r--r--    1 root     root        7.9K Oct 29 08:09 board.bin
-rw-r--r--    1 root     root      716.6K Oct 29 08:09 firmware-4.bin
-rw-r--r--    1 root     root      686.4K Oct 29 08:09 firmware-6.bin
-rw-r--r--    1 root     root      590.3K Oct 29 08:09 firmware-sdio-6.bin

And then restart the guest.  Please let me know if that solved the problem for you, so I could include this package in the next virtual machine image.

Yeah, it'd be fun if I could get the image to get any sort of connection to a WiFi AP, but that's the problem. I need the additional / updated firmware in order to connect to a WiFi AP to begin with......
Let's see what I can find out from the manpage.

Aw, yes, you are absolutely right! :-D  Sorry that I completely forgot to consider this possibility.  But I was also under the assumption that you were still able to connect the wifibox guest to the Internet.  But fear not, let me try to help you out with a workaround.
The guest shares its /var partition with the host, which is at /var/run/wifibox/appliance/ on the host.  The required package could be placed somewhere there, for example to cache/apk by downloading directly to there (as root):
# cd /var/run/wifibox/appliance/cache/apk/
# curl -O https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/linux-firmware-ath10k-20211027-r0.apk
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 7558k  100 7558k    0     0  2703k      0  0:00:02  0:00:02 --:--:-- 2704k

Then, on the guest:
# mount -o remount,rw /
# apk add --no-network /var/cache/apk/linux-firmware-ath10k-20211027-r0.apk
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.15/main: No such file or directory
1 error; 323 MiB in 72 packages

It is indeed a chicken-vs-egg-vs-chicken situation.
It is true, the host can connect to a WiFi AP via USB dongle, but without USB passthrough to the Alpine image, one is left just as far afield. Which is why I figured injecting the image as a solution. Good move on sharing the /var partition!
I shall give this a try tonight/tomorrow after recovery from festivities.
But first, happy new-year party time!

This was so easy to get working, that I'm still giggling in astonishment. The only "issue" I have now, is that my efforts into getting the if_athp ath10k driver for FreeBSD to a workable state is being called into question. Given the current state of 80211ac / 80211ax, or rather the lack thereof, wifibox  is a much MUCH better solution.
Out of curiosity, would it be prudent to set a password for the root account of the Alpine Linux disk image? The wifibox console root account doesn't require one, but might that be / become a security issue at all?

You have my many thanks!

This was so easy to get working, that I'm still giggling in astonishment. The only "issue" I have now, is that my efforts into getting the if_athp ath10k driver for FreeBSD to a workable state is being called into question. Given the current state of 80211ac / 80211ax, or rather the lack thereof, wifibox  is a much MUCH better solution.
Out of curiosity, would it be prudent to set a password for the root account of the Alpine Linux disk image? The wifibox console root account doesn't require one, but might that be / become a security issue at all?

You have my many thanks!

Thank you too for testing.  I am glad that my hints worked.  Could you please give me the model of your notebook so I could include it in the compatibility table?  Is this a notebook?
Regarding if_athp development, I think it is still better to have something integrated in the FreeBSD kernel (i.e. the traditional way of porting Linux drivers) because it does not require I/O MMU virtualization and that much resource (since, note that one must run a complete Linux kernel and userland to pull this off).  If I recall correctly, Björn Zeeb has been actively working on the 80211ac / 80211ax stack for the iwlwifi port which will make it easier to import other drivers.  But it has been a long process, and will work for FreeBSD 13 and later only, so wifibox is provided as a temporary aid until it is done and offer something for the older systems.  It can serve a good reference point as well to see "we are there" in terms of stability and performance.
I did not see a reason to set a default password for the root account.  It is not possible to login to the system remotely due to lack of an SSH server or any other similar service, and the console also has to be explicitly enabled and recommended for maintenance only.  Or is there any other attack vector I forgot to consider?

Dell XPS 9380 --- WiFi NIC = QCA6174, and printed onto the actual device is "Killer 1435-S" & "QCNFA324".
A native if_athp driver would be nice to have, but it seems a rather stagnant endeavor at the moment. I've been spending much time debugging and building the source made available by erikarn & Geramy here on github, without much success so far... but even so that would produce a driver incapable of 80211ac nor 80211ax.
Considering how few resources this method with wifibox actually uses, I'd call it superior to any alternative --- USB WiFi dongles etc. I'm using the default settings provided: 1 cpu / 128MB memory, and there's literally no performance penalty.
There was a fair bit of iwlwifi updates sailing by in a recent git pull on base src but we are still a long ways away.
As for the password-less root access to the console, it is probably safe... it would be an extremely niche & desperate case for anyone to try and break into this sort of deployment. Indeed, with lack of any means of gaining access other than a very specific console socket access, makes things virtually inaccessible. The tyrannical sys-admin in me doesn't like password-less accounts in general.
A bit of advice for the man page I can offer, is to include the following instructions particularly for laptop users:

Add to /etc/rc.conf
background_dhclient="YES"
background_dhclient_tap0="YES"
defaultroute_delay="0"

This drastically reduces boot times, so you aren't sitting around for 30+ seconds waiting for a positive link & issuing of an IP. Obviously this only makes sense for those who launch wifibox at boot time & use wifibox as their primary access to network. It even offers a slight benefit to those using static IPs, instead of launching a dhclient, with no waiting on a route.

Thanks for the all resourceful comments and the information for the compatibility table!  I created a separate issue for the advice about the man page, as well as another issue for adding the missing firmware package.  That said, would you mind if I closed this issue?

Go right ahead! I consider this issue fully remedied & very useful to add to the knowledge base.
I do have a new issue, potentially, still doing some extra tests to see what the cause could be... But I'll start a new issue for it because it is totally unrelated to adding additional essential firmware to the Alpine Linux VM image.

Okay, great.

Does this approach still work?
On guest:
wifibox:~# dmesg | grep ath10k
[    0.956388] ath10k_pci 0000:00:06.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[    1.164240] ath10k_pci 0000:00:06.0: Failed to find firmware-N.bin (N between 2 and 6) from ath10k/QCA6174/hw3.0: -2
[    1.164244] ath10k_pci 0000:00:06.0: could not fetch firmware files (-2)
[    1.164245] ath10k_pci 0000:00:06.0: could not probe fw (-2)
wifibox:~# which apk
wifibox:~#

In other words: firmware is required; apk is not present in guest.
alexey@barad-dur:~ $ freebsd-version
14.0-STABLE
alexey@barad-dur:~ $ wifibox version
wifibox version 0.13.0
Disk image checksum: 83ee05a63c76d5cdc18a2441eb30bebe58f4149b1dfe7659ac92eb338cc2cf45

Problem between chair and keyboard, never mind.


feat(federated-learning): configure private google access

Configure Private Google Access for the federated learning use case

This seems overly complex, is there a benefit of doing it all through for_each instead of just creating separate google_dns_managed_zones and google_dns_record_sets?

Not the most straightforward approach, but it avoids a lot duplicated resource definitions.
I've added a few comments in order to make this clearer.
Thanks for your review.

Not the most straightforward approach, but it avoids a lot duplicated resource definitions.
I've added a few comments in order to make this clearer.
Thanks for your review.

To me, it really obscures what resources are actually being created. Creating complex objects to then create resources makes it difficult to follow. Keeping in mind that we are trying to create easily readable and modifiable code for reference and maintainability.
If it is the approach you want to take for the use case, I'm fine with it. I think it would be good to get some additional feedback from another team member.

I can refactor this, there will be some duplication tho.

@arueth Done, PTAL. Thanks.

Thanks, that is much easier to read and understand. When it comes to IaC, especially for reference, I think using WET is better than DRY. 😀


docker{,-rootful}.yaml: Use param in docker templates

based on #2498

docker.yaml: add .param.CONTAINERD_IMAGE_STORE
By passing the --set .param.CONTAINERD_IMAGE_STORE=true option to limactl {create,start,edit}, the .features."containerd-snapshotter" option will be enabled in docker/daemon.json inside the VM.
docker.yaml: add .param.ROOTFUL
By passing the --set .param.ROOTFUL=true option to limactl {create,start,edit}, Docker inside the VM will run in rootful mode.
docker-rootful.yaml: make everything common except for setting .param.ROOTFUL=true in docker.yaml.

Thanks,

Once #2498 is merged, I will rebase onto the main branch and then mark this as ready for review.

Is this still draft?

Could it be that the change to Ready for review will not be notified? I switched to Ready for review.

Updated to apply reviews

Updated PR description:

.param.ContainerdImageStore -> .param.CONTAINERD_IMAGE_STORE
.param.Rootful -> .param.ROOTFUL

Looks super-complicated to me.

Looks super-complicated to me.

param.CONTAINERD_IMAGE_STORE is still acceptable?

For param.CONTAINERD_IMAGE_STORE, refer to this Docker Desktop page.
Enabling this option in a Docker host started with Lima allows building multi-platform images without creating a builder instance using docker buildx create.
The param feature was originally created to make it easy to toggle this option on and off.

Looks super-complicated to me.

Since this option allows you to turn complicated settings on and off with a single option, it’s naturally going to seem complicated.
If the way I've written it makes it look more complicated, I'm sorry, but I don't know how to improve it.

Sorry, I didn't get around to do another round of code review yet; I wrote #2520 instead to explain my general view/vision of where we should be going with this.
I would like to continue to discuss this PR to see if we can't get it into a shape where we agree that having a combined template is better than 2 separate ones. I don't know if we will get there, but I think we should try.

If the way I've written it makes it look more complicated, I'm sorry, but I don't know how to improve it.

You don't have to be sorry, it was a hot day and it felt "too long" - I should have given it a proper review.

param.CONTAINERD_IMAGE_STORE is still acceptable?

I still feel bad about param.ContainerdImageStore, but I was referring to the length of the new templates (doubled).
Switching from Bourne shell to Bash, also takes some getting used to. Simple things like readonly and function.

I'm sorry, but I don't know how to improve it.

I just wanted to let you know that this issue is still on my radar, but I will be offline/travelling until the end of the month and won't have time to look at it again until I'm back.


deployment to maven failed

@imagejan @ctrueden
do you understand what the issue here is?
https://github.com/mobie/mobie-io/actions/runs/3967527353/jobs/6799593543#step:5:395

@tischi The problem is:

Could not transfer artifact org.apache.maven:maven-archiver:pom:3.5.0 from/to central (https://repo.maven.apache.org/maven2): transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/maven-archiver/3.5.0/maven-archiver-3.5.0.pom: Connection timed out

Which suggests Maven Central might have been temporarily overloaded or down, or perhaps blocking the CI's IP address due to anti-abuse automation.
Does it work now if you rerun the build? Not much we can do about Maven Central behavior on our side. If you still have problems, you could avoid the issue by using maven.scijava.org as sole mirror to download all artifacts, and avoid talking directly to Central.

thanks @ctrueden I will keep trying  then (re-ran once and same error).

If the problem doesn't clear up, and you want to try the maven.scijava.org mirror route, the way it works is to make a file ~/.m2/settings.xml on the CI side with contents:
<?xml version="1.0"?>
<settings>
	<mirrors>
		<mirror>
			<id>scijava-mirror</id>
			<name>SciJava mirror</name>
			<url>https://maven.scijava.org/content/groups/public</url>
			<mirrorOf>*</mirrorOf>
		</mirror>
	</mirrors>
</settings>

And then the Maven build will only ask maven.scijava.org for all artifacts.
If you commit such a file to /.ci/settings.xml in your GitHub repository, the ci-build.sh script will automatically copy it to the right place for you upon each build, rather than generating one from scratch. But you would also need to add all this junk to the file as well in order for deploys to maven.scijava.org to continue working.

Now it did build: https://github.com/mobie/mobie-io/actions/runs/3967527353
Seems to have been something temporary...
Thanks @ctrueden for the suggestions!


UHF-5169: import only Helsinki TPR units

Codecov Report

Merging #113 (1737359) into main (09ddbc6) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main     #113   +/-   ##
=========================================
  Coverage     73.50%   73.50%
  Complexity      298      298
=========================================
  Files            39       39
  Lines          1057     1057
=========================================
  Hits            777      777
  Misses          280      280

Continue to review full report at Codecov.

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


Feature request: DHCP leases counter

Hi,
would be nice to have a counter of how many DHCP leases are in use. I am aware that you can gather it by yourself with the CLI but would be convenient to have the summary in the same page as the status.
Thank you for the great job!

will look like this :)

Can we have it per subnet and also in %?


[Feature Request]: Investigate incorporation of MCAD dashboard into ODH dashboard

Feature description
CodeFlare has a fork of odh-dashboard called the mcad-dashboard (https://github.com/project-codeflare/mcad-dashboard). It has diverged a little bit from upstream odh-dashboard, but the main purpose behind it is to provide a front-end for CodeFlare. We should investigate the following:

Is it worth pulling the existing mcad-dashboard into odh-dashboard
What sort of effort would it take us?

cc @adnankhan666 @dgutride
Describe alternatives you've considered
The alternative to reusing the upstream mcad-dashboard would be implementing our own from scratch.
Anything else?
JIRA: https://issues.redhat.com/browse/RHOAIENG-63

This has been migrated to jira: https://issues.redhat.com/browse/RHOAIENG-63