Replace old sparse -> dense -> sparse with new from_sparse method

Tests need to pass before we can review. See failures here:
https://github.com/pyt-team/TopoModelX/actions/runs/6424391426/job/17444941942?pr=235

@ninamiolane Thank you for taking a look.  I was about to tag you and @mhajij for your thoughts.  There's a weird issue in can_train tutorial.
TLDR. can_layer errors when accessing index of the sparse matrix. So deed to call coalesce before that. But then it's causing a matrix dimension mismatch in MultiHeadLiftLayer during training which made me suspicious of something deeper going on:
File [~/workspace/code/TopoModelX/topomodelx/nn/cell/can_layer.py:273](https://file+.vscode-resource.vscode-cdn.net/Users/jkhouja/workspace/code/TopoModelX/tutorials/cell/~/workspace/code/TopoModelX/topomodelx/nn/cell/can_layer.py:273), in MultiHeadLiftLayer.forward(self, x_0, neighborhood_0_to_0, x_1)
    271     print(combined_x_1.shape)
    272     print(x_1.shape)
--> 273     combined_x_1 = torch.cat(
    274         (combined_x_1, x_1), dim=1
    275     )  # (num_edges, heads + in_channels_1)
    277 return combined_x_1

RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 55 but got size 38 for tensor number 1 in the list.

So I'm tracing the source of the issue, identifying the matrix.  It's taking me longer since I'm not familiar with CAN architecture.  Will keep you posted.

@ninamiolane @mhajij I created a new ticket where I documented the details issue #236


Malformed yaml in handler could crash all delayed_job workers (and prevent recovery forever)

Issue: One of our jobs was loaded with a big list of data (totally unintentional and I'm fixing it in our end). The data was longer than the column width for handler and this resulted in a malformed (or rather incomplete) YAML. This repeatedly crashed all the workers and took sometime for me to figure out and isolate the issue. What worried me was that one job brought down all the workers and prevented recovery.
Steps to reproduce: Insert a job with a huge dataset
Diagnosis: The rescue in payload_object missed the exception raised.
Honestly, I'm not sure if this is something that would happen in the real world or it's something delayed_job has to handle. However, the exception handling can be more robust so that the job can be marked as failed and further jobs are processed.
    def handle_failed_job(job, error)
      job.last_error = "{#{error.message}\n#{error.backtrace.join("\n")}"
      say "#{job.name} failed with #{error.class.name}: #{error.message} - #{job.attempts} failed attempts", Logger::ERROR
      reschedule(job)
    end

      def payload_object
        @payload_object ||= YAML.load(self.handler)
      rescue TypeError, LoadError, NameError, ArgumentError => e
        raise DeserializationError,
          "Job failed to load: #{e.message}. Handler: #{handler.inspect}"
      end

/data/dolphin/shared/bundled_gems/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands/runner.rb:53:in `eval': (<unknown>): found unexpected end of stream while scanning a quoted scalar at line 5 column 5 (Psych::SyntaxError)
	from /usr/lib64/ruby/1.9.1/psych.rb:203:in `parse_stream'
	from /usr/lib64/ruby/1.9.1/psych.rb:151:in `parse'
	from /usr/lib64/ruby/1.9.1/psych.rb:127:in `load'
	from /data/dolphin/shared/bundled_gems/ruby/1.9.1/gems/delayed_job-3.0.3/lib/delayed/backend/base.rb:84:in `payload_object'
	from /data/dolphin/shared/bundled_gems/ruby/1.9.1/gems/delayed_job-3.0.3/lib/delayed/backend/base.rb:71:in `name'
	from /data/dolphin/shared/bundled_gems/ruby/1.9.1/gems/delayed_job-3.0.3/lib/delayed/worker.rb:230:in `handle_failed_job'
	from /data/dolphin/shared/bundled_gems/ruby/1.9.1/gems/delayed_job-3.0.3/lib/delayed/worker.rb:191:in `block in run'
	from /data/dolphin/shared/bundled_gems/ruby/1.9.1/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:60:in `call'
	from /data/dolphin/shared/bundled_gems/ruby/1.9.1/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:60:in `block in initialize'
	from /data/dolphin/shared/bundled_gems/ruby/1.9.1/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:65:in `call'
	from /data/dolphin/shared/bundled_gems/ruby/1.9.1/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:65:in `execute'
	from /data/dolphin/shared/bundled_gems/ruby/1.9.1/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:38:in `run_callbacks'
	from /data/dolphin/shared/bundled_gems/ruby/1.9.1/gems/delayed_job-3.0.3/lib/delayed/worker.rb:191:in `rescue in run'
	from /data/dolphin/shared/bundled_gems/ruby/1.9.1/gems/delayed_job-3.0.3/lib/delayed/worker.rb:181:in `run'
	from /data/dolphin/shared/bundled_gems/ruby/1.9.1/gems/delayed_job-3.0.3/lib/delayed/worker.rb:238:in `block in reserve_and_run_one_job'
	from /data/dolphin/shared/bundled_gems/ruby/1.9.1/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:60:in `call'
	from /data/dolphin/shared/bundled_gems/ruby/1.9.1/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:60:in `block in initialize'
	from /data/dolphin/shared/bundled_gems/ruby/1.9.1/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:65:in `call'
	from /data/dolphin/shared/bundled_gems/ruby/1.9.1/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:65:in `execute'

if you run into the issue and have a lot of jobs already in the database, you can try to identify the broken job with:
Delayed::Job.find(JOB_ID).invoke_job

which should give you an error message (like the above)

Typical MySQL, just truncating data instead of throwing an error like good database with actual data integrity concerns.  I suspect in MySQL 5.7 this is actually addressed depending on sql_modes db param.


Feature Request: report unread/read status immediately to Feedly

I noticed that if my Feedly articles are marked as read in NetNewsWire, I need to perform a full sync for the read status to sync with other RSS clients using Feedly
I know it's possible to do because Reeder does this. It's pretty convenient to not have to remember to perform a sync at the end of a reading session, and to be able to continue where you left off on other device.
Does anyone know if Feedbin sync works with this?
I realize I ca set the feed refresh interval to 10 mins and that would probably be pretty OK experience generally, but does the refresh work reliably if I quit NNW completely? Maybe reporting just the read status is a lighter operation which could be performed a lot more often than the full sync?

We automatically sync statuses every 2 minutes regardless of refresh interval.  We don't want to do a network request for every unread that happens, so we batch them in 2 minute intervals.
On iOS we do also sync when you switch away from the app.  Unfortunately, macOS doesn't give us a good way to do the asynchronous network calls our sync systems use when quiting the app.

We automatically sync statuses every 2 minutes regardless of refresh interval.  We don't want to do a network request for every unread that happens, so we batch them in 2 minute intervals.
On iOS we do also sync when you switch away from the app.  Unfortunately, macOS doesn't give us a good way to do the asynchronous network calls our sync systems use when quiting the app.

@vincode-io Okay that's great to hear! I didn't catch that as I was testing it immediately after marking it read in NNW.
I think I’ll close the issue then.

@vincode-io Okay that's great to hear! I didn't catch that as I was testing it immediately after marking it read in NNW.
I think I’ll close the issue then.

Leave it open.  I think I might have found a solution to the shutdown on macOS problem.

Leave it open.  I think I might have found a solution to the shutdown on macOS problem.

OK great.

OK great.

@ArttuLai I did get this figured out.  Unless I messed something up, this will be in the upcoming 6.0 release of NetNewsWire.

@ArttuLai I did get this figured out.  Unless I messed something up, this will be in the upcoming 6.0 release of NetNewsWire.

Thank you

Thank you


[TACHYON-710] Fix 'XBytesOnTiers' to be compatible in Master and Worker

[TACHYON-710] https://tachyon.atlassian.net/browse/TACHYON-710
Master and WebUI treat CapacityBytesOnTiers at alias level. But Worker treats it at tier level.
This PR fixes the incompatibility by modifying Worker to treat at alias level.

+1 LGTM, thanks for the fix.

+1 LGTM

LGTM


[SECURITY-245] [Epic] SOC 2: Configuration

SOC 2: Configuration
Jira Epic
Tasks that require configuration of infrastructure or services.
Pull Requests
...
Jira Issues
...
How to test
...
Deployment Notes
...
Epic Notes
Add notes here.

Accidental Epic PR - closing.


Change all references of 'snapps' to 'zk' in all example files

Description
This renames all the references of snapp to zk in the examples.
Left a TODO to change the Mina.getAccount.snapp member to whatever SnarkyJS changes too. That should be done before merging this in.
Tested By
Examples can be built without errors.
Examples pass existing unit tests

Not urgent, but feels like maybe we could improve a few names compared to naming pattern that the examples used in the past:
const privateKey = PrivateKey.random();
const address = PublicKey.fromPrivateKey(privateKey);

const contract = new SmartContract(address);


Wrap the searchBox input in a BEM div

I'm currently trying to replicate our magento styling into its own theme. Here is the current searchBox on Magento.

I wanted to add the small magnifying glass using :after pseudo-element, but it is not available on input elements.
I suggest we always wrap the searchBox inside its own
, so styling is made easier (and is more consistent with our other widgets).
WDYT?

I mean, with this html:

  <input type="text" id="search" />

And this js:
search.addWidget(
  instantsearch.widgets.searchBox({
    container: '#search',
    placeholder: 'Search for products'
  })
);

or this one:
search.addWidget(
  instantsearch.widgets.searchBox({
    container: '#search-parent',
    placeholder: 'Search for products'
  })
);

The following markup should be generated:

    <input type="text" id="search" placeholder="Search for products" class="ais-search-box--input" />

(Currently the
 is missing, and that is what I want to add)

Careful, we decided to have a mode where we would not wrap the searchBox to specifically target a bug @redox was facing:

https://github.com/algolia/instantsearch.js/issues/113
https://github.com/algolia/instantsearch.js/issues/25

After discussing with @redox and @vvo we came to the conclusion that we should wrap the widget in its own div by default, but also create an option (addDivWrapper: false?) to disable this behavior if needed.

wrapInput:true|false?
I find it hard to reason "add: false" :)

wrapInput:true|false

:+1:


Invalid proxy default for Cargo

Problem
I installed stable Cargo from rustup (which I got from a Manjaro package manager). When I created an empty project and tried to add a new dependency, Cargo said it couldn't connect to <IP_ADDRESS>:9150.
    Updating crates.io index
warning: spurious network error (3 tries remaining): [7] Couldn't connect to server (Failed to connect to <IP_ADDRESS> port 9150 after 0 ms: Couldn't connect to server)
warning: spurious network error (2 tries remaining): [7] Couldn't connect to server (Failed to connect to <IP_ADDRESS> port 9150 after 0 ms: Couldn't connect to server)
[...]

Steps

Install rustup 1.26.0-3 by using pacman
rustup toolchain install stable
Create a new project
Try to add a dependency to it

Possible Solution(s)
Use Cargo with this configuration:
[http]
proxy = ""

