Find a way to save pivot table along with some attributes

Find a way to save pivot table along with some attributes
Could anyone  help me please
alunos (2).csv
with laravel-admin I am not able to insert values in the additional fields of my pivot table

Thank You Man, thanks
Em sex., 3 de mar. de 2023 às 17:13, Alex Oleynik @.***>
escreveu:

So I was curious about this and here's what I've managed to accomplish
on this.
First of all, the LA's belongsToMany field indeed doesn't allow to
add/edit pivot fields. Please correct me if I'm mistaken.
But! If you really really need to do that, you kind of can.
Laravel does not forbid you from creating Eloquent Models on pivot
tables. You can use the special Pivot ( php artisan make:model PostTag
--pivot ) class, or just regular Model - won't matter in our case (but
specify $table property if you're using Model class).
Things are going to be strange, I'm warning you.
Assuming you have Post and Tag models with belongsToMany relation
between them, and need to specify some sort pivot field for Page-to-Tag
relation from the LA's Form.
Create "pivot" model:
class PostTag extends \Illuminate\Database\Eloquent\Relations\Pivot {
public $timestamps = false; // to not set 'updated_at' on saving.
protected $primaryKey = 'tag_id'; // the one that is more specific from the two for your use case.
// to use it reversed - in Tag-to-Post form - you need set $primaryKey to "post_id".
public function newModelQuery(): \Illuminate\Contracts\Database\Eloquent\Builder {
    $builder = parent::newModelQuery();
    if ($this->post_id) { // this is needed to update only this exact row from $form->hasMany, not all that has some 'tag_id'.
        $builder->where('post_id', $this->post_id);
    }
    return $builder;
}

}
In your Post model create new HasMany relation:
class Post extends \Illuminate\Database\Eloquent\Model {
public function post_tag(): HasMany {
return $this->hasMany(PostTag::class);
}
}
Then in the LA's Form you can do:
$form->table('post_tag', __('Tags'), function (\Encore\Admin\Form\NestedForm $nestedForm) {
$nestedForm->select('tag_id')->options(Tag::pluck('name', 'id'));
$nestedForm->number('sort');
});
Aaand that's almost it! Should work. You can optimize it as you wish,
though.
You can use $form->hasMany or $form->hasMany->useTab instead of
$form->table, but I've had some problems with them and the
$nestedForm->select field when tested, so that's on you.
This will work for editing existing and adding new many-to-many relations
between two models. But NOT for deleting existing relation, though. Don't
worry, I've got you!
Can't tell right now what's wrong with LA's Form hasMany / belongsTo
relation clearing. Had troubles with it before.
But in our case that's because I used Field\Table.
$form->table is designed for JSON fields, not hasMany relations, so it
removes remove flag from the items in
Encore\Admin\Form\Field\Table::prepare before the
Encore\Admin\Form::updateRelation can handle hasMany relation and delete
those remove-ed rows. Which In my opinion not very cool, because I like
Field\Table more, but anyway.
So you should use $form->hasMany and handle $nestedForm->select bug
somehow, OR do this:
$form->saving(function (Form $form) {
if (isset($form->post_tag)) {
$tag_remove_ids = collect($form->post_tag)->where('remove', 1)->pluck('tag_id');
$form->model()->post_tag()->whereIn('tag_id', $tag_remove_ids)->delete();
}
});
Which is kind of self explanatory, I guess.
Of course this does not restrict user from adding multiple relation rows
for the same Tag. The latest will be used.
Let me know your thoughts anyone. Don't be too judgy, I'm not really happy
with this workaround too, but that's all I could come up with during this
happy day.
Similar issues: #5729
https://github.com/z-song/laravel-admin/issues/5729 #5543
https://github.com/z-song/laravel-admin/issues/5543 #5320
https://github.com/z-song/laravel-admin/issues/5320 #2702
https://github.com/z-song/laravel-admin/issues/2702 (now I see that
someone has answered
https://github.com/z-song/laravel-admin/issues/395#issuecomment-284458861
something similar before, but it's ok).
—
Reply to this email directly, view it on GitHub
https://github.com/z-song/laravel-admin/issues/5722#issuecomment-1453764789,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AXLTLWPEGZBODPC6C3GJH43W2IKAZANCNFSM6AAAAAAVDRGQ5A
.
You are receiving this because you authored the thread.Message ID:
@.***>

A little update..
Turns out you CAN use $form->hasMany (with ->useTable / ->useTab or in default view mode).
But it requires a bit of extra preparation and has some dangerous caveats.

First of all, unlike my method above, it wont show duplicated items in the list - but will store them in the DB. So you can get into a situation where you don't even know that you created duplicated pivot relations in that table, if you don't have some unique index.

On the light side of thins problem - it updates and removes every paired pivot row in the DB, so it will be different only after first save (if at all).

$form->hasMany tries to add hidden field to every NestedForm item, so if you have a field in that form with the same name - it will try to display it twice. This is the $nestedForm->select issue I explained in the prev comment. On the saving it overrides selected/inputted rel_id to null (as it assumes it is new HasMany rel model, with primaryKey = 'id'). This does not allow to add new items.

To "fix" it, you can create "double/fake" primary key for your Pivot model, and add it to $appends. So above PostTag model transforms into:

class StaticPageStaticTag extends Pivot
{
    public $timestamps = false;

    protected $primaryKey = 'tag_id';
    protected $relatedKey = 'tag_id';
    protected $foreignKey = 'post_id';

    protected $appends = ['rel_key']; // watch so that this name is not used in the real pivot table.

    public function newModelQuery(): Builder {
        $builder = parent::newModelQuery();
        if ($this->{$this->foreignKey}) {
            $builder->where($this->foreignKey, $this->{$this->foreignKey});
        }
        return $builder;
    }
    public function getRelKeyAttribute() {
        return $this->{$this->relatedKey};
    }
    public function setRelKeyAttribute($value) {
        $this->{$this->relatedKey} = $value;
    }
}

And in the Form you now simply can do:

$form->hasMany('post_tag', __('Tags'), function (\Encore\Admin\Form\NestedForm $nestedForm) {
    $nestedForm->select('rel_key')->options(Tag::pluck('name', 'id'));
    $nestedForm->number('sort');
})->useTable();

This will override form's $nestedForm->primaryKey = null (not actual code) with yours form value.

Probably a bit clearer solution that mine above. At least items deletion works again!


Cucumber report bug on retried test not reporting

Current behavior
Currently, the willBeRetried flag is set with this line:
willBeRetried: currentRetry < retries,

however if a test is retried, but succeeds before currentRetry is >= retries that test will not be reported in the cucumber-reports.json and look like this:
[]
Desired behavior
The desired behavior is to have the retried test be reported in the cucumber-reports.json regardless of how many retries are remaining. I believe the fix would be as simple as changing the referenced line 832 in create-tests.ts to this:
willBeRetried: this.currentTest?.state === "passed" ? false : currentRetry < retries

this should result in retried tests being added to the cucumber-report.json looking like this:
[
  {
    "description": "",
    "elements": [
      {
        "description": "",
        "id": "retry-test;fail-first-pass-second",
        "keyword": "Scenario",
        "line": 2,
        "name": "Fail first Pass second",
        "steps": [
          {
            "arguments": [],
            "keyword": "Given ",
            "line": 3,
            "name": "it succeeds the second time",
            "match": {
              "location": "not available:0"
            },
            "result": {
              "status": "passed",
              "duration": 9000000
            }
          }
        ],
        "tags": [],
        "type": "scenario"
      }
    ],
    "id": "retry-test",
    "line": 1,
    "keyword": "Feature",
    "name": "Retry test",
    "tags": [],
    "uri": "cypress/integration/retry.feature"
  }
]

Test code to reproduce
Here is some code to reproduce the issue
cypress.config.js swap retries between 1 (good) and 2 (bad) to see the bug
const { defineConfig } = require("cypress");
const createBundler = require("@bahmutov/cypress-esbuild-preprocessor");
const { addCucumberPreprocessorPlugin } = require("@badeball/cypress-cucumber-preprocessor");
const {createEsbuildPlugin} = require("@badeball/cypress-cucumber-preprocessor/esbuild");

module.exports = defineConfig({
  e2e: {
    retries: 1,
    specPattern: "**/*.feature",
    async setupNodeEvents(
      on,
      config
    ){
      // This is required for the preprocessor to be able to generate JSON reports after each run, and more,
      await addCucumberPreprocessorPlugin(on, config);

      on(
        "file:preprocessor",
        createBundler({
          plugins: [createEsbuildPlugin(config)],
        })
      );

      // Make sure to return the config object as it might have been modified by the plugin.
      return config;
    },
  },
});

package.json
{
  "name": "reportingenv",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "cypress open",
    "headless": "cypress run"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@badeball/cypress-cucumber-preprocessor": "^16.0.0",
    "@bahmutov/cypress-esbuild-preprocessor": "^2.2.0",
    "@deepakvishwakarma/cucumber-json-formatter": "^0.0.3",
    "cypress": "^12.8.1",
    "cypress-xpath": "^2.0.1"
  },
  "cypress-cucumber-preprocessor": {
    "nonGlobalStepDefinitions": true,
    "stepDefinitions": [
      "cypress/integration/**/*.js"
    ],
    "filterSpecs": true,
    "omitFiltered": true,
    "json": {
      "enabled": true,
      "output": "reports/cucumber-report.json"
    }
  }
}

steps.js
'use strict';

const { Given } = require('@badeball/cypress-cucumber-preprocessor');

let count = 0;
Given('it succeeds the second time', () => {
  count++;
  if (count === 1) {
    cy.log(`Fail on count ${count}`);
    throw new Error('fail on purpose');
  }
  cy.log(`Succeed on count ${count}`);
});

retry.feature
Feature: Retry test
  Scenario: Fail first Pass second
    Given it succeeds the second time

Versions

Cypress version: 12.8.1
Preprocessor version: 16.0.0
Node version:  16.17.0

Checklist

[x] I've read the FAQ.
[x] I've read Instructions for logging issues.
[x] I'm not using<EMAIL_ADDRESS>(package name has changed and it is no longer the most recent version, see #689).

Just want to add, that willBeRetried condition for v16 means here in @cucumber/cucumber won't necessarily be false, and thus won't be included in the report.
In v15 when willBeRetried was always false, that actually resulted in both the failure and success being included in the json report, which was also not desired behavior at least for us

I've fixed this with v16.0.1.


Enhancement : Package Windows binaries in Zip along with current msi package

Thank you for finally adding Windows to your officially supported OSs. However msi has some problems in enterprise world

Downloads to .msi are usually blocked
Running msi requires admin rights

Influx for its purposes does not need admin rights, and will happily run with a normal user token. Please create zip file containing CLI and server executable (.exe), and make that available under downloads.

@otoolep pls consider along with #4219 Nightly will be good candidate for not having msi, but just a zip with exes.

