text:
Fix dependabot checks

Dependabot checks are currently failing: https://github.com/rainforestapp/github-action/network/updates/588573787

Dependabot can't parse your test.yml
Dependabot failed to update your dependencies because there was an error parsing the test.yml found at /.github/workflows/test.yml.
Dependabot encountered the following error:
Dependabot::DependencyFileNotParseable

This error comes from here: https://github.com/dependabot/dependabot-core/blob/main/github_actions/lib/dependabot/github_actions/file_parser.rb#L42-L52
I can reproduce the error locally:
file = File.open('.github/workflows/test.yml')
=> #<File:.github/workflows/test.yml>
YAML.safe_load(file.read, aliases: true)
Psych::DisallowedClass: Tried to load unspecified class: Time

The file loads correctly with the change in place. I double checked all other action and workflow files in this repo, and all are loadable, so this should be enough to get dependabot checks working.

/reviewme @rainforestapp/devs

repo: rainforestapp/github-action


text:
Update user's group

Hey,
Didnt find a way to update user's group (to add to a group)
$user = new User; $user->group = 'AAA'; $user->save();
Not working. Please advice?
didnt find it in docs and in the code.
Thanks

$user = new User;
$user->group = UserGroup::whereCode('AAA')->first();
$user->save();

We will look at improving the related models docs to make this API more obvious. Thanks

