tidy: database.js promise cleanup.

This PR does the following things:

Pulls pwd, appPath, and the fetch dynamic import polyfill into a utils.js.

The dynamic import is needed because electron doesn't spoort es module syntax.

database.js has been cleaned up to return promises natively via async instead of wrapping everything in extra layers of promises.
Some streamlining has been done with respect to opening/closing dbs. TCG collection price checks/updates should now be much faster and more reliable when cold as I batched them into a Promise.all.
electron-rebuild has been added as a dev dependency to facilitate node upgrades and reruns of electron.
axios calls have been replaced with fetch across the board for the middleware.

Missed a pwd in tests. Looking at the rest tests and will refactor to remove axios dep in there while I'm at it.

Tests updated.

Built a test executable and it failed to load the database.

@jgunzelman88 Everything should be good now. Electron not supporting esm got me right in the getter: https://github.com/electron/electron/issues/21457


Failed to read schema document https://www.eolang.org/xsd/XMIR-0.46.0.xsd

Recently one of the pipelines in jeo-maven-plugin failed with the following error:
-1:-1: schema_reference.4: Failed to read schema document 'https://www.eolang.org/xsd/XMIR-0.46.0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.

build.log
Moreover, it failed only on ubuntu system. On macos everything is fine.

@yegor256 Could you take a look, please? This issue blocks any progress in jeo-maven-plugin.

Where it happened:
    at com.jcabi.xml.StrictXML.<init> (StrictXML.java:122)
    at com.jcabi.xml.StrictXML.<init> (StrictXML.java:93)
    at com.jcabi.xml.StrictXML.<init> (StrictXML.java:84)
    at com.jcabi.xml.StrictXML.<init> (StrictXML.java:74)
    at org.eolang.jeo.representation.VerifiedEo.asXml (VerifiedEo.java:71)

@volodya-lombrozo the URL is valid. The problem most probably is related to some instability of network connection. The best we can do is to introduce a retrying mechanism to StrictXML, but I'm not sure how exactly...

@yegor256 I believe we shouldn't rely on an internet connection here. It creates an enormous number of bugs and flaky tests. It's better to keep everything local. In other words, now we can't develop without the internet. Btw, it is often the case.
As you can see, I faced with this problem immediately.

@yegor256 btw, it might be interesting https://stackoverflow.com/questions/28267536/how-to-refer-to-a-classpath-xsd-in-xsischemalocation


Add generic plugin

thanks Alex, need brief write up to accompany this plugin please.. here/ or docs.pulsetile.com preferably


Allow user to load more layer patterns or modify existing layer patterns

would be nice if I could load layer patterns or modify existing layer patterns.

A pattern is actually an algorithm and can not be easily described.
Can you give some details/samples (ideally drawings) about the layer pattern you might need and how you would like to modify an existing layer patten?
Is this feature available on any other palletisation software?

I thought so. I need this layer pattern, but it doesn't appear in box/pallet analysis.

Thanks for your reply.

It looks like this solution does not give better result in term of efficiency than a column layout.
Can give case + pallet dimension or send .stb file at fgasnier71_at_gmail_dot_com (replace at and dot)?

I've sent you an email.

I am not sure I can understand what you mean.
You need the pattern shown above (that actually appear as index 50 in your case/pallet analysis) to be also available in box/case analysis. Is that right?
If so, I can tell you that it does not appear in your box/case analysis only because of different conditions (e.g. box does not seem to be have length = 2*width as case in pallet analysis)
Regards,

The index 50 is

But I need this layer pattern

Thanks, you found a bug.
I failed to notice that layer 1 and 2 are actually the same which makes no sense.
This should be corrected when I build the new version.
Regards,

Thank YOU!


Wheel no longer supported by Google Colab

I downloaded the notebook from the Colab link in the readme. I uploaded it to a fresh Colab environment. I ran the first cell and got:

ERROR: torch-0.3.0.post4-cp36-cp36m-linux_x86_64.whl is not a supported wheel on this platform

This seems like a more updated and usable version of the notebook: https://colab.research.google.com/github/harvardnlp/annotated-transformer/blob/master/AnnotatedTransformer.ipynb


Elegantly handle lost internet connection retry

Maybe make all falcorControllers register with a global object whether they are mounted or not, so we know all the components to recall the fetch on

It would probably use something like the Material UI Snackbar or something similar, letting the user know they have lost internet, and asking them to retry, or possibly pinging to check for internet on a regular basis. This issue probably also needs a better description

This could come in handy -
https://github.com/HubSpot/offline


Update dependencies in composer.lock

@TechieForFun could you please address https://github.com/swaggest/json-diff/issues/27 here by removing
    "phpunit/php-code-coverage": "2.2.4",
    "codeclimate/php-test-reporter": "^0.4.0"

from dev deps?

@vearutop sure, but please note there is still a problem with this version of phpunit that is abandoned package phpunit/phpunit-mock-objects, which has no replacement. but as you mentioned in #27  because lib is still gonna support this version of php it should be there.


Column sorting with dates?

Is it possible to sort date columns without the datepicker library?
I've tried adding the columns to dateColumns and setting a toMomentFormat but now I'm getting an error about datepicker being missing. I don't need to filter, just sort.

I should probably remove the datepicker requirement when the column is not filterable (either because filterByColumn is set to false, or it is not included in the filterable array).
Otherwise, it makes sense to require it, as a free text filter is not really the way to go.
In the meantime, just iterate over your data and turn the date strings into moment objects yourself before passing it to the component (which is exactly what toMomentFormat does behind the scenes).

Thanks! If anyone else needs this you don't need to set dateColumns for date sorting to work using moment objects.


Fix - A tooltip does not appear above the mentioned user with no conversation history

Details

Looks like what I stated in my proposal had already existed before TS-migration pr https://github.com/Expensify/App/pull/33275 unnecessarily changed || or to nullish coalescing operator ?? so only needed to revert that change.
Fixed Issues

$ https://github.com/Expensify/App/issues/35554
PROPOSAL: https://github.com/Expensify/App/issues/35554#issuecomment-1921470375
Tests

Precondition: Be offline (this is because in this PR we are fixing the tooltip not-showing problem before the BE returns the personal details data after mentioning)

Navigate to any conversation
Paste the text "<EMAIL_ADDRESS>into the Compose Box ( mention a contact that you don't have any conversation before)
Send the message
Hover over the mention "<EMAIL_ADDRESS>in the conversation
Verify that the tooltip is shown

[x] Verify that no errors appear in the JS console

Offline tests

QA Steps

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native

iOS: mWeb Safari

MacOS: Chrome / Safari

https://github.com/Expensify/App/assets/38649957/ce0b0880-ecc1-407a-b139-8a81445f30c1

MacOS: Desktop

https://github.com/Expensify/App/assets/38649957/74988756-3448-456f-8f81-8c59cdecba48

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by https://github.com/Julesssss in version: 1.4.43-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.43-20 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Similarity checks are not working (input)

Expected behavior
When I input an instruction which contains a misspelled verb such as "schedle" the NLP module should compare the input word with the module verbs (I think?) and call the most similar module.
Actual behavior
schedle a meeting with Mark at 15:00
./lib/nlp/nlp.py:37: UserWarning: [W008] Evaluating Doc.similarity based on empty vectors.
  similarity = doc_action.similarity(doc_verb)
I did not understand

Steps to reproduce
Might not be reliable, I only get the warning the on first input after starting the CLI, but it never understands the input.

start cli
input schedle a meeting with Mark at 15:00

Additional context
When I look at the code in nlp.py (around line 37) there seems to be code which is supposed to handle this which is why I marked it as a bug.

I suggest moving the fuzzy search from automation to the NLP class, such that we do both similarity checks and misspelling checks.

Yeah this sounds better since it's some sort of data preprocessing it should be done before the NLP tries to interpret it.


Quicker filtering and selection of a single item

Summary of the new feature / enhancement
As a user I want to be able to use Out-ConsoleGridView to filter and select an item with the fewest number of actions to speed up the selection process.
Proposed technical implementation details (optional)
This is the current sequence of actions that need to be performed:

Run command Get-Process | Out-ConsoleGridView -OutputMode Single
Hit Tab to focus on the filter to be able to start typing
Do a search, e.g., "Firefox"
Hit Enter to move the focus from the filter to the grid
Hit Enter again to select the object and close the grid view

The proposed solution is to add settings to allow this sequence of actions:

Run command Get-Process | Out-ConsoleGridView -OutputMode Single
(Filter gets focused automatically) Do a search, e.g., "Firefox"
Hit Enter:

Scenario A. Given only one result is matched, then select the object and close the grid view
Scenario B. Given multiple results are matched, then focus on the grid and allow to move up/down to select the desired item and hit Enter to confirm the selection and close the grid view

Dupe of https://github.com/PowerShell/ConsoleGuiTools/issues/127
Right?


Highcharts directive inside ng-repeat

I am trying to insert line graphs within each day cell of a month-view calendar. The calendar itself is a pure Angularjs implementation rendered with ng-repeat. Inside ng-repeat, I have the Highcharts directive instantiated, so presently, each cell gets the same data points for the chart as follows:

The data for the sparkline comes in from 'options'. My question is, how could I render separate data for each day cell based on the 'dateTitle'?

Can you show some code what you tried so far? It's not the right place to issue a bug ,it's specific to high chart which angular doesn't provide.Please bug a issue/concern to Stackoverfow

Please read the contributing guidelines; these types of questions are ill-suited for GitHub. Thanks!


Incorrect type inference for array rest assignment and inability to add annotation

TypeScript Version:  2.7.1-insiders.20180127

Search Terms: array destructuring rest assignment
Code
// A *self-contained* demonstration of the problem follows...
// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.
const [stringA, ...numbers] = ['string', 1, 2];
// const [stringA, ...numbers] = <[string, number, number]>['string', 1, 2];
// const [stringA, ...numbers]: [string, number[]] = ['string', 1, 2];
// const [stringA, ...numbers]: [string, [number, number]] = ['string', 1, 2];