Just to update this issue, with https://github.com/influxdata/influxdb/pull/6111 Windows zip contents now look like:
Archive:  influxdb-nightly_windows_amd64.zip
influx.exe
influx_inspect.exe
influx_stress.exe
influx_tsm.exe
influxd.exe
influxdb.conf

@rossmcdonald awesome! Will these be part of nightly builds, so that we (Windows users) can give it a try more frequently?

@mvadu Yes, Windows is now part of the nightly build process. Link to download is:
https://s3.amazonaws.com/influxdb/influxdb-nightly_windows_amd64.zip
Let me know if you run into any issues with them.

:+1: Superb!! Are you guys planning to add tests on windows as well? That way core team will know if any commits to master are breaking on Windows.

@mvadu No, we don't have plans to test on Windows at this time, so all of the Windows builds should be considered very experimental until it is officially supported.

We are experimenting with simplifying our open GitHub Issues. This feature request has been rolled into an aggregate issue for all packaging requests, so that we can close this issue until we are ready to work on it.
You may continue to make comments here. Closing the issue does not mean we are rejecting this idea.

I am very new with influxdb.  and I am trying to install the influxdb 1.3.2 in the windows. but the http://localhost:8086 doesn't work.  Could anyone give some idea what I should change in the config file? so confused.


Close partition after ResetOffset

Hi!
I need to reset partition offset and only one working solution that I found is to close partition after reset.
Here is my working example:
config.Group.Mode = cluster.ConsumerModePartitions
...
for {
  select {
  ..
  case part, ok := <-consumer.Partitions():
			if !ok {
				return
			}
			if part.InitialOffset() != 0 {
				part.ResetOffset(-1, "")
				part.Close()
			}
			// start a separate goroutine to consume messages
			go func(pc cluster.PartitionConsumer) {
				for msg := range pc.Messages() {
					log.Printf("%s/%d/%d\t%s\t%s\n", msg.Topic, msg.Partition, msg.Offset, msg.Key, msg.Value)
					consumer.MarkOffset(msg, "") // mark message as processed
				}
			}(part)
  } // select
} // for

Am I do it right?
May be ResetOffset() function should close partition itself?

@e11it sarama-cluster is about to be deprecated while I am trying to transition everyone over to my latest addition, directly to sarama - https://github.com/Shopify/sarama/pull/1099

@dim thanks for your great works, I have same question with @chandradeepak, when do we need to switch to sarama? And is there any suggestion for next usage, or any sample?
I don't see the update in godoc/sarama. Wish your advise.

Take a look at this https://godoc.org/github.com/Shopify/sarama#ConsumerGroup + example below

@dim thanks a lot.
So that means we can switch to sarama-1.19.0 now for consumer group rebalance & offset tracking? take over sarama-cluster completely, right?

please note https://github.com/bsm/sarama-cluster#deprecation-notice


Kiwi Specs don't run if the filename contains a +

I was testing a category method, and I had named my class something like UIColor+MyAdditionsSpec.m.  The file was not picked up by the test runner.
I'm not sure if this is a bug in Xcode 4.2 , SenTestingKit, or Kiwi, unfortunately.
Removing the + character from the spec filename made it work again.

It sounds like an Xcode bug but to be sure, does a regular OCUnit test case (created using the Xcode file template) have the same problem?


Include a boolean field for "Branch Restrictions Inheritance" or similar on the bitbucket_branch_restriction or both bitbucket_my_repository and bitbucket_repository

Is your feature request related to a problem? Please describe.
I have been working with the bitbucket plugin for a while now and one of my use cases refers to the "bitbucket_branch_restriction" table, so that I can find out if there are repositories with insecure permissions. My issue right now is that there are repositories that inherit branch restrictions from the project, as you can see here:

When I use the query to show branch restrictions for this particular repository, the result is as if it was not set, as you can see below, which is not true (inherited):

Describe the solution you'd like
I believe that using the API endpoint below to include one extra column to the bitbucket_my_repository table could solve my problem temporarily, as there seems like a project settings api for querying branch restrictions at the project level does not exist yet (I requested it though):
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-repo-slug-override-settings-get
One thing to note is that this endpoint won't work with the current personal access token, as you can see below:

For this api endpoint to work, we will need the Workspace Access Token, that can be created at:
https://bitbucket.org//workspace/settings/access-tokens
When it works correctly, the result should be like this:

Describe alternatives you've considered
I have no other idea at the moment other than using the GUI, unfortunately.
Additional context
No other context I can offer here.

Hello @oaulicino, thank you for your detailed report on the issue.
We rely on the SDK for fetching and populating the column values in our tables. At present, this SDK lacks support for retrieving Inherited branch restriction settings that are applied from the project level down to the repository level.
I have taken the initiative to submit a support request addressing this concern, which you can track here: GitHub Issue #268. Once there is a resolution to this support issue, we will re-examine our own issue and implement the necessary updates.
Thank You!

Closing this issue for now, we will revisit this once we get an update from the above SDK issue.


[Feature Request] Auto-Group Based on Group Membership

Summary
Ability to auto-group based on membership in one or more specified groups.
Related
Discussion
My old API-based services allowed me to create groups based on someone being a member of another specified group. This was particularly handy in, for example, the following use cases:

FC group management: You have multiple tiers of FCs, e.g., Gang, Senior, Alliance, each of which has its own group. You also have an overall FC group which contains the union of those groups, which can be used for, e.g., broadcasting to all the FCs, seeing the entire list of FCs, etc.

Director group management: You have individual groups for corporation directors, e.g. Corp1 Directors, Corp2 Directors, etc. You also want an overall group that's composed of the union of all Director groups for assigning commonly shared permissions, facilitating broadcasts, etc. This case could be addressed by #51.

Notice groups: You have different notification groups for pinging on your IM platform depending on the notifications received, e.g, a group for most sov, POS, or structure notifications when under attack, RFd, coming out of RF, etc. That group is made up of other existing groups, like Directors, High Command, and FCs, some of which might be meta-groups themselves.

Implementation
In the "Available for Whom" modal area, some kind of "SeAT Groups Filter" allowing you to choose one or more groups to make up the group.

Hey @Eingang
thank you for your contribution. This request is fairly familiar to this one: https://github.com/herpaderpaldent/seat-groups/issues/12 . Unfortunately autogrouping on self refrential seat-groups is a fairly difficult thing to achieve.
I'm happy to take this on the backlog, however don't expect a resoultion anytime soon as there are more important, cheaper and less complex things in the current backlog.


Mass list add again feature

since we do not have any confirmation after clicking the trash icon, here is a little feature that could elevate the ux

after you click the trash icon:

text to k-grey
opacity img 50%
added plus icon

when you click the plus icon, it adds the item again.

When only one item remains active, it becomes the solo listing modal.

also removes the greyed-out items

Updated in figma handoff file:

nice feature lol

@floyd-li is this sarcasm

@floyd-li is this sarcasm

oh no 😳 really good one!

👋

@exezbcz a couple of questions
1 - if a item is discarded should the card still be selected

2 - what happens if you close the modal and open it again

do we still have the discarded items
they are gone
like nothing happened they are "active" again

if a item is discarded should the card still be selected

nope, it will only show the option in the mass list modal - the card is not active when removed. After its re-added, the card become active again.

what happens if you close the modal and open it again

since the item was removed, its removed until you add it again. Basically, refreshed and showing only active cards.
to answer:

do we still have the discarded items

nope

they are gone

yes

like nothing happened they are "active" again

discarded items can become active only in the "session" you removed them. That means closing modal resets the state and only truly selected items are shown in the modal.

Does that make sense? thanks for asking, those edge cases are what make the mass list really good!


"No data received error" when calling findOne method

I have a strange issue with findOne method. When I call it I get this No data received ERR_EMPTY_RESPONSE error in chrome. find method works fine!
This is what I found in apache error logs:
/private/tmp/pear/install/mongodb/src/libmongoc/src/mongoc/mongoc-cursor.c:52 _mongoc_n_return(): precondition failed: remaining > 0
[Mon Dec 21 00:08:58.512815 2015] [core:notice] [pid 11959] AH00052: child pid 15139 exit signal Abort trap (6)
/private/tmp/pear/install/mongodb/src/libmongoc/src/mongoc/mongoc-cursor.c:52 _mongoc_n_return(): precondition failed: remaining > 0
[Mon Dec 21 00:08:59.512918 2015] [core:notice] [pid 11959] AH00052: child pid 15323 exit signal Abort trap (6)
/private/tmp/pear/install/mongodb/src/libmongoc/src/mongoc/mongoc-cursor.c:52 _mongoc_n_return(): precondition failed: remaining > 0
[Mon Dec 21 00:09:30.388006 2015] [core:notice] [pid 11959] AH00052: child pid 15325 exit signal Abort trap (6)

The reason is the current version of libmongoc does not support limit option with negative value. This issue is fixed in master, you can wait for the next version or use ^1.0@dev instead of ^1.0@beta in your composer.json

Thanks @letrunghieu !
See also https://github.com/mongodb/mongo-php-driver/issues/177 and https://jira.mongodb.org/browse/PHPLIB-152


Notifications to Farming Tracker

Since we now have a Farming Tracker in 1.3.7, maybe we can have chat messages notifying of crops ready for harvest on login/whenever they get ready whilst logged in? OSB had these but they were broken, and only when you were near the crop.

This is pending a fix for #8381


Bridgetroll

Adds changes necessary for a RailsBridget badge:
-changes to user model to record rails bridge user id and class count
-a worker to query bridge troll at midnight (pct) to update stored class counts
-a badge for users who have attended at least one class

+1


Updates the restore package to use the workerpool package

Adds the workerpool package to the restore package much like the backup package
Created a countResources method for the restore package
Adds a unit test to the restore package
Update restore package with code comments while I'm making changes there

I'm not really sure we need a whole resource counter file, since it'll just be owned by the manager, but it doesn't seem crazy unreasonable.

We should probably have a resource counter package that can just be used by the backup and restore function, to abstract it away.
I also wanted to implement a progress bar, but maybe this could be added to the same package?


[Feature Request] Add Neko variant using custom Chromium build from Woolyss

Is your feature request related to a problem? Please describe.
If a user wants to watch a media file that has been encoded in HEVC/x265 in the currently available builds of Neko, the video playback will either outright fail or cause the origin server to first transcode the video before serving it, a process which greatly reduces the quality of the video. HEVC is burdened by its patents and licensing fees which is why it currently isn't supported by the two big browsers Firefox and Chrome and likely never will be.
Describe the solution you'd like
Since Chrome is based on the open-source project Chromium, people have developed custom variants of the latter with support for HEVC/x265. These are available for all major platforms, including Linux, and can be downloaded on Woolyss' website. The build that would have be used for Neko is this one (since it is marked with all-codecs+).
Describe alternatives you've considered
N/A
Additional context
N/A