Notes
$ rustup default
stable-x86_64-unknown-linux-gnu (default)
$ rustup --version
rustup 1.26.0 (2023-05-04)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.72.0 (5680fa18f 2023-08-23)`
$ uname -a
Linux hostname 6.1.44-1-MANJARO #1 SMP PREEMPT_DYNAMIC Wed Aug  9 09:02:26 UTC 2023 x86_64 GNU/Linux

Version
cargo 1.72.0 (103a7ff2e 2023-08-15)
release: 1.72.0
commit-hash: 103a7ff2ee7678d34f34d778614c5eb2525ae9de
commit-date: 2023-08-15
host: x86_64-unknown-linux-gnu
libgit2: 1.6.4 (sys:0.17.2 vendored)
libcurl: 8.1.2-DEV (sys:0.4.63+curl-8.1.2 vendored ssl:OpenSSL/1.1.1u)
ssl: OpenSSL 1.1.1u  30 May 2023
os: Linux [64-bit]

Trying to reproduce here (on macos), and I can't. But it seem that CARGO_HTTP_PROXY env variable takes precedence. Any chance this is set, or any other things that would override .config.toml ?

You could check each of the environment variables:

CARGO_HTTP_PROXY
HTTPS_PROXY
https_proxy
http_proxy

Also, you could use cargo +nightly -Zunstable-options config get http.proxy to check if you've set the proxy config value elsewhere.

Oh, nice, I see on main, you can even add --show-origin to show the provenance !

@Carreau @weihanglo
No environment variables are set for the proxy:
$ set | grep -i proxy
history '[...]'

Just installed nightly:
$ cargo +nightly -Zunstable-options config get http.proxy
error: config value `http.proxy` is not set
$ cargo +nightly update
    Updating crates.io index
warning: spurious network error (3 tries remaining): [7] Couldn't connect to server (Failed to connect to <IP_ADDRESS> port 9150 after 0 ms: Couldn't connect to server)
warning: spurious network error (2 tries remaining): [7] Couldn't connect to server (Failed to connect to <IP_ADDRESS> port 9150 after 0 ms: Couldn't connect to server)
[...]

The "possible solution" also works for nightly:
$ cargo +nightly --config http.proxy=\"\" update
    Updating crates.io index
$ echo $status
0

I have no idea, so I'm going to throw some random guesses:

nothing in you ~/.netrc, not your local/global git config ?

And I'm going to guess if you remove proxy = "" from the .toml file it works ....

Also port 9150 is tor, did you play with tor recently ? Or have something going on with tor ?

Cargo respects these configurations as documented here.
Try git config --show-origin http.proxy to check if you set anything in .git/config or other git configuration files.
Also, try something like curl https://github.com/rust-lang/crates.io-index or curl https://index.crates.io, since under the hood libcurl is in use for proxies.

Beyond the investigation, if you can provide a minimal reproduction, like executing a set commands in a docker image, that would be a big help to resolve this.

I'm closing this issue, because somehow .git/config had proxy settings set. Thanks, @Carreau @weihanglo

Great ! Enjoy your new project now.
On Sun, Aug 27, 2023 at 09:15 Arisu Wonderland @.***>
wrote:

I'm closing this issue, because somehow .git/config had proxy settings
set. Thanks, @Carreau https://github.com/Carreau @weihanglo
https://github.com/weihanglo
—
Reply to this email directly, view it on GitHub
https://github.com/rust-lang/cargo/issues/12566#issuecomment-1694591838,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACR5T37MK36JPJOBDH4PMLXXLXZZANCNFSM6AAAAAA37UXATQ
.
You are receiving this because you were mentioned.Message ID:
@.***>


Update README.md

Made a clear distinction between users and developers. Users get priority in terms of the order of content to make their lives easier.

Once we fix the issues around deployment


Using Passport in a controller

Hello,
I'm trying to use Passport's 'authenticate' function inside of a controller function. However, I'm getting a hang up and it doesn't seem like Passport can recognize the request. What's the best way to go about this? I'm using a local strategy by the way.

Hi,
Possibly the same issue here:
I would like to use passport in my express app, normally you would do something like:
app.get('/test', passport.authenticate('bearer', {session: false}), function(req,res) ...
But since you define the routes in the yaml file, i am not sure how to build this. Is there a possibility to define this in the yaml file or can i do it differently?
Thanks in advance!

You should be able to use this function in your controller by simply calling it with the parameters passed to you like so:
passport.authenticate('bearer', {session: false})(req, res, next);


Make all images configurable

This fixes #17

Thanks for the PR. Once the tests run through, I'll merge it in

Thanks, when can I expect the new version? :)

Should push out in the next few minutes


What's the actual layers size?

I've been trying to optimize image sizes, since recently our number of containerized applications has increased in a significant way. As part of this task it came to my attention that a layer which only involves  running chmod 777 on a directory of 200M ... adds up to 200M. To further illustrate my concern I have this two Docker files:
FROM ubuntu

ADD large-file.txt /large-file.txt

FROM ubuntu

ADD large-file.txt /large-file.txt
RUN touch /large-file.txt

Assuming large-file.txt is 256M and that we build images like:
 $ docker build -f Dockerfile-notouch -t test-size:notouch .
Sending build context to Docker daemon 267.6 MB
Step 0 : FROM ubuntu
 ---> d2a0ecffe6fa
Step 1 : ADD large-file.txt /large-file.txt
 ---> Using cache
 ---> 099db7e411e9
Successfully built 099db7e411e9

$ docker build -f Dockerfile-touch -t test-size:touch .
Sending build context to Docker daemon 267.6 MB
Step 0 : FROM ubuntu
 ---> d2a0ecffe6fa
Step 1 : ADD large-file.txt /large-file.txt
 ---> Using cache
 ---> 099db7e411e9
Step 2 : RUN touch /large-file.txt
 ---> Using cache
 ---> 046c8da3caa3
Successfully built 046c8da3caa3

Here is the output from docker images:
docker images | grep touch
test-size                                             touch               046c8da3caa3        49 minutes ago      723.5 MB
test-size                                             notouch             099db7e411e9        52 minutes ago      455.9 MB

and further inspect of the test-size:touch image shows:
docker history test-size:touch
IMAGE               CREATED             CREATED BY                                      SIZE                COMMENT
046c8da3caa3        51 minutes ago      /bin/sh -c touch /large-file.txt                267.6 MB
099db7e411e9        54 minutes ago      /bin/sh -c #(nop) ADD file:45d07950299636f279   267.6 MB
d2a0ecffe6fa        4 months ago        /bin/sh -c #(nop) CMD ["/bin/bash"]             0 B
29460ac93442        4 months ago        /bin/sh -c sed -i 's/^#\s*\(deb.*universe\)$/   1.895 kB
b670fb0c7ecd        4 months ago        /bin/sh -c echo '#!/bin/sh' > /usr/sbin/polic   194.5 kB
83e4dde6b9cf        4 months ago        /bin/sh -c #(nop) ADD file:c8f078961a543cdefa   188.1 MB
```

as you can the *touch /large-file.txt* instruction creates a new layer (which is OK) but this one adds up to 267MB (which is exactly the same size of the build context).

Looks quite clear to me that this is the expected behaviour but I just want to understand why the touch layers adds up to such size? Any ideas?

Hi!
Please read this important information about creating issues.
If you are reporting a new issue, make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.
If you suspect your issue is a bug, please edit your issue description to include the BUG REPORT INFORMATION shown below. If you fail to provide this information within 7 days, we cannot debug your issue and will close it. We will, however, reopen it if you later provide the information.
This is an automated, informational response.
Thank you.
For more information about reporting issues, see https://github.com/docker/docker/blob/master/CONTRIBUTING.md#reporting-other-issues

BUG REPORT INFORMATION
Use the commands below to provide key information from your environment:
docker version:
docker info:
uname -a:
Provide additional environment details (AWS, VirtualBox, physical, etc.):
List the steps to reproduce the issue:
1.
2.
3.
Describe the results you received:
Describe the results you expected:
Provide additional info you think is important:
----------END REPORT ---------
#ENEEDMOREINFO

Because it has to copy up all those files to change them on the top layer only.
This is copy-on-write in action.

Oh, yes, of course. That makes sense. Thanks for the clarification.

Looks like this is answered, so I'll close the issue. Please keep in mind that the GitHub issue tracker is not a general support forum, but for tracking bugs and feature requests. The #docker IRC channel, https://forums.docker.com or the Docker-Users mailinglist on Google Groups are better suited for these kind of questions.
However, feel free to continue the discussion after I've closed this! :+1:

Why does chmod cause entire files rather than just inodes to be copied to the top layer?


How to import file as raw string in electron folder ?

I want to import a file as string in electron folder like this:
import initSql from './sql/init.sql?raw';

But I get error: Error: Cannot find module './sql/init.sql?raw'


upgrade link goes to 404 error

Hi! I'm doing smoke tests and while doing "Check that upgrade link goes to upgrade" on the editor it sent me to this 404 page.

I think that the actual problem is that onpremise shouldn’t display any “upgrade” link.

Oh! 😬 If that's the real problem, it does display it, everywhere...


feat: display business metrics as lines in the column chart

To better understand the correlations between cloud costs and business metrics, it is helpful to display these metrics such as usage, the number of monthly active users, etc. on the same chart (ColumnsChartComponent).
We may have a similar implementation as cost clients:

an abstract class MetricProvider that defines the common logic and data format
implementations for different metric providers, such as Datadog, Prometheus, etc.
a new API endpoint for fetching metrics so that frontend can visualize them

An example in the ApexCharts documentation: https://apexcharts.com/react-chart-demos/mixed-charts/multiple-yaxis/

Closed as this is released in https://github.com/electrolux-oss/infrawallet/releases/tag/v0.1.8


Empty structs

Your Question
I'm having an odd issue using GORM with BigQuery. I've pared things down to a very, very simple .Find, and unmarshalling into a struct:
    q.Table("Tags").
        Select("ROW_NUMBER() OVER() id, *").
        Find(&tags)

My Tags struct looks like:
type Tag struct {
    ID int `json:"id" gorm:"column:id"`

    Phase string `json:"phase" gorm:"column:phase"`
}

Logs show it got results from the DB:
[4734.504ms] [rows:10] SELECT ROW_NUMBER() OVER() id, * FROM `Tags` LIMIT 10

And my tags array has 10 entries, but all fields in the structs have zero values. I have no problem using the native BigQuery client, but I need to use GORM on this project since we have some filtering layer for an API built on top of it.
Any idea what's wrong?
The document you expected this should be explained
gorm bigquery driver docs
Expected answer
What I'm doing wrong

Some additional info: if I use .Rows() instead of .Find(), and look at rows.Columns(), it's empty - [].

@stbenjam Is the current library available? Currently, I execute the create statement without any return, not even a log

I second this issue.  I will stay on older versions for now.  I've traced it down to when the go sql module is calling bigQueryRows.Columns() it is returning an empty list.  Looking at the google code, the RowIterator.Schema has a comment saying "The schema of the table. Available after the first call to Next." which is getting used but the Next hasn't been called yet so it's empty.  I believe that previously somehow the query was happening before it gets to this point when it calls Columns.  I may try to debug further if I can find the time.

Hello Again.  I've submitted a pull request here to fix this issue.  Please take a look and let me know if there are any issues:
https://github.com/go-gorm/bigquery/pull/8

Hi, I saw the pull request #8 had been merged for a long time.
Does the PR fix this issue?


Cat sounds

added kitten sound and changed MP3 file names to be easier to find

waiting to merge request then resubmitting


Dialog component

