zstbtt: stb_truetype bindings

Work-in-progress stb_truetype bindings. Not ready for merge, opened for early feedback.

Thanks! Looks good.
One thing I would like to improve is removing the usage of [*c] - we should be using [*] or [*:0] (for C strings).

Just letting you know I recently converted a small TTF library "libschrift" to Zig in case you're interested in using it.  https://github.com/marler8997/libschrift

Just letting you know I recently converted a small TTF library "libschrift" to Zig in case you're interested in using it. https://github.com/marler8997/libschrift

Looks good. Thanks for the heads up!
Reasons for me choosing stb_truetype are that it's widely used / battle tested and that it's libc dependencies can be overidden (portable). Do you know what libschrift's story is in this regard?

Oh wow it's libc dependencies can be overridden? That's great. I don't know much about libschrift other than it was small and worked out of the box when I tested it and ported it. I might need need to look into stb myself

Oh wow it's libc dependencies can be overridden? That's great. I don't know much about libschrift other than it was small and worked out of the box when I tested it and ported it. I might need need to look into stb myself

It's true - the stb libs do a great job with this sort of thing.
Here we override malloc, free so that a zig allocator can be provided (as has been done with zstbi also). I have also overridden assert for both stb_truetype and stb_rect_pack (optional dep) which I needed to do to build for WASM.

I'm not sure if I'll actually try to support wasm, I was just interested to see. But I think I only actually need this for an offline asset pipeline. Will likely leave removing libc dep as a todo.

Supporting wasm was actually the reason I decided to port libschrift to zig. I also ran into that asser_fail linker issue when it was in C. That and just wanting to understand how it all worked so it was worth it in the end.

I've been trying out @marler8997 's schrift port and I really like it. I have decided to use it instead of stb_truetype.
So I'm probably not going to continue with these bindings. I will leave it in this branch in case anybody wants to pick it up.
I'm closing this PR but I think it would be cool to have a lib with only the zig port in that we can hack on. What do you guys think?


ActiveRecord attribute processing with binary data

What steps will reproduce the problem?

I use 2amigos widget to upload (this issue is not related to them)
I have Document controller where I process the data recevied from ajax call made by the widget, it look something like the following:

