{"message":"not able to send command"}

Hello,
I have been running bngblaster-controller for some time. In last couple of days I am getting this error when I send the command for session-counters. The full http transcript is as follows:
POST /api/v1/instances/start-single-dualstack-iana-dhcp-iapd-dhcp-ipoe-dhcpv4-nat-qinq-qinq/_command HTTP/1.1
Host: <IP_ADDRESS>:8001
User-Agent: python-requests/2.25.1
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Content-Length: 31
Content-Type: application/json

{"command": "session-counters"}

HTTP/1.1 500 Internal Server Error
Content-Type: application/json; charset=utf-8
X-Content-Type-Options: nosniff
Date: Tue, 19 Mar 2024 14:26:08 GMT
Content-Length: 39

{"message":"not able to send command"}

There are about 30 tests in my test suite and this error occurs for the same 6 test cases every time. Rest of the test cases run fine. I have run bngblaster as standalone with failing test cases configuration and it works fine without any errors. I have run bngblasterctrl in debug mode with this command bngblasterctrl -debug -color but that too do not show any additional errors or warnings. I can reproduce this error reliably every time. Currently I am testing with version 0.0.9 installed using the debs from github.
Any clues to triangulate this error will be much helpful.
Thanks!

Which BNG Blaster version is used?

Which BNG Blaster version is used?

bngblaster-0.8.41-ubuntu-22.04_amd64.deb

This means that socket communication between Blaster and Controller failed but I'm actually unable to reproduce this with those version. You can enter the test directory manually and execute the command to see if the issue is here:
cd /var/bngblaster/start-single-dualstack-iana-dhcp-iapd-dhcp-ipoe-dhcpv4-nat-qinq-qinq/
sudo bngblaster-cli run.sock session-counters

In the cases where this error happens the directory listing is as follows:
# ls
config.json  run.json  run.log  run.pcap  run.pid  run.s  run.stderr  run.stdout

The socket name is just run.s. I can use the command given on run.s and getting expected output. In the cases where it's working as expected, the name is run.sock:
# ls
config.json  run.json  run.log  run.pcap  run.pid  run.sock  run.stderr  run.stdout

What is your base operating system (ubuntu 22.04, ...)?
The file is actually handover as argument -S run.sock to the BNG Blaster:
https://github.com/rtbrick/bngblaster-controller/blob/93d699ed16ee03248aa568bb671126d4a0156f48/pkg/controller/repository.go#L225
The BNG Blaster is than using this filename here to open the socket:
https://github.com/rtbrick/bngblaster/blob/3b9bf5657355f53e6ee0e523a305f736ee3cd658/code/bngblaster/src/bbl_ctrl.c#L510
You should see a log message to verify the path is given correctly.
https://github.com/rtbrick/bngblaster/blob/3b9bf5657355f53e6ee0e523a305f736ee3cd658/code/bngblaster/src/bbl_ctrl.c#L541C1-L542C1
I never seen such an issue, but may be caused by your long instance name. Maybe you can try with a much shorter instance name:
start-single-dualstack-iana-dhcp-iapd-dhcp-ipoe-dhcpv4-nat-qinq-qinq  <<<< maybe to long

What is your base operating system (ubuntu 22.04, ...)?

Yes, Ubuntu 22.04.4 LTS

start-single-dualstack-iana-dhcp-iapd-dhcp-ipoe-dhcpv4-nat-qinq-qinq <<<< maybe to long

Yes, will attempt that and let you know.

After reducing the instance name to short string, this issue has not been reproduced so far. I think this ticket can be closed. I will get back if this happens again in future.
Thanks for your support!


feat: Main UIDesign Tasks 🥇

@ziadali22
Since the colors are auto generated, so let's make this one only for UIFont addition.


Compilation issue on Mac

Hi :wave:
First of all, amazing project :)
Let me clarify, I don't have a Mac to double test this - and our CI doesn't seems to catch this bug. I'm the author of LocalAI, and people are reporting since the last rwkv.cpp release that compilation broke with Mac https://github.com/go-skynet/LocalAI/issues/411 , any chance you can reproduce this locally?
Thanks!

Yes, the issue is the new stat stuff. My PR fixes this https://github.com/saharNooby/rwkv.cpp/blob/a8ebb07d2501dcb6fd544177022421660537030f/rwkv.cpp#L20-L36 but until @saharNooby is online to merge, you can try to apply that as a solution.


Operant?

The word “operant” is used in a number of places in the tutorial text, and it is not defined.
I've never seen the word before (as a native English speaker who has read quite a bit of programming language research material), and Google doesn't really provide a useful meaning that seems applicable in this situation. I infer the meaning to be either “in scope” (as it applies to notation) or “in use” (as it applies to attributes).
I wonder if “operant” is the best word to use, because it seems to be obscure and not well defined. I would suggest using different terms where appropriate.

I didn't realize that I was using it so much! The dictionary meaning is here:
http://www.merriam-webster.com/dictionary/operant
It can be used to mean "in effect," "in use," "in scope," "in play," etc. I'll change them to "in effect" or "in use."

Yes, I did see the dictionary meaning, but I think the dictionary is leaving out some context for its use. The main context I found was in psychology and social science. Whereas, it felt like the tutorial was using it in a technical sense that, perhaps, was not implied by the dictionary. Given that impression, I think a less obscure vocabulary choice is warranted. But, out of curiosity, have you seen the word used elsewhere?

To be honest, I don't know where I picked it up. The first 30 pages of Google hits are filled with articles on "operant conditioning," which I don't think I have ever heard of. Anyhow, "available" and "in effect" are much clearer.


Update ruby-kafka to v5

Hi,
Will you consider to upgrade to ruby-kafka v5 ? It could be great also because of the support SASL SCRAM !
Thanks,
Jules

:+1:


Upgrade Redash deployment to latest release

We have been running Redash via Salt for several years at this point and the current installation is using an out of date version. The upstream Redash project recently published a v10 release that we would like to migrate to.
As part of this upgrade we also want to remove the dependency on SaltStack and use our new Pulumi/Packer/PyInfra toolchain to support it. The upstream project publishes a docker-compose file that we can use as the basis for our installation.
Some things to consider for this deployment are:

The release that we are running is still using Celery workers but the newer versions migrated to use rq which may necessitate some changes to our configuration
The workers are the processes that handle any query execution against the various data sources, meaning that they are going to be the most resource intensive part of the installation. We may want to consider running those separately from the web nodes.
We currently have Redash running in our operations VPC but we would like to move this to our Data VPC for the new installation. This will likely require some updates to security groups to allow access to the various data sources being queried. The new security group should be labelled something like business-intelligence so that it can be applied seamlessly to any other BI service that we may migrate to in the future

Current State
Two new sites created with NGINX infront of a docker container running redash.
https://redash-qa.odl.mit.edu/
https://redash-production.mit.odl.edu
Everything seems to be working well? No complaints from users who have tried things so far. I believe Peter found some things that were hard-coded to 'bi.odl.mit.edu' in the dashboard but taht is okay because we will change the DNS (see below).
TODO

