Implement OpenSSF scorecard

The idea is to implement the scorecard by the Open Source Security Foundation (OpenSSF).
We can take inspiration on the tool deps.dev who already have an implementation:

Those data are available online and fetchable by REST API. I think we should implement this like Bundlephobia API (by exposing an API on the HTTP Server to avoid cross domain issues).
The question that remains is where in the interface should we place this information?

Well received.

I mean if I get it well, I'd enhance an existing Http RestApi with endpoinds and models as shown the doc OpenSSF Api Documentation

We now have a back-end SDK to consume the OpenSSF API: https://github.com/NodeSecure/ossf-scorecard-sdk. So the overall idea is to:

Add an API on the CLI http server and use the SDK to fetch the Scorecard result.
Add UI in the left menu (and load data on the http server when we select a package).

For the UI my idea is to add a little menu/info where I draw a red line:

We can move step by step with a first version that only show the score. Then later we can code the complete UI to show all checks details (like deps.dev).


Meta data for events

We should add meta data entries for events such as event_date and event_location

... or use generic meta data entries such as date and location ?


Example TF: Delegate Policy ARN cannot be calculated during plan

Error: Invalid for_each argument
│
│   on ../../terraform-aws-harness-delegate-ecs-fargate/main.tf line 213, in resource "aws_iam_role_policy_attachment" "task":
│  213:   for_each = var.delegate_policy_arns
│     ├────────────────
│     │ var.delegate_policy_arns is set of string with 1 element
│
│ The "for_each" set includes values derived from resource attributes that cannot be determined until apply, and so Terraform cannot determine the full set of keys that will identify the instances
│ of this resource.
│
│ When working with unknown values in for_each, it's better to use a map value where the keys are defined statically in your configuration and where only the values contain apply-time results.
│
│ Alternatively, you could use the -target planning option to first apply only the resources that the for_each value depends on, and then apply a second time to fully converge.

@elisimmonds Are you creating an aws policy in the same terraform project and then passing it to the module via ar.delegate_policy_arns? If so you will need to create that policy first (comment out the module code or using the -target flag) and then apply the module.

Yeah, i'm following the example in the README. if this is unsupported, should the readme example code be modified accordingly?


Space Between Horizontal alignment in table rows

Hi, is there any to way to align the rows and their headers. Actually, I am gonna need something like the space between alignment that exists in Row widgets. Please, let me know if there is any way to do it, or if you consider about it.

Don't get you. Please provide a picture

Something like this

You can use column type numeric ( DataColumn -> numeric: true) to right align or use align widgets (such as Center) to align header and cell contents:
DataTable2(
              columnSpacing: 12,
              horizontalMargin: 12,
              minWidth: 600,
              smRatio: 0.75,
              lmRatio: 1.5,
              columns: const [
                DataColumn2(
                  size: ColumnSize.S,
                  label: Text('Column A'),
                ),
                DataColumn(
                  label: Text('Column B'),
                ),
                DataColumn(
                  label: Center(child: Text('Column C')),
                ),
                DataColumn(
                  label: Text('Column D'),
                ),
                DataColumn2(
                  label: Text('Column NUMBERS'),
                  numeric: true,
                  size: ColumnSize.L,
                ),
              ],
              rows: List<DataRow>.generate(
                  100,
                  (index) => DataRow(cells: [
                        DataCell(Text('A' * (10 - index % 10))),
                        DataCell(Text('B' * (10 - (index + 5) % 10))),
                        DataCell(
                            Center(child: Text('C' * (15 - (index + 5) % 10)))),
                        DataCell(Text('D' * (15 - (index + 10) % 10))),
                        DataCell(Text(((index + 0.1) * 25.4).toString()))
                      ]))),
        )


PhpInputStream's getSize function is Wrong!

reference: https://www.php.net/manual/en/wrappers.php.php
php://input is not support fstat

Supports stat()
php://memory and php://temp only.

[ ] I was not able to find an open or closed issue matching what I'm seeing.
[ ] This is not a question. (Questions should be asked on chat (Signup here) or our forums.)

Provide a narrative description of what you are trying to accomplish.
Code to reproduce the issue

Expected results

Actual results

@zhushengwen
fstat and stat are two different PHP functions.
Can you provide failing test case, please?

@zhushengwen
Please create a pull request with an unit test which illustrates the problem.
It's very hard to reproduce the problem per screenshot. 😉
Thanks in advance!

This repository has been closed and moved to laminas/laminas-diactoros; a new issue has been opened at https://github.com/laminas/laminas-diactoros/issues/2.


[Question] how to make funnel query run faster?

hi, I need to use clickhouse to funnels query
Data

the table trajectory_trackless_complex has<PHONE_NUMBER> rows
pageid: 2538 --> 3242 --> 1682, ( homepage --> listpage --> detailpage )

Use sequenceMatch, throw error
SELECT
    sum(step1_condition) AS home,
    sum(step2_condition) AS list,
    sum(step3_condition) AS detail
FROM
(
    SELECT
        loginkey,
        max(pageid = 2538) AS step1_condition,
        sequenceMatch('(?1).*(?2)')(toDateTime(createtime), pageid = 2538, pageid = 3242) AS step2_condition,
        sequenceMatch('(?1).*(?2).*(?3)')(toDateTime(createtime), pageid = 2538, pageid = 3242, pageid = 1682) AS step3_condition
    FROM datacenter.trajectory_trackless_complex
    WHERE intotime = '2018-03-01'
    GROUP BY loginkey
)

↗ Progress: 875.45 million rows, 12.42 GB (76.01 million rows/s., 1.08 GB/s.) ██████████████████████████████████████████▊ 98%Received exception from server (version 1.1.54342):
Code: 160. DB::Exception: Received from hadoo:9000, <IP_ADDRESS>. DB::Exception: Pattern application proves too difficult, exceeding max iterations (1000000).

Query sql
SELECT
    sum(step1_time != 0) AS home,
    sum(step2_time != 0) AS list,
    sum(step3_time != 0) AS detail
FROM
(
    SELECT
        loginkey,
        groupArray(pageid) AS events,
        groupArray(createtime) AS events_times,
        arrayFilter((time, name) -> (name = 2538), events_times, events)[1] AS step1_time,
        arrayFilter((time, name) -> ((name = 3242) AND (time >= step1_time) AND (step1_time != 0)), events_times, events)[1] AS step2_time,
        arrayFilter((time, name) -> ((name = 1682) AND (time >= step2_time) AND (step2_time != 0)), events_times, events)[1] AS step3_time
    FROM
    (
        SELECT
            pageid,
            createtime,
            loginkey
        FROM datacenter.trajectory_trackless_complex
        WHERE pageid IN (2538, 3242, 1682)
        ORDER BY createtime ASC
    )
    GROUP BY loginkey
)

Execute result
it uses 377sec

Question
how to optimize the query ?
Thank you very match

Probably you've already seen that video https://www.youtube.com/watch?v=YpurT78U2qA ?
Presentation is here: https://events.yandex.com/lib/talks/247/
Your funnel is not too complicated, try to play a bit with array operators, and aggregate function modifiers, for example something like that will probably work faster that your select:
SELECT
    countIf(1,step1_time != toDateTime(0)) AS home,
    countIf(1,step2_time != toDateTime(0)) AS list,
    countIf(1,step3_time != toDateTime(0)) AS detail
FROM
(

    SELECT
        loginkey,
        minIf(createtime, name = 2538) step1_time,
        minArray(arrayFilter(time ->  step1_time <> toDateTime(0) and time > step1_time, groupArrayIf(createtime, name = 3242) )) AS step2_time
        minArray(arrayFilter(time -> step2_time <> toDateTime(0) and time > step2_time, groupArrayIf(createtime, name = 1682) )) AS step3_time
    FROM datacenter.trajectory_trackless_complex
    WHERE pageid IN (2538, 3242, 1682)
    GROUP BY loginkey
)

:+1:  :+1:  :+1:  it's very useful for me, thank you very match
SELECT
    countIf(1,step1_time != toDateTime(0)) AS home,
    countIf(1,step2_time != toDateTime(0)) AS list,
    countIf(1,step3_time != toDateTime(0)) AS detail
FROM
(

    SELECT
        loginkey,
        minIf(createtime, pageid = 2538) step1_time,
        arrayFilter(time -> step1_time <> toDateTime(0) and time > step1_time, groupArrayIf(createtime, pageid = 3242) )[1] AS step2_time,
        arrayFilter(time -> step2_time <> toDateTime(0) and time > step2_time, groupArrayIf(createtime, pageid = 1682) )[1] AS step3_time
    FROM datacenter.trajectory_trackless_complex
    WHERE pageid IN (2538, 3242, 1682)
    and intotime='2018-03-01'
    GROUP BY loginkey
)

@filimonov, hi
Do you have some complicated funnel examples?
for exapmle the funnel with time window?

@Jaxvk  could you publish your dataset? lastyear we solve the same funnel window problem,  maybe now I can do some help on this question

@Jaxvk   could u publish your dataset? In last year we solved the same window funnel  problem. Maybe now I can do some help with it.

@sundy-li, thank you.
yes, here's the table structure and some datas.
CREATE TABLE trajectory_trackless_complex(
    loginkey UInt64,
    provinceid Int32,
    cityid Int32,
    browser String,
    pageid UInt32,
    visittime DateTime,
    productcode UInt32,
    elepath String,
    createtime DateTime,
    intotime Date
) ENGINE = MergeTree
PARTITION BY intotime
ORDER BY (elepath, loginkey, pageid, createtime)
SETTINGS index_granularity = 8192  ;

SELECT
    createtime,
    pageid,
    loginkey
FROM trajectory_trackless_complex_daily
WHERE (pageid IN (2538, 3242, 1682)) AND (intotime = '2018-03-01')
LIMIT 5

┌──────────createtime─┬─pageid─┬─────────loginkey─┐
│ 2018-03-01 19:30:24 │   2538 │<PHONE_NUMBER>874917 │
│ 2018-03-01 20:48:45 │   2538 │<PHONE_NUMBER>578762 │
│ 2018-03-01 12:29:11 │   2538 │<PHONE_NUMBER>311902 │
│ 2018-03-01 20:45:29 │   3242 │<PHONE_NUMBER>408582 │
│ 2018-03-01 18:45:37 │   3242 │<PHONE_NUMBER>946826 │
└─────────────────────┴────────┴──────────────────┘

@sundy-li,
here are some examples use udf, can just use clickhouse's native grammar to realize the funnel query? I have no idea.

https://www.jianshu.com/p/4c86a2478cca
https://github.com/analysys/olap

yeah，I am the author of that article

:+1: , filimonov's answer is enough for me right now, but I also want to realize the window funnel.
the udf can't use in new version, so it would be better if clickhouse can support use native api to realize it

You have chaged minArray to just first element of result array for step_2 time. That can give wrong result, because clickhouse  can find some event which happened after step3, so step3 will not be foubd

yes, I see.
You are too responsible, thank you very match

With timeframes, once i've tryed, but it was a scary looking query with about 100 lines which worked for one particular case. Generally it was about spliting one chain of user events to multiple chains when some specific event appear. Not sure if can be generalized:
SELECT
 chainid,
  ...
FROM
(
SELECT
userid,
typeid,
timestamp,
chainid
FROM (
SELECT
  userid,
  groupArray(event_typeid) as arr_typeid,
  groupArray(timestamp) as arr_timestamps,
  arrayMap( ind -> cityHash64(userid, arraySum( arraySlice( arrayMap( typeid -> typeid = 2, arr_typeid ) , 1, ind -1 ) )), arrayEnumerate(arr_typeid) ) as arr_chainid
FROM  ....
GROUP BY userid
)
ARRAY JOIN arr_typeid as typeid, arr_timestamps as timestamp, arr_chainid as chainid
)
GROUP BY chainid

@filimonov, I see, you are too responsible, thank you very match.
But it can't run through, if use minArray
SELECT
    countIf(1, step1_time != toDateTime(0)) AS home,
    countIf(1, step2_time != toDateTime(0)) AS list
