feat: Use CircularQueue replace Array

CircularQueue are much faster than arrays, even if the length of the array is small (eg: 1,2)
event: Array#1 x 291,168 ops/sec ±0.29% (94 runs sampled)
event: Circular#1 x 2,745,702 ops/sec ±0.66% (92 runs sampled)
event: Array#16 x 2,701 ops/sec ±0.26% (97 runs sampled)
event: Circular#16 x 13,064 ops/sec ±0.77% (95 runs sampled)
event: Array#2 x 295,289 ops/sec ±0.25% (95 runs sampled)
event: Circular#2 x 1,248,051 ops/sec ±1.06% (96 runs sampled)
event: Array#32 x 2,654 ops/sec ±0.48% (96 runs sampled)
event: Circular#32 x 13,160 ops/sec ±0.18% (98 runs sampled)
event: Array#4 x 269,338 ops/sec ±0.26% (95 runs sampled)
event: Circular#4 x 1,264,973 ops/sec ±0.25% (96 runs sampled)
event: Array#64 x 2,440 ops/sec ±0.54% (97 runs sampled)
event: Circular#64 x 13,031 ops/sec ±0.69% (97 runs sampled)
event: Array#8 x 262,999 ops/sec ±0.27% (96 runs sampled)
event: Circular#8 x 1,275,477 ops/sec ±0.26% (93 runs sampled)
event: Array#128 x 2,241 ops/sec ±0.21% (95 runs sampled)
event: Circular#128 x 13,078 ops/sec ±0.35% (98 runs sampled)

CircularQueue are much faster than arrays, even if the length of the array is small (eg: 1,2)
event: Array#1 x 291,168 ops/sec ±0.29% (94 runs sampled)
event: Circular#1 x 2,745,702 ops/sec ±0.66% (92 runs sampled)
event: Array#16 x 2,701 ops/sec ±0.26% (97 runs sampled)
event: Circular#16 x 13,064 ops/sec ±0.77% (95 runs sampled)
event: Array#2 x 295,289 ops/sec ±0.25% (95 runs sampled)
event: Circular#2 x 1,248,051 ops/sec ±1.06% (96 runs sampled)
event: Array#32 x 2,654 ops/sec ±0.48% (96 runs sampled)
event: Circular#32 x 13,160 ops/sec ±0.18% (98 runs sampled)
event: Array#4 x 269,338 ops/sec ±0.26% (95 runs sampled)
event: Circular#4 x 1,264,973 ops/sec ±0.25% (96 runs sampled)
event: Array#64 x 2,440 ops/sec ±0.54% (97 runs sampled)
event: Circular#64 x 13,031 ops/sec ±0.69% (97 runs sampled)
event: Array#8 x 262,999 ops/sec ±0.27% (96 runs sampled)
event: Circular#8 x 1,275,477 ops/sec ±0.26% (93 runs sampled)
event: Array#128 x 2,241 ops/sec ±0.21% (95 runs sampled)
event: Circular#128 x 13,078 ops/sec ±0.35% (98 runs sampled)

A simple benchmark
https://github.com/ahaoboy/CircularQueue-benchmark/blob/main/q.ts

I'm not convinced to merge this with extra complexity and bundle size. I also don't recommend using size option. But I agree there would be some better implementation than arrays or even CircularQueue.
I'd be curious to see if this changes the real performance of apps. For example, js-framework-benchmark.
Closing this for now, but your interest and suggestion is really appreciated. We may consider this in the future.


Projection screen is coming off the roll

I had a meeting after okcpy today, otherwise I would have spent more time on it, but the screen is not in a state in which it can be rolled up without damaging it.  So I didn't roll it up.
Pinged @amandaharlin on slack for possible people coordination to get it fixed, since I have no idea who would have that knowledge/ability.

yeah i heard about this. huge bummer. may just need to get a new one, its been getting worse and worse

board meeting is on tuesday. we could vote to get one then. i'm certain
it'll pass.
On Fri, Apr 15, 2016 at 5:09 PM, Jesse Harlin<EMAIL_ADDRESS>wrote:

yeah i heard about this. huge bummer. may just need to get a new one, its
been getting worse and worse
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/techlahoma/techlahoma/issues/86#issuecomment-210665089

I didn't find anything in the board meeting minutes regarding the projector. Is the plan to still order a new projector screen?

the groups have started using the nice tv's prototek installed. since we'll likely be moving within the next couple of months i think the plan is to purchase the projector and install it at the community hub.


fix columns indexes to order segment array, add missing column to REG…

…ISTER_MIRROR function result
There are two problems in the double-reverted commit https://github.com/arenadata/gpdb/pull/81/commits/91771f4f34bfd48bff75393928b05bb0e91227c7
in the 6.8.0 release.
First of all, there are not fixed columns indexes used for array reordering.
The mentioned commit adds hostname as the first column.
So we should increment column indexes for port and content id.
Then we should fix REGISTER_MIRROR function one more time to take into account this new column.
Otherwise, we get content-id mismatch error because there are different columns count
for primary and for mirror during mirror creation.

@darthunix, do you mean new PR into master branch which wanted by pivotal guys?


Union of 2 arrays in python

Aim
Given two sorted arrays, find their union.
Example:
Input : arr1[] = {1, 3, 4, 5, 7}
arr2[] = {2, 3, 5, 6}
Output : Union : {1, 2, 3, 4, 5, 6, 7}
What is the objective of the Script
It finds the union of two sorted arrays.
Programming language

[ ] C
[ ] C++
[ ] Java
[ ] Python

Can I do it in python ?

I want to do the program kindly assign me the work .

Can it do the same code in C ????


feat(picker-button): show default button icon if right addon exists

BREAKING CHANGE: При наличии правого аддона, дефолтная иконка кнопки не исчезает

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.003%) to 81.498%

Totals

Change from base Build<PHONE_NUMBER>:
-0.003%

Covered Lines:
6802

Relevant Lines:
7642

💛  - Coveralls

Добавь демку, пожалуйста


AstroChart - V3

This new version aims to make some improvements in tooling and internal improvements:

[x]  #18
[x] Add linter
[x] #22
[x] #19
[x] #13
[x] Publish cdn (https://unpkg.com/@astrodraw/astrochart)
[x] Add lint
[ ] Check methods from SVG that depends from settings (segment, line, circle)

Replicate contributions from v2:

[x] #25  commit
[x] #26  commit

Branch: v3-dev

@afucher Hey, what is current status of this new version?

Hey @jeferson-sb , it is still in progress, but I'll probably finish it in the next year. My daughter was born, so I'm giving less focus here in the project.
In this branch you can find the latest version, I'm using it in a personal project and it was working good. If you want to test it, please feel free.
Also, it is already published in the NPM.
Are you planning to use it in a project?

@afucher yes, I was really looking for a package version of it, good to know there is some progress already on npm :)
Also, congrats on the birth of your daughter! <3

thanks @jeferson-sb :)
Can you share the project? I'm curious about where this library is being used.
Also, with the v3 I started the https://github.com/AstroDraw/astrodraw.github.io, and there I'm using the npm version.

@afucher it's a project for a company I'm working at. https://soulloop.com/
I got it working just on our internal dashboard and stuff, but I might have to look for a react-native option to use in the app.

Just released the v3.0.0-rc1, please checkout https://github.com/AstroDraw/AstroChart/discussions/39

Main branch now is with the v3 version. (v3.0.0-rc5 already on npm).
Soon will release the final v3.0.0 version, and close the issue.
Please let me know, if someone find any issue


LIONSIMBA paper performance comparisons

Hi,
Thanks for developing this MATLAB toolbox for the p2d models.
I have a question about Table VIII in the paper (it compares the performance between LIONSIMBA, DUALFOIL and COMSOL). Are the LIONSIMBA simulations run with the full order solid phase diffusion model or the two parameter/ three parameter approximation model ?

Hi!
The comparison was carried out considering the models in the same conditions, and therefore the full-order (Fick's) model was used in all the simulations.


Unable to locate factory with name [default] [App\Modules\User\Models\User].

Laravel 5.6
Caffeinated 4.3
UserTableSeeder App/Modules/User/Database/Seeds/UserTableSeeder.php
<?php

namespace App\Modules\User\Database\Seeds;

use Illuminate\Database\Seeder;
use App\Modules\User\Models\User;

class UserTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        factory(User::class, 3)->create();
    }
}

UserFactory App/Modules/User/Database/Factories/UserFactory.php
<?php

use Faker\Generator as Faker;

use App\Modules\User\Models\User;

/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| This directory should contain each of the model factory definitions for
| your application. Factories provide a convenient way to generate new
| model instances for testing / seeding your application's database.
|
*/

$factory->define(User::class, function (Faker $faker) {
    return [
        'name' => $faker->name,
        'email' => $faker->unique()->safeEmail,
        'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
        'remember_token' => str_random(10),
    ];
});

UserDatabaseSeeder App/Modules/User/Database/Seeds/UserDatabaseSeeder.php
<?php

namespace App\Modules\User\Database\Seeds;

use Illuminate\Database\Seeder;

class UserDatabaseSeeder extends Seeder
{
    public function run()
    {
        $this->call(UserTableSeeder::class);
    }
}

User App/Modules/User/Models/User.php
<?php

namespace App\Modules\User\Models;

use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable
{
    use Notifiable;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'name', 'email', 'password',
    ];

    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = [
        'password', 'remember_token',
    ];
}

When I run

php artisan module:seed

I get the following:

Seeding: App\Modules\User\Database\Seeds\UserTableSeeder
InvalidArgumentException : Unable to locate factory with name [default] [App\Modules\User\Models\User].

#95 didn't work for me.

Laravel autoload database/factories via composer, caffeinated/modules not
it is necessary to load those files as with the config files in the ModuleServiceProvider

@arthvrian
What needs adding to the ModuleServiceProvider exactly? Having the same issue.
Thanks

@fordster78 I just send a PR to fix this, see #370


Module instance for (new) Rational

Describe the feature you'd like
This is pending the landing of #4284. As requested, the optimized Rational ought to have a Module instance. This not only makes sense mathematically, but would likely lead to smaller on-chain code than the 'manual' alternative.
Describe alternatives you've considered
Currently, you can do the same as scale using other operations, but this is less efficient than it should be in terms of code size, and really shouldn't be necessary anyway.