You can create your own Dockerfile FROM nurdism/neko:openbox and install this.
This is Chomium dockerfile:
https://github.com/nurdism/neko/blob/395e23a15562e54a70ce82b2c140ef9c81c9b249/.docker/files/chromium/Dockerfile#L1-L25
I would looking forward to see H265 support in neko!

@m1k1o Thanks for the pointer, but it looks like some of the required libraries (e.g. libva2) are only available on Debian Buster and newer. This means that Neko's entire image chain (deps -> base -> openbox -> chromium) needs to be updated from Stretch to Buster for this change.

I did it already in my fork. Check it out. @whalehub

@m1k1o It shows me that it's also based on stretch-slim: https://github.com/m1k1o/neko/blob/dev/.docker/files/deps/Dockerfile

@m1k1o Ah, thank you. I'll start working on implementing support for the custom Chromium build based on your fork then.

I'm only running stretch because of the space savings (is not that much compared to Buster) @m1k1o if all the images work fine I don't mind changing to buster

@m1k1o I'm happy to report that I just finished implementing this feature request and that the custom Chromium build can indeed Direct Play both 8-bit and 10-bit HEVC content. I'll open a pull request on your repo once I've ironed out a bug where Chromium doesn't start with a maximized window even when using the --start-maximized runtime flag. While it can still be maximized by clicking on the corresponding button, I'd prefer to have it work like the original Neko.

@nurdism buster works for me great. I created completly new workflow in my custom folder (didn't touch your old ones) hecne pull request from my fork would not be possible. Either you modify your dockerfiles according to mine or they would be completly replaced.
@whalehub i faced similair issue, where browser didn't start maximized. It was caused by missing openbox or bad window identifier.
https://github.com/m1k1o/neko/blob/aed37c553fc1221661a332787adb54d848fc8237/.m1k1o/chromium/openbox.xml#L16-L21

@m1k1o Bingo, that was it. I changed it from chromium-browser to chromium-devel and now it works as expected. I just opened a pull request on your repo. 👍
@alectrocute If you want to give this custom build a spin, feel free to use graywhale/neko:chromium. It's a drop-in replacement for the official Neko Chromium image, so it requires the same parameters, see https://n.eko.moe/#/docker.

@whalehub just tried it, works great. Thanks!


Modify replication rule from page to dialog #4296

Change replication rule from page mode to dialog mode.
Change project selection
Change endpoint selection
Modify .spec file

Coverage decreased (-0.3%) to 59.878% when pulling b2fb33ba0d2ec8d281006026a9dd87b06c51cbae on pengpengshui:reptolib into dda4289aafe01b7c43eb909a5a6cefe2ba44c8bd on vmware:master.


Temporarily pin libpq5 and libpq-dev to v11

Since libpq 12 includes a breaking change (more strict validation of connection parameters) which causes connection errors at runtime for customers with invalid database configuration settings.
This unblocks new stack image releases until an assessment of the number of customers affected/outreach can be performed.
The version is being pinned using the approach here:
https://wiki.postgresql.org/wiki/Apt/FAQ#I_want_libpq5_for_version_X.2C_but_there_is_only_version_Y_in_the_repository
Cedar-14's build script did not need to be updated, since PostgreSQL 12 is not available in the trusty-pgdg archive (due to Ubuntu 14.04 EOL).
Refs #147 / W-6780695.

Testing locally, I've confirmed that:

this PR successfully downgrades libpq5 and libpq-dev from 12.0-2.pgdg{16.04,18.04}+1 to 11.5-3.pgdg{16.04,18.04}+1 (and no other package version changes compared to a fresh build on master)
the diff between the current released stack image (v18) and the packages installed by a new build with this PR, include no other PostgreSQL major version bumps that aren't covered by the changes here


rounddown

https://exceljet.net/excel-functions/excel-rounddown-function

The Excel ROUNDDOWN function returns a number rounded down to a given number of places. Unlike standard rounding, where only numbers less than 5 are rounded down, ROUNDDOWN rounds all numbers down.

Duplicate of https://github.com/mP1/walkingkooka-tree-expression-function-number/issues/61


Add platform support table to README.md

Hello, it's me again from yesterday.
One of the first things that jumped at me when looking at this repository is that there is no supported platforms table. I currently tested the latest build of voice_activity_detector on macOS and Windows (doing Linux today) and thought I would already give you a draft of what I would like to add to the README.md. Again, this is just a draft so feel free to come in and change some things as I'm not familiar with how you want your README.md to look.
Hope this gets accepted,
Julian.

I've now also tested it on Linux and it worked perfectly fine as well. Seems at least all Desktop platforms are supported for now. Good work man, I thought I was getting myself into another rabbit hole of trying to get it to work on all platforms by no issues whatsoever. I really appreciate the effort you put in, maybe you tested it on all platforms as well, just wanted to make sure for my use case and add the information to the README.md so others will know.

This thing needs approval again for some reason, sorry to bother you with this again. Cause it just said that the main branch wasn't up to date so I merged the commit the bot made to add in the dependency into here, but now it needs approval again. Sorry for this again.


Filter feeds by total count per day/week/month

Illustration example:
Feeds of larger platforms with several articles per day or week are combined together with blog feeds, whose authors post by far more rarely, like once or twice per month.
Now, when I create a custom query feed of unread articles for a certain tag, there is a risk, these blog feeds get hidden due to the sheer amount of other articles in larger feeds.
I would like to filter/partition (unread) articles based on published articles per day/week/month of a feed. Being quite new to Newsboat, I encountered total_count, but this attribute seems to take into account only the total count of  all feeds. I guess, creating these number from the cache could be done quite easily.
Before in Feedly, I created separate categories for a topic, like "Code/100_per_week", "Code/10_per_week", "Code/1_per_month". So I needed to lookup manually, how active the feed is - fortunately Feedly can spit this number out comfortably.
How can I (how do others) do this in Newsboat? Is this use case compelling enough to implement/extend the total_count attribute with some time-based dimension - or should I rather manually create tags for "100/week" etc. again?

Interesting, thank you for the suggestion! If such a feature was implemented, there are a couple implications that I can think of:

we should also provide a way to display the number for an individual feed, so the user can figure out which "buckets" they want to create

we need to add real number support to the filter language, since the user would have to write "0.3/week" to filter for monthly feeds

it's an open question how to calculate the "posting rate".
A simple average will not work if the feed changed its schedule anywhere in between (or appears to have done so because of ignore-article).
A simple average also raises a question of the period over which it should be calculated:

from first article to last? Then dead feeds would be forever pinned at a particular frequency.
from first article to today? Now the frequency of a dead feed will gradually decrease, but it won't ever reach zero.
over the last 365 days? Now dead feeds will reach zero frequency in a year — just like feeds that are active but post once a few years (as a feed for e.g. HOPL might).

There are other varieties of averages, too. Exponential decay might be a good candidate here, but the "365 days" problem will be back, just phrased as a decay coefficient this time.

Also: I don't think Newsboat should dictate users how to consume their feeds, but I wonder how well this categorization approach works. It seems to use posting frequency as a signal of interestingness/usefulness/relevancy, which in my experience doesn't hold: I have a daily updated feed from a site like bash.org which I do find interesting and read every day, but I also have news feeds from a few webhosting providers which are updated rarely and I only skim, and also high-freq/low-interest news feeds and low-freq/high-interest blogs. @f6ADt, do you have any "outliers" like this? Are you really driver by those numbers, or do you use them as a hint of how valuable the feed is?
(I'm on the fence about this, and think more discussion is needed, so labeling as "to consider" for now.

Oh, one more thing:

I encountered total_count, but this attribute seems to take into account only the total count of all feeds

Looking at the code, total_count is only handled in a single place, and there it returns the number of items in one particular feed: https://github.com/newsboat/newsboat/blob/119582d72d2dd25993d06b6f809e26944827237e/src/rssfeed.cpp#L153-L154 If your experiments show that it returns the count for all feeds, please file an issue with steps to reproduce this and we'll see what's going on.

we should also provide a way to display the number for an individual feed, so the user can figure out which "buckets" they want to create

Yes, ideally there is one measure/number for each feed that states, how "active" this feed is, so you can use it as filter criteria.

we need to add real number support to the filter language, since the user would have to write "0.3/week" to filter for monthly feeds

Yeah, you might set
a) time interval like per/week
b) a number argument N to only include feeds with a maximum of N articles per time interval.
E.g. include all feeds with max. N=3 articles per week. Good idea to take week as the only interval and leave out/derive day/month.

it's an open question how to calculate the "posting rate".

In a first step, this could be kept as simple as possible: For each feed, count all stored/fetches articles grouped per week, and calculate the average (later on other options possible) and cache this measure as data basis for query filters.
To mitigate recent changes of the feed's activity/schedule, the user might either delete older articles (e.g. max_items; IMO perfectly fine for the start). Or add an additional date argument stating, that a feed's activity calculation should start at this particular date. In latter case, you would need to rethink caching mechanisms a bit.
Concerning dead feeds: These are certainly hard to distinguish from "rarely posted" feeds. Though IMO this is more of an edge case and could be solved manually. If there is a dead feed, drop it directly from the list. Or give rare feeds a unique tag to distinguish them from the dead ones.

It seems to use posting frequency as a signal of interestingness/usefulness/relevancy, which in my experience doesn't hold [...] Are you really driver by those numbers, or do you use them as a hint of how valuable the feed is?

Main idea is: articles of a rarely posting feed shouldn't be "suppressed" / get hidden by a feed posting articles with much higher frequency. It has nothing to do with using posting frequency as signal of usefulness or relevancy!
Let me explain, how I use Newsboat: I would like to have query feeds for latest unread articles per topic - like Latest/Code or Latest/News. I don't want to navigate to every single feed and look for latest articles - with a growing number of feeds, this would get more and more cumbersome.
Though, If you have all topic-related content in one query, it gets much harder to discover articles from rarely posting feeds, if activity of another feed(s) is high enough. Imagine Feed A has 500 articles per week, Feed B has 1 article per month, both in one query. Good luck finding articles of B :-).

I encountered total_count, but this attribute seems to take into account only the total count of all feeds.

If you want to have further infos: this medium article has been one driver/motivation to organize categories by their frequency for me.

 This has been a typo, I'll fix that in OP. I meant:

total_count, but this attribute seems to take into account only the total count of articles per feed.

(later on other options possible)

No, "more options later" is exactly what I'm trying to avoid :) Newsboat has way too many knobs already, and I'd be a fool to set myself up for adding even more in the future. It's better to think this through at least a little bit.
Good point regarding dead feeds. Let's keep them out of this discussion then.

I don't want to navigate to every single feed and look for latest articles - with a growing number of feeds, this would get more and more cumbersome.