...
public function actionUpload() {
	$model = new UploadedFiles();
	$model->image = UploadedFile::getInstance($model, 'image');

	if ($model->image) {

	    $_fileName = Html::encode(str_replace(' ', '_', $model->image->name));

	    $fp = fopen($model->image->tempName, 'r');
	    $content = fread($fp, filesize($model->image->tempName));
	    fclose($fp);

	    $model->name = $_fileName;
	    $model->type = $model->image->type;
	    $model->size = $model->image->size;

	    $model->content = $content;
	    $model->client_id = Yii::$app->user->identity->id;

	    if ( $model->save() ) {
	    ...

I dont save the file on the server, but fread the content of tempName and save the record in the database
Most of the images are uploaded normally without any problem. For example this is fine and this one takes about 30 secs or more to process.

AJAX response:
General:
Request URL:http://domain.com/document/upload
Request Method:POST
Status Code:200 OK
Remote Address:<IP_ADDRESS>:80
Referrer Policy:no-referrer-when-downgrade

Response headers:
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection:Keep-Alive
Content-Encoding:gzip
Content-Length:91
Content-Type:text/html; charset=UTF-8
Date:Thu, 28 Sep 2017 08:24:08 GMT
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:timeout=5, max=100
Pragma:no-cache
Server:Apache/2.4.7 (Ubuntu)
Vary:Accept-Encoding
X-Debug-Duration:75
X-Debug-Link:/debug/default/view?tag=59ccb1a812bc4
X-Debug-Tag:59ccb1a812bc4
X-Powered-By:PHP/5.5.9-1ubuntu4.22

Request headers:
Accept:*/*
Accept-Encoding:gzip, deflate
Accept-Language:en,en-US;q=0.8,es;q=0.6,ru;q=0.4
Cache-Control:no-cache
Connection:keep-alive
Content-Length:178290
Content-Type:multipart/form-data; boundary=----WebKitFormBoundary0tlIAE5C8mf09xof
Cookie:o_p=404d5763beee9d0a2fe49cdf8d45d0ac343a47889c5294de1f32c5bf9fcbc6afa%3A2%3A%7Bi%3A0%3Bs%3A3%3A%22o_p%22%3Bi%3A1%3Bi%3A1506331028%3B%7D; _csrf-client=6b9dca009d2a9f31b9d296378af9737a123bf7215ace29e912d690d83888269aa%3A2%3A%7Bi%3A0%3Bs%3A12%3A%22_csrf-client%22%3Bi%3A1%3Bs%3A32%3A%22%D7%01%1AC%E0%C0%DB%E4.%81%9E%D6h%E2%FC%24%96%84%C2%F1%DB%09%C3C%27%A8%3A%FB%ACIg%DF%22%3B%7D; lang=6f86f2618f98de21705486f24c082ce7931d5a8d6ed0b3eecfda3471a576d000a%3A2%3A%7Bi%3A0%3Bs%3A4%3A%22lang%22%3Bi%3A1%3Bs%3A5%3A%22en-US%22%3B%7D; _csrf-backend=0bd65720524cb5b04c35985bdf580731de6f662c06fcce4c02db89de7a74fe1ea%3A2%3A%7Bi%3A0%3Bs%3A13%3A%22_csrf-backend%22%3Bi%3A1%3Bs%3A32%3A%22%BE%D0%AE%98%40%0E%29%9C%28%9D%EAFL%F5%FC%B2%2B%AB%25%0F%C7%AC%C3Y%F0%1F%7E%27-14N%22%3B%7D; o=5d9ee1b694332ca26bcfbf4c5df7f79ceb36322fa7f426f315e735ac17b0e6b1a%3A2%3A%7Bi%3A0%3Bs%3A1%3A%22o%22%3Bi%3A1%3Bi%3A1506502698%3B%7D; sc-backend=h04j7h7s2dbq3qdo69uf832a55; sc-client=9auoc3itlqcc5lpl9ghcvbjig6
Host:doamain.com
Origin:http://domain.com
Pragma:no-cache
Referer:http://domain.com/profile/update
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/61.0.3163.79 Chrome/61.0.3163.79 Safari/537.36
X-CSRF-Token:yuoJPBfEcNBnFpHxzz0K7dkUB6HQu53aNtDjDc7j2q4d6xN_9wSrNEmXDyen3_bJT5DFUAuyXpkReNn2Yqq9cQ==
X-Requested-With:XMLHttpRequest

Request payload:
------WebKitFormBoundary0tlIAE5C8mf09xof
Content-Disposition: form-data; name="UploadedFiles[image]"; filename="small.jpg"
Content-Type: image/jpeg

------WebKitFormBoundary0tlIAE5C8mf09xof--

Debugging
I was debugging the code for long time and tried to find the source of the problem and I found it:

when I send ajax request to process the file, the whole action "stucks" on $model->save() method, which I believe does some processing of the binary data and it takes about 30-50 secs. I can say that by running the top command and seeing almost 90% CPU load by the apache.

What is the expected result?
Processing of the binary attributes should be fast, I believe that ActivreRecord does some extra processing of the inputs, which takes extra time.
What do you get instead?
Long processing of form data.

Q
A

Yii version
2.0.12

PHP version
5.5+

Operating system
Ubuntu 14.04

Do u have a html purifier on it?

@samdark  this is not the question. Try it yourself you will get the same bug. I solved it only by using base64_encode()/decode().

Yii by itself doesn't do any binary processing.

@samdark This could be related to query logging?
@bologer Did you try to disable logging and profiling for DB?
http://www.yiiframework.com/doc-2.0/yii-db-connection.html#$enableLogging-detail
http://www.yiiframework.com/doc-2.0/yii-db-connection.html#$enableProfiling-detail

@rob006 just tested it and it is actually the database query logging. Added db to the list of exceptions and it does not make anymore problems. I believe, this is a bug.

@bologer, @rob006 any idea about the fix?

@samdark do you really need to display binary data in the logs? does it make any sense?
I used base64_encode() to encode binary data before inserting it in db, and base64_decode() retrieve the original data back. I don't know if this is the real fix or there is a better solutiuon.

Sometimes yes. Especially if I've got something wrong at the server, cannot reproduce issue locally and want to debug it.
How do I know if it's binary or just a long string?

@samdark don't know whether it is about the stirng length or the binary data. But I know for sure that it happens on some of the images (not all). I used 2-3 different images, one of the smallest ones usually fails, this is something that I noticed.

A set of code, DB schema and image to reproduce the issue could be helpful. Would you be able to put it together starting with basic project template?

@samdark, here is the information:

Yes, I would be able to put it in basic tempalte, but a bit later, maybe for now you can look at the code below.

Db schema:
CREATE TABLE IF NOT EXISTS `uploaded_files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `client_id` int(250) NOT NULL,
  `name` varchar(255) COLLATE utf8_bin NOT NULL,
  `type` varchar(30) COLLATE utf8_bin NOT NULL,
  `size` int(11) NOT NULL,
  `comment` varchar(1024) COLLATE utf8_bin DEFAULT NULL,
  `content` mediumblob NOT NULL,
  `deleted_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `client_id_deleted_at_created_at` (`client_id`,`deleted_at`,`created_at`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=459 ;

Upload action:
public function actionUpload()
{
    try {
        $model = new UploadedFiles(['scenario' => UploadedFiles::SCENARIO_CLIENT]);

        $model->image = UploadedFile::getInstance($model, 'image');

        if ($model->image) {

            $_fileName = Html::encode(str_replace(' ', '_', $model->image->name));

            $fp = fopen($model->image->tempName, 'r');
            $content = fread($fp, filesize($model->image->tempName));
            fclose($fp);

            $model->name = $_fileName;
            $model->type = $model->image->type;
            $model->size = $model->image->size;

            $model->content = $content;
            $model->client_id = Yii::$app->user->identity->id;

            if ($model->save()) {

                return Json::encode([
                    'files' => [
                        'status' => 1,
                        'errors' => [],
                        'name' => Html::encode($_fileName),
                        'timestamp' => time()
                    ],
                ]);
            } else {

                if ($model->hasErrors()) {
                    $errors = [];

                    foreach ($model->errors as $key => $error) {
                        $errors[] = $error;
                    }

                    return Json::encode([
                        'files' => [
                            'status' => 0,
                            'errors' => $errors,
                            'timestamp' => time()
                        ]
                    ]);
                }
            }
        }

        return Json::encode([
            'files' => [
                'status' => 0,
                'errors' => [Yii::t('frontend', 'unable_to_upload_the_file')],
                'timestamp' => time()
            ]
        ]);
    } catch (Exception $exception) {
        throw new GuiException();
    }
}

View file:
<?php

use yii\helpers\Html;
use dosamigos\fileupload\FileUpload;
use yii\grid\GridView;
use yii\widgets\Pjax;

?>

<?= FileUpload::widget([
    'model' => $modelUpload,
    'attribute' => 'image',
    'url' => ['document/upload'],
    'clientEvents' => [
        'fileuploaddone' => "function (e, data) {

            var result = JSON.parse(data.result);
            var files = result.files;

            if( files.status === 1 ) {
                $('.upload-err').remove(); // Remove all previous errors

                $.pjax.reload({container:'#uploaded-files-widget-pjax'});

                $.each(result.files, function (index, file) {
                    $(document).on('pjax:end', function() {
                        var jAdded = $('table#uploaded-files-table tbody tr:first-child');

                        jAdded.css({
                            'background-color': 'lightgreen'
                        });

                        setTimeout(function() {
                            jAdded.removeAttr('style');
                        }, 1000);
                    });
                });

                $('#progress').hide(1000);
            } else {
                $('#progress').hide(1000); // Hide progress bar
                $('#progress .progress-bar').css( 'width', '0%' );

                $('.upload-err').remove(); // Remove all previous errors
                var errs = files.errors; // get list of errors

                if( errs.length >= 1 ) {
                    for(var i = 0; i <= errs.length; i++) {
                        var errEl = $('
')
                            .addClass('upload-err text-danger')
                            .text(errs[i]);

                            $('#progress').before(errEl);
                    }
                } else {
                    $('.upload-err').remove(); // Remove all previous errors
                    $('#progress').hide();
                }
            }
        }",
        'fileuploadfail' => "function(e, data) {
            $('#progress').hide(1000);
            $('#progress .progress-bar').css( 'width', '0%' );
        }",
        'fileuploadprogressall' => "function(e, data) {
            var progress = parseInt(data.loaded / data.total * 100, 10);
            $('#progress').show();
            $('#progress .progress-bar').css( 'width', progress + '%' );
        }",
    ],
]); ?>

<?php Pjax::begin([
    'options' => [
        'id' => 'uploaded-files-widget-pjax'
    ]
]); ?>
<?= GridView::widget([
    'dataProvider' => $dataProvider,
    'layout' => '{items}{pager}',
    'pager' => [
        'firstPageLabel' => 'First',
        'lastPageLabel' => 'Last'
    ],
    'tableOptions' => [
        'class' => 'table table-striped table-bordered',
        'id' => 'uploaded-files-table'
    ],
]); ?>
<?php Pjax::end(); ?>

Images

All good
This one fails

How's your logger configured?

@bologer Can you save DB logs for these queries and compare them? It is hard to say what is going on here.

Which database and version do you use? Do you see the binary string in the INSERT query?
It's a wild guess, but recently we had some serious issues with Unicode characters and MySQL databases ... and since the blob works fine, but the query logging has issues, I thought it could be related.
You might search for 4 byte unicode characters in the file you are uploading

Turns out MySQL’s utf8 charset only partially implements proper UTF-8 encoding. It can only store UTF-8-encoded symbols that consist of one to three bytes; encoded symbols that take up four bytes aren’t supported.

https://mathiasbynens.be/notes/mysql-utf8mb4

@schmunk42 utf8 encoding never made it slow. It was just messing characters up.

I close this as it was misconfiguration of the logs. Basically it was because binary data was saved into logs which took quite some time for some reason.
Thank you very much for your help @samdark, @schmunk42 and @rob006


Update docker for production

Time to do: 1 hour
Its should be update the build in docker so that the React build is like the production version

Error "WebSocketClient.js:13 WebSocket connection to 'wss://fosterflow.com/ws' failed: " DO NOT repair if do:

build project
use WDS_SOCKET_PORT=0
https://create-react-app.dev/docs/advanced-configuration/#:~:text=for more details.-,WDS_SOCKET_PORT,-✅ Used check every var

Has been written:

Docker file
nginx file
Edited .yml file

Adding self signature sertificate on test serving. Adapt nginx to proxy requests

Next step to fix error:
Find settings on frontend to add /api/ to request. Because after make "yarn build" all of request make like that "https://<IP_ADDRESS>/token" without /api/

374993a for 17.09.2023

https://gitlab.soshace.com/soshace/fosterflow-wp/commit/070c8fcc192d69a2e2d8c25453bee92b29bd75b4


Remapping hasn't worked well since 0.90.66

Remapping fn to left control has been incredibly difficult for me since any update past 0.90.66.
Here's the link for anyone struggling with the same thing. Anyone know why that may be?
https://pqrs.org/osx/karabiner/files/Karabiner-Elements-0.90.66.dmg

I'm also having the same issue. Can't say what version it started because I was prompted for the first time to update yesterday and then again this morning. Prior to that it was working fine. Can confirm that rolling back to 0.90.66 fixes the issue.

I was on the latest version and working fine, but noticed this morning that profiles had been introduced. The moment I set up a profile my mappings all started going screwy. Specifically, the mapping of caps_lock to a. Although after clicking around a lot I managed to get any mapping to not work!
Eventually came across this post, rolled back to 0.90.66 (which, I notice, doesn't have profiles), and everything's fine again.

@5Aki1 just out of curiosity, how did you find that URL to version 0.90.66?  I was digging through github.com and the main pqrs.org site to no avail.
I really appreciate you posting it.  I can concur this version works for me on MacOS Sierra as well whereas the latest version available today did not.

@asyncsrc I looked up a line from the log and someone had posted it in a thread. I just thought I'd make it a little more accessible to people.


Update procedures.md

Tips

Thank you very much for contributing to Apache Hudi.
Please review https://hudi.apache.org/contribute/how-to-contribute before opening a pull request.

What is the purpose of the pull request
fix create_savepoints example desc
Brief change log
fix create_savepoints example desc
Verify this pull request
This pull request is a trivial rework / code cleanup without any test coverage.
Committer checklist

[ ] Has a corresponding JIRA in PR title & commit

[ ] Commit message is descriptive of the change

[ ] CI is green

[ ] Necessary doc changes done or have another open PR

[ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

Merging this now.  @lispwu feel free to follow up with another PR if needed.


Provide better ways to express whether I intend to use the contents of the artifacts of a configuration or just use their locations

Sometimes I want to know where the files of a configuration will end up, so that I can calculate some configuration value or generate some file that includes the file names or locations. Far more commonly, however, I want the files to have been produced so that I can use their content.
The current contract on Configuration is essentially the first one, and it's up to you, the caller, to make sure you query the files from some context where the configuration has been declared as a task input so that their content will be up-to-date. However, it is easy to mess this up and accidentally query from a context where this isn't the case, leading to all kinds of confusing behaviour.
We should replace these contracts with more explicit "I want the locations" and "I want the locations and the contents" query APIs of some kind. This will allow us, for example, to provide validation, failing early when I ask for the contents of something that I haven't declared as an input/dependency.
Expected Behavior
Gradle helps me out when I ask for the contents of the files of a configuration from somewhere where Gradle cannot guarantee that the contents are available, so that when I'm expecting the files to exist and be up-to-date, they either always are or the build always fails in a nice way that explains the problem and how to fix it.
Current Behavior
Gradle makes me confused. Probably should split that into several issues ...

We should also fail when you ask for the locations too early, i.e. during configuration time. See https://github.com/gradle/gradle/issues/2298


Can't access custom folder

Description
Hello,
I'm running a fresh install of gitea on a debian server and I have troubles customizing it following this documentation.
First of all it says in the documentation :

You can check the CustomPath using gitea help. You can also find the path on the Configuration tab in the Site Administration page.

But when I type gitea help I get :
DEFAULT CONFIGURATION:
   AppPath:    /usr/local/bin/gitea
   WorkPath:   /usr/local/bin
   CustomPath: /usr/local/bin/custom
   ConfigFile: /usr/local/bin/custom/conf/app.ini

While the site administration page gives me this :

When I try to list these directories I get this :
user@server:~$ ls -la /usr/local/bin
total 134652
drwxr-xr-x  2 root root      4096 30 janv. 15:50 .
drwxr-xr-x 10 root root      4096 25 janv. 16:15 ..
-rwxr-xr-x  1 root root 137872608 30 janv. 15:50 gitea
user@server:~$ ls -la /var/lib/gitea
ls: impossible d'ouvrir le répertoire '/var/lib/gitea': Permission non accordée
user@server:~$ ls -la /var/lib
total 116
...
drwxr-xr-x  2 root          root          4096 28 févr.  2023 git
drwxr-x---  5 git           git           4096 30 janv. 15:50 gitea
...

For reference here is how I installed Gitea :
HOW I INSTALLED GITEA

# Downloading
wget -O gitea https://dl.gitea.com/gitea/1.21.4/gitea-1.21.4-linux-amd64

chmod +x gitea

wget -O gitea.asc https://dl.gitea.com/gitea/1.21.4/gitea-1.21.4-linux-amd64.asc

# Key verification
sudo apt install gnupg

gpg --keyserver keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2

gpg --verify gitea.asc gitea

# Git user creation
sudo adduser \
   --system \
   --shell /bin/bash \
   --gecos 'Git Version Control' \
   --group \
   --disabled-password \
   --home /home/git \
   git

# Directory structure creation (as root)
mkdir -p /var/lib/gitea/{custom,data,log}
chown -R git:git /var/lib/gitea/
chmod -R 750 /var/lib/gitea/
mkdir /etc/gitea
chown root:git /etc/gitea
chmod 770 /etc/gitea

# copied bin to final location
sudo cp gitea /usr/local/bin/gitea

# Autocomplete scripts
bash_autocomplete in /usr/share/bash-completion/completions/gitea
zsh_autocomplete in /usr/share/zsh/_gitea

Then here are my gitea.service and reverse proxy configurations :
GITEA.SERVICE + REVERSE PROXY

# Service creation
gitea.service [Service] block :
[Service]
RestartSec=2s
Type=simple
User=git
Group=git
WorkingDirectory=/var/lib/gitea/
#RuntimeDirectory=gitea
ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
Restart=always
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea

# Reverse Proxy
ProxyPreserveHost On
ProxyRequests off
AllowEncodedSlashes NoDecode
ProxyPass / http://localhost:3000/ nocanon

Then after all that I went to https://mygiteadomain and went through installation process which gave my this /etc/gitea/app.ini :
APP.INI

APP_NAME = (my app name)
RUN_USER = git
WORK_PATH = /var/lib/gitea
RUN_MODE = prod

[database]
DB_TYPE = postgres
HOST = (my bdd ip address)
NAME = giteadb
USER = gitea
PASSWD = (my bdd password in clear ???)
SCHEMA =
SSL_MODE = disable
PATH = /var/lib/gitea/data/gitea.db
LOG_SQL = false

[repository]
ROOT = /var/lib/gitea/data/gitea-repositories

[server]
SSH_DOMAIN = (my gitea domain)
DOMAIN = (my gitea domain)
HTTP_PORT = 3000
ROOT_URL = https://(my gitea domain)/
APP_DATA_PATH = /var/lib/gitea/data
DISABLE_SSH = false
SSH_PORT = 22
LFS_START_SERVER = true
LFS_JWT_SECRET = (a secret)
OFFLINE_MODE = false

[lfs]
PATH = /var/lib/gitea/data/lfs

[mailer]
ENABLED = true
PROTOCOL = SMTPS
SMTP_ADDR = (my smtp server address)
SMTP_PORT = (my smtp server port)
FROM = (my smtp server address)
USER =
PASSWD =

[service]
REGISTER_EMAIL_CONFIRM = false
ENABLE_NOTIFY_MAIL = true
DISABLE_REGISTRATION = true
ALLOW_ONLY_EXTERNAL_REGISTRATION = false
ENABLE_CAPTCHA = false
REQUIRE_SIGNIN_VIEW = true
DEFAULT_KEEP_EMAIL_PRIVATE = false
DEFAULT_ALLOW_CREATE_ORGANIZATION = false
DEFAULT_ENABLE_TIMETRACKING = true
NO_REPLY_ADDRESS = noreply

[openid]
ENABLE_OPENID_SIGNIN = false
ENABLE_OPENID_SIGNUP = false

[cron.update_checker]
ENABLED = false

[session]
PROVIDER = file

[log]
MODE = console
LEVEL = info
ROOT_PATH = /var/lib/gitea/log

[repository.pull-request]
DEFAULT_MERGE_STYLE = merge

[repository.signing]
DEFAULT_TRUST_MODEL = committer

[security]
INSTALL_LOCK = true

I must admit I'm a little bit confused here so here are some questions :

Why are gitea help and site administration displaying different directories ?
Is it the intended behavior to be unable to access/modify /var/lib/gitea unless we are user 'git' ?
Generally speaking, did I do something wrong and if so what ?

Gitea Version
1.21.4
Git Version
2.39.2
Operating System
Debian 12
Database
PostgreSQL

I'm not the best with the config, but after a quick test I think you have to do something like
gitea --config /path/to/app.ini to get the same result for help and for the service

Hello @zokkis and thanks for your answer.
I pasted content from my gitea.service file in my initial post and I think the following line :
ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
should perform what you suggested don't you agree ?

I think zokkis is right. Gitea detects its paths by the config file.
So you would see different outputs by gitea help --config /etc/gitea/app.ini and gitea help
For your case, your custom folder should be /var/lib/gitea/custom, you need some "sudo" trick to create the direcotry and access/manage these files.

Thanks @wxiaoguang and @zokkis.
I managed to access the folder and do some tests as the git user.
If anyone is stuck in the same way in the future, the only way around I found is to :
sudo -i to access custom folder and manage files in it, then once changes are done change files owner and permissions so that gitea can access the files :
chown -R git:git /var/lib/gitea/
chmod -R 750 /var/lib/gitea/

su - git as root to run commands as git if needed (for debug purposes)


Apt-get upgrade mariadb is 404 on Ubuntu 16.04 Xenial w/ EasyEngine

Please attach the output of following command when open a new support request.

[x] lsb_release -a
[x] ee -v
[x] ee info
[x] wp --allow-root --info

See: http://community.rtcamp.com/t/apt-get-upgrade-mariadb-is-404/6860
** Attempting to Upgrade**
root@ee:~# apt update && apt upgrade
Hit:1 http://mirrors.digitalocean.com/ubuntu xenial InRelease
Hit:2 http://mirrors.digitalocean.com/ubuntu xenial-updates InRelease
Get:3 http://mirrors.digitalocean.com/ubuntu xenial-backports InRelease [92.2 kB]
Ign:4 http://apt.newrelic.com/debian newrelic InRelease
Hit:5 http://apt.newrelic.com/debian newrelic Release
Get:6 http://security.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]
Hit:7 http://ppa.launchpad.net/chris-lea/redis-server/ubuntu xenial InRelease
Ign:8 http://packages.amplify.nginx.com/ubuntu xenial InRelease
Get:9 http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu xenial InRelease [3,874 B]
Hit:10 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease
Ign:11 http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/xUbuntu_16.04  InRelease
Hit:12 http://packages.amplify.nginx.com/ubuntu xenial Release
Hit:13 http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/xUbuntu_16.04  Release
Fetched 191 kB in 0s (245 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
41 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic linux-image-4.4.0-31-generic
The following packages will be upgraded:
  binutils cpp-5 gcc-5 gcc-5-base grub-common grub-pc grub-pc-bin grub2-common language-pack-en language-pack-en-base language-pack-gnome-en language-pack-gnome-en-base
  libasan2 libatomic1 libcc1-0 libcilkrts5 libgcc-5-dev libgomp1 libitm1 liblsan0 libmpx0 libpython2.7 libpython2.7-dev libpython2.7-minimal libpython2.7-stdlib libquadmath0
  libstdc++6 libtsan0 libubsan0 linux-headers-generic linux-headers-virtual linux-headers-virtual-lts-xenial linux-image-virtual linux-libc-dev linux-virtual
  linux-virtual-lts-xenial mysql-common php-igbinary python2.7 python2.7-dev python2.7-minimal
41 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 8,490 B/90.1 MB of archives.
After this operation, 134 MB of additional disk space will be used.

FAILED UPGRADE
Do you want to continue? [Y/n] Y
Err:1 http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu xenial/main i386 mysql-common all 10.1.15+maria-1~xenial
  404  Not Found [IP: <IP_ADDRESS> 80]
Err:1 http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu xenial/main i386 mysql-common all 10.1.15+maria-1~xenial
  404  Not Found [IP: <IP_ADDRESS> 80]
E: Failed to fetch http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu/pool/main/m/mariadb-10.1/mysql-common_10.1.15+maria-1~xenial_all.deb  404  Not Found [IP: <IP_ADDRESS> 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

root@ee:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04 LTS
Release:	16.04
Codename:	xenial

root@ee:~# ee -v
EasyEngine v3.7.1
Copyright (c) 2016 rtCamp Solutions Pvt. Ltd.

rm -rf /var/lib/apt/lists/*
apt-get clean
apt-get update


Update manifest.json

Description
Google is phasing out Chrome Extension Manifest V2, causing the extension to be removed from the store.
A version change is needed to comply with Manifest V3 and a pull request has been submitted as a reminder for republishing the extension in the store.
https://developer.chrome.com/docs/extensions/mv3/intro/

@shanebell
We hope that the extension can be republished in the store :pray:

Hi @entertvl
Thanks for your message.
Google removed it from the Chrome web store because I hadn't updated it in a long time. I will try to make some time to update it and get it re-published.
Thanks,
Shane.


Initial take on official new module template.

OK I don't like that we have three copies of build.psake.ps1 but will address later.

This is a start.  Definitely not done yet.

duplicate build script issue
I'm going to get rid of one examples\NewModuleTemplate since src\Templates\NewModule effectively replaces it.  I think in examples we want a simple template that shows various features, some of which are not used in the New Module template.  That template should not be related to creating a new module in order to avoid confusion.

WRT build.psake.ps1 I was hoping we could achieve something like MSBuild's Microsoft.CSharp.targets file where we would provide most of the standard "build" pipeline (copy appropriate files, code-sign, test, docgen, publish) where the psake script would gracefully handle scenarios where you don't have a code signing cert or don't want to publish.  Additionally, the script needs to have to appropriate, simple extension points like the PrePublish/PostPublish tasks.  We build all sorts of C# projects but we've never had to modify Microsoft.CSharp.targets.  Not quite there with the psake script but the bulk of what needs to be tweaked is at the top of the file in the form of various variables.

Yep, definitely, having a standard build script that doesn't need to be touched by anyone would be nice.  If we can find a way to have an optional properties/tasks file which can be loaded up by convention in build.psake.ps1 that might work pretty well for build extensibility.


Add option to remove Gamma correction from image.

Computer images are normally gamma corrected since monitors expect it. However some E-Ink displays expect linear instead gamma corrected image data.
Added new option REMOVE_GAMMA that will remove gamma correction from the image when it is set to true.
This can improve image readability on some E-Ink displays.

Thanks for the addition. 👍
Maybe one question before merging: do you think it would make sense to make the gamma correction value of 2.2 configurable or is this the most common practice out there?
Sure, it would increase the complexity of the configuration, but I'd like to avoid more config parameters in the future by allowing the best flexibility right away.
As I'm mostly familiar with Kindle displays and initially started this project specifically for them, I just learned what "wild" eink setups might be out there.

I thought about this exact issue when making the change.
When removing gamma correction, we need to call gm.gamma(1.0/2.2).
And my first version was just to provide a GAMMA_CORRECTION value from configuration. It was bit odd to write GAMMA_CORRECTION=0,0454545454545455 in to the configuration field.
Of course I could add a GAMMA value, that user could change, it would default to this 2.2.
Maybe I could add that GAMMA configuration value, then user can set gamma they want and use REMOVE_GAMMA=true to get inverse of it when needed.

Then I'd suggest to go with it. I also just found that Puppeteer and Playwright all use sRGB color space and I couldn't find an option to change this. sRGB has 2.2 default gamma, which seems to be the default for web stuff. As this project will keep taking screenshots from a web page, the 2.2 default gamma will stay.
Thanks again!


[MonorepoBuilder] ISS_1814 Fixing the merge command of the monorepo builder tool

Previously the 'repositories' section were deleted when using the merge function
This is adding it back and fixing the test to make sure it never happen again

Thank you

Thank you tomas -
Quick question that everybody must be asking you when getting a PR merged -> when can i expect to see a new version of the repo propagated to packagist ?

On it's way...
Should be in ~10 mins


Python Interactive passes subprocess arguments to node instead of the provided executable

Environment data

VS Code version: 1.29.1
Extension version: 2018.10.1
OS and version: Windows 10 64 Bit
Python version: Anaconda 3, Python 3.7, 64 Bit
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
Relevant/affected Python packages and their versions: subprocess

Actual behavior
When the following code is run, which is supposed to start orca (Electron application from Plotly), the arguments are instead passed to node e.g. node --help output is printed, but only if the code is run in the Python Interactive Pane (using Run Cell). This also happens with other arguments than --help, but not with other executables, e.g. code, conda and others work as expected.
import subprocess
res = subprocess.run(
    args=[<path_to_orca_executable>, '--help'],
    stdout=subprocess.PIPE,
    stderr=subprocess.PIPE)

print(res.stdout)

The problem also happens when I connect to the Jupyter Notebook instance launched by VS Code in my Browser, but it does not happen with a jupyter notebook instance launched in the Anaconda Terminal, nor does it happend in a REPL, when launched as a file, or in a qtconsole.
Expected  behavior
Orca is run with the provided arguments.
Steps to reproduce:

Install orca conda install -c plotly plotly-orca
Execute above code inside a Python Interactive Pane in Code, using Run Cell

Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
None.
Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)
console.ts:134 [Extension Host] Python Extension: Error: ENOENT: no such file or directory, open 'C:\Users\<username>\.vscode\extensions\ms-python.python-2018.10.1\out\client\datascience\defaultTheme.json'
t.log @ console.ts:134
t._logExtensionHostMessage @ extensionHost.ts:437
(anonymous) @ extensionHost.ts:244
emitTwo @ events.js:126
emit @ events.js:214
emit @ internal/child_process.js:772
_combinedTickCallback @ internal/process/next_tick.js:141
_tickCallback @ internal/process/next_tick.js:180
console.ts:134 [Extension Host] Python Extension: [I 16:40:00.286 NotebookApp] JupyterLab extension loaded from C:\Users\<username>\Anaconda3\lib\site-packages\jupyterlab

console.ts:134 [Extension Host] Python Extension: [I 16:40:00.286 NotebookApp] JupyterLab application directory is C:\Users\<username>\Anaconda3\share\jupyter\lab

console.ts:134 [Extension Host] Python Extension: [I 16:40:00.290 NotebookApp] Serving notebooks from local directory: C:\Users\<username>\AppData\Local\Temp

console.ts:134 [Extension Host] Python Extension: [I 16:40:00.290 NotebookApp] The Jupyter Notebook is running at:
[I 16:40:00.290 NotebookApp] http://localhost:8888/?token=3d93585235d8531034b0571a9462f8dd19708771c2d1c4bd
[I 16:40:00.290 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

console.ts:134 [Extension Host] Python Extension: [C 16:40:00.299 NotebookApp]

    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://localhost:8888/?token=3d93585235d8531034b0571a9462f8dd19708771c2d1c4bd

console.ts:134 [Extension Host] Python Extension: [I 16:40:00.617 NotebookApp] Kernel started: 20c2be11-5288-4dce-806f-dd44b35f1ace

console.ts:134 [Extension Host] Starting WebSocket: ws://localhost:8888/api/kernels/20c2be11-5288-4dce-806f-dd44b35f1ace
console.ts:134 [Extension Host] Python Extension: [I 16:40:01.650 NotebookApp] Adapting to protocol v5.1 for kernel 20c2be11-5288-4dce-806f-dd44b35f1ace

console.ts:134 [Extension Host] Kernel: connected (20c2be11-5288-4dce-806f-dd44b35f1ace)
console.ts:134 [Extension Host] Python Extension: Execute for import pandas as pd
import numpy
%matplotlib inline
import matplotlib.pyplot as plt silently finished.
console.ts:134 [Extension Host] Python Extension: Execute for %cd "c:\Users\nille\Documents\Python Scripts\Pyplot" silently finished.
console.ts:134 [Extension Host] Python Extension: [I 16:40:53.197 NotebookApp] 302 GET /?token=3d93585235d8531034b0571a9462f8dd19708771c2d1c4bd (::1) 0.00ms

console.ts:134 [Extension Host] Python Extension: [I 16:41:10.171 NotebookApp] Creating new notebook in

console.ts:134 [Extension Host] Python Extension: [I 16:41:11.718 NotebookApp] Kernel started: d3a5e5ef-ed29-4f99-9426-b157731b8fdd

console.ts:134 [Extension Host] Python Extension: [I 16:41:12.537 NotebookApp] Adapting to protocol v5.1 for kernel d3a5e5ef-ed29-4f99-9426-b157731b8fdd

I have also posted an issue at orca's GitHub because I am unsure what is at fault here:  https://github.com/plotly/orca/issues/149

This sounds like potentially like another conda activation issue.
Does this work correctly if you install jupyter in a non conda environment?

I am going to try it later when I get home and update my comment. However, I made sure to run VS Code from a command prompt with activated environment. Without that Jupyter won't even start, but that's a known issue.

It looks like the issue here is the ELECTRON_RUN_AS_NODE environment variable that is set by VSCode (See https://github.com/plotly/orca/issues/149 for more info).  Do you know why this variable is set, and whether it would cause VSCode any problem if plotly.py clears it from os.environ?

Seems like plotly should handle this. They're the ones with the incorrect behavior.

@rchiodo, shouldn't we at a minimum clear this Bastille now that we know the cause, when spinning up the jupter process, this way we get things working for users using plotly,
Else people using this extension have no choice but to do this out side of VSCode!! I.e. move out of the extension!

And what if something else needs this environment variable to know they were launched from electron?

I don't like guessing what other packages might or might not do.

I agree with @rchiodo - side effects should be kept minimal. This issue is now documented here, and a workaround does exist by clearing it yourself. Python packages that rely on launching external processes might want to handle this themselves if the application they want to launch does not work with that environment variable.
This extension is not at fault here. I assume VScode itself has a reason for setting this environment variable.
@DonJayamanne you could open an issue at VScode to discuss this further.


UI: Add toggleable markers for past BIPs to all graphs

Describe the feature you would like
Example marker for Replant attached. Replicate this with annotations for each BIP. (Maybe the text only shows on hover?)

Very relevant for past 2 bips :)


Migrate task id parsing to Fastparse.

Summary:
This makes it easier to maintain and modify the task ids.

Won't do


No code found in this project.

Not a single line of code is found in this project.

The readme says:

Sources will be available when Vulkan is released to the public. Current ETA is early 2016.

As shurcooL noted, sources for the examples will be available when the Vulkan SDK goes live. See the Vulkan Working Group update for more infos on this : https://www.khronos.org/vulkan.


Add a new ui attribute to curve the top of the block. suggested name: app:domeEnabled

Added domeDrawEnabled attribute in PR #11


Use allowMultiple in prompt

As suggested by @miketaylr in #91
I couldn't determine the best Bikeshed syntax for this; I don't think the argument is defined in a way that gets exported? Anyway, suggestions welcome.

Preview | Diff

@miketaylr - can you review?

Oops, uploaded the wrong version...


Add Local variable

Add a local variable in the main page to know whether the user is new or not. If he is new to page, show welcome note, else hide.

I can handle this

I can handle this

Ok buddy...


[db] Support InsertOrUpdate with aliases

[db] Support InsertOrUpdate feature

Hi, thanks for the issue. Can you please elaborate on what the feature should be? Current insert functionality is actually "insert or update" since there cannot be duplicate keys. I could see a use case for just "update", i.e. fail the query if the key does not exist.

I intend to perform a full data synchronization from the client to the database, without the client having knowledge of whether each node or the corresponding alias already exists. My current data model strategy involves using the uid field of the node data for alias naming. Nodes are created with the alias method. However, the current implementation of agdb requires that the existence of an alias be verified first; if the alias exists, it results in an immediate error.
QueryBuilder.insert().nodes().aliases(["users"]).query()

I understand now. That is definitely doable and I think inserts with existing aliases should not fail in order to uphold the insertOrUpdate.
A suggestion what to use instead until this is implemented you could also use an index but I suspect you are doing something similar already using an alias. The one reason I would reommend index is that it is not limited to just one "string" value per node:
let mut db = Db::new();
db.exec_mut(&QueryBuilder::insert().index("id").query());
let uid = Uuid::new_v4().to_string();
db.exec_mut(&QueryBuilder::insert().nodes().values(vec![vec![("uid", &uid).into()]]).query());
//...
db.transaction_mut(|t| {
db.transaction_mut(|t| {
    let node = t.exec(&QueryBuilder::search().index("uid").value(&uid).query())?;
    if node.result == 0 {
        t.exec_mut(&QueryBuilder::insert().nodes().values(vec![vec![]]).query())
    } else {
        t.exec_mut(
            &QueryBuilder::insert()
                .values(vec![vec![]])
                .ids(node)
                .query(),
        )
    }
});

Anyway, I will update the insert with aliases so it does not fail on existing ones.

The backend I'm using directly is agdb_server, and the client is a web application in JavaScript. If the client has 10,000 nodes, and each node requires a check for existence before insertion, this would result in 20,000 interactions between the client and the server, which is too resource-intensive. The current agdb_server does not support the construction of such queries by the client's QueryBuilder, which would allow for only one interaction between the client and the server to provide this capability.

When inserting edges, there is a similar issue. For example, if there is an edge of type 'out'  between two nodes, when I attempt to insert another edge of type 'out', it will no longer create a new edge but will simply update the 'values' instead."
when attempting to insert an edge of the same type between two nodes that already have such an edge, the system will not create a duplicate edge but will update the existing edge's values.

Yes with the server one cannot batch the "if". I might implement more general insertOrUpdate accounting for topology as well including edges. Thanks again for bringing this up, good use case. :-)

I think I have a solution that is robust enough to support any use case in the "insertOrUpdate" area. Motivational example how it would look like:
QueryBuilder()
    .insert()
    .edges()
    .ids(QueryBuilder()
        .search()
        .from(1)
        .where_()
        .key("key".into())
        .query())
    .from(1)
    .to(2)
    .values(vec![vec![("key", 1).into()]])
    .query()

Basically adding ids() to all insert queries and not just insert().values() because it can take a search query. If the set in the ids would be empty the insert would happen. If it yielded a result (was not empty) it would update. It covers more cases than if it was based solely on inputs to the insert so should be more flexible - imagine your case where you want to update nodes when they contain some UID but not necessarily all the other values you could be inserting.
I will separately update the insert nodes if the alias exists so that does not to fail because that should not be failing regardless I think. The above however will not support aliases as they are not searchable, they are more topology anchors akin to table names in RDBMS/SQL. Still I find it neat you figured you could use them to simulate "insertOrUpdate"!

I believe this is a great solution.


Update README.md

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.3%) to 77.772%

Totals

Change from base Build<PHONE_NUMBER>:
-0.3%

Covered Lines:
1935

Relevant Lines:
2422

💛  - Coveralls

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 78.111%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
1935

Relevant Lines:
2422

💛  - Coveralls


We don't test in random namespaces anymore in CI

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug

/kind enhancement

What happened:
Our test.sh script should run the tests in random namespaces on CI. In fact, the env variable which it used to check if it runs on CI was not present anymore when we switched to STDCI.
What you expected to happen:
We should fix it.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:

KubeVirt version (use virtctl version):
Kubernetes version (use kubectl version):
VM or VMI specifications:
Cloud provider or hardware configuration:
OS (e.g. from /etc/os-release):
Kernel (e.g. uname -a):
Install tools:
Others:

/remove-lifecycle stale

/remove-lifecycle rotten


How can I destroy models without destroying their ActiveStorage associations?

Hello everyone!
Is there a way to .destroy or .destroy_all record(s) without delete the ActiveStorage association?
Example: product = Product.last with 2 images attached
product.destroy
product.deleted_at -> Time.current
It would be great for this behavior to work
product.destroy(keep_storage: true)
product.images.count -> 2
Current behavior: product.images.count -> 0
Expected behavior: product.images.count -> 2

Hi @pierry01 I edit your title a bit because it seemed to be saying the opposite of the body of your issue. Let me know if I misunderstood somehow.

@mvz sorry for the delay. The title is correct now, thanks!!!
You understood the problem.
Does it make sense to implement a solution for this?

@pierry01 I think the associations should always be kept until the model is fully destroyed. See also the discussion in #103.

Is there any solution for keeping ActiveStorage attachments?


ubpf needs to support maps

Adding support for maps to ubpf.
As near as I can tell from examining dumps of ELF eBPF programs it looks like:

All maps are in a section labelled ".maps"
Maps layout is sequentially.
Symbol table entries contain segment index, offset and size for maps.

Proposed behavior is then:

Look for a section name ".maps" that should be marked as "PROGBITS" and have the "write" and "allocate" flags set.
When processing section name "XYZ", find the corresponding relocation section named ".relXYZ" and process it's relocations.
For each relocation, check if it refers to an entry in the .maps section and apply the relocation to point to that location.

Maps appear to have relocation type R_BPF_64_64 / 1

I think this would be great to have! Having these maps also implies that we'll want to have helpers for each map, so I guess we'll need to provide a "kernel-compatible" ext_func set.

I think it might make more sense to provide a function like:
/*
 * Register a map.
 *
 *  Set the address of the map in the lddw instruction based on the name resolved from the
 *  symbol section of the ELF file.
 *
 * 'name' should be a string with a lifetime longer than the VM.
 *
 * Returns 0 on success, -1 on error.
 */
int ubpf_register_map(struct ubpf_vm *vm, const char *name, void *map);

This would do the following:

During loading of the ELF, process the relocations.
If the relocation points to the .maps section.
Look up symbol for the relocation.
Look up symbol -> map in internal table.
Set map address in lddw instruction.

x64 instruction then is just a load of the immediate value. Any helpers that use maps then get passed the address of the map (this is similar to what Linux jitter does, AFAIK)

What about hash maps (and other non-contiguous data structures)? We'd still need special helpers to process them. Also, contiguous array access is usually done first via helper (to get the address of the element passed), so to support programs generated by tools focused on the Linux kernel's implementation, we'd need these helpers available.

See BPF syscall, maps, verifier, samples, llvm
I am proposing we adopt something similar to the process that Alexi describes in the email thread, but with ubpf_load_elf replacing the instruction with a lddw with the address directly.
In the design listed, bpf_lookup_elem kernel helper function accepts the address of the map, not a FD. So we need the jitter to emit code with the address.

After researching this, eBPF it appears as if the Linux kernel implements this via a BPF_LD_MAP_FD pseudo instruction, where the jitter replaces imm value with the address of the map.

Just a comment
I think if we support maps in ubpf, it's worth to think about the concurrency. Of course, it depends on the execution environment, but I guess it would be more generic if it support multi threading environment.
In Linux-kernel implementation, there are various form of concurrency for maps. For example, array map basically doesn't perform any locking during lookup/update for performance. On the other hand, hash map takes lock when update/delete.
And the most notable stuff is the eBPF program in kernel is basically running under RCU (e.g. https://elixir.bootlin.com/linux/latest/source/drivers/net/veth.c#L580). This strong assumption makes possible to do the operation like below.
elem = bpf_map_lookup_elem(&map, &key);
...
// in-place update
elem->foo = 0xdeadbeef;

It is possible that another thread deletes the map element between lookup and in-place update, but thanks to the RCU, the memory for the element will never released before this program finish running. So nothing will be broken.
There is a project which implements RCU-like feature in user space (https://liburcu.org). However, this is LGPL so, not compatible with ubpf. Concurrency-kit is a good candidate I think, it's 2-clause-BSD (http://concurrencykit.org). "epoch" feature of it can be used like RCU. For implementation notice both of them requires to register some context per thread, means maybe we need to enforce users to register it or intercept pthread_create or something...
Actually, I tried to do the same thing for generic-ebpf project (https://github.com/generic-ebpf/generic-ebpf). This was the pitfall I've met. I'm not actively working for that for now. But I hope we may see the eBPF implementation other than Linux's one.
Good luck :)

Just a comment
I think if we support maps in ubpf, it's worth to think about the concurrency. Of course, it depends on the execution environment, but I guess it would be more generic if it support multi threading environment.
In Linux-kernel implementation, there are various form of concurrency for maps. For example, array map basically doesn't perform any locking during lookup/update for performance. On the other hand, hash map takes lock when update/delete.
And the most notable stuff is the eBPF program in kernel is basically running under RCU (e.g. https://elixir.bootlin.com/linux/latest/source/drivers/net/veth.c#L580). This strong assumption makes possible to do the operation like below.
elem = bpf_map_lookup_elem(&map, &key);
...
// in-place update
elem->foo = 0xdeadbeef;

It is possible that another thread deletes the map element between lookup and in-place update, but thanks to the RCU, the memory for the element will never released before this program finish running. So nothing will be broken.
There is a project which implements RCU-like feature in user space (https://liburcu.org). However, this is LGPL so, not compatible with ubpf. Concurrency-kit is a good candidate I think, it's 2-clause-BSD (http://concurrencykit.org). "epoch" feature of it can be used like RCU. For implementation notice both of them requires to register some context per thread, means maybe we need to enforce users to register it or intercept pthread_create or something...
Actually, I tried to do the same thing for generic-ebpf project (https://github.com/generic-ebpf/generic-ebpf). This was the pitfall I've met. I'm not actively working for that for now. But I hope we may see the eBPF implementation other than Linux's one.
Good luck :)

I think it make sense to decouple the maps part from the jitter part of ubpf.
Taking a look at the docs here eBPF maps it seems like it would make sense to implement this as follows:

Consumer of ubpf provides a map_create callback passing (context, map_definition).
Parse the .maps section in the ELF, invoking the map_create callback for each map, storing symbol->map_fd
During the relocation, when we hit a map relocation, modify byte code setting the lddw map pseudo instruction and setting the fd in the instruction.

The consumer of the ubpf can then provide their own map implementation as they see fit via the map_create callback and the bpf_map_* helper functions.

I think it make sense to decouple the maps part from the jitter part of ubpf.
Taking a look at the docs here eBPF maps it seems like it would make sense to implement this as follows:

Consumer of ubpf provides a map_create callback passing (context, map_definition).
Parse the .maps section in the ELF, invoking the map_create callback for each map, storing symbol->map_fd
During the relocation, when we hit a map relocation, modify byte code setting the lddw map pseudo instruction and setting the fd in the instruction.

The consumer of the ubpf can then provide their own map implementation as they see fit via the map_create callback and the bpf_map_* helper functions.

Going to build this on top of this PR as I need the code to lookup sections by name.

Going to build this on top of this PR as I need the code to lookup sections by name.


pre-commit

added .pre-commit-hooks.yaml.
tldr usage:
set up the git hook scripts: pre-commit install, and this will run when git commit.
extra:
can use
pre-commit run <hook> --files <file> to run just this hook on just this file.
pre-commit run -a (short for --all-files).
pre-commit autoupdate to update all rev's in the yaml
other:
I didn't add these 2 hooks (below) because they caused some trouble... :)
(a quick search will find that other people also have problems with mypy in pre-commit)
-   repo: https://github.com/PyCQA/pylint
    rev: v2.13.7
    hooks:
    -   id: pylint

-   repo: https://github.com/pre-commit/mirrors-mypy
    rev: v0.950
    hooks:
    -   id: mypy

(closes #252)

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

I think there's been a misunderstanding -- I thought the point of #252 was to make pre-commit support pip-audit, and not the other way around. Did I understand that right @chrisdlangton?

You're probably right. I added config instead of hooks. misread

Indeed, have pip-audit be included into the pre-commit list of supported hooks
So that a pre-commit user (repo) can target pip-audit repo url directly as a task in their own hooks config on their own projects
Currently user's of pre-commit have to have pip-audit run in local/global mode as pip-audit repo is not yet ready to be referenced by repo url

Closing for now, then. @tal66 feel free to open a separate PR for https://github.com/trailofbits/pip-audit/pull/254#issuecomment-1112774708, if you'd like!


Create manifests dir before trying to use it

I had this issue in my dev-setup.

:+1:

@vuntz I changed the implementation now completely.

:+1:

+1

+1


Error Run ios when adding firebase auth and firebase core

I have the following issue after I have added these two packages in my flutter app:

firebase_auth: ^1.0.1
firebase_core: ^1.0.2

Launching lib/main.dart on iPhone 11 in debug mode...
Running pod install...                                           1,302ms
CocoaPods' output:
↳
      Preparing

    Analyzing dependencies

    Inspecting targets to integrate
      Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)

    Finding Podfile changes
      A firebase_auth
      A firebase_core
      A google_sign_in
      - Flutter
      - connectivity_plus
      - path_provider

    Fetching external sources
    -> Fetching podspec for `Flutter` from `Flutter`
    -> Fetching podspec for `connectivity_plus` from `.symlinks/plugins/connectivity_plus/ios`
    -> Fetching podspec for `firebase_auth` from `.symlinks/plugins/firebase_auth/ios`
    firebase_auth: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
    -> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
    firebase_core: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
    -> Fetching podspec for `google_sign_in` from `.symlinks/plugins/google_sign_in/ios`
    -> Fetching podspec for `path_provider` from `.symlinks/plugins/path_provider/ios`

    Resolving dependencies of `Podfile`
      CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_c_7_9.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/c/7/9/Reachability/3.2/Reachability.podspec.json exists! Returning local because checking is only perfomed in repo
      update
    [!] CocoaPods could not find compatible versions for pod "firebase_auth":
      In Podfile:
        firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)

    Specs satisfying the `firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)` dependency were found, but they required a higher minimum deployment
    target.

    /Users/coumar/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:in `raise_error_unless_state'
    /Users/coumar/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in `block in unwind_for_conflict'
    /Users/coumar/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `tap'
    /Users/coumar/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `unwind_for_conflict'
    /Users/coumar/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
    /Users/coumar/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:254:in `process_topmost_state'
    /Users/coumar/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
    /Users/coumar/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
    /Users/coumar/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/resolver.rb:94:in `resolve'
    /Users/coumar/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1074:in `block in
    resolve_dependencies'
    /Users/coumar/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
    /Users/coumar/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1072:in `resolve_dependencies'
    /Users/coumar/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
    /Users/coumar/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:414:in `analyze'
    /Users/coumar/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies'
    /Users/coumar/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
    /Users/coumar/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:238:in `resolve_dependencies'
    /Users/coumar/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:160:in `install!'
    /Users/coumar/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command/install.rb:52:in `run'
    /Users/coumar/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
    /Users/coumar/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
    /Users/coumar/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
    /Users/coumar/.rvm/rubies/ruby-2.6.0/bin/pod:23:in `load'
    /Users/coumar/.rvm/rubies/ruby-2.6.0/bin/pod:23:in `<main>'

Error running pod install
Error launching application on iPhone 11.

@coumarane
The error itself shows the cause ie:
`CocoaPods could not find compatible versions for pod "firebase_auth":
      In Podfile:
        firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)`

    Specs satisfying the `firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)` dependency were found, but they required a higher minimum deployment
    target.`

You need to bump version to support minimum required target as mentioned here: https://firebase.flutter.dev/docs/installation/ios/#ios-supported-versions
See this similar issue for solutions.
Closing from here.


Add Project.toml

This package constrains Compat.jl to version 2, blocking the installation of version 3. I think is assumed from the REQUIRE file, the limit in the registry is here: https://github.com/JuliaRegistries/General/blob/master/B/BufferedStreams/Compat.toml
See https://github.com/JuliaRegistries/General/pull/8297 for discussion of other packages with similar issues.
This PR adds the simplest possible Project.toml file, with looser bounds. Perhaps it should also remove the REQUIRE file.
I can't seem to get tests to run locally, but we'll see what travis thinks?

would be nice to have this merged and tagged as it's causing install conflicts.

The registry PR https://github.com/JuliaRegistries/General/pull/11257 ought to have solved the problem of install conflicts.


⚠ Roblox Devforum has degraded performance

In 58118f8, Roblox Devforum (https://devforum.roblox.com) experienced degraded performance:

HTTP code: 200
Response time: 12466 ms

Resolved: Roblox Devforum performance has improved in 454fd6f.


WIP: only run selinux on centos

Needs to be extended for other selinux distributions at some point

Done now.
I've also changed the default to "pooled" in this PR (not nice, sorry)


feat: Adding trace context in sql query as the comments

When executing sql through ORM (e.g. active_record and sequel), I'd like to inject some comments (e.g. trace context) into sql query before hitting the sql database server.
The most important comment is the traceparent that is consisted of trace context information (i.e. 00-%<trace_id>s-%<span_id>s-%<trace_flags>.2d), which is for trace correlation.
# uninjected query
SELECT "posts".* FROM "posts"

# injected query
SELECT "posts".* FROM "posts" /*action='index',application='SqlcommenterRailsDemo',controller='posts',db_driver='ActiveRecord::ConnectionAdapters::SQLite3Adapter',framework='rails_v6.0.0.rc1',route='/posts',traceparent='00-828f28f7fb3df3dd07ee6478b2016b2a-a52cad0a8d1425ab-01'*/

# example from https://github.com/open-telemetry/opentelemetry-sqlcommenter/tree/main/ruby/sqlcommenter-ruby/sqlcommenter_rails_demo#get-posts

Marginalia and sqlcommenter should handle the case if both marginalia and sqlcommenter is required from end user.
Will opentelemetry-ruby integrate the marginalia and sqlcommenter into the codebase in the future so that end user doesn't need to require in their side (as automatic as possible)?
I created the pr for opentelemtery integration with marginalia here (i.e. extension of marginalia).

Thanks for taking the time to create the PR.
I've never incorporated the SQL commenter into Ruby SQL instrumentations because I wasn't aware of its existence. We aren't maintainers of that repo and I believe this is the first request to include it as part of contrib.
We'd need time to review and understand the commenter repo to see how to best leverage or participate in discussions there. I find it unusual that there is a cross language repo with all implementations in a single repo since most language specific implementations are in their own repositories.
I'll add it to our agenda for our upcoming SIG

I find it unusual that there is a cross language repo with all implementations in a single repo since most language specific implementations are in their own repositories.

I agree, btw, As of Rails 7, Marginalia is a part of Rails itself and does not need to be separately included. (from marginalia).


Question: is the exists Store method used?

In building a custom store, I got curious about how the exists method was used, but couldn't find any code in the package actually calling it.  Is it used?

Yes, you are right. This method is not used and should be removed.

Removed.


A typo in the date_format of the ScreenLogger class needs to be fixed.

This is my first time writing an Issue, so there may be some poor parts.
System information

Have I written custom code (as opposed to using example directory):I used custom code where the ohlcv is generated.
OS Platform and Distribution (e.g. Mac Sierra, Windows 10, Linux Ubuntu 16.04): Windows10
TensorTrade version: latest
TensorFlow version: Not relevant to the issue.
Python version: 3.8.10

Describe the current behavior
The problem occurred when I was working on the Renderers and Plotly Chart in Example.
When I ran agent.train, I got an Invalid format string error at the ScreenLogger Class, as shown below.
This error was caused by incorrect formatting, so I fixed it and the error went away.

File \tensortrade\env\default\renderers.py:218, in ScreenLogger.render_env(self, episode, max_episodes, step, max_steps, price_history, net_worth, performance, trades)
    209 def render_env(self,
    210                episode: int = None,
    211                max_episodes: int = None,
   (...)
    216                performance: pd.DataFrame = None,
    217                trades: 'OrderedDict' = None):
--> 218     print(self._create_log_entry(episode, max_episodes, step, max_steps, date_format=self._date_format))

File \tensortrade\env\default\renderers.py:109, in BaseRenderer._create_log_entry(episode, max_episodes, step, max_steps, date_format)
     82 @staticmethod
     83 def _create_log_entry(episode: int = None,
     84                       max_episodes: int = None,
     85                       step: int = None,
     86                       max_steps: int = None,
     87                       date_format: str = "%Y-%m-%d %H:%M:%S %p") -> str:
     88     """
     89     Creates a log entry to be used by a renderer.
     90
   (...)
    107         a log entry
    108     """
--> 109     log_entry = f"[{datetime.now().strftime(date_format)}]"
    111     if episode is not None:
    112         log_entry += f" Episode: {episode + 1}/{max_episodes if max_episodes else ''}"

ValueError: Invalid format string

Describe the expected behavior
Changed the date_format of the Init method of the ScreenLogger Class as follows.
// before change
def __init__(self, date_format: str = "%Y-%m-%d %-I:%M:%S %p"):
        super().__init__()
        self._date_format = date_format

// after change
def __init__(self, date_format: str = "%Y-%m-%d %I:%M:%S %p"):
        super().__init__()
        self._date_format = date_format

Code to reproduce the issue
I used the data generated by the following for df.
# ccxtを使って、取引所からデータを取得
import pandas as pd
import ccxt
import datetime
import os
import pickle

def data_to_df(data):
    # CCXTから取得したデータをDataFrameに変換
    df = pd.DataFrame(
        data, columns=["date", "open", "high", "low", "close", "volume"]
    )
    df["date"] = pd.to_datetime(df["date"] / 1000, unit="s")
    df.set_index("date", inplace=True)
    return df

def get_data(ticker, start_date, timeframe="5m"):
    # 取引所のリミットレート(アクセス制限)を超えないように設定
    exchange = ccxt.bybit({"enableRateLimit": True})
    df = data_to_df(
        exchange.fetch_ohlcv(
            ticker,
            timeframe=timeframe,
            since=start_date,
            params={"reverse": False})
    )
    return df

def save_ohlcv(exchange, symbol, start_date, timeframe="5m"):
    # ファイルがない場合に作成する
    if not os.path.exists(f'./{exchange}_{symbol}_{timeframe}.pkl'):
        df = get_data(symbol, start_date, timeframe)
        df.to_pickle(f'./{exchange}_{symbol}_{timeframe}.pkl')

    # ファイルの最後が最近だったら取得しない。
    with open(f'./{exchange}_{symbol}_{timeframe}.pkl', 'rb') as f:
        df = pd.read_pickle(f'./{exchange}_{symbol}_{timeframe}.pkl')
        last_raw_date = pickle.load(f)[-1:].index[0]
        if last_raw_date > datetime.datetime.now() - datetime.timedelta(days=5):
            return

    # 最近までを取得して、保存する。
    while True:
        last_raw_date = df[-1:].index[0]
        if last_raw_date > datetime.datetime.now() - datetime.timedelta(days=5):
            break
        df = pd.concat([df, get_data(symbol, last_raw_date.timestamp() * 1000, timeframe)]).drop_duplicates()
    with open(f'./{exchange}_{symbol}_{timeframe}.pkl', 'wb') as f:
        pickle.dump(df, f)

start_date = int(datetime.datetime(2022, 1, 1, 10, 20).timestamp() * 1000)
save_ohlcv("bybit", "BTCUSDT", start_date)

df = pd.read_pickle(f'./bybit_BTCUSDT_5m.pkl')
df.reset_index(inplace=True)
df.sort_values(by='date', ascending=True, inplace=True)
df['date'] = df['date'].dt.strftime('%Y-%m-%d %I:%M %p')
df

Other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

Should be ok with those two changes, which also switch the format to 24-hour


Wrong link

On step no 1 Create Service Principal on Step using Azure Portal, I think the link is incorrect.
Why it goes to this link? I think its not related to how to Create Service Principal via Azure Portal.
https://learn.microsoft.com/en-us/azure/app-service/quickstart-php#1---get-the-sample-repository

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

ID: 2fb7b317-36a0-ddd4-0bda-9ec14a70b53f
Version Independent ID: ac5d583f-e329-c2f6-1142-7da1b026f120
Content: Guidance to move virtual machines from Automation Update Management to Azure Update Manager
Content Source: articles/update-manager/guidance-migration-automation-update-management-azure-update-manager.md
Service: azure-update-manager
GitHub Login: @SnehaSudhirG
Microsoft Alias: sudhirsneha

@shanyuen
Thanks for bringing this to our attention.
I'm going to assign this to the document author so they can take a look at it accordingly.

Thanks for your dedication to our documentation. Unfortunately, at this time we have been unable to review your issue in a timely manner and we sincerely apologize for the delayed response. The requested updates have not been made since the creation of this issue, and the timeline for resolution may vary based on resourcing, so we've created an internal work item to incorporate your suggestions. We are closing this issue for now, but feel free to comment here as necessary. #please-close


AssertionError

before filtering, there are 1244 images...
after filtering, there are 1244 images...
1244 roidb entries
./weights/vgg16/pascal_voc
Loading pretrained weights from data/pretrained_model/vgg16_caffe.pth
/home/test/Zhangjiajun/skin/faster-rcnn/faster-rcnn.pytorch/lib/model/rpn/rpn.py:68: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument.
rpn_cls_prob_reshape = F.softmax(rpn_cls_score_reshape)
/home/test/Zhangjiajun/skin/faster-rcnn/faster-rcnn.pytorch/lib/model/faster_rcnn/faster_rcnn.py:98: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument.
cls_prob = F.softmax(cls_score)
Traceback (most recent call last):
File "trainval_net.py", line 340, in
loss.backward()
File "/home/test/anaconda3/envs/gj/lib/python3.6/site-packages/torch/autograd/variable.py", line 167, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph, retain_variables)
File "/home/test/anaconda3/envs/gj/lib/python3.6/site-packages/torch/autograd/init.py", line 99, in backward
variables, grad_variables, retain_graph)
File "/home/test/Zhangjiajun/skin/faster-rcnn/faster-rcnn.pytorch/lib/model/roi_align/functions/roi_align.py", line 39, in backward
assert(self.feature_size is not None and grad_output.is_cuda)
AssertionError
When training on my data, I meet the problem. I find the grad_output.is_cuda is False, how to modify?
Thank you!

you can use python trainval_net.py --cuda.

great! closing this issue. :)

@ZhangJiajun1995 ,if I use pycharm to perform the code,what should I do?

good answer   thanks


added SAP readme

@njray,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/reference-architectures/sap/readme.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

@njray This is for reference-architecture code.

Readme will go into the reference-architectures repo


Does AOMP work with AMDGPU driver in 5+ kernel source.

KFD was rolled into the amdgpu module in recent  kernel source.
Does AOMP work with the amdgpu driver?
Is it required to install rock-dkms?

Duplicate of #232? I'm mostly using a gfx906 (radeon vii) dev machine which is on 5.10 as that's what Debian testing installed last time I updated the system.
I checked the ROCm documentations while writing this reply. A search for dkms in https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html
yields the following:

You can install ROCm user-level software without installing AMD’s custom ROCk kernel driver. The kernel used must have the HSA kernel driver option enabled and compiled into the amdgpu kernel driver. To install only ROCm user-level software, run the following commands instead of installing rocm-dkms:

The docs, read literally, say install rock-dkms. I know I am being pedantic, but this is the kind of detail that can bite.

I should have said also, thanks for the clarification.

Those docs seem to present either as an option, notably the section https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html#using-debian-based-rocm-with-upstream-kernel-drivers
AOMP doesn't follow the same installation process though - I think the detailed reference for it is https://github.com/ROCm-Developer-Tools/aomp/blob/aomp-dev/bin/README.md
And finally trunk llvm uses a different process again but the documentation for that is very sparse. I've written some notes at https://openmp.llvm.org//SupportAndFAQ.html#build-amdgpu-offload-capable-compiler but need to find time to improve on those.
There is definitely the potential for confusion when there are ~ three amdgpu offloading toolchains on github with different instructions and different behaviours.


Nuke docs

Description
Context: https://github.com/dust-tt/tasks/issues/1176
Fully moved oustide + not deployed removing code as it can easily be found in history.
Risk
N/A
Deploy Plan
N/A

PMRR


feat (dashboard): UI for postgres migration

Resolves #2748

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 85.97%. Comparing base (f88bf2d) to head (e0b706d).
Report is 1 commits behind head on main.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2796   +/-   ##
=======================================
  Coverage   85.97%   85.97%
=======================================
  Files          86       86
  Lines        9621     9621
  Branches      485      485
=======================================
  Hits         8272     8272
  Misses       1349     1349

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

A couple of bugs:

[ ] "Error: Database version upgrade not possible" warning shows when a project is updating even if I don't change the major version. It should only show when attempting to change major version
[ ] Minor goes blank when changing major version


Metrics add

Hello have you got any plans to add metrics such as consumption of gas etc.?

See comments in https://github.com/sebbegg/vicare-exporter/pull/2
In my installation the metrics already included consumption:
> curl -s http://localhost:9101 | grep consumption | grep "# TYPE"
# TYPE heating_gas_consumption_total_day_kWh gauge
# TYPE heating_gas_consumption_heating_day_kWh gauge
# TYPE heating_power_consumption_total_day_kWh gauge
# TYPE heating_gas_consumption_dhw_day_kWh gauge

I understand that's not the case for your setup?

I took the opportunity to push some local changes and added some of the properties you added in your PR:
https://github.com/sebbegg/vicare-exporter/blob/3e7014895f319dd2896817560b7ba80703d9a8c0/vicare_exporter/metrics.py#L13-L24
I would like to avoid adding the pre-aggregated weekly, monthly, etc properties.
This is all in v0.1.0 (there weren't "releases" before this 😉 )

Hello
Ive installed your script and try to use it for my Viesssmann Vidotens-100W (gas boiler)
Problem was that ive missing metrics like consumption, and i dont know why, so ive started debuging your app and make some changes which makes those records available for me.
The consumption metrics is probably best thing which viessmann implements to their boilers.
I am trying to count how much gas i consume in corelation with outside temperature and data from netatmo installation.
Also i am checking modulation of flame in my boiler and trying to implement this value in relation to heating time showed in netatmo.
So if nowdays works at least gas consumption metrics for a day its enough :)
You did a great job btw!


gofump dont touch vendor or code generated files

make format did touch code generated files witch creates a mess from time to time ...
this change it ...

It's not well documented ... so I did open an upstream issue here first: https://github.com/mvdan/gofumpt/issues/265


Removing the mentioning of git-revision

We no longer use this param.
Signed-off-by: Alexander Chuzhoy<EMAIL_ADDRESS>Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please select the appropriate options:

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
[ ] This change is a documentation update

Testing
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

[ ] Test A
[ ] Test B

Test Configuration:

Versions:
Hardware:

Checklist

[ ] I have performed a self-review of my own code
[ ] If a change is adding a feature, it should require a change to the README.md and the review should catch this.
[ ] If the change is a fix, it should have an issue. The review should make sure the comments state the issue (not just the number) and it should use the keywords that will close the issue on merge.
[ ] A change should not be merged unless it passes CI or there is a comment/update saying what testing was passed.
[ ] PRs should not be merged unless positively reviewed.

Let's merge?

/lgtm

:tada: This PR is included in version 1.1.12 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Add method that counts matching objects in fetch request

It's probably a good idea to have a method that counts the matching objects of a fetchRequest.
In theory you could use the fetch method that returns a NSArray and count yourself, but countForFetchRequest:error: will be much faster.
Access to the substituted fetchRequest would be beneficial as well, especially if you create a NSFetchedResultsController or if you want to access the predicates defined in the model editor.

We are declaring pull request and issue 0 now that 1.3 is out. If this is still an issue you'd like to see address with 1.30 and going forward, please open a new issue so we can start a fresh discussion. Thank you!


runPluginVerifier task hardcoded repositories

runPluginVerifier has hardcoded repository urls:

verifier latest version is obtained from https://cache-redirector.jetbrains.com/packages.jetbrains.team/maven/p/intellij-plugin-verifier/intellij-plugin-verifier/org/jetbrains/intellij/plugins/verifier-cli/maven-metadata.xml
verifier-cli downloaded from https://cache-redirector.jetbrains.com/packages.jetbrains.team/maven/p/intellij-plugin-verifier/intellij-plugin-verifier
Could we make these non hardcoded? Whole build can use private nexus repository (using proxy/group repositories via configured repositories, intellijRepository, jreRepository, pluginsRepositories. But verifier still goes directly somewhere else.

Can verifier use repositories defined in build.gradle.kts?

Thanks for the suggestion, Viliam!
It's implemented and will be released with 1.4.0.


Modify data services examples doc

Purpose
Modify data services examples doc

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Chanika Geeganage seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


[TF-TRT] CombinedNms Deactivated due to bug

@bixia1 @tfeher
This PR temporarily deactivate the Combined NMS convertor, it seems to have issues in numerous versions of TRT.
For safety, I deactivate it. Let's reactivate it when stable.
FYI this bug was found on: TRT_VERSION: <IP_ADDRESS>
[ RUN      ] OpConvTestInstantiation/OpConverter_FP32_Test.ConvertCombinedNMS/0
2021-05-05 22:34:41.995244: I tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:1798] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2021-05-05 22:34:41.995253: I tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:1799] tf_type_: DT_FLOAT
2021-05-05 22:34:41.995256: I tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:1800] trt_mode_: kImplicitBatch
2021-05-05 22:34:41.995260: I tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:1801] converter_precision_: TrtPrecisionMode::FP32
2021-05-05 22:34:41.995263: I tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:1802] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:1933: Failure
Value of: GetDataAsFloat(output_data[i])
Expected: has 2 elements where
element #0 is equal to 0.7,
element #1 is equal to 0.4
  Actual: { 0.700195, 0.399902 }, whose element #0 doesn't match
Google Test trace:
tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:3670: Test 1: Original test
tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:1933: Failure
Value of: GetDataAsFloat(output_data[i])
Expected: has 4 elements where
element #0 is equal to 5,
element #1 is equal to 3,
element #2 is equal to 1,
element #3 is equal to 0
  Actual: { 1.99902, 1.99902, 1, 0 }, whose element #0 doesn't match
Google Test trace:
tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:3670: Test 2: clip_boxes
tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:1933: Failure
Value of: GetDataAsFloat(output_data[i])
Expected: has 4 elements where
element #0 is equal to 5,
element #1 is equal to 3,
element #2 is equal to 0,
element #3 is equal to 0
  Actual: { 1.99902, 1.99902, 0, 0 }, whose element #0 doesn't match
Google Test trace:
tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:3670: Test 3: score threshold
tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:1933: Failure
Value of: GetDataAsFloat(output_data[i])
Expected: has 4 elements where
element #0 is equal to 5,
element #1 is equal to 3,
element #2 is equal to 1,
element #3 is equal to 0
  Actual: { 1.99902, 1.99902, 1, 0 }, whose element #0 doesn't match
Google Test trace:
tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:3670: Test 4: max coord first
[  FAILED  ] OpConvTestInstantiation/OpConverter_FP32_Test.ConvertCombinedNMS/0, where GetParam() = (4-byte object <00-00 00-00>, 1, 4-byte object <00-00 00-00>) (49 ms)
[ RUN      ] OpConvTestInstantiation/OpConverter_FP32_Test.ConvertCombinedNMS/1
2021-05-05 22:34:42.044405: I tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:1798] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2021-05-05 22:34:42.044415: I tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:1799] tf_type_: DT_FLOAT
2021-05-05 22:34:42.044418: I tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:1800] trt_mode_: kExplicitBatch
2021-05-05 22:34:42.044421: I tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:1801] converter_precision_: TrtPrecisionMode::FP32
2021-05-05 22:34:42.044424: I tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:1802] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:1933: Failure
Value of: GetDataAsFloat(output_data[i])
Expected: has 2 elements where
element #0 is equal to 0.7,
element #1 is equal to 0.4
  Actual: { 0.700195, 0.399902 }, whose element #0 doesn't match
Google Test trace:
tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:3670: Test 1: Original test
tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:1933: Failure
Value of: GetDataAsFloat(output_data[i])
Expected: has 4 elements where
element #0 is equal to 5,
element #1 is equal to 3,
element #2 is equal to 1,
element #3 is equal to 0
  Actual: { 1.99902, 1.99902, 1, 0 }, whose element #0 doesn't match
Google Test trace:
tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:3670: Test 2: clip_boxes
tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:1933: Failure
Value of: GetDataAsFloat(output_data[i])
Expected: has 4 elements where
element #0 is equal to 5,
element #1 is equal to 3,
element #2 is equal to 0,
element #3 is equal to 0
  Actual: { 1.99902, 1.99902, 0, 0 }, whose element #0 doesn't match
Google Test trace:
tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:3670: Test 3: score threshold
tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:1933: Failure
Value of: GetDataAsFloat(output_data[i])
Expected: has 4 elements where
element #0 is equal to 5,
element #1 is equal to 3,
element #2 is equal to 1,
element #3 is equal to 0
  Actual: { 1.99902, 1.99902, 1, 0 }, whose element #0 doesn't match
Google Test trace:
tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:3670: Test 4: max coord first
[  FAILED  ] OpConvTestInstantiation/OpConverter_FP32_Test.ConvertCombinedNMS/1, where GetParam() = (4-byte object <01-00 00-00>, 1, 4-byte object <00-00 00-00>) (49 ms)
[ RUN      ] OpConvTestInstantiation/OpConverter_FP32_Test.ConvertCombinedNMS/2
2021-05-05 22:34:42.093225: I tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:1798] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2021-05-05 22:34:42.093234: I tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:1799] tf_type_: DT_FLOAT
2021-05-05 22:34:42.093237: I tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:1800] trt_mode_: kDynamicShape
2021-05-05 22:34:42.093241: I tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:1801] converter_precision_: TrtPrecisionMode::FP32
2021-05-05 22:34:42.093251: I tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc:1802] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[       OK ] OpConvTestInstantiation/OpConverter_FP32_Test.ConvertCombinedNMS/2 (7 ms)
[  FAILED  ] 2 tests, listed below:
[  FAILED  ] OpConvTestInstantiation/OpConverter_FP32_Test.ConvertCombinedNMS/0, where GetParam() = (4-byte object <00-00 00-00>, 1, 4-byte object <00-00 00-00>)
[  FAILED  ] OpConvTestInstantiation/OpConverter_FP32_Test.ConvertCombinedNMS/1, where GetParam() = (4-byte object <01-00 00-00>, 1, 4-byte object <00-00 00-00>)

We just get combinedNMS back to work not long ago, see https://github.com/tensorflow/tensorflow/pull/47698.
CombinedNMS affect a few important customers for some reason. So, it would be much nice if we can find out the problem and fix the problem. In particular, which TensorRT versions have such a problem?

@DEKHTIARJonathan  Any update on this PR? Please. Thanks!

Closing in favor of #50450


XiaoMi input “（”，the selection jump to begin in Flutter Application

Steps to Reproduce

create a flutter application with TextField
input something, then input "(".
the selection jump to begin.

**Devices:XiaoMi
Logs

It`s not wrong, but looks terrible !

Hi @YunusZhao
Can you please describe the issue in detail
also please provide your flutter doctor -v
and your flutter run --verbose?
To better address the issue, would be helpful
if you could post  a minimal code sample
or the steps to reproduce the problem.
Thank you

OK @iapicca
it`s not a wrong, the application can normally run .
it‘s a bug at TextField with XiaoMi's MIUI system.
you can write a simple app, just has a TextFiled .
run it on a XiaoMi, input "(",.

Hi @YunusZhao
does this code represent the issue you are describing?
I'm not experiencing said issue on a "stock android" device,
please consider that this issue might be related
to the virtual keyboard in use on your device,
are you experiencing this issue with different keyboards?
thank you

Yes @iapicca thank you first。
in other android device， it's right.
but when the code run on XiaoMi(a Chinese mobile phone brands, lots people use it), it's wrong!
Example:
I input "abc",in TextFile, it's "abc|". ("|" symbol selection)
Then, I input "(", in other device, it's "abc(|)",
but in XiaoMi , it's "|abc()", the selection jump to the begin.
I think it's a bug.

Hi again @YunusZhao
are you experiencing this behavior with different virtual keyboards?
thank you

Hi @YunusZhao,
Since we don't have Xiaomi device to replicate this issue, could you confirm if you still see the issue on that device using latest Flutter version ?
If so, can you provide the latest flutter doctor -v, along with screenshot of the issue ?
Thanks.

Without additional information, we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.


RGB colors in derived-variables.sass are invalid caused by missing bulmaToRGB function

This is about Bulma.
It's a bug in the library.
Overview of the problem

This is about the Bulma CSS framework

This is a Sass issue: I'm using version 1.47.0
I am sure this issue is not a duplicate?
Description

All variables in bulma/sass/utilites/derived-variables.sass that use bulmaToRGB are not set correctly because the bulmaToRGB function is missing (not imported) from the bulma/shared/functions.sass file.
The bulmaToRGB is only defined in the bulma/sass/utilites/functions.sass.
Possible solution would be to import shared/functions.sass into utilities/functions.sass or just to duplicate the bulmaToRGB function from bulma/shared/functions.sass into utilities/functions.sass.
Steps to Reproduce
As you can see in this jsbin, the bulma delete button is invisible because its background-color is missing caused by missing bulmaToRGB sass function.
https://jsbin.com/lekikor/1/edit?html,output
Expected behavior
The RGB colors in derived-variables.sass should be transformed to their actual values.
Actual behavior
The RGB colors in derived-variables.sass have invalid values like background-color: rgba(var(--scheme-invert-rgb, bulmaToRGB(#0a0a0a)), 0.2);

@Way thank you so much for you find.


[CELEBORN-739] Rename HeartbeatResponse to HeartbeatFromWorkerResponse

What changes were proposed in this pull request?
Rename HeartbeatResponse to HeartbeatFromWorkerResponse
Why are the changes needed?
Does this PR introduce any user-facing change?
How was this patch tested?

ping @waitinfuture @pan3793 @FMX

I'm afraid change message name will cause compatibility issue. cc @pan3793

I'm afraid change message name will cause compatibility issue. cc @pan3793

I think no, the protobuf binary encoding format does not contains the message name

I think no, the protobuf binary encoding format does not contains the message name

+1

Thanks, merged to main/0.3


Removed dangling 'example-reach-transition-group' example from sidebar

Hi friends,
I noticed when I was going through the docs, if you're on /docs/example-reach-router and you clicked the next button, you'd be lead to the 404 page. But clicking on External Examples in the sidebar brought you to the next page following the Reach Router example.
I took a look at the code and it looks like example-reach-transition-group is not a thing anymore. So I figured example-reach-transition-group might just be a dangling piece of code in sidebars.json and removed it.
Seems to do the trick. In the Reach Router doc the next button now takes the user to the expected External Examples.
Button before:

Button after change:

I think that should say "react-transition-group"

oh, awkward hahaha, that works too :^)

Thanks for the heads up that something was amiss!


Typo in nodemon set up for babel

I think it should be --stage-0 instead of --stage 0
https://babeljs.io/docs/setup/#nodemon

no it shouldn't, the stage flag was removed


Update aws-java-sdk-core to 1.12.725

About this PR
📦 Updates com.amazonaws:aws-java-sdk-core from 1.12.459 to 1.12.725
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.amazonaws", artifactId = "aws-java-sdk-core" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "com.amazonaws", artifactId = "aws-java-sdk-core" }
}]

labels: library-update, early-semver-patch, semver-spec-patch, commit-count:1

Superseded by #765.


serve offline content not found page for uncached pages

added an offline content not found page

it will be shown when a user tries to access a page that isn't cached
it will have a link to "Offline Content Index Page"

added offline content index page

it will be used to specify links to cached pages

Please rename the schema migration to how it was before.

done

In general, let's always be more descriptive with the file names of db schema migrations going forward.

Django automatically generates the file names, but sure going forward will do that.
also I have reverted the removal of "Offline App Page", as it will remove existing pages (if any)
It would be better to handle it separately and inform country officers beforehand so they can manage existing pages

Have tested on my local, creating some test sections/ articles for download and an associated 'Offline Content Index Page'. Have tested in a browser and in a web app. Taking the browser offline and killing the server and all works as expected, so overall lgtm


Adding information about what you can teach

Trello card
https://trello.com/c/fcvSpS2Z/4893-update-qualifications-page-about-what-you-can-teach
Context
Advisers pointed out at the conference that if you train to teach a specific subject, that doesn’t mean that’s the only thing you can teach (and rarely ever is).
We should consider adding guidance around this to our qualifications page, and anywhere else relevant on the site.
Changes proposed in this pull request
Guidance to review

Policy approval given by Gaby


IGNITE-15260 Fully implement RaftGroupService

Replaced by https://github.com/apache/ignite-3/pull/321