FROM
(
    SELECT
        loginkey,
        minIf(createtime, pageid = 2538) AS step1_time,
        minArray(arrayFilter(time -> ((step1_time != toDateTime(0)) AND (time > step1_time)), groupArrayIf(createtime, pageid = 3242))) AS step2_time
    FROM test.trajectory_trackless_complex_daily
    WHERE (pageid IN (2538, 3242)) AND (intotime = '2018-03-01')
    GROUP BY loginkey
)

Received exception from server (version 1.1.54342):
Code: 184. DB::Exception: Received from hadoop:9000, DB::Exception: Aggregate function minIf(createtime, equals(pageid, 2538)) is found inside another aggregate function in query.

Code: 184. DB::Exception: Received from hadoop:9000, DB::Exception: Aggregate function minIf(createtime, equals(pageid, 2538)) is found inside another aggregate function in query.

Hmmm... Sounds like a bug in ClickHouse. minArray is not 'fair' aggregate function. So it rather should be safe to use other 'real' aggregate functions inside.  @alexey-milovidov, is ita bug or intended behaviour?
Minimal sample:
select minArray(groupArray(number)) from numbers(100);

As a woraround - you can just select all array of filtered events and you one more select above. Still should be better that sorting all the event chain

@filimonov，thanks for your help，I use arrayReduce also can realize it.
SELECT
    countIf(1, step1_time != toDateTime(0)) AS home,
    countIf(1, step2_time != toDateTime(0)) AS list,
    countIf(1, step3_time != toDateTime(0)) AS detail
FROM
(
    SELECT
        loginkey,
        minIf(createtime, pageid = 2538) AS step1_time,
        arrayReduce('min', arrayFilter(time -> ((step1_time != toDateTime(0)) AND (time > step1_time)), groupArrayIf(createtime, pageid = 3242))) AS step2_time,
        arrayFilter(time -> ((step2_time != toDateTime(0)) AND (time > step2_time)), groupArrayIf(createtime, pageid = 1682))[1] AS step3_time
    FROM datacenter.trajectory_trackless_complex
    WHERE (pageid IN (2538, 3242, 1682)) AND (intotime = '2018-03-01')
    GROUP BY loginkey
)

@Jaxvk  Sorry for the delay,  If you are still looking for the windowFunnel  problem solution. You may try the release with embedded funnelWindow function.
Usage as follows:

SELECT
    sumIf(c, level >= 1) AS _1,
    sumIf(c, level >= 2) AS _2,
    sumIf(c, level >= 3) AS _3
FROM
(
    SELECT
        level,
        count(*) AS c
    FROM
    (
        SELECT
            loginkey,
            funnelWindow(60, 2523, 2524, 2529)(createtime, pageid) AS level
        FROM trajectory_trackless_complex
        WHERE pageid IN (2523, 2524, 2529)
        GROUP BY loginkey
    )
    GROUP BY level
    ORDER BY level ASC
)

┌─────_1─┬─────_2─┬────_3─┐
│ 150127 │ 100118 │ 99895 │
└────────┴────────┴───────┘
1 rows in set. Elapsed: 2.023 sec. Processed 1.04 billion rows, 20.74 GB (512.44 million rows/s., 10.25 GB/s.)

The test dataset's amount is about 1 billion,  this is the single node performance ,  and you can share the data by the column loginkey to improve the performance.
The function desc is  funnelWindow( window_in_seconds , event1, event2, event3)(  time_stamp_col, event_col ).
You can download the deb files in https://pan.baidu.com/s/1AwTXOKsc-08gCWwSi4gdjg , this feature commit is  based on the latest master commit 03b01fc24967d8cf46e88b1227e1c3605b63c50d

@sundy-li, :+1: :+1: , 太给力了, 期待发布到正式版

@sundy-li
thanks 4 the share.
https://github.com/analysys/olap/tree/master/开源组第一名
we are following the toutrial on the upper site, try to compile clickHouse.
but failed on  git checkout ab7672f329f7736756542268178e6f9f7e32325a
could u release a new patch?
Many Thanks.

@sundy-li
I have just  built clickhouse with the patch. exploring windowFunnel now...
Thanks for the repo, i will  try it later.

Sorry for reopening. I have a challenging task - find not only the funnel steps occurrences but all events between funnel steps as well.
Here is the scheme I need to achieve