You don't have to: navigate to any one of them, and start tapping n (which executes next-unread operation). When you're done with unread articles in the current feed, Newsboat will jump to the next that has more unread articles. Do read the manual, there's plenty of nifty keys to discover ;)
After reading the Medium article, I'm even more convinced that this is entirely about using frequency as a signal of usefulness. The author over-subscribed, and now tries different tricks to manage the load. Instead of giving each article an equal share of attention, they decided to give each class of feeds an equal share of attention. The classes are defined the posting frequency. In other words, they're saying that each article in "Super Fast" feed is less deserving of their attention than an article from a "Slow" feed.
Frankly, I'm not too excited about implementing all of the aforementioned additions that would be needed for this feature to be useful. I'll leave this in the "to consider" pile for now, and see if anyone else stumbles into this and describes more ways how it can be useful.

After reading the Medium article, I'm even more convinced that this is entirely about using frequency as a signal of usefulness.

I likely misunderstood your statement in the previous post.  By "posting frequency as a signal of interestingness/usefulness/relevancy" you meant that each article does not receive equal attention anymore? Yes, that is true. I would rather skim through a news feed with 500 articles per week, but would want to go through all my blog gems.
Shortcut n seems like a good idea, in addition to A to mark the whole news feed as read after having read some of its articles. I'll try that out, thanks!


Label Allocation Optimization

When using dynamic labels, it's necessary to either allocate a string each time or "forget" it to obtain a &'static str reference. The latter can in some cases (esp a naive solution) result in unbound memory growth, and the former results in a bunch of wasted time dealing with allocating and dropping Strings. For hot code paths, this can result in a lot of wasted CPU and degrade application performance.
A simple solution to this might be supporting Arc for labels, and a more sophisticated version might be some sort of label value registration / string interning managed by the metrics crate.
Not sure if this is a feature request exactly, but it's something I keep bumping into when working with the metrics crate, and I wanted to at least start a discussion about it. Is this something you've thought about at all? Is it a problem you're interested in addressing internally, or would you prefer users of the crate to handle it themselves?
Thanks for your time (and for the great package!)

This is definitely something I've thought about and even have an old, stale branch for trying to handle: https://github.com/metrics-rs/metrics/tree/cow-experiments
Essentially, I envisioned the copy-on-write type that we use to handle either borrowed, owned, or shared (Arc<T>) versions of the given type, as well as an optimization for small strings that could otherwise be inlined into the copy-on-write structure.
I just never got as far as I wanted with it: lack of time/motivation, more or less. Dropping the bit for doing small string optimization would make it trivial to include support for shared pointers, and could be a good incremental step to revive the effort.

Oh that sounds like it would solve our problem! Sounds like a nice solution.
Re: small string optimization; are you saying you'd drop support for it?

I would only drop the requirement of getting it out at the same time as support for smart pointers, for the purpose of trying to incrementalize improve things rather than doing it in one fell swoop.

Related to https://github.com/metrics-rs/metrics/issues/273
Another problem with dynamic labels is Box::new:
let a = "some_value";
metrics::gauge!("some_metric", 42., "label" => a);

is expanded into
  static METRIC_NAME: &'static str = "some_metric";
  if let Some(recorder) = ::metrics::try_recorder() {
      let key = ::metrics::Key::from_parts(
          METRIC_NAME,
          (<[_]>::into_vec(
              #[rustc_box]
              $crate::boxed::Box::new([(::metrics::Label::new("label", a))]),
          )),
      );
      let handle = recorder.register_gauge(&key);
      handle.set(42.);
  }

It could be avoided by dividing metadata (static usually) and values in the same way as the tracing crate does it.

Taking the approach that tracing takes would involve a lot more work, because it would completely change how we work with Key... but this is very different from basic problem above of not supporting Arc<str>.
I opened #405 as a placeholder to write down some thoughts on what your idea might look like.


Updates for Community Content section

What would you like to be added:
There's been a bunch of KUDO-related content (videos etc.) created by the likes of @djannot and @kensipe.  It'd be great to get these collected and added to the website, maybe under the 'Community Content' section.

spirit of issue is complete with community event templates etc.


Migration of Live env from the silver to the gold cluster

Describe the Issue
We want, after comminucating during the community update to operate the migration from the silver cluster to the gold.
At the same time the aws-login tf module will be updated and will use the migration of user groups from silver to gold.
Also the aws-login update will make use of the domain name
Additional Context
Acceptance Criteria

The Live env is using the gold keycloack cluster
The users are migrated as they login through the aws-login portal
The aws-login uses a domain name

.
.
.
.
.
.
.
.
.
.
.
Extra Template Info
Definition of Ready
These set of conditions will need to be met in order to bring a ticket into the sprint and start work. Protects the team from unclear requirements.
Issues (Task/Story/Spike) aligned to an EPIC and linked appropriately.
Assigned to the appropriate CPF MEMBER (and is not left blank in ZenHub) at the start of sprint (1st day of the sprint)
Acceptance has been defined for the issue and has been reviewed with CPF team and approved by the necessary approver.
Has been sized and estimated by the delivery team.
Detailed breakdown of the steps required to complete the story in the additional context
Any additional specifications have been documented, reviewed with CPF and approved by the necessary approver.
Acceptance Criteria
A set of pre-defined requirement that need to be met in order to mark the user story as “done”.
It should be testable with no room for interpretation
It should be either “pass” or “fail”
It should be clear enough for business stake holders to understand
As part of the user story, it should be written from the user perspective
A well written acceptance criteria is great for

managing expectations
defining scope
reducing ambiguity
establishing testing criteria for QA
Given (Pre-condition)
When (Action)
Then (Outcome)

Definition of Done
These set of conditions are met for work to be considered as complete on an issue.
All acceptance criteria(s) have been validated.
All the necessary documentation for the issue has been uploaded to Teams.
Functionality has been tested when applicable.
Functionality has been demonstrated to the relevant stakeholders (where applicable).
Story has been scheduled for a Sprint Demo/community update and impacted teams invited to the Demo.
Stories accepted by PO and documented for potential sharing with impacted users.

Documented = Captured in Community Update (CU) deck
Release notes = aspirational goal of providing a bulleted list of features and changes that our users can touch. Was going to store them in our Cloud Pathfinder repo. Can also display to users in the CU

Deploy May 8th at the earliest


Support literal outputs

Currently we have the constructor for Output that allows setting IsLiteral as internal, but we will likely need to support literal outputs in the future. With the changes for how bicep modules are written so that they are no longer dependent on the user constructs, it isn't clear where the literal output would go as it is not associated with a specific resource.

Another scenario is setting an output to a parameter.


[ReleasePrep][2020-06-08] RI dev to master

Please wait for my go-ahead on this. I'd like to time this with another change.

I'm good on my end.

Good on my end

Looks good on my end as well


[Airbrake] [Production] JSON5: invalid character '<' at 1:1

Airbrake error: #0254
Airbrake project: datanator_frontend
Error type: SyntaxError
Error message: JSON5: invalid character '<' at 1:1
Where: <no information>
Occurred at: Aug 25, 2020 12:53:46 UTC
First seen at: Aug 25, 2020 12:53:46 UTC
Occurrences: 0 (0 since last deploy on Aug 19, 2020 19:03:09 UTC)
Severity: error
URL: https://datanator.info/gene/K00261/
File: https://datanator.info/static/node_modules/json5/dist/index.js
Backtrace:
https://datanator.info/static/node_modules/json5/dist/index.js:1457:in
https://datanator.info/static/node_modules/json5/dist/index.js:1429:in message
https://datanator.info/static/node_modules/json5/dist/index.js:708:in c
https://datanator.info/static/node_modules/json5/dist/index.js:509:in multiLineComment

This appears to have been a transient issue with the REST API returning invalid JSON.


[Bug]: Dynamo - entering details in edit ds page gives missing region config error on forking, when forking times out.

Is there an existing issue for this?

[X] I have searched the existing issues

Description
If we import or fork a json with dynamo datasource, and the import of this file times out, when we enter details for dynamo in the Edit datasource page to fill in the key id and access key, it throws an error - missing region configuration - though the region is selected in the dropdown
Steps To Reproduce
Steps to reproduce:

Fork an application with a query attached to dynamo db. The application should be big enough that the fork times out.
Note that the application is forked into the workspace, even though it has timed out.
Open the application
Go to the dynamo edit datasource page to enter the access key and secret access key [region is by default selected as ap-south1 so do not touch it]
Click on test config - it errors out with Mission region configuration message. Also note that Save is not enabled.

Public Sample App
No response
Environment
Production
Severity
Medium (Frustrating UX)
Issue video log
https://jam.dev/c/43d1cc65-23c1-41a4-b58e-bf93d889eb21
Version
Cloud

OldApp_DSTesting1.9.24withDynamo.json


Data Annotation for [NotMapped] ReadOnly Property

I get a weird nondescript error when I create a read-only property on my model using the Data Annotation syntax.
If I use the fluent syntax to set the property to ignore it works fine.  So it seems to be isolated to the data annotation and the good news is I have a work around.
Read-Only Property Example
[NotMapped]
public DateTimeOffset EstimatedArrivalTime
{
get
{
return EstimatedDepartureTime.Add(EstimatedTravelTime);
}
}
First Few Lines of StackTrace
ArgumentNullException: Value cannot be null.
Parameter name: navigation
Microsoft.Data.Entity.Utilities.Check.NotNull[T](T value, String parameterName)
Microsoft.Data.Entity.Metadata.Conventions.Internal.ConventionDispatcher.OnNavigationAdded(InternalRelationshipBuilder relationshipBuilder, Navigation navigation)

Possible dupe of #3805
Which version of EF are you using?

I'm using 7.0.0-rc1-final.  I apologize for the double post.  It does seem to be the same issue I'm seeing.  I looks like you've closed it out on rc2.


Error at rake docs and whitespace

$ ruby -v
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]

$ bundle -v
Bundler version 1.14.6

$ bundle install --path vendor/bundle

$ bundle exec rake whitespace
sed: can't read s/ *$//g: No such file or directory
sed: can't read s/ *$//g: No such file or directory
...

=> I am using Linux. So that is reason? sed command's specification is different?
Then, install hanna that is used in rake docs.
$ echo "gem 'hanna'" >> Gemfile

$ bundle update

