microk8s status --wait-ready improvements

hello
microk8s status --wait-ready can be slightly improved.

when timeout is added (eg microk8s status --wait-ready --timeout 150) it should return non-zero on exit if timed out
it should wait for all addons to be up. For example, if metallb is selected, microk8s says that it is ON. However, I see that pods are not available. (to reproduce just block quay.io in your proxy). So, wait ready really need to wait for all addon pods to start

Thanks for reporting this @beliaev-maksim. I want to provide some more context on this and write down some thoughts that I have been experimenting with. I would like to link this issue with #2572
I think this is related to the "simple" nature of addons as they have been historically implemented in MicroK8s. Currently, MicroK8s does a very simplistic check to see if an addon is enabled: look for a specific resource in the cluster (e.g. a daemonset has been created) or a file in the local node.
This allows microk8s status to quickly determine which addons are "enabled" and which are "disabled". Obviously, this calls for false positives (e.g. if you manually deploy a resource that conflicts with what the respective addon deploys, the addon is shown as enabled).
An important note before moving on: The purpose of microk8s status is to very strictly check whether the MicroK8s cluster is up and running, along with the status of the underlying datastore. microk8s status is not at all involved with whether any particular addon has been enabled properly or is functioning as expected. Further, doing this in a careless manner would lead to bigger issues, since the microk8s enable/disable commands are using microk8s status internally to check that the Kubernetes services are up before proceeding.