How the events are stored initially - does not matter, because I can send in the needed format.
We have around 3kkk events/month
Now I have a query that runs around 3 minutes on a small sample of 75kk
Maybe someone can advise a direction to research? (I'll provide current query a bit later)

@filimonov

You have chaged minArray to just first element of result array for step_2 time. That can give wrong result, because clickhouse can find some event which happened after step3, so step3 will not be foubd

I am very happy you mentioned this. We are using Postgres for analytics and analysing CH now.
In Postgres, LATERAL JOIN is used for funnels and this is the result.

action1
action2
action3
action4

16049
1403
98
3

But in CH,

action1
action2
action3
action4

16049
1403
97
3

Query in CH:
SELECT
    countIf(step1_time != 0) AS action1,
    countIf(step2_time != 0) AS action2,
    countIf(step3_time != 0) AS action3,
    countIf(step4_time != 0) AS action4
FROM
(
    SELECT
        customerid,
        minIf(time, actionid = 1) step1_time,
        arrayFilter(time -> step1_time != 0 and time >= step1_time, groupArrayIf(time, actionid = 2) )[1] AS step2_time,
        arrayFilter(time -> step2_time != 0 and time >= step2_time, groupArrayIf(time, actionid = 3) )[1] AS step3_time,
        arrayFilter(time -> step3_time != 0 and time >= step3_time, groupArrayIf(time, actionid = 4) )[1] AS step4_time
    FROM actions
        WHERE schemaid =<PHONE_NUMBER>001 AND time between<PHONE_NUMBER>000 AND<PHONE_NUMBER>000 and actionid IN (1, 2, 3, 4)
    GROUP BY customerid
);

The query is changed to our case, 1. we use Epoch value timestamp, so no Date conversions 2. Its multi-tenant schema, so extra criteria on tenantid. Other than that, its the same.
I found the userid, got all the data and cross analyzed and they are same in both.
In the query, I collected the timestamps of the event 2 to analyze and this is the result

userid
step1_time
step2_time

3100000057370
1591251656100
[1593365831100,1592737788900]

The error occurred as the first element is got from the array rather than the minimum.
So I tried the arrayReduce returning the result of the min aggregate, proposed by @lamber-ken and it got fixed.
Also I tried using arraySort and getting first element. The same. It got fixed.
Is there any considerations on performance wise on which to use arrayReduce or arraySort? Seems the average response time for the queries are equal for both the methods.

@sundy-li Now, windowFunnel function has been embedded in clickhouse and it is so great!  However, windowFunction only can be used to calculate each funnel level UV conversion.  If I want to calculate each funnel level time cost, is there a way to support such a calculation？

If I want to calculate each funnel level time cost, is there a way to support such a calculation？

I did not come up with a good idea to support this in pure SQL, maybe you should write another UDAF function.

@vigneshrajarr

SELECT
countIf(step1_time != 0) AS action1,
countIf(step2_time != 0) AS action2,
countIf(step3_time != 0) AS action3,
countIf(step4_time != 0) AS action4
FROM
(
SELECT
customerid,
minIf(time, actionid = 1) step1_time,
arrayFilter(time -> step1_time != 0 and time >= step1_time, groupArrayIf(time, actionid = 2) )[1] AS step2_time,
arrayFilter(time -> step2_time != 0 and time >= step2_time, groupArrayIf(time, actionid = 3) )[1] AS step3_time,
arrayFilter(time -> step3_time != 0 and time >= step3_time, groupArrayIf(time, actionid = 4) )[1] AS step4_time
FROM actions
WHERE schemaid =<PHONE_NUMBER>001 AND time between<PHONE_NUMBER>000 AND<PHONE_NUMBER>000 and actionid IN (1, 2, 3, 4)
GROUP BY customerid
);

The result set of this sql statistic is not accurate because minIf(time, actionid = 1)


add inline documentation.

Included inline documentation for the exported APIs.

Resending this PR without multiple commits.


⚠ Bofrost.lu has degraded performance

In 130c5ea, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 816 ms

Resolved: Bofrost.lu performance has improved in 55a8365 after 6 minutes.


RuntimeError: File files/default/15update-stamp does not exist for cookbook apt

dev_ops_database/recipes/default.rb
include_recipe 'mongodb3::default'
standard out
root@vagrant:/vagrant/tools/vagrant# ./provision.sh
running as root
Resolving cookbook dependencies...
Fetching 'dev_ops_database' from source at .
Fetching cookbook index from https://supermarket.chef.io...
Using apt (2.7.0)
Using dev_ops_database (0.1.0) from source at .
Installing mongodb3 (1.0.0)
Using packagecloud (0.0.19)
Installing runit (1.6.0)
Installing user (0.4.2)
Using yum (3.6.3)
Resolving cookbook dependencies...
Fetching 'dev_ops_web_app' from source at .
Using dev_ops_web_app (0.1.0) from source at .
Using java (1.31.0)
Starting Chef Client, version 12.3.0
Compiling Cookbooks...
Converging 19 resources
Recipe: mongodb3::package_repo
  * apt_repository[mongodb] action add
    * execute[install-key 7F0CEB10] action run
      - execute apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
    * file[/var/lib/apt/periodic/update-success-stamp] action nothing (skipped due to action :nothing)
    * execute[apt-cache gencaches] action nothing (skipped due to action :nothing)
    * execute[apt-get update] action nothing (skipped due to action :nothing)
    * file[/etc/apt/sources.list.d/mongodb.list] action create
      - create new file /etc/apt/sources.list.d/mongodb.list
      - update content in file /etc/apt/sources.list.d/mongodb.list from none to 2d7617
      --- /etc/apt/sources.list.d/mongodb.list  2015-07-24 13:36:37.810019537 +0000
      +++ /etc/apt/sources.list.d/.mongodb.list20150724-6698-czngoi     2015-07-24 13:36:37.810019537 +0000
      @@ -1 +1,2 @@
      +deb     http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/stable multiverse
      - change mode from '' to '0644'
      - change owner from '' to 'root'
      - change group from '' to 'root'
    * file[/var/lib/apt/periodic/update-success-stamp] action delete
      - delete file /var/lib/apt/periodic/update-success-stamp
    * execute[apt-get update] action run
      - execute apt-get update -o Dir::Etc::sourcelist='sources.list.d/mongodb.list' -o Dir::Etc::sourceparts='-' -o APT::Get::List-Cleanup='0'
  Recipe: apt::default
    * file[/var/lib/apt/periodic/update-success-stamp] action touch
      - update utime on file /var/lib/apt/periodic/update-success-stamp
    * execute[apt-cache gencaches] action run
      - execute apt-cache gencaches

  * file[/var/lib/apt/periodic/update-success-stamp] action nothing (skipped due to action :nothing)
  * directory[/etc/apt/apt.conf.d] action create (up to date)
  * cookbook_file[/etc/apt/apt.conf.d/15update-stamp] action create

    ================================================================================
    Error executing action `create` on resource 'cookbook_file[/etc/apt/apt.conf.d/15update-stamp]'
    ================================================================================

    RuntimeError
    ------------
    File files/default/15update-stamp does not exist for cookbook apt

    Resource Declaration:
    ---------------------
    # In /root/.berkshelf/cookbooks/apt-2.7.0/recipes/default.rb

     57: cookbook_file '/etc/apt/apt.conf.d/15update-stamp' do
     58:   source '15update-stamp'
     59: end
     60:

    Compiled Resource:
    ------------------
    # Declared in /root/.berkshelf/cookbooks/apt-2.7.0/recipes/default.rb:57:in `from_file'

    cookbook_file("/etc/apt/apt.conf.d/15update-stamp") do
      provider Chef::Provider::CookbookFile
      action "create"
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      path "/etc/apt/apt.conf.d/15update-stamp"
      backup 5
      atomic_update true
      source "15update-stamp"
      declared_type :cookbook_file
      cookbook_name :apt
      recipe_name "default"
    end

@ericfrancis can you tell me more detail about this error trace? like platform name and version.
please make sure, this cookbook only supports Ubuntu and RHEL.
Thank you.

@sunggun-yu So I think this was a vagrant issue. I'm no longer getting this issue now that I'm more comfortable with vagrant-chef plugin

@ericfrancis Thank you


Node Express EJS Template Engine can not get Flowbite JavaScript

Describe the bug
I am using Flowbite in my Node Express project where I'm using Flowbite as Tailwind Plugin. But, Node Express EJS Template Engine can not get Flowbite JavaScript. It can not dismiss the alert element, and more where JS needs to work.
To Reproduce
Steps to reproduce the behavior:

Install Flowbite, add "./views/**/*.ejs" in tailwind config file, add require('flowbite/plugin') in tailwind config file
add flowbite JavaScipr file in ejs footer
added flowbite component
compile tailwind and JavaScript is not working

Expected behavior
When clicking in Alert components close dismissal, the component should be removed from the view file
Screenshots

Desktop (please complete the following information):

OS: Windows 10
Browser: Chrome
Version: 108

Hello @mhasanmeet,
Thanks for describing the issue with examples - we have recently launched v1.6.0 for Flowbite. Can you please upgrade and see if the issues persist? We've made lots of improvements to the JS dist files.

I'll close this issue until further notice @mhasanmeet. Feel free to re-open it if the issue persists.


Uplink stays in slow event loop mode even when internet reconnects

8505F:/data/local/uplink # cat stdout.log | grep base::serializer
09:13:20 [INFO ] (14) uplink::base::serializer: Switching to catchup mode!!
09:13:20 [INFO ] (14) uplink::base::serializer: Switching to normal mode!!
09:13:22 [INFO ] (14) uplink::base::serializer: Switching to slow eventloop mode!!
09:13:22 [INFO ] (14) uplink::base::serializer: Switching to catchup mode!!
09:13:22 [INFO ] (14) uplink::base::serializer: Switching to normal mode!!
09:13:22 [INFO ] (12) uplink::base::serializer: Switching to slow eventloop mode!!
09:13:22 [INFO ] (12) uplink::base::serializer: Switching to catchup mode!!
09:13:22 [INFO ] (12) uplink::base::serializer: Switching to normal mode!!
10:58:37 [INFO ] (13) uplink::base::serializer: Switching to slow eventloop mode!!
10:58:38 [INFO ] (13) uplink::base::serializer: Switching to catchup mode!!
10:58:38 [INFO ] (14) uplink::base::serializer: Switching to normal mode!!
10:58:39 [INFO ] (14) uplink::base::serializer: Switching to slow eventloop mode!!
10:58:39 [INFO ] (13) uplink::base::serializer: Switching to catchup mode!!
10:58:39 [INFO ] (13) uplink::base::serializer: Switching to normal mode!!
10:58:49 [INFO ] (12) uplink::base::serializer: Switching to slow eventloop mode!!
8505F:/data/local/uplink # ping google.com
PING google.com (<IP_ADDRESS>) 56(84) bytes of data.
64 bytes from del12s03-in-f14.1e100.net (<IP_ADDRESS>): icmp_seq=1 ttl=56 time=35.3 ms
64 bytes from del12s03-in-f14.1e100.net (<IP_ADDRESS>): icmp_seq=2 ttl=56 time=192 ms
^C
--- google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 35.361/113.770/192.179/78.409 ms
8505F:/data/local/uplink #

Stderr had a message from rumqtt saying Connection reset by peer


[OSFUSE-375|OSFUSE-376]add cxf spring-boot quickstarts archetypes

[merge]

[lgtm][merge]

Hi @jstrachan, @rawlingsj
Could you please trigger CI to build and merge this PR?
Thanks!

add to whitelist

[merge]


Also updating the Immutablejs example

Current coverage is 100% (diff: 100%)

Merging #1718 into master will not change coverage

@@           master   #1718   diff @@
=====================================
  Files          52      52
  Lines        1115    1115
  Methods         0       0
  Messages        0       0
  Branches        0       0
=====================================
  Hits         1115    1115
  Misses          0       0
  Partials        0       0

Powered by Codecov. Last update 9186bd3...2763f77


编译错误 expected primary-expression before ‘>’ token

I'm submitting a ...  (check one with "x")
[ ] bug report
[ x ] help wanted
[ ] feature request

Current behavior
编译EasyPR, 使用OpenCv 3.4.1 和 OpenCv 3.2.0都出现了以下错误:
/home/xxx/EasyPR/include/easypr/config.h:143:42: error: expected primary-expression before ‘>’ token
     model = ml::ANN_MLP::load<ml::ANN_MLP>(path);

OpenCv是按照如下命令编译的
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
Expected/desired behavior
Reproduction of the problem
If the current behavior is a bug or you can illustrate your feature request better with an example, please provide the steps to reproduce.
What is the expected behavior?
What is the motivation / use case for changing the behavior?
Please tell us about your environment:

System: Ubuntu 16.04

Compiler version/IDE: gcc 5.4.0

CMake version: 3.5.1

OpenCV version: [3.4.1 | 3.2.0 ]

主页有说明


Uncaught SyntaxError: Invalid regular expression: /['"]((?:. ?)*()/: Unterminated group

[Enter steps to reproduce below:]

Multi-select at least 2 lines.
Type an open parenthesis (.

Atom Version: 0.198.0
System: Mac OS X 10.10.3
Thrown From: autocomplete-modules package, v0.3.2
Stack Trace
Uncaught SyntaxError: Invalid regular expression: /['"]((?:. ?)*()/: Unterminated group
At /Users/Jeff/.atom/packages/autocomplete-modules/src/completion-provider.js:34

SyntaxError: Invalid regular expression: /['"]((?:. ?)*()/: Unterminated group
  at new RegExp (native)
  at CompletionProvider.getSuggestions (/Users/Jeff/.atom/packages/autocomplete-modules/src/completion-provider.js:34:30)
  at /Users/Jeff/.atom/packages/autocomplete-plus/lib/autocomplete-manager.coffee:159:45
  at Array.forEach (native)
  at AutocompleteManager.module.exports.AutocompleteManager.getSuggestionsFromProviders (/Users/Jeff/.atom/packages/autocomplete-plus/lib/autocomplete-manager.coffee:139:15)
  at AutocompleteManager.getSuggestionsFromProviders (/Users/Jeff/.atom/packages/autocomplete-plus/lib/autocomplete-manager.coffee:1:1)
  at AutocompleteManager.module.exports.AutocompleteManager.findSuggestions (/Users/Jeff/.atom/packages/autocomplete-plus/lib/autocomplete-manager.coffee:133:6)
  at /Users/Jeff/.atom/packages/autocomplete-plus/lib/autocomplete-manager.coffee:1:1

Commands
     -9:24.4.0 core:copy (atom-text-editor.editor.is-focused)
     -9:20.5.0 core:paste (textarea.native-key-bindings)
  2x -0:23.5.0 find-and-replace:select-next (atom-text-editor.editor.is-focused)
     -0:18.7.0 core:undo (atom-text-editor.editor.is-focused.autocomplete-active)
     -0:16.7.0 find-and-replace:select-next (atom-text-editor.editor.is-focused)
     -0:14.9.0 core:undo (atom-text-editor.editor.is-focused.autocomplete-active)
     -0:12.3.0 editor:move-to-end-of-word (atom-text-editor.editor.is-focused)
     -0:09.8.0 core:move-right (atom-text-editor.editor.is-focused)
  5x -0:09.1.0 core:select-right (atom-text-editor.editor.is-focused)
     -0:07.9.0 core:select-left (atom-text-editor.editor.is-focused)
     -0:06.6.0 core:select-right (atom-text-editor.editor.is-focused)

Config
{
  "core": {
    "projectHome": "/Users/Jeff/Projects",
    "disabledPackages": [
      "terminal-status",
      "language-javascript-jsx"
    ],
    "excludeVcsIgnoredPaths": false
  }
}

Installed Packages
# User
.bin, vundefined
angularjs, v0.1.0
atom-beautify, v0.27.1
atom-color-highlight, v3.0.9
atom-jsx-transform, v0.1.0
atom-typescript, v4.2.0
autocomplete-css, v0.7.2
autocomplete-html, v0.7.1
autocomplete-modules, v0.3.2
autocomplete-paths, v1.0.2
autocomplete-plus, v2.13.1
browser-refresh, v0.8.3
build, v0.30.0
color-picker, v1.7.0
docblockr, v0.6.3
git-control, v0.2.0
git-plus, v4.5.0
git-projects, v1.13.0
highlight-selected, v0.9.2
language-swift, v0.4.0
linter, v0.12.2
minimap, v4.8.0
node-debugger, v0.2.3
react, v0.11.8
react-snippets, v0.1.4
regex-railroad-diagram, v0.7.4
save-session, v0.13.5
slash-closer, v0.7.1
svg-preview, v0.5.1
tab-history, v0.4.0

# Dev
No dev packages

@jhopper28 thanks for reporting. Try to update.

That fixed it, thanks!

On May 10, 2015, at 10:49 PM, Nikita Gusakov<EMAIL_ADDRESS>wrote:
@jhopper28 https://github.com/jhopper28 thanks for reporting. Try to update.
—
Reply to this email directly or view it on GitHub https://github.com/nkt/atom-autocomplete-modules/issues/2#issuecomment-100746335.

@jhopper28 like repos sukaaa


Add note about tag search for BioContainers Docker install doc

Coverage remained the same at 13.751% when pulling 63da01e4d9bce1ba9cc425024fd101ba9cf22879 on heuermh:biocontainers into 8073a7dd5019e6d36ae290c6929e67776d69713a on bigdatagenomics:master.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/cannoli-prb/192/
Test PASSed.


[CPU] tensor.unpack op is scalarized

This one is interesting. We have a tensor.pack AND a tensor.unpack within the same dispatch:
hal.executable public @forward_dispatch_41 {
  hal.executable.variant public @system_elf_x86_64, target = <"llvm-cpu", "system-elf-x86_64", {cpu = "cascadelake", cpu_features = "+cmov,+mmx,+popcnt,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+avx,+avx2,+fma,+avx512f,+bmi,+bmi2,+aes,+pclmul,+avx512vl,+avx512bw,+avx512dq,+avx512cd,+avx512vnni,+adx,+clflushopt,+clwb,+cx16,+cx8,+crc32,+f16c,+fsgsbase,+fxsr,+invpcid,+lzcnt,+movbe,+pku,+prfchw,+rdrnd,+rdseed,+sahf,+x87,+xsave,+xsavec,+xsaveopt,+xsaves,+evex512", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128", link_embedded = false, native_vector_size = 64 : index, target_triple = "x86_64-unknown-linux-gnu", ukernels = true}> {
    hal.executable.export public @forward_dispatch_41_generic_100x18176_f32 ordinal(0) layout(#hal.pipeline.layout<push_constants = 2, sets = [<0, bindings = [<0, storage_buffer, ReadOnly>, <1, storage_buffer>]>]>) {
    ^bb0(%arg0: !hal.device):
      %x, %y, %z = flow.dispatch.workgroup_count_from_slice
      hal.return %x, %y, %z : index, index, index
    }
    builtin.module {
      func.func @forward_dispatch_41_generic_100x18176_f32() {
        %cst = arith.constant 0.000000e+00 : f32
        %cst_0 = arith.constant 5.000000e-01 : f16
        %cst_1 = arith.constant 1.000000e+00 : f16
        %cst_2 = arith.constant 2.000000e+00 : f16
        %cst_3 = arith.constant 0.000000e+00 : f16
        %0 = hal.interface.constant.load[0] : i32
        %1 = hal.interface.constant.load[1] : i32
        %2 = arith.index_castui %0 : i32 to index
        %3 = arith.index_castui %1 : i32 to index
        %4 = hal.interface.binding.subspan set(0) binding(0) type(storage_buffer) alignment(64) offset(%2) flags(ReadOnly) : !flow.dispatch.tensor<readonly:tensor<7x1136x16x16xf32>>
        %5 = hal.interface.binding.subspan set(0) binding(1) type(storage_buffer) alignment(64) offset(%3) : !flow.dispatch.tensor<writeonly:tensor<7x18176x16x1xf32>>
        %6 = flow.dispatch.tensor.load %4, offsets = [0, 0, 0, 0], sizes = [7, 1136, 16, 16], strides = [1, 1, 1, 1] : !flow.dispatch.tensor<readonly:tensor<7x1136x16x16xf32>> -> tensor<7x1136x16x16xf32>
        %7 = tensor.empty() : tensor<7x18176x16x1xf32>
        %8 = tensor.empty() : tensor<100x18176xf32>
        %unpack = tensor.unpack %6 inner_dims_pos = [0, 1] inner_tiles = [16, 16] into %8 : tensor<7x1136x16x16xf32> -> tensor<100x18176xf32>
        %9 = linalg.generic {indexing_maps = [affine_map<(d0, d1) -> (d0, d1)>, affine_map<(d0, d1) -> (d0, d1)>], iterator_types = ["parallel", "parallel"]} ins(%unpack : tensor<100x18176xf32>) outs(%8 : tensor<100x18176xf32>) {
        ^bb0(%in: f32, %out: f32):
          %10 = arith.truncf %in : f32 to f16
          %11 = arith.addf %10, %cst_3 : f16
          %12 = math.sqrt %cst_2 : f16
          %13 = arith.divf %11, %12 : f16
          %14 = math.erf %13 : f16
          %15 = arith.addf %14, %cst_1 : f16
          %16 = arith.mulf %15, %cst_0 : f16
          %17 = arith.mulf %11, %16 : f16
          %18 = arith.extf %17 : f16 to f32
          linalg.yield %18 : f32
        } -> tensor<100x18176xf32>
        %pack = tensor.pack %9 padding_value(%cst : f32) inner_dims_pos = [0, 1] inner_tiles = [16, 1] into %7 : tensor<100x18176xf32> -> tensor<7x18176x16x1xf32>
        flow.dispatch.tensor.store %pack, %5, offsets = [0, 0, 0, 0], sizes = [7, 18176, 16, 1], strides = [1, 1, 1, 1] : tensor<7x18176x16x1xf32> -> !flow.dispatch.tensor<writeonly:tensor<7x18176x16x1xf32>>
        return
      }
    }
  }
}

The code seems to be vectorized but we end up with scalar instructions, as far as I can see:
%unpack = tensor.unpack %6 inner_dims_pos = [0, 1] inner_tiles = [16, 16] into %8 : tensor<7x1136x16x16xf32> -> tensor<100x18176xf32>                                 ▒
  0.13 │ 390:   vmovss        -0x3c(%r8,%r11,1),%xmm0                                                                                ◆
  2.38 │        vmovss        %xmm0,0x1c40(%rsp,%r11,1)                                                                                ▒
  0.50 │        vmovss        -0x38(%r8,%r11,1),%xmm0                                                                                ▒
  0.13 │        vmovss        %xmm0,0x1c44(%rsp,%r11,1)                                                                                ▒
  0.06 │        vmovss        -0x34(%r8,%r11,1),%xmm0                                                                                ▒
       │        vmovss        %xmm0,0x1c48(%rsp,%r11,1)                                                                                ▒
  0.38 │        vmovss        -0x30(%r8,%r11,1),%xmm0                                                                                ▒
  0.06 │        vmovss        %xmm0,0x1c4c(%rsp,%r11,1)                                                                                ▒
  0.44 │        vmovss        -0x2c(%r8,%r11,1),%xmm0                                                                                ▒
       │        vmovss        %xmm0,0x1c50(%rsp,%r11,1)                                                                                ▒
  0.25 │        vmovss        -0x28(%r8,%r11,1),%xmm0                                                                                ▒
  0.06 │        vmovss        %xmm0,0x1c54(%rsp,%r11,1)                                                                                ▒
  0.19 │        vmovss        -0x24(%r8,%r11,1),%xmm0                                                                                ▒
  0.06 │        vmovss        %xmm0,0x1c58(%rsp,%r11,1)                                                                                ▒
  0.19 │        vmovss        -0x20(%r8,%r11,1),%xmm0                                                                                ▒
  0.82 │        vmovss        %xmm0,0x1c5c(%rsp,%r11,1)                                                                                ▒
  0.88 │        vmovss        -0x1c(%r8,%r11,1),%xmm0                                                                                ▒
  0.75 │        vmovss        %xmm0,0x1c60(%rsp,%r11,1)                                                                                ▒
  0.63 │        vmovss        -0x18(%r8,%r11,1),%xmm0                                                                                ▒
       │        vmovss        %xmm0,0x1c64(%rsp,%r11,1)                                                                                ▒
  0.19 │        vmovss        -0x14(%r8,%r11,1),%xmm0                                                                                ▒
       │        vmovss        %xmm0,0x1c68(%rsp,%r11,1)                                                                                ▒
  0.63 │        vmovss        -0x10(%r8,%r11,1),%xmm0                                                                                ▒
  0.13 │        vmovss        %xmm0,0x1c6c(%rsp,%r11,1)                                                                                ▒
  0.31 │        vmovss        -0xc(%r8,%r11,1),%xmm0                                                                                ▒
  0.06 │        vmovss        %xmm0,0x1c70(%rsp,%r11,1)                                                                                ▒
  0.50 │        vmovss        -0x8(%r8,%r11,1),%xmm0                                                                                ▒
  0.06 │        vmovss        %xmm0,0x1c74(%rsp,%r11,1)                                                                                ▒
  0.25 │        vmovss        -0x4(%r8,%r11,1),%xmm0                                                                                ▒
       │        vmovss        %xmm0,0x1c78(%rsp,%r11,1)                                                                                ▒
  0.56 │        vmovss        (%r8,%r11,1),%xmm0

Perhaps @bviyer can help if @hanhanW can confirm that this isn't something trivial?

@dcaballe this one going a bit stale, anyone working on this? @bviyer @hanhanW ?

I think @Balaji Iyer @.***> should have some cycles this week
to help here
On Fri, Oct 27, 2023 at 1:17 PM Allie Culp @.***> wrote:

@dcaballe https://github.com/dcaballe this one going a bit stale,
anyone working on this? @bviyer https://github.com/bviyer @hanhanW
https://github.com/hanhanW ?
—
Reply to this email directly, view it on GitHub
https://github.com/openxla/iree/issues/15249#issuecomment-1783458008,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEHZ6ELOBGVT7SOAPQWFAATYBQJHFAVCNFSM6AAAAAA6IOWY4KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBTGQ2TQMBQHA
.
You are receiving this because you were mentioned.Message ID:
@.***>

Yes I am planning to look into this, however I am working on a time-sensitive work at the moment. This week I think I would have some cycles and will look at it.

@bviyer I'd suggest to collect microbenchmark numbers first, so it can help us to see how many improvements we can get. Can we get the benchmark numbers for single element-wise operation, and the dispatch? The best perf we can do here is to make the dispatch performance close to the single element-wise case.

Hi @bviyer , do you have any updates on this?

@bviyer and I looked at the IR dump together today. We think the conclusion is that we need direct vectorization pattern for unpack ops.
The way to vectorize unpack op today is decomposing it to transpose + collapse_shape + extract_slice and kick in generic vectorizer. There are two problems.
func.func @forward_dispatch_41_generic_100x18176_f32_dispatch_0_generic_100x18176_f32() {
  %c16 = arith.constant 16 : index
  %c64 = arith.constant 64 : index
  %c1 = arith.constant 1 : index
  %c18176 = arith.constant 18176 : index
  %c7 = arith.constant 7 : index
  %c0 = arith.constant 0 : index
  %cst = arith.constant 1.234800e+00 : f32
  %0 = hal.interface.binding.subspan set(0) binding(0) type(storage_buffer) alignment(64) offset(%c0) flags(ReadOnly) : !flow.dispatch.tensor<readonly:tensor<7x1136x16x16xf32>>
  %1 = hal.interface.binding.subspan set(0) binding(1) type(storage_buffer) alignment(64) offset(%c0) : !flow.dispatch.tensor<writeonly:tensor<7x18176x16x1xf32>>
  %workgroup_id_x = hal.interface.workgroup.id[0] : index
  %workgroup_count_x = hal.interface.workgroup.count[0] : index
  %workgroup_id_y = hal.interface.workgroup.id[1] : index
  %workgroup_count_y = hal.interface.workgroup.count[1] : index
  %2 = affine.apply affine_map<()[s0] -> (s0 * 7)>()[%workgroup_id_y]
  %3 = affine.apply affine_map<()[s0] -> (s0 * 7)>()[%workgroup_count_y]
  scf.for %arg0 = %2 to %c7 step %3 {
    %4 = affine.apply affine_map<()[s0] -> (s0 * 64)>()[%workgroup_id_x]
    %5 = affine.apply affine_map<()[s0] -> (s0 * 64)>()[%workgroup_count_x]
    scf.for %arg1 = %4 to %c18176 step %5 {
      %6 = flow.dispatch.tensor.load %1, offsets = [%arg0, %arg1, 0, 0], sizes = [7, 64, 16, 1], strides = [1, 1, 1, 1] : !flow.dispatch.tensor<writeonly:tensor<7x18176x16x1xf32>> -> tensor<7x64x16x1xf32>
      %7 = affine.apply affine_map<(d0) -> (d0 floordiv 16)>(%arg1)
      %8 = flow.dispatch.tensor.load %0, offsets = [%arg0, %7, 0, 0], sizes = [7, 4, 16, 16], strides = [1, 1, 1, 1] : !flow.dispatch.tensor<readonly:tensor<7x1136x16x16xf32>> -> tensor<7x4x16x16xf32>
      %9 = scf.for %arg2 = %c0 to %c7 step %c1 iter_args(%arg3 = %6) -> (tensor<7x64x16x1xf32>) {
        %10 = scf.for %arg4 = %c0 to %c64 step %c16 iter_args(%arg5 = %arg3) -> (tensor<7x64x16x1xf32>) {
          %11 = affine.min affine_map<(d0) -> (d0 * -16 + 100, 16)>(%arg2)
          %12 = tensor.empty(%11) : tensor<?x16xf32>
          %13 = affine.apply affine_map<(d0) -> (d0 floordiv 16)>(%arg4)
          %extracted_slice = tensor.extract_slice %8[%arg2, %13, 0, 0] [1, 1, 16, 16] [1, 1, 1, 1] : tensor<7x4x16x16xf32> to tensor<16x16xf32>
          %14 = tensor.empty() : tensor<16x16xf32>
          %transposed = linalg.transpose ins(%extracted_slice : tensor<16x16xf32>) outs(%14 : tensor<16x16xf32>) permutation = [0, 1]
          %extracted_slice_0 = tensor.extract_slice %transposed[0, 0] [%11, 16] [1, 1] : tensor<16x16xf32> to tensor<?x16xf32>
          %inserted_slice = tensor.insert_slice %extracted_slice_0 into %12[0, 0] [%11, 16] [1, 1] : tensor<?x16xf32> into tensor<?x16xf32>
          %15 = linalg.generic {indexing_maps = [affine_map<(d0, d1) -> (d0, d1)>, affine_map<(d0, d1) -> (d0, d1)>], iterator_types = ["parallel", "parallel"]} ins(%inserted_slice : tensor<?x16xf32>) outs(%12 : tensor<?x16xf32>) attrs =  {lowering_config = #iree_codegen.lowering_config<tile_sizes = [[112, 64], [16, 16], [0, 0], [0, 0]]>} {
          ^bb0(%in: f32, %out: f32):
            %18 = arith.truncf %in : f32 to f16
            %19 = arith.mulf %18, %18 : f16
            %20 = arith.extf %19 : f16 to f32
            linalg.yield %20 : f32
          } -> tensor<?x16xf32>
          %16 = affine.apply affine_map<(d0) -> (-d0 + 16)>(%11)
          %padded = tensor.pad %15 low[0, 0] high[%16, 0] {
          ^bb0(%arg6: index, %arg7: index):
            tensor.yield %cst : f32
          } : tensor<?x16xf32> to tensor<16x16xf32>
          %expanded = tensor.expand_shape %padded [[0, 1], [2, 3]] : tensor<16x16xf32> into tensor<1x16x16x1xf32>
          %extracted_slice_1 = tensor.extract_slice %expanded[0, 0, 0, 0] [1, 16, 16, 1] [1, 1, 1, 1] : tensor<1x16x16x1xf32> to tensor<1x16x16xf32>
          %17 = tensor.empty() : tensor<1x16x16xf32>
          %transposed_2 = linalg.transpose ins(%extracted_slice_1 : tensor<1x16x16xf32>) outs(%17 : tensor<1x16x16xf32>) permutation = [0, 2, 1]
          %inserted_slice_3 = tensor.insert_slice %transposed_2 into %arg5[%arg2, %arg4, 0, 0] [1, 16, 16, 1] [1, 1, 1, 1] : tensor<1x16x16xf32> into tensor<7x64x16x1xf32>
          scf.yield %inserted_slice_3 : tensor<7x64x16x1xf32>
        }
        scf.yield %10 : tensor<7x64x16x1xf32>
      }
      flow.dispatch.tensor.store %9, %1, offsets = [%arg0, %arg1, 0, 0], sizes = [7, 64, 16, 1], strides = [1, 1, 1, 1] : tensor<7x64x16x1xf32> -> !flow.dispatch.tensor<writeonly:tensor<7x18176x16x1xf32>>
    }
  }
  return
}

The first linalg.transpose op is a copy op. We do generate a vector.transfer_read/write pair during vectorization. But they are removed because of a transfer_write's foldReadInitWrite folder. It is a valid folder to me.
Even we can bypass the folder locally, we will hit the second problem. There are no mask ops in the transpose op. This is because we handle the "masking" in decomposition, which creates a extract_slice/insert_slice pair. Ideally, we should just do a masked_load, vector.transpose; pass the vector to elementwise op. I think it requires much more fix-up which is not necessary. I think we can just have a unpack vectorization pattern, which lowers the tensor.unpack op to vector.transpose + vector.shape_cast + vector.extract_strided_slice ops. With masking trick, it will give us a clean form at vector level.
// -----// IR Dump After GenericVectorization (iree-codegen-generic-vectorization) //----- //
func.func @forward_dispatch_41_generic_100x18176_f32_dispatch_0_generic_100x18176_f32() {
  %cst = arith.constant 0.000000e+00 : f32
  %c16 = arith.constant 16 : index
  %c64 = arith.constant 64 : index
  %c1 = arith.constant 1 : index
  %c18176 = arith.constant 18176 : index
  %c7 = arith.constant 7 : index
  %c0 = arith.constant 0 : index
  %cst_0 = arith.constant 1.234800e+00 : f32
  %0 = hal.interface.binding.subspan set(0) binding(0) type(storage_buffer) alignment(64) offset(%c0) flags(ReadOnly) : !flow.dispatch.tensor<readonly:tensor<7x1136x16x16xf32>>
  %1 = hal.interface.binding.subspan set(0) binding(1) type(storage_buffer) alignment(64) offset(%c0) : !flow.dispatch.tensor<writeonly:tensor<7x18176x16x1xf32>>
  %workgroup_id_x = hal.interface.workgroup.id[0] : index
  %workgroup_count_x = hal.interface.workgroup.count[0] : index
  %workgroup_id_y = hal.interface.workgroup.id[1] : index
  %workgroup_count_y = hal.interface.workgroup.count[1] : index
  %2 = affine.apply affine_map<()[s0] -> (s0 * 7)>()[%workgroup_id_y]
  %3 = affine.apply affine_map<()[s0] -> (s0 * 7)>()[%workgroup_count_y]
  scf.for %arg0 = %2 to %c7 step %3 {
    %4 = affine.apply affine_map<()[s0] -> (s0 * 64)>()[%workgroup_id_x]
    %5 = affine.apply affine_map<()[s0] -> (s0 * 64)>()[%workgroup_count_x]
    scf.for %arg1 = %4 to %c18176 step %5 {
      %6 = flow.dispatch.tensor.load %1, offsets = [%arg0, %arg1, 0, 0], sizes = [7, 64, 16, 1], strides = [1, 1, 1, 1] : !flow.dispatch.tensor<writeonly:tensor<7x18176x16x1xf32>> -> tensor<7x64x16x1xf32>
      %7 = affine.apply affine_map<(d0) -> (d0 floordiv 16)>(%arg1)
      %8 = flow.dispatch.tensor.load %0, offsets = [%arg0, %7, 0, 0], sizes = [7, 4, 16, 16], strides = [1, 1, 1, 1] : !flow.dispatch.tensor<readonly:tensor<7x1136x16x16xf32>> -> tensor<7x4x16x16xf32>
      %9 = scf.for %arg2 = %c0 to %c7 step %c1 iter_args(%arg3 = %6) -> (tensor<7x64x16x1xf32>) {
        %10 = scf.for %arg4 = %c0 to %c64 step %c16 iter_args(%arg5 = %arg3) -> (tensor<7x64x16x1xf32>) {
          %11 = affine.min affine_map<(d0) -> (d0 * -16 + 100, 16)>(%arg2)
          %12 = tensor.empty(%11) : tensor<?x16xf32>
          %13 = affine.apply affine_map<(d0) -> (d0 floordiv 16)>(%arg4)
          %14 = vector.transfer_read %8[%arg2, %13, %c0, %c0], %cst {in_bounds = [true, true]} : tensor<7x4x16x16xf32>, vector<16x16xf32>
          %extracted_slice = tensor.extract_slice %12[0, 0] [%11, 16] [1, 1] : tensor<?x16xf32> to tensor<?x16xf32>
          %15 = vector.transfer_write %14, %extracted_slice[%c0, %c0] {in_bounds = [false, true]} : vector<16x16xf32>, tensor<?x16xf32>
          %inserted_slice = tensor.insert_slice %15 into %12[0, 0] [%11, 16] [1, 1] : tensor<?x16xf32> into tensor<?x16xf32>
          %dim = tensor.dim %inserted_slice, %c0 : tensor<?x16xf32>
          %16 = vector.create_mask %dim, %c16 : vector<16x16xi1>
          %17 = vector.transfer_read %inserted_slice[%c0, %c0], %cst, %16 {in_bounds = [true, true]} : tensor<?x16xf32>, vector<16x16xf32>
          %18 = arith.truncf %17 : vector<16x16xf32> to vector<16x16xf16>
          %19 = arith.mulf %18, %18 : vector<16x16xf16>
          %20 = arith.extf %19 : vector<16x16xf16> to vector<16x16xf32>
          %21 = vector.transfer_write %20, %12[%c0, %c0], %16 {in_bounds = [true, true]} : vector<16x16xf32>, tensor<?x16xf32>
          %22 = tensor.empty() : tensor<16x16xf32>
          %dim_1 = tensor.dim %21, %c0 : tensor<?x16xf32>
          %23 = vector.create_mask %dim_1, %c16 : vector<16x16xi1>
          %24 = vector.transfer_read %21[%c0, %c0], %cst_0, %23 {in_bounds = [true, true]} : tensor<?x16xf32>, vector<16x16xf32>
          %25 = vector.transfer_write %24, %22[%c0, %c0] {in_bounds = [true, true]} : vector<16x16xf32>, tensor<16x16xf32>
          %expanded = tensor.expand_shape %25 [[0, 1], [2, 3]] : tensor<16x16xf32> into tensor<1x16x16x1xf32>
          %extracted_slice_2 = tensor.extract_slice %expanded[0, 0, 0, 0] [1, 16, 16, 1] [1, 1, 1, 1] : tensor<1x16x16x1xf32> to tensor<1x16x16xf32>
          %26 = tensor.empty() : tensor<1x16x16xf32>
          %27 = vector.transfer_read %extracted_slice_2[%c0, %c0, %c0], %cst {in_bounds = [true, true, true]} : tensor<1x16x16xf32>, vector<1x16x16xf32>
          %28 = vector.transpose %27, [0, 2, 1] : vector<1x16x16xf32> to vector<1x16x16xf32>
          %29 = vector.transfer_write %28, %26[%c0, %c0, %c0] {in_bounds = [true, true, true]} : vector<1x16x16xf32>, tensor<1x16x16xf32>
          %inserted_slice_3 = tensor.insert_slice %29 into %arg5[%arg2, %arg4, 0, 0] [1, 16, 16, 1] [1, 1, 1, 1] : tensor<1x16x16xf32> into tensor<7x64x16x1xf32>
          scf.yield %inserted_slice_3 : tensor<7x64x16x1xf32>
        }
        scf.yield %10 : tensor<7x64x16x1xf32>
      }
      flow.dispatch.tensor.store %9, %1, offsets = [%arg0, %arg1, 0, 0], sizes = [7, 64, 16, 1], strides = [1, 1, 1, 1] : tensor<7x64x16x1xf32> -> !flow.dispatch.tensor<writeonly:tensor<7x18176x16x1xf32>>
    }
  }
  return
}

Maybe @bviyer can try prototype direct vectorizing unpack op and see if it addresses the issue?
(note, we need direct vectorization for pack op as well. It is a separate problem and we track in other issue.)


react_1.styled is not a function

I took the evening to migrate my library from using styled-components to stitches. When I start Storybook, the styles get applied perfectly. However, when I build the library and install it somewhere else, I get: react_1.styled is not a function. (see here).
This is the branch of my library where I am using stitches now: https://github.com/table-library/react-table-library/tree/feat/stitches Compared to using styled-components (or emotion), I thought I wouldn't have to change anything in the tsconfig.json or babel.config.js to make it work. Or am I wrong here? I am using rollup to bundle everything.
Thanks for your help! Really looking forward getting this to work!

Side-note: Wondering if it has something to do with @babel/runtime being needed, because radix-ui uses it as dependency too: https://github.com/radix-ui/primitives/blob/main/packages/react/checkbox/package.json

Having the same issue. I am not using radix tho. The only dependencies I am using so far are react and stitches.
@rwieruch did you manage to get around this issue?

I am not using radix either. No, didn't find a solution yet. Worst case I have to use emotion instead, but I really hope to use stitches here :)

Hey @rwieruch
Would you be able to provide us with a minimalistic reproduction of the issue (the smaller the repro, the faster we can debug it)?

@hadihallak we went with styled-components instead

@arturbien Thanks for your quick response.
Will be closing this for now but if anyone else is having the issue,  feel free to re-open this and post a minimal-repro

I get the same

Please re-open.
Brand new minimal lib, using Stitches.
On the consumer side:
0 , _react.styled) is not a function

Repro:
https://github.com/TheeMattOliver/radix-stitches-styled-not-function-repro

Hi there, getting a similar issue in our build pipeline where we get the following error message when running our tests:
`TypeError: (0 , core_1.keyframes) is not a function
   5 | const colors = {};
   6 |
>  7 | const spin = keyframes({
     |                       ^
   8 |   "0%": { transform: "rotate(0deg)" },
   9 |   "100%": { transform: "rotate(360deg)" },
  10 | });

  at Object.<anonymous> (base-ui/components/button/button.styles.ts:7:23)
  at Object.<anonymous> (base-ui/components/button/button.tsx:4:1)
  at Object.<anonymous> (base-ui/components/button/index.ts:1:1)
  at Object.<anonymous> (base-ui/components/badge/badge.spec.tsx:4:1)`

Has anyone come up with a solution or explanation of what might be causing it?
Thanks.

React 18 is not supported. See https://github.com/stitchesjs/stitches/issues/1059
We have switched over to Emotion.

I've been experiencing the same problem. In my case, I've noticed that webpack was not including this package, and was importing the path to the .cjs module instead.

So I modified my babel config with the following in order to resolve the package accordingly:
module.exports = {
  ...
  plugins: [
    [
      'module-resolver', // https://www.npmjs.com/package/babel-plugin-module-resolver
      {
        root: ['./src'],
        alias: {
          '@stitches/react': path.resolve(__dirname, './node_modules/@stitches/react')
        }
      }
    ],
    ...
  ]
};


Add style and slot transforms

@ryanbethel Just need to figure out why Playwright isn't working properly later today.

@ryanbethel Just need to figure out why Playwright isn't working properly later today.

You mean on Github Actions right? It is working for me locally. I think playwright needs updated. I have not done that in the github action so I am not sure of the process.

Its the thing where locally you need to run npx playwright so it updates all the browser binaries. I am not sure how to do that for Github actions. I will investigate a bit.

fwiw this was needed to get playwright to update successfully when they pushed their breaking major release:
https://github.com/enhance-dev/enhance-element/blob/main/package.json#L13-L14


Footnotes are not working as expected

Issue Summary
With the last version of Ghost, the footnotes are being generated by each section of markdown, and not by the entire post.
For example, if you have a markdown section with a footnote reference, next, you have plain text (outside of a markdown section), and in the bottom, you have another markdown section with the footnote definition it'll not work.
However if the reference and the definition are in the same markdown section it works, but the definition will be rendered in the bottom of that markdown section like this:

As far as I understood, this is happening because these two markdown sections are not being compiled together, so the parser doesn't detect the reference nor the definition of the footnote
To Reproduce

Create a markdown section with a footnote reference
Add plain text outside of the markdown section
Create another markdown section with the footnote definition

Technical details:

Ghost Version: Docker 2.0.3
Node Version: Docker 2.0.3
Browser/OS: Docker 2.0.3
Database: Docker 2.0.3

thanks, @kevinansfield for the quick response and the workaround

Which version brings in the built-in footnote support? I am using 3.0.3 and cannot get it to work.

named links and formatted in any way you want.

Just be mindful, you have used name=xxx in your example, however in my experience for this to work one needs to use id=xxx instead!


ImportError: cannot import name 'models' from 'fastapi_users' (./fastapi_users.py)

Hi,
I am pretty new to fastapi.
Sorry might sound really silly but here is what I did:
I tried this for both SQLAlchemy and Tortoise ORM and got the same result.
I created a new file main.py under fastapi_users directory and copied the example, from:
https://frankie567.github.io/fastapi-users/configuration/databases/sqlalchemy/
For SQLAlchemy I changed the following line:
engine = sqlalchemy.create_engine(
DATABASE_URL, connect_args={"sqlite:///": False}
As I am testing it with SQLite.
I ran the uvicorn command line: uvicorn main:app --reload
Then I get the error:
module = importlib.import_module(module_str)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "./main.py", line 4, in
from fastapi_users import FastAPIUsers, models
File "./fastapi_users.py", line 7, in
from fastapi_users import models
ImportError: cannot import name 'models' from 'fastapi_users' (./fastapi_users.py)
I tried it with tortoise and get the same error, but I am still confused with the following line:
register_tortoise(app, modules={"models": ["path_to_your_package"]})
what path do I supply there I checked another post for Tortoise ORM and it just stated like this:
register_tortoise(app, modules={"models": ["models"]})
I am in the correct Virtualenv - (fastapi-users) and also I checked pip freeze and it appears all the correct modules are there. There is quite a lot of them, for tortoise ORM I installed the 3 others stated on the docs of fastapi_users.
Can someone help me please? I am including my main.py file --> had to rename it to main.txt for github!
main.txt

Hi @rodgerthat3000!
Well, that is quite a bunch of information 🙃There are several things that could explain why it doesn't work:

You said you created a fastapi_users directory. You can't do that, otherwise when you import it, it will take precedence over the real fastapi_users package that you installed with pip. You should rename it myproject or something like that.
I don't understand why you wrote this:

engine = sqlalchemy.create_engine(
    DATABASE_URL, connect_args={"sqlite:///": False}
)

The default line in the example is working well:
engine = sqlalchemy.create_engine(
    DATABASE_URL, connect_args={"check_same_thread": False}
)

Concerning your question about Tortoise. What I mean is that you should provide the path to the Python modules containing your Tortoise models. So for example if you put your models in a file named models.py, you can write register_tortoise(app, modules={"models": ["models"]}). You should take a look at the Tortoise ORM documentation : https://tortoise-orm.readthedocs.io/en/latest/getting_started.html

Hi Frankie thanks so much for your help. I think I had some issues with my pc as well as python was acting a bit funny I am going to try it again and Ill let you know.

Hi Frankie,
No luck I have hit another roadblock so below is my file stucture:

For some reason its not picking up my models?
When I ran the uvicorn
This is my weird error:
File "./fastapi_users.py", line 6, in
from fastapi_users import models
ImportError: cannot import name 'models' from 'fastapi_users' (./fastapi_users.py)
It should be reading all the files correctly now, weird why it doesnt?
Appreciate any help thanks.

Hum... Why did you clone the repository ? It's not a base project for you to use, it's a library you have to install, just like FastAPI. I think you should start with the basics:

Follow the FastAPI tutorial (which is awesome) : https://fastapi.tiangolo.com/tutorial/
Once you have a FastAPI project setup, you can start the installation process of FastAPI users : https://frankie567.github.io/fastapi-users/installation/


io_uring support

Is it possible that LTFS can support io_uring? So that LTFS can support Linux native async IO, would get a performance benefit.

Sorry, I cannot follow you. Can you describe your idea more specific?
I'm not sure about "async I/O" that you are talking... From your description "Linux native async IO", I guess it is I/O between LTFS and tape drive. Is is correct?
If so, I don't think it is reasonable for tape device at all. In tapa drive world, sequence of command and data is the most important because we cannot specify address to write in a SCSI WRITE command. If we use async I/O, LTFS might misdetect block number on tape.
If you are saying about data transfer between an application and LTFS. LTFS uses async I/O in the unified I/O scheduler. Written data from application is just copied to the internal buffer and multiple written data are gather to a 512KB block (FUSE calls write() callback with 32KB MAX even if you write a 1MB data...). Once 512KB block is constructed, write (to tape) request is requested into the internal I/O request queue and process one by one.

OK. another request,  we can see FUSE support the io_uring, https://lwn.net/Articles/932079/，Is it possible that LTFS can support it. It could avoid the memcopy between user space and kernel space.

I'm not sure I understand the description correctly. But it looks the story in the description is completed within FUSE. And there is no effect about LTFS.
What is your point? Which part is improved in this framework?

I need more information, and will see more detail in fuse project about this, maybe we need change the interfaces called from libfuse.

Oh, that reminds me they might be read_buf() and write_buf() callbacks, I guess. Are they the things you are talking about?
I don't know they can be used in LTFS actually.
First of all, technically, it might be able to use for write side. But as I mentioned before we need to construct 512KB block for tape write. So no copy from application to sg device is impossible. The only thing we can do is remove a copy within FUSE. In other words, Call tree is

Appl
-> syscall
-> FUSE (no buffer copy here)
-> LTFS's FUSE callback (copy data from FUSE to LTFS internal buffer)
-> Construct SCSI req (no copy historically)
-> issue ioctl() against sg (internal copy might be suppressed if direct io is enabled see Wiki)

For read side, it is really difficult to use because we have one block (512KB) cache. At this time, all examples are connected to a file on  under hosted filesystem, I don't know we can provide a internal memory block with no care (I don't believe this...). We need to have a study what happens in the FUSE layer on read side.
Finally, I don't understand the benefit of this calls. At this time, we can drive the tape drive at max speed. And multiple file access (concurrent file access) in LTFS always degrade the performance. I think the only benefit is reducing usage of bus bandwidth and temporary tiny memory. On the other hand, these calls have a chance to make data corruption. So I think balance between effort and reward is not matched.
Of cause, I can review any code if someone provide a code with careful test. But priority is not high at this time in my mind.

OK, I agree with you.


Memory Error on AddAttrsToSceneGraphs function

Hi I am running the preprocessing stages in order to use visual genome dataset. I have downloaded the segmented json files via the link within visual_genome_python_driver/local.py however the command ./data/genome/setup_vg.py produces a memory error when run - is there a way around this?
$ data/genome/setup_vg.py
Traceback (most recent call last):
File "data/genome/setup_vg.py", line 205, in
vg.AddAttrsToSceneGraphs(dataDir=dataDir)
File "/nas/users/t0192227/faster-rcnn/data/genome/visual_genome_python_driver/local.py", line 227, in AddAttrsToSceneGraphs
sg_dict = {sg['image_id']:sg for sg in json.load(f)}
File "/usr/lib/python2.7/json/init.py", line 291, in load
**kw)
File "/usr/lib/python2.7/json/init.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 380, in raw_decode
obj, end = self.scan_once(s, idx)
MemoryError
Thanks
Charlotte

I have the same problem!


SpreadsheetMetadataPropertyValueHandler messages without property name

Coverage remained the same at 92.356% when pulling 859a313da2fa84a631752838a6b6463aef297757 on feature/SpreadsheetMetadataPropertyValueHandler-messages-without-property-name into 800d72f2b4239272016ec7b95bac365cbf58f4ae on master.


Changes to dQuery

Hello,
We've made some changes to dQuery. All the data is streamed so it shouldn't have problems with large datasets anymore.
As a side effect, there's been some changes to the dQuery urls.
For instance, you should add from=xson to
https://github.com/OCHA-DAP/hdx-scraper-iati-viz/blob/f426ff85faeb2455f69cd1c6ccd3867870e0f4bd/config/project_configuration.yml#L6
so the new url should be
http://d-portal.org/dquery?from=xson&form=xml&sql=%s

Do let us know if anything is amiss.

@notshi Thank you! I have made the change to our script and also switched to use streaming downloads.

Great! Happy for this issue to be closed if you think all is working as intended.

Closing


Feature suggestion: update-events-only subscription hook

Since calls to Next.js' getStaticProps and getServerSideProps must often do further processing on fetched data, it's potentially a false assumption that the user actually wants the data to come through the subscription: rather, it may be more useful to listen for the update event, and then re-trigger the feeding of data from getStaticProps and/or getServerSideProps. A classic example of this is when the CMS data contains raw MDX code, and this needs to be compiled.
It turns out this can be done my using the Next router, and simply calling router.replace(router.asPath), which will cause all those prop-getting functions to re-run.
Since I just ran in to this issue with datocms' implementation of the same functionality, I offer this simplified hook based on their internal datocms-listen library, which is capable of returning the data from the query but for which I just use it to get the events:
import { useState, useEffect } from 'react';
import { useRouter } from 'next/router';
import { subscribeToQuery } from 'datocms-listen';

export function useDatoCmsUpdate({
  query,
  variables = {},
  preview = false,
  updateRef = false, // pass data from gSP in here, to track `isUpdating` state
} = {}) {
  const [error, setError] = useState(null);
  const [status, setStatus] = useState(query ? 'connecting' : 'closed');
  const [isUpdating, setIsUpdating] = useState(false);
  const router = useRouter();
  useEffect(() => {
    if (!updateRef) return;
    setIsUpdating(false);
  }, [updateRef]);
  useEffect(() => {
    if (!query) return () => false; // return early if there's no query, preview mode is inactive
    let unsubscribe;
    async function subscribe() {
      unsubscribe = await subscribeToQuery({
        query,
        variables,
        preview,
        token: process.env.DATOCMS_TOKEN,
        onStatusChange: (s) => {
          setStatus(s);
        },
        onChannelError: (e) => {
          setError(e);
        },
        onUpdate: (updateData) => {
          setError(null);
          if (status !== 'closed') {
            // hat tip: https://www.joshwcomeau.com/nextjs/refreshing-server-side-props/
            router.replace(router.asPath);
            if (updateRef) setIsUpdating(true);
          }
        },
      });
    }
    subscribe();
    return () => {
      unsubscribe && unsubscribe();
    };
  }, []);
  return { error, status, isUpdating };
}

This is a great idea, thanks for shedding light on the router.replace(router.asPath) trick!  I've asked the next.js team for clarification on the "stability" of this just to avoid implementing something that might break/change in the near future.

@rexxars your instinct about the stability was right, and I spoke too soon: there seems to be a bug that prevents it from working in production builds right now... 🤷🏻
https://github.com/vercel/next.js/issues/11559#issuecomment-609956467

While waiting for Next.js to fix that bug, the following works too, though less elegantly:
// top of page component
let allowReload = false;
useEffect(() => {
  setTimeout(() => (allowReload = true), 5000);
}, []);

// later on...
if (allowReload) window.location.reload(true);

@rexxars the router.replace trick works again, in my testing, latest as of Next.js v10.2.x.
This is a part of my current solution with DatoCMS—I'm guessing it would be similarly applicable in Sanity, the question just being how to get the update event—if you've got further ideas I'd love to hear them ;)
import { useEffect, useRef, useState } from 'react';
import { subscribeToQuery } from 'datocms-listen';
import { useRouter } from 'next/router';

import { reporter } from '../utils';
/*
  references for this technique of using router.replace

    - https://www.joshwcomeau.com/nextjs/refreshing-server-side-props/
      - https://twitter.com/flybayer/status/1333081016995622914
    - https://medium.com/wearewebera/updating-the-properties-of-the-getstaticprops-method-in-next-js-79a17b7801e1

  questions

    - how can I return something useful from this, so I know if we are in a "loading" state?
    - how can I prevent an additional run when the page first mounts?
*/
export function useDatoListeners(...queries) {
  const router = useRouter();
  const unsubsRef = useRef(queries);
  const [isUpdating, setIsUpdating] = useState(false);
  // const [isLoading, setIsLoading] = useState(true);
  useEffect(() => {
    const { info, table } = reporter();
    if (router.isPreview) {
      // setTimeout(() => setIsLoading(false), 1000);
      unsubsRef.current = unsubsRef.current.map((query) =>
        subscribeToQuery({
          ...query,
          // preview: router.isPreview,
          // token: process.env.DATOCMS_TOKEN,
          onChannelError({ code, message, response }) {
            table({ code, message, response });
            window.location.reload(true); // retry the connection !
          },
          onUpdate() {
            if (isUpdating) return;
            info('datocms update received');
            /* NOTES:
                1. `shallow: false` means getStaticProps getServerProps will run
                2. `scroll: false` maintains position, avoiding a scroll back to top
            */
            router.replace(router.asPath, router.asPath, { shallow: false, scroll: false });
            setTimeout(() => setIsUpdating(false), 1000);
          },
        }),
      );
      return () => Promise.all(unsubsRef.current).then((unsubs) => unsubs.forEach((unsub) => unsub()));
    }
  }, []);
  return isUpdating;
}

In v2.0.0 you're encouraged in the docs to implement patterns where you're not data fetching on the server when you're in preview mode. As you still have to fetch in @sanity/groq-store so it doesn't make sense to dual fetch 😄


Handle Meta Tag Override With ClgOgImage

Feature Request
Right now, using the CldOgImage component doesn't override matching properties in the Next.js Head component.
Describe the solution you'd like
I'd like to have default image properties set using the Next.js Head component, then have the CldOgImage component override those when applicable.
It seem like this can be done in Next.js by attaching keys to the individual meta tags. Next Head will automatically de-dupe multiple tags with the same key. Maybe you can add a default key to the meta properties CldOgImage component sets.
https://nextjs.org/docs/api-reference/next/head

thoughts on this @jamesqquick ? https://github.com/colbyfayock/next-cloudinary/pull/171


chore(master): release 1.1.150

:robot: I have created a release beep boop
1.1.150 (2023-08-10)
Miscellaneous

deps: update dependency @commitlint/cli to v17.7.1 (361b46c)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/wayofdev/keywind/releases/tag/v1.1.150 :sunflower:


Add dat keep to save history to local backup

Adds a "local backup" to keep history. The main idea being that you could store history offline before pushing to a server. This would also make it easy to do live backups to an external HD (TODO  configure/add option for backup dir).
PR adds a few commands:

dat keep - import latest files in archive and keep in local history
dat keep --list, -l - list files available in backup (prints filename, version, mtime)
dat keep --serve - serve dat from the backup, allowing peers to download full history
dat keep --remove 10..120, -d - remove version range from backup

It also adds a --keep option for live backups:

dat sync --keep - keep all history in local backup.

The functionality is mostly there but the UI for this is still a bit lacking. I'd be good to get some feedback on how this should work before doing more UI work. I think this could be included with out dat 2.0 release, perhaps just with the addition of choosing a directory.
See #759 for more details.

Change command to dat backup

Reopened. This is an often requested and high-value feature.

We are closing this in favor of a daemon-based method coming soon..


CONAN_OPTIONS seems not working

@solvingj reported that CONAN_OPTIONS is not working properly on his scenario:
>>  docker run -m 2gb --rm -v "${PWD}:/home/conan/project"
    -e CONAN_BASE_PROFILE="<profile>"
    -e CONAN_CHANNEL="testing"
    -e CONAN_CONFIG_URL="https://<url>"
    -e CONAN_DOCKER_IMAGE="<dockerimage>"
    -e CONAN_DOCKER_IMAGE_SKIP_UPDATE="1"
    -e CONAN_DOCKER_PLATFORM="linux"
    -e CONAN_LOGIN_USERNAME="<username>"
    -e CONAN_OPTIONS="foobar:fPIC=True"
    -e CONAN_PASSWORD="******"
    -e CONAN_SKIP_VS_PROJECTS_UPGRADE="True"
    -e CONAN_UPLOAD="<upload_address>"
    -e CONAN_USERNAME="<username>"
    -e CONAN_DOCKER_IMAGE_SKIP_PULL="True"
    -e CONAN_DOCKER_ENTRY_SCRIPT="<script>"
    -e CONAN_DOCKER_USE_SUDO="False"
    -e CONAN_REFERENCE="foobar/0.1.0@<username>"
...

+------------------------------------+
| Profile                            |
|------------------------------------|
| include(gcc_48_ubuntu_release_x64) |
|                                    |
| [settings]                         |
|                                    |
| [options]                          |
|                                    |
| [env]                              |
|                                    |
| [build_requires]                   |
+------------------------------------+
[conan_create]
 >> Calling 'conan create'
+-----------------+------------------------------------------------------+
| Configuration   | value                                                |
|-----------------+------------------------------------------------------|
| name            | foobar                                               |
| version         | 0.1.0                                                |
| user            | username                                             |
| channel         | testing                                              |
| build_modes     |                                                      |
| profile_name    | /tmp/tmpzcrku8gxconan_package_tools_profiles/profile |
+-----------------+------------------------------------------------------+
Exporting package recipe
foobar/0.1.0@username/testing: A new conanfile.py version was exported
foobar/0.1.0@username/testing: Folder: /root/.conan/data/foobar/0.1.0/username/testing/export
Configuration:
[settings]
os=Linux
compiler=gcc
compiler.version=4.8
compiler.libcxx=None
distro=ubuntu
build_type=Release
arch=x86_64
[options]
[build_requires]
[env]
foobar/0.1.0@username/testing: WARN: Forced build from source

I have tried to reproduce, but it's working on my side:
Conan version: 1.9.2
CPT version: 0.20.0
$ conan new -s -t -cis -cilg foo/0.1.0
$ <add fPIC option>
$ export CONAN_USERNAME=uilianries \
         CONAN_DOCKER_IMAGE=conanio/gcc48 \
         CONAN_GCC_VERSIONS=4.8 \
         CONAN_ARCHS=x86_64 \
         CONAN_OPTIONS='foo:fPIC=False' \
         CONAN_REFERENCE=foo/0.1.0@uilianries/testing \
         CONAN_CHANNEL=testing \
         CONAN_CONFIG_URL=https://github.com/bincrafters/conan-config.git \
         CONAN_BASE_PROFILE=linux-gcc48-amd64 \
         CONAN_DOCKER_PLATFORM="linux" \
         CONAN_DOCKER_ENTRY_SCRIPT='ps aux'
$ python build.py

...
+----------------------------+
| Profile                    |
|----------------------------|
| include(linux-gcc48-amd64) |
|                            |
| [settings]                 |
| arch=x86_64                |
| build_type=Release         |
| compiler=gcc               |
| compiler.version=4.8       |
| [options]                  |
| foo:fPIC=False             |
| foo:shared=True            |
| [env]                      |
|                            |
| [build_requires]           |
+----------------------------+
...

Full log: build.log

I still have to isolate on my end since Uilian indicates that his works.

@solvingj which CPT and Conan version are you running?
Also, your line contains -m 2gb but AFAIK we dont have an option to limit RAM by CPT.

Yes, it seems working now. i must have had a local merge issue which was missing the feature somehow.

Nice! :+1:

It turns out it was another case of not using add_common_builds().  We use the add() function on the ConanMultiPackager to populate our builds, and the environment variables arent used there.

I'm going to investigate further.

I meant to say that all env vars only have effect when using add common builds. This is by design, it’s just that I forgot.

That's true, is it a problem for you? Do you need CONAN_OPTIONS working with add single method? We could support it, but sounds like an workaround.

Okay, so I'm closing this issue again :)


blog: "Go+ community" link seemingly points to wrong target

What did you do?
Enter https://blog.golang.org in a web browser.
Hover over the "Go+ Community" link like in the screenshot, and note the URL it is pointing to (also highlighted):

What did you expect to see?
I expected the URL to point to https://plus.google.com/communities/114112804251407510571
What did you see instead?
Instead, the URL points to https://plus.google.com/112164155169467723645/posts
(Note that it is not just the /post part that differs, but it is pointing to a Google+ page rather than a community).

CC @spf13


update note at top of Liquidity section

Preview is available here:http://developers-pr380.previews.kube001.services.stellar-ops.com

Preview is available here:http://developers-pr380.previews.kube001.services.stellar-ops.com


Fix curl command in documentation

Explicitly set the HTTP method to POST using the -X flag to avoid errors when creating a new model from modelfile

What error do you get when not explicitly setting the -X flag? Using the -d flag already sends the request as POST^1.

Actually, I have noted the error was earlier being caused by using an apostrophe you're within the JSON string and shell was interpreting it as the end of the string.


flutter doctor --android-licenses A newer version of the Android SDK is required. To update, run:

C:\Users\sunuw>flutter doctor -v
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18362.720], locale en-US)
• Flutter version 1.12.13+hotfix.8 at D:\Flutter Pack\flutter
• Framework revision 0b8abb4724 (5 weeks ago), 2020-02-11 11:44:36 -0800
• Engine revision e1e6ced81d
• Dart version 2.7.0
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at C:\Users\sunuw\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-R, build-tools 29.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
X Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed
instructions.
[√] Android Studio (version 3.6)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 44.0.2
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
[√] Connected device (1 available)
• AOSP on IA Emulator • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
! Doctor found issues in 1 category.
C:\Users\sunuw>
C:\Users\sunuw>flutter doctor --android-licenses
A newer version of the Android SDK is required. To update, run:
C:\Users\sunuw\AppData\Local\Android\sdk\tools\bin\sdkmanager --update

X Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed
instructions.

Hi @ShineSalt
I see there's an open issue addressing the case you described.
Please follow up on that issue,
I'm closing the current one as duplicate.
If you disagree please write in the comments
and I will reopen it.
Thank you


AbstractSpanBuilder.childOf should not return NoopSpanBuilder

This is in a direct contradiction to the changes done in https://github.com/opentracing/opentracing-java/pull/56 ("A child of a NoopSpan is a NoopSpan"), but I believe that the behaviour introduced there is not correct.
It seems that there are two uses for Noop implementation:

The default empty tracer implementation
NoopSpanContext might be returned from Tracer.extract when there is no span context in the carrier (instead of null) - to indicate "a lack of"

#56 uses the 2nd meaning of NoopSpanContext and the reasoning is that it makes the fluent builder usable when there is no parent SpanContext - does not require conditional checking for presence:
SpanContext parent = tracer.extract(Format.Builtin.TEXT_MAP, adapter);
try (Span span = tracer.buildSpan("some-name").asChildOf(parent).start()) {
    // server processes request
    return response;
}

The problem is that the behaviour ("A child of a NoopSpan is a NoopSpan") it's not what I expect. I expect that a child of a "no span" (or NoopSpan, or null) is just a span without a parent. And not a NoopSpan, but a Span implementation used by the current tracer.
Why? Because the child span is going to be lost - NoopSpan does not record tags, has empty finish() implementation and the tracer will not be aware of it.
I'm not sure why there is a requirement in brave-opentracing for it to behave this way.
I'd suggest to:

always return this inside AbstractSpanBuilder. Something like this:  @Override
  public final AbstractSpanBuilder asChildOf(SpanContext parent) {
      if(!(parent instanceof NoopSpanContext)) {
          this.addReference(References.CHILD_OF, parent);
      }
      return this;
  }

add a null check if nulls are not the way to go
clearly state what represents an empty span context - in the api (javadoc for Tracer.extract).

Though it might be better to add SpanContext.isEmpty method to the API, make it explicit and get rid of this weird "instanceof".

I expect that a child of a "no span" (or NoopSpan, or null) is just a span without a parent.

This is the false premise (to the direction taken so far).
An empty context provides a noop span, and the child of a noop span is implicitly another noop span.
An explicit action is required to go from an empty context to an empty (rather than noop) span.
This is what provides the most fluent api for users.

Though it might be better to add SpanContext.isEmpty method to the API, make it explicit and get rid of this weird "instanceof".

I suspect this has a lot of merit. The current situation does lead to having to understand a number of complexities in the design and use patterns.

I do not follow...
When a request is received I want a span to start which will be tracked/reported no matter if the request(carrier) contains span context or not. In both these cases I'd like following code to work properly:
SpanContext parent = tracer.extract(Format.Builtin.TEXT_MAP, adapter);
Span span = tracer.buildSpan("some-name").asChildOf(parent).start())