$ bundle exec rake docs
bundler: failed to load command: rake (/home/jaruga/git/rack-test/vendor/bundle/ruby/2.4.0/bin/rake)
NameError: uninitialized constant Rake::AltSystem::Config
  /home/jaruga/git/rack-test/vendor/bundle/ruby/2.4.0/gems/rake-0.8.7/lib/rake/alt_system.rb:32:in `<module:AltSystem>'
  /home/jaruga/git/rack-test/vendor/bundle/ruby/2.4.0/gems/rake-0.8.7/lib/rake/alt_system.rb:31:in `<top (required)>'
  /home/jaruga/git/rack-test/vendor/bundle/ruby/2.4.0/gems/rake-0.8.7/lib/rake/win32.rb:3:in `require'
  /home/jaruga/git/rack-test/vendor/bundle/ruby/2.4.0/gems/rake-0.8.7/lib/rake/win32.rb:3:in `<module:Rake>'
  /home/jaruga/git/rack-test/vendor/bundle/ruby/2.4.0/gems/rake-0.8.7/lib/rake/win32.rb:2:in `<top (required)>'
  /home/jaruga/git/rack-test/vendor/bundle/ruby/2.4.0/gems/rake-0.8.7/lib/rake.rb:41:in `require'
  /home/jaruga/git/rack-test/vendor/bundle/ruby/2.4.0/gems/rake-0.8.7/lib/rake.rb:41:in `<top (required)>'
  /home/jaruga/git/rack-test/vendor/bundle/ruby/2.4.0/gems/rake-0.8.7/bin/rake:26:in `require'
  /home/jaruga/git/rack-test/vendor/bundle/ruby/2.4.0/gems/rake-0.8.7/bin/rake:26:in `<top (required)>'
  /home/jaruga/git/rack-test/vendor/bundle/ruby/2.4.0/bin/rake:22:in `load'
  /home/jaruga/git/rack-test/vendor/bundle/ruby/2.4.0/bin/rake:22:in `<top (required)>'

I want to try to fix this after https://github.com/rack-test/rack-test/pull/181 will be merged.


[Runtime] Disable prespecialized metadata if we have overridden images.

We need to check for overridden images on every image load, otherwise XCTest (among others) may dlopen() an image that pulls in something that is overridden, at which point the prespecialized metadata won't match the image we loaded.
rdar://125727356

@swift-ci Please smoke test


Getting error IFChatPrompt Describe Picture

Suddenly getting this error:

!!! Exception during processing!!! IFChatPrompt.describe_picture() got an unexpected keyword argument 'image'
Traceback (most recent call last):
  File "E:\ComfyUI\ComfyUI\execution.py", line 151, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\ComfyUI\ComfyUI\execution.py", line 81, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\ComfyUI\ComfyUI\execution.py", line 74, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: IFChatPrompt.describe_picture() got an unexpected keyword argument 'image'

I was able to get rid of the problem by recreating the node itself... Seems that when I opened it from the saved workflow it did not pick up the settings correctly. Deleting the node and re-inserting the node fixed it for now.
Thank you

Fantastic glad you solve it on your own. Thanks for leaving the solution here.


Docker image compile failing on Raspberry Pi

Compiling the docker image on a raspberry pi fails with
Error1:

<EMAIL_ADDRESS>install /build/app/node_modules/ttf2woff2
(node-gyp rebuild > builderror.log) || (exit 0)

../csrc/addon.cc: In function 'Nan::NAN_METHOD_RETURN_TYPE convert(Nan::NAN_METHOD_ARGS_TYPE)':
../csrc/addon.cc:10:49: error: no matching function for call to 'v8::Value::ToObject()'
Local inputBuffer = info[0]->ToObject();
^
In file included from /home/openslides/.cache/node-gyp/13.14.0/include/node/node.h:67:0,
from ../../nan/nan.h:56,
from ../csrc/addon.cc:1:
/home/openslides/.cache/node-gyp/13.14.0/include/node/v8.h:2754:44: note: candidate: v8::MaybeLocalv8::Object v8::Value::ToObject(v8::Localv8::Context) const
V8_WARN_UNUSED_RESULT MaybeLocal ToObject(
^~~~~~~~
/home/openslides/.cache/node-gyp/13.14.0/include/node/v8.h:2754:44: note:   candidate expects 1 argument, 0 provided
make: *** [Release/obj.target/addon/csrc/addon.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 5.4.51-v7l+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /build/app/node_modules/ttf2woff2
gyp ERR! node -v v13.14.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
Error 2:
Compiling @pebula/utils : fesm2015 as esm2015
Killed
The command '/bin/sh -c npm ci' returned a non-zero code: 137
Error 3:

<EMAIL_ADDRESS>install /build/app/node_modules/husky
node husky install

husky > Setting up git hooks
Husky requires Git >=2.13.0. Got v2.11.0.
husky > Failed to install

Sorry but there is really nothing working! I used the instructions in the main repository and der docker-compose up command then tries to load the openslides-pgbounce imager which is not on docker hub!
Pulling pgbouncer (openslides/openslides-pgbouncer:latest)...
ERROR: pull access denied for openslides/openslides-pgbouncer, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
It's really frustrating!

Error 2:
Compiling @pebula/utils : fesm2015 as esm2015
Killed
The command '/bin/sh -c npm ci' returned a non-zero code: 137

This is an OOM error -> I do not know which PI you are using, but keep in mind that building Openslides (especially node and angular) requires some power. I think 4GB of Ram is at least needed. There were successfull installs (https://github.com/OpenSlides/OpenSlides/issues/5638), so maybe get in contact with them. I cannot really help here since I do not have a PI at hand to test.

Sorry but there is really nothing working! I used the instructions in the main repository and the docker-compose up command then tries to load the openslides-pgbounce imager which is not on docker hub!

If the build command above has not succeeded it is clear that you do not have our pgbouncer since it would have been built before.

@FinnStutzenstein Thanks! I had only the 1GB Raspi! Now I upgraded to the 4GB and I get still build errors but less than before. I also added the components mentioned in #5638 to the docker file which also helped but solved not everything.
Just to clarify, as the documentation is not very clear and big mode setup seems to have changed fundamentally after releasing version 3.2.
As far as I understood (but this is nowhere documented) I have to use the legacy branch of the composer setup if I work with 3.2 tag. The new big mode setup is only compatible with trunk! Is this correct?
Reason: The v3.2 tag has no build.sh start script!
The errors I get now, but the setup continued (maybe I can ignore them):

<EMAIL_ADDRESS>install /build/app/client/node_modules/ttf2woff2
(node-gyp rebuild > builderror.log) || (exit 0)

../csrc/addon.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE convert(Nan::NAN_METHOD_ARGS_TYPE)’:
../csrc/addon.cc:10:49: error: no matching function for call to ‘v8::Value::ToObject()’
Local inputBuffer = info[0]->ToObject();
^
In file included from /home/openslides/.cache/node-gyp/13.14.0/include/node/node.h:67,
from ../../nan/nan.h:56,
from ../csrc/addon.cc:1:
/home/openslides/.cache/node-gyp/13.14.0/include/node/v8.h:2754:44: note: candidate: ‘v8::MaybeLocalv8::Object v8::Value::ToObject(v8::Localv8::Context) const’
V8_WARN_UNUSED_RESULT MaybeLocal ToObject(
^~~~~~~~
/home/openslides/.cache/node-gyp/13.14.0/include/node/v8.h:2754:44: note:   candidate expects 1 argument, 0 provided
make: *** [addon.target.mk:135: Release/obj.target/addon/csrc/addon.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 5.4.72-v7l+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /build/app/client/node_modules/ttf2woff2
gyp ERR! node -v v13.14.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok

<EMAIL_ADDRESS>install /build/app/client/node_modules/husky
node husky install

husky > Setting up git hooks
fatal: not a git repository (or any of the parent directories): .git
husky > Failed to install

the legacy branch of the composer setup

Do you mean the docker-compose repository or this repository? Version 3.2 did not have the docker compose setup inside this repository. I would propose to use the master of this repo, becuase as you have correctly stated, we have changed the setup after 3.2 completly.
As far as<EMAIL_ADDRESS>raises the error with node 12: it is fixed in version 3.0: https://github.com/nfroidure/ttf2woff2/releases/tag/v3.0.0 (this is a dependency of https://github.com/petergng/material-icon-font). I wonder why I can install ist since I also use node 12...

@FinnStutzenstein Again many thanks for your help!
I mean the legacy branch of the docker compose setup repository (not this repo!).
I wanted to use the 3.2 tag of the openslide repository as I suppose it’s more stable than the master. My goal is a stable productive environment in big mode. Or would you still recommend the master for this use case?
If I use the 3.2 tag of openslide, then the problem is that it does not technically match to the current master of docker compose repo because it was completely changed. Am I right?
So, I suppose, I have to use the legacy branch of the docker compose repo instead. Right?
If yes, then I would suggest that it will be added to the documentation! Because this dependency is not clear if you do not trade the scripts in detail.
However, I would have expected a 3.2 tag also on the docker compose repo side. Just to have two matching tags.
The documentation explains a lot about how to setup the big mode with docker. But it only stated how to do it with the master. But for productive use, you normally do not use the master.

So, I suppose, I have to use the legacy branch of the docker compose repo instead. Right?

I never worked with the docker-compose repo and it was always clumsy -> this is why we moved to a setup in >3.2 that is inclused in this repo; the docker-compose-repo is not required anymore [1].

Or would you still recommend the master for this use case?

If you try to deploy it, I would recommend you to use master and the setup described there (https://github.com/OpenSlides/OpenSlides#installation). It is much more easy now. There might be 1-2 bugs in the master, but we did not do much work since the 3.2 release. I would say, we just fixed more bugs than we produced ;) And if there is a real bug (not a feature request), jsut post an issue; it will be fixed.

If it‘s only fixed in the master then consequently it‘s never possible to install the last release on ARM without being a programmer because of the dependency to the old style setup.

We do not have the manpower to port every fix back to old versions - this is why I recomment using the master. It is nevery a dev-version with half-working features. If something is merged into the master, the feature is complete (not bug free I guess, but finished).
[1] It is, but you won't notice: The main docker-compose and docker-stack files are here. They include things like the database from the docker-compose repository, but this is done in the background. All you need now is a copy of this repo, docker, and access to the internet to build these "external" dependencies.

@FinnStutzenstein Ok now I moved to a x68 target and I've used the master of this repository.
The next error when running build.sh all
Step 11/19 : COPY package-lock.json .
---> Using cache
---> 381efd509e59
Step 12/19 : RUN npm ci
---> Running in 900eb390e97a
npm ERR! code EACCES
npm ERR! syscall open
npm ERR! path /build/app/package.json
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, open '/build/app/package.json'
npm ERR!  [OperationalError: EACCES: permission denied, open '/build/app/package.json'] {
npm ERR!   cause: [Error: EACCES: permission denied, open '/build/app/package.json'] {
npm ERR!     errno: -13,
npm ERR!     code: 'EACCES',
npm ERR!     syscall: 'open',
npm ERR!     path: '/build/app/package.json'
npm ERR!   },
npm ERR!   isOperational: true,
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'open',
npm ERR!   path: '/build/app/package.json'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/openslides/.npm/_logs/2020-11-13T22_08_08_211Z-debug.log
The command '/bin/sh -c npm ci' returned a non-zero code: 243
Where is this directory? I thought everything will be done boxed in a docker imager?

the legacy branch of the composer setup

Do you mean the docker-compose repository or this repository? Version 3.2 did not have the docker compose setup inside this repository. I would propose to use the master of this repo, becuase as you have correctly stated, we have changed the setup after 3.2 completly.
As far as<EMAIL_ADDRESS>raises the error with node 12: it is fixed in version 3.0: https://github.com/nfroidure/ttf2woff2/releases/tag/v3.0.0 (this is a dependency of https://github.com/petergng/material-icon-font). I wonder why I can install ist since I also use node 12...

I get this compile error now also on an Ubuntu Linux with x86 and the current master trunk (the new compose setup). However the compile does not stop but I fear that something will not work later because of these errors! Is there a workaround or can I ignore it?

or can I ignore it?

This should be fine.

Ok! I want to give you an update!
On my x86 system everything seems to work fine!
The only problem I've had, was with my Apache Proxy which is used by default on a Synology (clients had connection issues). But by moving to nginx the problem seems to be fixed. I've found already this problem In bug tracker.
So we can close this issue. Many thanks Finn! 👍


gpu

[Enter feedback here]

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

ID: 5f73791d-09c0-95aa-fd26-a2c2e5b58350
Version Independent ID: 8faae52b-b605-f9f2-b98a-db3d2d5c4e99
Content: Azure Kinect DK recorder
Content Source: articles/kinect-dk/azure-kinect-recorder.md
Product: kinect-dk
GitHub Login: @tesych
Microsoft Alias: tesych

@VisImage May I know what exactly are you trying to perform (Can you bit elaborate more on the issue)?

Please help with the link of document on which above document feedback request is created.
In case your query is not related to document content, please open a new thread in Q&A forum or Stack Overflow as it could be better place to get help on your scenario.
These forum community members could provide their expert guidance on your scenario based on their experience. Thanks.
Since we have not heard back from you we will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly reopen the issue and continue the discussion.


As of latest preview version (1.13.10336.0), homedir alias (~) no longer recognized.

Windows Terminal version
1.13.10336.0
Windows build number
22000.466
Other Software
No response
Steps to reproduce
Open up Terminal Preview, drop down arrow to start a WSL distro session.
Expected Behavior
Session would open normally.
Actual Behavior
[error<PHONE_NUMBER> (0x8007010b) when launching `ubuntu.exe']
Could not access starting directory "~"