I am using the dialog component inside the shadow-root. For this I use <Dialog.Portal mount={my custom element (shadow-root)}> to open dialog in my custom component. This works well, the dialog opens, but if you click on the contents of the dialog, it closes. This is because event.target is a custom element with shadow root
I would like to somehow control this behavior. for example, write composed: true for a custom event to track which shadow-root element was clicked on

Hi the Dialog.Content component has 3 props that may help you to apply a custom logic related to the "click outside" behavior:

onInteractOutside
onFocusOutside
onPointerDownOutside

Thank you

The event target is always the shadow root so it's hard to implement custom logic other than always calling preventDefault() and handle those events manually.
I think the correct way would be to listen on ref().getRootNode() instead of ownerDocument().


Improve documentation

I think we need to improve the documentation a bit. But I'm not sure how to provide the right amount of information.
So any ideas here are more than welcome. Like, should we add more examples? Should we add an example per assertion to make it more clear? Is the description good enough?

A few ideas off the top of my head:

Clarity around intended use cases (I mistakenly thought this was a library for testing .ts files rather than .d.ts files)
A dedicated section on configuration (I ended up looking through the code to find the possible config); this should ideally include:

The set of all possible configuration options
Short descriptions for each option
The set of possible values (i.e. the type) of each option
For any optional options, the default value (I'm so sad when libraries don't include this!)

Slightly restructure the example/quick start guide to show how things fit into an actual project; e.g. improve clarity on things like:

"Let's assume we wrote an index.d.ts" - okay, where is this file? My project root? A dist folder?
"Add an index.test-d.ts" - okay, where? Same directory as the index.d.ts? In a test directory?

Hope that helps! :slightly_smiling_face:

Hi everyone, I am trying to learn how to use this tool, but to be honest I find the documentation very lacking. I see that Sindre uses this in basically all his projects and it seems great, but really I can't figure out how expectError works, at all. I was about to open an issue but then I saw this one.

Let me begin by quoting readme:

expectError<T>(value)
Check if a value is of the provided type T.

There must be some mistake here in the readme, right? This short explanation didn't help me.

expectError(function)
Check if the function call has argument type errors.

Although this is definitely less cryptic than the explanation for expectError<T>, it must be better worded somehow, or maybe an example should be given.

Long story short, I had to install tsd and play with it manually to begin understanding what is happening. And I still don't. I will be updating here when I make more discoveries.

I will include here a summarized version of my thought process and experimentation process, hoping it will help clarify in which sense I think the docs are lacking.
My setup:

npm init -y && npm i -D tsd

index.d.ts:
declare const concat: {
	(value1: string, value2: string): string;
	(value1: number, value2: number): string;
};

export default concat;

index.test-d.ts:
import {expectType, expectError} from 'tsd';
import concat from '.';

// See my next comments for what I have put here

npx tsd

The following passes:
expectError(concat(5, 's'));
expectError<string>(concat(5, 's'));
expectError<void>(concat(5, 's'));
expectError<number>(concat(5, 's'));
expectError<any>(concat(5, 's'));
expectError<Error>(concat(5, 's'));
expectError<(typeof expectError)[]>(concat(5, 's'));
expectError<unknown>(concat(5, 's'));

However the following fails:
expectError<never>(concat(5, 's'));

So far I have no idea what is this T type doing.

Also, my editor shows a red squiggle below all concat calls, which is OK, and interesting to notice that these errors do not crash tsd. So this means tsd is doing some amazing magic under the hood? Looks like tsd is not just another tool. Maybe it is doing some AST magic?

The following fails with two errors:

expectError<boolean>(someIdentifierNotEvenDeclared);

×  4:0 Expected an error, but found none.
×  4:21	Cannot find name someIdentifierNotEvenDeclared.

:thinking: I have no idea what is happening here. It found an error but didn't.

Oh! The following does not pass:
const res = concat(5, 's');
expectError(res);

×  4:12  No overload matches this call.
×  5:0   Expected an error, but found none.

So it looks like tsd is doing some deep magic with the source code itself. Like parsing the AST and statically analyzing what is literally inside the parenthesis from the expectError call?

Sorry for flooding the thread. Let me know if I should delete the above comments.

Request summary

Somewhere at the beginning of the readme, mention something like:

tsd does not execute your .test-d.ts file(s). It does not even compile your .test-d.ts file(s) like a normal typescript file. What it does is some heavy witchcraft on your .test-d.ts file(s) source code directly, which happens to be written in a typescript-like syntax, and detects specific syntactical constructs such as expectError(foo) and handles them automagically. Since these files have a ts extension, your IDE might even "detect" errors in a file which is in fact, a perfectly valid .test-d.ts file.

Fix the explanation for expectError<T>(value) in readme, if it's not wrong it's very unclear.

Highlight the difference between expectError and expectError<T>

Provide lots of examples for expectError

Adding up to @treybrisbane's https://github.com/SamVerschueren/tsd/issues/55#issuecomment-586498012 with regards to test file placement:
I've just started using tsd. I'm very new to this tool and TS testing in general. Getting this set up for the library I'm trying to augment with TS drove me nuts for a couple of hours!
tsd's documentation expects the .test-d.ts to be at the root folder:
node_modules
index.js
index.d.ts
index.test-d.ts
package.json
tsconfig.json

my-would-be-typed-libary uses a src-like structure, with the conventional typings/types folder I've added to augment the .js files, whose structure I simply derived from the original library to keep things simple to understand:
node_modules
src
  components
    __tests__
      JsTest1.js
      JsTest2.js
  index.js
types
  components
    __tests__
      TsTest1.test-d.ts
      TsTest2.test-d.ts
  index.d.ts
package.json
tsconfig.json

As you can see, I can't just plonk an index.d.ts in the root without reconfiguring the whole OSS library.
Being the novice that I am, I imagined I'd find the clues in the README file. I couldn't find it.
Thankfully, I found myself a reference from @sindresorhus's works. Otherwise, I'd still be stuck. To support my working structure, I must use this setup:
package.json
{
  "name": "my-would-be-typed-libary",
  "types": "types/index.d.ts",
  "tsd": {
    "directory": "types/components/__tests__"
  },
  ...
}

@SamVerschueren If you could please provide answers to my questions here, I will be happy to send a PR clarifying everything. Thank you!

@papb I probably can answer some of your questions. Some things that you've found are bugs, some are intended behavior.
First of all, tsd doesn't execute your code under test, this is not a test runner, it is a tool to allow you to make assertions for your type definitions. The definitions are checked by spinning up the TypeScript compiler, extracting all the errors that the compiler found and reporting them (with some additional magic for the expect... functions. To make it clear: at no time these functions are actually ever executed, they are simply used for the TypeScript compiler to check your types.

The following passes:
expectError(concat(5, 's'));
expectError<string>(concat(5, 's'));
expectError<void>(concat(5, 's'));
expectError<number>(concat(5, 's'));
expectError<any>(concat(5, 's'));
expectError<Error>(concat(5, 's'));
expectError<(typeof expectError)[]>(concat(5, 's'));
expectError<unknown>(concat(5, 's'));

However the following fails:
expectError<never>(concat(5, 's'));

So far I have no idea what is this T type doing.