Expected behavior: Expect numbers to be of type number[] rather than (string | number)[].
TS also does not allow annotating as a tuple
Actual behavior: const numbers: (string | number)[]
Playground Link:  http://www.typescriptlang.org/play/index.html#src=const [stringA%2C ...numbers] %3D ['string'%2C 1%2C 2]%3B
%2F%2F const [stringA%2C ...numbers] %3D <[string%2C number%2C number]>['string'%2C 1%2C 2]%3B
%2F%2F const [stringA%2C ...numbers]%3A [string%2C number[]] %3D ['string'%2C 1%2C 2]%3B
%2F%2F const [stringA%2C ...numbers]%3A [string%2C [number%2C number]] %3D ['string'%2C 1%2C 2]%3B
Related Issues:

@mhegazy so how would the numbers rest assignment be annotated as a tuple? I believe I tried to this in the last line:
const [stringA, ...numbers]: [string, [number, number]] = ['string', 1, 2];

The right type should be const [stringA, ...numbers]: [string, number, number]. and numbers should be inferred correctly. that is a bug we should fix.

I have run into this issue too with overload function

// I have tried this but it does not work
interface OperatorTuple extends Array<OperatorFunction<any, any>> {
  0: OperatorFunction<any, any>;
  1: OperatorFunction<any, any>;
  2: OperatorFunction<any, any>;
  3: OperatorFunction<any, any>;
  4: OperatorFunction<any, any>;
  5: OperatorFunction<any, any>;
  6: OperatorFunction<any, any>;
  7: OperatorFunction<any, any>;
  length: 8;
}

// this is an overload function
export function Select<A, B>(mapFn: ((state: A) => B), ...operators: OperatorFunction<any, any>[]) {
  return function(target: any, name: string): void {
    if (typeof mapFn !== 'function') {
      throw new TypeError(
        `Unexpected type '${typeof mapFn}' in select operator,` + ` expected 'function'`
      );
    }

    // trying to cast type tuple
    operators = [...operators] as OperatorTuple;

    const descriptor = Object.getOwnPropertyDescriptor(target, name);

    if (delete target[name]) {
      Object.defineProperty(target, name, {
        get() {
          const source$ = NgrxSelect.store;

          if (!source$) {
            throw new Error('NgrxSelect not connected to store!');
          }

         // I have tried this too but have failed
         if (operators.length > 8) {
            throw new Error()
         }

          // Error: Expect 0-9 arguments but received 1 or more
          return source$.pipe(select(mapFn), ...operators);
        },
        ...descriptor
      });
    }
  };
}

The issue in the opening post is fixed in typescript@next, maybe even 3.0.0-rc.
numbers is now of type number[].


jck: hardcode jck.env.runtime.url.ftpURL value

without this we get: Configuration file can not be imported due to question with specified tag "jck.env.runtime.url.httpURL" was not found on path. The path is:jck.intro

@gdams , could you share the name of the test target that this fixes?

@Mesbah-Alam it fixes tests in jck-runtime-api-java_net_0. The fix is actually carried over from the old systemtest repo: https://github.com/adoptium/aqa-systemtest/blob/master/openjdk.test.jck/config/jck8c/runtime.jti#L199


Config + readme updates

Few changes here:

Updated readme

New logo
Reordered content a little to make it flow more naturally
Added a bit more content in a couple of places

Updated config file