Pick a date and time to formally cut over the environment.
Message users about 'Forgot Password' link to use going forward rather than touchstone.
Take a look at @pdpinch's ticket here https://github.com/mitodl/ol-data-platform/issues/289 to remove the 'Remote Login' button. Should be possible.
Do a final dump and load from https://bi.odl.mit.edu -> both new envs. Follow instructions in ol-infrastructure/src/ol-infrastructure/applications/redash/README.md on order of operations (involves invoking a manage command to upgrade v8 database to v10).
Delete DNS entrie for bi.odl.mit.edu in Route53
Redeploy https://redash-production.odl.mit.edu -> https://bi.odl.mit.edu (Should be just a pulumi stack deployment).
Verify site functionality @ https://bi.odl.mit.edu
Rejoice.

What is the reason for removing touchstone integration ?

I defer to Tobias but I believe it came down to:
"The value of the time required to get it working and functional again > value of having it working, particularly when weighed against the fact that there is very little confidence that Redash will remain the BI solution of choice going forward."

That's a good summary of the situation. There are a few factors that play into this choice, though I'm happy to discuss further if there is a strong reason for leaving it in place.

The current implementation of SAML integration on Redash is dependent on a custom build of Nginx that relays to a shibboleth FastCGI service on the instance, which then passes a header back to Redash for authentication. This implementation is currently tied to our Salt infrastructure. We can explore porting it into a container, but the total time required is as-yet unkown
The SAML integration built into Redash itself is not properly documented and does not appear to properly support any "self-hosted" options (e.g. not Okta), so there is an unknown amount of time and effort required to get that operational
Using Touchstone means that anyone with an MIT account has access to our Redash installation
Redash as a project has an uncertain future since their acquisition by Databricks (they are already shutting down their hosted offering). This means that any substantial investment in upkeep and integration needs to be gauged critically against time that could be spent evaluating and possibly migrating to an alternative.


Bugfix

Fixed java options for picard mark duplicates, as some of the larger data sets were getting java heap space oom errors
reset interval lengths in config.yaml to fix earlier push of Nettapus intervals
added config/ to .gitignore so that issues like changing the sample sheet and interval lengths in config.yaml are not accidentally pushed again

I don't love having config in .gitignore as it will cause unintentional headaches if/when we actually need to update config options. I think it is better to remember to just not commit local changes to config files. If you use git add  instead of git add * it will help to avoid this kind of thing.
Can you delete that change, and then I'll merge this?

Understandable - fixed! config/ is no longer in .gitignore


Refactor common utilities from local_access_chain_convert, local_single_block_elim_pass, and local_single_store_elim_pass

Claimed.
Pending PR #738.

Fixed with #738


⚠ ClamAV has degraded performance

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

HTTP code: 200
Response time: 70 ms

Resolved: ClamAV performance has improved in 2a70159.


Why {% show_pages %} is not printing anything?

Pagination is working if I go to some/url?page=X but {% show_pages %} is not doing anything and I am not getting any errors.
I have {% load endless %} and everything as the docs.
Any help would be appreciated.

Did you find a solution to this? I can't get it to work either.


Migrate token caches to common4j

Fairly mechanical move.
Most of the token cache classes moved into common4j's namespace.

MSALOauth2TokenCache
BrokerOauth2TokenCache
MicrosoftFamilyOauth2TokenCache
ISimpleCache

Other things got dragged along

IShareSingleSignOnState
MicrosoftStsAccountCredentialAdapter

I did move the ADALOAuth2TokenCache classes into an ADAL namespace, leaving them in common.
I am unsure if this is the correct choice.
A few constants moved as well.

ERR_UNSUPPORTED_OPERATION from ADAL's cache class to OAuth2TokenCache
I moved DEFAULT_SCOPES to an unmodifiableSet inside of AuthenticationConstants.

Implies:

https://github.com/AzureAD/ad-accounts-for-android/pull/1652
https://github.com/AzureAD/microsoft-authentication-library-for-android/pull/1479
https://github.com/AzureAD/azure-activedirectory-library-for-android/pull/1633

@AdamBJohnsonx I think if anything that is in the ADAL namespace is only being used in ADAL Android, then it can probably stay in common Android and shouldn't need to move to common4j, but I don't know for sure if ADAL namespace is primarily for ADAL Android only or if it has been incorrectly named and rather just a dumping group for "common" logic. cc/ @rpdome @iambmelt

From what I see, I don't think we have to migrate ADALAuth2TokenCache.

I think ADAL classes probably don't need to move. Other than that it looks fine to me.

I don't think I moved them to common4j, just to their own package in common so I could make sense of it.


Build Fail after adding nativescript-imagepicker

Make sure to check the demo app(s) for sample usage
Make sure to check the existing issues in this repository
If the demo apps cannot help and there is no issue for your problem, tell us about it
Please, ensure your title is less than 63 characters long and starts with a capital
letter.
Which platform(s) does your issue occur on?

iOS/Android/Both
iOS/Android versions
emulator or device. What type of device?
Everywhere

Please, provide the following version numbers that your issue occurs with:

CLI: (run tns --version to fetch it) 3.2.0
Cross-platform modules: (check the 'version' attribute in the
node_modules/tns-core-modules/package.json file in your project) 3.2.0
Runtime(s): (look for the "tns-android" and "tns-ios" properties in the package.json file of your project) 3.2.0
Plugin(s): (look for the version numbers in the package.json file of your
project and paste your dependencies and devDependencies here) latest

Please, tell us how to recreate the issue in as much detail as possible.
Describe the steps to reproduce it.
Is there any code involved?

provide a code example to recreate the problem
(EVEN BETTER) provide a .zip with application or refer to a repository with application where the problem is reproducible.

What went wrong:
Execution failed for task ':processF0F1F2F3F4DebugResources'.

Error: more than one library with package name 'com.telerik.widget.feedback'

This is what I am getting

Hi @Sharique-Hasan ,
The plugin nativescript-imagepicker has a dependency to nativescript-pro-ui - this is the new version of the already deprecated nativescript-telerik-ui plugin and is now free. Please, check the dependencies in the application you're using and make sure you don't have a dependency to nativescript-telerik-ui. if you have such, just replace it with nativescript-pro-ui.
In case the problem continues, please send us the contents of your package.json.
Best regards,
Veselina

HI @Sharique-Hasan ,
Did you manage to solve your problem?
Best regards,
Veselina

Hi @Sharique-Hasan ,
I'm closing this issue due to inactivity but please do let me know if it still exists.
Best regards,
Veselina

I was having similar issues then I removed platform android, installed the plugin and added platform android again and it worked.


Incorporate unmapped reads into output BAM

Currently removing all unmapped reads; will integrate these back into BAM files

duplicate of closed rule: include output of unmapped reads #58


Error Opening Data Source

Hi,
I faced an issue in "TestAppWpf", Saying "error  opening data source". Following are the steps to reproduce the issue:

Select scanner with "ShowTainUI = true" and start scan
When Scanner settings screen displays say "Cancel",
try to start the scan again  error pop ups: Saying "error  opening data source".