But if empty context provides a noop span, then I'll need some conditional like:
SpanContext parent = tracer.extract(Format.Builtin.TEXT_MAP, adapter);
SpanBuilder builder = tracer.buildSpan("some-name");
Span span;
if(parent is empty-context) {
   span = builder.build(); // can't use asChildOf because it will create NoopSpan and I don't want it
} else {
  span = builder.asChildOf(parent).build();
}

Do I understand this correctly?

This is in a direct contradiction to the changes done in #56 ("A child of a NoopSpan is a NoopSpan"), but I believe that the behaviour introduced there is not correct.

FTR i think it'll be more constructive focusing on discussions that happened in https://github.com/opentracing/opentracing-java/pull/58

But if empty context provides a noop span, then I'll need some conditional like…

That is correct.
The premise is that in any decent sized microservices platform the majority of services do not force sampling/tracing, that they only continue tracing requests that are already being traced. This would also be the default approach when adding tracing to libraries and frameworks. For more info see https://github.com/opentracing/opentracing-java/pull/58#discussion_r81646716

@michaelsembwever as has been demonstrated in other OT language implementations, there is no need for this sort of conditional as long as asChildOf (and followsFrom) are documented to accept the empty/null/whatever SpanContext... I feel rather strongly that we should allow the user to just write
span = builder.asChildOf(parentContext).build();

