feat: allow passing async ability function in channel options

I'm trying to update the ability for channels by passing a function to channels.makeOptions:
const caslOptions = channels.makeOptions(app, {
  ability: (a, conn) => defineAbilitiesFor(conn.user, a),
});

Since defineAbilitiesFor is async (for querying data needed to create the ability, similar to https://github.com/fratzinger/feathers-casl/issues/31), I added:

await before calling options.ability
call to getAbility when options.restrictFields === true

If there is a better way to update stale abilities for channels, any pointers in the right direction would be much appreciated.

@fratzinger Have you seen this? :wink:

Thanks for the nudge and sorry for the delay!
If I get it right, making ability async is really not a good idea for channels cause it makes them pretty slow, I can assume.
You can override connection.ability at anytime.
For example, I do this:
  app.on("logout", (payload: any, { connection }) => {
    if (connection) {
      delete connection.ability;
      // you can also do something like:
      // connection.ability = await defineAbility(...);
      app.channel("anonymous").join(connection);
    }
  });

Does that help in any way?


Question: Can we really infer uplink vs downlink based on PushData vs PullData

Hi,
Really nice job with the packet parser and this bridge (and also the server :smile:)!
I have a question related to this one (related to uplink field in PHYPayload). In the current implementation it seems to me that whenever a packet is received on the UDP port and it is PushData, it is assumed to be uplink (this part of the implementation approximately). I believe it is possible, for example, to receive an Unconfirmed Data Down send from another antenna (if two antennas are close enough). In this case the antenna that receives the packet will provide it to the bridge as PushData. In that case I think that the current implementation will not work correctly. Am I misunderstanding the implementation?
If I am correct, I believe that the option with MType is the way to go. The reason for this is that as you said, it should work for every message type except Proprietary and I don't think that there is any guarantee that there will be FHDR in a Proprietary message (or that you can assume anything more than the fact that it will have MHDR and MIC). I might be wrong of course.
Consequently, I would expect Proprietary messages to have only a payload field that is the bytes of the MACPayload or something similar and a custom server to know how to handle this.
Do you have other reasons to prefer the current implementation and does this seems reasonable to you?

As far as I know there is no way you'll receive a packet transmitted by an other gateway. This is because the "polarization inversion": https://github.com/Lora-net/packet_forwarder/blob/master/PROTOCOL.TXT#L346. This is set to true on downlink, and is false on uplink.

According to one of my associates who is working on an experimental LORA network in Rennes, France for more than a year, it is absolutely possible to receive packet from other antennas and this happens to him quite often. Unfortunately, I cannot check this myself. As for "polarization inversion", I did not find references that explain it and so I don't know what it is.
I guess we have two options: either we just leave things as they are, keeping in mind that we might need to change them some day (if this problem become apparent), or change the code to use the MType and maybe add special behaviour for Proprietary (using Push data/Pull data info).

As far as I understand the "polarization inversion" (which is documented as "Invert IQ for communications" in the RN2483 command reference) it inverts the transmitted bits, to avoid that gateways receive data from other gateways (as well, they will receive their own data when you don't set the ipol to true).
I'm not sure if this only works for LORA modulation or for FSK as well, I need to do some testing to find out. Until now, I only tested with the LORA modulation.
If you have a RN2483, you can toggle the polarization with ratio set iqi on|off.
For now I prefer to wait with making any changes related to this, until we are able to reproduce the case where gateways are receiving data down packets.

Thanks for the quick replies. That's fair enough. I will try to learn more about the particular setup and to understand if there is any misconfiguration or any other possible cause.

I spoke with another guy that have a considerable experience with Lora networks and he said that indeed, if you set the ipol field, you should not receive the packets on other antennas. If you don't, you might receive your packets and this is most probably what is happening my associate. Thank you very much for explaining this to me!

FYI: https://github.com/brocaar/lorawan/compare/remove_uplink?expand=1

I was quite surprised when I saw an UPLINK / JoinAccept combination. (polarizationInversion was false btw). Someone is trying to be funny probably...


BF: made due.py PEP8 compliant and harmonized some indentations in README.md

meanwhile quickly pushed 0.4.6 release of duecredit with fixed up due.py to pypi
we are still to make it windows-compatible apparently (added appveyor config which showed some failing tests)
README.md still contains tabs in some text blocks -- didn't want to 'fix' where it wasn't really broken but you might want to uniformize
I also adjusted the tree listing so it become abit more "cohesive" (also was a mix of tabs and spaces and imho those ` were not necessary) ;-)

Thanks!


DUOS-336  Multi-DAC: DAC Management Screens

On the Admin Console page, I should see a Manage Data Access Committees button just like all the other buttons, with the description text: “Create, Edit, or Delete a Data Access Committee”
In the Manage Data Access Committees page I should see a table with the following columns: DAC Name, DAC Description, DAC Chair, DAC Members (linked to a pop-up), DAC Datasets (linked to a pop-up), Edit. To the top right of the table there should be a search box which searches the table and a ‘Create Data Access Committee’ button which opens a form to create a new DAC. The form will contain the fields: DAC Name*, DAC Description, DAC Chair*, DAC Members (* = required). The DAC Chair and DAC Members should be selectable from a list of registered DUOS users.
The DAC Members and DAC Datasets columns should display links to pop-up boxes which contain the list of current DAC members and datasets assigned to the DAC, like the ‘Translated Use Restriction’ link in the DUOS Dataset Catalog
The Edit column should have an ‘Edit’ button which allows the Admin to edit each DAC’s information in the same format as a populated ‘Create Data Access Committee’ form.

@rushtong this is the basic layout for the DAC Management, a lot of commented code to be replaced with actual dev work later. As we agreed, instead of making the PR against develop, it's done to a current copy of develop called "dacManagement".


Add conditional 'extern "C"' declarations for C++ compatibility.

This patch makes the library usable from C++ by adding conditional extern "C" declarations to the header files.

Please tell me why you need the following section.
#ifdef __cplusplus
extern "C" {
#endif

There is no answer. so I close this PR.

Sorry, somehow I never saw the comments from @nopnop2002. But @Yanichar is correct, that is exactly what you do.
My task functions are just global functions with "C" linkage, I don't use member functions as tasks.

@bullestock
It's been a long time, but if you still need a PR, please send it again.


Basic Sunrise Project Setup

How to create a Sunrise project or load an existing one from the controller?

Please refer to Kuka's manual


Update routes initial metadata for routing collisions - Remove Nuxt

This fixes an issue with route collisions within the Dashboard.

Updated routes
Bumped shell version 0.3.10

Removes Nuxt

Bumps 1.0.5-rc3

Blocked by https://github.com/rancher/dashboard/pull/8962


Document build dependency on git

I'm following this: https://developers.google.com/optimization/introduction/installing/source
My make invocation terminates with:
git clone --quiet -b v2.2.1 https://github.com/gflags/gflags.git dependencies/sources/gflags-2.2.1
make: git: Command not found
makefiles/Makefile.third_party.unix.mk:205: recipe for target 'dependencies/sources/gflags-2.2.1/CMakeLists.txt' failed
make: *** [dependencies/sources/gflags-2.2.1/CMakeLists.txt] Error 127

I'd just update this myself but I'm not finding the docs source (to be honest, I didn't try very hard to find it, sorry!)

Did you install the prerequisite software ? https://developers.google.com/optimization/introduction/installing/source#install-prerequisite-software
it seems you don't have git installed....

@Mizux you're misunderstanding me I think.  I did install the prerequisite software, however it doesn't list git and it should list git.
I'm requesting an update to the documentation to add git to the apt install lines

Can you point which line doesn't list git ? could you also try to refresh your browser ?
Seems git is on each line for linux install...
Or are you using MacOS ? (in this case I think the xcode-select --install or brew install install it as a dependency)

Seems related to #675

I see it there now, strange! Perhaps I was viewing an old copy of the docs


REC-55: refactor release workflow

Previously, it was one job that ran on Linux with CI runners.
We need to sign and notarize macOS binaries though, and we can
only do that on a macOS machine.
So this change splits the workflow into multiple jobs. The first
job checks the version string, next we build binaries (signing
not done yet), last we create the release.

Test run: https://github.com/EngFlow/auth/actions/runs/11410437468

w.r.t. the libc version requirement - do you think we should be testing for that on release? If so, it sounds like adding an sh_test that takes the built binary as data might not be the best path, if it depends on which remote runner it runs on - so would another job in this workflow make sense here?

I thought about this a bit. It seems valuable to confirm that the binary can run on Debian 11. We could try running it from a script in the same job, but that only proves the binary runs on the same platform where it was built, which doesn't add much value. We could try running the script in a different job, but that also feels tautological: it would be just as easy to typo the container image for that job as the build job.
We could try inspecting the binary itself. The relevant output is:
$ objdump -T engflow_auth
...
0000000000000000      DF *UND*<PHONE_NUMBER>000000 (GLIBC_2.34) pthread_attr_getstacksize
0000000000000000      DF *UND*<PHONE_NUMBER>000000 (GLIBC_2.34) pthread_setspecific
0000000000000000      DF *UND*<PHONE_NUMBER>000000 (GLIBC_2.2.5) freeaddrinfo
0000000000000000      DO *UND*<PHONE_NUMBER>000000 (GLIBC_2.2.5) stderr
0000000000000000      DF *UND*<PHONE_NUMBER>000000 (GLIBC_2.2.5) seteuid

Each glibc symbol has the minimum version needed. 2.34 is the version we don't want. But this seems overly brittle and implementation specific. I also really don't want to parse and compare semver in bash.


Support Oracle

Hello,
I'm very interrested by your product SQLPad... but my DB is an Oracle DB!
I've seen in a post of 2015 that you were opened to open your application if there were a oracle's javascript library - that your contributor had found at https://github.com/oracle/node-oracledb
So are you now able to integrate this Oracle compatibility to your product, that seems to be a great product for our goals!
Thank you for your work!

Thanks @gdebuz!
While the referenced library is a Node.js library, it requires compiling native dependencies, and has a quite complicated setup. In the past those kinds of modules have been restricted, because it complicates the install or build process.
Recently however we've added an optional native dependency for linux ODBC.
I could see this being added in a similar way... partially added with a warning that you'd need to follow the Oracle driver setup instructions to get it working fully (https://oracle.github.io/node-oracledb/INSTALL.html#quickstart).
I'd be open to adding this to the project, but testing would be difficult.
Unfortunately I'm not able to give you any idea on when this would happen. I started some larger changes in the project over the summer, and haven't had much time to get back to them. Hope to get back to this project soon though.

Unfortunately I'm going to pass on adding Oracle support to SQLPad. Reviewing the Oracle driver documentation for Node.js, the setup is still quite complex. Native dependencies added for ODBC trip some people up, and I can only imagine adding more of this will cause more confusion.
Supporting Oracle would be difficult to test as well...

... just a little addon, maybe of use for someone hitting this issue when googling sqlpad and oracle ...
Oracle works quite well using unixODBC on linux, with the oracle "instantclient" installed and configured. The following [Database SQL for lookup schema] shows all schema/table/columns incl. column-comments in SQLPADs schema-sidebar, omitting all the system schemas and whatnot from oracle.
SELECT
  owner AS table_schema,
  table_name,
  column_name,
  comments AS column_description,
  data_type
FROM
  all_tab_columns
  LEFT JOIN all_col_comments
    USING(owner, table_name, column_name)
WHERE
  owner NOT IN (
    SELECT username
    FROM all_users
    WHERE oracle_maintained = 'Y'
  )
ORDER BY
  owner,
  table_name,
  column_id
;

@rickbergfalk feel free to add to some documentation if see fit


Add ports to payload functions and dry payload functions

Adds ports to payload functions as second argument. Closing #247.

Coverage increased (+0.05%) to 63.58% when pulling ceae997424dbf7a61998c0a505021d281544be6d on feature/payload-functions-port into aa07050dba934ae3757d9799ceeedc4de0b35dcf on v2-preview.

For your tests: Messages with FPort 0 do not contain a payload.

Please add a test with a payload function that does not take a second argument to verify that Otto accepts this as well

@htdvisser I think most cases are covered in the tests.
It is hard to tell because the tests are a bit messy. If you want I can rewrite the tests to be more general and clear.
About FPort being 0, I've used different ports throughout the test, not only 0. It should not matter in these tests however.

Coverage increased (+0.05%) to 64.921% when pulling b90fbd41420da58e3f146546e7fc0cc5b4cb63ea on feature/payload-functions-port into bc77653de440f63dfdc5b4a719c8ab2a873dd09b on v2-preview.


Use raw mappings for dev build

This significantly reduces the loading time of Chrome DevTools (#1).

Hey, thanks for the contribution! This looks good. I'm on holiday right now though so will do a proper review on Sunday or early next week. :+1:


Write production OSCARS SOP

The OSCARS service doesn't appear to have an SOP defined.  Need to make one.

Work-in-progress, to be eventually transferred to the Operations Wiki:
https://docs.google.com/document/d/1r8b6lr7Lf_jn9f2JqExl8cHrJQHYWJJafjGmh8rgVyQ/

Handed this off to David and Indira as service owners.  Closing.


Move docs to dedicated website

The readme is unwieldy and should be moved to it's own website (initially hosted on  GitHub pages but open to a move to DT property in the future).
This would provide a much nicer UX.

I am working on this now. mkdocs will be used (see docs folder) and GitHub pages will be used to host the site.


[AutoPR cognitiveservices/data-plane/QnAMaker] add QnAMaker runtime to Go SDK

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/6770

This PR has been merged into https://github.com/Azure/azure-sdk-for-go/pull/5406