If user says cancel in any stage, it should cancel the job and should be ready to re scan.
Please let me know if there is any fix for this.
Thanks and Regards,
Saira

I am encountering the same error but in a different manner. I select the scanner and starts the scan (regardless of the scan settings). But if there's no paper in the scanner, it still executes the StartScan and OpenSource method without any exception and shows no error message. If you click on the scan button again, it shows the "Error Opening Data Source" error.

On debugging, I found that the condition in DataSource.cs file settings.AbortWhenNoPaperDetectable is always coming as false and hence the condition
if (settings.AbortWhenNoPaperDetectable && !PaperDetectable)
                throw new FeederEmptyException();

will never throw exception if there's no paper. Moreover, after throwing this error, it fails to close the datasource in the Close method as it tries to Disable the UI first which is returning false as TwainResult and hence it don't pass through the next if condition.
I did the following workaround to get it working

Replace && with || in the following condition (Open()/DataSource.cs)

if (settings.AbortWhenNoPaperDetectable && !PaperDetectable)
                throw new FeederEmptyException();

Remove the if condition in following statement (Close()/DataSource.cs)

if (result != TwainResult.Failure)
                {
                    result = Twain32Native.DsmIdentity(
                        _applicationId,
                        IntPtr.Zero,
                        DataGroup.Control,
                        DataArgumentType.Identity,
                        Message.CloseDS,
                        SourceId);
                }

@sohaiby you saved my day!

lt != TwainResult.Failure)
{
result = Twain32Native.DsmIdentity(
_applicationId,
IntPtr.Zero,
DataGroup.Control,
DataArgumentType.Identity,
Message.CloseDS,
SourceId);
}