regardless of whether parentContext is an EmptyContext or null or whatever we've agreed is most appropriate in modern Java.

span = builder.asChildOf(parentContext).build();

They can. The discussion here is to whether tracing off an empty context here is implicitly forced or not. My argument in https://github.com/opentracing/opentracing-java/pull/58#discussion_r81646716 is that you can easily save yourself hundreds or thousands of lines of code by not implicitly forcing tracing.
Both side of the argument though clarify the need for a better mechanism, like spanContext.isEmpty() to exist.

@michaelsembwever I've read #58 discussion - it makes sense for it to behave like you described.
But if it's a part of some instrumented framework you'll still need some extra code to decide if this the instrumented service is the service which starts traces or not.
It would be ideal if the same construction (builder.asChildOf(parentContext).build()) could be used in both cases and the behaviour explicitly configurable (via sampling policy?).

It would be ideal if the same construction (builder.asChildOf(parentContext).build()) could be used in both cases and the behaviour explicitly configurable (via sampling policy?)

Agreed. And it's been previously discussed and agreed upon :-)

Spring cleaning here: closing this issue as it is out of date. Feel free to reopen or create a new issue if you'd like to continue.


Add noarch python, license file, rerender

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

Hmm, will have to run this down:

  File "/opt/conda/lib/python3.6/site-packages/conda_build/variants.py", line 197, in _combine_spec_dictionaries
    values[k].extend(ensure_list(v))