Whoops, realized I'd already added it.


use service decoration to find and display links in messages CORE-10191

(Ignoring CI on this, failure in kbfs-server)


Help option does not work in sub-module command

Since 2.0.10, Yii2 add a help option for command controllers by default, but when the command is in submodule, that dose not work.
Fixing this is very simple, just modify yii\console\Controller#L125,
change $this->id to $this->uniqueId.

thanks for reporting this, do you want to send a pull request to fix it?


plutus-tutorial: Improvements

Add a new document on the guessing game
Simplify the crowdfunding doc

Added some more bits on Template Haskell and the emulator.

I moved the .md files that rely on the markdown-unlit tool to a separate test suite in the cabal file, because these don't work on Windows/WSL due to symlinks. With the new structure you can run nix-shell in the tutorial project and cabal repl gives you the Haskell modules for the parts of the tutorial that are meant to be done in GHCi.

I'll merge this soon if the build passes now, just so that it's easier to find if people start looking for it tomorrow

If the symlinks are a problem, why not just switch the direction? i.e. have the .md link to the .lhs. That should work just as well, and then the only thing that won't work on WSL is the readme being a file, which should be fine.

that's a good idea actually!


feature: Add _document.tsx for accessibility reasons

Is your feature request related to a problem? Please describe.
To add a _document.tsx in order to override the default nextjs document and implement a lang attribute. This will reach 100% accessibility in lighthouse since, by default, there is no html with lang.
Describe the solution you'd like

import { Html, Head, Main, NextScript } from "next/document"

export default function Document() {
	return (
		<Html lang="en">
			<Head />
			<body>
				<Main />
				<NextScript />
			</body>
		</Html>
	)
}

Very small implementation for perfect scores in every category in lighthouse. big flex 😎

This is not that simple as a user may have their own plans for HTML localization. Create-next-app doesn't even include this :(
Also generally better to set in next config not document fwiw

I did have a setup in next.config.js pertaining to localization but it had no effect even though it should accomplish what was initially needed. I haven't looked under the hood on how the two work but prolly is something that is more of a waste of time.

And this is just to pass with perfect scores in lighthouse. I'm sure devs will modify this to their liking and needs


TOTP gives wrong password for big date

TOTP gives 7-digit password for 2603-10-11 11:33:20 UTC, 8 digit and 30 seconds. Maybe the first digit is null, or the RFC has error in this.

This is not a bug. 7 digit number you got is just a 8 digit password with 0 as most significant number.


Not a way to set transparency with colors in config

Currently there is not a way to set the transparency of a color when changing colors in the configuration. This seems to be an issue with substance not having the transparency slider. We also do not store alpha values in config which would also need changing.

Based on this reply https://github.com/kirill-grouchnikov/substance/issues/84 we need to build Substance without it's custom color picker. Looks like profile for building it without is here: https://github.com/kirill-grouchnikov/substance/blob/master/build.xml#L127 . Maybe @Adam- can deploy substance without classes mentioned there?


Removing a group membership removes ALL memberships, destroying group hierarchies

What version of UAA are you running?
4.8.3
How are you deploying the UAA?
Official Maven JAR from Maven Central
What did you do?
High Level
If you have the following setup:

User is member of g1
User is member of g2
g1 is member of g2

And you remove the User from g2, then also(!) g1 is removed(!) from g2. Additionally, a strange error message is thrown.
Low Level (aka how to reproduce)
Setup:
uaac user add bug_tryout_user --emails<EMAIL_ADDRESS>-p user1235678
uaac group add bug_tryout_g1
uaac group add bug_tryout_g2
uaac member add bug_tryout_g1 bug_tryout_user
uaac member add bug_tryout_g2 bug_tryout_user
uaacAddMember bug_tryout_g2 bug_tryout_g1

Check Everything is correct:
$ uaac group get bug_tryout_g2
  id: d0e141e0-af2c-4766-95c0-32603d0e8002
  meta
    version: 1
    created: 2018-02-05T15:58:45.650Z
    lastmodified: 2018-02-05T15:59:28.929Z
  members:
  -
    origin: uaa
    type: GROUP
    value: 16869688-7032-4567-9cb3-17c405f642b6
  -
    origin: uaa
    type: USER
    value: 7d8ddb46-4853-42f7-be37-a53fe3a3e4e9
  schemas: urn:scim:schemas:core:1.0
  displayname: bug_tryout_g2
  zoneid: uaa

$ uaac group get bug_tryout_g1
  id: 16869688-7032-4567-9cb3-17c405f642b6
  meta
    version: 1
    created: 2018-02-05T15:58:41.270Z
    lastmodified: 2018-02-05T15:59:09.576Z
  members:
  -
    origin: uaa
    type: USER
    value: 7d8ddb46-4853-42f7-be37-a53fe3a3e4e9
  schemas: urn:scim:schemas:core:1.0
  displayname: bug_tryout_g1
  zoneid: uaa

$ uaac user get bug_tryout_user | grep try | grep display
    display: bug_tryout_g2
    display: bug_tryout_g1

Remove the association
Observe the error message which is already unexpected
$ uaac member delete bug_tryout_g2 bug_tryout_user

error response:
{
  "error_description": "User 16869688-7032-4567-9cb3-17c405f642b6 does not exist",
  "error": "scim",
  "message": "User 16869688-7032-4567-9cb3-17c405f642b6 does not exist"
}

Observe the desaster
The g2 group has lost all its members:
$ uaac group get bug_tryout_g2
  id: d0e141e0-af2c-4766-95c0-32603d0e8002
  meta
    version: 3
    created: 2018-02-05T15:58:45.650Z
    lastmodified: 2018-02-05T16:02:25.825Z
  members:
  schemas: urn:scim:schemas:core:1.0
  displayname: bug_tryout_g2
  zoneid: uaa

What did you expect to see? What goal are you trying to achieve with the UAA?
I expected that only the association between the user and g2 gets removed
What did you see instead?
g2 looses all its members.

I suspect this might be a bug in the uaac and not in the uaa. If I delete the membership through the API endpoints directly, I'm not able to reproduce this. This is quite servere.

Hi @theomega  thanks for creating this issue.
Hmm this gets even a little more strange, because I tried the above with uaa 4.11.0 & UAAC 4.1.0 and I was unable to reproduce. Can you confirm this is still an issue with newer version of uaa?
$ uaac group get bug_tryout_g2

  id: 0adc8b19-0909-46c8-b4a4-4200212212e2
  meta
    version: 1
    created: 2018-03-29T02:40:55.864Z
    lastmodified: 2018-03-29T02:40:56.921Z
  members:
  -
    origin: uaa
    type: GROUP
    value: ae4ffbea-3e24-4daf-85f0-30c39bf4d4a4
  -
    origin: uaa
    type: USER
    value: e5530978-19d2-48db-8f13-25789c31ac05
  schemas: urn:scim:schemas:core:1.0
  displayname: bug_tryout_g2
  zoneid: uaa

$ uaac member delete bug_tryout_g2 bug_tryout_user
success

$ uaac group get bug_tryout_g2

  id: 0adc8b19-0909-46c8-b4a4-4200212212e2
  meta
    version: 2
    created: 2018-03-29T02:40:55.864Z
    lastmodified: 2018-03-29T02:49:24.035Z
  members:
  -
    origin: uaa
    type: GROUP
    value: ae4ffbea-3e24-4daf-85f0-30c39bf4d4a4
  schemas: urn:scim:schemas:core:1.0
  displayname: bug_tryout_g2
  zoneid: uaa

Hi @DennisDenuto
I tried this again with UAA 4.11.0 & UAAC 4.1.0 and I could NOT reproduce this error.
I think we can close this one.


Allow passing --show-secrets flag to helmwave diff

Is your feature request related to a problem? Please describe.
Currently helmwave diff doesn't support --show-secrets flag
We can set the functionality by passing HELMWAVE_DIFF_SHOW_SECRET env var, but that would be great to have a similar way to control the behaviour in different actions
Describe the solution you'd like
allow running helmwave diff <smth> --show-secrets=false

It is already supported:
❯ helmwave version
0.24.1
❯ helmwave diff --show-secret=false live |& grep redis-password
-   redis-password: '-------- # (10 bytes)'
+   redis-password: '++++++++ # (10 bytes)'
-   redis-password: '-------- # (10 bytes)'
+   redis-password: '++++++++ # (10 bytes)'
-   redis-password: '-------- # (10 bytes)'
+   redis-password: '++++++++ # (10 bytes)'
❯ helmwave diff --show-secret=true live |& grep redis-password
-   redis-password: "ODNxcVJIdDlvWQ=="
+   redis-password: "SWY5WmR4RWxJTA=="
-   redis-password: "TUdJc0R5WjNwWg=="
+   redis-password: "QTE3WUFscHZkeQ=="
-   redis-password: "OXpUSEFhZWllZQ=="
+   redis-password: "R1RlS3d6aDU1ag=="
❯ helmwave diff live |& grep redis-password
-   redis-password: "ODNxcVJIdDlvWQ=="
+   redis-password: "SWY5WmR4RWxJTA=="
-   redis-password: "TUdJc0R5WjNwWg=="
+   redis-password: "QTE3WUFscHZkeQ=="
-   redis-password: "OXpUSEFhZWllZQ=="
+   redis-password: "R1RlS3d6aDU1ag=="


[ENH] Nomic Text Embed function

Description of changes
Summarize the changes made by this PR.

New functionality

Embedding function that calls the Nomic Atlas API asked for by @tazarov in #2061

Test plan
How are these changes tested?
Added a test that is similar to the existing test for Ollama.

[ ] Tests pass locally with pytest for python, yarn test for js, cargo test for rust

Documentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?

Note -- Nomic has a python SDK we could also use to do this but it just hits the same API so didn't seem worth adding a dependency just to hit 1 endpoint.

Linting issue with the requirements_dev.txt file, should be fixed now. I didn't see it because I had been running --no-verify due to the pre-commit hook returning a ton of mypy errors on code I hadn't touched in embedding_functions.py Did the linting settings get changed since the last time someone ran it against that file?