Removed unused reference indices, made config much shorter
Combined process config options into blocks (modules + errorStrategy)
Fixed a couple of minor bugs (defining undefined params, adding {} for some settings where they were required

Updated script a little

Added --fastqc to TrimGalore, so FastQC runs after trimming is complete
Removed default genome, so no longer runs as Human by default
Defined some previously undefined params
Moved variable checks above main log header output
Moved UPPMAX specific Rlocation default into config file instead of main script
Added bash pipefail headers so that error logs are more informative.

NB: Haven't tried running this myself yet. Would be nice to set up a docker container for local + automated testing.

Tested and worked as expected.

Brilliant, thanks! 👍


Decide what the format of DSDay24 is. Are we doing multiple events?

What
Decide on how we will split DSDay 2024, as 2023's 2-day event was a bit full-on and fatiguing for the team.
Why
So that the team can manage the event better, and so that the community can benefit throughout the year.
Who needs to work on this
Community Designer, Snr Delivery Manager, Snr Product Manager, Assct Delivery Manager
Who needs to review this
DM & PM
Done when

[ ] Scope out Design & election events throughout the year
[ ] Plan spread of f2f and online events
[ ] Think about capacity and timings of other work
[ ] Think about & write justification for the purpose of each event - DSDay after summer to rejuvenise community
[ ] Create presentation for PM & DM
[ ] Agree cadence of events with PM & DM

Pre-election period (Purdah) info
2024 local elections
A number of councils will have elections on Thursday 2 May 2024.
The latest date that the pre-election period can start for the local elections is Tuesday 26 March 2024.
For the Mayor of London and London Assembly elections the latest date that the pre-election period can start is Tuesday 19 March 2024.
The date may change in the event of days being appointed for public thanksgiving or mourning.

Design System monthly chats planned for the last week of the month
Government Design Systems Assembly currently planned as a quarterly event (1st meeting 05/03/24)

[Early DSDay 2024 decisions](https://docs.google.com/presentation/d/1X4-MHPg8FEIu6YQQoh-Htn489PZM6mc_nPCgoiWjcLE/edit#slide=id.g2be7dfa8709_0_0


force quitting all not force quitted or specified elements

as like for loop app list +system nd if force quit button is active app.force_quit a couple of times and then further to next app
and that repeat every one minute
with whitelist
so it quits all like non google vendor services and all the non removeable bullshitts
thered be loop app list; check if not force quitted already, check if not in whitelist, force quit function a couple of times, then further next app element, every specified time like every minute
like named brevent_all +whitelist mode
see any way to code it ?
as brevent is now, it doesnt force quit much and many elements that the force quit function / button would work are disabled
peace /xmb

Please use normal English, don't short it.

In short, won't implement.

ok sad byee
this english i write samely i speak it
bye
On Thu, May 17, 2018, 11:53 Liu DongMiao<EMAIL_ADDRESS>wrote:

In short, won't implement.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/brevent/Brevent/issues/352#issuecomment-389811830,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Ali37ZsjPccyXtwGz2jAnuhuk2PGyjlqks5tzUibgaJpZM4UCq8-
.


More info needed for garage example

Hi. I've been playing with the garage example and it could use a paragraph or two of explanation. Does a reed switch need a 10K resistor pull-up on GPIO pin 4? I can't seem to get my run of the mill door switch to fire the contact sensor callback. The Makefile has REED_PIN as GPIO 4 (D2 on the Wemos) and RELAY_PIN as GPIO 2 (D4 on the Wemos).
So I wired up:

Reed switch to Wemos D2 and 3V3
3V3 Relay
-- Relay VCC to Wemos 3V3
-- Relay GND to Wemos GND
-- Relay IN to Wemos D4

The reed switch doesn't fire the callback. So maybe there's something wrong with my switch.
The included wemos.h file that's not used with the garage example has comments about a 10k pull-up on GPIO pin. I tried sticking a 10K resistor on the GPIO side and it didn't seem to change anything. No REED_PIN callback.

Got it. This post in the Sonoff-Tasmota project helped: https://github.com/arendst/Sonoff-Tasmota/issues/2792#issuecomment-390810029


BatchFlag

It become too good if you add a batch switch to get endpoints from a directory having a bunch of js files.

Hey,
Yeah, It is a good Idea and it's not hard to code for the same, It would be nice of you to make a pull request regarding the same.
Thanks


Polishing the tile - bit by bit it gets even better..

So there are a number of small code improvements and clean up in this commit to reduce some clutter and make it more efficient.  Possible bug with the balance check due to a type mismatch has been handled with explicit conversion for the check.

bit by bit!


remove Init backend .. it is just a part of a fedrated backend to whi…

…ch pure publishing jobs are submitted to

Coverage decreased (-0.06%) to 89.483% when pulling fb33ee37e0ab82b14611e660499c1d1b419237f3 on removeInitbackend into bf03e615f6ff7d6f7cd41ea8f36ffee565e45a6d on master.


Collect runtime statistics

What this PR does / why we need it:
We want to collect some data so we'll be able to analyze it
later and get a better picture of bottlenecks and performance.
Special notes for your reviewer:
My only concern is that the _profile function will slow things down a bit.
On the other hand, we'll have good data to analyze within a few days.
Release note:
NONE

/hold

ci test please


[INTERNAL] Add CodeQL Action

Coverage remained the same at 92.901% when pulling b43a582fca20fef6538372a9e01aeb0bf78fd9b8 on codeql into 9feddff3c6907ee9dbfcf4f6710f4cc68261ee64 on master.

Can't really be tested in a PR because:

Missing analysis for base commit 9feddff
This usually happens when you enable code scanning for the first time, or if the build failed. Since there is no analysis in the base branch, we do not know if there are any new alerts in this commit. If you enabled analysis on push, you should check for alerts for this branch in the security tab.


UDP Broadcast Relay not working after upgrade to OPNsense 22.1

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:

[X] I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
[X] I have searched the existing issues, open and closed, and I'm convinced that mine is new.
[X] The title contains the plugin to which this issue belongs

Describe the bug
After upgrading OPNsense to version 22.1, the plugin UDP Broadcast Relay is not working anymore. The service itself is running and it seems to do something, since I can see the Multicast traffic in a packet trace. But devices cannot be discovered acress VLAN's.
Tip: to validate your setup was working with the previous version, use opnsense-revert (https://docs.opnsense.org/manual/opnsense_tools.html#opnsense-revert)
To Reproduce
Steps to reproduce the behavior:

Install UDP Broadcast Relay on an OPNsense system running version 22.1
Configure UDP Broadcast Relay.
Try to send multicast traffic through OPNsense, it won't find devices across VLAN's.

Expected behavior
Devices should be discovered through Multicast across VLAN's.
Screenshots
Relevant log files
If a packet trace log would be helpful, I can provide this.
Additional context
UDP Broadcast Relay was working fine for me until I upgraded to version 22.1. Before upgrading I was running version 21.7.
When testing this, I'm using an iPhone connected to a VLAN on subnet <IP_ADDRESS>/24 and trying to use Sonos and Spotify to cast/control music on another VLAN on subnet <IP_ADDRESS>/24.
This is how UDP Broadcast Relay is configured:

Environment
Software version used and hardware type if relevant.
e.g.:
OPNsense 22.1-amd64
FreeBSD 13.0-STABLE
Network Intel I211-AT Gigabit NIC

Not likely to be the daemon, but I'll check it out on my systems this week and see what happens.

Maybe this is also related to assigning parent interface and/or maybe setting promisc mode in interface section

Just checked after updating my test unit and I can see the packets being pushed between the LANs. Nothing funky, just a straight install on my test unit. When I am able I'll put the test unit live and see what happens then, it'll sometime this week.

Any new info? I'm having the same problem.


feat: add libp2p wasm bindings

exposes the torii client libp2p functions to wasm and dojo.js

Wondering if we should turn this into a package at some point, logic seems contained enough

Probably for v1 we can just move createRelayInterface.ts into one the packages.


'Go to Definition' Reports 'No Definition Found' for External Assemblies

Issue Description
'Go to Definition' Reports 'No Definition Found' for External Assemblies
Steps to Reproduce

Declare string typed variable in any code block.

Note, string type can be replaced with any type defined in an external assembly.

Right click on type declaration.
Select 'Go to Definition'

Expected Behavior
New tab of assembly metadata is opened.
Actual Behavior
The following message appears: 'No definition found for ...'
Notes
I have tested this on the previous version of the C# extension, 1.21.3, and it does not have this issue.
I have also replicated the results on projects targeting netcoreapp2.2 and netcoreapp3.0.
Logs
OmniSharp log
Starting OmniSharp server at 10/7/2019, 8:08:20 PM
    Target: c:\Working\Tests\OmniSharpDefinitionTest

OmniSharp server started.
    Path: C:\Users\dlambert\.vscode\extensions\ms-vscode.csharp-1.21.4\.omnisharp\1.34.4\OmniSharp.exe
    PID: 18364

[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on Windows 6.2.9200.0 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 2 MSBuild instance(s)
            1: Visual Studio Professional 2019 16.3.29318.209 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin"
            2: StandAlone 16.0 - "C:\Users\dlambert\.vscode\extensions\ms-vscode.csharp-1.21.4\.omnisharp\1.34.4\.msbuild\Current\Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: Visual Studio Professional 2019 16.3.29318.209 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin"
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in 'c:\Working\Tests\OmniSharpDefinitionTest'.
[info]: OmniSharp.Cake.CakeProjectSystem
        Could not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
        No solution files found in 'c:\Working\Tests\OmniSharpDefinitionTest'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for 'c:\Working\Tests\OmniSharpDefinitionTest\OmniSharpDefinitionTest.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in 'c:\Working\Tests\OmniSharpDefinitionTest'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: c:\Working\Tests\OmniSharpDefinitionTest\OmniSharpDefinitionTest.csproj
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.EditorConfigWorkspaceOptionsProvider, Order: 200
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location 'c:\Working\Tests\OmniSharpDefinitionTest' on host 17172.
[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file 'c:\Working\Tests\OmniSharpDefinitionTest\OmniSharpDefinitionTest.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
        Adding project 'c:\Working\Tests\OmniSharpDefinitionTest\OmniSharpDefinitionTest.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Update project: OmniSharpDefinitionTest
[info]: OmniSharp.Roslyn.CSharp.Services.Diagnostics.CSharpDiagnosticWorkerWithAnalyzers
        Solution initialized -> queue all documents for code analysis. Initial document count: 3.

C# log
No C# log output
Environment information
VSCode version: 1.38.1
C# Extension: 1.21.4
Dotnet Information
.NET Core SDK (reflecting any global.json):
 Version:   3.0.100
 Commit:    04339c3a26
Runtime Environment:
OS Name:     Windows
OS Version:  10.0.17763
OS Platform: Windows
RID:         win10-x64
Base Path:   C:\Program Files\dotnet\sdk\3.0.100\
Host (useful for support):
Version: 3.0.0
Commit:  7d57652f33
.NET Core SDKs installed:
2.1.700 [C:\Program Files\dotnet\sdk]
2.2.300 [C:\Program Files\dotnet\sdk]
2.2.401 [C:\Program Files\dotnet\sdk]
3.0.100 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

Visual Studio Code Extensions

Extension
Author
Version

azure-account
ms-vscode
0.8.4

Bookmarks
alefragnani
10.5.0

bracket-pair-colorizer
CoenraadS
1.0.61

code-settings-sync
Shan
3.4.3

code-spell-checker
streetsidesoftware
1.7.18

csharp
ms-vscode
1.21.4

docomment
k--kato
0.1.8

gitlens
eamodio
10.1.0

markdown-pdf
yzane
1.3.1

material-icon-theme
PKief
3.9.1

Material-theme
zhuangtongfa
2.28.2

mssql
ms-mssql
1.6.0

plantuml
jebbs
2.12.1

powershell
ms-vscode
2019.9.0

uridecode
sryze
0.3.5

vscode-azurefunctions
ms-azuretools
0.18.1

vscode-html-css
ecmel
0.2.3

vscode-markdownlint
DavidAnson
0.30.2

xml
DotJoshJohnson
2.5.0

After more digging, I think this issue comes from the update to omnisharp-roslyn 1.34.4 and specifically the pull request: https://github.com/OmniSharp/omnisharp-roslyn/pull/1582

Thanks. this is a duplicate of https://github.com/OmniSharp/omnisharp-roslyn/issues/1624
It is already fixed here https://github.com/OmniSharp/omnisharp-roslyn/pull/1625
there is a pre-release OmniSharp that can be used as workaround.
"omnisharp.path": "1.34.5-beta.28"


Provide an option to hide conn open and conn close messages

I'm using this on OpenWrt. Although it runs greatly, there're still times that it doesn't work. I want to consult the log for details, but the logs are flooded with conn open and conn close messages. I wonder if you can add an option to hide these messages, or put them to stdout instead of stderr?

You can use 2>&1 to redirect stderr to stdout, then use |grep -v "conn open"|grep -v "conn close"to filter those message out.

option added


Question on ASP heuristic solution

Hi, Ben.
After reading your paper - Conflict-Driven Answer Set Solving:From Theory to Practice, I feel such heuristics is really state-of-the-art.  As for further optimization on ASP, did you ever think of utilizing some sufficient conditions for ASP ?
For example, Fages showed that a call-consistent normal logic program always has an answer set in 1994 and give a polynomial algorithm to construct an answer set. Later Bonatti extended the result in 2002 in his paper "Reasoning with infinite stable models II: Disjunctive programs".
Actually, based on clasp, I have a toy implementation of the algorithm mentioned above. In my repo, clasp_plus. However, after experiments, I find only few problems contain such structures. In other words, those sufficient conditions seem useless.
When I happen to notice that the developers of clasp are also on Git hub, I can't help leaving a comment here to ask how you think of those sufficient conditions.
Bests,
Kinsang

Hi Kinsang,
in clasp, we only use structural conditions like "tightness" and "head-cycle-freeness".
You might want to look into work around the DFLAT system, which uses particular results from parameterized complexity for decomposed ASP solving.
Best regards,
Ben
PS: I vaguely remember call-consistency but I'm actually not familiar with the result regarding the polynomial construction of an answer set. Can you give me a pointer on this?

Hi Ben,
The polynomial construction are related to a few publications.

Papadimitrious C H, Yannakakis M. Tie-breaking semantics and structural totality. 1997
Fages F. Consistency of Clark's completion and existence of stable models. 1994

Ususally, only positive edges are taking into consideration in an atom dependency graph. The definitin of negative edge is similar to that of postive edge, but it links negative literals in the body with the head.
Call-consistency means: there is no cycle containing an odd numberof negative edges.
Let's make an example satisfying this condition:
a :-  not b.
b :- not a.
The atom dependency graph contains a cycle with two negative edges. The number is even, so this is a call-consistent program. According to the properties of call-consistency condition, it must have an answer set.
The detail of construction is somewhat complex, if you are interested in it, I could post more information here.
PS, about half year ago, I sent you some emails for details in clasp.  Your reply really helped me a lot. I am a senior student and my graduation design is about structural conditions in answer set solvers. For the spirit of open source, I am glad to contribute a little bit.
Best,
Kin

Thank you for the pointers!


Scope issue in estimate_gas_cost in provider.py

There seems to be a scope access issue with the local variable traces, that does not get declared.
https://github.com/ApeWorX/ape/blob/a8d1487d063bbb9e12e25ce1fa796bd83ef69cdb/src/ape_ethereum/provider.py#L294-L305

This is a duplicate from: https://github.com/ApeWorX/ape/issues/1957 - apologies. I ll let the owners close this issue.


Support UpdateEvent for Update Operations

#926 Want feedback on the approach
TODO

Haven't added all events, want to discuss approach.
Some tests are failing, since snapshotOperation is null

@rdblue . Sorry I think this went in by mistake. This is not ready for review yet [Thought the final version would be somewhat similar]

This is blocked on #968

This rb is ready for review again. As for #968 .  For now we can override updateEvent() to return a null. Later we can fix it as described here: https://github.com/apache/incubator-iceberg/pull/968#discussion_r415416694

Thanks @rdsr, this looks mostly good, although I think the file lists in the event might be incomplete. I'd suggest removing them and just sending the summary, unless you have a use case for them.
I'd also like to get fast appends and snapshot manager changes done as soon as we can -- ideally in this PR. That way, we can guarantee that all changes to table contents produce events. Events aren't as useful unless you know you're getting all of the changes.

I think the file lists in the event might be incomplete. I'd suggest removing them and just sending the summary, unless you have a use case for them.
I thin sending the summary is fine by me.

@rdblue . Thanks for the helpful review. I've address your comments and also added events for FastAppends and SnapshotsManager

Overall, I think this is ready. I'd prefer to use current instead of refresh in the updateEvent methods, though. I'd probably wait to merge until then.
It would also be good to follow up with events in snapshot manager: rollback, fast-forward, and set current snapshot.
Last, I think that this is going to send events each time an individual operation is committed in a transaction. That's okay for now, but we may want to go back through and suppress events during a transaction and then send them all at once when the transaction succeeds. That will handle retries better.

Thanks @rdblue . I'll create followups for the remaining items


SerializerBase.Serialize produces truncated string

SerializerBase has the code:
public void Serialize(object obj, Stream stream, Encoding encoding)
{
        // NOTE: we don't use a 'using' statement here because
        // we don't want the stream to be closed by this serialization.
       // Fixes bug #3177278 - Serialize closes stream
       var sw = new StreamWriter(stream, encoding);
       // Push the current object onto the serialization stack
       SerializationContext.Push(obj);
       // Push the current encoding on the stack
       var encodingStack = GetService<IEncodingStack>();
       encodingStack.Push(encoding);
       sw.Write(SerializeToString(obj));
       // Pop the current encoding off the serialization stack
       encodingStack.Pop();
       // Pop the current object off the serialization stack
      SerializationContext.Pop();
}

This is resulting in the stream having a truncated string written to it if that string is bigger than the default buffer size.
the 2 options are:

call sw.Flush() after sw.Write();
wrap the StreamWriter in a using block but use the overload StreamWriter(Stream stream, Encoding encoding, int bufferSize, bool leaveOpen) & set leaveOpen to true

ae6f95dcc1c5d36d76bdb123ffd9d91f9d2369b9

Naturally .NET 4.0 doesn't have a leaveOpen constructor parameter for streams.
I really should just leave .NET 4.0 behind. Supporting it is way more terrible than it should be.

Fix published in Nuget package 2.2.15


Adds different storage mechanisms for session management

Description
Your application has a session for each user in which you can store small amounts of data that will be persisted between requests. The session is only available in the controller and the view and can use one of a number of different storage mechanisms:

This PR adds the following storage mechanism:

Adds Cookies Session using new cookies storage
Adds Redis Session storage

Amber::Session::CookieStore
Amber::Session::RedisStore
# Todo
Amber::Session::DBStore
Amber::Session::MemCacheStore

All session stores use a cookie to store a unique ID for each session (you must use a cookie, Amber will not allow you to pass the session ID in the URL as this is less secure).
For most stores, this ID is used to look up the session data on the server, e.g. in a database table. There is one exception, and that is the default and recommended session store - the CookieStore - which stores all session data in the cookie itself (the ID is still available to you if you need it). This has the advantage of being very lightweight and it requires zero setup in a new application in order to use the session. The cookie data is cryptographically signed to make it tamper-proof. And it is also encrypted so anyone with access to it can't read its contents. (Amber will not accept it if it has been edited).
Impportant
About Session Cookie Store

You can only store about 4kb of data in a cookie.
Cookies are sent along with every request you make.
If you accidentally expose your secret_key_base, your users can change the data you’ve put inside your cookie.

About Redis Store

You can store more than 4kb of data in the session, only the session id gets stored in the cookie.
This means smaller request

Configuration
@session = {
        :key     => "#{project_name}.session",
        :store   => :cookie, # :redis, must provide redis URL
        :expires => 2 * 60 * 60, # 2 Hours
        :secret  => secret,
        :redis_url => "redis://localhost:6379"
      }

Accessing Session
Session values are stored using key/value pairs like a hash:
class ApplicationController < Amber::Controller::Base
  # Finds the User with the ID stored in the session with the key
  # **:current_user_id** This is a common way to handle user login in
  # an Amber application; logging in sets the session value and
  # Logging out removes it.
  private def current_user
    @_current_user ||= session[:current_user_id] &&
      User.find_by(id: session[:current_user_id])
  end
end

To store something in the session, just assign it to the key like a hash:
class LoginsController < ApplicationController
  # "Create" a login, aka "log the user in"
  def create
    if user = User.authenticate(params[:username], params[:password])
      # Save the user ID in the session so it can be used in
      # subsequent requests
      session[:current_user_id] = user.id
      redirect_to root_url
    end
  end
end

To remove something from the session

class LoginsController < ApplicationController
  # "Delete" a login, aka "log the user out"
  def destroy
    # Remove the user id from the session
    session.delete[:current_user_id]
    redirect_to root_url
  end
end

Extending Creating your own session store
To create new session store must follow the Amber::Router::Session::AbstractStore interface.

I tried using the new session and got an error.
    session["test"] = "hello"
    ^~~~~~~

in lib/amber/src/amber/controller/base.cr:32: Can't infer the type of instance variable '@session' of HomeController

The type of a instance variable, if not declared explicitly with
`@session : Type`, is inferred from assignments to it across
the whole program.

The assignments must look like this:

  1. `@session = 1` (or other literals), inferred to the literal's type
  2. `@session = Type.new`, type is inferred to be Type
  3. `@session = Type.method`, where `method` has a return type
     annotation, type is inferred from it
  4. `@session = arg`, with 'arg' being a method argument with a
     type restriction 'Type', type is inferred to be Type
  5. `@session = arg`, with 'arg' being a method argument with a
     default value, type is inferred using rules 1, 2 and 3 from it
  6. `@session = uninitialized Type`, type is inferred to be Type
  7. `@session = LibSome.func`, and `LibSome` is a `lib`, type
     is inferred from that fun.
  8. `LibSome.func(out @session)`, and `LibSome` is a `lib`, type
     is inferred from that fun argument.

Other assignments have no effect on its type.

Can't infer the type of instance variable '@session' of HomeController

      @session ||= context.session
      ^~~~~~~~


Switch to Amazon Linux 2 from CoreOS

@garymoon, did you skip the updated folder structure intentionally?  It would be really nice to bring the AMI structure inline with our non-AMI recommendations so we can give customers a single set of setup instructions rather than maintain multiple versions.

@jvanderhoof I did. The only thing in scope for this PR is changing the base OS. The old PR will remain open for further changes.


Automated cherry pick of #1097: fix: 1. 403 on zone/capabilities, parameters

Cherry pick of #1097 on release/2.10.0.
#1097: fix: 1. 403 on zone/capabilities, parameters

Codecov Report

:exclamation: No coverage uploaded for pull request base (release/2.10.0@7e082a7). Click here to learn what that means.
The diff coverage is 0%.

@@               Coverage Diff                @@
##             release/2.10.0   #1098   +/-   ##
================================================
  Coverage                  ?   7.87%
================================================
  Files                     ?     356
  Lines                     ?   56547
  Branches                  ?       0
================================================
  Hits                      ?    4455
  Misses                    ?   51696
  Partials                  ?     396

Flag
Coverage Δ

#aFlag
7.87% <0%> (?)

Impacted Files
Coverage Δ

pkg/cloudcommon/db/rbac.go
0% <0%> (ø)

pkg/cloudcommon/db/db_dispatcher.go
0% <0%> (ø)

pkg/cloudcommon/db/fetch.go
0% <0%> (ø)

pkg/compute/models/specs.go
0% <0%> (ø)

Continue to review full report at Codecov.

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


Fix static_assert feature detection on clang

I had an unused typedef warning as shown below. Looks like static_assert couldn't be found on clang
This PR fixes it.
cppformat/posix.cc:162:3: warning: unused typedef 'Assert163'
      [-Wunused-local-typedef]
  FMT_STATIC_ASSERT(sizeof(fmt::LongLong) >= sizeof(file_stat.st_size),
  ^

Thanks!


feature/provider validation

Added adm login which when logging redirects to the adm control panel.
In the control panel adm has the ability to accept or reject new provider accounts (accounts with the variables: adm, provider and client set to false), if the account is rejected, the account is deleted
and if accepted, the provider value is changed to true.
Trello: https://trello.com/c/uS639HHF

 Painel do ADM

 cadastro de fornecedor deve ser aprovado pelo adm


How to debug Error - Unable to execute database query-Error: Cannot enqueue Query after fatal error.

Hello,
I know this is little stupid question at first but i am getting following error only some time
unable to execute database query-Error: Cannot enqueue Query after fatal error.
i want to solve issue but before solve issue we need to replicate issue but i am facing above issue less time only 5-6 time in last 3 month but i dont know how to replicate issue.
Thank you,
Nirmal Goswami

Hi @nirmalgoswami ! You need to add error handler to your connection object and create new connection once you see error. Or, better, use connection pool

Hi @sidorares Thanks for reply.I have already error handler thats why i am able to get error but question is how to replicate issue :)

Well, you need to add the code in the error handler to discard connection (and maybe do some other cleanup or create a new connection)

Hi @nirmalgoswami it's hard to really answer without seeing your code. I'm going to close the issue since there hasn't been any follow up for a couple months.
Perhaps I can add a bit of explanation for what the error means that may help:
The Error: Cannot enqueue Query after fatal error error is an error that occurs when you call connection.query on a dead connection object. The connection specifically died due to a "fatal error". What specifically that fatal error was you'd have to tell us, as it would have been emitted on the connection object prior to the Error: Cannot enqueue Query after fatal error error at some point (the error object would have a fatal property set to true).
Some common fatal errors are TCP connection disruptions, either from the MySQL closing the connection for idling for longer than what you configured your MySQL server to allow, or some accidental network hiccup (a router rebooting, firewall restarting, something).


[Bug] Put Player In Vehicle

This is no longer working in 1.4

A temporary fix for this is taking the server.lua from 1.4 and using it with 1.3 that will also allow mysql to work and will have to be used. This is only a temporary solution for players that want to know. (I have been using this with no new issues.)

The error code in console that goes with this is as follows...
Error running system event handling function for resource police: citizen:/scripting/lua/scheduler.lua:39: Failed to execute thread: server/server.lua:195: attempt to concatenate a nil value (field 'force_player_get_in_vehicle_part_2')
stack traceback:
server/server.lua:195: in upvalue 'handler'
citizen:/scripting/lua/scheduler.lua:124: in function citizen:/scripting/lua/scheduler.lua:123
stack traceback:
[C]: in function 'error'
citizen:/scripting/lua/scheduler.lua:39: in field 'CreateThreadNow'
citizen:/scripting/lua/scheduler.lua:123: in function citizen:/scripting/lua/scheduler.lua:92

should be fixed, please test and notice me

Testing. I think some new issues might have show up now. I will report

Everything seems to be working well!


Sending request to websocket takes forever.

I created basic websocket php to check and when i call the test file. The request take forever to complete. I followed the guide from official docs (http://socketo.me/docs).
I am calling this php to start a websockets.
<?php
// API for privacy setting of user for blocking/Message Limit
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
//file_put_contents('zee.log',print_r($_POST,true));

// Function to send the SDP and user IDs to the server
function sendSDP($sdp, $userIdA, $userIdB)
{
    // Create a new cURL resource
    $ch = curl_init();

    // Set the cURL options
    curl_setopt($ch, CURLOPT_URL, "callSocketChat_2008.php");  `callSocketChat_2008.php` file
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array(
        'sdp' => $sdp,
        'userIdA' => $userIdA,
        'userIdB' => $userIdB
    )));
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    // Execute the cURL request
    $response = curl_exec($ch);

    // Check for errors
    if ($response === false) {
        echo "cURL Error: " . curl_error($ch);
    } else {
        // Request successful, display the response
        echo $response;
    }

    // Close the cURL resource
    curl_close($ch);
}

// Test the sendSDP function
$sdp = "SDP valuexx YY"; // Replace with your actual SDP value
$userIdA = "4"; // Replace with your actual User ID A value
$userIdB = "8"; // Replace with your actual User ID B value

sendSDP($sdp, $userIdA, $userIdB);

?>

This is the Ratchet file where i am creating the socket.
<?php
// Enable error reporting and display errors for debugging purposes
error_reporting(E_ALL);
ini_set('display_errors', 1);

require_once("/home/bitnami/vendor/autoload.php");
use Ratchet\MessageComponentInterface;;
use Ratchet\ConnectionInterface;

class WebSocketHandler implements MessageComponentInterface {
    protected $clients;

    public function __construct() {
        $this->clients = new \SplObjectStorage();
		print_r("Print Value ");
    }

    public function onOpen(ConnectionInterface $conn) {
        // Handle new WebSocket connection
        // You can add the connection to $this->clients for future reference
		//$request = $conn->httpRequest;
        //$userId = $_POST['userId']; // Assuming the user ID is received in the POST request

        // Save the user ID in the resourceId property of the connection
        $conn->resourceId = $userIdA;

        // Add the connection to the clients list
        $this->clients->attach($conn);
        echo "New connection! ({$conn->resourceId})\n";
    }

    public function onMessage(ConnectionInterface $from, $msg) {
        // Handle incoming WebSocket message
        // You can process the message and send a response back to the client
    }

    public function onClose(ConnectionInterface $conn) {
        // Handle WebSocket connection close
        // You can remove the connection from $this->clients if necessary
	    $this->clients->detach($conn);
    }

    public function onError(ConnectionInterface $conn, \Exception $e) {
        // Handle WebSocket error
        // You can log or handle the error as needed
    }
}

// Get the SDP and user IDs from the request
$sdp = $_POST['sdp'];
$userIdA = $_POST['userIdA'];
$userIdB = $_POST['userIdB'];

// Fetch user details from the elaxer database using the user IDs
$userDetailsA = fetchUserDetails($userIdA);
$userDetailsB = fetchUserDetails($userIdB);

// Send push notification to wake up User B's device
//sendPushNotification($userDetailsB['fcmToken']);

// Wait for User B's device to establish a WebSocket connection
$waitForConnectionTimeout = 30; // Timeout in seconds
$startTime = time();
while (time() - $startTime < $waitForConnectionTimeout) {
    // Check if User B's device has connected to the WebSocket
    if (userDeviceConnected($userIdB)) {
        // User B's device connected, retrieve SDP from the elaxer database
        $sdpB = fetchSDP($userIdB);

        // Save User A's SDP in the elaxer database
        saveSDP($userIdA, $sdp);

        // Return User B's SDP to User A
        echo $sdpB;
        exit;
    }

    // Wait for a short duration before checking again
    sleep(1);
}

// Instantiate WebSocketHandler

//$server = \Ratchet\Server\IoServer::factory(
  //  new \Ratchet\Http\HttpServer(
    //    new \Ratchet\WebSocket\WsServer($webSocketHandler)
    //),
    //8080 // Change the port number if needed
//);

// Set up the WebSocket server using Ratchet
$server = Ratchet\Server\IoServer::factory(new WebSocketHandler(),20081); // Change the port number if needed
$server->run();

// Timeout reached, handle the case when User B's device didn't connect
handleTimeout();

// Fetch user details from the elaxer database using the user ID
function fetchUserDetails($userId)
{
    // Implement the logic to fetch user details from the elaxer database
    // Return an array containing the user details
}

// Send push notification to wake up User B's device
function sendPushNotification($fcmToken)
{
    // Implement the logic to send a push notification using FCM to the specified FCM token
}

// Check if User B's device has connected to the WebSocket
function userDeviceConnected($userId)
{
    // Implement the logic to check if User B's device has connected to the WebSocket
    // Return true if the device is connected, false otherwise
}

// Fetch SDP from the elaxer database using the user ID
function fetchSDP($userId)
{
    // Implement the logic to fetch SDP from the elaxer database using the user ID
    // Return the retrieved SDP
}

// Save SDP in the elaxer database using the user ID
function saveSDP($userId, $sdp)
{
    // Implement the logic to save the SDP in the elaxer database using the user ID
}

// Handle the case when User B's device didn't connect within the timeout
function handleTimeout()
{
    // Implement the logic to handle the timeout case
    // For example, you can return an error response or perform a fallback action
}

?>

I call the test file from postman and postman stuck at sending response.... prompt.
When i call  netstat -anp | grep LISTEN to check open ports mentioned in the above code, present in the list of open ports when request still waiting for the reply from onOpen.
There must be some issue with my code and i missed something from the official docs. Please help me and let me know if i miss anything.

@varun7952 I see you closed this ticket, so I can assume you resolved your problem in the meantime. If you find the time, please give us an update over your situation so others with the same problem have the ability to find an answer in here :)

@SimonFrings  The still not resolved but i have made some progress so that's why deleted this questions and add new one with more details here


How to update data in collection with query, data, upsert, multi to update?

Hi,
I read the code and still don't find the way to update the collection like what I want.
I saw we have updatedFields option but it's only query path.
I want to know about the update_data path -> in $set update only field I want to update other keep it.
In Mongo update command have something I mostly use.
query -> find match records to update
update_data -> what field need to be update in $set: {field: value}
upsert
multi.
Please help provide some example about that.
Thanks.

Hi @giaosudau ,
We doesn't support multiUpdate, we allow replaceOne wich is enable with updateFields option, if you use it, you have to set the fields that you can check its values (filter) to replace this concrete element, and the dataframe have to have all the fields that you want to keep in the collection.
This project is not intended to do update operations.
Anyway, you can contribute and share an implementation for this.
Thanks for your feedback!

#95
Please check this

watching for a graceful update operation too


Fix bugs with iPad split screen transitions on iOS 9

The view to be presented may have incorrect frame due to split screen transitions. These animations are fixed: crossfade, cube, fold, and portal.

Thanks :-)


Update vendor for AIX support

Hi,
Is it possible to update golang.org/x/sys/unix and Bowery/prompt under vendor in order to allow AIX support ? It seems to be enough. All tests are passing locally after that.
It don't think making a PR just for that is relevant. Tell me if you want one anyway.
Thanks in advance.
Edit: I've forgotten that I'd manually updated Bowery/prompt because my PR isn't yet accepted... So you can update golang.org/x/sys/unix but Bowery/prompt will need to be updated once my https://github.com/Bowery/prompt/pull/21 is accepted. I'll warn you when this is possible. Sorry about that delay.
Edit2: PR in Bowery/prompt has been accepted. Therefore, everything can be updated.

Send a PR, it will be faster this way.


listen tcp :8080: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.

Hi @vip123456789,
Can you provide the full log? from the title I can only guess that you have somehow opened it up two times, or the api port default is already taken (8080)

edgevpn proxy --config vpn.yaml
When I run this command without "--api", it will also start a http server on :8080

By the way, I want to know how to use the proxy function, thank you!


Prevent infinite load when avatar upload fails

Proposed Changes

Fixes #8877
Handled failed upload

@ohcnetwork/care-fe-code-reviewers
Merge Checklist

[ ] Add specs that demonstrate bug / test a new feature.
[ ] Update product documentation.
[ ] Ensure that UI text is kept in I18n files.
[ ] Prep screenshot or demo video for changelog entry, and attach it to issue.
[ ] Request for Peer Reviews
[ ] Completion of QA

When a user attempts to upload a non-permitted image, the system currently throws an error and closes the entire pop-up. This should not be the expected behavior. Instead, the user should remain on the same pop-up, where the error message is displayed, allowing them to re-select and upload an appropriate image.

When a user attempts to upload a non-permitted image, the system currently throws an error and closes the entire pop-up. This should not be the expected behavior. Instead, the user should remain on the same pop-up, where the error message is displayed, allowing them to re-select and upload an appropriate image.

Made some changes and this is how it works now:
https://github.com/user-attachments/assets/1ef8c9e7-8fd3-4f30-a315-6b8805c26947

it's still stuck in infinite loading :/

it's still stuck in infinite loading :/

I checked it again and it's working properly for me 🤔
Uploading Recording 2024-10-23 162712.mp4…

it's still stuck in infinite loading :/

I checked it again and it's working fine 🤔
https://github.com/user-attachments/assets/0455b33d-9e4e-4531-8479-9dc79ca58cba

@noufalrahim can you try updating the profile pic instead of facility cover image?

@nithish1018 can you try updating the profile pic instead of facility cover image?

Thank you, I added the fix for it

clear merge conflicts; rest lgtm

LGTM


Various tweaks to reduce main bundle size

Related to #1921
Description
This PR includes a few ways to reduce the size of the main.js bundle

Make the dependencies used by dsMarkdown for Markdown support lazy-loaded in the same way as the MathJax plugin
(this saves about 80kb)
Enforce per-function imports for lodash so it can be properly optimized by tree-shaking
(this saves about 16kB)
Remove the json5 dependency from runtime code; convert i18n files to plain JSON in Webpack instead
(this saves about 9kB and reduces the size of served i18n files slightly)

Instructions for Reviewers

Confirm that the dsMarkdown pipe still works by checking out some Items with Markdown in dc.abstract
Confirm that i18n files are now served as plain JSON, and that i18n still works in SSR and CSR
Confirm that the added ESLint rule disallows imports likeimport { map, filter } from 'lodash';

Instead, they'll have to beimport map from 'lodash/map';
import filter from 'lodash/filter';

Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

[x] My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
[x] My PR passes TSLint validation using yarn run lint
[x] My PR doesn't introduce circular dependencies
[x] My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
[x] My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
[x] If my PR includes new, third-party dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.

Merging this immediately as the changes are small, but very important.  That way I can also update my main.js reduction PRs as needed after this is merged.


RT-1.12

Summary
BGP always compare MED

Priority
P0

Status
Ready for development

Procedure
Establish BGP sessions as follows between ATE and DUT   ATE port 1 emulates two eBGP neighbors peering the DUT advertising the same prefixes  eBGP neighbors 1 and 2 are associating MED values of 100 and 50 on the advertised routes  Enable “always-compare-med” knob on the DUTValidate traffic flowing to the prefixes received from eBGP neighbor 2 from DUT.  Disable MED settings on DUT and ATE ports  Validate the change of traffic flow because of the change  Validate session state and capabilities received on DUT using telemetry.

Config Parameter coverage
/config/remote-private-as/route-selection-options/config/always-compare-med/global/afi-safis/afi-safi/route-selection-options/config/always-compare-med/global/route-selection-options/config/always-compare-med

Telemetry Parameter coverage
/state/remote-private-as/global/afi-safis/afi-safi/route-selection-options/state/always-compare-med/global/route-selection-options/state/always-compare-med

Protocol/RPC Parameter coverage

Minimum DUT platform requirement
vRX

Summary
BGP always compare MED

Priority
P0

Status
Ready for development

Procedure
Establish BGP sessions as follows between ATE and DUT   ATE port 1 emulates two eBGP neighbors peering the DUT advertising the same prefixes  eBGP neighbors 1 and 2 are associating MED values of 100 and 50 on the advertised routes  Enable “always-compare-med” knob on the DUTValidate traffic flowing to the prefixes received from eBGP neighbor 2 from DUT.  Disable MED settings on DUT and ATE ports  Validate the change of traffic flow because of the change  Validate session state and capabilities received on DUT using telemetry.

Config Parameter coverage
/config/remote-private-as/route-selection-options/config/always-compare-med/global/afi-safis/afi-safi/route-selection-options/config/always-compare-med/global/route-selection-options/config/always-compare-med

Telemetry Parameter coverage
/state/remote-private-as/global/afi-safis/afi-safi/route-selection-options/state/always-compare-med/global/route-selection-options/state/always-compare-med

Protocol/RPC Parameter coverage

Minimum DUT platform requirement
vRX

PR https://github.com/openconfig/featureprofiles/pull/1693 is created for this testcase.


Travis-CI stopped building things some time ago

We need to move this to GitHub actions because of admin settings I'm unable to merge anything as long as the CI is not working.
I have a pretty simple way of converting things, which requires tox-gh-actions and its really straightforward, see: https://github.com/yourlabs/django-session-security/blob/master/.github/workflows/tests.yml

please let me know if you need some access in order to implement it, but you should be able to do it yourself?

Working on it.

I created a PR but I need a review AND a passing CI @bubenkoff .
This probably means you need to disable those CI checks for now, then merge, then get GitHub Actions working, then re-enable them.
While we're at it, you could merge #159 which I reviewed.


[WIP] Update versions file to match Cilium update

Why is this PR needed?
The version of Cilium needs bumped to match the upcoming fix.  This requires that the updated images exist, first.  Hence WIP.
Fixes #
What does this PR do?
Matches Cilium version string to pending release version
Anything else a reviewer needs to know?
N/A
Info for QA
N/A
Related info
https://build.suse.de/package/view_file/Devel:CaaSP:4.0/cilium/cilium.spec?expand=1
Status BEFORE applying the patch
N/A
Status AFTER applying the patch
N/A
Docs
No documents I'm aware of refer to a specific Cilium version.
Merge restrictions
(Please do not edit this)
We are in v4-maintenance phase, so we will restrict what can be merged to prevent unexpected surprises:
What can be merged (merge criteria):
    2 approvals:
        1 developer: code is fine
        1 QA: QA is fine
    there is a PR for updating documentation (or a statement that this is not needed)

Hi!
New code has been merged in master regarding terraform 0.12. Please rebase your branch to take this changes in.
Happy hacking

PR is long obsolete :shrug:


docs(api): add missing method documentation

Closes #1355

The failing check seems to be a flaky test, since I only modified the docs.
I can't seem to rerun the checks though.
Ping me, if I should force push again.


Client workoad statistics, monitoring

Describe the solution you'd like
Capability to track workload patterns of NAS clients talking to a shared NAS volume to identify bully and victims in overloaded volumes
Capability to show all the clients mounting a NFS volume i.e. (TCP connection, NFS session), in other words all NFS clients connected to backend NFS storage.

Same request here. The ability to monitor active NFS clients both from an inventory and performance perspective. In ONTAP REST API that is /protocols/nfs/connected-clients

@merdos Any idea which zapi api will show this? "network connections active show"
I could not find an api with this details. Can you point me to the right one?

@ruanruijuan Any idea which zapi api will show this? "network connections active show"
I could not find an api with this details. Can you point me to the right one?

@ruanruijuan Any idea which zapi api will show this? "network connections active show"
I could not find an api with this details. Can you point me to the right one?

@jmg011, you can run the following command to find the ZAPI corresponding for a specific CLI:
security login role show-ontapi -command "cli command" (replace "cli command" with "network connections active show" here). Hope it works for you.

@ruanruijuan I ran that couple of days back but it did not return any thing.
show-ontapi -command "network connections show"
(security login role show-ontapi)
There are no entries matching your query.
show-ontapi -command "network connections active show"
(security login role show-ontapi)
There are no entries matching your query.

Hello @rahulguptajss
I don't get to make work this new panel in my environment. I've created the new file netConnections and I enabled in my custom.yaml for the Rest Collector (also enabled on my harvest.yaml). In fact, I find the new metrics "net_connection_labels" in my prometheus but the NFS Clients dashboard doesn't work. When I checked the queries the metrics in the graph are: nfs_clients_idle_duration but I don't have those name of metrics in my database, another thing I tried is change the metrics which are on the graphs/table for the new metric net_connection_labels but it doesn't work too. I don't know what I missed or I didn't do correctly.

I have disabled all the Rest Collector in the default.yaml but I have the custom.yaml with other interesting objects for us which are enabled. We do this following your recomendation about disabling for the moment the Rest collections to avoid the duplication and the full of database too.
In fact we're still in ONTAP 9.7 and 9.10 (this version only in some cluster) and for what I know, the Rest collector it is interesting and completed in higger version, I don't remember if it is in 9.11 or 9.12. Also the ZAPI collector is being deprecated for the futurer, right?
Thanks for the clear explanation between netConnections (active connections) and the nfsClients (active/idle nfs connections).

Thank you Rahul! Mark
On Tue, Nov 15, 2022 at 01:32 Rahul @.***> wrote:

verified in 22.11
—
Reply to this email directly, view it on GitHub
https://github.com/NetApp/harvest/issues/210#issuecomment-1315036676,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFIQELANNWN5YVANIKN55NTWINKDZANCNFSM47CTZNXQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

--
Mark
@.***

@demalik @merdos Harvest now includes NFS Clients dashboard. It will available in our next official release. If you want to try it early then it can done through our nightly builds. Please note, It is only available with Rest Collector which needs to be enabled for relevant templates as described here for NABox.
@jmg011 We have also included output of cli network connections active show through a Rest only template as mentioned here.
Below is the screenshot of new dashboard.

Thank you. I have been waiting for this. I will definitely try this out soon.


Security Issue

Affected Version
4.^
Description
not sure if it's the right place to put the issue.
I think there is a security problem.
My website has a silver shop and users who buy products.
 And those users never bought anything.
The only way it could happen is by installing some modules. I believe that when I run dev/build the new module would install an admin user with all privileges, It means that they can do whatever they want.
below is what I have installed
"require": {
"php": ">=7.1.0",
"silverstripe/recipe-plugin": "^1.2",
"silverstripe/recipe-cms": "4.5.2@stable",
"wilr/silverstripe-googlesitemaps": "^2.1",
"heyday/silverstripe-menumanager": "~3.0.0",
"omnipay/paymentexpress": "~2.0",
"silverstripe/siteconfig": "*",
"silverstripe/blog": "^3.5",
"silverstripe/comments": "^3.3",
"symbiote/silverstripe-gridfieldextensions": "^3.2",
"silvershop/core": "3.x-dev",
"silvershop/shipping": "master",
"guzzlehttp/guzzle": "^6.5",
"php-http/message": "^1.8",
"antonythorpe/silvershop-productimages": "^1.0",
"undefinedoffset/silverstripe-nocaptcha": "^2.1",
"silvershop/discounts": "dev-master",
"agencecaza/silverstripe-maintenancemode": "dev-master",
"silvershop/stock": "dev-master"
},
Steps to Reproduce
I think SS should not allow installing any Users when installing a new modules, or make a warning

@nzrubin which module out of your list would you say is doing that? Modules can create default records, but nothing from the list seems like it would do that (without checking the actual code of all those modules). It wouldn't be a framework issue if that was the case anyway.

not sure what module, it happened about a year ago,
but I think the SS framework security should prevent this kind of thing?
Some module creators, over time, can gain the trust of users and then at the next update, take an advantage catching users off guard. Imagine if you have an intruder with Full administrative rights at yours CMS!
look at my  Administrators group (attached)! Maybe those 2 records can give somebody a hint?
can you search the git hub repositories codes for those emails?
<EMAIL_ADDRESS><EMAIL_ADDRESS>

@nzrubin The modules listed under the silverstripe account routinely go through 3rd security audits.  We cannot vouch for the security status of modules that aren't ones that we directly manage.

The only way it could happen is by installing some modules

I'd say that it's unlikely (though not impossible) that the explanation for these administrators from the installation of a module.  That could be there for other reasons, such as:

a security exploit in a module
a security exploit in website custom code
someone guessing credentials of an existing administrator user, logging in to the CMS and creating their own administrator users

As there's no identified bug in this issue to action, I'll mark this one as closed


permutation of single test across multiple modules

There is a use-case to test a single application let' say dgemm and sgemm with several intel modules. Test can be found in the following links:

https://github.com/HPC-buildtest/buildtest-stampede2/blob/master/tests/apps/mkl/dgemm.yml
https://github.com/HPC-buildtest/buildtest-stampede2/blob/master/tests/apps/mkl/sgemm.yml

Right now i need to duplicate the test once per module intel/18.0.2, intel/17.0.3, intel/16.0.4. I dont want to write one monolithic test in run to load and unload modules while testing, likewise i'd want a test script per module file generated such that the output is apparent that we are testing this application dgemm with module version X.Y.
Considering HPC supports many version of a package, i think this use-case will be prevalent when one needs to test software across version.
@vsoch any ideas how you would go about designing the YAML schema.
There were some ideas in https://github.com/HPC-buildtest/buildtest-framework/wiki/Yaml-Schema-Draft i had but now these yaml are out-of date. I never found a YAML schema that i liked

I would use the Github / Travis / Circle CI matrix idea as a start.

Yep i had looked at Travis way back when i was thinking of this idea. I am wondering if we should move this to schema. Ideally i would like a schema that we agree. Once it's done would be updated in schema then buildtest-framework, then refactor code.

Here is matrix builds for GitHub CI https://github.blog/2019-08-08-github-actions-now-supports-ci-cd/#matrix-builds

What about this idea?
version: 0.0.1
module_matrix_example:
  type: script
  matrix:
    module:
      - [ "module purge", "module load gcc/6.4"]
      - ["module load gcc/7.2"]
  run |
  ${{ matrix.module }}
  gcc --version

I take it ${{ }}  are used to reference a YAML variable in this case matrix.module is a variable. I think this is a bit too simple, for now i just want permutation for modules, but certainly i can see multi-variable matrix permutation. That would be nice but too complex for initial design.

So is the idea that:

we loop through the matrix, and for each variable listed (e.g., module) we loop through that so the run index 0 gets the content of module[0] (two lines, one to purge and one to load) and then run index 1 gets the single module load command? Did you consider what github does which is to have each line correspond to one run, and include all variables? I think that's more straight forward than what I see above. Then we can be sure that the first line corresponds to run 1, and we see all the variables defined within it.

Yes i created this as a nested list so each element is a list of module commands to inject into the run. At the moment we allow a string so user can write whatever they want but maybe there should be a better design where we don't specify module load and just focus on the name of module and it implicitly loads it.
This is the part where i need some help and creativity in the YAML design. I think module permutation would be a common operation. Some other operation i see are running same test with mutliple argument, or a single test permutation across a variable.
Let's say compiling a single test with different compiler flags so that we can do matrix build without much overhead of duplicating a test.
I don't like my proposed YAML design so really looking for some more ideas.

yeah I'll give this a shot! I want to look over the few matrix strategies I know to double check. I have a meeting now but will do this later this afternoon. It's super cool we are adding a matrix!

Take your time I think we would need to decide which task to proceed first since both will require some changes to the framework . Either this  issue or https://github.com/HPC-buildtest/schemas/issues/25.
I see both task would require some work on schema then validation with some examples. Whichever of the two is easy from schema point of view seems to be a good candidate.

Okay just to review the types in the wild, GitHub has a setup similar to yours, but has a single list of items per variable name:
  test:
    name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        node_version: [8, 10, 12]
        os: [ubuntu-latest, windows-latest, macos-latest]

And this would mean that versions 8, 10, and 12 would be tested for each of windows, ubuntu, and macos. For your example, this doesn't make sense because you have a list (done via dashes) under a variable name that includes another list. If we mapped this into "GitHub syntax" it would be something like:
version: 0.0.1
module_matrix_example:
  type: script
  matrix:
    module: [ "module purge\nmodule load gcc/6.4", "module load gcc/7.2"]
  run |
  ${{ matrix.module }}
  gcc --version

We could technically use your "list of lists" strategy, but that might be confusing for the user, because they look very different. We would then need to check, every time, if the user has provided a list with str/int content, or a list of lists. And then if we had a list of lists, what would be the default action when the user says {{ matrix.module }} - to join them by newline? This doesn't make sense, because the user needs to be able to understand very easily how what they are specifying as a string maps into the recipe printed. The reason we are running into this is because the example you provided above with multiple lines of modules (or more generally, lines to be added to a recipe) is not the intended use case for a matrix. A matrix holds a clean listing of variables, and then all combinations are tested. A matrix is not intended for multiple lines of a script to be printed.
So for matrix, this is the pattern I'd like to see:
  test:
    name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        node_version: [8, 10, 12]
        os: [ubuntu-latest, windows-latest, macos-latest]

And the module commands, as I mentioned before, should be specified with the slurm schema.

Thanks for the detailed explanation, to sum it up i don't think list of list is good strategy using modules in a matrix. I think this issue looks more like a parameter test where module is a parameter to the run section (i.e test script).
Maybe the test name module_matrix_example need a key for passing parameters. I think we may need some way to name the parameters so that run can reference them. Just thinking out load, does this even make sense
Or one idea is to have parameter as part of global schema with key that must match name of test block.
version: 0.0.1
parameters:
  module_matrix_example:
    - "module purge; module load gcc/6.4"
    - "module load gcc/7.2"
module_matrix_example:
  type: script
  matrix:
    module: [ "module purge\nmodule load gcc/6.4", "module load gcc/7.2"]
  run |
  gcc --version

One last idea i had was maybe pass arguments to test /bin/bash test.sh arg1 args2 and process each argument in shell script via sys.args in run section.

@shahzebsiddiqui the name of the key under "matrix" maps to the variable.
I think the example above is too complicated. Follow the KISS principle.


Editor context menu and autocomplete menu run into each other

Check for existing issues

[X] Completed

Describe the regression
See screenshot
If necessary, add screenshots of gpui-1 Zed to show the missing feature

Will be fixed in the next preview.


Add framework_id tag to Mesos framework_offers metrics

High-level description
This bumps Telegraf to pull in https://github.com/dcos/telegraf/pull/61, which adds framework_id tags to Mesos master framework_offers metrics, so that the metrics of different framework instances with the same name can be distinguished. These metrics are documented here: https://mesos.apache.org/documentation/latest/monitoring/#frameworks.
Corresponding DC/OS tickets (required)

DCOS-53302 Mesos per framework metrics can be incorrect if there are multiple instances of the framework

Related tickets (optional)

N/A
Checklist for component/package updates:
If you are changing components or packages in DC/OS (e.g. you are bumping the sha or ref of anything underneath packages), then in addition to the above please also include:

[x] Change log from the last version integrated (this should be a link to commits for easy verification and review): https://github.com/dcos/telegraf/compare/cfe8725d26ea8092caef014bde284d04994e3a32...1ebc6a668a4b8d743cb75ba1e443548df6cde309
[x] Included a test which will fail if code is reverted but test is not. If there is no test please explain: Covered by tests in the upstream project.
[x] Test Results: link to CI job test results for component
[x] Code Coverage (if available): N/A

@mesosphere-mergebot label ready for review


CREATE TABLE?

It seems that this library has all, BUT the actual creation process. Could it be added? :)
$b->createTable("foo",[
    "id", "int(11)", "NOT_NULL", ["AUTO_INCREMENT"]
]);

Just a thought.
Kind regards, Ingwie.

I am writing a library for this... the only problem is that table creation is not as standard SQL, so it's taking some time.
I recommend using Phinx for this and in fact I'm writing a layer on top of it because it's just so great.

I am playing with Yii’s migrations now, but I might check out Phinx too. It still is a very tiny set of migrations so I could easily port them. However, last time I looked at it, there were no docs about stuff like creating tables or adding foreign keys and such...


proposal: x/net/webdav: Support Range read

Proposal Details
Range header is currently not supported in WebDAV module. But it is widely used by media player clients. It is nice to add support to it.
Reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range

x/net/webdav serves content through net/http.ServeContent which does support range if the underlying filesystem supports io.Seeker.


Bot Not Responding To Commands

The bot responds to commands in the control hub chat but not my chat it is in the user list but does not respond to messages or send any messages at all. But my other bots do work mine is the only won that is not sending messages.
logs:
Dec 03 06:25:05 vmi1065408 pajbot@mr_cheeezz[1194]: [2022-12-03 06:25:05,026] [INFO   ] PostgreSQL Server notice: NOTICE:  relation "schema_version>
Dec 03 06:25:05 vmi1065408 pajbot@mr_cheeezz[1194]: [2022-12-03 06:25:05,031] [DEBUG  ] migrate db: current revision ID is 17
Dec 03 06:25:05 vmi1065408 pajbot@mr_cheeezz[1194]: [2022-12-03 06:25:05,031] [DEBUG  ] migrate db: 0 revisions to run
Dec 03 06:25:05 vmi1065408 pajbot@mr_cheeezz[1194]: [2022-12-03 06:25:05,046] [DEBUG  ] migrate redis: current revision ID is 3
Dec 03 06:25:05 vmi1065408 pajbot@mr_cheeezz[1194]: [2022-12-03 06:25:05,046] [DEBUG  ] migrate redis: 0 revisions to run
Dec 03 06:25:05 vmi1065408 pajbot@mr_cheeezz[1194]: [2022-12-03 06:25:05,224] [INFO   ] Loaded 0 timers (0 online/0 offline)
Dec 03 06:25:05 vmi1065408 pajbot@mr_cheeezz[1194]: [2022-12-03 06:25:05,253] [INFO   ] pajbot twitter manager initialized
Dec 03 06:25:06 vmi1065408 pajbot@mr_cheeezz[1194]: [2022-12-03 06:25:06,603] [DEBUG  ] Connection failed to PBTwitterManager: [Failure instance: T>
Dec 03 06:25:06 vmi1065408 pajbot@mr_cheeezz[1194]: ]
Dec 03 06:25:06 vmi1065408 pajbot@mr_cheeezz[1194]: [2022-12-03 06:25:06,615] [INFO   ] Try to load submodule with ID None
Dec 03 06:25:06 vmi1065408 pajbot@mr_cheeezz[1194]: [2022-12-03 06:25:06,616] [INFO   ] Granting admin privileges to mr_cheeezz (505216805)
Dec 03 06:25:06 vmi1065408 pajbot@mr_cheeezz[1194]: [2022-12-03 06:25:06,835] [DEBUG  ] Successfully loaded OAuth token from storage
Dec 03 06:25:07 vmi1065408 pajbot@mr_cheeezz[1194]: [2022-12-03 06:25:07,296] [DEBUG  ] Cache Miss: api:twitch:helix:channel-information:505216805
Dec 03 06:25:07 vmi1065408 pajbot@mr_cheeezz[1194]: [2022-12-03 06:25:07,310] [DEBUG  ] Successfully loaded OAuth token from storage
Dec 03 06:25:07 vmi1065408 pajbot@mr_cheeezz[1194]: [2022-12-03 06:25:07,300] [INFO   ] Successfully connected and authenticated with IRC
Dec 03 06:25:07 vmi1065408 pajbot@mr_cheeezz[1194]: [2022-12-03 06:25:07,402] [INFO   ] WebSocket connection open
Dec 03 06:25:09 vmi1065408 pajbot@mr_cheeezz[1194]: [2022-12-03 06:25:09,316] [DEBUG  ] Connection failed to PBTwitterManager: [Failure instance: T>
Dec 03 06:25:09 vmi1065408 pajbot@mr_cheeezz[1194]: ]
Dec 03 06:25:16 vmi1065408 pajbot@mr_cheeezz[1194]: [2022-12-03 06:25:16,632] [DEBUG  ] Connection failed to PBTwitterManager: [Failure instance: T>
Dec 03 06:25:16 vmi1065408 pajbot@mr_cheeezz[1194]: ]
Dec 03 06:25:25 vmi1065408 pajbot@mr_cheeezz[1194]: [2022-12-03 06:25:25,144] [DEBUG  ] Cache Miss: api:twitch:helix:stream:by-id:505216805
Dec 03 06:25:29 vmi1065408 pajbot@mr_cheeezz[1194]: [2022-12-03 06:25:29,057] [DEBUG  ] UserRanksRefreshManager::_refresh function took 0.030 ms
Dec 03 06:25:33 vmi1065408 pajbot@mr_cheeezz[1194]: [2022-12-03 06:25:33,089] [DEBUG  ] Connection failed to PBTwitterManager: [Failure instance: T>
Dec 03 06:25:33 vmi1065408 pajbot@mr_cheeezz[1194]: ]
Dec 03 06:26:01 vmi1065408 pajbot@mr_cheeezz[1194]: [2022-12-03 06:26:01,811] [DEBUG  ] Connection failed to PBTwitterManager: [Failure instance: T>
Dec 03 06:26:01 vmi1065408 pajbot@mr_cheeezz[1194]: ]
Dec 03 06:26:05 vmi1065408 pajbot@mr_cheeezz[1194]: [2022-12-03 06:26:05,250] [DEBUG  ] Cache Miss: api:twitch:helix:stream:by-id:505216805
Dec 03 06:26:36 vmi1065408 pajbot@mr_cheeezz[1194]: [2022-12-03 06:26:36,083] [DEBUG  ] Connection failed to PBTwitterManager: [Failure instance: T>
Dec 03 06:26:36 vmi1065408 pajbot@mr_cheeezz[1194]: ]
D

Make sure the bot is is allowed to type in the channel you've specified in the config (e.g. by logging into the bot account on the Twitch website and sending a message in the streamer's chat)