$user->group = UserGroup::whereCode('buyer')->first();   $user->save();
"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'group' in 'field list' (SQL: update userssetgroup= {"id":3,"name":"Buyer","code":"buyer","description":"Buyers group","created_at":"2016-11-20 18:08:51","updated_at":"2016-11-20 18:09:01"},updated_at= 2016-11-25 14:32:42 whereid= 42)" on line 662 of /Applications/MAMP/htdocs/fidgycube.co/vendor/laravel/framework/src/Illuminate/Database/Connection.php
Getting this (

Relating models is probably more like this:
$user->group()->associate( UserGroup::whereCode('buyer')->first() );

The relationship may be called "groups" instead of "group".
$user->groups = UserGroup::whereCode('AAA')->first();

Samuel,
i changed to
$user->groups = UserGroup::whereCode('AAA')->first();
and now getting
"Type error: Argument 1 passed to Illuminate\Database\Grammar::parameterize() must be of the type array, integer given, called in /Applications/MAMP/htdocs/fidgycube.co/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php on line 340" on line 118 of /Applications/MAMP/htdocs/fidgycube.co/vendor/laravel/framework/src/Illuminate/Database/Grammar.php

@Eoler
Not working. Gives no error, but not saving into groups table

Are you sure a group with code AAA exists? This will protect you if it doesn't:
$user->groups = UserGroup::whereCode('AAA')->first() ?: null;

hey @daftspunk
Mine is $user->group()->associate( UserGroup::whereCode('buyer')->first() );
bayer and it exists.

These all should work:
$group = UserGroup::whereCode('buyer')->first();

$user->group()->associate($group);

$user->group()->add($group);

$user->group = $group;

$user->group = $group->id;

"Call to undefined method October\Rain\Database\QueryBuilder::associate()" on line 2123 of /Applications/MAMP/htdocs/fidgycube.co/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php

$group = UserGroup::whereCode('buyer')->get();
gives me ID
something wrong with relation as far as i see

@bbrandtlv, sorry to say we are stabbing in the dark here. Perhaps you can share your code with us so we can give some more educated advice.

(( sad!
Ok.
`<?php namespace Bbrand\Shop\Components;
use Jiri\JKShop\Components\Basket;
use Session;
use Redirect;
use Mail;
use \RainLab\User\Models\User;
use \RainLab\User\Models\UserGroup;
use Auth;
use Database;
class Basketextend extends Basket
{
public function componentDetails()
{
return [
'name'        => 'basketextend Component',
'description' => 'No description provided yet...'
];
}
public function defineProperties()
{
    $parentProps = parent::defineProperties();
    $properties = array_merge(
        $parentProps,
            [
                'myWrapper' => [
                'title'       => 'Wrapper for content',
                'description' => 'Wrapper for rendered content',
                'default'     => '.popup-content',
                'type'        => 'string'
                ],
                'paypal_business' => [
                    'title'       => 'Paypal Business',
                    'default'     => '.popup-content',
                    'description' => 'Your bussines account',
                    'type'        => 'string'
                ],
                'paypal_return_url' => [
                    'title'       => 'Return URL',
                    'description' => 'Use full url where will be your customer redirect after paid "http://www.example.com/paypal-success"',
                    'type'        => 'string'
                ],
                'paypal_use_sandbox' => [
                    'title'       => 'Use sandbox',
                    'description' => 'For testing only!',
                    'type'        => 'checkbox'
                ],
                'slug' => [
                    'title'       => 'URL Order ID',
                    'description' => 'URL Order ID',
                    'default'     => '{{ :slug }}',
                    'type'        => 'string'
                ],
                'stripe_publishable_key' => [
                    'title'       => 'Publishable Key',
                    'description' => 'For testing you can use: "xxxx"',
                    'type'        => 'string'
                ],
                'stripe_secret_key' => [
                    'title'       => 'Secret Key',
                    'description' => 'For testing you can use: "xxx"',
                    'type'        => 'string'
                ],
                'stripe_return_url' => [
                    'title'       => 'Success URL',
                    'description' => 'Use full url where will be your customer redirect after paid "http://www.example.com/paypal-success"',
                    'type'        => 'string'
                ],

            ]
        );

    return is_array($properties) ? $properties : $parentProps;
}

public function onCheckEmail($email)
{
    return Auth::findUserByLogin($email) ? 1 : 0;
}

public function onBasket(){
    $data = [];
    $data["basket"] = $this->getSessionBasket();
    $data["jkshopSetting"] = \Jiri\JKShop\Models\Settings::instance();

    return [
        $this->property('myWrapper') => $this->renderPartial('::basket-0', $data)
    ];
}

public function onMyCompleteOrder() {

    $jkshopSetting = \Jiri\JKShop\Models\Settings::instance();

    // create order
    $basket = $this->getSessionBasket();
    $order = new \Jiri\JKShop\Models\Order();
    $order->createFromBasket($basket);
    $order->save();
    // $this->page['slug'] = $order->id;
    $order = \Jiri\JKShop\Models\Order::find($order->id);
    $this->page["order"] = $order;

    // paypal details
    $this->page["paypal_business"] = $this->property('paypal_business');
    $this->page["paypal_currency_code"] = $order->paymentGateway->gateway_currency;
    $this->page["paypal_return_url"] = $this->property('paypal_return_url');
    $this->page["paypal_use_sandbox"] = $this->property('paypal_use_sandbox');
    $this->page["jkshopSetting"] = $jkshopSetting;

    // Mail::sendTo('admin@domain.tld', 'acme.blog::mail.message', $params);

    if ( !($this->onCheckEmail($order->contact_email)) ){
        $user = new User;
        $user = Auth::register([
            'name' => $order->ds_first_name,
            'email' => $order->contact_email,
            'password' => 'changeme',
            'password_confirmation' => 'changeme',
            'username' => $order->contact_email,
            'jkshop_ds_first_name' => $order->ds_first_name,
            'jkshop_ds_last_name' => $order->ds_last_name,
            'jkshop_ds_address' => $order->ds_address,
            'jkshop_ds_address_2' => $order->ds_address_2,
            'jkshop_ds_postcode' => $order->ds_postcode,
            'jkshop_ds_city' => $order->ds_city,
            'jkshop_ds_county' => $order->ds_county,

            'jkshop_is_first_name' => ($order->is_first_name) ? : $order->ds_first_name,
            'jkshop_is_last_name' => ($order->is_last_name) ?  : $order->ds_last_name,
            'jkshop_is_address' => $order->is_address,
            'jkshop_is_address_2' => $order->is_address_2,
            'jkshop_is_postcode' => $order->is_postcode,
            'jkshop_is_city' => $order->is_city,
            'jkshop_is_county' => $order->is_county,
            'jkshop_contact_email' => $order->contact_email,
            'jkshop_contact_phone' => $order->contact_phone,
        ]);

        $group = UserGroup::whereCode('buyer')->get();
        // $user->associate($group);
        // $user->group()->add($group);
        $user->save();

    }

    $data = ['name' => $order->ds_first_name .' '. $order->ds_last_name, 'email' => $order->contact_email, 'orderid' => $order->id];

    Mail::send('bbrand.shop::mail.neworder', $data, function($message) use ($data){

        $message->bcc( $data['email'], 'Alexei Kositsin' );
        $message->to( $data['email'], $data['name'] );
        $message->from( 'info@fidgycube.co', 'FidgyCube.co' );
        $message->subject( 'FidgyCube.co order' );

    });

    // clear basket
    Session::forget('jkshop-basket');

    if ($order->payment_gateway_id == 1)
    return [
        $this->property('myWrapper') => $this->renderPartial('::basket-4-thanks-paypal')
    ];
    else if
    ($order->payment_gateway_id == 2){
        $this->page["stripe_publishable_key"] = $this->property('stripe_publishable_key');
        $this->page["stripe_secret_key"] = $this->property('stripe_secret_key');
        $this->page["stripe_currency_code"] = $order->paymentGateway->gateway_currency;
        $this->page["stripe_return_url"] = $this->property('stripe_return_url');
        return [
            $this->property('myWrapper') => $this->renderPartial('::custom-strupe-checkout')
        ];
    }
}

 public function onSubmitPay() {
    //  return 'fuck';

    $stripe = [
      'secret_key'      => $this->property('stripe_secret_key'),
      'publishable_key' => $this->property('stripe_publishable_key')
    ];
    \Stripe\Stripe::setApiKey($stripe['secret_key']);

    // save IN to events
    $eventLog = new \System\Models\EventLog();
    $data = array();
    $data["name"] = "Stripe Response";
    $data["post"] = post();
    $eventLog->message = json_encode($data);
    $eventLog->save();

    $order_id = post('order_id');
    // get order
    $order = \Jiri\JKShop\Models\Order::find( $order_id );

    if ($order != null) {
        $token  = post('stripeToken');
        $customer = \Stripe\Customer::create(array(
            'email' => $order->contact_email,
            'card'  => $token
        ));

        $charge = \Stripe\Charge::create(array(
            'customer' => $customer->id,
            'amount'   => ($order->total_price + $order->shipping_price)*100,
            'currency' => $order->paymentGateway->gateway_currency
        ));

        // check response
        $order->orderstatus = $order->paymentGateway->orderStatusAfter;
        $order->paid_date = \Carbon\Carbon::now();
        $order->paid_detail = $charge;
        $order->save();

        $data = ['name' => $order->ds_first_name . ' ' . $order->ds_last_name , 'email' => $order->contact_email, 'orderid' => $order->id];

        Mail::send('bbrand.shop::mail.payment', $data, function($message) use ($data) {

            $message->bcc('info@fidgycube.co', 'Alexei Kositsin');
            $message->to( $data['email'], $data['name'] );
            $message->from('info@fidgycube.co', 'FidgyCube.co');
            $message->subject('FidgyCube.co order');

        });

        return 'dsd';
        // return Redirect::to($this->property('stripe_return_url'));   //Redirect::to("/");
    }

}

}
`
using JIRI shop plugin.

Ok, I see the issue:
This code returns a COLLECTION (an array of groups):
// Do not use get()
$group = UserGroup::whereCode('buyer')->get();

This code should be used to return a SINGLE group:
// Use first()
$group = UserGroup::whereCode('buyer')->first();

The relationship name is not called GROUP:
// Do not use group()
$user->group()->associate(...);

This code should reference GROUPS:
$user->group()->associate(...);

As before, here is the complete working code
$group = UserGroup::whereCode('buyer')->first();

$user->group()->associate($group);

$user->group()->add($group);

$user->group = $group;

$user->group = $group->id;

( no
code still not working.
you wrote that I should reference to groups (but wrote group)
I changed it to $user->groups()->associate($group);
and now it cannot find associate() method.
I know that I took much of your time, but i cannot find a way to make this working.
i can go hardcore and simply update user_groups table with ids, but i'm sure you didnt ment for this.
ill try to dig more... hopefully will find it.
Thanks

@daftspunk
Hey
This one is working:
`            $group = array(UserGroup::whereCode('buyer')->first());
        $user->groups()->attach($group[0]->id);

        $user->save($group);`

But i'm dont like this solution. (
Hope this will help to somebody.

Thanks, we have removed attach() and associate() from the documentation to prevent this kind of confusion. In all cases add() should be used instead.

!!!!!!! FINALLY!
`$user->groups()->add(UserGroup::whereCode('buyer')->first());
        $user->save($group);
        `

This one is good!!!!
Thanks again!

source: gharchive/issue

authors: Eoler bbrandtlv daftspunk

repo: rainlab/user-plugin

license: mit

license_type: permissive

license_source: bigquery


text:
controllable read concurrency

i whipped this up pretty fast.  didn't do much testing, except something similar i did to #158 except i had 1 years worth of data, but only 1 series. i think 1 vs many series shouldn't matter much.
i ran while true; do curl -H 'X-Org-Id: 1' 'http://localhost:8888/render?target=some.id.of.a.metric.1&from=-1y&until=now&format=json&maxDataPoints=1920' > /dev/null; done
and ran MT in these different modes:
previous code, and then concurrency of 20, 10, 5 ,2,1
i also loaded the chart manually a couple times each run to check the data appeared fine.

what we're seeing is that as we bring down read concurrency it gets slower.  i don't know why it only starts to affect the outcome once it goes under 5 or so. i do know why the difference is so small compared to in #158 : iters-to-points is a big bottleneck and this is still executed sequentially (at least on a per-target level, so when you fetch multiple targets at once this is less of an issue)

since previous test was skewed by having too many points and only a single series, meaning iter-to-points was dominating the picture, i redid it with 1 month of data and 20 different metrics
./fake_metrics_to_nsq -keys-per-org 20 -orgs 1 -statsd-addr statsdaemon:8125 -nsqd-tcp-address nsqd:4150 -offset 2592000 -steps 100 -interval 1

while true; do curl -H 'X-Org-Id: 1' 'http://localhost:8888/render?target=some.id.of.a.metric.*&from=-30days&until=now&format=json&maxDataPoints=1920' > /dev/null; done

10:54: master branch
10:56 new code with 20 readers, (! some timeout errors)
10:59 10 readers
00:03 5 readers
00:05 2 readers
00:009 1 reader

like before, bringing down concurrency makes cassandra gets slower.
not sure why it also makes cpu bound ops (iter-to-point and cassandra-to-iter) faster, and less noisy.
my guess is that due to there being more discrepancy in when cassandra gets finish, cpu time availability for those ops is more consistent. under higher concurrency, cassandra gets would finish more around the same time and cpu constraints means the cpu ops see more variability (i think)
either way, very interesting that now we're seeing that concurrency is not having much effect on performance.

source: gharchive/pull-request

repo: raintank/raintank-metric


text:
🛑 RiotSkin4CN-Download is down

In 1d639cb, RiotSkin4CN-Download (https://s-cd-4307-general.oss.dogecdn.com/riotskin4cn/live.json) was down:

HTTP code: 0
Response time: 0 ms

Resolved: RiotSkin4CN-Download is back up in 00084c4 after 21 minutes.

license: MIT

license_source: github-api


text:
楽曲お気に入り登録機能の実装

楽曲のお気に入り登録はDAM公式アプリ(デンモクアプリ)側で実現可能なため、機能の中身が未実装となっています。
しかし、デンモクアプリのお気に入り登録には「DAM★とも」へのログインが必要なため、会員登録など若干ハードルが高く感じられます。
以上の理由から、優先度低めのタスクとして「楽曲のお気に入り登録(マイリスト機能？)の実装」を行います。

機能実装まではお気に入りボタンを非アクティブにすべきかもしれません。
バグで動かないのか、今後実装予定の機能なのかがわかりづらいので。


text:
feat : use test containers instead of loading database

Summary by CodeRabbit

New Features

Introduced a new class for testing the read replica functionality.
Added PostgreSQL Testcontainers support for enhanced integration testing.
Implemented a configuration setup for PostgreSQL containers to facilitate testing.

Bug Fixes

Improved error handling and validation in the test setup process.

Refactor

Enhanced the structure and readability of the test setup methods.

Can't be achieved as per testcontainers issue
https://github.com/testcontainers/testcontainers-java/issues/9502


text:
🛑 Playstore API is down

In b138810, Playstore API (https://api-playstore.rajkumaar.co.in) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Playstore API is back up in a82b5fa.


text:
kernelsu

thanks for this beautiful module I was using it on magisk but now I'm using kernelsu is it works or not yet maybe the next update

Yes, kernelsu should work well too

sorry maybe for this project I will stop temporarily in this version there will be no latest version for the next because maybe I see out there there are already many modules that have the same function but only different names.

sorry maybe for this project I will stop temporarily in this version there will be no latest version for the next because maybe I see out there there are already many modules that have the same function but only different names.

it's a beautiful module even if I don't agree with u about there's a lot of modules have the same function cuz Dragonboost are different, all of them raise the core frequency but your module preserves battery life including Google services drain feature, without affecting processor performance which is good thing but in the end it's your decision and I respect it thank u rakarmp for all beautiful work ❤

yes you're welcome

repo: rakarmp/DragonBoost


text:
Getting the attribute value of the row selector element?

It seems like column selectors work well on descendant elements of the row selector element, but I have not been able to retrieve data from attributes of the row selector element (e.g [id]).

Same question.

authors: ColinMaudry valguenichon

repo: rakot/DataScrapper


text:
Typescript error for R.type when using a date type

For typescript, when using the function R.type, the possible types are
"Object" | "Number" | "Boolean" | "String" | "Null" | "Array" | "RegExp" | "Function" | "Undefined" | "Symbol" | "Error"
However, if you pass R.type(new Date ()), a string of 'Date' gets returned

Good find, looks like this could be improved. Would you like to submit a PR?

@kedashoe i can work on this one. What's the current approach for typescript issues? Create a pr on the ts branch or create a pr on the Definitely Typed project?

For here, yes, the PR would be based off the ts branch. We don't have anything to do with Definitely Typed so a separate PR there would be up to you.

authors: azigoldstein kedashoe mateusbw

repo: ramda/ramda


text:
Consider matching array_slice behavior instead of NotSatisfiableException

What is your opinion of changing the behavior of parseRange to match the same behavior as array_slice instead of throwing NotSatisfiableExceptions?
Example 1:
parseRange('0-300', 0); // => Throws NotSatisfiableException
array_slice([], 0, 300); // => []

When the entity has a totalSize of 0 you have to know that fact before requesting the range to avoid throwing an error.
Example 2:
parseRange('2-5', 1); // => Throws NotSatisfiableException
array_slice([0], 2, 5); // => []

The current behavior certainly makes sense (why would you request a random out-of-range range?), but it seems like conforming to a known interface/behavior like array_slice has some value.

Because the current behaviour is in compliance with the RFC. When the NotSatisfiableException is thrown you should respond with the HTTP status code 416 (Range Not Satisfiable).
See: https://tools.ietf.org/html/rfc7233#section-4.4

authors: mdeboer scotttrinh

repo: ramsey/http-range


text:
New version of numpy 1.26.4 incompatibility with np.bool existence

Describe bug
New version of numpy incompatibility with np.bool leads to an error, when using the history module. A simple modification in the code, wherever np.bool make it np.bool_ , which is actually just one occurrence, fixes the issue. Should I make a pull request for that, or are you planning a new release that would incorporate this little fix?
The specifics on the deprecation can be found starting numpy 1.24
Simple code that reproduces your problem
No need for that
Debug log
No need for that
Bad data proof
No response
yfinance version
0.2.43
Python version
3.10.14
Operating system
No response

I'm planning a big update to that code but testing will take a few weeks, so you can submit a PR to dev.

authors: ValueRaider VasLem

repo: ranaroussi/yfinance


text:
Incompatibility with talib (expected numpy.ndarray, got DataFrame)

Describe bug
talib cannot accept dataframe as input:
Traceback (most recent call last):
  File "/data/1.py", line 7, in <module>
    df['SMA_5'] = ta.SMA(df['Close'], timeperiod=5)
  File "/data/miniconda3/envs/a/lib/python3.10/site-packages/talib/__init__.py", line 64, in wrapper
    result = func(*_args, **_kwds)
TypeError: Argument 'real' has incorrect type (expected numpy.ndarray, got DataFrame)

It works for yf 0.2.44, but not work for 0.2.46+.
Simple code that reproduces your problem
import talib as ta
import yfinance as yf

df = yf.download("MSFT", period='5d')
df['SMA'] = ta.SMA(df['Close'], timeperiod=3)

Debug log
N/A
Bad data proof
No response
yfinance version
0.2.48
Python version
3.10.13
Operating system
Ubuntu 22.04

It works for yf 0.2.44, but not work for 0.2.46+.

Double-check this. I get opposite.

Cause:
After issues #2068 #2100 , yf.download("MSFT") returns by default now a DataFrame with an extra level Ticker
Fix:
Either use
df = yf.download("MSFT", period='5d', multi_level_index=False)

or
df = yf.Ticker("MSFT").history()

authors: ValueRaider dhruvan2006 finisky


text:
📖 Add ADR on rancher namespace strategy

kind/documentation
What this PR does / why we need it:
This ADR  proposes a decision on rancher cluster namespace usage. This will allow rancher turtles to control the created resources location during and after the import process, and allow the operator to have a static set of namespaced RBAC rules.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
A part of https://github.com/rancher/highlander/issues/39
Fixes: #296
Special notes for your reviewer:
Checklist:

[ ] squashed commits into logical changes
[x] includes documentation
[ ] adds unit tests
[ ] adds or updates e2e tests

I’m closing this as this needs a revisit at a later date with management v3 cluster workflow in mind.

repo: rancher-sandbox/rancher-turtles


text:
convoy.sock connection refused

convoy commands like " convoy list , convoy create volume-name" are giving error in ubuntu 16.04 server. but  convoy works fine in another LAB setup using same environment.
Error:
....dia unix /var/run/convoy/convoy.sock: connect : connection refused"

root@ubuntu-docker-4:~# convoy create test
ERRO[0000] Post http://%!F(MISSING)var%!F(MISSING)run%!F(MISSING)convoy%!F(MISSING)convoy.sock/v1/volumes/create: dial unix /var/run/convoy/convoy.sock: connect: connection refused
{
"Error": "Post http://%!F(MISSING)var%!F(MISSING)run%!F(MISSING)convoy%!F(MISSING)convoy.sock/v1/volumes/create: dial unix /var/run/convoy/convoy.sock: connect: connection refused"
}

found  the reason. closing the terminal window in ubuntu desktop kills the convoy daemon process.

but no issue with closing the Putty window in Windows.
Any way to start the Convoy daemon in background mode?

repo: rancher/convoy


text:
Support dryRun feature when creating or editing resources

Is your feature request related to a problem? Please describe.

Creating or editing a resource can run through various steps within Kube that can make the request fail
the dry run concept can be used via kubectl or api to determine if the request would be accepted and succeed
For docs see https://kubernetes.io/docs/reference/using-api/api-concepts/#make-a-dry-run-request

Describe the solution you'd like

Add an option on create/edit to 'dry run'

only for required types
should not show resources outside of kube api
could probably do both of above via a flag on the steve or specific resource models

Show the result of the dry run (either success or the error message)

Additional context

all core types should support this, however it's not for sure all resources (include CR) will always support as well. We need to decide whether to just do this for core types or find a way to determine if we can dynamically tell if a resource supports it
also need to decide whether to use dry run against admission controllers (may help the above case)
other http verbs also support it, we should consider as a separate task whether to integrate with those too

There's a wider discussion on improving client side validation, which might supersede this, but this feature could be a low bar stop gap until then.

repo: rancher/dashboard


text:
Cannot add header or cookie values in Firefox on Router Create

Works fine on Chrome. On FF, anything I type just isn't registered in the field at all.
Firefox version 70.0.1 (64-bit)

Also cookie values. Similar to above screenshot but after clicking "Add Cookie Rule" to the right

Working in FF now, validated fix


text:
Improve Required Namespace/Project Filtering Message

Message is shown when

Required Namespace / Project filter is on
user has an option which isn't a namespace, project or multiple thereof.

There's been a request to improve how this looks

We should define this at a component level and change all similar instances

Here the Adobe Xd prototype with the first ideas for both themes.

We are going with the third option of the initial proposal:
NOTE: Please change the text colour in the light theme to var(--darker)

The images have been exported as SVGs:

Ideally, the text blocks should be vertically centered, however, this can complicate things with the image on top. If it gets complicated, just center the entire thing (image plus text).

Sorry, just caught this.
The icons in the header may change given user permissions and the extensions the user installs. Is it ok to show an image that might not match that at the top?
If the text is in the svg it won't change language and be in-sync with the text in the header component

Didn't know about the icons, that's something to consider indeed. Thanks for the catch.
Regarding the text, do you mean the text block or the text inside the Namespace filter? The filter has to be in "All Namespaces" for this message to appear, so it would always be in sync; however, the exact words would change with the language.
Any suggestion? could we replicate the header content restricting any interaction? I imagine old-school CSS solutions that might not be acceptable...

I was wondering that. We have a 'disabled' state, though that might confuse the user into clicking in it anyway

I had a quick call with @scures and we agreed on trying to literally copy the header content, using pointer-event: none to prevent any interaction, and letting the arrow point to the dropdown.
The SVGs of the arrows are attached here:

I can provide the SVG code if necessary.

authors: edenhernandez-suse kwwii richard-cox


text:
Check for supported API version annotation when loading extensions

Summary
Fixes #11695

Occurred changes and/or fixed issues

Replaced the environment variable injection for UI_EXTENSIONS_API_VERSION in vue.config.js
Updated the condition to load an extension based on the extensions api version annotation

Now when an extension does not  contain the catalog.cattle.io/ui-extensions-version annotation it will now be considered a legacy extension, and will not be loaded
This annotation will now be required for Vue3 extensions and will need to have a version >= 3.0.0

Added a small method to coerce the UI_EXTENSIONS_API_VERSION to remove any pre-release modifiers

Areas or cases that should be tested

Load an extension with the required API version >= 3.0.0
Load an extension with the required API version >= 2.0.0
Load an extension without the catalog.cattle.io/ui-extensions-version annotation

Areas which could experience regressions

Screenshot/Video

Checklist

[x] The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
[x] The PR has a Milestone
[x] The PR template has been filled out
[x] The PR has been self reviewed
[x] The PR has a reviewer assigned
[x] The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
[x] The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes

Would recommend closing this in favor of https://github.com/rancher/dashboard/pull/12071


text:
Home page not load in safari: positive lookhead unsupported

Summary
Fixes #8023
As mentioned in the issue, it's not possible to load the page with current regular expression, as positive lookbehind is not supported in Safari.
Occurred changes and/or fixed issues
Changed regular expression.
Technical notes summary
Created very cumbersome sized unit test for the mapping method.
Areas or cases that should be tested

Areas which could experience regressions

Screenshot/Video

Greate work @cnotv

authors: cnotv liyimeng


text:
Silent requires device to be set

When installing using the kernel arguemnt k30s.install.silent=true I was running into where it would display the help text of the install script. I realized it was not setting a device, so I used a kernel argument to explicitly set the device which worked fine.
If I remove silent, the install script intuits the correct device automatically, but then I have to interact :(.

The documentation could be better for silent installations.

Yeah, could totally just be a documentation solve! Happy to open that PR if thats the route you'd like to go!

Hit this today, had a rough half an hour.
At least for the time being it'd be nice to have a note in k3os.install.silent's description documenting this kind of behaviour..

authors: FreekingDean dweomer zenekron


text:
[Documentation] Remove mention of --disable-agent flag

We are going to hide the --disable-agent flag from the cli. It has caused confusion for GA and some of the community. The agent should typically be running on master nodes. If the agent is not running then the kubelet is not running and you cannot list the node (i.e. with kubectl get nodes) or otherwise interface with it with kubectl.
We should move it to any developer docs if necessary.
Hide in CLI issue: https://github.com/rancher/k3s/issues/890

Resolved in https://github.com/rancher/docs/pull/1886


text:
Add option to create local volumes instead of hostPath

resolve #85
Took the changes from #91 and added them to be enabled by a config value an annotation on the pvc. Default behavior is still to use hostPath volumes. By using an annotation, we can allow the user to create both hostPath and local volumes, instead of just locking down to one.
Made some small changes to the README, but will update the README and examples further if code changes are ok from maintainers.

@AnthonyEnr1quez Looks good. Can you solve the conflict, thank you.

Changed the status to Draft, will fix conflicts and add more docs/examples and tests

@derekbit Fixed the conflicts and added examples and an e2e test. Changed the mechanism to use local volume to annotations on the pvc.

If these changes are ok, I might refactor the e2e tests to be a bit cleaner and remove the dependency on testify suite

@AnthonyEnr1quez Do you need support here?
I already added support for PVC annotations into onechart - https://github.com/gimlet-io/onechart/pull/51
I'm really looking forward for this feature, since it's blocking my from creating an end-to-end backup strategy.
But it's always easy to say: "what's the status", instead maybe I can support you here?

As @Marcel-Lambacher, also waiting for this feature for better handling of backups.
I can also provide help if needed, any status @AnthonyEnr1quez?

@Marcel-Lambacher @maximeborges we should be good, just waiting for a response to https://github.com/rancher/local-path-provisioner/pull/260#discussion_r961817716

LGTM. Thanks for your contribution.

Hi, do we have a date when this will be released?

We will release the new version by the end of this week. I'm testing and fixing some issues.

v0.0.23 is released. Thank you and any feedback is appreciated.

@Marcel-Lambacher @maximeborges @fabioandreola if you need help converting volumes, see https://github.com/rancher/local-path-provisioner/issues/85#issuecomment-1292578697

@Marcel-Lambacher @maximeborges @fabioandreola if you need help converting volumes, see #85 (comment)

Thanks. I want to report that with this change Velero PVC backups are working as expected

authors: AnthonyEnr1quez Marcel-Lambacher derekbit fabioandreola maximeborges

repo: rancher/local-path-provisioner


text:
Host hangs after host reboot is issued from console.

Tested with Rancher server - latest Build from master
Ros version - v0.4.4
Longhorn catalog template from - https://github.com/cjellick/longhorn-catalog (image - cjellick/longhorn:dev3)
Steps to reproduce the problem:
Create a service(health check enabled) with VM having ROOT Volumes in longhorn.
Reboot the host where the VM is running (type sudo reboot on host console).
VM gets migrated to a different host and VM /controller and replica containers get started successfully on this host.
On the migrated VM , able to access existing files and create new file in ROOT volumes
But the host that was rebooted , is not able to boot successfully.

It's a Docker v1.10 bug.

Reboot command of RancherOS suppose to stop every container first, then restart.
Because filesystem IO is in fly, console container cannot be stopped at time, due to TCMU userspace daemon stopped and IO cannot process. Normally we can only wait until filesystem IO timeout, which is about 30 seconds later.
When API request to Docker asking for stop the container, Docker calls destroy in runc to stop it. Due to the reason in item 2, it cannot be stopped immediately, so destroy call returns error.
But Docker doesn't check the error return of destroy call, and try to wait for container to stop(for infinite time).
The last step of container stop is waiting of OOMkiller channel to return notification. Then it would be blocked there because cgroup notifier won't notice OOMKiller channel, due to cgroup hasn't been deleted yet, because of the remaining running instance which will timeout 30 seconds later.

I've checked Docker v1.11.1, and it changed whole container lifecycle logic and seems work fine with reboot case now.

Addressed with RancherOS 0.5.0 with support for Docker 1.11+

authors: sangeethah will-chan yasker

repo: rancher/longhorn


text:
Support WiFi on RPi3B+

From @TheAifam5:

Ah that thing with 'brcmfmac43430-sdio' does not work. I'm using the 1.5.0-rc with RPi3B+.
Something with 'Direct firmware load for brcmfmac43455-stdio.bin failed with error -2'
'unhandled level 2 translation unit (11)'
'brcmf_sdio_htclk: HT Avail timeout 1000000... clkctl 0x50'
Installing this fixes all problems and don't need to run anything (you dont need rmmod, modprobe etc.. things)
brcmfmac43455-sdio.txt
brcmfmac43455-sdio.bin
brcmfmac43455-sdio.clm_blob

Yea :D but installing this things does not fix that problem. My mistake :/ But the good news, booted without problems with that files, but while connecting crashes the kernel.

Rancheros 1.5.2-rc1 already supports WiFi on RPi3B+
Reference: https://github.com/rancher/docs/pull/1437/files#diff-52e56c2e82cc5096bed1ccd86a68f238

repo: rancher/os


text:
if --no-cacerts is specified but setting exists, setting is used when generating kubeconfig

What kind of request is this (question/bug/enhancement/feature request): bug
Steps to reproduce (least amount of steps as possible):
It appears that over 18 months ago when I was first setting up my cluster the setting/cacerts got populated, but I then switched to using letsencrypt.
Result:
In 2.4 this seemed to not be a problem, but 2.5 the setting started to get used in kubeconfig generation
This led to x509 unknown certificate authority errors because it was loading in a bad certificate when using the Rancher 2 proxied url for kubernetes clusters.
Other details that may be helpful:
Deleting of the setting cacerts from the local cluster and a restart of rancher resolved the issue.
Environment information

Rancher version (rancher/rancher/rancher/server image tag or shown bottom left in the UI): 2.5
Installation option (single install/HA): HA

@ekristen Were you using self-generated before 2.5 and then when you upgrade to 2.5 with letsencrypt the kubeconfig still have the leftover CA?

The only chance I could think is that If you use privateCA for your helm chart, you will need to reset the helm value --set privateCA=false. If this is true rancher will not clean up the cacert setting.

I was never using a self-generated but my HA cluster is 18+ months old.  It's possible initially I didn't set letsencrypt but @ibuildthecloud asked me to open an issue.
The helm chart doesn't have privateCA set in the user supplied values so it's using the default.

This is still happening on 2.6.0. privateCA is set to false. Just ran a helm upgrade again to be sure
helm upgrade rancher -n cattle-system rancher-latest/rancher --version=2.6.0 --set hostname=r2.private.io --set ingress.tls.source=letsEncrypt --set letsEncrypt.email=erik@private.io --set privateCA=false

TLS certificate is LetsEncrypt, it's managed and working, however all generated kubeconfig files for cluster access over r2.private.io contains certificate-authority-data which causes kubectl to throw errors because it's the wrong data.

I fixed it. settings.management.cattle.io/cacert had a value set for the field value, created on 2020-10-26, which coincides with my upgrade to 2.5.

authors: StrongMonkey ekristen

repo: rancher/rancher


text:
UI: Links in certificates domain names are incorrect

In the Infrastructure/Certificates page, open any existing certificate.
In the Domain Names frame, the CN and other AltNames of the cert are listed, as links.
These should be linked to https://domainname/ but are instead linked to /domainname, which means that clicking will send you to https://rancherserver/domainname which is incorrect and results in a Jetty error page.

Version - master jan 07
Verified fixed

authors: sshipway tfiduccia


text:
Add rancher/rke2-upgrade images to Rancher release artifact rancher-images-sources.txt

What kind of request is this (question/bug/enhancement/feature request):
enhancement
In the same way that rancher/k3s-upgrade images are included in Rancher release artifact rancher-images-sources.txt, the rancher/rke2-upgrade images should be included as well.

Dupe of https://github.com/rancher/rancher/issues/32051.


text:
2.5 Scale Testing - XXLarge run

Validate the 2.5.9 performance against docs published for 2.4.x for an xx-large run.
https://rancher.com/docs/rancher/v2.5/en/installation/requirements/

Completed on 07/02, recorded here: https://confluence.suse.com/display/EN/Scale+Testing+-+XXLarge

authors: bmdepesa git-ival


text:
Deleting a cluster that provisioned successfully but is in error state doesn't remove management cluster

Rancher Server Setup

Rancher version: 2.6.1-rc10

Information about the Cluster

Cluster Type (Local/Downstream): Downstream

If downstream, what type of cluster? (Custom/Imported or specify provider for Hosted/Infrastructure Provider): Digital Ocean

Describe the bug

If a cluster provisioned from Rancher is successful, but goes into an error state for some reason, then deleting it will successfully delete the provisioning cluster object but not the management cluster object.
To Reproduce

Provision a Digital Ocean cluster with one machine pool, put a '.' in the machine pool name (like harvester-v.0.3.0-rc1-creds-pool1)
Wait for provisioning to complete and an error related to namespaces will appear in the UI.
Delete the cluster.

Result
The cluster will be removed from the "Cluster Management" page but not the "Home" page.
Expected Result
The cluster should disappear from both pages.

Still got this problem in 2.6.2. Cluster does not disappear from home page, status Unavailable.
Any workaround how to remove it?

For a workaround, try removing your finalizers on the cluster:
kubectl patch clusters.management.cattle.io ${CLUSTER_ID} -p '{"metadata":{"finalizers":null}}' --type=merge

set CLUSTER_ID to the id of your cluster (c-xxxxxx)

authors: dnoland1 norcis thedadams


text:
[BUG] Post upgrade, AD user cluster owner cannot list anything on the cluster

Rancher Server Setup

Rancher version:  v2.7.4 upgraded to v2.7.5 upgraded to v2.7.6-head 2cf6683
Installation option (Docker install/Helm Chart): Docker install
Proxy/Cert Details:

Information about the Cluster

Kubernetes version: v1.26.7+k3s1
Cluster Type (Local/Downstream): Downstream Infrastructure provider k3s

If downstream, what type of cluster? (Custom/Imported or specify provider for Hosted/Infrastructure Provider):

User Information

What is the role of the user logged in? (Admin/Cluster Owner/Cluster Member/Project Owner/Project Member/Custom)

If custom, define the set of permissions: AD Standard user Cluster owner

Describe the bug
Post upgrade from v2.7.4 to v2.7.5 to v2.7.6-head, AD user cluster owner, cannot list any resources on the downstream cluster.
As a workaround if we create a project, all the resources load.
To Reproduce

On rancher v2.7.4, enable active directory
Create a downstream node driver k3s cluster 1 node all roles
Add a nesteduser1, a non nested user from the AD server as cluster owner and cluster member respectively.
Upgrade to rancher v2.7.5
Re login as the nested user and a few other users.
Upgrade rancher to v2.7.6-head
Login as the clusterowner user - nesteduser1

Result
Cluster owner cannot list any resources on the UI.
Expected Result
Expected the cluster owner to be able to load resources.
Additional context

This is not seen happening on an upgrade from v2.7.3 to v2.7.4 with auth users
Also not observed on an upgrade from v2.7.3 to v2.7.4 to v2.7.5 to v2.7.6-head with auth users
Also not see on an upgrade from v2.7.5 to v2.7.6-head with local user added as a cluster owner.

"Also not observed on an upgrade from v2.7.3 to v2.7.4 to v2.7.5 to v2.7.6-head with auth users"
@anupama2501  Is the only difference between this and the steps in the ticket, starting with 2.7.3?

We'd love to see the cluster role bindings for each of the users before and after each upgrade.

Maybe the role bindings haven't synced to the downstream clusters yet. If you go back after, do the resources appear? Maybe we just need to add a sleep to the end of the migration.

@MKlimuszka I have provided the setup where the issue is reproduced to @crobby and @nflynt along with the CRTBs for both before and after upgrade.

Moving this issue to-test as PR is merged.

Upgrade checks:

Have the issue reproduced setup in v2.7.6-head

Updated the rancher image, to be v2.7.6-head 53ebd8c
Verified once the rancher server is active, cluster owners can create projects, namespaces and workloads.

Verified upgrade from v2.7.4 >> v2.7.5 >> v2.7.6-head 53ebd8c with nested users added as CO

On rancher v2.7.4, enable active directory
Create a downstream node driver k3s cluster 1 node all roles
Add a nesteduser1, a non nested user from the AD server as cluster owner and cluster member respectively.
Upgrade to rancher v2.7.5
Re login as the nested user and a few other users.
Upgrade rancher to v2.7.6-head
Login as the clusterowner user - nesteduser1
Verified nesteduser1 as cluster owners can create projects, namespaces and workloads.

Verified upgrade from v2.7.5 >> v2.7.6-head 53ebd8c with groups added as CO

Added a group as a cluster owner
Logged in as a nesteduser from the group
Upgarded rancher to v2.7.6-head
Logged in as the cluster owner user from the group
Verified users can login without errors

Verified upgrade from v2.7.4 >> v2.7.5 >> v2.7.6-head 53ebd8c  with groups added as CO
Verified upgrade from v2.7.4 >> v2.7.5 >> v2.7.6-head 53ebd8c  with non nested users added as CO
Verified upgrade from v2.7.5 >> v2.7.6-head 53ebd8c  with non nested users added as CO

authors: MKlimuszka anupama2501 prachidamle


text:
is there a way to modify rancher-compose.yml?

i want to modify the scale number in rancher-compose.yml?
which api can i use?
"…/v1/projects/1a1/environments/1e1/?action=upgrade" dose not work

Hi @danlanxiaohei , looks like you're trying to call scale on a stack rather than a service.... try something like:  ".../v1/projects/1a5/services/1s5". Let me know if that helps.

@danlanxiaohei If you still have questions, please re-open.

authors: aemneina danlanxiaohei deniseschannon


text:
Drop-down in service details page behind the tabs

Rancher Version: master 7/15
Steps to Reproduce:

Click on a Service name from a stack that has a lot of services
Click on the Service name drop-down

Results: Notice the drop-down is behind the tabs

Expected:  Should be on-top

Version - v1.2.0-pre1-rc3


text:
Unable to access kubernetes service by service name

Rancher Version:
1.2.0
Docker Version:
1.12.3
OS and where are the hosts located? (cloud, bare metal, etc):
Centos 7 and bare metal
Setup Details: (single node rancher vs. HA rancher, internal DB vs. external DB)
single node rancher internal DB
Environment Type: (Cattle/Kubernetes/Swarm/Mesos)
Kubernetes
Steps to Reproduce:
Deploy K8s Example Guestbook
Results:
[root@rancher-node1 ~]# kubectl get svc
NAME           CLUSTER-IP      EXTERNAL-IP    PORT(S)    AGE
frontend       10.43.228.70    10.101.1.163   80/TCP     19h
kubernetes     10.43.0.1                443/TCP    2d
redis-master   10.43.92.51              6379/TCP   19h
redis-slave    10.43.191.192            6379/TCP   19h
[root@rancher-node1 ~]# kubectl describe svc redis-master
Name:			redis-master
Namespace:		default
Labels:			io.rancher.stack.uuid=e169756c-1a6b-4614-8536-e09169d5cb1d
name=redis-master
Selector:		name=redis-master
Type:			ClusterIP
IP:			10.43.92.51
Port:				6379/TCP
Endpoints:		10.42.187.216:6379
Session Affinity:	None
No events.
[root@rancher-node1 ~]# kubectl describe svc redis-slave
Name:			redis-slave
Namespace:		default
Labels:			io.rancher.stack.uuid=e169756c-1a6b-4614-8536-e09169d5cb1d
name=redis-slave
Selector:		name=redis-slave
Type:			ClusterIP
IP:			10.43.191.192
Port:				6379/TCP
Endpoints:		10.42.185.29:6379,10.42.63.133:6379
Session Affinity:	None
[root@rancher-node1 ~]# docker exec -ti 6a60 bash
root@redis-slave-fwz4z:/data# redis-cli -h redis-master
Could not connect to Redis at redis-master:6379: Connection timed out
not connected>
not connected> exit
root@redis-slave-fwz4z:/data# ping redis-master
PING redis-master.default.svc.cluster.local (10.43.92.51): 56 data bytes
^C--- redis-master.default.svc.cluster.local ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
**Unable to access kubernetes service by service name **

@ist0ne have you tried this with a newer version of rancher/k8s? Also is your redis image based on alpine? If so you might have to use the fqdn for name resolution. I'll close this out, let me know if you still face issues, we can open a new ticket with more details.


text:
Enable random public port for LB

Today randomly public ports functionality is disabled for LB service. And although it is not very common use case, we should probably add this functionality in. Here are a couple of examples for LB ports definitions:

LB is internal, source port is not exposed:

services
  lb:
    image: <lb image>
    portRules:
      -sourcePort:80
        targetPort:8080
        service: foo

LB is public, source port is published to the same public port on the host:

services
  lb:
    image:<lb image>
    ports:
      - 80:80
    portRules:
      -sourcePort:80
        targetPort:8080
        service: foo

LB is public, source port 80 is published to the random port on the host:

services
  lb:
    image:<lb image>
    ports:
      -80
    portRules:
      -sourcePort:80
        targetPort:8080
        service: foo

UI should also support all 3 models.
@vincent99 let me know if it looks good.

Hi can you please help us and implement this it is blocking us from upgrade to newer version .
this was capability we used in 1.1.3 version and in 1.2 was removed.
Thanks

I also think this is highly useful :) . We did rely on this, and now we need to hand-code all the LB configs. Possible, but annoying, and stops us from migrating.

4 months later, rancher 1.6.3 out now, and I thought I'd ask again: any updates? (or timelines? decisions? ideas? :)

With the release of Rancher 2.0, development on v1.6 is only limited to critical bug fixes and security patches.

authors: alena1108 deniseschannon flypenguin noamkachko


text:
rancher SSL issue on K8S environment

Rancher Versions: v1.2.2 v1.3 v1.3.1
Docker Version: 0.12.6
OS and where are the hosts located? (cloud, bare metal, etc): ubuntu16.04
Setup Details: (single node rancher vs. HA rancher, internal DB vs. external DB) single node rancher
Environment Type: (Cattle/Kubernetes/Swarm/Mesos) Kubernetes
Steps to Reproduce:
Rancher server started behind nginx container and nginx has SSL enabled. I use private CA. When I add the first host to rancher, I put ca.crt to /var/lib/rancher/etc/ssl then start rancher-agent. Rancher related containers can be successfully created, but when to create "kubernetes-controller-manager-1", "kubernetes-kubectld-1" and "kubernetes-kubelet-1" , they were all failed to start:
1/17/2017 7:10:32 PMtime="2017-01-17T11:10:32Z" level=fatal msg="Failed to listen to events: Get https://rancher.demo.com/v1: x509: certificate signed by unknown authority"
1/17/2017 7:10:40 PMtime="2017-01-17T11:10:40Z" level=info msg="Starting kubectld on :8091"
1/17/2017 7:10:40 PMtime="2017-01-17T11:10:40Z" level=info msg="Listening for health checks on 0.0.0.0:10240/healthcheck"
1/17/2017 7:10:40 PMtime="2017-01-17T11:10:40Z" level=fatal msg="Failed to listen to events: Get https://rancher.demo.com/v1: x509: certificate signed by unknown authority"
1/17/2017 7:10:55 PMtime="2017-01-17T11:10:55Z" level=info msg="Starting kubectld on :8091"
1/17/2017 7:10:55 PMtime="2017-01-17T11:10:55Z" level=info msg="Listening for health checks on 0.0.0.0:10240/healthcheck"
1/17/2017 7:10:55 PMtime="2017-01-17T11:10:55Z" level=fatal msg="Failed to listen to events: Get https://rancher.demo.com/v1: x509: certificate signed by unknown authority"
So I'm wondering ca.crt will not be added to kubenetes containers? (my ca.crt was combined with root and intermediate ca certificates)
Thanks.

anyone can help with this? ca.crt in /var/lib/rancher/etc/ssl will not be added to kubenetes containers?

This is fixed in v1.3 series. Self signed certs were not working with 1.2 series and fixed for 1.3.
https://github.com/rancher/rancher/issues/6122


text:
Rancher CLI catalog ls command not working

Rancher Versions: master 3/2
Steps to Reproduce:

run ./rancher catalog ls

Results: Returns Name/Name, supposed to return Name, Category and ID

Verified working with CLI v0.5.0-rc2

authors: deniseschannon tfiduccia


text:
How to test a private catalog

I've created a private catalog. However, one of the templates doesn't show up in Rancher.
Is there any tool to validate the templates?
Or where lies the log which shows what's going wrong in the templates?

@qiuwei
I add the private catalog then just ssh into the machine that has rancher on it.
Then:
sudo -s
docker ps
docker logs --tail=100 -f
If this works can you please close this issue.

does not work... not even with the container name

@rbucker docker logs --tail=100 -f .  This will show you the logs of rancher container and may help you track down your catalog issues.
I also suggest you take a look at http://rancher.com/docs/rancher/v1.6/en/catalog/private-catalog/, this is the help documentation we have for creating and using private catalogs.

You are welcome to close this ticket however it is not resolved. [a] the docker command you indicate does not work as expected... -f does not actually follow the logs [b] the logs do not include any information when I refresh the page.

@rbucker -
[a] We have no control if the docker command works or not.  This is actually something from docker.  docker logs --help, will give you the log options.  If you have more issue with docker commands I would suggest you go to https://docs.docker.com/engine/reference/commandline/docker/.
[b]  The logs are not a tool that will tell you how to fix your catalog.  It may be a first step in showing you which template in your catalog is not working.  If the refresh button is not working, remove then re-add your catalog and see if that helps.  If no templates at all are loading, then it maybe that the catalog structure itself is not correct.  I would again suggest you go our help and ensure you have the correct format.
If in the logs the catalog loads but your template can't be read.   You can post a issue with your yaml for us to look at, or go to rancher forums and post your yaml to get help.

authors: qiuwei rbucker tfiduccia


text:
Check if the cacert pulled from settings is empty

https://github.com/rancher/rancher/issues/13308

I'll merge this, but it doesn't fix the issue.

authors: galal-hussein ibuildthecloud


text:
LB hostname routing support + ServiceLinks/LoadBalancerTarget API changes + lb service healthcheck changes

This PR introduces support for LB hostname routing. As a part of the feature, API changes to service links and LB target were done.
Update: as a part of this PR, Load Balancer healtcheck configuration are done too. Before, we used to read the healthcheck config from the LB service config; now its read on per consumed service basis first. If no healthcheck is defined for consumed service, we always try to read it from the Load Balancer service config - to support backwards compatibility + standalone IP based balancing.

API changes done as a part of the PR:

add/remove/setServiceLinks APIs no longer accept serviceIds. Instead they accept ServiceLink param (for regular service) and LoadBalancerServiceLink (for LB service).

ServiceLink fields:

serviceId
name (DNS name for named links)

LoadBalancerServiceLink extends from ServiceLink, and has 1 extra param:

ports (array[string]). Each value has a format of "[:]". Example: 80:foo.com/bar. Meaning that this service would accept lb traffic to the exposed port 80, and only traffic coming from foo.com domain and /bar path

add/remove/setLoadBalancerTarget also got "ports" param to support hostName routing for the standalone LB case

@vincent99  Besides the new APIs support, following needs to be done in the UI:

Disable standalone LB ^__^
Disable target port on the Load Balancer service; leave only listener port. Target port now defined on per service link basis
Disable healtcheck on the Load Balancer. Now healtcheck is being read from the service that is registered to the load balancer.

#1042

repo: rancherio/cattle


text:
as an operator I do not want to manually have to define roles for ECS EC2 instances

Add project level ecr roles for aws ec2 instances
Add global ecr roles for general ecr tasks

Correct policies are in place, we need to audit the AWS code before moving it into the init process.

So this will stay in progress until that's done.

repo: rangle/the-clusternator


text:
double Thermostat ON/OFF value in MQTT with different content

Dear reader,
I am using ESPAltherma to get "all" the values / measurements of a Daikin Hybride heatpump.
System: Daikin Altherma hybride EHYHBX08AV3
Monitoring: M5StickC
Issue: in both the 'espaltherma/OneATTR/Thermostat' topic as 'espaltherma/ATTR' the attribute 'Thermostat ON/OFF' is being used twice for different registers (0x10 and 0x60). In my system one of them keeps ON (register 0x60; while the heatpump is OFF) and the other switches according to the state of the heatpump (0x10). I assume that both registers have a different meaning, since it became an issue after switching the heatpump on since it's getting cold indoor.
proposed solution: change the name of the topic (for example thermostat1 and thermostat2; this way it can be checked what the meaning of ...1 and ...2 is).
Best regards.

Note that you can edit the names yourself in the code. In the preconfigured config files you had to select in the beginning. For instance to Thermostat_x60 or so.

I do agree that one would need to be renamed.
Did you find what do they correspond to? If not, I'll go with ...1 and ...2

Sorry for the late respons. Yes, I did find the place to change the names, but I opt to keep my version of ESPAltherma consistent with git (and since I am no experienced developer I don't know how to edit it in Git). Therefor I wanted to make a report of this 'issue'.
@raomin: sorry, I still couldn't figure this out. Our thermostat has been connected to X2M 1 and 4 as an ON/OFF switch (we are using EvoHome with their new heatpump ON/OFF module). What I notice is:

it seems like switching ON by the EvoHome module switches on the thermostat2 (x60 register)
thermostat2 switches OFF with a delay (makes sense since switching to fast isn't that good of an idea)
but it stays ON even after the system is stopped completely and can be ON until the next EvoHome action which triggers the heatpump to start
therefor: no clue so far. But it is related to the ON/OFF of the thermostat. Maybe some delay setting of the system? I couldn't find anything yet however.

My understanding for the two thermostats: the one in Reg 0x10 is for the outdoor unit, the other in Reg 0x60 is for the indoor unit. I observed that the IU thermostat only has an impact, when the heating is controlled based on the room temperature (and not based on LWT, what is mostly the case). When the room temperature raises over the set point plus 1/2 of the configured hysteresis, the IU thermostat changes to OFF, as long the room temperature is higher as set point minus 1/2 hysteresis. Then it switches to ON again (like a simple to 2-point controller. Usually the HP controls room temp within hysteresis (they call it "modulation"), but when the sun additionally heats the room the temp can raise up over the control band.
The function of the OU thermostat is not clear to me. Sometimes it's inverted to the IU thermostat...

repo: raomin/ESPAltherma


text:
Unable to see or extract items from a disk

Issue description:
While migrating from 1k to 4k drives, I noticed that one of the drives refuses to have data extracted from it and immediately pops from the IN to the OUT section of the Disk Manipulator. Number of items on the drive is shown correctly. Putting the drive back into a Disk Drive adds the numbers correctly. Putting the drive back into the disk drive does NOT allow me to see any items on that disk from a grid.
Steps to reproduce:
Cannot reproduce. Server restart does not fix the issue
Version (Make sure you are on the latest version before reporting):

Minecraft: 1.10.2
Forge: 12.18.3.2254
Refined Storage: 1.2.23

Does this issue occur on a server? [yes/no]
Yes

I have this issue as well, the disk says it has 4 items on it but is blank when installed and the manipulator does not pull anything. I am assuming it is because it has invalid items on it possibly due to mod removal/upgrade/disabling.

I haven't changed anything in my setup when the issue appeared so I'm not sure what happened. I think my RS might have lost power while transferring items but I don't think that could have caused it. The power outages happened before with no consequences

This is usually just a desync of the number of items on the disk between client and server. Annoying, but you shouldn't have lost anything.

Is there any way to recover the disk?

I am also experiencing this issue. Was caused (to me) from a creeper exploding all over my Refined Storage setup. Upon putting the disks in a new drive, they're not visible in the system. Adding extra items works, and shows up on the disk.
The disk manipulator also does not do anything with the items. Please help, I lost everything. :'(

I am having a similar issue, I moved all my items form my base into my RS system to move to another location, when re-setting up at the new location, Despite having 1 disk full an another half full of the 64k, when viewing in the crafting grid, it shows 0 items

That is a different issue and its a Forge one.

Good ol Forge, You've done it again

So:

The "items disappearing" issue is a Forge one, there is a PR for it but it needs to be tested more
This issue about the incorrect disk drive quantities is a duplicate of #520

The last comment sort of defeats the purpose of the original issue, since it's not what the last few guys commented about. Still relevant or am I missing something?

@DinckelMan I don't think there is a way to recover the disk, but to just cheat in a new one. Normally if the manipulator or grid shows no items in it, then it should be safe to assume there is no items left on it and it is just desync.

If you're worried about losing your stuff in digital storage, which I entirely sympathize with, you might want to check out the Impractical Storage mod. I was quite amused when I saw it the other day. I've not played with it yet, but definitely plan to.

authors: Bamcrab BrianEdmonds DinckelMan Morpheus1101 raoulvdberge way2muchnoise xannor

repo: raoulvdberge/refinedstorage


text:
Inception storage should be blacklisted

Issue description:
Infinite storage and player crash
What happens:
Filled Storage drives can be stored into other storage drives/blocks.
This is a balance issue and leads eventually to client crashes.
What you expected to happen:
Blacklist storage containers from being added, including but not limited to:

filled storage crates from IE or other mods
filled storage drives and blocks from Refined storages
filled backpacks etc.
As a minimum, prevent to store items that are too complex (NBT size bigger than 500 bytes or something).

Steps to reproduce:

fill a container
try to place it into another

Version (Make sure you are on the latest version before reporting):

Minecraft: 1.10.2
Forge: forge1.10.2-12.18.1.2094
Refined Storage: refinedstorage-1.1.1

Does this issue occur on a server? [yes/no]

Fix clients crashes doesn't qualify as a Feature request, just saying

I'd say that just having a storage item/block that has any inventory filled up should be blacklisted, but even if it is just that, I would think that you would need to integrate multiple mods and check if any of the items/blocks have any items in them.

There is plenty of mods who allow nested storage. But I guess some check for complex NBT could be nice.

Nested storage I don't care about, but there must be some checks for NBT size to avoid crashes.

sometimes storage nesting things like this is a really bad idea example storing forestry saplings in your  refined storage causes bad things to happen because of the  lots of metadata and if u have to mutch metadata  it leads to a. crashing b.notbeingable to login due to the metadata cap being reached XD

He makes a pretty good point. Maybe set a specific limit to how full, or how much metadata one specific item or block has. Maybe a cap of 50 items, so that there is no crash, and that "b." that was listed above. Or maybe a set limit on the amount of metadata a specific item or block has. That is also an idea, so if you have many nested drives.

or maby compress the metadata of similar items as in an metadata table and where and what is stored

We had a similar problem on a ftb server I moderated a while back, players would go to move bases and put all of their 64k storage drives (may have use the larges ones from the extra cells mod?) in their inventory and their player file size would get to big and they would crash out of the server and ultimately loose their inventory, and this was with the original AE in 1.7.10

So yeah. Not sure if compression of metadata is possible, but maybe a filter for putting storage in your inventory, or storage system, so that the crash, and whole inventory deletion does not have to happen.

Metadata doesn't matter, it's the NBT tag size.

Player's inventory has a limited size, the same way AE disk are limited in storage capacity.
Allowing inceptions is allowing unlimited storage. We have to remain consistent in our design.

This is not an issue anymore with Item#getShareTag.

What is Item#getShareTag ?

It is a smaller tag used to send to the client. As not all tags need to be sync every time.

Does that mean it needs to be designed as such in the mod? when can we get a version with the actual fix?

I don't think this is actually fix with this tho. As there will still be an NBT overflow on the server side. But I'll be discussing it with @raoulvdberge when he wakes up.

authors: LemADEC LousyLynx ilordnightmarei jtb1313 raoulvdberge way2muchnoise


text:
Autocrafting - Process crafting using Soldering Station fails on Speed Upgrade

Issue description:
Configuration:
4 Auto Crafters handling pattern recipes
1 Auto Crafter handling process recipes w/Soldering Station
1 Importer on bottom of Soldering station to remove completed items
Full Crafting chain for Speed Upgrade module supported.
When I order a speed upgrade it:
Process crafts glass  (furnace->glass)
Process crafts all soldering station components for blank upgrade chip
Pattern crafts sugar.
removes redstone from inventory
removes sugar from inventory
removes 'blank' upgrade chips from inventory
At this point the crafting monitor says it's waiting on the final step, the actual processing of the speed upgrades.
This is done via the process crafter hooked up to the soldering station which successfully worked to create all the components needed for the blank upgrade chip.
however the items never make it into the Soldering station.  (This is on a SMP) I had the inventory of the soldering station open while another player performed the craft.  I watched all of the prerequisite components go into the soldering station and out again.  The speed parts never entered the soldering station.
I repeated the process with all of the prerequisite items already crafted in inventory.  10 blanks, 10 sugar, 10 redstone.
The results were the same.  the items were removed from inventory, the crafting monitor hung at that point, and the items never entered the soldering station.
This seems to be an issue with the method of insertion failing.
What you expected to happen:
Items enter Soldering station, craft, are inserted into inventory from Importer.
Steps to reproduce:
Have torn down/reset system and same result. happens.

...
Version (Make sure you are on the latest version before reporting):

Minecraft: 1.10.2
Forge: forge-1.10.2-12.18.2.2151-universal.jar
Refined Storage: 1.2.6

Does this issue occur on a server? [yes/no] yes
If a (crash)log is relevant for this issue, link it here:
no crash log, no logging of any event related to this.
[pastebin/gist/etc link here]

The more I look at this the more I think the problem revolves around the fact that neither the blank upgrades nor the speed upgrades stack -- but it's probably trying to push 'em all into the crafter at once.
There's no reason that those upgrade modules SHOULDN'T stack.  They don't have a configuration, nor do they have DMG.  I haven't dug into any metadata yet -- so I'm not sure if you're using metadata to store temp information when the speed module is installed.
either way -- just a direction to look.

Then not stacking shouldn't be the issue.

I have the same issue.
This did work in version 1.2.4, but when i upgraded to 1.2.6 this issue occured.
I did some trouble shooting.
When I autocraft it stops just like in the report. The upgrades that was created is voided and is not in the system.
When I noticed this I performed the following:
I shift click (I think it was 3 of each) sugar, upgrade and redstone into the solderer the first speed upgrade is created.
But when the second should start it only processes the upgrade, the suger and redston stays in their slots.  The upgrade that is processed is voided once processing is compleete.
The thing that is strange is that manually I can get the speed upgrades to be crafted if i add the resources for one speed upgrade at the time.
But when autocrafting none at all gets created.
I hope this helps!

You guys rock!

authors: BrewAndCode Moogrok way2muchnoise


text:
Unable to join world

Issue description:
server crash due crafting overload?
What happens:
I recentely asked my Refined storage system to craft Quaddouble compressed cobblestone. I know form expirience that I can't put all the patterns in the same crafter becaus it will overload the crafter and crashes (for some reason). So I split the patterns in 3 crafters. asked for it to craft and I see the double and triple compressed apreing but then it crashes. I lose my conection on my singelplayer world. Every time I try to join the world now I loe conection again. Every time I do so I can see the textures of the RS-sytem. and it looks like my disks are full. Could this be a bug?
What you expected to happen:
Some way to get back in my world.
Steps to reproduce:
Read the above.

...
...
...
...

Version (Make sure you are on the latest version before reporting):

Minecraft: 1.10.2 (Skyfactory 3)
Forge: 12.18.3.2215
Refined Storage: 1.2.18

Does this issue occur on a server? [yes/no]
Yes and no.
If a (crash)log is relevant for this issue, link it here:
[http://pastebin.com/8FBmgzzh]

#673


text:
InlineStr stores length inside string buffer

While not really a problem, it's weird to me to store length of a string inside the string buffer itself, especially without any comments about it in the code.
It shouldn't break anything to make it a separate field in struct (and decrease MAX_INLINE_STR_LEN by one), and it would make it more readable/obvious what it is doing.
const MAX_INLINE_STR_LEN: usize = 3 * std::mem::size_of::<isize>() - 2;

pub struct InlineStr {
    inner: [u8; MAX_INLINE_STR_LEN],
    len: u8,
}

If, for some reason, it's not possible, I suggest at least putting a comment explaining the behaviour and reasoning.
Code change would be what's in playground here: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=267627926e4a7d246e4b4e3ecb10483d and changing https://github.com/raphlinus/pulldown-cmark/blob/ea1b4cd4dbcf912129f14dd81ad4809f0d5d1999/src/strings.rs#L278-L280 to
// we need 4 bytes to store a char
assert!(MAX_INLINE_STR_LEN >= 4);

Totally agreed that this is a wart, and your solution looks much better.
I would be most happy to merge any pull request implementing your suggested changes!

repo: raphlinus/pulldown-cmark


text:
Metadata extraction fails on 4-space-or-more indented content

I'm working with the latest version on master, and found that you can blow up the first pass parse time (to a degree where I haven't seen it stop!) with any content indented by four spaces or more:
---
anything:
    indented4Spaces: true
---

Configuration:
let mut options = Options::all();

(I imagine this is possible to trigger by just enabling the ENABLE_YAML_STYLE_METADATA_BLOCKS option, but haven't checked yet.)
This goes for any time something is indented that far in the metadata block, including nested keys like this:
---
something:
  nested:
    twice: true
---

Or lists:
---
lists:
    - indented 4 spaces
---

Thanks, it was an important bug. It has been fixed in #690.


text:
Passwords

Some bad keys have passwords. Do we have a preferred format/method for storing these alongside the key?

Better just to remove the password? :)

Happy to go with that solution. :)
On 14/10/2015 09:44, Meatballs1 wrote:

Better just to remove the password? :)
—
Reply to this email directly or view it on GitHub
https://github.com/rapid7/ssh-badkeys/issues/5#issuecomment-147977182.

Just removing the password probably makes the most sense, but we could reference it in the YAML file if needed.


text:
[Bug]: Error in container startup when going for cluster setup in rapidfort/couchdb-official

Name and Version
rapidfort/couchdb-official:3.3.3
Which runtime are you using to reproduce this issue?

[ ] Kubernetes
[ ] Docker Compose
[X] Docker

Is this issue reproducible on the original source image?
Reproducible
Could you please identify the category? Details in TROUBLE_SHOOTING.md
Unknown
What steps will reproduce the bug?
Run the container using the following command docker run -d --name rcdb-3e -e COUCHDB_SECRET=hello -e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password -e ERL_FLAGS="-setcookie brumbrum" -e NODENAME=couchdb1 rapidfort/couchdb-official:3.3.3
The container should exit.
Are you using any custom parameters or values?
No response
What is the expected behavior?
The container should start normally
What do you see instead?
sh: 1: /opt/couchdb/bin/../erts-12.3.2.14/bin/epmd: Exec format error as it is not able to parse it. I believe it has similar reasons related to env as #610
Additional information
This prevents the user to create a cluster setup directly. Other environment variables are parsed only this is one is crashing the container. Docs and requirement of the NODENAME variable.
Rapidfort Image => rapidfort/couchdb-official:3.3.3
tested against => couchdb:3.3

When manually writing the variable in /opt/couchdb/etc/vm.args the same error is being thrown and container crashes.

To reproduce:

docker exec -it rcdb-3 cat /opt/couchdb/etc/vm.args > vm.args
Add -name couchdb@127.0.0.1 (from docs) at the end of this file.
Copy the file docker cp <your-local-path>/vm.args rcdb-3:/opt/couchdb/etc/
Restart the container, it will crash

Other ways to test out:

At port 5985 is the official image of couchdb running where as on 5984, rapidfort/couchdb-official is running, we can see that in the first container, clustering is working fine and setup is done, where as in second container its giving an error due to above mentioned causes

repo: rapidfort/community-images


text:
Add GCP HPO example

Add HPO example on AI Platform without Ax

Close with #82

repo: rapidsai/cloud-ml-examples


text:
[FEA] More efficient gradient computation

#340 proposed some minor improvements to gradient computation. However, I think there is still potential for a much stronger improvement. Specifically, by creating an custom ElementwiseKernel, we could write all gradient terms into an ndim + 1-dimensional output array during a single pass over the input image. That should be much more efficient than the repeated slicing operations as proposed here.
This could eventually be ported upstream for use in cupy.gradient as well.

We have 6 or 7 functions that directly call gradient directly and a number of others that call it indirectly, so this would be generally useful across the library.

repo: rapidsai/cucim


text:
RFC: Alternative server-side rendering (SSR) architecture

This is quite long and windy, perhaps the code example at the end is the best TLDR.
The problem
It would be nice to "use Laminar on the backend", i.e. share Laminar code between frontend and backend. This would let the server return static HTML with all the web page content, instead of returning an empty HTML document that is only populated with the content by the Javascript (Scala.js / Laminar) on the client side.
Inconveniently to this goal, Laminar components are heavily reliant on the single-threaded JS runtime environment and native JS types, and can not run on the JVM. Eliminating these dependencies would require a lot of work and would complicate our design with nontrivial cross-platform abstractions. It would not be a good tradeoff.
Some other libraries like React.js can offer server side rendering because their DOM virtualization layer makes them less tied to real JS types, and because Javascript is dynamically typed, and because server side rendering with React.js is still done in Javascript (on node.js), whereas for Scala.js libraries like Laminar, "server side" means the JVM – a completely different environment that our library is not suited for.
Status quo: Rendering with Javascript on the backend
It is theoretically possible to run Laminar in JS on the backend, e.g. in node.js with jsdom, or in a headless browser (example). Such an approach can provide all Laminar features while requiring few if any code changes to your frontend code.
For example, if you have a Laminar frontend to book hotels, and you want to make the content of hotel pages available to search engines that can't crawl content generated by client-side Javascript, you could pre-render these Laminar pages in a headless browser on the backend, and output the resulting HTML to the users (and search engine bots). Then when the static page loads, you could initialize a live Laminar app which would overwrite the server-returned HTML to enable the interactive web app functionality that the users need, but the search engine bots don't care about.
So far I've been recommending this approach precisely because you can apply it to any Laminar web app, and get (almost) all Laminar features working out of the box. I still think that this could be a viable approach, but for now I personally don't have the time to investigate it further.
See also: https://github.com/raquo/Laminar/issues/60
Proposal: Rendering on the JVM
So, I can not re-implement Airstream and Laminar to run on the JVM – while that is technically possible, the required complexity is not worth it, and extremely so. Also, the amount of work this would require, both for the initial implementation and subsequent maintenance is not something I can afford to offer to the community. Laminar can be very simple precisely because it only runs in JS, and I'd like to keep it that way.
With that out of the way, here is what I am thinking: we create a new project that lets you build HTML on the backend using the new, generator-based Scala DOM Types (https://github.com/raquo/scala-dom-types/issues/87). So, you would say stuff like div(attr := "key", b("bold text")), get an instance of some TemplateElement class, from which you can later read all the key-value pairs and all the children that you've added to it. You can call an amend method to add more modifiers, or call getHtmlString.
On its own, this would essentially be a templating language with a familiar syntax that looks like Laminar, but without the reactive parts – no onClick, no children, no observables.
So, let's see how we can integrate these new templates with Laminar. First, let's outline some of their properties:

Every template describes the a single element subtree, e.g. div(attr := "key", b("bold text"))
Such templates are cross platform – their code can be shared between Scala.js and JVM
Every template can be encoded as a string for network transport – as pure HTML (or SVG, I guess?)
Templates are fully declarative. Airstream observables, onMount* hooks, and custom modifiers are not allowed.
Every template can be diffed against another template, or against a real JS DOM element

With these features and constraints, we could easily use the same template both on the server to output its HTML, and on the client to create a real DOM element. We could even achieve efficient hydration, that is, the frontend code could instantiate a template / Laminar element from the HTML returned by the server without re-creating elements from scratch. And of course we would be able to similarly build a new Laminar element from any template on the frontend, even if it wasn't returned by the server as HTML.
This is all well and good, but the question remains – how can we integrate Laminar's reactive functionality – inserting dynamic children, adding event listeners, etc. – into these cross platform templates? Laminar already has good support for integrating with third party DOM libraries (at least in 15.0.0), so this is actually very doable:

For adding event listeners, onMount hooks, and other arbitrary binders / modifiers, all we need is a reference to the target element, so we need to somehow "mark" it in the template's HTML code, so that we can find the target element later on the frontend.
For inserting children, we need to mark not an element, but a certain location in the DOM produced by the template as the injection point for the children. Laminar already does this using the so called sentinel nodes: whenever you add e.g. children <-- stream to an element, Laminar actually adds an empty comment node in that location, so that it knows where to insert the children once the stream starts emitting.

The common thread here is that we somehow need to mark places in the DOM / HTML of the template, and then some way for Laminar to query the resulting DOM to find those elements. For referencing elements, we could associate the target element with some string identifier via data-* attributes, HTML class names, or id attributes, and similarly for children insertion reference points we could use some variation of sentinel nodes.
This approach feels rather similar to returning static HTML from the server, then initializing islands of interactivity on it with jquery. Conceptually, yes, it's quite similar, but I'm hoping that the details are different enough to make our approach safer and more ergonomic.
Example
// Cross-platform code:
// Note that T.div(...) is not a laminar ReactiveElement, it's a completely separate, cross-platform type as described above.
// That type is merely descriptive / declarative, instantiating it does NOT instantiate a real HTML element.

val template: TemplateElement = T.div(
  T.button(ref("btn")),
  slot("children-x")(startWith = T.i("Loading..."),
  "Hello world"
)
teamplate.htmlString == """

    <button id="btn" />

      Loading...

    Hello world

"""

// Frontend-only code:

// create a DOM element from the template, and wrap it into a reactive Laminar element type.
val laminarElement: ReactiveElement = createElementFromTemplate(template)

// alternative: if the server provided the HTML of this template, and you know where to find it in the existing DOM:
// val elementInDom: dom.Element = ??? // find by id, by data attr, etc.
// val laminarElement: ReactiveElement = hydrateFromDom(template, elementInDom)

// add event handler to the div itself
laminarElement.amend(onClick --> ...)

// find the button by its ref id, and add event handler to it (not the div)
laminarElement.findChildByRef("btn").amend(onClick --> ...)

// alternatively if the server has already provided the HTML of the template, and you don't otherwise
// need the `template` variable on the frontend, you can just find the button by its ref in the DOM,
// specifically within the `elementInDom` element in the DOM:
val myButton: ReactiveElement = findRef("btn", elementInDom)
// and then you can do Laminar things with it
myButton.amend(onClick --> ...)

// add children to the end of the div (after "hello world")
laminarElement.amend(children <-- ...)

// find the slot by its id, and add children to it, replacing the default "Loading..." element.
laminarElement.findSlot("children-x")(children <-- ...)

Of course, using strings for referencing elements is not very safe – you might make a typo, or forget to add a necessary event listener altogether. I still need to come up with some design patterns for minimizing the unsafety, which could be as simple as shared scoped constants.
There's also the annoyance of needing the identifier strings to be unique, either globally or within some subtree of the DOM (which the frontend then needs to first find the root of). This will be especially painful if you use multiple usages of templates for reusable components like buttons with more than one reference inside (e.g. referencing the button text, and separately the button's icon). Again, need to find design patterns that would reduce the chance of name collisions, and ideally throw errors or warnings if duplicate ref ids are found. Since the DOM is hierarchical, perhaps some kind of namespacing could work.
With all this, you still wouldn't want to write your whole web app UI using these cross platform templates because they require some boilerplate to integrate with Laminar, and do not offer any reactive features on their own. However, you probably don't need to use the new templates for most of your components. If rendering pages statically, you probably only need the server to render the static HTML of the main layout, header/footer/navigation, and the main content – you don't care about any interactive elements, calendar widgets, etc. – you can just initialize those parts on the client side only, without making them cross-platform. So basically the only cross platform templates you'll have will be the ones with a lot of content and minimal interactivity.
Requesting comments
This new approach isn't fully fleshed out yet, but I welcome comments and concerns.
I am very interested to know whether this level of client-server integration / code sharing will meaningfully address the server side rendering demand for your application, or if the other approach of rendering Laminar apps inside a headless browser (or node.js+jsdom) is more appealing to you despite the requirement for more complex backend infrastructure. Note that I am not yet committing to implement either of these approaches, I need your feedback to inform the decision and prioritize the implementation.

I definitely think this approach has possibilities. We already do something similar (just for static rendering) in our app, where we have templates shares between Laminar on the front end and Scalatags on the backend - a few platform specific import objects on each side mean I can use the same code in both cases. But that does nothing for hydration, etc. which of course is the big problem.
One possibility that might help ease some of the pain for the library user is to have another library/extension on the JVM side that accepts all the Laminar syntax, but then does nothing for stuff like onClick or onMount, and just generates the sentinel nodes/markers needed for other cases. You could even have a fake library that implements the AirStream syntax for the JVM, but basically does nothing, so that the client code compiles without changes. That's quite ugly architecturally, but I think it definitely beats having to manually look up and wire things from the client side.

@deterdw I'm not sure how this would work on a technical level. I assume the goal is to be able to write a Laminar component once, put it into shared, and cross-compile it for both the JVM and JS targets. On the JVM it would be used to render static HTML, and on JS it would be used as usual.
If I understand your idea correctly, you're saying I could define all Laminar types in a parallel JVM library – all with the same package names and class names etc. – but on the JVM side the types would be slightly different, e.g. our ReactiveElement would have no .ref (because it's a JS type), and no type param (again, JS type), so in your shared code you won't be able to use .ref, and you would need to use type aliases like HtmlElement that don't reference JS types explicitly, and on the JVM they would in fact alias to a different, JVM-compatible type, whereas in JS they would stay what they are (ReactiveHtmlElement[dom.html.Element]).
For that, I would need to reimplement the entirety of Laminar and Airstream API in JVM, but the entirety of Airstream would essentially be noop, and all the parts that don't directly affect the produced HTML (such as event handlers) would also be noop.
Is that approximately what you meant?
On its own this would let us generate the HTML code for Laminar components on the backend, but would not immediately provide efficient hydration functionality.
Regarding hydration in this model... well, I guess it would be possible if we can make certain assumptions like "the backend has already created all the exact same static elements that this Laminar component creates, so all we need to do is hang event listeners and insert dynamic children that we know the backend didn't do". It could work with sentinel nodes etc. as you said, but I imagine it would be rather fragile when the backend unexpectedly generates different HTML (e.g. because it passed different input arguments to the component on the backend, compared to the arguments we pass to the same component on the frontend). Well, If we ever get to this point I would need to research other libraries' hydration algorithms.

I wonder if any other libraries do this kind of thing, where the user writes code in shared, but that code ends up compiling to use different types and implementations on the frontend and on the backend, with no shared trait common to those types. OTOH I suspect that Scala might be ok with that, but IDEs might throw a fit.
I feel like maybe code-generating macros would be a better technical solution to this. We don't really care that the frontend and backend copies of the component use the same source code, right? We just want them to produce the same HTML to make server side HTML generation and hydration possible without source code redundancies.
So, perhaps we could write our Laminar components as usual, none of that JVM stuff, and have them annotated with some macro that would parse the component source code and create a JVM-compatible version of the component, and perhaps also modify the frontend version of the component to add the necessary hydration helpers like sentinel nodes (for example, if it sees a child <-- foo, it could wrap it into hydrationSlot("1")(...) on the frontend, and also create the same hydrationSlot("1") in the JVM version. Maybe the hydration will be less fragile that way.
Another bonus of this macro approach is that we can start with the simple approach outlined in the ticket, and then add this on top later as time allows. The downside is that know nothing about Scala macros, so I can't even be sure that this approach is workable, but overall it does look more promising to me than reimplementing Laminar APIs with JVM types. Although it's still a lot of work. I would really need to be on a different level in terms of how much time I can devote to Laminar development if I am ever to attempt this. But yet again on the upside, this does not require any changes to Laminar APIs, so other developers with more time and experience with macros can try to take a shot at this as well.
So anyway, thanks for your comment, even if I misunderstood it, it gave me more promising ideas.

Thanks for the friendly reply. I think you got the gist of the idea. I agree it's a lot of work in any way that one approaches it.
The proposal at the top remains the necessary first step. Just generate a text-outputting library with the same structural API as Laminar has. Then one can trivially output the static HTML, which serves some important use cases. As I outlined, this can already be done today with a Scalatags-based hack. Based on that hack, I can confirm that IDEs really don't like this approach, but Scala is OK with it :-)
And one can follow a pattern of defining the component statically in the shared sources and then using .amend on the front end to add the dynamic functionality.
Regarding hydration, it's not necessary to implement all of Airstream. You can have a minimal set of types, e.g. Source[A] and Sink[A] and stipulate that shared code is limited to <-- Source and --> Sink or something like that. The downside is that one has to do some of the wiring independently of the rendering, but that's not worse than React, is it?
The point is that there is no need to support all of Laminar and all of Airstream. The library author gets to stipulate what is supported in shared code and users who want more are free to contribute it :-)
A macro-based approach or even transforming source files with an SBT plugin is another way to do it for sure. I think even in that case there will be some limits as to what is supported and what not, because otherwise parsing might become too complicated.
Regarding other libraries for the domain, the only non-virtual dom one that I know that supports shared templates is WebSharper (C#/F#). But that uses a bunch of custom attribs in the HTML, so it's a very different beast.

authors: deterdw raquo

repo: raquo/Laminar


text:
.btn-groupのbox-shadow

.btn-group > .btn の box-shadow の見栄えがあまり良くないため修正。
【案】
.btn-group > .btn の box-shadow を none して， .btn-group に対して box-shadow を指定？

https://github.com/raryosu/Rin/commit/c1707c8a6da01ef6a7db201045e1126fa4587ef8 にも含めてしまっていた…

repo: raryosu/Rin


text:
[BUG]Change in returned dimension of return value of capture_array when going from RPI4->RPI5.

Please only report one bug per issue!
Describe the bug
We have noticed that, when going from RPI4->RPI5, the numpy array returned from capture_array has changed shape. Specifically, the width has doubled and the height as remained the same. Originally, this output a junk image. We found if we only take the odd columns, we get the correct image. We assume this is due to a bit related error. Though, both the numpy array and our sensor mode are 8 bit.
To Reproduce

Initialize the camera on RPI5.
Make a capture via capture_array('raw')
Examine the size and compare to the sensor mode (these should be unequal).

Expected behaviour
The camera properly returns the size of image as defined by the sensor mode (480, 640) instead of (480, 1280).
Hardware :
We are using an RPI5 with a Sony IMX 219 camera connected via HDMI.
Additional context
Add any other context about the problem here.

Raw formats are different on Pi 5 compared to all earlier Pis. Definitely worth reading section 4.2.2.3. "Raw streams and the Sensor Configuration" on page 21 of the manual. There's quite a lot about the differences between Pi 4 and Pi 5 there.
As always, if you can supply a specific example, just a few lines of code, where you configure a raw stream and it's not what you expect, that would be helpful. I would start with something like this:
from picamera2 import Picamera2

cam = Picamera2()
config = ...  # however you make your configuration
cam.configure(config)
print(cam.camera_configuration()[raw])  # is this what you expect?

Thanks!


text:
Using __STATIC_FORCEINLINE coming with cmsis_compiler.h brings extra portability

Hi,
I am starting porting pico-sdk to arm compiler 6, and I notice that:

pico-sdk uses cmsis
pico-sdk uses __force_inline (and always together with static)

So, how about use __STATIC_FORCEINLINE provided by CMSIS (and it supports GCC, LLVM, IAR, AC5 and AC6) to gain better portability?
or maybe you don't have to change each of the __force_inline into __STATIC_FORCEINLINE but simply define it as __STATIC_FORCEINLINE in platform.h
It is just a suggestion.

IIRC pico-sdk optionally uses cmsis?

I am not sure. But use it could bring some cross-platform benefits.

Yeah we won't be using the CMSIS headers directly.

authors: GorgonMeducer kilograham lurch

repo: raspberrypi/pico-sdk


text:
🛑 Purdue Mirror (plug-mirror.rcac.purdue.edu) is down

In f9b87cc, Purdue Mirror (plug-mirror.rcac.purdue.edu) (https://plug-mirror.rcac.purdue.edu) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Purdue Mirror (plug-mirror.rcac.purdue.edu) is back up in 54dd8c9.

repo: raspbian-addons/status


text:
Centos 7: Installation failed, reverting ./composer.json to its original content.

Attempting fresh install of Ratchet on Centos version 7.7 system, following the Install guide. Composer installed fine.
Problem is:
[root@localhost html]# php ./composer.phar require cboden/ratchet
Using version ^0.4.3 for cboden/ratchet
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for cboden/ratchet ^0.4.3 -> satisfiable by cboden/ratchet[v0.4.3].
    - cboden/ratchet v0.4.3 requires react/socket ^1.0 || ^0.8 || ^0.7 || ^0.6 || ^0.5 -> satisfiable by react/socket[v0.5.0, v0.5.1, v0.6.0, v0.7.0, v0.7.1, v0.7.2, v0.8.0, v0.8.1, v0.8.10, v0.8.11, v0.8.12, v0.8.2, v0.8.3, v0.8.4, v0.8.5, v0.8.6, v0.8.7, v0.8.8, v0.8.9, v1.0.0, v1.1.0, v1.2.0, v1.2.1, v1.3.0, v1.4.0, v1.5.0, v1.6.0] but these conflict with your requirements or minimum-stability.

Installation failed, reverting ./composer.json to its original content.

The file composer.json:
{
    "require": {
        "react/event-loop": "^0.4",
        "react/socket": "^0.4"
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}

Suggestions?

I copied composer.phar to my home directory and ran the command
php ~/composer.phar require cboden/ratchet
which then worked and installed. I had been trying to run it from /var/www/html/ where I had been doing everything.

repo: ratchetphp/Ratchet