@andrewblum, the linter runs this which you can also execute locally to check:
pre-commit run --all-files trailing-whitespace
pre-commit run --all-files mixed-line-ending
pre-commit run --all-files end-of-file-fixer
pre-commit run --all-files requirements-txt-fixer
pre-commit run --all-files check-xml
pre-commit run --all-files check-merge-conflict
pre-commit run --all-files check-case-conflict
pre-commit run --all-files check-docstring-first
pre-commit run --all-files black
pre-commit run --all-files flake8
pre-commit run --all-files prettier
pre-commit run --all-files check-yaml

Thanks for that, those return all green for me locally so it should be good to re-run.

Our underlying impl has changed and so this PR is not landable as is.
That being said - we'd still like to add this functionality and that is now tracked in this issue.


status of group download

could you add the function to get the download status of group downloads.
and could we have callbacks that report group download progress.
for example
override fun pauseGroup(id: Int): Fetch {
        synchronized(lock) {
            throwExceptionIfClosed()
            handlerWrapper.post {
                try {
                    val downloads = fetchHandler.pausedGroup(id)
                    uiHandler.post {
                        downloads.forEach {
                            logger.d("Paused download $it")
                            listenerCoordinator.mainListener.onPaused(it)
                        }
                    }
                } catch (e: FetchException) {
                    logger.e("Fetch with namespace $namespace error", e)
                }
            }
            return this
        }
    }

instead of calling onpause callback for each download, we can simple call onpause for group once we are sure all the downloads in the group have been paused.

and could we have callbacks that report group download progress.

@duncanokeyo

Fetch has methods fetch.getDownloadsInGroup(groupId, callback) and fetch.getDownloadsInGroupWithStatus(groupid, status, callback)

The reason why the on pauseGroup method calls the listener.onPause(download) method for each download in the group is because some downloads in the group may have different statuses. For example we cannot pause a download that has a status of completed. So the callback is only called for downloads that were paused. I the next version of Fetch the pauseGroup method will take in an optional callback that will return all the paused downloads.

@duncanokeyo  Just published Fetch 2.2.0-RC1. In addtion to my comment above. Fetch now has new methods that take 2 optional callbacks. The changelog is huge so you may want to review it. Looking forward to your feedback.

thanks,,,  the library is becoming more stable,  will report more issues..


Modus Calendar Component

Prerequisites

[X] I have searched for duplicate or closed feature requests
[X] I have read the Modus style guidelines

Proposal
To analyze the possibility of having a separate component for Calendar or a variant to the Date Picker so that we can achieve something that Sara Farhat requested for her team.

Motivation and context
No response
What is the issue regarding ?
@trimble-oss/modus-web-components
Priority
High
What product/project are you using Modus Components for ?
HRM Team
What is your team/division name ?
ERP/CMS
Are you willing to contribute ?
None
Are you using Modus Web Components in production ?
No response

Meeting with @msankaran0712

[ ] inspect and discuss on external requests meeting on Wed June 14.
[ ] confirm if input field needs to remain hidden like in the prototype so e.g. span selection can be performed only in the calendar interface (what would it mean to selecting a span?)
[ ] if use case is not generic, providing customizing for different states such as pending and approved and product team defines their appearance on the calendar (yellow/green). Single days only or span possible too?

Notify Sara about yellow not accessible.

Decisions:

separate component
color accessibility: Trimble yellow and dark green (light) and yellow and green (dark) for pending and approved with bold text

@msankaran0712 To check for the benefits of having a calendar component.

Modus Approved and Ready for development

Stays in the backlog until either Modus/someone has bandwidth to work on.


How to run prepare playbook on one server but playbook on another?

Hi at all,
I have one question, I will try to describe to you my problem, please check and tell me is that possible to do.
I'm using molecule and DroneCI for automatic testing my playbooks. Because molecule doesn't have support for Proxmox natively, but Ansible has Proxmox module, I wrote prepare playbook which creates LXC container on Proxmox server. That works well, but problem is that because my LXC container get IP from DHCP server and I don't have a solution to run my playbook on that newly created LXC because I don't have that IP in my inventory.
Does exists some solution for this problem or does anyone have some idea how can I do this?
Thank you.

https://github.com/ansible/molecule/blob/master/.github/ISSUE_TEMPLATE/question.md


Docker: script terminates unexpectedly

Thanks for fixing the docker build. The scraper is now running successfully and will scrape content however it keeps terminating at approx 2min 25secs unexpectedly.
I've run the debugger but see nothing. After a short run (less than the 2 1/2 minutes), ill navigate to scrape another and it will just terminate with no error
If im running a longer scrape it will just terminate mid scrape at the 2 1/2 minute mark.
==============================
starting script
==============================

2023-06-06 02:00:56 - Using profile: [cyan]main_profile[/cyan]