My bots email was banned from chat because I have another bot, not a pajbot but it had the same email I'll change the email so that does not happen again.


Refactor Secret type

Secrets should have a fixed length, so Vec is not the best type here. We could use generic arrays as proposed here. Refactoring would also be a good opportunity to consider making Secret a trait, as we often have wrapper types for the individual secrets anyway (e.g. InitiSecret, MemberSecret, etc.).

While doing this, we should also take care to check that when deriving a key is not larger than u16::MAX, as length is encoded as a u16.


2x faster encoding

I made the ANKFullWidth to String encoding algorithm a 2x faster in 8228ac5cbeb1099219c05fbb7371bd2bb7ce486c.

#68 made 2,4,16-radix encoding 30% faster with a separate dividing(_:) method.

165bdde710b4439f5454946ccc2b8a6d7db14353 made 256-bit encoding up to 2x faster with a withUTF8 method for the first digit.

While the benchmark might not be perfect, the overall improvement is as follows:
1. Test Case '-[ANKFullWidthKitBenchmarks.UInt256BenchmarksOnText testEncodingRadix10]' passed (0.026 seconds).
1. Test Case '-[ANKFullWidthKitBenchmarks.UInt256BenchmarksOnText testEncodingRadix16]' passed (0.022 seconds).

2. Test Case '-[ANKFullWidthKitBenchmarks.UInt256BenchmarksOnText testEncodingRadix10]' passed (0.015 seconds).
2. Test Case '-[ANKFullWidthKitBenchmarks.UInt256BenchmarksOnText testEncodingRadix16]' passed (0.005 seconds).