I believe that what is described here reads to me more like a readiness check. An addon may be enabled (e.g. the respective daemonset exists) but not yet ready (e.g. the pods have not come up).
Now, a readiness check might vary greatly between addons. For others it might be just a kubectl wait --for=condition=ready $pod, whereas for others like rbac it might be something more involved (e.g. do an apiserver request impersonating a read-only user and expect it to fail.
One more important note, a readiness check is not equivalent to or meant to replace the addon tests. The readiness check should simply probe the respective addon resources and check whether they are ready to serve requests.
To that end, I would recommend two additions:

Allow individual addons to have a ready hook, which executes a readiness check probe (with a timeout). If the addon is ready, the probe is expected to exit with status code 0. For simplicity and backwards compatibility, if an addon does not have a readiness check hook, then it is implicitly assumed to be ready.

Extend microk8s status with a new flag --wait-for-ready-addons=true --timeout=900, set to false by default. If this flag is set, then microk8s status will work as is, but also block (optionally until the specified timeout) until all readiness checks are successful.

This ensures that backwards-compatibility is preserved, and further that we properly support the use case described in the issue without surprises.
Thoughts @beliaev-maksim @ktsakalozos ?

@neoaggelos I support this API like idea with specifying hooks for checks. Then it is up to the addon to provide relevant info
and +1 for additional flag for addons health check. That ensures backwards compatibility. And if we see great use of it, then with the next major version these two could be merged

@beliaev-maksim on your first point of returning
a non-zero code in case the cluster in not ready it should be a fairly easy patch to: https://github.com/canonical/microk8s/blob/f4eaff59f1584f11fceb184d93dedca80de712d5/scripts/wrappers/status.py#L173
Would you be interested in contributing this?

I'm here to support the need or waiting for addons to be ready. There is no easy way to know that the cluster is ready after an addon is enabled. For example configuring upstream DNS address requires restarting dns addon which results in many services (such as controller-manager) restarted as well and I have to wait an undefined period of time before doing operations which depend on the controller manager.
For DNS specifically I use the following workaround right now:
microk8s disable dns && microk8s enable dns:"$DNS_FORWARDERS" &&
    kubectl -n kube-system wait deployments.apps coredns --for=condition=Available --timeout=5m

I'm here to support an option to wait for addons to be ready. There is no easy way to know that the cluster is ready after an addon is enabled. For example configuring upstream DNS address requires to restart dns addon which results in many services (such as controller-manager) restarted as well and I have to wait an undefined period of time before doing operations which depend on the controller manager.
For DNS specifically I use the following workaround right now:
microk8s disable dns && microk8s enable dns:"$DNS_FORWARDERS" &&
    kubectl -n kube-system wait deployments.apps coredns --for=condition=Available --timeout=5m


Noise prewhitening

could be implemented as a wrapper of
https://github.com/ismrmrd/ismrmrd-python-tools/blob/17fe6fbf1bb645112e2ad0023eb4f42afb36421e/ismrmrdtools/coils.py#L9
and
https://github.com/ismrmrd/ismrmrd-python-tools/blob/17fe6fbf1bb645112e2ad0023eb4f42afb36421e/ismrmrdtools/coils.py#L28

Closed by #114


Releases page is missing a lot of the new versions

https://github.com/sebhildebrandt/systeminformation/releases only has up to v5.9.4

@OmgImAlexis forgot to push also tags ...fixed at least for all new versions


Map doesn't show anything

Expected Behavior
Map should appear when opening up index.html after renaming userdata.js and editing it. I am opening it directly and do not have a web server running.
The map from master branch works fine for me when using this method. API key is working fine
Actual Behavior
Map shows a white screen
http://i.imgur.com/nPf4mg1.png
userdata.js
http://i.imgur.com/hlmOI7N.png
Steps to Reproduce
git clone -b dev https://github.com/PokemonGoF/PokemonGo-Bot c:\devtest
pip install -r requirements.txt
git module init
git module update
Fill in parameters into userdata.js.example and rename it to userdata.js
Open index.html
Other Information
OS: Win10
Git Commit: 01de69fa9d889207c1501afbf605db10414e65f0

You need to open another cmd/terminal
and run the following
python -m SimpleHTTPServer
Then navigate to http://localhost:8000


Migrate LDAP images to CentOS 7

Build failures for CDH and HDP images are expected. These will be fixed with https://github.com/trinodb/docker-images/pull/92

Please provide motivation in commit message

@losipiuk done


Leader Board - GitHub Activity - Gamify

Description
Hello Community, I am interested in adding this feature and completing it by next month. The timeframe is intended to give the project a goal so that this part doesn't remain hanging in the air. The feature we discussed earlier involves extracting data from GitHub to create a leaderboard that tracks the projects we have registered. This feature can contribute to and enhance the community by encouraging members to actively participate in open-source projects, fostering collaboration, and providing personal recognition for their contributions. The leaderboard will showcase the top contributors, their commits, merges, and other relevant metrics, creating a friendly competitive environment that motivates individuals to engage more with the projects.
Project Tasks

Project registration to work in a daily loop that will pull the data.
An automatic function that operates daily and pulls the data. The data taken is:

3.1. How many merges
3.2. How many commits
3.3. The time of each action and the time of pulling the data
3.4. Opening issues

UI interface:

4.1. For each user, display an image of the first letter of their name (if possible, take the image from GitHub).
4.2. Create a UI for the leaderboard (including task 5).
4.3. Task 10 also includes additional UI: a button and a success page that includes a back button to the dashboard.

Store the data in the simplest, cheapest, and easiest way to implement.
Pull the data into the application from the data source.
Full types.
Integration tests.
UI page for registering a new project.
Add Project button -> click -> register via GitHub and approve data pulling -> capture the data and pull it automatically once approval is given.
Add several tasks to the data repository once we know what we choose to use.

To facilitate rapid brainstorming, Royi created the following Google Document:
https://docs.google.com/document/d/1vG7yZ4IasVVxfNN_uz5i21caOZTZ2X3OKMQ1hbEeFUQ/edit

I have added a branch called maakaf-leaderboard to merge all the changes over there before we merge it with main. Here is the link:
https://github.com/Maakaf/maakaf-website/tree/maakaf-leaderboard

Is it OK that I've assigned you to this issue?

Update! That's great. We are close to finishing.
Here’s what has been done so far:

Implemented and tested the logic for database merging: GitHub Link
Implemented a design. TBD from the designer.
Database now saves the leaderboard data needed for persistence.


List struct members in order of their declaration

Hi, consider this code
struct S{
int c;
int b;
int a;
};

S s;

When I type s. I see a list of members in a strange way, sometimes it's sorted by member names or in other unknown way. I'd like to see this list in order of member declarations so I can initialize them in the same order. Right now I always need to look at the structure definition to achieve that, it would be nice at least to have some setting to enable such behavior.
P.S. I'm using clangd via VSCode, don't know if Code can affect the way I see that list.

Related to (possibly duplicate of ) #965


Cannot Go to Next Page from The signature Pad. The App Crush

For me this fixed the issue with crashing when going to next activity
class FSignaturePad(context: Context, attrs: AttributeSet) : SignaturePad(context, attrs) {
    override fun onSaveInstanceState(): Parcelable? {
        super.onSaveInstanceState()
        return null
    }

    override fun onRestoreInstanceState(state: Parcelable?) {
        super.onRestoreInstanceState(state)
    }
}

Possible duplicate of #169

We just created a fork and published with the fix keeping the state saving. For use it you should:
Set jitpack.io url on your project's build.gradle
allprojects {
    repositories {
        google()
        maven { url "https://jitpack.io" }
   }
}

and then, add into your depedencies this:
implementation 'com.github.prologapp:android-signaturepad:1.0.0'


Feature: Color contrast checker

Type of Pull Request

[x] Enhancement

Related Issue #s or links (if any):
Fixes #96
Description of Changes
Added a text contrast checking tool in the colors page, similar to the website referenced in the issue. Added the required namespace and tests as well.

[ ]  I think the swap button can fit on the left, which text field should I add it to?
[ ] The text input field's border matches the selected foreground colour, same as the referenced website.
[ ] Can we still have the contrast ratio value in a larger size, as in, change it to a p element and increase the font size?

I'll take care of the remaining changes.

@sushma1031 I'm not sure what you mean by "I think the swap button can fit on the left, which text field should I add it to?"? I mainly just wanted the swap button to not be below the other buttons for that field, does that make sense? Apologies for not being more clear.
The input text makes sense, that can stay as is.
Yes, the contrast text can be larger, the current size is perfectly fine, just the semantics of heading tags does not make sense for that.
Thank you!

I'm not sure what you mean by "I think the swap button can fit on the left, which text field should I add it to?"? I mainly just wanted the swap button to not be below the other buttons for that field, does that make sense? Apologies for not being more clear.

Oh, right, I understood what you mean. The swap button isn't actually part of the text field, its purpose is to allow the user to swap the background and foreground colors, so I thought placing it in between the fields would be appropriate.
Similar to this:

@sushma1031 I see what you mean, maybe it just needs a little more vertical margin to get it away from the other buttons on that field? Whichever you think is best.

Yes, I agree that a little more vertical margin would b better, I'll add the same.

"Normal Text", "Large Text", and "Graphical Objects and User Interface Components" headings should be h3s, not h5s

@dlford I made the mentioned headings h3, and I think they look too large. Can we reduce the font size?

maybe it just needs a little more vertical margin to get it away from the other buttons on that field? Whichever you think is best.

Is this much vertical margin sufficient?

@dlford I made the requested changes, let me know if there's anything else!

@sushma1031 looks great, thank you!


There is a small change, please help to check whether it is reasonable

Change to this

Sorry for the delay on getting back to you on this! It looks reasonable, although in another project I recently noticed some code like this was obsoleted. I will take a look and get a release out!

@ZhangQueque I have two thoughts for you on this:

I found a discussion of your method for generating stronger seeds here. It seems fine, but while some people seemed to indicate that while it may be more difficult to guess a number generated in this manner, it still has flaws. I think generating truly random numbers is a bit of a bottomless pit.
I am genuinely curious about what use case requires these numbers to be less predictable. But not incredibly less predictable.

I am open to this though, even as-is. I just want to make sure whatever change we make is as close to optimal as reasonably possible. And if people are using this for some odd use cases where predictability is an issue, knowing about it might help me accommodate them.

No reply, so I'm closing this.


[BUG] Server pauses when using /team info

What is the bug?
When using /team info <random characters> (/team info aiosjdoidsjfiojfpiokgrgvioperjgrejoij) it pauses the Server's Main Thread for a significant amount of time. This is because the entire command is running on the Main Thread of the Server and not on a different, async Thread to retreive the OfflinePlayer that doesn't exist. And because the OfflinePlayer doesn't exist, it will always continue to work, because it is not being cached. When spamming this command players are able to crash a server without any effort.
Expected Behaviour
It should not pause the Server. Everything should continue as normal and the Team should be retreived on an async Thread.
How to Reproduce

Run Command /team info orifjhwoueishfuojshfuoishedf
Watch the Server lag

Error message
No response
Output of /teama version

Additional Information
No response

Where have you got this plugin download, the version listed in the screenshot does not exist?

I have not downloaded this plugin myself, this is on a public Server called "ArmorUp". I got an admin of that server to do /teama version. They sent me that screenshot with the version

Please could you ask your admins to download the latest version from the betterteams plugin page (see here: https://www.spigotmc.org/resources/better-teams.17129/ ) and check if the issue still continues because the info command should already be run asynchronously (see line 59: https://github.com/booksaw/BetterTeams/blob/af564e388a0201f67a2b3370a13d3bb32dfa98c7/src/main/java/com/booksaw/betterTeams/BooksawCommand.java#L59 )

Alright, he updated it and it is fixed. I just didn't see the async call in the Command file ;p


Add a loaded event

WIP

https://github.com/kklldog/AgileConfig_Client/releases/tag/v-1.6.13
DiscoveryService added a reloaded event

https://github.com/kklldog/AgileConfig_Client/releases/tag/v-1.6.19
done;


updating all analysis.py docs

#202

Pull Request Test Coverage Report for Build 1103

15 of 15 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 98.832%

Totals

Change from base Build 1102:
0.0%

Covered Lines:
1354

Relevant Lines:
1370

💛  - Coveralls

Pull Request Test Coverage Report for Build 1103

15 of 15 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 98.832%

Totals

Change from base Build 1102:
0.0%

Covered Lines:
1354

Relevant Lines:
1370

💛  - Coveralls

Pull Request Test Coverage Report for Build 1103

15 of 15 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 98.832%

Totals

Change from base Build 1102:
0.0%

Covered Lines:
1354

Relevant Lines:
1370

💛  - Coveralls


[feature request] Programming smart feeds

at the moment only 3 Smart Feeds are available in the application, which are created automatically. If you ask me, you need to add the ability to customize new Smart Feeds in the "IF ..." scheme.
For example, if there is a word "Apple" in the headline of a news item, then this news item should fall into a separate Smart Feed created by me specifically for this purpose.

Duplicate of #1038.


My Z-nomp only can support single one worker

When two workers are working simultaneously, after hours one worker would be offline. Then the worker shows 0 sols locally, and the website shows only one worker. Can you guys tell me it's a hardware issue or a software issue? Do I have to upgrade my server's CPU and memory?
My current Server's configuration is:
4 cores CPU with 8GB RAM from Linode

seems fine for me im useing this on my bitcoinz pool and we have some users with 2 or more workers


Add discoveryInfo section for Broker Task

Mesos provides a mechanism for service discovery applications to get the information for specific tasks, for example ports that are used and protocols. Right now kafka framework doesn't use this. I would be really helpful to have this information per broker added, especially now when Kafka <IP_ADDRESS> supports SSL on a different port.
Example:
broker-1 with plaintext for broker-to-broker communication and SSL for producers and consumers , and JMX endpoint for monitoring Kafka with some app inside the cluster
discoveryInfo {
  name: broker-1,
  environment: prod,
  location: us,
  version: <IP_ADDRESS>,
  ports: [{
    name: plaintext,
    number: 9092,
    protocol: tcp,
    visibility: FRAMEWORK  // only for internal framework use
  },{
    name: ssl,
    number: 9093,
    protocol: tcp,
    visibility: EXTERNAL  // for secure message producing and consuming
  },{
    name: jmx,
    number: 9010,
    protocol: tcp,
    visibility: CLUSTER  // for monitoring kafka from inside the cluster
  }]
}

This would be good to-do when we move to the new HTTP API and also move to supporting new Mesos features too. This should be near top of lists to-do with that imho.

Also, it will be very helpful to have ADVERTISED_PORT from broker config to go into discoveryInfo as well, so we can build some proxying on top of that info.


python311Packages.pdunehd: 1.3.2 -> 1.3.3

Diff: https://github.com/valentinalexeev/pdunehd/compare/1.3.2...1.3.3
Changelog: https://github.com/valentinalexeev/pdunehd/releases/tag/1.3.3
Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

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

[ ] Fits CONTRIBUTING.md.

Priorities
Add a :+1: reaction to pull requests you find important.

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

5 packages built:

home-assistant-component-tests.dunehd
python310Packages.pdunehd
python310Packages.pdunehd.dist
python311Packages.pdunehd
python311Packages.pdunehd.dist


2020.2.2f1 import

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots

If applicable, add screenshots to help explain your problem.
Unity details:

Flat Kit version: [e.g. 2.1.3]
Unity version: [e.g. 2020.2.3f1]
Graphics Pipeline: [Bult-in or URP]
URP version (if applicable): [e.g. 10.3.1]
Development OS: [e.g. Windows]

Build platform:

Platform: [e.g. iOS]
Test device: [e.g. iPhone6]

Additional context
Add any other context about the problem here.

HI,
Flat Kit is compatible with the minimum Unity version of 2020.3.21. It is listed on the Asset Store Page.

Could you please update to the compatible version of Unity? If needed, please delete Flat Kit Folder and re-import it as shown in the video here?
If the issue persists, please fill in those info bullet points from the template when you opened the issue ticket. We'll need to know the details to be able to help more.


val() didn't include  disabled + selected item

Version:
Bootstrap: 3.4.1
bootstrap-select: 1.13.18
jQuery: 3.4.1
Actual:
Link:  https://jsfiddle.net/aok54hzc/
Mustard is disabled selected, UI shown it selected and disabled,
But in javascript call $("select").val(), it only return "Ketchup"

<select multiple class="selectpicker">
  <option disabled selected>Mustard</option>
  <option selected>Ketchup</option>
  <option>Relish</option>
</select>

Except:
Either don't select disabled item UI OR return selected item ever it is disabled
PS: If it's html seletct, it only selected non-disabled item https://jsfiddle.net/w1yen67u/1/

But it's made by design. val() isn't a function from this library. It's native jQuery and disabled Items shouldn't return when calling val().

Yep but I think the design could be consistent,
I can select it but I can't it, it's a bit confuse


Request for adding Paulmann Bulb

Hey,
I have a light bulb made by Paulmann (Paulmann 29159) it should have a range of 2200k to 5500k, but in the smartthings app it starts at 2700. with your driver it is unchanged. would it be possible to add the bulb?

this is a screenshot from your thing mc.
the manufacturer is
Paulmann Licht GmbH
Would be really thankful if you could add it :)

Hi,
Added to this driver version
───────────────────────────────────────────────────
 Driver Id    bb1b3fd4-dcba-4d55-8d85-58ed7f1979fb
 Name         Zigbee Light Multifunction Mc
 Package Key  Zigbee_Light_Multifunction_v6.2
 Version      2024-01-18T14:33:49.297802183
───────────────────────────────────────────────────
- id: "Paulmann/CCT"
    deviceLabel: Paulmann Light CCT
    manufacturer: Paulmann Licht GmbH
    model: CCT
    deviceProfileName: level-colortemp-2200-5500

Thank you so much for the quick reply!


Foundation 6 Styles Update

This brings in new styles for Foundation 6-6.2  CSS Framework, updates
numbering and links.
http://foundation.zurb.com/sites/docs/forms.html

Hi, thanks for this.  My feeling is we shouldn't just replace the old foundation 5 stuff.  I would extend the foundation modifier to have a version property that would decide what styles etc to apply rather than assume everyone has upgraded to foundation 6.  This library always needs to be backwards compatible with older versions.

Also please change only the source files.  The files under the 'dist' folder are automatically created by the build.  Thanks!


model property error inside Middleware

Larastan Version: 1.0.3
--level: 5

Description
Working on a package and following error throws when I run phpstan analyser
22     Property 'username' does not exist in Vendor\Package\Models\User model.
24     Access to an undefined property Vendor\Package\Models\Role::$slug.

Laravel code where the issue was found
namespace Vendor\Package\Http\Middleware;

use Closure;
use Illuminate\Http\Request;
use Vendor\Package\Models\User;
use Symfony\Component\HttpFoundation\Response;

class ManagerMiddleware
{
    /**
     * Handle an incoming request.
     *
     * @param Request $request
     * @param Closure $next
     *
     * @return mixed
     */
    public function handle(Request $request, Closure $next): mixed
    {
        $user = User::where('username', $request->user()->username)->first();  // line 22

        if ($user->role->slug !== 'manager') {    // line 24

phpstan.neon.config
includes:
    - phpstan-baseline.neon

parameters:
    level: 5
    paths:
        - src
        - config
        - database
    tmpDir: build/phpstan
    checkOctaneCompatibility: true
    checkModelProperties: true
    checkMissingIterableValueType: false

@vishytk Thank you for your report.
Larastan read model properties from migrations.
Do you have that in place for User and Role tables?

Hmm... in my application, the User and Role migrations belongs to a different package and are loaded from tests/TestCase.php

If you have it in database/migrations/ Larastan will read it.
https://github.com/nunomaduro/larastan/blob/master/tests/Application/database/migrations/2020_03_25_000000_create_roles_table.php#L20

Oh... like I mentioned, the migrations my case belongs to a different package.
I guess, I can simply ignore the error.

I guess, I can simply ignore the error.

If this is a Composer package for Laravel it should care about its data structures.
Please add migration here or temporarily copy migrations to aid static analysis.

I have copied the migrations for now.

thanks


avoid unnecessary polling in select()

I was testing some code and noticed that futures were being polled a lot more frequently than I expected.  It looks like this was due to my use of the select*() functions: the select*() functions poll all futures any time any one of them wakes up.  If you end up with a "tree" of selects, where one branch of a select call ends up making additional select calls, then the entire tree of futures is polled any time any one of them is woken up.  It seems like the same issue probably exists for join()
Fixing this seems like it would probably be complicated, but I figured I would open an issue just to explore possible options.  I believe that select in other async frameworks like tokio don't have this problem.
It seems like in order to fix this we would need a few different things:

I assume select() would need to explicitly cooperate with the current executor to schedule the children futures basically as separate tasks.  This means select() would need to be able to get the current executor.  I assume we could keep a reference to the current executor in a global variable, and have each Executor update this variable when it starts running, and restore it when it returns.  On multi-core chips like esp32 we could have an array indexed by CPU ID rather than just 1 global variable.
The select() functions would need (pinned) local variables to keep task headers / task storage for each of the children tasks for them to use while they are running.  I see comments in the executor code that TaskStorage objects must live forever, but I didn't really see exactly why this needs to be true.  If we had TaskStorage objects stored on the stack we certainly would need to implement Drop for them, to remove them from the run queue when they are dropped, but I'm not sure if there are other challenges that would make this impossible.
Functions like block_on() might need to be made smarter, and have more of a real executor that can track a run queue.  Alternatively we could still have select() fall back to the naive implementation if there is no current executor set in the global variable.

I believe that select in other async frameworks like tokio don't have this problem.

They do, join/select works like this everywhere.

I see comments in the executor code that TaskStorage objects must live forever, but I didn't really see exactly why this needs to be true

Wakers contain a pointer to the TaskStorage, and wakers can live forever. Deallocating a TaskStorage would leave dangling pointers.
(Other runtimes refcount the task storage, deallocating it when the task has exited AND all wakers pointing to it have been dropped. We can't do that because we don't have alloc).

What you're describing is sort of how FuturesUnordered works. It's sort of a "sub-executor", it creates separate wakers for each "sub-task", so it knows which one needs polling when polled by the "parent" executor.
I don't think something like this is doable without alloc though.

They do, join/select works like this everywhere.

I had tried testing tokio with the following code, and didn't see this behavior, but maybe I am misunderstanding and didn't get it right it somehow:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=00831a8b17dacef22bd5113b06974c19
With equivalent code in embassy I see task1 and task2 woken up every time the periodic task wakes up.

Wakers contain a pointer to the TaskStorage, and wakers can live forever.

Ah, that makes sense.  Yes, that seems difficult to avoid without alloc.
I suppose one possible option would be to have a separate storage space for this (at which point you are basically implementing alloc, although it could be a pretty simple pool allocator since everything is fixed size).  In this separate storage space you could keep an entry for each task which is basically a (refcount, task pointer), and the task could reset its pointer to null when the task is dropped.  The downside is that you would need to specify the size of this storage pool at compile time.  If you run out of space in this table at runtime, select() could always fall back to the naive approach (although this adds complexity by having 2 code paths).  I suppose the added overhead and complexity of this approach might not be worthwhile, though.
Thanks for the feedback!

if you add a println to poll() you'll see every time periodic_loop() requests a wake, all 3 futures get polled:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=8f3f5eb1921d24ae67f10209c21b5b25


POST/GET command not found when used in Bash script

Hi Micha
First of all thank you for developing resty.
I'm trying to write a bash file to automatically execute some steps, but if I execute each command in a terminal everything works fine, but in bash all my POST/GET commands fail with the message command not found....
I read up online about PATH settings that could be causing this, I read on github the examples and everything seems perfect to me, and still it's not working....
#!/bin/bash

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin

source /sbin/resty 'http://abu/api'

POST /login '{"username" : "report", "password" : "XXXXXXXX"}' | jshon -e auth_token -u

I added the PATH manually just to make sure it's correct, and for security reasons I replaced the real password with XXXX
If I would execute ./checkben.sh the output would be:
./checkben.sh: line 11: POST: command not found
warning: nothing to read
If I would execute each command manually at the terminal the output would be:
djA6MDUwNzc3MzMtZjg5OC00YTdiLWI2OGQtNGUzMDgzMjg5ODVhOjM3Oi91c3IvYnAvbG9ncy5kaXIvZ3VpX3JlcG9ydC5sb2c6MA==
Which is EXACTLY what I needed, so it is working fine at the terminal prompt....

Try to expand aliases in the shell.
This works for me.
#!/bin/bash
shopt -s expand_aliases

Bernd


Does NGT support query on ARM?

Does NGT support query on ARM?

NGT doesn't have a PyPI package for ARM. On this occasion, I tried to build NGT on the following environments.

Raspberry Pi 3 Module B
Ubuntu Mate 16.04 and 18.04

NGT library could be built without any updates on the both versions. NGT python could be built with a few updates on setup.py.


Scalability of Channels (Pub/Sub)

I'm building a real-time text based chat program where people can chat with ONLY 1 other person.
Each person can chat with 1 other person, but the aim is they can chat with Many people at once. (i.e. MANY one to one chats with different people). The aim is to have it scaleable, not necessarily to snapchat's level, but enough for 1 City.
I'm just wondering what is more scaleable:

Having 1 channel for the entire application and filtering who the message is for and who sent the message based on the data encoded in the message

OR

Having 1 channel for each person and all the different people sending messages to that person send their messages through that channel with data encoding who sent the message

OR

Have an individual channel for EACH Chat between 2 people.

OR

For Option 1 (1 channel for entire app), perhaps an intermediate solution of having 1 channel per city.

I'm wondering what approach is best for Java and Redis. If there is no clear cut answer, what the conditions/criteria are for making the decision.

If option 2, the viability of having 1 subscriber connection listening to all relevant channels rather than a different connection per channel

Serve one City of people? Lets assume there are N people in a city to enable the to chat with as many as you can on a one to one session, you would have as many as N*(N-1)/2 sessions if I have done my math right. This number could be quite large.
You have to consider how busy the system is going to be, at its busiest times. Of course you won't realistically expecting all of them starting to send message to N-1 people at the same time. You would still need to project a busiest scenario where a lot of people could be sending messages to a number of others in a short period time. This would be a prediction of the maximum message/sec work load, Mps.
The reason I am emphasis this is, when you architecting you application, you need to understand the way redis cluster distributes pub/sub messages from one client to another: As of redis 3.2.1, each pub/sub message is broadcasted to all other cluster node, which may become a bit problem when the Mps is a large number.
You could consider using blocking queue as an alternative to pub/sub, which can be a better solution for a few good reasons: First, message goes in and out of a blocking queue is happening to just one redis node.  Second, message is sequential and can be persisted. Three, you could even keep a historical log with very little effort by using BRPOPLPUSH command.
To demonstrate what I mean, lets assume you have a client A and a client B, you then create a blocking queue named A=>B as the name suggests it is a queue for A send message to B, A LPUSH to the queue and B can RPOP from it. The same for B send message to A, you may have another queue for B=>A .

Thanks @jackygurui
When someone writes a message, I immediately save to nongod but database.
With blocking queue would each currently logged in subscriber have to continually poll the queue rather than it getting pushed like in pub sub?

If the queue is empty, a client is blocked on a queue and wait until a message is available. You need to re-block to receive another message. You can have multiple thread to block on the same queue to process message from A to B, for instance, when the Mps rate is very high, and perhaps reduce it down when it is less busy.

Also you should take in account that complexity of publish operation is O(N+M) http://redis.io/commands/publish So as many peoples you have in a chat as heavy publish process will be.


Fix strategy #redirect! when url string is frozen

When working on a custom Devise login strategy I found that passing a frozen url throws a 'can't modify frozen string' error.
redirect! Figaro.env.some_url
I fixed it by #dup'ing the string before calling:
redirect! Figaro.env.some_url.dup
but I think it's better to do this inside the library.

This probably is not something we want to incorporate into warden itself as its caused by Figaro returning a frozen hash. Your solution is the correct one dup before calling warden redirect.
I appreciate the PR though, let us know if we can help out.


build backend - issue with license metadata element

I'm on uv 0.5.8 (80d41671b 2024-12-11). Update: I also tried this on uv 0.5.9 (0652800cb 2024-12-13) and got the same results.
I created an example project and added a dummy license file to it with:
$ uv --preview init xyz --build-backend uv
$ touch xyz/LICENSE

I'm not sure if there's an interface through uv to add metadata to pyproject.toml, but I added the following license declaration under the [project] section:
license = { file = "LICENSE" }

Then, I got the following error with builds:
$ uv --preview build
Building source distribution (uv build backend)...
Building wheel from source distribution (uv build backend)...
  × Failed to build `/Users/cthoyt/Desktop/xyz`
  ╰─▶ failed to open file
      `/Users/cthoyt/Library/Caches/uv/sdists-v6/.tmp5tXXVU/xyz-0.1.0/LICENSE`: No such
      file or directory (os error 2)

Interestingly, the following works, which doesn't try building the wheel from the sdist:
$ uv --preview build --sdist --wheel
Building source distribution (uv build backend)...
Building wheel (uv build backend)...
Successfully built dist/xyz-0.1.0.tar.gz
Successfully built dist/xyz-0.1.0-py3-none-any.whl

If I trade the license declaration for the following, it works.
license-files = [
    "LICENSE"
]

However, it's not clear if this is because the license element of the metadata is deprecated, or if there's a bug in handling it. I am aware that the metadata versions and the license declarations are currently a sore spot, so thanks for any advice :)

We recommend using the PEP 639 license = "<SPDX expression>" and license-files = ["LICENSE"] declarations, however the old behavior is definitely a bug (#9965)!