This was never supported; the starting directory was simply ignored for profiles like this.
Can you change the commandline from ubuntu.exe to wsl -d Ubuntu (or whatever the name of your Ubuntu distribution is?)

This was never supported; the starting directory was simply ignored for profiles like this.
Can you change the commandline from ubuntu.exe to wsl -d Ubuntu (or whatever the name of your Ubuntu distribution is?)

I didn't specifically set it to that, that I recall. I've only ever messed with those settings to set fonts, and to change the distro name.

AUGH! I think I know what's up. That's not gonna be great.
We changed the base WSL profile, and Ubuntu customizes it to set a different EXE. We try to detect which EXE is being launched, because if it's WSL we want to tell it about the special ~ starting directory.
Hmm. This needs some thought...

Go ahead and close this in favor of the bigger fish to fry. (I saw the localization bug. Thank you for your work on this, man! 🙏🏻)

Aw, thanks. :smile:
I'll keep this one open regardless.. it's gonna bite us, especially since this feature/misfeature is in stable.

@zadjii-msft should we BODGE in our own check that the starting directory is a literal ~ and .... just clear it? These distro launchers are being fragment-customized on top of their WSL profiles ...

Okay so team discussion:
If the startingDirectory is ~, and the commandline isn't wsl.exe, then drop the user in %userprofile%. Do this logic in ConptyConnection.


Clang format

I have another change I want to make, but I did it on vscode with automatic clang-formatting, so there are a bunch of whitespace changes.  I'd rather merge this in first, so that my changes actually make sense.
Here is a proposal for the .clang-format

I need to rebase this first.  I'll re-open it again later.


Expandable row has a fill color

Current:
Expanded row has a gray fill color
Expected:
Expanded row is transparent

Duplicate of #426


265 sim gh action to run e2e tests on pr open and approval

fixes https://github.com/yeagerai/genlayer-simulator/issues/265
What

fixes e2e tests: the main reason was that we were trying to pop the ollama provider when there wasn't any in the list
sets gpt-3.5 as the model to use for e2e tests: this is because its way cheaper
other small changes done along the way to keep improving the codebase little by little, following the "boy scout rule"

Why
e2e tests were failing
Testing done
e2e tests are passing in this branch
https://github.com/yeagerai/genlayer-simulator/actions/runs/9962830784

@AgustinRamiroDiaz why is this PR pointing to a different branch than staging?

@AgustinRamiroDiaz why is this PR pointing to a different branch than staging?

@cristiam86 oh sorry, forgot to mention. Staging is currently broken with some validators logic, so e2e tests need that fix in order to work correctly
I'll wait for the other PRs in order to change this PRs target


Quick-Link to native cookie list

I'd love to have a shortcut to the native cookie listing/managing page.
Benefit:

Users can quickly view currently present cookies.
Users can easily alter native cookies-permissions with the additonal help of "CookieMan Context".

The Exterminator has such a shortcut and I very much like it and use it permanently.
Thanks,
-garry

Do you mean the one in about:preferences#privacy or in CAD settings?

Thank you for your quick response! Unfortunately I'm not familar with Moz//FF/XUL/Win terms; don't knwo what CAD means, but the former is clearly not what I mean.
Please see https://addons.cdn.mozilla.net/user-media/previews/full/20/20983.png.
This still exists in FF52, while clicking through the XUL-GUI leads to a modernized version of the same window.
The add-on supports both and that's the destination I want to be able to reach as quick as possible :-)
Thanks,
-garry

CAD is the shortname for Cookie AutoDelete.
Pretty sure I don't have access to that, but since there's a Cookie WebExtension API, someone could make a windowed cookie manager that's similar in the picture. Unfortunately, that is out of scope for this project.
Maybe you'll have better luck with this extension:
https://addons.mozilla.org/en-US/firefox/addon/a-cookie-manager/

I would find a direct link from the toolbar icon to about:preferences#privacy helpful. Please consider adding it. Thanks.

This is now blocked as a webextension API limitations as a priviledged about: URL.  Until that is allowed the api call returns an Error of Illegal URL.


Run for main packages

It would be very useful if it would be possible to run for executable sources.
Commonly I am trying to move all functionality in separate modules and I clue logic at executable sources. But godepgraph can't parse not imported source files.
As I have commonly 2 executable sources then I just rename main to somename and it works.

 I got doubts and I recheck it in third time. and it worked :|


Golang support plan?

@bubbleboy11 I have published version 1.0.8 that has Golang support included. You will need the ability to run the go command directly from a terminal (basically in your path environment variables) as I had to use Golang to parse the files. This is my first time doing anything with Golang so if you see any problems create another issue and I will attempt to fix it.
If you are enjoying the extension, please leave a review on the vscode marketplace.

Thank you, I have reviewed wtih five star.


MAIN: Advertising platforms release

Hi, can one of you @jordanrburger @michaljurecko  approve and merge this PR, please?
it was tested by @jordanrburger , confirmation is here: https://keboolaglobal.slack.com/archives/CHPE0FPU5/p1665147061815989
approve of the release is here: https://keboolaglobal.slack.com/archives/CHPE0FPU5/p1664439236075299
Thank you.

Good to go!


Fix: Update URL in each ruleMeta

All the rules have TBD assigned in the ruleMeta object. Update these to the real URLs where the rule's README can be found

Bonus if we can get the rule name in the pretty-printed logs to be clickable to the rules URL for quick reference.


gpmf_demo.c with time-lapse SEGV / program incompatible?