[Feature Request] Add ZodObject support to .pick & .omit

As I understand it, .pick & .omit currently accept Record<string, true | undefined>. I think it would be useful if it accepted a zod value as well.
For example, if we start with
const A = z.object({ a: z.number(), b: z.string() });
const B = z.object({ c: z.string(), d: z.string() });
const AB = A.merge(B);

and wanted to get the A schema back from AB we need to do
const A2 = AB.pick({ a: true, b: true });

or something like this if we wanted to ensure we always got all properties from A
const aKeys = Object.keys(A.shape).reduce((acc, key) => {
  acc[key] = true;
  return acc;
}, {} as Record<string, true>);
const A3 = AB.pick(aKeys);

Is there a reason the values must be true? Is "truthy" enough? That would allow AB.pick(A.shape)
I think string[] array is closest to TS Pick,
type A = Pick<A, 'a' | 'b'>
const A = AB.pick(Object.keys(A.shape));

but that would be a breaking change. Is there an issue or any other docs/background about using object vs array as the second arg?
I only found zod yesterday and spent a little time reading docs and trying some examples, so I could be missing/misunderstanding something. I just wondered if we needed this new interface or if we could use an existing one.
Cheers on the great library.

You don't seem to be misunderstanding anything!
The hard part is making everything work in the static domain, not the runtime domain. If ZodObject.pick accepted an input of type string[] the TypeScript engine wouldn't have any way of knowing which keys exist or don't exist on the resulting object (post-pick).
The reason the input to pick is an object is because TypeScript is good at infering the keys of objects. I recommend playing around with this function to get a sense of what TypeScript can infer:
const infer = <T>(arg: T): T => {
  return arg;
};