Tried rebuilding it in case I did something wrong, still self terminates after just under 2 1/2 minutes (approx 133 seconds)
Docker shows it exits gracefully (script is terminating)
$ docker container inspect of-scraper
[
    {
        "Id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxaba270d78fd0a",
        "Created": "2023-06-08T23:07:04.747247209Z",
        "Path": "/root/ofscraper/.venv/bin/ofscraper",
        "Args": [],
        "State": {
            "Status": "exited",
            "Running": false,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 0,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2023-06-08T23:12:34.423173002Z",
            "FinishedAt": "2023-06-08T23:14:47.551673635Z"

build.sh
#!/bin/bash

OF_SCRAPER_PATH='/opt/ofscraper'

# Color codes for formatting

INFO_COLOR='\033[1;32m'  # Green
ERROR_COLOR='\033[1;31m' # Red
RESET_COLOR='\033[0m'    # Reset color

# Info Message Function
print_info() {
  echo -e "${INFO_COLOR}[INFO] $1${RESET_COLOR}"
}

# Error Message Function
print_error() {
  echo -e "${ERROR_COLOR}[ERROR] $1${RESET_COLOR}"
  exit 1
}

# Deleting GIT Pull
print_info "Deleting GIT Pull"
rm -rf ${OF_SCRAPER_PATH}/OF-Scraper || print_error "Failed to delete GIT Pull"

# Cloning GIT Repo
print_info "Cloning GIT Repo"
cd ${OF_SCRAPER_PATH} || print_error "Failed to change directory"
git clone https://github.com/datawhores/OF-Scraper.git || print_error "Failed to clone GIT Repo"

# Stopping and removing old Docker
print_info "Stopping and removing old Docker"
docker container stop of-scraper && docker container rm of-scraper || print_error "Failed to stop or remove old Docker"
docker rmi of-scraper || print_error "Failed to remove old Docker image"

# Building new Docker container
print_info "Building new Docker container"
docker-compose up -d --build || print_error "Failed to build new Docker container"

# Creating symlink for binary
print_info "Creating symlink for binary"
sleep 3
docker exec -it of-scraper ln -s /root/ofscraper/.venv/bin/ofscraper /bin/ofscraper || print_error "Failed to create symlink for bina>

# Get status of running container
container_status=$(docker container inspect of-scraper --format="{{.State.Status}}")
if [[ "$container_status" != "running" ]]; then
  print_error "New container is not running. Current status: $container_status"
else
  # New container is running
  print_info "New container is running. Current status: $container_status"
fi

docker-compose.yml
version: "3.2"
services:
  onlyfans-old:
    image: of-scraper:latest
    container_name: of-scraper
    hostname: of-scraper
    build:
      context: './OF-Scraper/'
    volumes:
      - ./config:/root/.config/ofscraper
      - /mnt/to/my/share:/downloads
    restart: 'no'
networks:
 default:
   external:
      name: myNetwork

config.json
{
    "config": {
        "main_profile": "main_profile",
        "save_location": "/downloads/OnlyFans",
        "file_size_limit": 0,
        "dir_format": "{model_username}/{responsetype}/{mediatype}/",
        "file_format": "{filename}.{ext}",
        "textlength": 0,
        "space-replacer": " ",
        "date": "MM-DD-YYYY",
        "metadata": "{save_location}/{model_username}/Metadata",
        "filter": [
            "Images",
            "Audios",
            "Videos"
        ],
        "threads": 8,
        "mp4decrypt": "/root/.config/ofscraper/bin/mp4decrypt",
        "ffmpeg": "/root/.config/ofscraper/bin/ffmpeg",
        "discord": "",
        "responsetype": {
            "timeline": "posts",
            "message": "messages",
            "archived": "archived",
            "paid": "messages",
            "stories": "stories",
            "highlights": "stories",
            "profile": "profile",
            "pinned": "posts"
        }
    }

run the command with debugger
ofscraper --output debugger

run the command with debugger ofscraper --output debugger
The script might just be crashing itself

Not getting anything from the debug.
I can run the debug: ofscraper --output debug
However, the script just terminates as if it has a timer; its always 2m13s (133s)
It doesnt matter what im doing with it, wether im scraping content, selecting options, or just doing nothing.
$ docker container inspect of-scraper
[
    {
        "Id": "f2b61760947d2f0cea6058b8e33b5d31c03f171bfffa6b74af0013f2cd2b5459",
        "Created": "2023-06-11T22:18:12.959726759Z",
        "Path": "/root/ofscraper/.venv/bin/ofscraper",
        "Args": [],
        "State": {
            "Status": "exited",
            "Running": false,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 0,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2023-06-16T01:43:49.715570089Z",
            "FinishedAt": "2023-06-16T01:46:02.988845081Z"

Updated to 2.4.2, and still does the same thing
You can see here, this scrape finished in just over a minute...then at 2m13s it just closes.
It will still close at 2m13s even if im in the middle of a big scrape
https://i.gyazo.com/8b2d0ccc77e3582c4edb390f99824b73.mp4

Just to confirm it closes even if you click yes on that prompt

Are you using the same docker image from the repo
It looks like your deleting it in your script
How is the container staying up.
Because the one from the repo shouldn't with the way I set it up and the commands your sending

For build.sh
does it say that it is running after the docker compose command in build.sh Can you test that it stays open before your try to run any other command Like past the 2 minute mark
Actually it would be good if you removed -d command because that would show what the main process is doing.
A container should close if the docker run or docker compose command given it to crash or gracefully exits

Yeah its gracefully exiting. Heres just creating the container with docker-compose without the -d option.
It just sits there for 133 seconds, and then gives that Discord line and exits

Ran a full build to pull down the latest repo since I see changes made today, still the same but funnily enough it ran for 170s which is longer than previous
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2023-06-16T20:27:01.436557954Z",
            "FinishedAt": "2023-06-16T20:29:51.129887133Z"

Yeah I was really confused about that
You could try to do something like this
version: "3"
services:
app:
image: app:1.2.3
stdin_open: true # docker run -i
tty: true        # docker run -t
the import part are
    stdin_open: true # docker run -i
    tty: true        # docker run -t

I'll close this now...this is ultimately what I did:
Dockerfile:
FROM ubuntu:latest
RUN apt-get update \
	&& apt-get upgrade -y \
	&& apt-get install curl python3.10 pip git python3.10-venv -y
RUN mkdir -p /root/.config \
	&& mkdir -p /root/Data \
	&& mkdir -p /root/Data/ofscraper \
	&& mkdir -p /root/ofscraper

COPY / /root/ofscraper
COPY /ofscraper.sh /root/ofscraper.sh
RUN chmod +x /root/ofscraper.sh
#RUN ln -s /root/ofscraper/.venv/bin/ofscraper /bin/ofscraper

WORKDIR /root/ofscraper
RUN curl -sSL https://install.python-poetry.org | python3 -
RUN python3.10 -m venv .venv
RUN pip install dunamai
RUN /root/.local/bin/poetry version $(dunamai from git --format "{base}" --pattern default-unprefixed)
RUN /root/.local/bin/poetry install

WORKDIR /root
ENTRYPOINT ["/root/ofscraper.sh"]

ofscraper.sh (entrypoint)
#!/bin/bash

# Activate the virtual environment
source /root/ofscraper/.venv/bin/activate

# Run any pre-startup commands or setup logic
echo "Performing pre-startup tasks..."

# Start the OF-Scraper application
echo "Starting OF-Scraper..."
/root/ofscraper/.venv/bin/ofscraper --config /root/.config/ofscraper/config.json

# Placeholder...cant think of anything else right now....

# Keep the container running indefinitely
sleep infinity

docker-compse.yml
version: "3.2"
services:
  of-scraper:
    image: of-scraper:latest
    container_name: of-scraper
    hostname: of-scraper
    build:
      context: './OF-Scraper/'
    volumes:
      - ./config:/root/.config/ofscraper
      - /path/to/sites:/downloads
    restart: 'no'
networks:
 default:
   external:
      name: myNetwork

build.sh (build script)
#!/bin/bash

PROJECT_NAME='of-scraper'
PROJECT_PATH='/opt/of-scraper'
REPO_URL='https://github.com/datawhores/OF-Scraper.git'
REPO_NAME='OF-Scraper'
GITREPO_PATH="${PROJECT_PATH}/${REPO_NAME}"

# Color codes for formatting
INFO_COLOR='\033[1;32m'  # Green
ERROR_COLOR='\033[1;31m' # Red
RESET_COLOR='\033[0m'    # Reset color

# Info Message Function
print_info() {
  echo -e "${INFO_COLOR}[INFO] $1${RESET_COLOR}"
}

# Error Message Function
print_error() {
  echo -e "${ERROR_COLOR}[ERROR] $1${RESET_COLOR}"
  exit 1
}

# Deleting GIT Pull
print_info "Deleting GIT Pull"
rm -rf "${PROJECT_PATH}/${REPO_NAME}" || print_error "Failed to delete GIT Pull"

# Cloning GIT Repo
print_info "Cloning GIT Repo"
cd "${PROJECT_PATH}" || print_error "Failed to change directory"
git clone "${REPO_URL}" || print_error "Failed to clone GIT Repo"

# Copy Dockerfile to the GIT Pull folder
print_info "Copying custom Dockerfile to GIT Project"
cp "${PROJECT_PATH}/Dockerfile" "$GITREPO_PATH/Dockerfile" || print_error "Failed to copy Dockerfile"

# Copy ofscraper.sh to the GIT Pull folder
print_info "Copying custom Entrypoint to GIT Project"
cp "${PROJECT_PATH}/ofscraper.sh" "$GITREPO_PATH/ofscraper.sh" || print_error "Failed to copy ofscraper.sh"

# Check if Docker container exists and stop it if running
container_status=$(docker container inspect "${PROJECT_NAME}" --format="{{.State.Status}}" 2>/dev/null)
if [[ "$container_status" == "running" ]]; then
  print_info "Stopping Docker container: ${PROJECT_NAME}"
  docker container stop "${PROJECT_NAME}" || print_error "Failed to stop Docker container"
fi

# Check if Docker container exists and remove it
container_exists=$(docker container inspect "${PROJECT_NAME}" --format="{{.Id}}" 2>/dev/null)
if [[ -n "$container_exists" ]]; then
  print_info "Removing Docker container: ${PROJECT_NAME}"
  docker container rm "${PROJECT_NAME}" || print_error "Failed to remove Docker container"
fi

# Check if Docker image exists and remove it
image_exists=$(docker images -q "${PROJECT_NAME}" 2>/dev/null)
if [[ -n "$image_exists" ]]; then
  print_info "Removing Docker image: ${PROJECT_NAME}"
  docker rmi "${PROJECT_NAME}" || print_error "Failed to remove Docker image"
fi

# Building new Docker container
print_info "Building new Docker container"
docker-compose -f "${PROJECT_PATH}/docker-compose.yml" up -d --build || print_error "Failed to build new Docker container"

# Creating symlink for binary
print_info "Creating symlink for binary"
sleep 3
docker exec -it of-scraper ln -s /root/ofscraper/.venv/bin/ofscraper /bin/ofscraper || print_error "Failed to create symlink for binary"

# Get status of running container
container_status=$(docker container inspect "${PROJECT_NAME}" --format="{{.State.Status}}")
if [[ "$container_status" != "running" ]]; then
  print_error "Container: ${PROJECT_NAME}. Current status: $container_status"
else
  # New container is running
  print_info "Container: ${PROJECT_NAME}. Current status: $container_status"
fi


Running db pull removes name from @@id

Bug description
Similar old issue I found: https://github.com/prisma/prisma/issues/9318
This time, the name of the id gets lost on db pull
Expected Result:
@@id([userId, companyId], name: "id")
Actual Result:
@@id([userId, companyId])
How to reproduce

Create a schema and add @@id with a specific name
Push all changes to db with prisma db push
Run prisma db pull

Expected behavior
The name should be retained:
@@id([userId, companyId], name: "id")
Prisma information
model User {
    userId         Int    @default(autoincrement()) @map("id")
    companyId Int

    @@id([userId, companyId], name: "id")
}

Environment & setup

OS: Windows 11
Database: MariaDB
Node.js version: 16.15.1

Prisma Version
prisma                  : 4.1.1
@prisma/client          : 4.1.1
Current platform        : windows
Query Engine (Node-API) : libquery-engine 8d8414deb360336e4698a65aa45a1fbaf1ce13d8 (at<EMAIL_ADDRESS>Migration Engine        : migration-engine-cli 8d8414deb360336e4698a65aa45a1fbaf1ce13d8 (at<EMAIL_ADDRESS>
Introspection Engine    : introspection-core 8d8414deb360336e4698a65aa45a1fbaf1ce13d8 (at<EMAIL_ADDRESS>
Format Binary           : prisma-fmt 8d8414deb360336e4698a65aa45a1fbaf1ce13d8 (at<EMAIL_ADDRESS>Default Engines Hash    : 8d8414deb360336e4698a65aa45a1fbaf1ce13d8
Studio                  : 0.469.0
Preview Features        : interactiveTransactions

What is the SQL of User? That would make it easier to reproduce this properly. Thanks.

What is the SQL of User? That would make it easier to reproduce this properly. Thanks.

name has nothing corresponding to it in the SQL definition of the primary key, this wouldn't help. We only need to reproduce that the name argument isn't reintrospected to confirm.

Sorry for the long delay to respond. I created a new project and confirmed that the following schema file is enough to reproduce the issue on a brand new project:
generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "mysql"
  url      = env("DATABASE_URL")
}

model User {
    userId         Int    @default(autoincrement()) @map("id")
    companyId Int

    @@id([userId, companyId], name: "id")
}

Thanks!

Fixed in commit: https://github.com/prisma/prisma-engines/commit/bffd935029e462592819b33a080e8f8953b58acb
Should be fixed in Prisma version 4.6.0.


error: Too many snapshots created! UI not show snapshots.

hello !  I created backup schedules in longhorn v0.6.2 , retain was  too big.now the schedule log is  " rpc error: code = Unknown desc = Too many snapshots created"  。on the manager UI, I can't delete the snapshots, now how can i delete the more snapshots to make the schedules work? thanks very much!

@Jawenba
You can find a script called lhexec in https://github.com/longhorn/longhorn/tree/master/scripts . It can be used to remedy the situation:

Find the volume name
Run lhexec <volume-name> info, make sure you can connect to the engine directly.
Run lhexec <volume-name> snapshot ls, to get the list of snapshots.
Delete a few of them using lhexec <volume-name> snapshot rm <snapshot-name>
Run lhexec <volume-name> snapshot purge to complete the deletion.
Now you should be able to see it in the UI and edit the backup schedule.

Let me know if you have any questions while executing the steps above.

@yasker thank you for your help! now,I remove  a few of snapshots remaining 23,less than 100.

but the UI is not  well yet .when I take a  snapshot。I check it is work.

So ,how can i do ?

@Jawenba This sounds like a UI bug. UI gets the same information from the call you just made. Probably wait for a while and it will eventually show up. If not, can you start the web developer console to see if there is any errors?

yes,the web has errors :

@smallteeths can you check this issue? Looks like the UI failed to parse the snapshot tree somehow.

Fixed by https://github.com/longhorn/longhorn-ui/pull/236

I did this:
./lhexec pvc-ac60cf35-539a-4af2-87d3-54f21d20d54b snapshot rm $(./lhexec pvc-ac60cf35-539a-4af2-87d3-54f21d20d54b snapshot ls)
./lhexec pvc-ac60cf35-539a-4af2-87d3-54f21d20d54b snapshot purge
This however, didn't give me the result I expected, the snapshots remained.


new version 0.5.4?

Hello @pat
Can you release new version with this fix https://github.com/pat/combustion/pull/65 ?

+1

:+1:,  getting tied of writing separate dependency for this gem in Gemfile, instead of development_dependency in gemspec. Please, @pat, can you release version? :smile:

Sorry for the delays - meant to get to this over the break, but ended up having very little coding time. 0.5.4 is now released!

Thank you!! :heart:

Thanks :+1:


Build Error - Cannot convert value of type 'String' to expected argument type 'URL'

Steps to Repro

Clone repo
cd example/ios
pod install
react-native run-ios

This has been fixed--please do npm update and try again!

npm update
Delete podfile.lock, then Pods folder, then do pod install
Clean + Build.

I believe this should fix your issue. Closing this for now, please reopen if it persists!


moneydance: restrict supported platforms to linux

Description of changes
This removes Darwin from the supported platforms for moneydance.
#306372 unintentionally breaks the package set evaluation (in some cases, I'm not quite sure what triggers it) for aarch64-darwin (see logs)
Before

raghavsood@r-mbp-a15> nix-build -A moneydance                                                                                ~/r/local/dev/github.com/RaghavSood/nixpkgs
error:
       … in the condition of the assert statement
     at /Users/raghavsood/r/local/dev/github.com/RaghavSood/nixpkgs/lib/customisation.nix:365:17:

      364|     in commonAttrs // {
      365|       drvPath = assert condition; drv.drvPath;
         |                 ^
      366|       outPath = assert condition; drv.outPath;

   … while evaluating the attribute 'handled'

     at /Users/raghavsood/r/local/dev/github.com/RaghavSood/nixpkgs/pkgs/stdenv/generic/check-meta.nix:507:7:

      506|       # or, alternatively, just output a warning message.
      507|       handled =
         |       ^
      508|         (

   (stack trace truncated; use '--show-trace' to show the full trace)

   error: Package ‘moneydance-2024.1_5118’ in /Users/raghavsood/r/local/dev/github.com/RaghavSood/nixpkgs/pkgs/by-name/mo/moneydance/package.nix:53 has an unfree license (‘unfree’), refusing to evaluate.

   a) To temporarily allow unfree packages, you can use an environment variable
      for a single invocation of the nix tools.

        $ export NIXPKGS_ALLOW_UNFREE=1

      Note: When using `nix shell`, `nix build`, `nix develop`, etc with a flake,
            then pass `--impure` in order to allow use of environment variables.

   b) For `nixos-rebuild` you can set
     { nixpkgs.config.allowUnfree = true; }
   in configuration.nix to override this.

   Alternatively you can configure a predicate to allow specific packages:
     { nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
         "moneydance"
       ];
     }

   c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
     { allowUnfree = true; }
   to ~/.config/nixpkgs/config.nix.

After

raghavsood@r-mbp-a15> NIXPKGS_ALLOW_UNFREE=1 nix-build -A moneydance                                                                                ~/r/local/dev/github.com/RaghavSood/nixpkgs
error:
       … in the condition of the assert statement
     at /Users/raghavsood/r/local/dev/github.com/RaghavSood/nixpkgs/lib/customisation.nix:365:17:

      364|     in commonAttrs // {
      365|       drvPath = assert condition; drv.drvPath;
         |                 ^
      366|       outPath = assert condition; drv.outPath;

   … while evaluating the attribute 'handled'

     at /Users/raghavsood/r/local/dev/github.com/RaghavSood/nixpkgs/pkgs/stdenv/generic/check-meta.nix:507:7:

      506|       # or, alternatively, just output a warning message.
      507|       handled =
         |       ^
      508|         (

   (stack trace truncated; use '--show-trace' to show the full trace)

   error: Package ‘moneydance-2024.1_5118’ in /Users/raghavsood/r/local/dev/github.com/RaghavSood/nixpkgs/pkgs/by-name/mo/moneydance/package.nix:53 is not available on the requested hostPlatform:
     hostPlatform.config = "aarch64-apple-darwin"
     package.meta.platforms = [
       "aarch64-linux"
       "armv5tel-linux"
       "armv6l-linux"
       "armv7a-linux"
       "armv7l-linux"
       "i686-linux"
       "loongarch64-linux"
       "m68k-linux"
       "microblaze-linux"
       "microblazeel-linux"
       "mips-linux"
       "mips64-linux"
       "mips64el-linux"
       "mipsel-linux"
       "powerpc64-linux"
       "powerpc64le-linux"
       "riscv32-linux"
       "riscv64-linux"
       "s390-linux"
       "s390x-linux"
       "x86_64-linux"
     ]
     package.meta.badPlatforms = [ ]
   , refusing to evaluate.

   a) To temporarily allow packages that are unsupported for this system, you can use an environment variable
      for a single invocation of the nix tools.

        $ export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1

      Note: When using `nix shell`, `nix build`, `nix develop`, etc with a flake,
            then pass `--impure` in order to allow use of environment variables.

   b) For `nixos-rebuild` you can set
     { nixpkgs.config.allowUnsupportedSystem = true; }
   in configuration.nix to override this.

   c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
     { allowUnsupportedSystem = true; }
   to ~/.config/nixpkgs/config.nix.

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/)
24.05 Release Notes (or backporting 23.05 and 23.11 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.

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

I would want to get this in before 24.05 - the breakage is inconsistent for me (I can run nixpkgs-review for some packages, but some fail to evaluate), and I'm not sure what the broader consequences of this are
cc @NixOS/nixos-release-managers

Thank you @RaghavSood!


Add list with anchors for all rules, update 72->73

Makes the growing collection of rules easier to use, similar to https://github.com/rectorphp/rector/edit/main/docs/rector_rules_overview.md.

The docs is generated by command:
composer docs

https://github.com/rectorphp/rector-symfony/blob/fd2b5dc1e2840ccd8edd8dab265053fb9f4ceba9/composer.json#L50
It should not be added manually.

Well but isn't it supposed to be used by humans and should therefore be as easy to use as possible? If rules are added or removed in the future comparing the rector.php of a project with the current list would be much quicker.
And I've just submitted another pull request for "rectorphp/rector-doctrine" as well which had a duplicate listing for "TypedPropertyFromToOneRelationTypeRector". Not sure where that would come from is the generation is automated?

If there is a bug in docs generation, the command  need to be patched.
The docs is read from rector rules code sample
https://github.com/rectorphp/rector-symfony/blob/fd2b5dc1e2840ccd8edd8dab265053fb9f4ceba9/src/Rector/BinaryOp/ResponseStatusCodeRector.php#L39

@samsonasik when i ran composer docs on master i saw some changes this is probably because i did it manually with https://github.com/rectorphp/rector-symfony/pull/261 shall i make another pull request with running composer docs for the project?

@johanadivare other PR is ok 👍 .
We basically should have weekly auto-generating PR like in rector-src for composer docs command
https://github.com/rectorphp/rector-src/blob/84361b82b630d31b49b009b46bdd3b1312ced2e8/.github/workflows/weekly_pull_requests.yaml#L22
but currently, autocommit consuming re-usable workflow not trigger CI on rector-* packages, see

https://github.com/rectorphp/rector-symfony/pull/121

we probably need to give stefanzweifel/git-auto-commit-action a try in the future, ref related feature request:

https://github.com/rectorphp/rector/issues/7579

Closing as this is automated by composer docs run


The rule to add in specific section parameter not accepting

If we want to add a rule in a specific section (e.g we have a clean up rule, Main rule ) add a rule in "Main Rule" section at the bottom is not allowing

Hi @Nakuldiwane ,
Please share the function, command and payload you are using.
Did you get an error when attempting to run the command? If so please share it as well.
Thanks,
Eden

While using the parameter "position.bottom": "Main rule"
This gives a syntax error

Thanks for that point.
Now facing this issue.

Hi @Nakuldiwane ,
Our API documentation contains usage examples https://sc1.checkpoint.com/documents/latest/APIs/index.html#web/add-access-rule~v1.9
The position should be written as follows:
"position" : {
"bottom" : "main rule"
}

@chkp-edenbr : Thanks it is working


Document options and defines related to .NET DLL support

I always forget about how/where haxe gets .NET dlls, so it would be nice to document that eventually, so we don't have to look into haxe sources to find out.
Here's a list of related options:

-net-lib (and @std postfix)
-net-std
-D net-target
-D net-ver
NET_* automatic defines

Hope I haven't forget anything.
@waneck How stable is this? Can we document it or it's subject to change?

@waneck I tried to document these in https://gist.github.com/nadako/c225caf5fde5cee5dcd4#using-custom-net-distribution. Could you please review and confirm that this can go into HaxeManual (see #138)? Also, what @std postfix in -net-lib does again?


新发行的版本里面把\usepackage{amsthm}注释掉了

为什么要注释，是和什么冲突吗？

An exact dot will be added when using this package, for instance, "Definition 1.1."
I hadno time to figure out why that happened then, so the package amsthm was annotated.


Is it okay to expose vault key?

@jodizzle and I were wondering about the vault key, if it's okay to expose it like it is.
Sorry for the poorly written issue, I am likely going to be getting around to addressing this myself ASAP, but just documenting here just in case.
I've assigned those concerned.
Thanks!

This is safe, though I also don't love it. A couple considerations:

This is basically what tools like Vault are designed for - a way to commit secrets into repositories in a safe way. The file can't be decrypted without the vault password, which isn't included in the repository. Arguably, though, this adds surface area for mistakes if, eg, the password file ever got accidentally committed.

Right now nothing actually sensitive is included in the file - just ids of EC2 resources (eg, the subnet id), which I think would actually be fine to store as clear-text in the repo. Though, going forward, we might need to include real secrets, like AWS credentials.

The advantage to including the vault file is that the repo is totally self-contained - a developer can just clone the repo, get the vault password, and everything just works. If the vault file(s) is omitted, then we've got a set of YAML files that need to get passed around behind-the-scenes, which can get gnarly.

I wonder, out of an abundance of caution - would it work to put the vault files in a private repo, and then include that as a submodule in the pipeline, sort of like what we do with the fixtures?

Thank you so much @davidmcclure !! This is such good information! I appreciate it!


Taking Fn vs FnMut closures (e.g. prop_map)

In methods like prop_map(), is there a reason for taking an Fn and not an FnMut closure? In some cases (e.g. when you use an external mutable generator for parts where you don't care for shrinking and other fancy stuff) this enforces the user to Rc<RefCell<>> everything that's captured and needs to be mutated:
https://github.com/AltSysrq/proptest/blob/9119682a19607f7cec9135b1e06ebe64236b5596/src/strategy/traits.rs#L71-L76

Can you elaborate on your use-case?
You might want to look at how the shrinking logic is implemented; in particular, because testing functions are impl Fn(<V as ValueTree>::Value) -> TestCaseResult the .current() method of V may be called more than once; the first time for providing the Value to the tester and the second time for providing the final counterexample which is then displayed.
This means that if your definition of .current() doesn't stay the same if you call the function successively without simplifying/complicating in between, then the results can become inconsistent.
Furthermore, since the signature of current is fn(&self) -> Self::Value this means that an FnMut closure shouldn't be usable in any case since you'd need current to have the signature fn(&mut self) -> Self::Value instead. Arc doesn't help either. The other way through would be to use some interior mutability a la Mutex; but the benefit doesn't seem to outweigh the cost.

To elaborate on @Centril's points a bit further, proptest is pretty strongly built on the assumption that value generators are pure from an external perspective, something a mutating function would in almost all cases violate.
Using an externally impure function in prop_map will likely lead to erratic behaviour at best. In particular, not only will shrinking be unable to find the correct value reliably, it can actually cause it to converge on an input that the test passes. Other features like test case persistence and forked tests also rely on purity.

@AltSysrq We might want to ramp up the documentation on this front; I don't think ValueTree's documentation says that sufficiently clearly at the moment. Adding docs in other places might also be good (e.g. somewhere prominent in the new book...).

0.9.0 includes explicit documentation about this for prop_map. It might be worth expanding in the future but this at least answers the immediate question.


Property 'Storage' doesn't exist and [TypeError: Cannot read property 'read' of undefined]

When importing package using `import Storage from '@candlefinance/cache', I'm getting the following errors:
[TypeError: Cannot read property 'read' of undefined]
Property 'Storage' doesn't exist
Library works only when functions are imported like this:
import {read, write, remove} from '@candlefinance/cache';
I prefer the first way of importing because 'read', 'write' and 'remove' are commonly used function names, which results in duplicates.

Also, I agree! I don't have the bandwidth right now, but modifying index.tsx should be trivial.


Update README.md to include styled-components

styled-components is a very popular way of styling in React, this tweak shows how this package works with styled-components

Hey @fredrivett
Thank you very much for the extra clarification to first time users.
Do you think it would be useful to have a dedicated docs page or is this sufficient?
greetings
Thomas

Forgot to reply here, been a while so don't have the best context now but I think it's fine with just this note rather than needing it's own page.


Godot fails to import blend files from Blender 4.2

Tested versions
v4.3.dev6.official [89850d553]
System information
Godot v4.3.dev6 - macOS 14.4.1 - Vulkan (Forward+) - integrated Apple M1 Max - Apple M1 Max (10 Threads)
Issue description
It's a simple scene with a cube and nothing else in it

Steps to reproduce
MRP
Minimal reproduction project (MRP)
MRP_blend_fail.zip

CC @godotengine/import

Testing with the "blender" daily build channel on steam.
Will report back.

The api for Blender broken compatibility by removing vertex colours in 4.2.
There's been significant debate over the merits of the vertex color change in the gltf blender io github issue.

--- a/20-29 Tools/21 Godot 21/21.01 Godot/modules/gltf/editor/editor_scene_importer_blend.cpp
+++ b/20-29 Tools/21 Godot 21/21.01 Godot/modules/gltf/editor/editor_scene_importer_blend.cpp
@@ -188,11 +188,11 @@ Node *EditorSceneFormatImporterBlend::import_scene(const String &p_path, uint32_
        } else {
                parameters_map["export_lights"] = false;
        }
-       if (p_options.has(SNAME("blender/meshes/colors")) && p_options[SNAME("blender/meshes/colors")]) {
-               parameters_map["export_colors"] = true;
-       } else {
-               parameters_map["export_colors"] = false;
-       }
+       // if (p_options.has(SNAME("blender/meshes/colors")) && p_options[SNAME("blender/meshes/colors")]) {
+       //      parameters_map["export_colors"] = true;
+       // } else {
+       //      parameters_map["export_colors"] = false;
+       // }
        if (p_options.has(SNAME("blender/nodes/visible"))) {
                int32_t visible = p_options["blender/nodes/visible"];
                if (visible == BLEND_VISIBLE_VISIBLE_ONLY) {

I think this PR https://github.com/godotengine/godot/issues/83320 is also relevant to this discussion, with some debate over how to manage specular colours from gltf.

This still occurs on 4.3rc2.


Screen reader is not announcing status message "No emojis found" after searching for emoji by typing letters in "Search emojis" edit field.

Repro Steps:

Tab to "Emoji" button available in any application and press enter.
Start Narrator and then TAB to "Search emoji" edit box and type any letters to get status message "No emojis found".
Observe that the narrator is not announcing any status message when there are no results are found.

Actual:
After searching emoji if there is no results found then narrator is not announcing any status message such as "No emoji found".
This issue is also observed with Chrome+ NVDA.
Expected:
The narrator should announce status message when there is no results are found such as "No emoji found".
User Impact:
Screen reader users won't be able to understand whether the results are found or not.

Thanks for reporting this! This will be addressed for the 5.0 release.

Hi! This issue has been fixed and will be available in the next 5.0.0 beta release.
I only have VoiceOver on the Mac to test with, but in my testing, it immediately announced "No results found", so I believe this fixes the issue. I will be publishing a new beta release soon with several recent fixes.


SSL Support

Does the redis.json configuration file support SSL connections?  Our AWS redis cluster has SSL enabled and I cannot connect to it via your extension (tried ports 6379 and 6380).  We use a Redis GUI client that has the ability to set SSL for the connection and it only works if SSL is enabled.  Let me know if I am missing something.

Are you using the host or url property in your API call?  AWS only provides a URL to the Redis cluster.  I tried entering redis://cluster_url, rediss://cluster_url, redis://cluster_url:6379 and rediss://cluster_url:6379.  They all fail - suspect timeout.
From the link you provided:
host | <IP_ADDRESS> | IP address of the Redis server
port | 6379 | Port of the Redis server
path | null | The UNIX socket string of the Redis server
url | null | The URL of the Redis server. Format: [redis[s]:]//[[user][:password@]][host][:port][/db-number][?db=db-number[&password=bar[&option=value]]] (More info avaliable at IANA).


Fix hot reload min/max change breaking sliders

fix hot reload min/max change breaking slider
Problem
if you change the min or max values with a hot reload the slider beaks
The slider will still think the initial min and max variables are the current once even after changing them.
This causes the following problems:

Making it smaller makes you not able to use the full slider.
Making it bigger makes the dot go off screen.

My solution
Change it so that useInstance only sets a percentage with out knowing the min and max value.
This fixes both problems put above.
This means that I changed the value state to a percentage state and calculate the value every frame.
Changed behaver
This fix changes the behaver of the slider once the values are changed.
Before value stayed the same even if the min and max changed
After now the percentage will stay the same meaning the value changes if min and max are changed

Please fix formatting then we can merge @Boegie19

I can just go ahead and take care of that myself. It won't change any functionality in the code.


Region labeling panics with large images

Description of the bug
Calling region_labelling::connected_components with an Image of size (1 << 16, 1 << 16) and any non-background pixel will panic. For example:
extern crate image;
extern crate imageproc;

use image::*;

fn main() {
    let conn = imageproc::region_labelling::Connectivity::Eight;
    let background = Luma([0]);

    let mut buffer = ImageBuffer::<Luma<u8>, _>::new(1u32 << 16, 1u32 << 16);

    for i in 0..1024 {
        buffer.put_pixel(i, i, Luma([1]));
    }

    imageproc::region_labelling::connected_components(&buffer, conn, background);

}

Cause
The cause is arithmetic overflow:
https://github.com/PistonDevelopers/imageproc/blob/b8296fc3a3f77bf76ded4de7a0fbe42a2969cd09/src/region_labelling.rs#L134
The cast to usize should happen before the multiplication. As a consequence labels may then saturate u64 although a hot-path case distinction could prevent this performance loss. Alternatively, one could panic/error out adaptively only when the labels would actually overflow u32.
The panic is only triggered when the actual region count is greater than the overflowed value, and only early when that region is to be merged with another. https://github.com/PistonDevelopers/imageproc/blob/b8296fc3a3f77bf76ded4de7a0fbe42a2969cd09/src/region_labelling.rs#L203
Else, control flow continues until https://github.com/PistonDevelopers/imageproc/blob/b8296fc3a3f77bf76ded4de7a0fbe42a2969cd09/src/region_labelling.rs#L222, where we hit an assertion in DisjointSetForest::root.
While we're at it, can the allocations be reworked to be output sensitive? It would be cool to support labeling of very large images with few labels, without allocating DisjointSetForest and output_labels with much larger memory requirements than are used later. This ties back into keeping labels as u32 where would only want to allocate at most u32::max_value() buckets for the union find.
Fixes
As discussed above, there are two major possibilities. One is to adaptively continue until we run out of u32 labels. This already works correctly in some cases where we overflow! Consider
extern crate image;
extern crate imageproc;

use image::*;

fn main() {
    let conn = imageproc::region_labelling::Connectivity::Four;
    let background = Luma([0]);

    // Overflows size to exactly 0.
    let mut buffer = ImageBuffer::<Luma<u8>, _>::new((1u32 << 16) + 1, (1u32 << 16) + 1);

    buffer.put_pixel(1, 1, Luma([1]));

    imageproc::region_labelling::connected_components(&buffer, conn, background);
}

This overflow to give us space for the one label (actually for (1 << 17) + 1 labels)  we actually want to assign. One could say that bug improved performance here, because we allocate much less memory. We could still panic when the dynamic label number overflows.
The second possibility is to switch to u64 labels. This is likely going to be slower, more memory intensive and has likely more drawbacks but would be much more simple to implement on top.
Alternative number three: Check that the image size does not overflow u32 and document that decision.
Of course, one could mix the first and second alternative, or even provide a branching path when the preconditions for the third alternative are met, where the hot path is u32 such as currently implemented.

Thanks for the bug report. When writing this library I generally assumed that images would be "small enough", and ignored overflow completely. I'm not yet convinced that it's worth paying a significant increase in complexity or performance cost in order to handle larger images, but I'm willing to have a go and see. We should certainly document the current limitations, and fail fast where possible.

Simply failing fast is probably fine for the moment. Although since it's a potentially silent error there could be users for whom that breaks stuff. But the indexing bug in image, which also happens when width*height overflows in u32, itself seems much more broken and no one has yet noticed it before so it's very likely fine ^^


module and module.filename is undefined

Describe the bug
The module.filename is undefined in vitest but not in jest
https://github.com/lightzane/module-undefined-vitest
Reproduction
Vitest

Jest

System Info
System:
    OS: Windows 10 10.0.19045
    CPU: (8) x64 Intel(R) Core(TM) i5-8365U CPU @ 1.60GHz
    Memory: 653.65 MB / 7.81 GB
  Binaries:
    Node: 20.11.0 - C:\Program Files\nodejs\node.EXE    npm: 10.3.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 123.0.6312.86
    Edge: Chromium (122.0.2365.92)
    Internet Explorer: 11.0.19041.3636

### Used Package Manager

npm

### Validations

- [X] Follow our [Code of Conduct](https://github.com/vitest-dev/vitest/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guidelines](https://github.com/vitest-dev/vitest/blob/main/CONTRIBUTING.md).
- [X] Read the [docs](https://vitest.dev/guide/).
- [X] Check that there isn't [already an issue](https://github.com/vitest-dev/vitest/issues) that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitest-dev/vitest/discussions) or join our [Discord Chat Server](https://chat.vitest.dev).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.

Hello @lightzane. Please provide a minimal reproduction using a GitHub repository or StackBlitz (you can also use examples). Issues marked with needs reproduction will be closed if they have no activity within 3 days.

I already added screenshots in description of the bug.
But here's a minimal reproduction using GitHub repository:
https://github.com/lightzane/module-undefined-vitest

It might be possible to expose more complete cjs module object https://nodejs.org/api/modules.html#the-module-object from this proxy here.
https://github.com/vitest-dev/vitest/blob/e4e939ba2ab48c67ee14b82ec957fc9a8a52756c/packages/vite-node/src/client.ts#L392-L395
But first, can you explain more about your actual use case where you ended up discovering this difference? I assume you have cjs code base and you happen to have been using module.filename. If you have other use of module.xxx, then adding only module.filename wouldn't suffice to fix your actual use case.
As an alternative, if it's your own source code, then you could probably use __filename instead. If you code is aimed to be ESM, then you can start to use import.meta.url or import.meta.filename etc...

It might be possible to expose more complete cjs module object https://nodejs.org/api/modules.html#the-module-object from vite-node's moduleProxy here.
https://github.com/vitest-dev/vitest/blob/e4e939ba2ab48c67ee14b82ec957fc9a8a52756c/packages/vite-node/src/client.ts#L392-L397
But first, can you explain more about your actual use case where you ended up discovering this difference? I assume you have cjs code base and you happen to have been using module.filename. If you have other use of module.xxx, then adding only module.filename wouldn't suffice to fix your actual use case.
As an alternative, if it's your own source code, then you could probably use __filename instead. Or if you code is aimed to be ESM, then you can start to use import.meta.url or import.meta.filename etc...

@hi-ogawa I updated the repository and included a package.json script to compare the difference.
{
    "test": "jest src/main.test.ts && vitest run src/main.spec.ts"
}

Reference: https://github.com/lightzane/module-undefined-vitest/blob/main/package.json#L6
Also, I made a distinction that there are 2 files:

main.spec.ts - will ONLY be executed by vitest
main.test.ts - will ONLY be executed by jest

They have the same exact testing, and referring to the same main.ts file.
To reproduce the issue, please run npm test in the following github repository.
Or checkout the detailed results of this workflow job run:
https://github.com/lightzane/module-undefined-vitest/actions/runs/8517170032/job/23327308504#step:5:25
Here's a preview screenshot of that workflow job run:

@lightzane Yeah, your reproduction is clear that module.filename is not currently supported by Vitest. What I was asking is that how do you use module.filename in your actual project? For example, can you try using __filename instead?

It might be possible to expose more complete cjs module object https://nodejs.org/api/modules.html#the-module-object from vite-node's moduleProxy here.
https://github.com/vitest-dev/vitest/blob/e4e939ba2ab48c67ee14b82ec957fc9a8a52756c/packages/vite-node/src/client.ts#L392-L397
But first, can you explain more about your actual use case where you ended up discovering this difference? I assume you have cjs code base and you happen to have been using module.filename. If you have other use of module.xxx, then adding only module.filename wouldn't suffice to fix your actual use case.
As an alternative, if it's your own source code, then you could probably use __filename instead. Or if you code is aimed to be ESM, then you can start to use import.meta.url or import.meta.filename etc...

I can't use __filename, or am I missing something?

This is a huge legacy project that uses module when declaring a custom logger. The module is actually a NodeModule which contains information about the file itself to get the details of it and track where the logger is originating by invoking the factory function to create an instance of the custom logger while passing the module as the parameter.

@lightzane Yeah, what I meant is a bare __filename global https://nodejs.org/api/modules.html#__filename.

it's not only module.filename

Right, that's what I was indicating in my first comment. Vitest currently only defines module.exports
https://github.com/vitest-dev/vitest/blob/e4e939ba2ab48c67ee14b82ec957fc9a8a52756c/packages/vite-node/src/client.ts#L354-L363
however, genuine cjs environment provides many things under module.xxx https://nodejs.org/api/modules.html#the-module-object
I wasn't denying to having module.filename, but assuming that your code base is somewhat old, I wanted to make sure you only needs module.filename for your use case at least. If you know you need more things under module.xxx, then it's better to know beforehand.

@lightzane Yeah, what I meant is a bare __filename global https://nodejs.org/api/modules.html#__filename.

it's not only module.filename

Right, that's what I was indicating in my first comment. Vitest currently only defines module.exports
https://github.com/vitest-dev/vitest/blob/e4e939ba2ab48c67ee14b82ec957fc9a8a52756c/packages/vite-node/src/client.ts#L354-L363
however, genuine cjs environment provides many things under module.xxx https://nodejs.org/api/modules.html#the-module-object
I wasn't denying to having module.filename, but assuming that your code base is somewhat old, I wanted to make sure you only needs module.filename for your use case at least. If you know you need more things under module.xxx, then it's better to know beforehand.

That's right, it's using more than module.filename, I could have been more clear on this from first place.
I also updated the title of the issue describing that module is also undefined on vitest only.

This is expected behavior. We support a minimal CJS layer to load modules - this is primarily needed for inlined dependencies. We are planning to phase out CJS support in future versions. Vitest expects modules to be built as ES Modules. If this is not your use case, then Vitest cannot satisfy your needs. You can use another test runner that supports CJS.

This is expected behavior. We support a minimal CJS layer to load modules - this is primarily needed for inlined dependencies. We are planning to phase out CJS support in future versions. Vitest expects modules to be built as ES Modules. If this is not your use case, then Vitest cannot satisfy your needs. You can use another test runner that supports CJS.

Can you shed me some light and check if my understanding is correct:
The module object is used only in CJS.
So as an alternative is to use __filename as replacement for module.filename.
Or using import.meta.url, however, when I tried to use import.meta.url, I'm getting the following error:
Reference: https://github.com/lightzane/module-undefined-vitest/actions/runs/8520587597/job/23337016631#step:5:14

Though I have already added type: module in package.json and as well as the following in tsconfig.json:
{
     "target": "es2020",
     "module": "ES2020"
}

What else could be missing?

The module object is used only in CJS.

Yes

So as an alternative is to use __filename as replacement for module.filename. Or using import.meta.url.

__filename is also injected by Vitest for backwards compatibility (there is already a PR to remove that). If you want your code to run as an ES Module, you should use import.meta.url or import.meta.filename (in the latest Node).

What else could be missing?

I am not sure why. Note that if you write an application that runs in Node >16, then you should use module: "node16". Maybe you have several tsconfigs? If the code with module works fine in your code, then you build CJS.
Maybe this will be useful for you:

Modules - Theory
Modules - Choosing Compiler Options

Maybe this will be useful for you:

Modules - Theory
Modules - Choosing Compiler Options

Thank you for this information.
I lately found out that the vitest have passing tests already while the failed tests are now coming from jest itself 😂, and I found a similar issue: https://github.com/kulshekhar/ts-jest/issues/3888
I updated the package.json to remove the type: module
"scripts": {
    "start": "tsx src/main.ts",
    "test": "vitest run src/main.spec.ts",
    "both": "jest src/main.test.ts && vitest run src/main.spec.ts"
}

And for esm and import.meta.url to work with Typescript, I have this tsconfig.json:
{
  "compilerOptions": {
    "target": "esnext",
    "module": "esnext",
    "moduleResolution": "node",
    "esModuleInterop": true,
    "resolveJsonModule": true,
    "strict": true
  },
  "include": ["src/**/*.ts"],
  "exclude": ["node_modules"]
}

This would break the npm start so I now have to use the tsx instead of ts-node.
Reference: https://stackoverflow.com/questions/62096269/cant-run-my-node-js-typescript-project-typeerror-err-unknown-file-extension#comment136634910_62099904
I have updated the GitHub repository for reference of whoever else would encounter this issue:
https://github.com/lightzane/module-undefined-vitest/actions/runs/8522641109/job/23343273721#step:5:11
@hi-ogawa @sheremet-va I appreciate all the active help! I discovered new things. 👏🏻
Long live ⚡ vitest! Fast test runner, comes also with fast responses from contributors/support. 💗


Update SDfileOpen when file closes in writeCache()

If the file is closed automatically from hitting the block count, update the SdfileOpen boolean

already applied in another commit


feat(ci): Set ALLOWED_CORS_ORIGINS app config

Pull Request
JIRA Ticket
CZID-8925
Description
#38 included a fix for arbitary CORS origins, but did not set the env var needed to enable the feature in graphQL mesh.  This PR sets that env var via happy config, and also adds a reusable action for setting env vars.
Notes
Tests
Manually test that graphQL queries in playground and webapp work

[ ] tested sandbox

Now that the allow origins are actually being set in an env var,  I've been trying to override the origin using the browser dev tools to see if I can generate a request that fails.  I haven't been able to so far, though I'm not sure if that is a valid way to override the origin.
From earlier work on localhost, I do know that the origin policy does block.  The playground on localhost would not work when only web was specified as an origin (web is the hostname of the webapp on the docker compose network).


Transaction and Database missing Clone, FdbError doesn't have Fail in 0.4+

Just curious if they were replaced for a better way, if so, if there are examples that I can refer to for these changes.

Previously transaction was an atomic reference counted pointer to an FDBTransaction.
This was fine, as we needed an Owned and easy/fast to clone transaction for its usage this futures 0.1.
Now that async/await is available, we can leverage the borrowed approach and use a reference to the transaction. If required you can still either Rc or Arc the transaction, but that commit/abort/reset all requires either an owned Transaction or a mutable one. Which can be done by calling either: Arc::make_mut, Arc::get_mut or Arc::try_unwrap.
Protecting those method was required to prevent documented by the fdb C Api undefined behavior.
For example:

fdb_transaction_commit() must have been called on transaction and the resulting future must be ready and not an error before this function is called, or the behavior is undefined.

Be careful if you are using fdb_transaction_reset() and fdb_transaction_cancel() concurrently with the same transaction. Since they negate each other’s effects, a race condition between these calls will leave the transaction in an unknown state.

About Fail, I can reintroduce it as an optional feature if required.

I see, so I should Rc/Arc the database/transactions if I am moving it around. Thanks for the insight!

Personally I'm using &Transaction, in order to prove at compile time that when I commit there is no way another thread is writing to it.

Btw, Database::transact is the recommended way to manipulate the database.
See Database::transact_boxed and Database::transact_boxed_local for much easier to use versions of it.
This is implemented with a trait so once GAT is working we can use Database::transact directly.

Wasn't sure if I should be making a new thread for this, but how come tx.get and .commit are awaited while other tx methods aren't? such as set and such. More curious than anything

get is async because there is a roundtrip to the database in order to get some data.
commit is async because it must wait for the database to finish handling all previous set and actually commit then.
set is sync because it only "send" the data, there is no need to wait for it, the next commit or get (of the affected value) will do it.


academic consult for code

I appreciate the quality of your work and have reviewed the code in SAM_label.py. I have a couple of questions: Firstly, should lines 79-81 be included within a for loop? Additionally, I noticed that in line 84, when calculating overlaps, the 'mask' variable gets overwritten and does not seem to represent BM1 accurately.

You're absolutely right, and I apologize for these oversights in the code. Thank you for your careful review and feedback. I'll promptly revise the code to address these issues.


Time picker not working. Moving hour hand is not changing hour value.  Reference: http://react-toolbox.com/#/components/time_picker

Reproduction steps:
1- Go on link http://react-toolbox.com/#/components/time_picker
2- start Playground.
3- try to change hours by moving hour hand in time picker.
4- change is not reflected in hours section of time, it is reverted back to its original value.
Cause of problem: Depencency chain is causing time picker to not work properly. i.e. one of depencency is still in previous version.
How I solve it:
Solution 1: remove directory node_modules and reinstall dependencies
Solution 2: use yarn instead of npm

Fixed!


raise error when using struct for associations

#20
Looks like there are people are using structs with associations resulting in an error. This makes using structs with associations raises an error UnSupportedAssociationsError  that way people know what is happening.
WDYT? @solnic

@solnic are we happy with the current implementation?

#30 resolves this.


Slurm nodes with hybrid controller module unable to configure correctly

If you find a similar existing issue, please comment on that issue instead of creating a new one.
If you are submitting a feature request, please start a discussion instead of creating an issue.
Describe the bug
When following the guide for deploying a hybrid Slurm controller environment, the nodes being provisioned through the 'cloud' cluster are not brought up due to Slurm install error during bootup.
Steps to reproduce
Steps to reproduce the behavior:

Follow the deployment guide in above link
SSH into the primary controller/login node and provision a new node eg. salloc -n 1 -p debug
After few min, this generates the following error message:

On the primary Slurm controller
srun: error: Node failure on gcpcluster-gcpcpu-ghpc-0
srun: error: Nodes gcpcluster-gcpcpu-ghpc-0 are still not ready
srun: error: Something is wrong with the boot of the nodes.

Console output of problematic gcpcluster-gcpcpu-ghpc-0
*** Slurm is currently being configured in the background. ***

Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script: DEBUG: get_metadata: metadata not found (http://metadata.google.internal/computeMetadata/v1/project/attributes/gcpcluster-slurm-devel)
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script: DEBUG: fetch_devel_scripts: scripts not found in project metadata, devel mode not enabled
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script: INFO: Setting up compute
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script: INFO: installing custom scripts: compute.d/ghpc_startup.sh,partition.d/gcpcpu/ghpc_startup.sh
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script: DEBUG: install_custom_scripts: compute.d/ghpc_startup.sh
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script: DEBUG: install_custom_scripts: partition.d/gcpcpu/ghpc_startup.sh
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script: INFO: Set up network storage
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script: ERROR: [Errno -2] Name or service not known
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script: Traceback (most recent call last):
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script:   File "/slurm/scripts/setup.py", line 1247, in <module>
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script:     main(args)
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script:   File "/slurm/scripts/setup.py", line 1223, in main
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script:     setup(args)
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script:   File "/slurm/scripts/setup.py", line 1184, in setup_compute
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script:     setup_network_storage()
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script:   File "/slurm/scripts/setup.py", line 703, in setup_network_storage
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script:     ext_mounts, int_mounts = partition_mounts(all_mounts)
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script:   File "/slurm/scripts/setup.py", line 694, in partition_mounts
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script:     return separate(internal_mount, mounts)
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script:   File "/slurm/scripts/util.py", line 697, in separate
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script:     return reduce(lambda acc, el: acc[pred(el)].append(el) or acc, coll, ([], []))
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script:   File "/slurm/scripts/util.py", line 697, in <lambda>
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script:     return reduce(lambda acc, el: acc[pred(el)].append(el) or acc, coll, ([], []))
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script:   File "/slurm/scripts/setup.py", line 692, in internal_mount
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script:     return mount_addr == lkp.control_host_addr
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script:   File "/slurm/scripts/util.py", line 1174, in control_host_addr
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script:     return socket.gethostbyname(self.cfg.slurm_control_host)
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script: socket.gaierror: [Errno -2] Name or service not known
Sep 19 00:02:15 gcpcluster-gcpcpu-ghpc-0 google_metadata_script_runner: startup-script: ERROR: Aborting setup...

deployment blueprint
https://github.com/GoogleCloudPlatform/hpc-toolkit/blob/main/docs/hybrid-slurm-cluster/blueprints/hybrid-configuration.yaml
Note that the slurm partition is not using the filestore mount

Hi @saltysoup , could you please confirm if static_controller_hostname is reachable from compute-vpc-network/primary-subnet? Can you ping it successfully from VM in this subnet?

Hi @mr0re1 - Thank you for the suggestion, it looks like the issue was that the startup script I used in slurm partition to add a new entry for the primary controller in /etc/hosts was never executed as slurm was not being installed correctly.
I got it working following your suggestion by creating a new A record with the IP address and FQDN of the primary controller in the VPC's private zone in Cloud DNS. After this, slurm was installed correctly on the new node and everything works as intended.
Closing issue


OpsForGeo producing "READONLY You can't write against a read only replica " on READS...

only if master & replica configured
Divert pure read intentions of georadius and georadiusbymember commands (variants that do not use STORE/STOREDIST) to GEORADIUS_RO/GEORADIUSBYMEMBER_RO This will unify the behavior between Cluster and Redis Standalone/Replica arrangements
Relates to  issues #1481 #2568 #2871
Closes #1813

Make sure that:

[+] You have read the contribution guidelines.
[+] You have created a feature request first to discuss your contribution intent. Please reference the feature request ticket number in the pull request.
[+] You applied code formatting rules using the mvn formatter:format target. Don’t submit any formatting related changes.
[+] You submit test cases (unit or integration tests) that back your changes.

A bit of background..

#1481 - Introduces divert to _RO variant of georadius for Redis Cluster Connections
2.#2568 -  georadius commands added to READONLY commands list. Causing error "READONLY You can't write against a read-only replica " when using read-only replica nodes
#2832  Remove georadius  from  READONLY commands list

Let's merge it after we release 6.5.0.RELEASE


LDAP Auth

A very cool feature to have would be to support LDAP authorisation and AD passwords.

+1 for this, I'd certainly like to see this.

+1 for this, I'd certainly like to see this.

+1

+1

Once #196 is in, we can look at extending it with LDAP.

+1
with an LDAP library it should be really easy to implement.

This isn't something we'll likely be supporting.

@jbrooksuk - Thanks for a cracking tool :)
I did wonder if 'LDAP auth' was ever revisited or considered (for a future release)?
Cheers James/Team

@jbrooksuk  +1 if LDAP support can be added.  This may be important for adoption among enterprises.


UHF-1173: Matomo refactor

Moving Matomo & Matomo reports modules and config to helfi_platform_config.
How to test:

Checkout a fresh environment
Checkout this branch of the module: composer require drupal/helfi_platform_config:dev-UHF-1173_matomo_refactor
Build the site: make new
Enable the HELfi Matomo configuration feature
Clear cache, just to be sure
See the Matomo modules enabled and config in place

Also see the PR in drupal-helfi where the module installation & configuration is removed from there: https://github.com/City-of-Helsinki/drupal-helfi/pull/184


[BUG] notification email not being sent?

Seems to be some items around email that are broken.
Not receiving email notifications on validated tasks.

might be related?   in a comment box, if you try to add an email address by clicking the email dropdown, task dialog closes abruptly.

Oh yeah, I'm not surprised this stuff is broken 🤔

fwiw, I got task validation emails later last week after we set this up.

Moving to #274