AttributeError: 'collections.OrderedDict' object has no attribute 'extend'
Exited with code 1

Ironically, does seem my other yaml parser was in fact the cause of the bad render...


Provisioning fails - Error during dd. Return code 1.

Hi,
we have been using the CM-Provision for quite a while now and it is a great tool. Thank you for that!
We never had any problems provisioning our CM4 modules until a few weeks ago. Since the tool version we used still had the MAC-filter, we did ran into problems with a new batch of CM4. Hence, I updated our provision station to the newest version 1.6.3 (without the MAC-filter) which seemed to fixed the problem. After the update we were able to flash ~15 CM4 modules without any problems. However since about a week nearly all attempts to flash new CM4 boards are suddenly resulting in the following error:

Here a corresponding detail-page of a failing CM4:

Before we never encountered this error. In the last week 15 out of 20 CM4 boards showed it.
I already had a look through the existing issues. While issue #15 seems to talk about a similar error, the proposed solution does not fit to our problem since our image only has an uncompressed size of 4.3GB while the CM4 modules provide 32GB of storage.
We would really appreciate, if somebody could help us.
Thank you!

Tagging @maxnet, can you please take a look at this? Curious that it's only writing out 4K records each time.

I already had a look through the existing issues. While issue https://github.com/raspberrypi/cmprovision/issues/15
seems to talk about a similar error, the proposed solution does not fit to our problem since our image only has an
uncompressed size of 4.3GB while the CM4 modules provide 32GB of storage.