Allowing any truthy value is a bit messy, it would require re-implementing JavaScript's weird truthiness rules in TypeScript. It's also hard for other reasons, like this:
AB.pick({
  key1: 'keep',
  key2: ''
})

TypeScript infers this as { key1:string, key2: string} (no difference between the two values) but one would get picked and the other omitted. So I wouldn't be able to return a correct static type.
TLDR: Inference is hard and messy, there's (usually) a reason Zod is implemented like it is.

You don't seem to be misunderstanding anything!
The hard part is making everything work in the static domain, not the runtime domain. If ZodObject.pick accepted an input of type string[] the TypeScript engine wouldn't have any way of knowing which keys exist or don't exist on the resulting object (post-pick).
The reason the input to pick is an object is because TypeScript is good at infering the keys of objects. I recommend playing around with this function to get a sense of what TypeScript can infer:
const infer = <T>(arg: T): T => {
  return arg;
};

Allowing any truthy value is a bit messy, it would require re-implementing JavaScript's weird truthiness rules in TypeScript. It's also hard for other reasons, like this:
AB.pick({
  key1: 'keep',
  key2: ''
})

TypeScript infers this as { key1:string, key2: string} (no difference between the two values) but one would get picked and the other omitted. So I wouldn't be able to return a correct static type.
TLDR: Inference is hard and messy, there's (usually) a reason Zod is implemented like it is.