You have multiple things going on here, you've triggered the bugs fixed in #103 and #104.
expectError is meant to silence type erros in the expression passed to it. The variant of expectError with a type parameter T is meant to assert that we expect a type error when trying compare the types returned from the expression passed to expectError and the type parameter.
The way expectError is currently implemented, it will not differentiate between the kinds of errors that you have in the expression passed to it. In the examples above you have multiple errors in your expression. You pass invalid arguments to concat and compare the return type of concat(5, 's') with the different types passed to expectError<T>. In expectError will assume that if you have any error in your expression then the test will pass.
So it's up to you to make sure that you don't have any other type errors in your expression for expectError than the one that you actually want to test for. For your case, the approriate tests should look like the following (which will work as intended as soon as #104 is merged):
expectError(concat(5, 's')); // passes (after #104)
expectError<string>(concat(5, 5));  // fails, no error, result of `concat` is assignable to `string`
expectError<void>(concat(5, 5)); // passes, result of `concat` is not assignable to `void`
expectError<number>(concat(5, 5)); // passes, result of `concat` is not assignable to `number`
expectError<any>(concat(5, 5)); // fails, everything is assignable to `any`
expectError<Error>(concat(5, 5)); // passes,  result of `concat` is not assignable to `Error`
expectError<typeof expectError[]>(concat(5, 5)); // passes,  result of `concat` is not assignable to `typeof expectError[]`
expectError<unknown>(concat(5, 5)); // fails, everything is assignable to `unknown`
expectError<never>(concat(5, 5)); // passes,  result of `concat` is not assignable to `never`

* The following fails with two errors:

expectError<boolean>(someIdentifierNotEvenDeclared);

×  4:0 Expected an error, but found none.
×  4:21	Cannot find name someIdentifierNotEvenDeclared.

thinking I have no idea what is happening here. It found an error but didn't.
* I decided to try a random syntax error as well:

expectError({{}});

×  4:13  Property assignment expected.
×  4:15  , expected.

Maybe expectError is more like expectErrorExceptSyntaxError?

Yes, exactly, expectError is meant to only catch type errors. Syntax errors are excluded on purpose, why would you want to have syntax errors in your test code? It doesn't really make sense, that's why they are excluded.
We extend expectError with the errors that it has to ignore continuously because the TypeScript compiler has a vast amount of diagnostic messages it produces (see here) and we add the ones that make sense to silence for expectError one by one based on issue reports from users.
Hope this helps and clarifies a few things.

As an aside, you're very welcome to make PRs for documentation improvements.


LICENCE

I would like to open source this when I open source narvie (before eurosys) as this is a submodule I would also need this repository to be open sourced at the same time.
Before open sourcing this repo we need to give it a license. @rjlv2 the vast majority of this code it written by you so it is your call what license we use.

License file has been applied


Is it possible to ingest from a container using Kusto query language?

This guide (https://docs.microsoft.com/en-us/azure/data-explorer/ingest-data-one-click) allows you to interactively import up to 1000 blobs into a Kusto table. Is it possible to do this same thing via scripting or the Kusto query language?
I would like to perform this task on a scheduled basic.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 1fe3f579-2262-46b3-549a-12a01f6efaf6
Version Independent ID: 3580c0ff-81ab-d190-0e41-a5c1f139c8bd
Content: Use one-click ingestion to ingest data into Azure Data Explorer
Content Source: data-explorer/ingest-data-one-click.md
Service: data-explorer
GitHub Login: @orspod
Microsoft Alias: orspodek

@joelverhagen  Thanks for reaching out. We have assigned the issue to the content author to further review the ask and provide an update as appropriate.

Hi @joelverhagen I just had a conversation with internal source and confirmed that your ask can be achieved by LightIngest Utility.
LightIngest is a command-line utility for ad-hoc data ingestion into Azure Data Explorer. The utility can pull source data from a local folder or from an Azure blob storage container.
For more info please refer to this document: https://docs.microsoft.com/azure/data-explorer/lightingest
Hope this helps


CSS improvements for mobile view

Coverage remained the same at 94.533% when pulling 5ebe8ab8451e205c86aaea562341f4d656502d08 on rahul-improve-mobile-docs into 21405182d898ead1a647103cf88b675ffcc33814 on main.

@codyebberson   - removed the unnecessary padding on the left


correctly handle suppressed openers

fixes https://github.com/brave/browser-laptop/issues/460
fixes https://github.com/brave/browser-laptop/issues/469

Thanks for doing this over the weekend. Merging.


feat: add tmpl function required

Resolves #572
Force error test with this values.yaml.gotmpl and without any environment variables CLUSTER_NAME  and DNS_ZONE has been set
# values.yaml.gotmpl
dnsZone: {{ required "Either DNS_ZONE or CLUSTER_NAME required" (coalesce (env "DNS_ZONE") (env "CLUSTER_NAME")) }}

error message will be shown as:

in helmfile.yaml: in .helmfiles[23]: in helmfile.yaml: failed to render values files "values.yaml.gotmpl": failed to render [values.yaml.gotmpl], because of template: stringTemplate:2:12: executing "stringTemplate" at <required "Either DNS_ZONE or CLUSTER_NAME required" (coalesce (env "DNS_ZONE") (env "CLUSTER_NAME"))>: error calling required: Either DNS_ZONE or CLUSTER_NAME required

@mumoshu I'm not sure if #1185 will affect expected behavior or not. Maybe I can cherry-pick your change from #1185 .


Add new log field to output server name sent by client in TLS handshake

[approve ci]

[approve ci]

Looks good to me.  I'd like to get someone outside of Yahoo to take a look too though.

This is not only about this PR, but what do we want to do for QUIC connections?
If this is just for ordinary HTTPS connections (and we'll have another log field for QUIC), I'm fine with this. If not, since this is a new feature, we should have implementation for QUIC connections too or should file an issue as todo.
Also, this is up to RM but we should update Release Note if the change is not going into 9.0.

Hmm I don't see a server name in MockNetVConnection:
https://github.com/apache/trafficserver/blob/c7a4ffafd8eeb0e4b80ed057963722c33029acc8/iocore/net/quic/Mock.h#L214

I don't think supporting QUIC is that easy, and that's a reason I left an option to file it as a todo. But if possible, adding the same function to QUICNetVC wouldn't be a bad idea even if the function was a stub.
Because of the messy inheritance relationship between UnixNetVC and SSLNetVC we couldn't have a parent class for SSLNetVC and QUICNetVC, but we might be able to do something similar to ALPNSupport class.

Does QUIC have a mechanism similar to SNI?  Where one end has multiple public keys, and it decides which one to provide based on an identifier sent from the other end?

Yes, QUIC itself doesn't mention SNI but it's a part of TLS handshake (QUIC uses TLS). We should be able to do the same thing. However, I'm not sure if current our QUIC implementation supports it.

@randall OK fixed.

@maskit Can this be merged as is? Or do we need additional changes for QUIC?

@randall To support this on QUIC connection additional changes will be needed, but we can merge this as is. In that case I want to see an issue for QUIC as a todo (missing feature).

Oh, but be careful with the release note. We should make sure that this can go into 9.0 if we don't have release note change on this PR.

What's the rule of thumb for release notes?  Should all changes that are not purely refactoring correspond to some release note?

What's the rule of thumb for release notes? Should all changes that are not purely refactoring correspond to some release note?

I would not say all changes, but this one should be because it's clearly new feature.
@zwoop What's the plan? We need a guideline somewhere.

Be advised I'll have to ask Vz committers to -1 any 9.x release unless this is in it, as it's important to Vz ops people.

@ywkaras Did you create an issue for QUIC? Or are you working on it?

@maskit  OK https://github.com/apache/trafficserver/issues/6050

@ywkaras
As the code stands with std::string in the HttpSM we are going to have memory leaks.  You should be able to see this with running an ASAN build.
We should move vc information that needs to be around for logging into the session, since it will be around at the time we log.  We should create a struct inside of the Session (say ClientLogInfo or something better) that is used for logging.  This way we only allocate and copy this information 1 time.  The HttpSM should call getters on ClientLogInfo to log this information.

Given this code, that std::string is going to leak memory, presuming it doesn't crash.

Will the session be around at the time of transaction logging? I'd like @shinrich to weigh in on that. If so, then Bryan's right, this should be moved to the client session object. As a temporary expedient this could have a string_view in the HttpSM and using the Arena in HttpTransact to store the data - this avoids malloc almost all the time and doesn't have cleanup issues.

Why would this cause a memory leak?  Do we somehow bypass calling ~HttpSM() ?

@zwoop what is the better way to save a variable-length server name for later logging, than with std::string?

@SolidWallOfCode No the session object is gone by the time the log entry is generated.  You can see preexisting code to save stuff from the session object, for that reason.

Are we needing a little C++ 101 here?  The destructors of data members are implicitly called by the (implicit or explicit) class destructor:  https://godbolt.org/z/wyrNSn .  See lines 9 and 20 of the assembler output.

HttpSM::~HttpSM is never called.
If the session object is gone, then I'd go with using the Arena.

Thanks for catching that @zwoop .

[approve ci]

@ywkaras I would just use a const char* inside of the session and do a strdup

@bryancall The session object is gone when the log entry to generated.  @SolidWallOfCode wanted it in the arena.

@zwoop the std::string is KWF.


[1.18.2] Missing aluminum casts?

Version Info:
-Tinkers Reforged 2.0.8
-Minecraft 1.18.2
-Forge 40.2.1
-Tinkers Construct <IP_ADDRESS>
Hi, just wondering if it's a bug on my end that there are no ways of making aluminum casts for Round Plate, Bow Limb, and Bow Grip? They're listed in JEI (Bow grip isn't even listed), but when clicked, no recipe pops up, and nothing happens when I try with the actual smelter.
As well, I believe the description for Greatsword is broken, and doesn't display in either the tinker's station or the tinkers anvil

that's weird, are you running any other mods?

Yep, I'm using many other mods, but I tried running just tinkers reforged and TiCon, and the issue was still there. I could list all the mods down if you need, but it's a long list.


Diff is mixed up

The Diff page seems to be mixed up. I tried to find any logic behind it and it seems that it compares the newest updated page with the last added page. I have attached the backup archive but the files themselves seem to be correct.
changedetection-backup-1612340948.zip

Thanks for the report! there was a bug in earlier versions, please do these steps..

get the latest version

docker pull dgtlmoon/changedetection.io
docker kill $(docker ps -a|grep changedetection.io|awk '{print $1}')
docker rm $(docker ps -a|grep changedetection.io|awk '{print $1}')
docker run -d --restart always -p "<IP_ADDRESS>:5000:5000" -v datastore-volume:/datastore --name changedetection.io dgtlmoon/changedetection.io```

- then [settings] -> [scrub], it will reset the diff history but not your URL list

please let me know if this solved it for you :)

Looked good at first sight. Then I added two new pages and the diffs from these two got scrambled.
Went ahead and adding an additional page now results in the diff being mixed up with the page added last before.
changedetection-backup-1612436773.zip

Ok, phew, that was a bit of work, turns out I had a object that had a reference of the dictionary for keeping a map of the state rather than the actual data..
anyway, please try once more for me...
docker pull dgtlmoon/changedetection.io
docker kill $(docker ps -a|grep changedetection.io|awk '{print $1}')
docker rm $(docker ps -a|grep changedetection.io|awk '{print $1}')
docker run -d --restart always -p "<IP_ADDRESS>:5000:5000" -v datastore-volume:/datastore --name changedetection.io dgtlmoon/changedetection.io

@Atherel could I close this? :)

Sorry didn't have time to check until now but it looks good so far, thanks a lot!


Add knex dependents to expected failures

DT packages that depend on knex (which ships its own types) have started failing on TS 5.4 due to https://github.com/microsoft/TypeScript/pull/56004.

expectedFailures.txt is read by the package and not via HTTP, so this change will require a changeset (note the failing build).
You should be able to run pnpm changeset and mash enter until you can add a changelog entry.


docs: add missing command and flags to CLI instructions

I recently configured the post-scan-action plugin via CLI and ran into several issues:

Was not able to create an IAM role with the instructed command. A trust policy is required so I've added this to step 4 in CLI - Create an execution role for the Lambda function.
Was not able to subscribe to an SNS topic via CLI. I was able via the AWS Console only. It seems there's an additional command required, and so I've added it under step 3 in CLI - Subscribe the Lambda to the SNS topic

FYI: @trendmicro/cloud-one-file-storage-security

@carpusherw done, thanks.


useFocusReturn

Hi.
I added useFocusReturn utility to have the ability to automatically return focus on the last focused element when the user close the Modal component. Also could be useful for the Drawer component in the future.
It is a hook from Mantine rewritten in a more svelte way.
Also, I added documentation for this utility but have not been able to test it since I couldn't run docs locally on a windows machine. Could you please make sure that I didn't mess up something in the docs =)

Fixed


allow other LSP servers

allow using ra-multiplex with other LSP servers than rust-analyzer. this would require:

[x] a way of telling the ra-multiplex client which LSP server to use
[x] more general workspace/project root searching

for the first we can probably use argv[0] since that one is not useful for anything.
for the second we could continue searching for Cargo.toml files if the requested server is rust-analyzer and maybe for a .git directory otherwise. either way we should handle not finding any workspace root gracefully and fall back to just using the provided cwd. the only downside is the servers might not get shared every time depending on where users' editor gets launched from. we could also add an option to mark the workspace root with a .ra-multiplex-workspace file

i've tried to solve this in commit 202c030, it should be working now but i'm not closing the issue until i can test it more thoroughly. the change has been released as v0.1.7


Replace old JSON ABI format with the new one

Removing everything related to the old JSON ABI format and update all the tests.
Remaining tasks:

[ ] Bump the Rust SDK tests to use the newer version of the SDK that will include support for the new JSON ABI format
[ ] Bump the fuels version in forc new

This PR cannot be merged until we have a new version of fuels that supports the new JSON ABI format.


This socket is closed

Related to #1415.
We've found the following steps:

Peer become unavailable.
Our server was closed by using closeAll method.
Our server socket was closed and it said I was closed, ok.
Server had a not empty list of sockets. These sockets are our incoming sockets. Server destroyed all sockets.
We didn't received any event on any incoming socket, because incomingStream is not created and incoming is not subscribed for any event.
Our pipe was created with dead incoming socket.
We are receiving error on incoming and only than we are destroying incomingStream.

So we need to do:

Subscribe to incoming immediately in order to not loose events.
Create incomingStream only if incoming is not closed.

I've fixed this issue and it breaks bv_tests/testThaliReplicationPeerAction.js test on desktop.


Blend with sokol_sgl

I need to use blending when drawing sprites, but there no sgl_enable_blend function or something similar.
I tried to create a pipeline during setup
sg_desc const d = sg_query_desc();
sg_pipeline_desc desc = {};

desc.depth.pixel_format = d.environment.defaults.depth_format;
desc.colors[0].pixel_format = d.environment.defaults.color_format;
desc.colors[0].blend.enabled = true;
desc.colors[0].blend.src_factor_rgb = SG_BLENDFACTOR_SRC_ALPHA;
desc.colors[0].blend.dst_factor_rgb = SG_BLENDFACTOR_ONE_MINUS_SRC_ALPHA;
desc.colors[0].blend.op_rgb = SG_BLENDOP_ADD;
desc.colors[0].blend.src_factor_alpha = SG_BLENDFACTOR_ONE;
desc.colors[0].blend.dst_factor_alpha = SG_BLENDFACTOR_ONE_MINUS_SRC_ALPHA;
desc.colors[0].blend.op_alpha = SG_BLENDOP_ADD;
desc.color_count = 1;

s_pipeline = sgl_make_pipeline(&desc);

and then use it when starting passes
void rm::renderer::beginPass(RenderTarget const* target) {
    if (target == nullptr) {
        sgl_set_context(SGL_DEFAULT_CONTEXT);
    }
    else {
        auto const t = (SokolRenderTarget const*)target;
        sgl_set_context(t->_context);
    }

    sgl_defaults();
    sgl_load_pipeline(s_pipeline);

    if (target == nullptr) {
        sgl_ortho(0.0f, (float)s_size.width(), (float)s_size.height(), 0.0f, -1.0f, 1.0f);
    }
    else {
        sgl_ortho(0.0f, (float)target->size().width(), (float)target->size().height(), 0.0f, -1.0f, 1.0f);
    }
}

but I got a validation error:
[ERROR] D:\git\RetroplayerWindows\Retroplayer\ThirdParty\sokol\sokol_gfx.h:16783: VALIDATE_APIP_COLOR_FORMAT: sg_apply_pipeline: pipeline color attachment pixel format doesn't match pass color attachment pixel format
[ERROR] D:\git\RetroplayerWindows\Retroplayer\ThirdParty\sokol\sokol_gfx.h:16790: VALIDATE_APIP_DEPTH_FORMAT: sg_apply_pipeline: pipeline depth pixel_format doesn't match pass depth attachment pixel format
[FATAL] D:\git\RetroplayerWindows\Retroplayer\ThirdParty\sokol\sokol_gfx.h:16168: VALIDATION_FAILED: validation layer checks failed

Sorry, I'm at a loss here as to how to enable blending.

The validation layer errors say that the pipeline pixel formats don't match the render pass / sgl-context pixel formats you're using that pipeline to render to:
desc.depth.pixel_format = d.environment.defaults.depth_format;
desc.colors[0].pixel_format = d.environment.defaults.color_format;

E.g. the environment-default values would only work when using that pipeline for rendering into the swapchain framebuffer, not into your offscreen render target.
For rendering into your offscreen render target you'd probably want these value (taken from your example code here when initializing the 'offscreen context'):
desc.depth.pixel_format = SG_PIXELFORMAT_RGBA8;
desc.colors[0].pixel_format = SG_PIXELFORMAT_NONE;
desc.sample_count = 1;

Thanks. I'm now creating two pipelines:
{
    sg_environment_defaults const defaults = sg_query_desc().environment.defaults;
    sg_pipeline_desc desc = {};

    desc.depth.pixel_format = defaults.depth_format;
    desc.colors[0].pixel_format = defaults.color_format;
    desc.colors[0].blend.enabled = true;
    desc.colors[0].blend.src_factor_rgb = SG_BLENDFACTOR_SRC_ALPHA;
    desc.colors[0].blend.dst_factor_rgb = SG_BLENDFACTOR_ONE_MINUS_SRC_ALPHA;
    desc.colors[0].blend.op_rgb = SG_BLENDOP_ADD;
    desc.colors[0].blend.src_factor_alpha = SG_BLENDFACTOR_ONE;
    desc.colors[0].blend.dst_factor_alpha = SG_BLENDFACTOR_ONE_MINUS_SRC_ALPHA;
    desc.colors[0].blend.op_alpha = SG_BLENDOP_ADD;
    desc.color_count = 1;
    desc.sample_count = defaults.sample_count;

    s_defaultPipeline = sgl_make_pipeline(&desc);
}

{
    sg_pipeline_desc desc = {};

    desc.depth.pixel_format = SG_PIXELFORMAT_NONE;
    desc.colors[0].pixel_format = SG_PIXELFORMAT_RGBA8;
    desc.colors[0].blend.enabled = true;
    desc.colors[0].blend.src_factor_rgb = SG_BLENDFACTOR_SRC_ALPHA;
    desc.colors[0].blend.dst_factor_rgb = SG_BLENDFACTOR_ONE_MINUS_SRC_ALPHA;
    desc.colors[0].blend.op_rgb = SG_BLENDOP_ADD;
    desc.colors[0].blend.src_factor_alpha = SG_BLENDFACTOR_ONE;
    desc.colors[0].blend.dst_factor_alpha = SG_BLENDFACTOR_ONE_MINUS_SRC_ALPHA;
    desc.colors[0].blend.op_alpha = SG_BLENDOP_ADD;
    desc.color_count = 1;
    desc.sample_count = 1;

    s_rtPipeline = sgl_make_pipeline(&desc);
}

I'm using the appropriate one when I start a pass:
void rm::renderer::beginPass(RenderTarget const* target) {
    if (target == nullptr) {
        sgl_set_context(SGL_DEFAULT_CONTEXT);
        sgl_defaults();
        sgl_load_pipeline(s_defaultPipeline);
        sgl_ortho(0.0f, (float)s_size.width(), (float)s_size.height(), 0.0f, -1.0f, 1.0f);
    }
    else {
        auto const t = (SokolRenderTarget const*)target;
        sgl_set_context(t->_context);
        sgl_defaults();
        sgl_load_pipeline(s_rtPipeline);
        sgl_ortho(0.0f, (float)target->size().width(), (float)target->size().height(), 0.0f, -1.0f, 1.0f);
    }
}

But I'm still getting the same error:
[ERROR] D:\git\RetroplayerWindows\Retroplayer\ThirdParty\sokol\sokol_gfx.h:16783: VALIDATE_APIP_COLOR_FORMAT: sg_apply_pipeline: pipeline color attachment pixel format doesn't match pass color attachment pixel format
[ERROR] D:\git\RetroplayerWindows\Retroplayer\ThirdParty\sokol\sokol_gfx.h:16790: VALIDATE_APIP_DEPTH_FORMAT: sg_apply_pipeline: pipeline depth pixel_format doesn't match pass depth attachment pixel format
[FATAL] D:\git\RetroplayerWindows\Retroplayer\ThirdParty\sokol\sokol_gfx.h:16168: VALIDATION_FAILED: validation layer checks failed

I appreciate your patience, I can translate VU1 machine code to C that uses SIMD, but I struggle with graphics programming.

Hmm... how does you actual drawing code look like (e.g. where you call sgl_draw() inside a sokol-gfx sg_begin/end_pass)?
...just to make sure that there's no mixup between sokol-gfx render passes and sokol-gl contexts.

Being pass and end pass are like this:
void rm::renderer::beginPass(RenderTarget const* target) {
    if (target == nullptr) {
        sgl_set_context(SGL_DEFAULT_CONTEXT);
        sgl_defaults();
        sgl_load_pipeline(s_defaultPipeline);
        sgl_ortho(0.0f, (float)s_size.width(), (float)s_size.height(), 0.0f, -1.0f, 1.0f);
    }
    else {
        auto const t = (SokolRenderTarget const*)target;
        sgl_set_context(t->_context);
        sgl_defaults();
        sgl_load_pipeline(s_rtPipeline);
        sgl_ortho(0.0f, (float)target->size().width(), (float)target->size().height(), 0.0f, -1.0f, 1.0f);
    }
}

void rm::renderer::endPass(RenderTarget const* target) {
    sg_pass pass = {};
    pass.action.colors[0].load_action = SG_LOADACTION_CLEAR;
    pass.action.colors[0].clear_value = { 0.0f, 0.0f, 0.0f, 1.0f };

    if (target == nullptr) {
        pass.swapchain = sglue_swapchain();

        sg_begin_pass(&pass);
        sgl_context_draw(SGL_DEFAULT_CONTEXT);
        sg_end_pass();
    }
    else {
        auto const t = (SokolRenderTarget const*)target;
        pass.attachments = t->_attachments;

        sg_begin_pass(&pass);
        sgl_context_draw(t->_context);
        sg_end_pass();
    }
}

This is how I setup everything:
void rm::renderer::init() {
    RM_INFO("Initializing renderer");

    {
        sg_desc desc = {};

        desc.environment = sglue_environment();
        desc.logger.func = logger;

        sg_setup(&desc);

        if (!sg_isvalid()) {
            RM_FATAL("Failed to setup Sokol GFX");
            return;
        }
    }

    {
        sgl_desc_t desc = {};
        desc.logger.func = logger;
        sgl_setup(&desc);
    }

    {
        sg_environment_defaults const defaults = sg_query_desc().environment.defaults;
        sg_pipeline_desc desc = {};

        desc.depth.pixel_format = defaults.depth_format;
        desc.colors[0].pixel_format = defaults.color_format;
        desc.colors[0].blend.enabled = true;
        desc.colors[0].blend.src_factor_rgb = SG_BLENDFACTOR_SRC_ALPHA;
        desc.colors[0].blend.dst_factor_rgb = SG_BLENDFACTOR_ONE_MINUS_SRC_ALPHA;
        desc.colors[0].blend.op_rgb = SG_BLENDOP_ADD;
        desc.colors[0].blend.src_factor_alpha = SG_BLENDFACTOR_ONE;
        desc.colors[0].blend.dst_factor_alpha = SG_BLENDFACTOR_ONE_MINUS_SRC_ALPHA;
        desc.colors[0].blend.op_alpha = SG_BLENDOP_ADD;
        desc.color_count = 1;
        desc.sample_count = defaults.sample_count;

        s_defaultPipeline = sgl_make_pipeline(&desc);
    }

    {
        sg_pipeline_desc desc = {};

        desc.depth.pixel_format = SG_PIXELFORMAT_NONE;
        desc.colors[0].pixel_format = SG_PIXELFORMAT_RGBA8;
        desc.colors[0].blend.enabled = true;
        desc.colors[0].blend.src_factor_rgb = SG_BLENDFACTOR_SRC_ALPHA;
        desc.colors[0].blend.dst_factor_rgb = SG_BLENDFACTOR_ONE_MINUS_SRC_ALPHA;
        desc.colors[0].blend.op_rgb = SG_BLENDOP_ADD;
        desc.colors[0].blend.src_factor_alpha = SG_BLENDFACTOR_ONE;
        desc.colors[0].blend.dst_factor_alpha = SG_BLENDFACTOR_ONE_MINUS_SRC_ALPHA;
        desc.colors[0].blend.op_alpha = SG_BLENDOP_ADD;
        desc.color_count = 1;
        desc.sample_count = 1;

        s_rtPipeline = sgl_make_pipeline(&desc);
    }

    {
        sg_sampler_desc desc = {};

        desc.min_filter = desc.mag_filter = SG_FILTER_NEAREST;
        desc.wrap_u = desc.wrap_v = SG_WRAP_CLAMP_TO_EDGE;
        s_samplerNearest = sg_make_sampler(&desc);

        if (sg_query_sampler_state(s_samplerNearest) != SG_RESOURCESTATE_VALID) {
            RM_FATAL("Failed to create the nearest sampler");
        }
    }

    {
        sg_sampler_desc desc = {};

        desc.min_filter = desc.mag_filter = SG_FILTER_LINEAR;
        desc.wrap_u = desc.wrap_v = SG_WRAP_CLAMP_TO_EDGE;
        s_samplerLinear = sg_make_sampler(&desc);

        if (sg_query_sampler_state(s_samplerLinear) != SG_RESOURCESTATE_VALID) {
            RM_FATAL("Failed to create the linear sampler");
        }
    }
}

This is the code to begin and end passes:
void rm::renderer::beginPass(RenderTarget const* target) {
    if (target == nullptr) {
        sgl_set_context(SGL_DEFAULT_CONTEXT);
        sgl_defaults();
        sgl_load_pipeline(s_defaultPipeline);
        sgl_ortho(0.0f, (float)s_size.width(), (float)s_size.height(), 0.0f, -1.0f, 1.0f);
    }
    else {
        auto const t = (SokolRenderTarget const*)target;
        sgl_set_context(t->_context);
        sgl_defaults();
        sgl_load_pipeline(s_rtPipeline);
        sgl_ortho(0.0f, (float)target->size().width(), (float)target->size().height(), 0.0f, -1.0f, 1.0f);
    }
}

void rm::renderer::endPass(RenderTarget const* target) {
    sg_pass pass = {};
    pass.action.colors[0].load_action = SG_LOADACTION_CLEAR;
    pass.action.colors[0].clear_value = { 0.0f, 0.0f, 0.0f, 1.0f };

    if (target == nullptr) {
        pass.swapchain = sglue_swapchain();

        sg_begin_pass(&pass);
        sgl_context_draw(SGL_DEFAULT_CONTEXT);
        sg_end_pass();
    }
    else {
        auto const t = (SokolRenderTarget const*)target;
        pass.attachments = t->_attachments;

        sg_begin_pass(&pass);
        sgl_context_draw(t->_context);
        sg_end_pass();
    }
}

This is how I draw solid quads, textured quads, and quads textured with render targets:
void rm::renderer::draw(rm::Quad const& quad, Post post) {
    sg_image image = { SG_INVALID_ID };
    draw(quad, image, rm::renderer::Filter::Nearest, post, false);
}

void rm::renderer::draw(rm::Quad const& quad, rm::renderer::Texture const* const texture, Filter const filter, Post const post) {
    auto t = (SokolTexture const* const)texture;
    draw(quad, t->_texture, filter, post, false);
}

void rm::renderer::draw(rm::Quad const& quad, rm::renderer::RenderTarget const* const target, Filter const filter, Post const post) {
    auto t = (SokolRenderTarget const* const)target;
    sg_features const features = sg_query_features();
    bool const flip_y = !features.origin_top_left;
    draw(quad, t->_target, filter, post, flip_y);
}

And this is the actual draw code:
static void draw(rm::Quad const& quad, sg_image image, rm::renderer::Filter filter, rm::renderer::Post post, bool flip_y) {
    sg_sampler sampler = (filter == rm::renderer::Filter::Linear) ? s_samplerLinear : s_samplerNearest;
    sgl_enable_texture();
    sgl_texture(image, sampler);

    sgl_begin_quads();

    {
        rm::Point       const& position = quad.position();
        rm::Point       const& center   = quad.center();
        rm::Vec2        const& scale    = quad.scale();
        float           const  angle    = -quad.angle();
        rm::Color       const& color    = quad.color();
        rm::Size<float> const& size     = quad.size();

        rm::Point const screencenter(position.x() + center.x(), position.y() + center.y());

        rm::renderer::resetTransforms();
        rm::renderer::scaleAt(scale.x(), scale.y(), center.x(), center.y());
        rm::renderer::rotateAt(angle, center.x(), center.y());

        rm::Point tl = quad.position();
        rm::Point tr(tl.x() + size.width(), tl.y());
        rm::Point bl(tl.x(), tl.y() + size.height());
        rm::Point br(tl.x() + size.width(), tl.y() + size.height());

        tl = rm::renderer::transform(tl);
        tr = rm::renderer::transform(tr);
        bl = rm::renderer::transform(bl);
        br = rm::renderer::transform(br);

        float const r = color.r();
        float const g = color.g();
        float const b = color.b();
        float const a = color.a();

        if (flip_y) {
            sgl_v2f_t2f_c4f(tl.x(), tl.y(), 0.0f, 1.0f, r, g, b, a);
            sgl_v2f_t2f_c4f(tr.x(), tr.y(), 1.0f, 1.0f, r, g, b, a);
            sgl_v2f_t2f_c4f(br.x(), br.y(), 1.0f, 0.0f, r, g, b, a);
            sgl_v2f_t2f_c4f(bl.x(), bl.y(), 0.0f, 0.0f, r, g, b, a);
        }
        else {
            sgl_v2f_t2f_c4f(tl.x(), tl.y(), 0.0f, 0.0f, r, g, b, a);
            sgl_v2f_t2f_c4f(tr.x(), tr.y(), 1.0f, 0.0f, r, g, b, a);
            sgl_v2f_t2f_c4f(br.x(), br.y(), 1.0f, 1.0f, r, g, b, a);
            sgl_v2f_t2f_c4f(bl.x(), bl.y(), 0.0f, 1.0f, r, g, b, a);
        }
    }

    sgl_end();
}

Sorry I'm quite distracted with other things ATM. From staring at the code I'm not seeing anything obviously wrong, but this sort of visual remote debugging is also quite hard :)
It might help to set a breakpoint at the sokol_gfx.h validation code line that's printed in the validation errors and then check in the debugger call stack where exactly that error is happening in your code, maybe that pinpoints the problem.

Sure, I appreciate you're doing this during your free time.
I'm not getting any validation errors or any other messages from Sokol, everything just works except there's no alpha blending, my sprites have a black background.
I'll try to write a minimum program that uses sokol_gl this weekend and that reproduces the issue. If it works, I'll probably get enough insight to fix the issue myself, otherwise you'll have a program that you can build and try yourself, time permitting of course.
Thanks for all the help so far!

Oh well, my minimum test program works. I'll add a render target to it and see if it still works.

When I try to render the above images to a render target, I get these errors:
[error] ./sokol_gfx.h:16783: VALIDATE_APIP_COLOR_FORMAT: sg_apply_pipeline: pipeline color attachment pixel format doesn't match pass color attachment pixel format
[error] ./sokol_gfx.h:16790: VALIDATE_APIP_DEPTH_FORMAT: sg_apply_pipeline: pipeline depth pixel_format doesn't match pass depth attachment pixel format
[fatal] ./sokol_gfx.h:16168: VALIDATION_FAILED: validation layer checks failed
[error] ./sokol_gfx.h:16814: VALIDATE_ABND_PIPELINE: sg_apply_bindings: must be called after sg_apply_pipeline
[error] ./sokol_gfx.h:16816: VALIDATE_ABND_PIPELINE_EXISTS: sg_apply_bindings: currently applied pipeline object no longer alive
[fatal] ./sokol_gfx.h:16168: VALIDATION_FAILED: validation layer checks failed
[error] ./sokol_gfx.h:17021: VALIDATE_AUB_NO_PIPELINE: sg_apply_uniforms: must be called after sg_apply_pipeline()
Assertion failed: pip && (pip->slot.id == _sg.cur_pipeline.id), file ./sokol_gfx.h, line 17023

If I comment out the code to render to the render target, but render the render target to the display, it works (but I get a black screen ofc). If I render the images directly to the display, it works.
I'm not sure what isn't matching that is causing the error messages... The program is here, in case you have some time to give it a try.
sprite.zip
I'm building it in a Clang MSYS2 prompt with clang -O3 -std=c11 -o test main.c -lgdi32 -lkernel32 -luser32 -ldxgi -ld3d11 -ldinput8 -ldxguid.
I'll continue trying random stuff on my end and see if I can make it work.

The validation errors about sg_apply_bindings and sg_apply_uniforms not being called at the right time might be the actual source of a lot of followup problems.
Is this still purely sokol_gl.h code? Because this type of errors shouldn't happen inside sokol_gl.h, hmm...
I'm currently still a bit overloaded with other stuff, just keep pining this thread from time to time, and I'll find some time to check your example ;)

Ok, on macOS I can build with clang -std=c11 -ObjC -o test main.c -framework Cocoa -framework Metal -framework MetalKit -framework Quartz (after changing SOKOL_D3D11 to SOKOL_METAL) and get the same validation errors.
I'll try to have a quick look in the debugger...

Aaah, ok, you stumbled over a little detail which I also forgot about...
I found two issues:
The validation errors are because of an admittedly very obscure behavior of sgl_make_pipeline().
Long story short, the validation errors can be fixed like this:

first move the block which creates the sokol-gl context up before the pipeline creation (because you'll need to returned sgl_context handle...
than change the call to sgl_make_pipeline() for the render target pipeline to use sgl_context_make_pipeline() instead (and to avoid confusion, it's best to remove all the pixel formats and sample counts from the sgl pipeline creation calls (those will be overwritten inside the pipeline creation call anyway):

        sg_pipeline_desc desc = {0};

        desc.colors[0].blend.enabled = true;
        desc.colors[0].blend.src_factor_rgb = SG_BLENDFACTOR_SRC_ALPHA;
        desc.colors[0].blend.dst_factor_rgb = SG_BLENDFACTOR_ONE_MINUS_SRC_ALPHA;
        desc.colors[0].blend.src_factor_alpha = SG_BLENDFACTOR_ONE;
        desc.colors[0].blend.dst_factor_alpha = SG_BLENDFACTOR_ONE_MINUS_SRC_ALPHA;
        desc.color_count = 1;
        s_rtPipeline = sgl_context_make_pipeline(s_context, &desc)

...I also removed some other items which are default-initialized to the same value anyway.
...this fixes all validation errors, but still doesn't render anything. But this is simply because you forgot to call endDefaultPass() before sg_commit() (this should probably also be a validation error... or at least an assert...).
With those two fixes I get the following output on Metal (don't know yet why the output is only in the top-right corner, the sgl_ortho() calls look right to me):

This is the main.c file with my fixes:
main.c.zip

PS: you'll need to change the SOKOL_METAL define at the top back to SOKOL_D3D11 (I forgot that).

Woot it works!
Thanks so much, I've made the changes directly in my engine instead of the sample program I wrote and the alpha blending is working just fine. Thanks!
Just one question before closing this issue: is it ok to create one render target context to use with all render targets? Does it create any issue with the rendering order?
Thanks again!

Clarification: I was creating one sgl context per render target, but since it must be created before the pipeline, I'm creating only one and using it for all render targets.
My application only has one render target for now, but could have more, hence the question.

You should create a separate sgl context for each render target, and only do a single sgl_draw() per context and frame (this is because sgl_draw() will render everything that has been recorded in a specific context in one frame, so doing this multiple times you will end up with rendering the same things multiple times).
The recorded rendering commands are reset in the sg_commit() sokol-gfx call.

Ok, I'll have to re-design this part a bit as it's possible to create render targets at will right now. Maybe I'll create a bunch of context at startup and limit the number of simultaneous render targets in use.
Nice, thanks again for all the help!


Add common error with ledger nano wallets & deposits for new validator

One of the top questions of the week, it seems.

Thanks!


⚠ ClamAV has degraded performance

In 2488316, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 68 ms

Resolved: ClamAV performance has improved in a787c43.


The image keeps on moving with respect to the changing text

@Suchitra-Sahoo  hello ,
as we can see on the deployed version that the image on the right side keeps on moving along with the text length on the home page , it needs to be aligned properly to give a better UI look .
I would like to work on this issue and request you to assign it to me.

@kairveeehh you are assigned. You may start working on the issue.

Assign this issue to me
As a full stack Developer i can write optimized code and responsive and i can integrate with backend also.


Wrong instructions for running test suite

I tried to run the XSpec test suite. First I installed XSpec and its dependencies (I'm running Ubuntu Linux 16.04). Then I ran the command that was specified in the top level README:

Once you have XSpec installed, you can run the entire test suite with the command (for Mac OS or >Linux):
xspec.sh test/marc2bibframe.xspec

But this fails because there is no file called test/marc2bibframe.xspec. There are 17 individual xspec files but no master file that would run all tests.
Looking at .travis.yml it runs each test file individually.
I think there should be a single command that runs the full test suite, as hinted in the README. I can do it with a for loop, but that's hardly optimal: for i in test/*.xspec; do xspec.sh $i; done

We'll update the documentation with working instructions.

There were 2 issues:

We accidentally deleted the marc2bibframe2.xspec file from the test directory (now restored)
The README incorrectly referred to the file as marc2bibframe.xspec
Thanks for bringing this to our attention!


module.json won't load files anymore

Versions:

laravel-modules Version: 11.1.0
Laravel Version: 11.23.5
PHP Version: 8.3

Description:
In my modules I used to load the helpers using the files array inside the module.json.
With the update to 11.1.0, that broke and it does not load my helpers.php and I had to move them into the module's composer.json or go back to 11.0.11.
{
    "name": "Core",
    "alias": "core",
    "description": "",
    "keywords": [],
    "active": 1,
    "priority": 0,
    "providers": [
        "Modules\\Core\\Providers\\CoreServiceProvider",
        "Modules\\Core\\Providers\\AjaxRoutesServiceProvider",
        "Modules\\Core\\Providers\\MacroServiceProvider"
    ],
    "aliases": {},
    "files": [
        "Helpers/helpers.php"
    ],
    "requires": []
}

After further investigation...
On the latest release $this->app->register(\Nwidart\Modules\Providers\BootstrapServiceProvider::class); is commented out and will not register the files.
/**
     * Register all modules.
     */
    protected function registerModules()
    {
        // $this->app->register(\Nwidart\Modules\Providers\BootstrapServiceProvider::class);

        $providers = app()->make(ModuleManifest::class)->providersArray();

        (new ProviderRepository($this->app, new Filesystem(), $this->getCachedModulePath()))
            ->load($providers);

    }

I just found the new one "ModuleManifest", which still read from the module.json, but only the priority and providers are taken into account, so the files aren't loaded. Probably need the implementation for that.
And this causes the BootstrapServiceProvider is redundant.

thanks, yes looks like you're right. I'll look at getting files supported.


Implement chcp_beforeAssetsInstalledOnExternalStorage event

Hi there,
The process of copying the www folder over external storage can take a while on old Android devices. Just wonder if we could have a chcp_beforeAssetsInstalledOnExternalStorage event implemented just so allowing the app to display some sort of message saying "please patient..." while it's happening?

This is what I implemented as a PR for issue #100. I think it was merged for next release.

ah awesome! so it does include the scenario when the plugin is copying assets to external storage as well?

I'm not completely sure about the different stages of updating, but I use the event to show the splash screen while the plugin copies the files and restarts the webview, and for that it works well. Since I only update the js on resume/launch, it just appears to the user as if the launch takes a little longer than normal.
Note that in order to avoid the flickering as the webview reloads your js/html, you need some kind of cordova plugin to show above the webview, like the corodova-plugin-splashscreen does.

No, @toostn  PR doesn't cover assets installation scenario. It's a different event. But yes, chcp_beforeAssetsInstalledOnExternalStorage can be added.

:+1: legend!

Released in v1.3.0.


Prepare for stable release

Let's tag a stable release of the tag interop
Pool: https://github.com/php-cache/tag-interop/blob/master/TaggableCacheItemPoolInterface.php
Item: https://github.com/php-cache/tag-interop/blob/master/TaggableCacheItemInterface.php
FYI: @nicolas-grekas

Codecov Report

Merging #142 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #142   +/-   ##
=========================================
  Coverage     76.06%   76.06%
  Complexity        1        1
=========================================
  Files            26       26
  Lines          1458     1458
=========================================
  Hits           1109     1109
  Misses          349      349

Continue to review full report at Codecov.

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

Let's go :)

Thank you for the review


return hasher when value is null

this allows us to use the other methods on the Hasher (check, needsRehash).
similar to many of the other helper function that simply return the object if no value is passed.

Isn't this a breaking change?


jQuery: Explore replacing effects with CSS transitions

Note: This is an experimental PR, not meant for inclusion or merging. Also it's barely a draft; the code is here so far to share and discuss.

Status
It's plausible that we could use the existing framework and reinterpret #jquery_effect. The stateless CSS transitions are relatively straightforward (fade/appear), while the stateful ones require more thought (toggle).
Benefits

the CSS transitions are smooth and power-efficient, and interuptable
no jQuery required
does not pollute style attribute from jQuery's timer-based callbacks
no if_visible() checks necessary, when looking at CSS vs. JS for effects

Drawbacks

pollutes element class namespace with Nitrogen class names, may not be a problem, especially if we generate these classnames with a configurable prefix

I like where you're going with this!
I agree that the drawbacks are hardly drawbacks.
One thing that I'm not opposed to is integrating with some lighter-weight jquery-like libraries that abstract some of the manual work away.
Like https://github.com/fabiospampinato/cash or https://github.com/kylebarrow/chibi for example.
Maybe it's just my jquery-reliant-old-man-mind-who-doesn't-like-change, but the idea of having to foreach over each item to do the same thing irks me.
Then again, maybe I should just get over it.  Do you have an opinions on this?  I've never used modern frontend frameworks like angular and react so I don't know how the kids do things these days with JS, so I'm open to ideas.

the idea of having to foreach over each item to do the same thing irks me.

well this is literally changing this.each to this.forEach so I don't see it as a big change.

Do you have an opinions on this…modern frontend frameworks like angular and react…kids do things these days?

in short there's a tendency to move things out of heavy frameworks like jQuery. jQuery will always hold a special place in web dev because it covered all sorts of browser inconsistencies and deficiencies in the JavaScript standard library.
for the most part, all of that has been resolved, whereas browsers provide a fairly universal interface for operating on Nodes (which $() mainly handles) and the standard library now does most of what we needed with jQuery's helper functions.
for things like animations and effects jQuery is again just a really heavy framework that didn't keep up with needs, especially for mobile devices where power efficiency is more important. the move to CSS can offload most of the visual effects onto a GPU and can be significantly easier on a battery, even to the point where similar pages with jQuery might warm up a phone.
so overall the move is towards efficiency and and embracing the platform, which has improved greatly since jQuery became dominant. the use of Angular and React are addressing a much different part of the process, which is more like what nitrogen is doing -> they lower the development overhead of building highly interactive pages. in fact, when it comes to effects, animations, and visuals, some of the same questions arise in Angular/React apps as we are discussing here.


Follow Json Schema References & Jumping Back and Forth

It would be cool to follow local references in Json Schema files easily.
For example:
{
  "$ref": "#/definitions/3/cmd"
}

#/definitions/3/cmd is defined in the same document. Jumping to that path with keyboard shortcut gd (for goto definition) would be awesome.
Maybe jumping back and forth with Ctrl-O and Ctrl-I would be perfect.

@mkohlhaas why did you close it? I think it's a nice idea


layer support

on the low level multiple layout instances and on a higher level just have "portals" between them. That would make it possible to introduce "portals" that don't necessarily correspond to the same coordinates.
or on a low level just have different layers assigned to each track and make it possible to filter the view. This would make it easy to have bridges on the same view. This would be harder to implement and might not be as flexible. This could be implemented on top of the previous paradigm as well.

now that directed track connections are refactored we can treat portals just as connections between directed tracks and assume they are portals if they are not physically next to each other


helm: add named template that creates the specification for a cronjob

closes https://github.com/reanahub/reana/issues/695
To test:

set the cronjob schedules to run every minute "* * * * *"
compare the spec (kuebctl describe <cronjob_pod_name> or k get pod <cronjob_pod_name> -o yaml) with the one which was not using the cronjob_spec named template

Note: I found out that resource-quota-update and retention-rules-apply cronjobs were not using reana infrastructure service account and introduced this change

Codecov Report

Merging #701 (7c454a3) into master (35f42c5) will not change coverage.
The diff coverage is n/a.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files

@@           Coverage Diff           @@
##           master     #701   +/-   ##
=======================================
  Coverage   18.84%   18.84%
=======================================
  Files          26       26
  Lines        2144     2144
=======================================
  Hits          404      404
  Misses       1740     1740


Add external load balancer template

URL map reviewed.
Continuing with other sections.

The target_proxy integration test is missing a TCP proxy test.

The external_load_balancer integration test is missing a TCP load balancer test.

The integration tests contain hardcoded keys and certificates, but at least the certificate should be generated dynamically to avoid certificate expiration issues.

Review concluded for this PR. I had a discussion with Adam about some of the items and concluded that the missing tests and dynamic certificates won't need to be fixed to accept the PR. Instead, we'll file issues and fix these separately.


Add --no-cache-dir option to pip install in Dockerfile

This commit adds the --no-cache-dir option to the pip install command in the Dockerfile.  By including this option, the cache during Python package installation is disabled, resulting in a significant reduction (approximately 3.2GB) in disk usage during docker build.
Without this option, the Docker image would contain the following cache, which is unnecessary:
du -sh /home/user/.cache/pip
# 3.2G    /home/user/.cache/pip

Could you rebase the change and fix the indent? I think this change is helpful.

Thank you @jb-ye  for your advice. I have rebased my changes on top of the latest commit and fixed the indent issues.

LGTM

thanks @bro-sin @jb-ye!


Check for new installations before loading credentials from keychain

Is your feature request related to a problem? Please describe.
As described in https://github.com/aws-amplify/amplify-ios/issues/1016 and https://github.com/aws-amplify/amplify-ios/issues/1185, if an end user signs in, uninstalls the app, then reinstalls the app, Amplify will read persisted credential data from the keychain.
This is current behavior, and working as designed, as described in our docs: https://docs.amplify.aws/lib/info/app-uninstall/q/platform/ios
However, it is not really expected that credentials should persist that way.
Describe the solution you'd like
Amplify should adopt a strategy like the one we describe in those docs: store a "previously launched" flag in something like UserDefaults, that gets removed when an app is uninstalled. If the "previously launched" flag is not present at launch:

Add the flag
Clear credential data from the keychain

before proceeding with Auth configuration.
Describe alternatives you've considered
N/A
Additional context
N/A

@palpatim ,
As described here, privateSession is not working when we do Auth.signout for socialLogin after uninstalling and installing the app again. As described here we are checking firstLaunch from userDefaults It shows the sign alert. But it should not display any alert if we enable privateSession right? Can you please help to give some inputs on this

You can only specify privateSession during sign in, and that value is persisted in storage that gets removed on app uninstall. If you do a signOut in a context where Amplify Auth cannot determine whether signIn was invoked with a private session, then it defaults to assuming that privateSession was NOT set, and would invoke the ASAuthenticationWebSession without setting the prefersEphemeralWebBrowserSession flag.
I can't think of a good workaround for this with the Amplify API, short of using an escape hatch to clear the keychain rather than invoking signout:
func clearKeychain() throws {
    let plugin = try Amplify.Auth.getPlugin(for: "awsCognitoAuthPlugin") as? AWSCognitoAuthPlugin
    guard case .awsMobileClient(let awsMobileClient) = plugin?.getEscapeHatch() else {
        print("Failed to fetch escape hatch")
        return
    }
    awsMobileClient.clearKeychain()
}

@royjit can you think of any other workaround?

yes, I think that is the best option I can think of now.
For future reference - https://developer.apple.com/forums/thread/36442?answerId=281900022#281900022

Hey is there any progress on this? We're having the same issue in our app after logging in using the preferPrivateSession option with the web UI and then doing fresh install of the app while the user was still logged in.

The team is actively working on 2.0.0 milestone which be released soon. We will post an update on the ticket after an update has been released.

Amplify 2.0 has been released that includes the feature of removing credentials from Keychain if the library detects it was a new installation.


Gather all information about disaster recovery in an Emergency Plan

Old document from AEM:
https://statoilsrm.sharepoint.com/:w:/s/Statoil.comdevelopment/Ee8Ht9GFoJlKhy2ddRA1SsMBb4elgXvXbc77xiCpN0RtOA?e=8ub4YL&wdOrigin=TEAMS-ELECTRON.p2p.mw&wdExp=TEAMS-CONTROL&wdhostclicktime=1672739758812&web=1

Hey team! Please add your planning poker estimate with Zenhub @padms @millianapia


Different endpoint for followers

hi, would be cool if you could add the endpoint of gql in chunk, to me i get more followers this way than with v1. and something like getting the end cursor and continue with a different account. sorry if its hard to understand. english is not my native.

i understand you would like to get followers in a specific chunk length & be able to fetch the list again with specified index.
i've added it to my todo list and you'll soon be able to do so with ensta.
thank you for the suggestion!


power_domain: gpio: respect timing parameters

Update the GPIO power domain to respect the on-off and startup times specified in devicetree.

suspend/resume devices can be triggered from the idle thread when the device is not using device runtime power management. In this context, we can't sleep.

This applies to external devices as well? If so this is going to be frankly unacceptable, it is impossible to write power transitions for most external drivers without blocking calls of some kind, whether that is k_sleep, spi_transceive, etc. cc @gmarull

suspend/resume devices can be triggered from the idle thread when the device is not using device runtime power management. In this context, we can't sleep.

This applies to external devices as well? If so this is going to be frankly unacceptable, it is impossible to write power transitions for most external drivers without blocking calls of some kind, whether that is k_sleep, spi_transceive, etc. cc @gmarull

If that is called from the idle thread yes ... you can't sleep there or block. This operation is if called through device runtime though. We need to figure it out indeed.

If that is called from the idle thread yes ... you can't sleep there or block. This operation is ok if called through device runtime though. We need to figure it out indeed but that is not a trivial problem to be fair.

Why is the idle thread trying to run transitions on external devices though?

If that is called from the idle thread yes ... you can't sleep there or block. This operation is ok if called through device runtime though. We need to figure it out indeed but that is not a trivial problem to be fair.

Why is the idle thread trying to run transitions on external devices though?

Can you be more specific about "external devices" ? From the kernel perspective what is the difference from these "external" drivers ? The PM subsytem will suspend / resume all devices that are not enabled for device runtime power management, not busy, not being used as wake up source and not have their state locked, depending on the power state.

suspend/resume devices can be triggered from the idle thread when the device is not using device runtime power management. In this context, we can't sleep.

This applies to external devices as well? If so this is going to be frankly unacceptable, it is impossible to write power transitions for most external drivers without blocking calls of some kind, whether that is k_sleep, spi_transceive, etc. cc @gmarull

If that is called from the idle thread yes ... you can't sleep there or block. This operation is ok if called through device runtime though. We need to figure it out indeed but that is not a trivial problem to be fair.

One possibility is to iterate over the devices N times while there are devices busy and in each iteration re-check which action to take based on the remaining time, need to think a little bit more about it though.

Can you be more specific about "external devices" ? From the kernel perspective what is the difference for these "external" devices ? The PM subsytem will suspend / resume all devices that are not enabled for device runtime power management, not busy, not being used as wake up source and not have their state locked, depending on the power state.

I hadn't kept up to date with the changes to system PM, and I exclusively use runtime PM and PM_STATE_RUNTIME_IDLE, so I had an incorrect assumption that system PM was only managing drivers "inside" the SoC.

The PR has been updated with a helper to determine if PM actions are allowed to block.
This gives actions an easy way to determine whether they can run the functions they need to for correct operation.
This pattern makes it explicit that system PM automatic transitions aren't supported on these types of devices.

That is not correct, pm_runtime can be used in PRE_KERNEL, which means that kernel services are not available yet, we can't simply check if it's called from idle thread.

Also, this is a workaround for a bigger problem, is it addressing a real problem now ? We can have such thing if the problem is happening now and we have a use case, otherwise I don't thing we should rush a new API that is a workaround.

Also, this is a workaround for a bigger problem, is it addressing a real problem now ?

Yes, the problem in this PR. The power domain driver is not respecting timing parameters. This is required as many devices need to be totally depowered for a certain time before they will reset correctly. If the domain comes back up early the device can be in an undefined state.

I don't thing we should rush a new API that is a workaround.

I agree that this is a workaround, but I don't see the core issue being resolved quickly, and the very existence of this function call makes it very obvious where updates need to be made when alternate options are available.

That is not correct, pm_runtime can be used in PRE_KERNEL, which means that kernel services are not available yet, we can't simply check if it's called from idle thread.

Updated to use the state information maintained by the PM subsystem instead.

LGTM, @ceolin please provide feedback on the pm_device_action_can_block current implementation.

The validity checker of whether we can block has been moved to kernel.h and given a suitably generic name k_can_yield. If this is likely to cause confusion with k_yield, we can use k_can_block or anything else that is suggested.

@andyross @dcpleung can I please get some feedback on the kernel portion

I am okay with the naming, but @andyross can tell you if there is a better/alternative solution to this. Though I wonder if we can implement a wait function where it calls k_sleep() or k_busy_wait() depending on context (given that the wait is relatively short, say, maybe a couple ms).

Though I wonder if we can implement a wait function where it calls k_sleep() or k_busy_wait() depending on context (given that the wait is relatively short, say, maybe a couple ms).

While that may work in this particular situation, it won't for the more general problem where device transitions want to use comms interfaces that block (UART, SPI, I2C).


bugfix-#274 remove yellow square in map

Looks great from what I can tell! Any idea why the front end tests are failing, @rosyntow ?

We'll need to create an additional issue to fix the Front End tests. But, for this issue, I'm considering it closed and fixed.

Fixed tests on PR #282


WhyLabsCallbackHandler  updates

Updates to the WhyLabsCallbackHandler and example notebook

Update dependency to langkit 0.0.6 which defines new helper methods for callback integrations
Update WhyLabsCallbackHandler to use the new get_callback_instance so that the callback is mostly defined in langkit
Remove much of the implementation of the WhyLabsCallbackHandler here in favor of the callback instance

This does not change the behavior of the whylabs callback handler implementation but is a reorganization that moves some of the implementation externally to our optional dependency package, and should make future updates easier.
@agola11

thanks @jamie256, lgtm!


Setting not saving

On chrome i always used the extension and it worked great and always saved my anki setting but i wanted to play x 256 videos so i installed chromium i set up everything like in chrome but when i close the window and relaunch chromium and go the asb website my setting don't get saved like my anki settings but in chrome it always saved my settings

Can you check that chromium is allowed to save data at chrome://settings/cookies ?
Can you also check for any logs in the developer console when opening and closing the settings popup?
You can check logs by going to menu -> other tools -> developer console

I went on the cookies settings and turned on cookies and turned off Clear cookies and site data when you close all windows its working now thank you


add catch retry logic #1

Issue #, if available:
#1
Description of changes:
add catch retry logic to handle cloudformation deployments of vpcs when multiple subnet events are triggered
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@adamcousins Thanks for your contribution. We will review this pull request in the next release.

@groverlalit is this still being considered?


Ideas for IC stable/flexible memory improvement

In my opinion the best developer experience on the IC would have developers deploy just a single canister which infinitely scales in every conceivable way. There would be one source of memory, the Wasm heap, the same volatile memory that developers are used to dealing with. But this Wasm heap would not be volatile, it would be automatically persisted by the system. The heap would also scale infinitely using a virtual memory system, allowing a single canister to access memory across entire subnets and possibly across subnets.
Stable memory would go away as a concept. Instead, static analysis would detect incompatible code changes where manual intervention might be necessary to upgrade variables. Postupgrade hooks could then be used to manually upgrade where needed, all using the heap. Eventually automatic migrations may be possible.
I believe we should automatically migrate as much as possible. But in the mean time, a simpler system like git conflict detection and resolution I believe would work well.
Stable/flexible memory is a confusing concept. Just have memory. Statically analyze code changes when upgrading, and tell the user about conflicts.

We've discussed and analyzed stable/heap memory and storage at large. The best path forward in the short term seems to be embracing DFINITY's stable structures. These structures allow us to write directly to stable memory in real-time, removing the need to serialize and deserialize during pre and post upgrade.
The path forward right now will be to embrace these stable structures and expose them to Azle, Kybra, and use them to implement Sudograph. We can then experiment with the DX and see what improvements could be made. Once the heap is 64 bit we will be able to grow it if necessary, but there is still the problem of upgrades. Automatic migrations and using schemas of some kind might help us here.
But basically, it seems like using the native data structures of a language is just not feasible, unless the language were constrained to never change the underlying memory representation of the structure. No major language that I know of provides this guarantee, and I'm not sure it's something Motoko would want to constrain itself into doing.


Blazor Calling Extensions won't pass the Params correctly

In the sample:
https://github.com/smapiot/Piral.Blazor/blob/blazor-5.0/example/pilet/Pilet/Components/SampleExtension.razor
the react-counter is called with params new { count = 10, diff = 3 } however upon loading the page the starting value is 0 and the increment is 1, so the props have the default value.

Adding a console.log(params); to the react-counter extension shows that the params is not undefined, but empty and have no properties.

So calling Extensions from Blazor with Params, the Params is not correctly passed through.
Calling a Blazor Extension from React works.

Sorry for the confusion. This works with 0.14.7 of piral-blazor (or the preview of it).


Add new setting "sonar.ts.ignoreNotFound"

I've had the problem that the coverage was also calculated for the test files and the page object files which was always at 0%, because this files don't appear in the karma report.
With this setting only files within the report get a coverage.
The default behavior was not changed.

Coverage increased (+0.2%) to 77.88% when pulling 04630d77aa57c0ab1fb8e160eff577da757809ed on mucer:master into 51672504a22cbdbd7e5d2b5055366f71633ef8a3 on Pablissimo:master.

Thanks for this, will merge on Saturday hopefully

Thanks, tested locally and does the job!


Add proxy to cluster TLS support (--cluster-ca-file)

Adds basic support for proxy to cluster TLS. Use --cluster-ca-file to
enable. To use a client certificate use --cluster-cert-file and
--cluster-key-file. This is useful for Cassandra clusters that use
TLS.

Hey there, thanks for looking into this !
Running this command:
./cql-proxy \
    --contact-points=subdomain.amazonaws.com \
    --username "something" \
    --password "something" \
    --port 9142 \
    --cluster-ca-file="/path/to/sf-class2-root.crt"

still gives me the following error:
cql-proxy: error: unable to connect to cluster context deadline exceeded