Hi,
I'm trying to show the timing and packet information from a time-lapse recording. The recording does appear to have a data stream.
However, the short recordings I have cause a SEGV when using the gpmf_demo.c
The SEGV is caused by a problem in cleanup, with the following sequence of events:
https://github.com/gopro/gpmf-parser/blob/master/demo/GPMF_mp4reader.c#L895
for the time lapse videos, sample count is always 1, while num seems to be the number of frames or something, so always greater than 1.
This causes the loop of entries to exit, without setting mp4->basemetadataduration
The program continues to:
https://github.com/gopro/gpmf-parser/blob/master/demo/GPMF_demo.c#L144
calling:
https://github.com/gopro/gpmf-parser/blob/master/demo/GPMF_mp4reader.c#L1007
which exits with an error condition, jumping to cleanup, which SEGV, in GPMF_FreeCodebook due to ms->cbhandle being improperly initialized in this code path (although this is hard to see because metadata_stream is used uninitialised.
https://github.com/gopro/gpmf-parser/blob/master/demo/GPMF_demo.c#L63
maybe consider something like
GPMF_stream metadata_stream = {0}, ...
(this does in fact fix the SEGV - as now pointers are initialised to 0 -  but doesn't fix the parsing issue)
I'm trying to do this to show timing information for meta data streams in the time-lapse footage.
Thanks!

That was bug fixed in the develop branch, I just moved that fix over.

Awesome. Thanks for merging the fix.


Add a sensor as a Target

Hi,
Thanks for the card, it is really awesome and it really helps enhancing my views.
I am using this bar-card for my NUT sensors and I have two sensors I wanted to combine into one car card. First is the Current battery level and second is the low battery set point.
I created a bar-card for my Current battery level and I wanted to add the second sensor as my target but I could not as it only allows numbers.
The easy workaround is to input the number of my sensor as it is a static value but I was wondering if this is something you would consider.
Not critical but nice to have.
Thanks

Hey hey! This is already possible with the help of template-card. It allows you to use any entity value from HA as an input for a config. So I probably won't be adding this to the card.

Thanks. Did not think of that. I will have a look.
Thanks and great job for the card


How to load codes from file ,such like .py .java .cpp .js?

How to load codes from file ,such like .py .java .cpp .js?
And  how to embedding them to vectors?

You can use the unstructured file loader to load your text file and then split along class definition. Currently, there is only a python splitter in the python langchain text splitter.
from langchain.document_loaders import UnstructuredFileLoader
from langchain.text_splitter import PythonCodeTextSplitter

loader = UnstructuredFileLoader("./example_data/state_of_the_union.txt")

docs = loader.load()

python_splitter = PythonCodeTextSplitter(chunk_size=30, chunk_overlap=0)
python_code = python_splitter.create_documents([docs])

Thank you for your professional response


error when training my own dataset

Can anybody help me?

The log shows that you are pass a 'None' class_name to class_dict. Maybe you can check your dataset and avoid some dirty data.

Follow the author's DEVELOP GUIDE, I create a small VOC format dataset and related python file in this project as follows, BUT I met weird error that I don't understand why, Can anyone help me?  THANK YOU!

(tensorflow1) 123456@ubuntu-server-syp1:~/SSD-1.2$ python train.py --config-file configs/vgg_ssd300_mydata.yaml
2019-07-25 10:16:52,464 SSD INFO: Using 1 GPUs
2019-07-25 10:16:52,465 SSD INFO: Namespace(config_file='configs/vgg_ssd300_mydata.yaml', distributed=False, eval_step=2500, local_rank=0, log_step=10, num_gpus=1, opts=[], save_step=2500, skip_test=False, use_tensorboard=True)
2019-07-25 10:16:52,465 SSD INFO: Loaded configuration file configs/vgg_ssd300_mydata.yaml
2019-07-25 10:16:52,465 SSD INFO:
MODEL:
NUM_CLASSES: 1
INPUT:
IMAGE_SIZE: 300
DATASETS:
TRAIN: ("my_custom_dataset_trainval",)
TEST: ("my_custom_dataset_test", )
SOLVER:
MAX_ITER: 120000
LR_STEPS: [80000, 100000]
GAMMA: 0.1
BATCH_SIZE: 1
#BATCH_SIZE: 16
LR: 1e-3
OUTPUT_DIR: 'outputs/vgg_ssd300_mydata'
2019-07-25 10:16:52,465 SSD INFO: Running with config:
DATASETS:
TEST: ('my_custom_dataset_test',)
TRAIN: ('my_custom_dataset_trainval',)
DATA_LOADER:
NUM_WORKERS: 0
PIN_MEMORY: True
INPUT:
IMAGE_SIZE: 300
PIXEL_MEAN: [0, 0, 0]
MODEL:
BACKBONE:
NAME: vgg
OUT_CHANNELS: (512, 1024, 512, 256, 256, 256)
PRETRAINED: True
BOX_PREDICTOR: SSDBoxPredictor
CENTER_VARIANCE: 0.1
DEVICE: cuda
META_ARCHITECTURE: SSDDetector
NEG_POS_RATIO: 3
NUM_CLASSES: 1
PRIORS:
ASPECT_RATIOS: [[2], [2, 3], [2, 3], [2, 3], [2], [2]]
BOXES_PER_LOCATION: [4, 6, 6, 6, 4, 4]
CLIP: True
FEATURE_MAPS: [38, 19, 10, 5, 3, 1]
MAX_SIZES: [60, 111, 162, 213, 264, 315]
MIN_SIZES: [30, 60, 111, 162, 213, 264]
STRIDES: [8, 16, 32, 64, 100, 300]
SIZE_VARIANCE: 0.2
THRESHOLD: 0.5
OUTPUT_DIR: outputs/vgg_ssd300_mydata
SOLVER:
BATCH_SIZE: 1
GAMMA: 0.1
LR: 0.001
LR_STEPS: [80000, 100000]
MAX_ITER: 120000
MOMENTUM: 0.9
WARMUP_FACTOR: 0.3333333333333333
WARMUP_ITERS: 500
WEIGHT_DECAY: 0.0005
TEST:
BATCH_SIZE: 10
CONFIDENCE_THRESHOLD: 0.01
MAX_PER_CLASS: -1
MAX_PER_IMAGE: 100
NMS_THRESHOLD: 0.45
2019-07-25 10:16:54,062 SSD.trainer INFO: No checkpoint found.
2019-07-25 10:16:54,069 SSD.trainer INFO: Start training ...
Traceback (most recent call last):
File "train.py", line 119, in
main()
File "train.py", line 110, in main
model = train(cfg, args)
File "train.py", line 48, in train
model = do_train(cfg, model, train_loader, optimizer, scheduler, checkpointer, device, arguments, args)
File "/home/123456/SSD-1.2/ssd/engine/trainer.py", line 82, in do_train
loss_dict = model(images, targets=targets)
File "/home/123456/anaconda3/envs/tensorflow1/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/123456/SSD-1.2/ssd/modeling/detector/ssd_detector.py", line 16, in forward
detections, detector_losses = self.box_head(features, targets)
File "/home/123456/anaconda3/envs/tensorflow1/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/123456/SSD-1.2/ssd/modeling/box_head/box_head.py", line 25, in forward
return self._forward_train(cls_logits, bbox_pred, targets)
File "/home/123456/SSD-1.2/ssd/modeling/box_head/box_head.py", line 31, in _forward_train
reg_loss, cls_loss = self.loss_evaluator(cls_logits, bbox_pred, gt_labels, gt_boxes)
File "/home/123456/anaconda3/envs/tensorflow1/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/123456/SSD-1.2/ssd/modeling/box_head/loss.py", line 34, in forward
classification_loss = F.cross_entropy(confidence.view(-1, num_classes), labels[mask], reduction='sum')
File "/home/123456/anaconda3/envs/tensorflow1/lib/python3.6/site-packages/torch/nn/functional.py", line 2056, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File "/home/123456/anaconda3/envs/tensorflow1/lib/python3.6/site-packages/torch/nn/functional.py", line 1871, in nll_loss
ret = torch._C._nn.nll_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
RuntimeError: invalid argument 2: non-empty vector or matrix expected at /opt/conda/conda-bld/pytorch_1556653183467/work/aten/src/THCUNN/generic/ClassNLLCriterion.cu:31

I'm also having the same issue, whilst can't figure out why. Help would be appreciated.


Trick to modify widely implemented traits

raw-window-handle is used as a bridge between window "provider" and window "consumer" crates. As of writing it has 82 reverse dependencies.
The main trait HasRawWindowHandle has changed from version 0.3 to 0.4, specifically the return type of a method is a bit different.
But adding a blanket impl<T: New> Old for T means that all "provider" crates will be able to upgrade to 0.4 without breaking changes (because by implementing the new trait, they still implement the old one), see https://github.com/rust-windowing/raw-window-handle/pull/74.
Once most "provider" crates have upgraded, "consumer" crates can make a breaking change and require the new trait, but the breakage will be minimal because most "provider" crates already implement the new trait.
I'm posting this here in case anyone has some input on my reasoning, and maybe someone else can use this instance of the semver trick in the future.

Thanks for sharing!


AIXpb: check for X11 readiness

Checklist

[x] commit message has one of the standard prefixes

[ ] faq.md updated if appropriate

[ ] other documentation is changed or added (if applicable)

[ ] playbook changes run through VPC or QPC (if you have access)

[ ] for inventory.yml changes, bastillion/nagios/jenkins updated accordingly

The playbooks need to stop because later playbook (e.g., yum role) steps depend on X11 readiness

Playbook now reports which of the three components tested (X11.base, X11.extensions, X11.vfb) is missing - on failure to pass readiness check.

Is this required for the release?

superseded by #2453


[POC] Try Release Candidate for gatsby-plugin-mdx v4 & mdx v2

Replace by https://github.com/process-analytics/process-analytics.dev/pull/654


Don't open partially downloaded files in external app

Fixes #810
It might be cleaner to handle this directly in the PlaybackControlleropenItem method, or to create a noop dispatcher function?

LGTM


What means magic and why this word was used as a name?

https://en.wikipedia.org/wiki/Magic_number_(programming)
They're enumerations with constants identifying things. It's a bad habit to call them magic numbers. In this case, doubly so since there are two different enumerations, both with the name Magic. I'll rename it to something more sensible.

Thanks for the explanation. No need to rename. I will do that myself, since I am doing a refactor and new features in my branch. Once I am done there, I will merge it to master.


client version problem

When I run clair-scanner -w example-alpine.yaml --ip <IP_ADDRESS> alpine:3.5, it gives me th following error:
2018/02/16 13:07:34 [INFO] ▶ Start clair-scanner
2018/02/16 13:07:34 [CRIT] ▶ Could not save Docker image [alpine:3.5]: Error response from daemon: client version 1.36 is too new. Maximum supported API version is 1.35
Before that command I run the following two commands:
docker run -p 5431:5432 -d --name db arminc/clair-db:2018-02-15
docker run -p 6060:6060 --link db:postgres -d --name clair arminc/clair-local-scan:v2.0.1
What's the solution?

Previously I was using the master branch of armin/clair-scanner
But after updating to release v7 of this repo, it solved.


(WCAG 2.1) Applicant program list page button aria-labels are incorrect

Required to meet WCAG 2.1 guidelines. Identified during an accessibility audit against WCAG 2.1.
WCAG SC:  2.5.3 Label in Name
Observed results: The Edit and Continue buttons all have accessible labels that start with "Apply..."
How to fix: Update the aria-label attribute text on the Continue and Edit buttons to say "Continue..." and "Edit...".

This one's a bit tricky since we also localize the screenreader text. As part of creating the new sections, we added localization for the rendered text, but failed to render a screenreader equivalent.
For example, the "Apply" button has screenreader text of "Apply to ".
If an application is in progress, we show "Continue" visually, but don't have a translation for this yet.
If an application has already been submitted, we show "Edit".
Proposal
For both submitted / in-progress applications, add new entries for strings to be translated but don't yet consume them from the UI. Once the translations are in, make use of them.
While waiting for those translations, use the existing entry we have for editing a question here for both submitted / in-progress applications (code).


Please provede a Jar file for the 1.64 release

Describe the bug
Prior releases for librespot-java provide a jar file for direct downloading from the releases.  The jar file is used by the Home Assistant Homepod Connect addon which has good user base and is one the better and easier ways to achieve multi-room Spotify audio through Owntone.
Please provede a Jar file for the 1.64 release so the addon will continue to work.
I greatly appreciate your continuing support for librespot-java.  There is currently no drop-in replace for libresport java that can send audio and metadata through a pipe to Owntone and also has a Home Assistant control api.  I hope these features will be implemented in librespot-golang so it can be a drop in replacement for the Homepod Connect addon.
Thanks,
iVolt1

My bad, I published the wrong release. Should be fixed now: https://github.com/librespot-org/librespot-java/releases/tag/v1.6.4


Rework Response.ignore_channels and add unignore_channels.

Currently, the ignore_channels method returns a new response that removes ignored channels. This was intended as a short-term band-aid fix but evidently has some issues as you have to preserve your initial response in its own object causing duplication of data as well as being unintuitive.
Ignore channels should be reworked to use a mask based system instead. convolve_response should always be convolved with the model evaluated on the complete energy grid and then the ignored channels should then be removed via this mask.
Practically speaking, the mask should be initialized with the response object and then modified by the current ignore_channels method. The addition of "add_channels" or "unignore_channels" also would allow users to "turn back on" channels that they no longer want to ignore as the use of a mask means information about the response is not removed.
Changes to this system may have an impact on things such as attributes (nchans) so should be thoroughly checked in implementation.

This doesn't make sense - people ignore energies when fitting so this shouldn't apply to the response, but the data. Thus, this should be put into the data/fitting objects/methods, rather than in the response.


🔴 Ecosystem Project Idea: Alternative Fault Detector

What is an Ecosystem Project Idea?
An Ecosystem Project Idea is an idea for a project that someone could build within the Optimism ecosystem. As opposed to an Ecosystem Concept or an Ecosystem Idea, an Ecosystem Project is generally more fleshed out and corresponds to a relatively clear product to be built.

Summary
L2 state proposals are published to the L2OutputOracle contract, and it's crucial that these proposals align with the accurate L2 state. OP Labs has built a service—the fault detector—that confirms this. However, to enhance the robustness of the system, it would be useful to have a secondary, independent implementation of the fault detector. This will provide an extra layer of assurance and help detect any potential bugs in the current fault detector.
Possible Features

Listen for new output proposal events for a given L2 block number.
Locally generate an output proposal for that specific L2 block number.
Perform a comparison between the locally generated proposal and the one received.
Flag any discrepancies between the two, raising an error when necessary.

Impact

Serve as a safeguard against potential bugs in the current fault detector.
Enhance the reliability and security of our L2 state verification process.
Provide peace of mind through this added layer of validation.

@smartcontracts just some questions about this:

interpreting this as an alternative implementation of op-program, does it need all the fault proof functionality or just yes/no that the derivation logic and state transition function matches the L2OracleOutput?
what is the acceptance criteria (are there any restrictions around implmentation language/component reuse)?

@aodhgan, if you are not working on this yet, we would like to take this forward 💪

@smartcontracts
Here's the link to alternative implementation of fault detector https://github.com/LiskHQ/op-fault-detector we built in Go.
Please take a look


chore: remove unnecessary package

Livewire V3 is bundled with alpine.js and its plugins (except sort plugin).

Thank you for the PR 💜.


Slow api, ETIMEDOUT, ECONRESET, ECONNREFUSED

const ewelink = require('ewelink-api');

(async () => {
  let start = Date.now();
  const connection = new ewelink({
    email: '...',
    password: '...',
    region: 'eu',
  });
  console.log('connection', (Date.now() - start) / 1000);

  try {
    /* get all devices */
    start = Date.now();
    const devices = await connection.getDevices();
    console.log('devices', (Date.now() - start) / 1000);

    /* get specific devide info */
    start = Date.now();
    const device = await connection.getDevice('...');
    console.log('device', (Date.now() - start) / 1000);

    console.log('end');
  } catch(e){
    console.log('exception', (Date.now() - start) / 1000);
    console.log(e);
  }
})();

Above code results in wide range of connection errors:
\...\_ewelink-test>node test.js
connection 0

\...\_ewelink-test\node_modules\node-fetch\lib\index.js:1505
                        reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
                               ^
FetchError: request to https://eu-api.coolkit.cc:8080/api/user/login failed, reason: connect ECONNREFUSED <IP_ADDRESS>:8080
    at ClientRequest.<anonymous> (\...\_ewelink-test\node_modules\node-fetch\lib\index.js:1505:11)
    at ClientRequest.emit (node:events:527:28)
    at TLSSocket.socketErrorListener (node:_http_client:454:9)
    at TLSSocket.emit (node:events:527:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  type: 'system',
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED'
}

\...\_ewelink-test>node test.js
connection 1

\...\_ewelink-test\node_modules\node-fetch\lib\index.js:1505
                        reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
                               ^
FetchError: request to https://eu-api.coolkit.cc:8080/api/user/device?lang=en&appid=...&ts=1677441318&version=8&getTags=1 failed, reason: read ECONNRESET
    at ClientRequest.<anonymous> (\...\_ewelink-test\node_modules\node-fetch\lib\index.js:1505:11)
    at ClientRequest.emit (node:events:527:28)
    at TLSSocket.socketErrorListener (node:_http_client:454:9)
    at TLSSocket.emit (node:events:527:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  type: 'system',
  errno: 'ECONNRESET',
  code: 'ECONNRESET'
}

\...\_ewelink-test>node test.js
connection 0
exception 17.593
FetchError: request to https://eu-api.coolkit.cc:8080/api/user/login failed, reason: connect ECONNREFUSED <IP_ADDRESS>:8080
    at ClientRequest.<anonymous> (\...\_ewelink-test\node_modules\node-fetch\lib\index.js:1505:11)
    at ClientRequest.emit (node:events:527:28)
    at TLSSocket.socketErrorListener (node:_http_client:454:9)
    at TLSSocket.emit (node:events:527:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  type: 'system',
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED'
}

\...\_ewelink-test>node test.js
connection 0
exception 68.915
FetchError: request to https://eu-api.coolkit.cc:8080/api/user/login failed, reason: read ECONNRESET
    at ClientRequest.<anonymous> (\...\_ewelink-test\node_modules\node-fetch\lib\index.js:1505:11)
    at ClientRequest.emit (node:events:527:28)
    at TLSSocket.socketErrorListener (node:_http_client:454:9)
    at TLSSocket.emit (node:events:527:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  type: 'system',
  errno: 'ECONNRESET',
  code: 'ECONNRESET'
}

\...\_ewelink-test>node test.js
connection 0
exception 168.683
FetchError: request to https://eu-api.coolkit.cc:8080/api/user/login failed, reason: read ECONNRESET
    at ClientRequest.<anonymous> (\...\_ewelink-test\node_modules\node-fetch\lib\index.js:1505:11)
    at ClientRequest.emit (node:events:527:28)
    at TLSSocket.socketErrorListener (node:_http_client:454:9)
    at TLSSocket.emit (node:events:527:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  type: 'system',
  errno: 'ECONNRESET',
  code: 'ECONNRESET'
}

Pinging the IP of the endpoint works.
Running the same code on linux server does work most of the time but the times of execution are unacceptable:
# node test.js
connection 0
devices 28.744
device 11.362
end
# node test.js
connection 0
devices 88.173
device 13.592
end
# node test.js
connection 0.001
exception 172.009
FetchError: request to https://eu-api.coolkit.cc:8080/api/user/device?lang=en&appid=...&ts=1677442551&version=8&getTags=1 failed, reason: connect ETIMEDOUT <IP_ADDRESS>:8080
    at ClientRequest.<anonymous> (/root/_/ewelink-test/node_modules/node-fetch/lib/index.js:1505:11)
    at ClientRequest.emit (node:events:378:20)
    at TLSSocket.socketErrorListener (node:_http_client:462:9)
    at TLSSocket.emit (node:events:378:20)
    at emitErrorNT (node:internal/streams/destroy:188:8)
    at emitErrorCloseNT (node:internal/streams/destroy:153:3)
    at processTicksAndRejections (node:internal/process/task_queues:81:21) {
  type: 'system',
  errno: 'ETIMEDOUT',
  code: 'ETIMEDOUT'
}

It was working good before, it started to malfunction about 2 days ago so ~ 2023-02-24

Same here. Stopped working 1-2 days ago. If anyone has a clue how to fix it it would be great. In the meanwhile you can consider switching to webhooks. A little bit cumbersome to setup with ewelink web (scenes) but works until there is a bugfix.

Same issue (not a surprise ... the same enpoint). What is a kind of surprise - the websocket callbacks work still well.

Same Problem, where I can report this issued=?

Same problem here :(

Seems like https://eu-api.coolkit.cc:8080 is not responding (or very inconsistently).
The 'us' server is responding, but cannot be user with EU ewelink accounts...

There are talks on the eWeLink Telegram group about how their server may have been overloaded, maybe an accidental DDoS through someone's bad code.  I can get a login every now and then, but then as soon as you try do anything it seems the authentication is now broken as well.  So I keep getting a { error: 406, msg: 'Authentication failed' } response.

I also believe the accidental DoS is a likely explanation. That answers why the websocket interface still works well ... without any delay. Btw the status of the "main" control API is not consistent, a while ago it worked well. At this moment it still works but slow (~20 sec delay).

Interestingly the mobile app and web portal are triggering my relays instantly.  Apparently the API this package uses is not officially supported by eWeLink, so I don't think we can count on a quick resolution from them here.  Busy fishing around the web portal to see if there's anything I can grab onto there.  We have a production access control system running on this service (hindsight is 20/20), so I really need to get this sorted out ASAP.

FYI https://coolkit-technologies.github.io/eWeLink-API/#/en/PlatformOverview

Has anyone tested branch 4.0.0 already? IDK if it's worth spending time testing it

Has anyone tested branch 4.0.0 already? IDK if it's worth spending time testing it

It's not an issue of this library, its a problem on eweLink's server, so you can't fix it by changing to any version of this library here.
Hopefully it will be back soon. The https://eu-api.coolkit.cc:8080 response went from 503 to the OpenResty default page already, so they are working on it.

Just noticed that this branch changes API addresses and uses V2, maybe it uses different routes on load balancers and works, just didn't have time to test it

I just testing th api now, and its works fine without delay, seems solved now!!!. 3 days to solved this, is  too much.... There are other way to control ewelink devices? Sonoff zero in lan does not work correctly in certain situations with 2 canal devices.. there is some documentation to work with the devices on lan? without this api?


Performance issues with nested blocks

Performance issues with nested blocks
Currently, the bottom up data lookups (from block to page) are slow or almost impossible in some cases (when using Fluent and locale us unknown). These are the most common cases of such lookups:

CMS fields - block level CMS fields depend on page data
templates - block level templates logic depends on page data
dev tasks - dev tasks needs to match block to pages (starting from block context)

Deeply nested data structures may not be that uncommon either. Consider this example:
Page
  ElementalArea
    RowBlock (represents grid row on frontend)
     ElementalArea
       AccordionBlock (block which can contain other content blocks)
         ElementalArea
           ContentBlock

This module supports following bottom up data lookups:

ElementalArea::getOwnerPage() - this method returns most immediate owner object not necessarily the top page, the method is cached in-memory but needs to be called several times on different objects when traversing bottom up. In our example above this method would return AccordionBlock when calling from deepest located elemental area

BaseElement::getPage() - this method is just a cached (in-memory) proxy to the ElementalArea::getOwnerPage() so it doesn't necessarily return the top page

Fixed in https://github.com/dnadesign/silverstripe-elemental/pull/774

@bergice This issue can now be closed as the related PR was merged.


OAK-10281 : draft of handling recoveryDelayMillis directly as paramet…

…er in isRecoveryNeeded

@rishabhdaim , this (which is actually part of OAK-10651) was created as part of an earlier discussion - question now is : how to move forward with this. Not sure we need to keep this PR open - we could as well close it but not delete the branch and have still have the code around for a while (until we'd prune branches). Wdyt?

Closing this to indicate that this was a draft and is currently not being worked upon. It can always be picked up again - the underlying branch won't be deleted.


Turn off Travis CI

We've had Github Actions working for a bit, and I am not aware of any regressions between Actions and Travis CI since #337 (which affected Travis as well).
Does anyone object to turning Travis off?

Not at all!
Github Actions are great!


Kind reminder: Project, PA2 and Exercise 6 (and lab 5 and lab 4) is over.

So yeah, you can close these issues of yours now.
Help to declutter the forum.

YAY

thanks haodong

Thanks Hao Dong

Thank you so much Hao Dong. Really.