I can help you out here if you want to change your api for zod3.
myzod implements pick and omit in the way described here.
Here is the version light of how it is done:
class ObjectType<T extends Record<string, AnyType>> {

   ...

   pick<K extends StringTypes<keyof T>>(
        keys: K[]
     ): ObjectType<Pick<T, Extract<StringTypes<keyof T>, ToUnion<typeof keys>>>>

}

where:
type StringTypes<T> = T extends string ? T : never;
type ToUnion<T extends any[]> = T[number];

Hope that helps if you ever want to go down this road!

I can help you out here if you want to change your api for zod3.
myzod implements pick and omit in the way described here.
Here is the version light of how it is done:
class ObjectType<T extends Record<string, AnyType>> {

   ...

   pick<K extends StringTypes<keyof T>>(
        keys: K[]
     ): ObjectType<Pick<T, Extract<StringTypes<keyof T>, ToUnion<typeof keys>>>>

}

where:
type StringTypes<T> = T extends string ? T : never;
type ToUnion<T extends any[]> = T[number];

Hope that helps if you ever want to go down this road!

I was trying pick/omit today and was kinda hoping to be able to toggle properties based on the truthiness, but was surprised to see that just having the property will end up omiting/picking it, even if it's set to undefined.
Even if a key-based API isn't used, it would be good if it could accept actual true/false values for property toggling. Seems like it should be possible to do so with something like this:
type KeysWithType<T, U> = {
  [K in keyof T]: T[K] extends U ? K : never;
}[keyof T];

type PickByType<T, U> = Pick<T, KeysWithType<T, U>>;

interface ObjectType<T> {
  omit<Mask extends { [Key in keyof T]?: boolean }>(
    mask: Mask,
  ): Omit<T, keyof PickByType<Mask, true>>;
}


CI: Create a ZIP file before upload

This will decrease the build time because it just does one HTTP request
to the artifact API.
https://github.com/actions/upload-artifact#too-many-uploads-resulting-in-429-responses
https://phabricator.endlessm.com/T32413

One fun thing with creating a zip file: it actually ends up being a double zip because the github UI turns the artifact into a zip file even if it already is one: https://github.com/actions/upload-artifact/issues/39. We attach files to releases manually anyway, but there might be something extra we can do to avoid mistakes...