What is the exact uncompressed size in bytes?
We are using 1 MiB output block size.
So 4096+1 records, would be 4096 MiB + a tiny amount more that is not a whole megabyte.
You are using an image that is not dividable by whole megabytes?
What does pre-install script output say?
Any eMMC customization (such as pSLC mode)?

The exact uncompressed size is: 4.294.967.296 Bytes
The image is dividable in whole megabytes (1024 Byte), at least in my opinion.
I can try it with a normal RPI OS Image, but we have not changed our image (or something else). Before the problem appeared, the flashing of that exact image (even with the same project) worked perfectly fine. The problem also them to occurs randomly. Some CM4 board can be flashed without problems, other not. If a failed board is recovered using an additional USB connection to the provision station, the flashing then often works.
The pre-install script currently only turns on a LED on the CM4 carrier we are using. This works fine.
We do not have any eMMC customization. We are using regular CM4 boards, straight from the distributor.
If I can to anything to help debug this problem, please let me know.

If you attach a HDMI monitor to the board being provisioned, does it show anything out of the ordinary?
E.g. curl having to retry the download (not sure if that works correctly in all cases)?
Or kernel messages indicating an IO error?

@maxnet I checked the HDMI output during a failing flashing attempt. Everything looks normal to me but in the end it says:
gzip: crc error Writing image failed.
Below you can find a picture of the output.
We are using gzip (gz) compression for our image.
Presented by only this information I would assume a corrupted image file. However, the same image file worked perfectly fine and even in the last week a few boards could be flashed using this image without a problem.