when iam trying this solution (remove the if statement), iam facing the error (System.accessviolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupted).
the error occures on ( result = Twain32Native.DsmIdentity(_applicationId, IntPtr.Zero, .....)


Connect to VS Code error

Hi, friend..
First of all, thank you for introducing me to a good experience.
I followed the manual, but I don't think it's connecting well.
(I'll attach an image.)
I'm not sure what the problem is.
I can't get an error message when I connect.

Hi, friend..
First of all, thank you for introducing me to a good experience.
I followed the manual, but I don't think it's connecting well.
(I'll attach an image.)
I'm not sure what the problem is.
I can't get an error message when I connect.

Hi
Did you try command "AbapFS create connection"  from vscode palette?
Should make it easier to create the right connection.
Other than  that you might have connection issues (i.e. the URL in your config is not reachable, the SICF node is not active, you need single sign on,...)

Hi
Did you try command "AbapFS create connection" from vscode palette?
Should make it easier to create the right connection.
Other than that you might have connection issues (i.e. the URL in your config is not reachable, the SICF node is not active, you need single sign on,...)

After changing it to https url, I connected it and it was successfully.
Thank you.
And I want to ask you one more question.
I created a Hello World program, but I don't know how to run it.. :(
In eclipse IDE, press F8 to run the program.
but VS code is not lunch that ...haha.
how to run abap program in VS Code?
^^*

Great to read this!
You can't run programs in vscode, but you can:

run a console application with command 'AbapFs run console application'
run an unit test with command  'AbapFs run unit test' (Ctrl+Shift+F11)
open the program in SAPGUI with command 'AbapFs open in SAPGUI' (F5) (and then run it with F8)

Marcello


Updated default auth for azps5

Docs Build status updates of commit 4d9adf8:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs-conceptual/azps-5.0.0/authenticate-azureps.md
:white_check_mark:Succeeded
View (azps-5.0.0)

docs-conceptual/azps-5.1.0/authenticate-azureps.md
:white_check_mark:Succeeded
View (azps-5.1.0)

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


Allows poller to work with previous config versions that didn't have …

…the PREFERRED_PATH_TAG config

incorporating backwards_compatability_fix


fontshell groups._setItem needs to convert to list.

Here. defcon prefers a list.

Fixed with #303


getProgress() and getDownloadedBytes() issues

Scenario 2:
The file is being downloaded.
https://archive.org/download/Mozart_347/05.mp3
D/fetchDebug: id:165363055600,status:901,progress:5,error:-1
I/fetchDebug: id:<PHONE_NUMBER>00 downloadedBytes: 1875132 / fileSize: 17487404
D/fetchDebug: id:165363055600,status:901,progress:6,error:-1
I/fetchDebug: id:<PHONE_NUMBER>00 downloadedBytes: 2207640 / fileSize: 17487404
D/fetchDebug: id:165363055600,status:901,progress:7,error:-1
I/fetchDebug: id:<PHONE_NUMBER>00 downloadedBytes: 2585160 / fileSize: 17487404
.......
Then I pause the download, progress and downloadedBytes values are set to 0.
D/fetchDebug: id:165363055600,status:902,progress:0, error:-1
I/fetchDebug: id:<PHONE_NUMBER>00 downloadedBytes: 0 / fileSize: 17487404
When I pause, I want to show the last updated values in the download.

@burhanaksendir Thanks for reporting this bug. I noticed it when I was fixing the other progress bug you reported earlier. I am working on a fix and will push it up as soon as possible.

@tonyofrancis Thank you so much.

A bug fix for this issue has been pushed to GitHub. This fix will make it into Fetch 1.0.2 which will be released in a few hours.


drivers/note: remove unnecessary logic to improve the performance

Summary

drivers/note: remove unnecessary logic to improve the performance

All trace functions will start after the core resource is initialized.

drivers/note: update some ignored review comments

comment ignored from https://github.com/apache/nuttx/pull/12641
Impact
N/A
Testing
ci-check

With all due respect, I did not see the relavent comments in my previous PR.

Just a few minor comments, https://github.com/apache/nuttx/pull/12641 has been merged before I send pending comments


#414 Content search: Filters for Category (Geta) and Content Type

closing for now will update with better requirements


Missing git tag for 2023.4.20 release

It would be nice to keep PyPI releases and git tags in sync :)

Not sure what happened, looks like the workflow failed: https://github.com/pypa/trove-classifiers/actions/runs/4756142228/jobs/8451274834
I created the release/tag manually: https://github.com/pypa/trove-classifiers/releases/tag/2023.4.20
Will leave this open to see if it happens again, but this might be a transient failure since nothing has really changed here to cause this as far as I'm aware.


Error when sending confirmation email after registration

When the user register on my nextjs application through the users & permissions plugin /api/auth/local/register, gives me a bad request 400 with this error:
Error "message.replyTo must be of type Array." occurred in serializing the payload - undefined
my plugin configuration is
...
email: {
    config: {
      provider: "strapi-provider-email-azure",
      providerOptions: {
        endpoint: env("AZURE_ENDPOINT"),
      },
      settings: {
        defaultFrom: env("FALLBACK_EMAIL"),
      },
    },
  },
...

Hey @Nicolas8aa ,
Thanks for reaching out. I've fixed the issue, please find the updated v1.0.3


grpc: update kvproto, remove kv/coprocessor from tcp server.

Basically identical to https://github.com/pingcap/tikv/pull/1751. The only difference is that in server.rs, end_point_worker and snapshot_worker are not removed.
cc @siddontang @hhkbp2

LGTM

LGTM


Fixed aurelia/validation/issues/324

https://github.com/aurelia/validation/issues/324

great PR! thanks @Ma3yTa


fix terra 'group' command error

I believe this was a cut & paste error in an earlier edit of the README.

thanks Matt & Willy!


Textures of vertical/horizontal framed glasses

Describe the Bug
Hello, something is not right with textures of the framed glasses
in hand and inventory the looking like they supposed to be
but when i putting it the block have other texture
Reproduction Steps

...
Expected Result

Screenshots and Videos
No response
Crash Report or Log
No response
Operating System
Windows 10
Mod Version
0.5.0c
Minecraft Version
1.18.2
Other Mods
No response
Additional Context
No response

intended, the item is different so you can tell the difference


Settings screen redesign

Changes:

Add headers to sections, reorganise items in sections
Change toggles background
"Run random node" rename to "Connect to random node"
If "Run random node is off", ip:port shouldn't be editable and should be shown as a description of an item above
"Fingerprint", "Face Recognition" should be with capital first letters

Screens:
https://zpl.io/V4zGXJ0
https://zpl.io/VkeyPRq

@DenisDemyanko  Need to increase the area of tapping on "Connect to random node" and address when connecting to a specific node.
20190823_104450.zip

checked


FEEDBACK: Control and setup metric after deploy

[x] Checkup base analytics

[x] Dayly Hits?
[x] Daly activity?
[x] Popular pages?
[ ] Ignore self
[x] Add hotjar feedback widget

[x] #326

https://user-images.githubusercontent.com/42924400/139596943-72c29196-425a-4fbe-a12f-0892ab8c7a18.mp4


Migration of CockroachDB schema opendota fails with ERROR: unimplemented: column teama is of type int[] and thus is not indexable

https://github.com/prisma/migrations-ci/commit/e30759d59b54d1aaf1f8bd7236a71b258c523b76#diff-bc83082515b0567ad05344e5442974b6f98fb07eb595981cb5ced3ffe363b386
Error: P3018

A migration failed to apply. New migrations cannot be applied before the error is recovered from. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve

Migration name:<PHONE_NUMBER>1735_init

Database error code: 0A000

Database error:
ERROR: unimplemented: column teama is of type int[] and thus is not indexable
HINT: You have attempted to use a feature that is not yet implemented.
See: https://go.crdb.dev/issue-v/35730/v22.1

DbError { severity: "ERROR", parsed_severity: None, code: SqlState("0A000"), message: "unimplemented: column teama is of type int[] and thus is not indexable", detail: None, hint: Some("You have attempted to use a feature that is not yet implemented.\nSee: https://go.crdb.dev/issue-v/35730/v22.1"), position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("structured.go"), line: Some(1047), routine: Some("notIndexableError") }

Original Prisma schema is
generator client {
  provider        = "prisma-client-js"
  previewFeatures = ["cockroachdb"]
}

datasource db {
  provider = "cockroachdb"
  url      = "postgresql://jo_l:11ekBxMQuUr07kHv@free-tier.gcp-us-central1.cockroachlabs.cloud:26257/introspection-ci-5134.opendota?sslmode=verify-full&connect_timeout=30"
}

model api_key_usage {
  account_id  BigInt
  customer_id String?
  api_key     String   @db.Uuid
  usage_count BigInt?
  ip          String
  timestamp   DateTime @default(now()) @db.Timestamp(6)
  api_keys    api_keys @relation(fields: [account_id], references: [account_id], onDelete: NoAction, onUpdate: NoAction, map: "fk_account_id_ref_api_keys")

  @@id([account_id, api_key, ip, timestamp], map: "primary")
  @@index([account_id], map: "api_keys_usage_account_id_idx")
  @@index([timestamp], map: "api_keys_usage_timestamp_idx")
}

model api_keys {
  account_id      BigInt          @id(map: "primary") @unique
  api_key         String?         @unique @db.Uuid
  customer_id     String
  subscription_id String
  api_key_usage   api_key_usage[]
}

model competitive_rank {
  account_id BigInt  @id(map: "primary")
  rating     BigInt?
}

model cosmetics {
  item_id          BigInt    @id(map: "primary")
  name             String?
  prefab           String?
  creation_date    DateTime? @db.Timestamptz(6)
  image_inventory  String?
  image_path       String?
  item_description String?
  item_name        String?
  item_rarity      String?
  item_type_name   String?
  used_by_heroes   String?
}

model hero_ranking {
  account_id BigInt
  hero_id    BigInt
  score      Float?

  @@id([account_id, hero_id], map: "primary")
  @@index([hero_id, score])
}

/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by the Prisma Client.
model hero_search {
  match_id   BigInt?
  teama      BigInt[]
  teamb      BigInt[]
  teamawin   Boolean?
  start_time BigInt?

  @@index([teama], map: "hero_search_teama_idx_gin")
  @@index([teamb], map: "hero_search_teamb_idx_gin")
  @@ignore
}

model heroes {
  id             BigInt   @id(map: "primary")
  name           String?
  localized_name String?
  primary_attr   String?
  attack_type    String?
  roles          String[]
}

model items {
  id             BigInt  @id(map: "primary")
  name           String?
  cost           BigInt?
  secret_shop    Int?    @db.SmallInt
  side_shop      Int?    @db.SmallInt
  recipe         Int?    @db.SmallInt
  localized_name String?
}

model leaderboard_rank {
  account_id BigInt  @id(map: "primary")
  rating     BigInt?
}

model leagues {
  leagueid BigInt  @id(map: "primary")
  ticket   String? @db.VarChar(255)
  banner   String? @db.VarChar(255)
  tier     String? @db.VarChar(255)
  name     String? @db.VarChar(255)
}

model match_gcdata {
  match_id    BigInt  @id(map: "primary")
  cluster     BigInt?
  replay_salt BigInt?
  series_id   BigInt?
  series_type BigInt?
}

model mmr_estimates {
  account_id BigInt  @id(map: "primary")
  estimate   BigInt?
}

model notable_players {
  account_id   BigInt   @id(map: "primary")
  name         String?  @db.VarChar(255)
  country_code String?  @db.VarChar(2)
  fantasy_role BigInt?
  team_id      BigInt?
  team_name    String?  @db.VarChar(255)
  team_tag     String?  @db.VarChar(255)
  is_locked    Boolean?
  is_pro       Boolean?
  locked_until BigInt?
}

model player_ratings {
  account_id            BigInt
  match_id              BigInt?
  solo_competitive_rank BigInt?
  competitive_rank      BigInt?
  time                  DateTime @db.Timestamptz(6)

  @@id([account_id, time], map: "primary")
}

model players {
  account_id        BigInt          @id(map: "primary")
  steamid           String?         @db.VarChar(32)
  avatar            String?         @db.VarChar(255)
  avatarmedium      String?         @db.VarChar(255)
  avatarfull        String?         @db.VarChar(255)
  profileurl        String?         @db.VarChar(255)
  personaname       String?         @db.VarChar(255)
  plus              Boolean?        @default(false)
  last_login        DateTime?       @db.Timestamptz(6)
  full_history_time DateTime?       @db.Timestamptz(6)
  cheese            BigInt?         @default(0)
  fh_unavailable    Boolean?
  loccountrycode    String?         @db.VarChar(2)
  last_match_time   DateTime?       @db.Timestamptz(6)
  subscriptions     subscriptions[]
}

model public_matches {
  match_id              BigInt                  @id(map: "primary")
  match_seq_num         BigInt?
  radiant_win           Boolean?
  start_time            BigInt?
  duration              BigInt?
  avg_mmr               BigInt?
  num_mmr               BigInt?
  lobby_type            BigInt?
  game_mode             BigInt?
  avg_rank_tier         Float?
  num_rank_tier         BigInt?
  cluster               BigInt?
  public_player_matches public_player_matches[]

  @@index([avg_mmr])
  @@index([start_time])
}

model public_player_matches {
  match_id       BigInt
  player_slot    BigInt
  hero_id        BigInt?
  public_matches public_matches @relation(fields: [match_id], references: [match_id], onDelete: Cascade, onUpdate: NoAction, map: "fk_match_id_ref_public_matches")

  @@id([match_id, player_slot], map: "primary")
  @@index([match_id])
  @@index([hero_id])
}

model queue {
  id                BigInt    @id(map: "primary") @default(autoincrement())
  type              String?
  timestamp         DateTime? @db.Timestamptz(6)
  attempts          BigInt?
  data              Json?
  next_attempt_time DateTime? @db.Timestamptz(6)
  priority          BigInt?

  @@index([priority, id])
}

model rank_tier {
  account_id BigInt  @id(map: "primary")
  rating     BigInt?
}

/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by the Prisma Client.
model scenarios {
  hero_id    Int?    @db.SmallInt
  item       String?
  time       BigInt?
  lane_role  Int?    @db.SmallInt
  games      BigInt? @default(1)
  wins       BigInt?
  epoch_week BigInt?

  @@unique([hero_id, lane_role, time, epoch_week])
  @@unique([hero_id, item, time, epoch_week])
  @@ignore
}

model solo_competitive_rank {
  account_id BigInt  @id(map: "primary")
  rating     BigInt?
}

model subscriptions {
  account_id   BigInt?
  customer_id  String    @id(map: "primary") @db.VarChar(255)
  amount       BigInt?
  active_until DateTime? @db.Date
  players      players?  @relation(fields: [account_id], references: [account_id], onDelete: Cascade, onUpdate: NoAction, map: "fk_account_id_ref_players")

  @@index([account_id])
  @@index([customer_id])
}

model team_rating {
  team_id         BigInt  @id(map: "primary")
  rating          Float?  @db.Real
  wins            BigInt?
  losses          BigInt?
  last_match_time BigInt?

  @@index([rating])
}

/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by the Prisma Client.
model team_scenarios {
  scenario   String?
  is_radiant Boolean?
  region     Int?     @db.SmallInt
  games      BigInt?  @default(1)
  wins       BigInt?
  epoch_week BigInt?

  @@unique([scenario, is_radiant, region, epoch_week])
  @@ignore
}

model teams {
  team_id  BigInt  @id(map: "primary")
  name     String? @db.VarChar(255)
  tag      String? @db.VarChar(255)
  logo_url String?
}

/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by the Prisma Client.
model user_usage {
  account_id  BigInt?
  ip          String?
  usage_count BigInt?
  timestamp   DateTime? @default(now()) @db.Timestamp(6)

  @@unique([account_id, ip, timestamp], map: "user_usage_unique_idx")
  @@index([account_id])
  @@index([timestamp])
  @@ignore
}

model webhooks {
  hook_id       String  @id(map: "primary") @unique @db.Uuid
  account_id    BigInt?
  url           String
  subscriptions Json

  @@index([account_id])
}

Generated SQL is:
-- CreateTable
CREATE TABLE "api_key_usage" (
    "account_id" BIGINT NOT NULL,
    "customer_id" TEXT,
    "api_key" UUID NOT NULL,
    "usage_count" BIGINT,
    "ip" TEXT NOT NULL,
    "timestamp" TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP,

    CONSTRAINT "primary" PRIMARY KEY ("account_id","api_key","ip","timestamp")
);

-- CreateTable
CREATE TABLE "api_keys" (
    "account_id" BIGINT NOT NULL,
    "api_key" UUID,
    "customer_id" TEXT NOT NULL,
    "subscription_id" TEXT NOT NULL,

    CONSTRAINT "primary" PRIMARY KEY ("account_id")
);

-- CreateTable
CREATE TABLE "competitive_rank" (
    "account_id" BIGINT NOT NULL,
    "rating" BIGINT,

    CONSTRAINT "primary" PRIMARY KEY ("account_id")
);

-- CreateTable
CREATE TABLE "cosmetics" (
    "item_id" BIGINT NOT NULL,
    "name" TEXT,
    "prefab" TEXT,
    "creation_date" TIMESTAMPTZ(6),
    "image_inventory" TEXT,
    "image_path" TEXT,
    "item_description" TEXT,
    "item_name" TEXT,
    "item_rarity" TEXT,
    "item_type_name" TEXT,
    "used_by_heroes" TEXT,

    CONSTRAINT "primary" PRIMARY KEY ("item_id")
);

-- CreateTable
CREATE TABLE "hero_ranking" (
    "account_id" BIGINT NOT NULL,
    "hero_id" BIGINT NOT NULL,
    "score" DOUBLE PRECISION,

    CONSTRAINT "primary" PRIMARY KEY ("account_id","hero_id")
);

-- CreateTable
CREATE TABLE "hero_search" (
    "match_id" BIGINT,
    "teama" BIGINT[],
    "teamb" BIGINT[],
    "teamawin" BOOLEAN,
    "start_time" BIGINT
);

-- CreateTable
CREATE TABLE "heroes" (
    "id" BIGINT NOT NULL,
    "name" TEXT,
    "localized_name" TEXT,
    "primary_attr" TEXT,
    "attack_type" TEXT,
    "roles" TEXT[],

    CONSTRAINT "primary" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "items" (
    "id" BIGINT NOT NULL,
    "name" TEXT,
    "cost" BIGINT,
    "secret_shop" SMALLINT,
    "side_shop" SMALLINT,
    "recipe" SMALLINT,
    "localized_name" TEXT,

    CONSTRAINT "primary" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "leaderboard_rank" (
    "account_id" BIGINT NOT NULL,
    "rating" BIGINT,

    CONSTRAINT "primary" PRIMARY KEY ("account_id")
);

-- CreateTable
CREATE TABLE "leagues" (
    "leagueid" BIGINT NOT NULL,
    "ticket" VARCHAR(255),
    "banner" VARCHAR(255),
    "tier" VARCHAR(255),
    "name" VARCHAR(255),

    CONSTRAINT "primary" PRIMARY KEY ("leagueid")
);

-- CreateTable
CREATE TABLE "match_gcdata" (
    "match_id" BIGINT NOT NULL,
    "cluster" BIGINT,
    "replay_salt" BIGINT,
    "series_id" BIGINT,
    "series_type" BIGINT,

    CONSTRAINT "primary" PRIMARY KEY ("match_id")
);

-- CreateTable
CREATE TABLE "mmr_estimates" (
    "account_id" BIGINT NOT NULL,
    "estimate" BIGINT,

    CONSTRAINT "primary" PRIMARY KEY ("account_id")
);

-- CreateTable
CREATE TABLE "notable_players" (
    "account_id" BIGINT NOT NULL,
    "name" VARCHAR(255),
    "country_code" VARCHAR(2),
    "fantasy_role" BIGINT,
    "team_id" BIGINT,
    "team_name" VARCHAR(255),
    "team_tag" VARCHAR(255),
    "is_locked" BOOLEAN,
    "is_pro" BOOLEAN,
    "locked_until" BIGINT,

    CONSTRAINT "primary" PRIMARY KEY ("account_id")
);

-- CreateTable
CREATE TABLE "player_ratings" (
    "account_id" BIGINT NOT NULL,
    "match_id" BIGINT,
    "solo_competitive_rank" BIGINT,
    "competitive_rank" BIGINT,
    "time" TIMESTAMPTZ(6) NOT NULL,

    CONSTRAINT "primary" PRIMARY KEY ("account_id","time")
);

-- CreateTable
CREATE TABLE "players" (
    "account_id" BIGINT NOT NULL,
    "steamid" VARCHAR(32),
    "avatar" VARCHAR(255),
    "avatarmedium" VARCHAR(255),
    "avatarfull" VARCHAR(255),
    "profileurl" VARCHAR(255),
    "personaname" VARCHAR(255),
    "plus" BOOLEAN DEFAULT false,
    "last_login" TIMESTAMPTZ(6),
    "full_history_time" TIMESTAMPTZ(6),
    "cheese" BIGINT DEFAULT 0,
    "fh_unavailable" BOOLEAN,
    "loccountrycode" VARCHAR(2),
    "last_match_time" TIMESTAMPTZ(6),

    CONSTRAINT "primary" PRIMARY KEY ("account_id")
);

-- CreateTable
CREATE TABLE "public_matches" (
    "match_id" BIGINT NOT NULL,
    "match_seq_num" BIGINT,
    "radiant_win" BOOLEAN,
    "start_time" BIGINT,
    "duration" BIGINT,
    "avg_mmr" BIGINT,
    "num_mmr" BIGINT,
    "lobby_type" BIGINT,
    "game_mode" BIGINT,
    "avg_rank_tier" DOUBLE PRECISION,
    "num_rank_tier" BIGINT,
    "cluster" BIGINT,

    CONSTRAINT "primary" PRIMARY KEY ("match_id")
);

-- CreateTable
CREATE TABLE "public_player_matches" (
    "match_id" BIGINT NOT NULL,
    "player_slot" BIGINT NOT NULL,
    "hero_id" BIGINT,

    CONSTRAINT "primary" PRIMARY KEY ("match_id","player_slot")
);

-- CreateTable
CREATE TABLE "queue" (
    "id" BIGSERIAL NOT NULL,
    "type" TEXT,
    "timestamp" TIMESTAMPTZ(6),
    "attempts" BIGINT,
    "data" JSONB,
    "next_attempt_time" TIMESTAMPTZ(6),
    "priority" BIGINT,

    CONSTRAINT "primary" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "rank_tier" (
    "account_id" BIGINT NOT NULL,
    "rating" BIGINT,

    CONSTRAINT "primary" PRIMARY KEY ("account_id")
);

-- CreateTable
CREATE TABLE "scenarios" (
    "hero_id" SMALLINT,
    "item" TEXT,
    "time" BIGINT,
    "lane_role" SMALLINT,
    "games" BIGINT DEFAULT 1,
    "wins" BIGINT,
    "epoch_week" BIGINT
);

-- CreateTable
CREATE TABLE "solo_competitive_rank" (
    "account_id" BIGINT NOT NULL,
    "rating" BIGINT,

    CONSTRAINT "primary" PRIMARY KEY ("account_id")
);

-- CreateTable
CREATE TABLE "subscriptions" (
    "account_id" BIGINT,
    "customer_id" VARCHAR(255) NOT NULL,
    "amount" BIGINT,
    "active_until" DATE,

    CONSTRAINT "primary" PRIMARY KEY ("customer_id")
);

-- CreateTable
CREATE TABLE "team_rating" (
    "team_id" BIGINT NOT NULL,
    "rating" REAL,
    "wins" BIGINT,
    "losses" BIGINT,
    "last_match_time" BIGINT,

    CONSTRAINT "primary" PRIMARY KEY ("team_id")
);

-- CreateTable
CREATE TABLE "team_scenarios" (
    "scenario" TEXT,
    "is_radiant" BOOLEAN,
    "region" SMALLINT,
    "games" BIGINT DEFAULT 1,
    "wins" BIGINT,
    "epoch_week" BIGINT
);

-- CreateTable
CREATE TABLE "teams" (
    "team_id" BIGINT NOT NULL,
    "name" VARCHAR(255),
    "tag" VARCHAR(255),
    "logo_url" TEXT,

    CONSTRAINT "primary" PRIMARY KEY ("team_id")
);

-- CreateTable
CREATE TABLE "user_usage" (
    "account_id" BIGINT,
    "ip" TEXT,
    "usage_count" BIGINT,
    "timestamp" TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP
);

-- CreateTable
CREATE TABLE "webhooks" (
    "hook_id" UUID NOT NULL,
    "account_id" BIGINT,
    "url" TEXT NOT NULL,
    "subscriptions" JSONB NOT NULL,

    CONSTRAINT "primary" PRIMARY KEY ("hook_id")
);

-- CreateIndex
CREATE INDEX "api_keys_usage_account_id_idx" ON "api_key_usage"("account_id");

-- CreateIndex
CREATE INDEX "api_keys_usage_timestamp_idx" ON "api_key_usage"("timestamp");

-- CreateIndex
CREATE UNIQUE INDEX "api_keys_account_id_key" ON "api_keys"("account_id");

-- CreateIndex
CREATE UNIQUE INDEX "api_keys_api_key_key" ON "api_keys"("api_key");

-- CreateIndex
CREATE INDEX "hero_ranking_hero_id_score_idx" ON "hero_ranking"("hero_id", "score");

-- CreateIndex
CREATE INDEX "hero_search_teama_idx_gin" ON "hero_search"("teama");

-- CreateIndex
CREATE INDEX "hero_search_teamb_idx_gin" ON "hero_search"("teamb");

-- CreateIndex
CREATE INDEX "public_matches_avg_mmr_idx" ON "public_matches"("avg_mmr");

-- CreateIndex
CREATE INDEX "public_matches_start_time_idx" ON "public_matches"("start_time");

-- CreateIndex
CREATE INDEX "public_player_matches_match_id_idx" ON "public_player_matches"("match_id");

-- CreateIndex
CREATE INDEX "public_player_matches_hero_id_idx" ON "public_player_matches"("hero_id");

-- CreateIndex
CREATE INDEX "queue_priority_id_idx" ON "queue"("priority", "id");

-- CreateIndex
CREATE UNIQUE INDEX "scenarios_hero_id_lane_role_time_epoch_week_key" ON "scenarios"("hero_id", "lane_role", "time", "epoch_week");

-- CreateIndex
CREATE UNIQUE INDEX "scenarios_hero_id_item_time_epoch_week_key" ON "scenarios"("hero_id", "item", "time", "epoch_week");

-- CreateIndex
CREATE INDEX "subscriptions_account_id_idx" ON "subscriptions"("account_id");

-- CreateIndex
CREATE INDEX "subscriptions_customer_id_idx" ON "subscriptions"("customer_id");

-- CreateIndex
CREATE INDEX "team_rating_rating_idx" ON "team_rating"("rating");

-- CreateIndex
CREATE UNIQUE INDEX "team_scenarios_scenario_is_radiant_region_epoch_week_key" ON "team_scenarios"("scenario", "is_radiant", "region", "epoch_week");

-- CreateIndex
CREATE INDEX "user_usage_account_id_idx" ON "user_usage"("account_id");

-- CreateIndex
CREATE INDEX "user_usage_timestamp_idx" ON "user_usage"("timestamp");

-- CreateIndex
CREATE UNIQUE INDEX "user_usage_unique_idx" ON "user_usage"("account_id", "ip", "timestamp");

-- CreateIndex
CREATE UNIQUE INDEX "webhooks_hook_id_key" ON "webhooks"("hook_id");

-- CreateIndex
CREATE INDEX "webhooks_account_id_idx" ON "webhooks"("account_id");

-- AddForeignKey
ALTER TABLE "api_key_usage" ADD CONSTRAINT "fk_account_id_ref_api_keys" FOREIGN KEY ("account_id") REFERENCES "api_keys"("account_id") ON DELETE NO ACTION ON UPDATE NO ACTION;

-- AddForeignKey
ALTER TABLE "public_player_matches" ADD CONSTRAINT "fk_match_id_ref_public_matches" FOREIGN KEY ("match_id") REFERENCES "public_matches"("match_id") ON DELETE CASCADE ON UPDATE NO ACTION;

-- AddForeignKey
ALTER TABLE "subscriptions" ADD CONSTRAINT "fk_account_id_ref_players" FOREIGN KEY ("account_id") REFERENCES "players"("account_id") ON DELETE CASCADE ON UPDATE NO ACTION;

Problematic one seems to be:
-- CreateTable
CREATE TABLE "hero_search" (
    "match_id" BIGINT,
    "teama" BIGINT[],
    "teamb" BIGINT[],
    "teamawin" BOOLEAN,
    "start_time" BIGINT
);

...

-- CreateIndex
CREATE INDEX "hero_search_teama_idx_gin" ON "hero_search"("teama");

-- CreateIndex
CREATE INDEX "hero_search_teamb_idx_gin" ON "hero_search"("teamb");

Orignal SQL is: https://github.com/prisma/database-schema-examples/blob/main/postgres/opendota/schema.sql
And problematic one in original:
https://github.com/prisma/database-schema-examples/blob/8cea37d834f3effd6aad53e98c5bc865b4d85335/postgres/opendota/schema.sql#L492-L500

We should have a validation to not allow this in the first place.


Revert "Upgrade dependencies for React 16 update"

Reverts OperationCode/operationcode_frontend#515
Breaking changes

Well at least the site is back up! Is there a staging server we can test on? I see it gets the build from travis, and travis caches everything...

I think you said it best on Slack. The same issue we were trying to prevent locally (in removing node_modules) is not currently in our CI system. We'll need to be ready to wipe node_modules before we merge the React 16 update. There are no breaking changes, however.

I've got a fix on the way! :smile:


Elements with links not working

Bug Description
I added a link to an element but it gets removed when previewing the story.
I think the issue is here:
https://github.com/google/web-stories-wp/blob/76cdad28a6897e1049f6a342e2a08d5edb3cb26f/assets/src/edit-story/output/page.js#L52-L62
This should probably be ! hasPageAttachment || !isElementBelowLimit(element)
IMO this is a blocker for stable and definitely needs some unit tests.
Expected Behaviour
Link should not disappear when previewing the final AMP output.
Steps to Reproduce

Add a link to an element
Preview story
Notice that there's no link

Screenshots

Additional Context

Plugin Version: main
Operating System: macOS
Browser: Chrome 84

Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance Criteria

Implementation Brief
Testing
I

Add a link
Verify that it shows up in the front-end (is clickable)

II

Add a link
Add a Page attachment
Ensure the link is outside of the Page Attachment area
Save and verify that the link shows up in the front-end as well

III

Add a link to the bottom of the page (needs to be in the Page Attachment area)
Add a Page attachment
Save and verify that the link is not clickable in the front-end

Verified in QA


exclude max and min from sigma calculation

Let's exclude them.

@rultor release, tag is 0.21

@rultor release, tag is 0.21

@yegor256 OK, I will release it now. Please check the progress here

@rultor release, tag is 0.21

@yegor256 Done! FYI, the full log is here (took me 18min)

Oops! There is no order for job gh:yegor256/jpeek#80.

Oops! Job gh:yegor256/jpeek#80 is not in scope.


Add support for download function in web

New Pull Request Checklist

[x] I have read the Documentation
[x] I have searched for a similar pull request in the project and found none
[x] I have updated this branch with the latest main branch to avoid conflicts (via merge from master or rebase)
[ ] I have added the required tests to prove the fix/feature I'm adding
[ ] I have updated the documentation (if necessary)
[ ] I have run the tests without failures
[ ] I have updated the CHANGELOG.md in the corresponding package

Additional context and info
In this PR, download support was added to dio with the help of Blob files.
Note: There is no need to send savePath on the web and it can be empty.

This looks interesting, thanks! I read about createObjectUrlFromBlob just the other day and thought the same.
We will need some tests and and likely an example.

@kuhnroyal @ueman @AlexV525
By further examining the web request, I realized that we use arraybuffer when requesting the web. XMLHttpRequest supports blob. I made a change in the implementation
The problem of high memory is solved.
thank you for checking again

Could you move on with the new structure of the code and add tests?

Could you move on with the new structure of the code and add tests?

The changes have been made. You may check again

Changes were made

Please add tests.

Please add tests.

What kind of test is needed? And in what form should it be?

Please add tests.

I tried to add the test, but I get the following error
PS C:\Users\aaa\bbb\dio\plugins\web_adapter> flutter test
Error on line 10, column 3 of dart_test.yaml: Unknown platform "chrome".
   ╷
10 │   chrome:
   │   ^^^^^^
   ╵

or
PS C:\Users\aaa\bbb\dio\plugins\web_adapter\test> flutter test .\browser_test.dart
Changing current working directory to: C:\Users\mbfakourii\Projects\dio\plugins\web_adapter
Error on line 10, column 3 of dart_test.yaml: Unknown platform "chrome".
   ╷
10 │   chrome:
   │   ^^^^^^
   ╵

I tried to add the test, but I get the following error

Try to set up the test like the GitHub workflow of this library.

Please add tests.

Test added


Added Issue and PR Templates

Signed-off-by: Adithya Krishna<EMAIL_ADDRESS>This PR adds Issue & PR Templates to the repository and also updated the README.md file
r? @Licenser

Thanks a lot @Licenser for reviewing this, I'll make the requested changes and Push it soon :)

closing this since we're depricating this repository


Resource caching for Store and DAL

To improve performance and ensure maximum platform stability, we need to support caching lookup, search, and aggregation operations on DAL and store levels.
The scope of this task is only DAL and Store caching implementation. Store and DAL are unaware of the security context and do not provide access control.
Caching backends (CB)
Corteza supports multiple caching backends and allows the selection and configuration of one or more caching backends for each DAL connection.
In the initial version, corteza supports REDIS, Memcache and an in-memory store.
Future versions might support drivers for Amazon ElastiCache, Google MemoryStore and others.
Caching and invalidation mechanisms
Lookup, search, and aggregation operations can be cached. Each resource type and compose module can select the cache strategy it will use.
Cache item key (CIK) format:

lookup
[resource-type]:[module-id]:[resource-id]
search
[resource-type]:[module-id]:[filter-values]
aggregate
[resource-type]:[module-id]:[filter-values]
(aggregate and search CIK can overlap, expected and ok)

CB implementation can hash CIK value if needed.
Cache parameters and how configured BC can be controlled.
Parameters are propagated through calls via context.

disabled
CB must not serve cached content when the operation is executed with explicitly disabled caching.
max-age
CB must ensure that the max age parameter is respected and that out-of-range cached items are not used.

CLI
Caching is disabled for all operations.

[ ] Explicitly disable caching when executing operations via CLI

Code
Caching package provides utility functions to manipulate disabled & max-age parameters in the context. BC must inspect context values and execute accordingly.
HTTP interface
HTTP header Cache-Control is inspected for the no-cache parameter (sets disabled=true) and max-age parameter (seconds). See documentation for details on headers.
Headers are inspected early on request inside a chi router middleware.

[ ] Cache-Control header inspection middleware and link that middleware in server.BaseMiddleware

Cache invalidation
by directly and indirectly linking resources
Each cached resource is directly or indirectly linked to that cache item. Each CB needs to implement its own dependency checking and invalidate cache items on resource change or removal.
Cache items for lookup operations are linked directly to the resource. CB can always generate CIK from a resource.
For the initial version, cache items for search and aggregate must use intermediate CIKs (example [resource-type]:[module-id]). All cache items related to this resource-type/module-id combo must be invalidated.
This is an oversimplified solution that will cause many cache-miss requests. It will be optimised in the future.
Clean all cache
Cache on a specific connection can be cleaned via API. A new POST endpoint is added, /system/connection/:id/clean-cache. It must be enabled only cache connections. Other connection types should respond with 501 Not Implemented status.
General caching rules
Caching is never enforced and can only be enabled on a CB.
The cache can be ignored when data is requested.
When executing an operation, max-age can be passed along to control.
Max-age value must be within range (5s ... 86400s)
Drivers
Store and DAL will require a cache driver that satisfies a straightforward interface to store and retrieve payload under a specific key.

[ ] Implement generic In-memory cache driver
[ ] Implement generic REDIS cache driver
[ ] Implement generic Memcache cache driver

Store
Configuration
General resource caching is configured in the .env file using the DB_CACHE_DSN key.
Changing store caching configuration requires server restart.
DSN format examples:
memory://
redis://<user>:<password>@<host>:<port>/<db_number>
redis://<user>:<password>@</path/to/redis.sock>?db=<db_number>
memcached://tcp:<host>:<port>,tcp:<host>:<port>,tcp:<host>:<port>

Provisioning
When DB_CACHE_DNS, Corteza provisions DAL connections and adds a new entry to the DB using the corteza::system:primary-cache type and primary-cache handle. Similar as primary store connection, the primary cache connection must also be read-only.

[ ] Provision DAL Connections by adding primary-cache connection
[ ] Ensure the primary cache connection is read-only.

Initialisation
CortezaApp.InitStore is used to initialise the connection to the primary store connection. The function reads the CB configurations from DB_CACHE_DSN option and wraps the primary store connection.

[ ] Implement primary store cache initialisation

Implementation
The caching layer for the primary store is a code similar to the RDBMS layer. Each generated function should appropriately interact with both connections - cache and underlying store.
Cache struct {
	store Storer
	cache interface {
		Read(key string) ([]byte, error)
		Write(key string, item []byte) error
	}
}

[ ] Prepare code-gen template for all store cache layer functions
[ ] Implement store cache constructr

DAL
Configuration

[ ] DAL Connection configuration can be configured to use caching as a default for all modules
[ ] DAL configuration on Compose module can reset cache configuration from connection or provide new configuration
[ ] CB is one of the DAL connections with a particular type.

[ ] corteza::dal:cache:memory
[ ] corteza::dal:cache:redis
[ ] corteza::dal:cache:memcache

[ ] Corteza must prevent the use of connections of non-cache type for caching
[ ] Corteza must prevent the use of connections of type cache for storage

Initialisation
DAL service implements per-module cache configuration in the storeOpPrep. The function reads the connection and model cache configuration and constructs (wraps) the connection accordingly. If the operation disallows caching, the function should skip CB wrap.

[ ] Implement DAL service cache initialisation

Implementation
Generic DAL driver provides custom create, search, delete, and update functions that interact with the cache driver to read and write cached items. Other operations are routed directly to the underlying  storage connection

[ ] Generic DAL driver initialised with cache driver and underlying storage connection

Probably will be a part of a patch release or of 2023.9


Add AdePT logos

As this seems to have become the defacto logo, here are the pdf, png and the original GIMP xcf files from which I sketched the logo

Hi @agheata - it was done in GIMP, which is a raster based editor and unfortunately the orginal is also rather low resolution. I will work on it again as a vector image soon. I set this as a WIP for noe.

By the way, we need to figure out how to disable the REUSE compliance check for binary files, maybe disable them by file extension?

This is ready for another look now @agheata @WitekPokorski. There is a master SVG file, with the logo in vector format, plus exports of that to PDF and PNG.
The font has been updated to Ariel, mainly as it is so ubiquitous that there's no danger of font-rot because the fonts on someone's laptop evolve and things dissapear.
One slight design difference is that the lower text (Accelerated Particle Transport) is now in italics, giving a more dynamic feel.

By the way, we need to figure out how to disable the REUSE compliance check for binary files, maybe disable them by file extension?

The fix is to include a sidecar file for any binary foo called foo.license.

Very nice, sorry for the delay


Media file path can't include 'blank' in jupyter notebook

If I run the code like this:
import playsound from playsound
playsound('sample-' + timestr + '.wav')
from jupyter notebook, playsound will display error: Unable fine the media file file:\\volume.....*.wav
I think that maybe we need to process the string input to the playsound.py

It's looks like that same as issue #40. So I close it and please ignore it.