Suggest you test with our stock images first.
If issue persist you may also want to double check if the boards affected run stable under load.
E.g. install RPI OS lite, and try:
sudo apt update
sudo apt install memtester
memtester 1500M

Let it run for a while and see if it detects any errors.
Make sure you test with same power supplies as you use during provisioning.

@tdewey-rpi  Unfortunately I can currently not record a video of my workflow, but I can give you the following description with pictures:
Flashing:
Setup:

We are using a RPI 4 B as provision station. The RPI is connected to a switch and has a second USB ETH interface for connection to our network. In this example I am using the CM4IO board as a carrier for the CM4 board that should be flashed.
HDMI-Output:

Webpage-Log:

Recovery:
Setup:

For recovery I have set the jumper to disable eMMC boot and I additionally connected the CM4 to the provision station using USB.
HDMI-Output:

Webpage-Output:

Here are the logs corresponding to the flashing attempts shown above:
log_dnsmasq.txt
log_rpiboot.txt
log_dmesg.txt
log_syslog.txt
After the flashing and the recovery failed I used the USB-mass-storage mode to attach the CM4 to my computer and directly transfered an RPI OS Lite Image onto the board. This worked perfectly fine and I could normally start the CM4 afterwards and access the system.
@maxnet On this system I also performed a short run of the memtester (only two cycles). This produced no error.
Next I will exchange the image in the provision station with the official RPI OS Lite image and check if the provision process will work afterwards.

Ok, after replacing our image with the official RPI OS Lite image the provisioning worked again, even for a board that failed before.
Just to give it a try, I freshly reuploaded our image and set the newly uploaded image active. To my surprise the provisioning also worked fine with this image. If I switch back to the old upload of our image, the provisioning fails again, even though the image files are exactly the same (even the computed hash is exactly the same - see below).

In my opinion, the only explanation for this behavior is that the old image file somehow got damaged after uploading (and using it for a while). Is this possible? Can you tell me where the images are stored on the provisioning device? Then I can recompute the hash of both the old and the newly uploaded image and diff them.

Not near a cmprovision installation but recall /var/lib/cmprovision/storage/app/public
Search for the filename mentioned in your photo xAth ... .gz
And yes, SD card storage is fragile.
It cannot do small writes. If you modify anything on SD card it will have to read a larger block of data, change the bytes you want to change, and write the large block of data back to storage.

Thank you! With your hint I was able to find the images. The exact location of the image storage is /var/lib/cmprovision/public/uploads.
The hashes are confirming the suspicion. They differ between the old image and newly uploaded image. While the hash of the newly uploaded image equals the hash that I have computed on my computer, the hash of the old image does not. Hence, the old image has indeed somehow been damaged.
But I am still wondering why a few boards could nevertheless be successfully flashed with the old image. That seems strange... Do you have any explanation for that?

But I am still wondering why a few boards could nevertheless be successfully flashed with the old image. That seems
strange... Do you have any explanation for that?

If that happened in quick succession (one board fails, one board works, after each other, without you rebooting the host computer) there is also a possibility there was a memory error on your host Pi.
As I would expect your 257 MB compressed image to be still in memory (Linux' buffer cache) and not re-read from storage in that case.
Unless you are using a model with very little memory.
However then the problem would likely to be gone after a reboot though.
Problems with your SD card are more likely.
Cheap SD storage sticks 3 bits in a cell.
When reading from it, it tests how well current flows through the memory cell, and has to distinguish between 8 possible voltage levels.
May be very close to the threshold voltage of a different level, resulting in different results on different reads.
(Some flash storage can be programmed to stick less bits in a cell, giving better reliability at a cost of permanently losing capacity.
The eMMC on the CM4 boards does supports that. It is what the option "Format eMMC as pSLC (one time settable only)" in cmprovision does.
But very few normal SD cards do, so will not help on your host system.
Do note you can also install cmprovision on a normal x86 computer with normal disks. It is not mandatory to use a Pi).