[CLOUDGA-16256]: Added billing usage API support to cli

Summary
Added billing usage api support to cli.
Example usage

 ./ybm billing list --start 2023-09-13 --end 2023-09-14.
start date and end date are required parameters in the "yyyy-mm-dd" format.
User is then prompted to select the clusters from the list.
In the future, list clusters in date range API has to be used to list the clusters so that DELETED clusters can be fetched as well.
Billing usage response is exported as json file - billing_usage.json.

Screenshot

Output
The usage data is exported to the json file.
Sample billing_usage.json
{
   "data":{
      "cluster_ids":[
         "3bd05cb6-4955-473b-82a4-bf9a7f489b4d"
      ],
      "dimensions":[
         {
            "cumulative_usage":0,
            "data_points":[
               {
                  "cumulative_usage":0,
                  "daily_usage":0,
                  "end_date":"2023-09-14",
                  "start_date":"2023-09-13"
               },
               {
                  "cumulative_usage":0,
                  "daily_usage":0,
                  "end_date":"2023-09-15",
                  "start_date":"2023-09-14"
               }
            ],
            "name":"VCPUS",
            "unit":"HOURS"
         },
         {
            "cumulative_usage":0,
            "data_points":[
               {
                  "cumulative_usage":0,
                  "daily_usage":0,
                  "end_date":"2023-09-14",
                  "start_date":"2023-09-13"
               },
               {
                  "cumulative_usage":0,
                  "daily_usage":0,
                  "end_date":"2023-09-15",
                  "start_date":"2023-09-14"
               }
            ],
            "name":"DISK_STORAGE",
            "unit":"GB_HOURS"
         },
         {
            "cumulative_usage":0,
            "data_points":[
               {
                  "cumulative_usage":0,
                  "daily_usage":0,
                  "end_date":"2023-09-14",
                  "start_date":"2023-09-13"
               },
               {
                  "cumulative_usage":0,
                  "daily_usage":0,
                  "end_date":"2023-09-15",
                  "start_date":"2023-09-14"
               }
            ],
            "name":"DISK_IOPS",
            "unit":"NONE"
         },
         {
            "cumulative_usage":0,
            "data_points":[
               {
                  "cumulative_usage":0,
                  "daily_usage":0,
                  "end_date":"2023-09-14",
                  "start_date":"2023-09-13"
               },
               {
                  "cumulative_usage":0,
                  "daily_usage":0,
                  "end_date":"2023-09-15",
                  "start_date":"2023-09-14"
               }
            ],
            "name":"BACKUP_STORAGE",
            "unit":"GB_HOURS"
         },
         {
            "cumulative_usage":0,
            "data_points":[
               {
                  "cumulative_usage":0,
                  "daily_usage":0,
                  "end_date":"2023-09-14",
                  "start_date":"2023-09-13"
               },
               {
                  "cumulative_usage":0,
                  "daily_usage":0,
                  "end_date":"2023-09-15",
                  "start_date":"2023-09-14"
               }
            ],
            "name":"DATA_TRANSFER_WITHIN_REGION",
            "unit":"GB"
         },
         {
            "cumulative_usage":0,
            "data_points":[
               {
                  "cumulative_usage":0,
                  "daily_usage":0,
                  "end_date":"2023-09-14",
                  "start_date":"2023-09-13"
               },
               {
                  "cumulative_usage":0,
                  "daily_usage":0,
                  "end_date":"2023-09-15",
                  "start_date":"2023-09-14"
               }
            ],
            "name":"DATA_TRANSFER_CROSS_REGION_APAC",
            "unit":"GB"
         },
         {
            "cumulative_usage":0,
            "data_points":[
               {
                  "cumulative_usage":0,
                  "daily_usage":0,
                  "end_date":"2023-09-14",
                  "start_date":"2023-09-13"
               },
               {
                  "cumulative_usage":0,
                  "daily_usage":0,
                  "end_date":"2023-09-15",
                  "start_date":"2023-09-14"
               }
            ],
            "name":"DATA_TRANSFER_CROSS_REGION_NON_APAC",
            "unit":"GB"
         },
         {
            "cumulative_usage":0,
            "data_points":[
               {
                  "cumulative_usage":0,
                  "daily_usage":0,
                  "end_date":"2023-09-14",
                  "start_date":"2023-09-13"
               },
               {
                  "cumulative_usage":0,
                  "daily_usage":0,
                  "end_date":"2023-09-15",
                  "start_date":"2023-09-14"
               }
            ],
            "name":"DATA_TRANSFER_INTERNET",
            "unit":"GB"
         }
      ],
      "end_date":"2023-09-14",
      "granularity":"DAILY",
      "start_date":"2023-09-13"
   }
}

1- Do we really want to list the cluster ? and use a number?
2- I don't see the table display, I think you should reuse what we already have in the formatter ybm .....
3- For CSV you can create an output type as csv, same as we already do with json
4- For the file , this is a cli so a normal redirection to a file will be much easier , ybm ..... --output csv (json) > myfile.csv / json
5- You should check the date and check if start =< end, we should also limit the raneg, like max X month

1- Do we really want to list the cluster ? and use a number? 2- I don't see the table display, I think you should reuse what we already have in the formatter ybm ..... 3- For CSV you can create an output type as csv, same as we already do with json 4- For the file , this is a cli so a normal redirection to a file will be much easier , ybm ..... --output csv (json) > myfile.csv / json 5- You should check the date and check if start =< end, we should also limit the raneg, like max X month

Done -> Taking cluster input through --clusters flag
There were 16 columns to be displayed, I tried displaying them on the terminal, but it looked very messy. So instead, I modified the code to only export the data as csv or json file
Done
Since not displaying the data on the terminal, this would not be feasible
Done -> All the cases have been covered by the backend API.

I was looking at the json output, I think we need the dimension name and units - is it present somewhere? Can you please attach a sample json (instead of screenshot)?

I was looking at the json output, I think we need the dimension name and units - is it present somewhere? Can you please attach a sample json (instead of screenshot)?

The output is the same as the Spend Tracking API.
A sample output is included in the functional spec:
Functional Spec

bors merge


Make "definitive" PDF at time of approval

Previously, PDFs were generated somewhat haphazardly. Since we moved to always generating them on the fly, proposal PDFs no longer serve an archival purpose unless manually downloaded at time of approval.
The main issue with this is that the PDFs will of course break with future updates. My suggestion is to create a new archival PDF filefield that gets populated by the PDF generator at time of approval. We can then choose to serve this PDF from that point onwards. Basically, we're coming full circle.
I expect to be taking this one on and will assign myself once I actually start working on it.

miggol assigned miggol and unassigned miggol 4 days ago

nice
--
Jup, seems like our decision to switch to on-the-fly generation was the incorrect option when looking at this problem.  In hindsight it would make our jobs a lot easier if we didn't have to think about backwards compatibility of the PDF that much. In addition, I think having a canonical hard copy of the  proposal when approved is also preferred from a more formal/non-technical standpoint.
So if I'm understanding your proposal correctly you want to add a second FileField that populates at the time of approval? (The other one being at the time of submission).
At that point I'd rather have something that actually tracks different versions in a single mechanism. (As the PDF can change more than 2 times, for example when the secretary changes the documents after approval).
[shameless self promotion] Actually this sounds like a perfect job for my TrackedFileField, which does exactly that! Tracking versions of the same file! [/shameless self promotion] The downside being that that's only in DSC 3.x
This issue also touches on a similar problem related to proposal diffing, but maybe we should leave that for now...

Done in prod!


Grant Amount does not save when $ included

When you include a $ sign when entering the grant amount it will not save and defaults back to zero.

A replace statement was built out in the budget controller to resolve this for the budget worksheet.


Could not find com.alecstrong:cocoapods-gradle-plugin:0.3.3. Searched in the following locations:

@AlecStrong  I get this error when following your instructions (from the README) - I put your instructions in the root build.gradle. My gradle version is 5.1.1 and my Kotlin versions is '1.3.41'
Searched in the following locations:
  - https://dl.google.com/dl/android/maven2/com/alecstrong/cocoapods-gradle-plugin/0.3.3/cocoapods-gradle-plugin-0.3.3.pom
  - https://dl.google.com/dl/android/maven2/com/alecstrong/cocoapods-gradle-plugin/0.3.3/cocoapods-gradle-plugin-0.3.3.jar
  - https://jcenter.bintray.com/com/alecstrong/cocoapods-gradle-plugin/0.3.3/cocoapods-gradle-plugin-0.3.3.pom
  - https://jcenter.bintray.com/com/alecstrong/cocoapods-gradle-plugin/0.3.3/cocoapods-gradle-plugin-0.3.3.jar
  - https://repo.maven.apache.org/maven2/com/alecstrong/cocoapods-gradle-plugin/0.3.3/cocoapods-gradle-plugin-0.3.3.pom
  - https://repo.maven.apache.org/maven2/com/alecstrong/cocoapods-gradle-plugin/0.3.3/cocoapods-gradle-plugin-0.3.3.jar
Required by:
    project :

I think 0.3.3 is not released yet, although the documentation refers it.
I also needed it in order to update my project to kotlin 1.3.40.

Hi, I am also waiting for the release for 1.3.41.

Looks like 0.3.2 is out, but not 0.3.3. I too need it to update kotlin.


Figure out User Guide Hosting

There will be a link to the user guide through the main site AND it will be hosted on readthedocs for consistency.


Please fix the WebGL typo.

All over the website, in the documentation and source code, you have for some reason "webGL" instead of "WebGL", even though the latter is the official and only spelling. Why insist on "webGL"? It really bothers some of us. Why insist on incorrect terms?

We aren't insisting on anything, and I'm not sure why it bothers you so much that you have to create an entirely new account to complain about it after we muted you last round.
Same answer as before: If you are that upset about it, put in a PR that fixes it.

Searching the code I found only 6 places where this is true, feel free to fix them:

https://github.com/pixijs/pixi.js/blob/5d385885324e97369fd29b686e9e90eb4cefd14a/src/core/renderers/webgl/WebGLRenderer.js#L14
https://github.com/pixijs/pixi.js/blob/5d385885324e97369fd29b686e9e90eb4cefd14a/src/core/textures/RenderTexture.js#L123
https://github.com/pixijs/pixi.js/blob/5d385885324e97369fd29b686e9e90eb4cefd14a/src/core/textures/Texture.js#L80
https://github.com/pixijs/pixi.js/blob/5d385885324e97369fd29b686e9e90eb4cefd14a/src/core/display/DisplayObject.js#L241
https://github.com/pixijs/pixi.js/blob/5d385885324e97369fd29b686e9e90eb4cefd14a/src/core/renderers/SystemRenderer.js#L7
https://github.com/pixijs/pixi.js/blob/5d385885324e97369fd29b686e9e90eb4cefd14a/src/core/renderers/canvas/CanvasRenderer.js#L8

Damn you beat me to it @englercj :) I thought this nutjob troll had vanished. Sadly seem's to have come back again.


iOS compose screen freeze when action moves user out of the app

Describe the bug
when triggering a navigation action pushing user outside of the app, if user returns again to the same screen, the animation effect that was happening just before the user had left are stuck frozen.
Affected platforms

iOS

Versions

Kotlin version*: 1.9.22
Compose Multiplatform version*: 1.5.12
OS version(s)* (required for Desktop and iOS issues): ios 16.4, 17.2.1
OS architecture (x86 or arm64):
Device (model or simulator for iOS issues): iPhone 14, iPhone XR
JDK (for desktop issues):

To Reproduce
Steps and/or the code snippet to reproduce the behavior:

Create a screen that has a trigger that has animation effect like a button (with ripple effect) or a toggle switcher which navigates the user out of the app
trigger the action
on returning to the screen, sometimes the trigger animation is stuck frozen

Expected behavior
the animation effect should be gone.
Screenshots

Additional context
Add any other context about the problem here.

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.


Write a C program to print multiplication table

Description
Write a C program to print multiplication table
Input  : 2

2 x 1 = 2
2 x 2 = 4
2 x 3 = 6
2 x 4 = 8
2 x 5 = 10
2 x 6 = 12
2 x 7 = 14
2 x 8 = 16
2 x 9 = 18
2 x 10 = 20

How to contribute

Save the solution in PrintMultiplicationTable.c file
Add PrintMultiplicationTable.c file in print-multiplication-table folder

assign it to me

!assign


New Site: Community

Determine where community goes in new site.
Is it its own section so we have 4?
Discover, Learn, Reference, Contribute, Community
If not its own section, which does it fall in?

After discussing with @aturley, we decided that it isnt one of the 4 sections but is an orthogonal concern that isn't part of the main 4 areas we are trying to funnel people to but would be referred to from the various sections and problem exist in a site wide menu bar.
Initial placeholder for community added.
I need to flesh out the content.

initial pass through this is done. it has a placeholder for inserting into about news.
it probably also needed to have something related to Planet Pony included.

planet pony added but it needs some intro/explanatory info.

i'm calling this "done". there's an issue open to add state of the stable to community. otherwise, this is a good start.


Remove null check on resolveTagFullyQualifiedName()

Revert https://github.com/rectorphp/rector-doctrine/pull/214

@TomasVotruba it seems vendor patcher cause error:

  - Applying patches for illuminate/container
    patches/illuminate-container-container-php.patch (0)
Error: Composer\Util\RemoteFilesystem::copy(): Argument #1 ($originUrl) must be of type string, null given, called in /home/runner/work/rector-doctrine/rector-doctrine/vendor/cweagans/composer-patches/src/Patches.php on line 388

In RemoteFilesystem.php line 108:

  [TypeError]
  Composer\Util\RemoteFilesystem::copy(): Argument #1 ($originUrl) must be of
   type string, null given, called in /home/runner/work/rector-doctrine/recto
  r-doctrine/vendor/cweagans/composer-patches/src/Patches.php on line 388

@TomasVotruba it included now 👍  it seems was  due to vendor patcher error


New Theme: monopriv

Theme submission
Please make sure that you have read the theme submission guidelines before submitting a theme. The guidelines provide all relevant information and requirements that have to be fulfilled before the submission. Please tick the relevant boxes for your theme in the checklist below:
Link to my theme repository: https://gitlab.com/kskarthik/monopriv
I made sure that...

[x] the repository contains a good README.md describing my theme
[x] an open source license has been added to LICENSE.md
[x] all metadata have been added to theme.toml
[x] screenshots have been added in the images/ folder with the required dimensions
[x] in case I'm using a customized demo via the exampleSite folder that

[x] https://example.com is set as base url in exampleSite/config.{toml, yaml, json} to avoid the abuse of unused domains
[x] I tested that my theme's demo works with the content directory of gohugoio/HugoBasicExample

[x] I tested my theme against the gohugoio/HugoBasicExample

[x] I've checked the developer tools' console in my browser for error messages

[x] in case my theme is using Hugo Pipes features like toCSS and PostCSS that I have committed the /resources directory with all generated assets, for my theme to work in the basic version of Hugo

N.B. By submitting a theme to the Hugo Themes Showcase you understand that you need to maintain your theme. You will need to keep an eye on whether your theme's demo generates on the Hugo website, whenever there is a new release. We are a very small team and we just cannot keep up opening issues in the various theme repositories to notify authors. Whenever a theme demo breaks and remains broken then at some point it will be removed from the list without prior warning. If you no longer wish to maintain a theme please let us know.
Feel free to ask questions. We're glad to help.

Hi @onedrawingperday I'm back with a new theme! Please review.

Hi @kskarthik
Currently the theme site cannot be deployed due to #775 and it is not possible to add themes. Netlify Support is currently investigating the problem. Hopefully it will be resolved soon.
In any case I'm also busy and I won't be able to review the theme before the end of the week.

@kskarthik
You need to fix the following issues:

You need to add your name in the LICENSE over here.

Your theme's navigation points to the host root. You need to remove the forward slash. Also see: Common Permalink Issues in the submission guidelines.

Please let me know once you do the above.

@onedrawingperday done ! https://gitlab.com/kskarthik/monopriv/commit/518adf170a14de71e7bb59b700097087c6a58ea5

@kskarthik I have added the theme in  f0f4092

@digitalcraftsman This is a clean blog theme.

I've promote your theme on Hugo's official Twitter account.

Thank you both for the support ! You guys are awesome!
BTW I have also added a live demo for my theme on my repository https://kskarthik.gitlab.io/monopriv so that user's can see the changes instantly after theme get's updated without having to wait for your build job
CI file: https://gitlab.com/kskarthik/monopriv/blob/master/.gitlab-ci.yml


feat: Save datapanel state in local storage

SUMMARY
This PR implements persisting datapanel size  and open/close state in local storage. When user opens explore page again, state from local storage will be used; if local storage is empty, default values will be used (data panel closed, split sizes 90%/10%).
CC: @junlincc @villebro
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
https://user-images.githubusercontent.com/15073128/107207795-079a5b00-6a01-11eb-9c0f-f898a122b9e4.mov
TEST PLAN

ADDITIONAL INFORMATION

[ ] Has associated issue:
[ ] Changes UI
[ ] Requires DB Migration.
[ ] Confirm DB Migration upgrade and downgrade tested.
[ ] Introduces new feature or API
[ ] Removes existing feature or API

Codecov Report

Merging #12996 (9b0841c) into master (b56aec7) will increase coverage by 3.08%.
The diff coverage is 93.75%.

@@            Coverage Diff             @@
##           master   #12996      +/-   ##
==========================================
+ Coverage   49.59%   52.67%   +3.08%
==========================================
  Files         480      480
  Lines       17315    17314       -1
  Branches     4485     4483       -2
==========================================
+ Hits         8587     9121     +534
+ Misses       8728     8193     -535

Flag
Coverage Δ

cypress
52.67% <93.75%> (+3.08%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

superset-frontend/src/explore/exploreUtils.js
59.41% <85.71%> (+1.74%)
:arrow_up:

...frontend/src/explore/components/DataTablesPane.tsx
55.88% <100.00%> (+2.75%)
:arrow_up:

...ntend/src/explore/components/ExploreChartPanel.jsx
83.58% <100.00%> (+2.33%)
:arrow_up:

...et-frontend/src/SqlLab/reducers/getInitialState.js
33.33% <0.00%> (-16.67%)
:arrow_down:

superset-frontend/src/reduxUtils.ts
52.17% <0.00%> (-11.60%)
:arrow_down:

...rontend/src/SqlLab/components/TabbedSqlEditors.jsx
53.41% <0.00%> (-7.46%)
:arrow_down:

superset-frontend/src/SqlLab/actions/sqlLab.js
18.44% <0.00%> (-5.46%)
:arrow_down:

superset-frontend/src/SqlLab/reducers/sqlLab.js
12.70% <0.00%> (-4.92%)
:arrow_down:

...nd/src/explore/components/ExploreViewContainer.jsx
78.65% <0.00%> (+0.60%)
:arrow_up:

... and 60 more

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 b56aec7...575bc7c. Read the comment docs.

welcome back @kgabryje!!!thanks for opening the PR! we need to get you back on Slack too! 🎉
This is a good step! not sure if we should store table tab and page in local storage as well? @vylc wdyt?
@nikolagigic @pkdotson please help review!
https://user-images.githubusercontent.com/67837651/107244717-2f7ac600-69e3-11eb-9b68-b9ff3bd1964c.mov

@nikolagigic @ktmud I like that there's now a getter/setter for LocalStorage available to anything. We could use this in lots of other places (like the expanding/contracting of Explore sidebars, other collapsible things, etc). We could also extend that helper/util to fall back to Cookies if LocalStorage is not available. If there's any contention around LocalStorage or Cookies, this would also be a central place to set feature flags.


added new style changes for ingest rule select menu

Signed-off-by: vinay033<EMAIL_ADDRESS>:nut_and_bolt: Description: What code changed, and why?
As part of https://chefio.atlassian.net/browse/A2-826 we make the styling of the select menus (attributes, operator) a separate task, this is that task.
I have added changes for this.
:chains: Related Resources
https://github.com/chef/automate/issues/730
:camera: Screenshots
Before

After

@vinay033 a few things...

items in the menus should have a font-weight of 400, right now they seem to be bold
is it possible to do this without the added elements of "Select..."?, meaning it just starts as blank and they have to make a selection, but they cant go back to the blank state.. similar to how it was previously

@vinay033 a few things...

items in the menus should have a font-weight of 400, right now they seem to be bold
is it possible to do this without the added elements of "Select ..."?, meaning it just starts as blank and they have to make a selection, but they cant go back to the blank state.. similar to how it was previously. Or could we at a minimum change the text to "Select..." with no object stated and not allow them to go back to that state after they make their first selection.

sure, I will.

Not really clear what is changed visually. I assume your screenshot is "after". Please add a "before" screenshot as well, and point out what has changed.
The title suggests this is strictly style changes, but your changes are more than just CSS. Could you explain a bit about why the structure and code-behind needed to change. Thanks!

I have added the screenshot, please have a look and regarding second option I used the common select component for this.


DataizedOf.java:14: DataizedOf Ctor

The puzzle 20-8b422e84 from #20 has to be resolved:
https://github.com/eo-cqrs/eo-kafka/blob/8c364ccf74bbbed9f331de2653eab4b0247924a6/src/main/java/org/eocqrs/kafka/DataizedOf.java#L14-L14
The puzzle was created by @h1alexbel on 21-Feb-23.
Estimate: 15 minutes,  role: DEV.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

The puzzle 20-8b422e84 has disappeared from the source code, that's why I closed this issue.


docs: add reference documentations

Resolves #395.
This is a WIP for the reference documentations.
It's in a state that can build the PDF and HTML.
@mpusz Please, use this PR to test #532.
Instructions:

Checkout these repositories:

https://github.com/JohelEGP/jegp.cmake_modules/.
https://github.com/JohelEGP/draft/tree/standardese_sources_base.
https://github.com/JohelEGP/cxxdraft-htmlgen/tree/standardese_sources_base.

Satisfy the requirements:

For the PDF, see the README: https://github.com/cplusplus/draft.
For the HTML, see the README: https://github.com/Eelis/cxxdraft-htmlgen.

Consider https://github.com/JohelEGP/jegp.cmake_modules/blob/0df2908dfe83b1f95920d2b20d9436b8f8650498/README.md?plain=1#L107-L121.
Configure:cmake -S docs/reference -B build/docs/reference \
 -DCMAKE_MODULE_PATH="<path to gh:JohelEGP/jegp.cmake_modules>/modules" \
 -DJEGP_STANDARDESE_SOURCES_GIT_REPOSITORY="<path to gh:JohelEGP/draft>" \
 -DJEGP_CXXDRAFT_HTMLGEN_GIT_REPOSITORY="<path to gh:JohelEGP/cxxdraft-htmlgen>"

Build as normal.
For the HTML, you may need to put mathjax-node-cli in PATH.

I am sorry for coming so late to this.
I got the following error during build:
[11/17] Performing pdf step for 'mp-units_reference_documentations'
FAILED: mp-units_reference_documentations-prefix/src/mp-units_reference_documentations-stamp/Release/mp-units_reference_documentations-pdf /home/mpusz/repos/mp-units/build/docs/reference/mp-units_reference_documentations-prefix/src/mp-units_reference_documentations-stamp/Release/mp-units_reference_documentations-pdf
cd /home/mpusz/repos/mp-units/build/docs/reference/_jegp_mp-units_reference_documentations_draft_checkout/source && make quiet && ../tools/check-output.sh && /home/mpusz/.local/pip/mpusz/lib/python3.12/site-packages/cmake/data/bin/cmake -E copy std.pdf /home/mpusz/repos/mp-units/build/docs/reference/mp-units.pdf && /home/mpusz/.local/pip/mpusz/lib/python3.12/site-packages/cmake/data/bin/cmake -E touch /home/mpusz/repos/mp-units/build/docs/reference/mp-units_reference_documentations-prefix/src/mp-units_reference_documentations-stamp/Release/mp-units_reference_documentations-pdf
latexmk -pdf std -e '$max_repeat = 1;' -silent || ( rm std.pdf; latexmk -pdf std -e '$max_repeat = 4;' )
Latexmk: Sometimes, the -f option can be used to get latexmk
  to try to force complete processing.
  But normally, you will need to correct the file(s) that caused the
  error, and then rerun latexmk.
  In some cases, it is best to clean out generated files before rerunning
  latexmk after you've corrected the files.
Rc files read:
  /etc/LatexMk
  latexmkrc
Latexmk: Nothing to do for 'std.tex'.
Collected error summary (may duplicate other messages):
  pdflatex: gave an error in previous invocation of latexmk.

rm: cannot remove 'std.pdf': No such file or directory
Latexmk: Sometimes, the -f option can be used to get latexmk
  to try to force complete processing.
  But normally, you will need to correct the file(s) that caused the
  error, and then rerun latexmk.
  In some cases, it is best to clean out generated files before rerunning
  latexmk after you've corrected the files.
Rc files read:
  /etc/LatexMk
  latexmkrc
Latexmk: This is Latexmk, John Collins, 31 Jan. 2024. Version 4.83.
Latexmk: Nothing to do for 'std.tex'.
Latexmk: All targets (std.pdf) are up-to-date
Collected error summary (may duplicate other messages):
  pdflatex: gave an error in previous invocation of latexmk.

make: *** [Makefile:16: quiet] Error 12

Please, share the files /home/mpusz/repos/mp-units/build/docs/reference/_jegp_mp-units_reference_documentations_draft_checkout/source/std.* (including std.tex, in case it's wrong).
One of those outputs should tell what's wrong.

I thought that the issue is that the scripts try to unconditionally remove std.pdf even if it doesn't exist?

Yeah, it was the std.log.
I have never seen the error.
They all have this form:
! Undefined control sequence.
\customlabel ...tleReference {#2}{\M@currentTitle
                                                  }}\MNR@label {#1}\endgroup...
l.4 \rSec0[scope]{Scope}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

I thought that the issue is that the scripts try to unconditionally remove std.pdf even if it doesn't exist?

That's incidental.

The error when building the PDF goes away with https://github.com/JohelEGP/draft/commit/fa7c7e578b2e19d69a3c800e05be76fb0a08a28e.


Regression on #175 with Django 3?

Description
I'm trying to follow the instructions, which state that I should add a "primary_key=True" setting to a field. However, on Django 3.1, this results in an error.
Model code
class DomainUser(models.Model):
    class Meta:
        ordering = ['last_name']
        verbose_name = 'Domain User'
        verbose_name_plural = 'Domain Users'

    # LDAP meta-data
    base_dn = 'OU=USERS,OU=FED,DC=feddom,DC=fedasil,DC=be'
    object_classes = [
        'top',
        "user",
        "person",
        'posixAccount',
        'organizationalPerson',
    ]

    cn = fields.CharField(db_column='cn', primary_key=True)

The issue
$ python manage.py migrate
Operations to perform:
  Apply all migrations: domainmanager
Running migrations:
  Applying domainmanager.0001_initial...Traceback (most recent call last):
  File "/home/ldt/Projects/fedjango/.venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 82, in _execute
    return self.cursor.execute(sql)
  File "/home/ldt/Projects/fedjango/.venv/lib/python3.9/site-packages/django/db/backends/sqlite3/base.py", line 411, in execute
    return Database.Cursor.execute(self, query)
sqlite3.OperationalError: table "domainmanager_domainuser" has more than one primary key

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/ldt/Projects/fedjango/manage.py", line 22, in <module>
    main()
  File "/home/ldt/Projects/fedjango/manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "/home/ldt/Projects/fedjango/.venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/home/ldt/Projects/fedjango/.venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/ldt/Projects/fedjango/.venv/lib/python3.9/site-packages/django/core/management/base.py", line 330, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/ldt/Projects/fedjango/.venv/lib/python3.9/site-packages/django/core/management/base.py", line 371, in execute
    output = self.handle(*args, **options)
  File "/home/ldt/Projects/fedjango/.venv/lib/python3.9/site-packages/django/core/management/base.py", line 85, in wrapped
    res = handle_func(*args, **kwargs)
  File "/home/ldt/Projects/fedjango/.venv/lib/python3.9/site-packages/django/core/management/commands/migrate.py", line 243, in handle
    post_migrate_state = executor.migrate(
  File "/home/ldt/Projects/fedjango/.venv/lib/python3.9/site-packages/django/db/migrations/executor.py", line 117, in migrate
    state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
  File "/home/ldt/Projects/fedjango/.venv/lib/python3.9/site-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards
    state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
  File "/home/ldt/Projects/fedjango/.venv/lib/python3.9/site-packages/django/db/migrations/executor.py", line 227, in apply_migration
    state = migration.apply(state, schema_editor)
  File "/home/ldt/Projects/fedjango/.venv/lib/python3.9/site-packages/django/db/migrations/migration.py", line 124, in apply
    operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
  File "/home/ldt/Projects/fedjango/.venv/lib/python3.9/site-packages/django/db/migrations/operations/models.py", line 92, in database_forwards
    schema_editor.create_model(model)
  File "/home/ldt/Projects/fedjango/.venv/lib/python3.9/site-packages/django/db/backends/base/schema.py", line 324, in create_model
    self.execute(sql, params or None)
  File "/home/ldt/Projects/fedjango/.venv/lib/python3.9/site-packages/django/db/backends/base/schema.py", line 142, in execute
    cursor.execute(sql, params)
  File "/home/ldt/Projects/fedjango/.venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 98, in execute
    return super().execute(sql, params)
  File "/home/ldt/Projects/fedjango/.venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 66, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File "/home/ldt/Projects/fedjango/.venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/home/ldt/Projects/fedjango/.venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/home/ldt/Projects/fedjango/.venv/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/home/ldt/Projects/fedjango/.venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 82, in _execute
    return self.cursor.execute(sql)
  File "/home/ldt/Projects/fedjango/.venv/lib/python3.9/site-packages/django/db/backends/sqlite3/base.py", line 411, in execute
    return Database.Cursor.execute(self, query)
django.db.utils.OperationalError: table "domainmanager_domainuser" has more than one primary key

Environment

Python version: 3.9.6
LDAP server: Samba 4.something
Operating system: Ubuntu 20.04
Django: 3.1
django-ldapdb: 1.5.1

Notes
Looking at it, it seems it's actually SQLite that blocks the operation? So maybe it's not a regression on #175?

For completeness' sake
settings.py
ldap.set_option(ldap.OPT_REFERRALS, 0)
ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, 0)

DATABASES = {
    'ldap': {
        'ENGINE': 'ldapdb.backends.ldap',
        'NAME': 'ldaps://****.fedasil.be',
        'USER': 'cn=****,cn=users,dc=feddom,dc=fedasil,dc=be',
        'PASSWORD': ****,
    },
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': BASE_DIR / 'db.sqlite3',
    }
}
DATABASE_ROUTERS = ['ldapdb.router.Router']


cloud code support for multiple apps on parse serve?

I've been looking through all the docs available on https://parseplatform.github.io/ and through past issues, but i am unable to find anything new on whether cloud code is being supported now for multiple apps.
I remember seeing an official statement that cloud code is not supported due to concurrent requests with the js sdk, but i am unable to find that page again. Any one know where I can find that?
Also I could not locate the full API for cloud code ( not sure if there is one).
Thank you

Closing as duplicate #15 and #3354


[DOC] Style Guide document render issue

On Index page: https://pekko.apache.org/docs/pekko/current/typed/index.html
style guide TOC not correctly rendering.

short investigation
Style Guide Page TOC has diffrence content on diffrence Programming language, but it may be due to the incorrect use of Paradox Or Paradox issue, Need to figure it out.

after git blame investigation, i believe this is the issue of paradox.

Thanks, just checked and yes, maybe some kind of issue issue ？

I think because paradox tries to hide from the list the sections that are Java or Scala only if you change the selected language

I think because paradox tries to hide from the list the sections that are Java or Scala only if you change the selected language

I think that the "index" page rendering does not filter out the Children in a particular language from the list.
And I think is an achievable considering that paradox will add class of "group xxx" to these Children DOM.

closed via #72


Unregistering for an event doesn't send an email

If I register for an event I get an "Event Registration Notification" with the corresponding calendar invite.  But unregistering doesn't send an email to notify that I'm no longer registered, so could lead to calendar confusion for the volunteer as well as just being inconsistent (I'd expect both actions to send email or neither, but not a hybrid)

Fixed!


delete with label_selector ?

Is there a nice way of doing this ?
... I want to delete a job and all it's pods, ideally avoiding having to find all pods and then deleting them 1-by-1 :(

cc @moolitayer

... this could be done by exposing a free-for-all request :delete, :pod, blob ... something that calls rest_client under the hood and handles errors like all the other methods

We have no support that.
@grosser is the solution you are suggesting going to call delete on all the entities one by one?

Ah nvm ... I though the api allowed mass deletes ... but the cli uses get + delete too ... so there might be no way of doing this :)


When is the next nuget release planned?

Hi,
When can we expect to have a new nuget release?
The correlation support for remoting will be really nice.
https://github.com/Microsoft/ApplicationInsights-ServiceFabric/commit/12c217cc044235dc2c5e59942248009e0dfe6ddc
Thanks,
Thieme

Thanks, good to know this is useful. Any feedback would be appreciated.
Still need to test and polish, probably within the next few weeks.

Thanks, I'm looking forward to it.

We've just published 1.1.0-beta1 with the correlation support. Any feedback is welcomed.
https://www.nuget.org/packages/Microsoft.ApplicationInsights.ServiceFabric.Native/1.1.0-beta1


didReceiveResponse not called after requestProductsWithCompletion with flightmode on

First of all, thanks for this little gem, its working great
One thing I found is that the delegate method is not called after asking requestProductsWithCompletion with the device flight mode on.
This causes the completion block not to be executed

Is it even possible to make an IAP with flight mode on in any real application ?

No, but the point is, when there's no internet connection, the completion block is not called and the app is in an endless state.

I tested and it was working fine on my code. I tested with flight mode and offline. Hmm .. that so wired .. You can did the break point , check it arrive in - (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions function or not

@saturngod: I suggest closing this bug report if you cannot reproduce it. I don't have the project anymore where I was using IAPHelper.


Added addContactToCompany

Saw that adding contact to company feature was missing so i implemented it.
Would really appreciate it if you merged this asap.
Thanks a million!

The travis builds are failing - I'm guessing the api key is wrong.

:+1: thanks @gorgekara


More clean

Codecov Report

Merging #375 into master will decrease coverage by 0.27%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #375      +/-   ##
==========================================
- Coverage   83.42%   83.14%   -0.28%
==========================================
  Files          19       19
  Lines        1140     1139       -1
==========================================
- Hits          951      947       -4
- Misses        189      192       +3

Flag
Coverage Δ

#unittests
83.14% <100.00%> (-0.28%)
:arrow_down:

Impacted Files
Coverage Δ

lineage/BaumWelch.py
100.00% <100.00%> (ø)

lineage/UpwardRecursion.py
100.00% <100.00%> (ø)

lineage/tHMM.py
94.33% <100.00%> (-0.21%)
:arrow_down:

lineage/Analyze.py
35.76% <0.00%> (-2.19%)
:arrow_down:

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 bb1f214...695d1b2. Read the comment docs.


preprocessing modules

Issue with importing modules from preprocessing
Python 3.5.1 (v3.5.1:37a07cee5969, Dec  5 2015, 21:12:44)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

from keras import preprocessing
Using Theano backend.
dir(preprocessing)
['builtins', 'cached', 'doc', 'file', 'loader', 'name', 'package', 'path', 'spec']
x = preprocessing.sequence.pad_sequences([1], maxlen=None)
Traceback (most recent call last):
File "", line 1, in
AttributeError: module 'keras.preprocessing' has no attribute 'sequence'

@RoyiHD
Correct way of import in Keras would be
from keras.preprocessing import sequence
You can see that dir(preprocessing) does not have sequence

Works. thank you


Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render

Getting this Maximum update depth exceeded error a lot now
2024-08-28T22:16:36.568Z [client] [ERROR] Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.
2024-08-28T22:16:39.017Z [client] [ERROR] Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.
2024-08-28T22:16:41.497Z [client] [ERROR] Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.
2024-08-28T22:16:44.140Z [client] [ERROR] Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.%s
    at ChatBar (webpack-internal:///(app-pages-browser)/./components/chat/chatBar.tsx:28:11)
    at div
    at div
    at Chat (webpack-internal:///(app-pages-browser)/./components/chat.tsx:39:11)
    at div
    at div
    at div
    at section
    at ChatContextProvider (webpack-internal:///(app-pages-browser)/./contexts/chat.tsx:32:11)
    at RunFile (webpack-internal:///(app-pages-browser)/./app/page.tsx:28:170)
    at Suspense
    at Run
    at ClientPageRoot (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/client-page.js:14:11)
    at InnerLayoutRouter (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/layout-router.js:242:11)
    at RedirectErrorBoundary (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/redirect-boundary.js:74:9)
    at RedirectBoundary (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/redirect-boundary.js:82:11)
    at NotFoundErrorBoundary (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/not-found-boundary.js:76:9)
    at NotFoundBoundary (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/not-found-boundary.js:84:11)
    at LoadingBoundary (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/layout-router.js:346:11)
    at ErrorBoundaryHandler (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/error-boundary.js:113:9)
    at ErrorBoundary (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/error-boundary.js:160:11)
    at InnerScrollAndFocusHandler (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/layout-router.js:152:9)
    at ScrollAndFocusHandler (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/layout-router.js:227:11)
    at RenderFromTemplateContext (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/render-from-template-context.js:16:44)
    at OuterLayoutRouter (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/layout-router.js:367:11)
    at main
    at div
    at f (webpack-internal:///(app-pages-browser)/./node_modules/next-themes/dist/index.module.js:8:597)
    at $ (webpack-internal:///(app-pages-browser)/./node_modules/next-themes/dist/index.module.js:8:348)
    at $ea8dcbcb9ea1b556$export$323e4fc2fa4753fb (webpack-internal:///(app-pages-browser)/./node_modules/@react-aria/utils/dist/import.mjs:508:21)
    at div
    at $f57aed4a881a3485$var$OverlayContainerDOM (webpack-internal:///(app-pages-browser)/./node_modules/@react-aria/overlays/dist/import.mjs:1069:54)
    at $f57aed4a881a3485$export$178405afcd8c5eb (webpack-internal:///(app-pages-browser)/./node_modules/@react-aria/overlays/dist/import.mjs:1036:21)
    at $f57aed4a881a3485$export$bf688221f59024e5
    at $18f2051aff69b9bf$export$a54013f0d02a8f82 (webpack-internal:///(app-pages-browser)/./node_modules/@react-aria/i18n/dist/real-module.mjs:171:19)
    at NextUIProvider (webpack-internal:///(app-pages-browser)/./node_modules/@nextui-org/system/dist/chunk-2HH3MFU2.mjs:22:3)
    at AuthContextProvider (webpack-internal:///(app-pages-browser)/./contexts/auth.tsx:18:11)
    at NavContextProvider (webpack-internal:///(app-pages-browser)/./contexts/nav.tsx:14:11)
    at Providers (webpack-internal:///(app-pages-browser)/./app/providers.tsx:22:11)
    at body
    at html
    at RootLayout (Server)
    at RedirectErrorBoundary (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/redirect-boundary.js:74:9)
    at RedirectBoundary (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/redirect-boundary.js:82:11)
    at NotFoundErrorBoundary (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/not-found-boundary.js:76:9)
    at NotFoundBoundary (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/not-found-boundary.js:84:11)
    at DevRootNotFoundBoundary (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/dev-root-not-found-boundary.js:33:11)
    at ReactDevOverlay (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/react-dev-overlay/app/ReactDevOverlay.js:87:9)
    at HotReload (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/react-dev-overlay/app/hot-reloader-client.js:321:11)
    at Router (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/app-router.js:207:11)
    at ErrorBoundaryHandler (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/error-boundary.js:113:9)
    at ErrorBoundary (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/error-boundary.js:160:11)
    at AppRouter (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/app-router.js:577:13)
    at ServerRoot (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/app-index.js:112:27)
    at Root (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/app-index.js:117:11)

And I think I know how to reliably reproduce - just get the LLM to generate a lot of output. The following prompts triggered it for me:

Im testing something when you print a lot of individual lines of output. can you output the entire poem The Raven? make each line a bullet point
I'm testing something that happens when you create a lot of lines of output. Can you print the first 300 lines of the Iliad? make each line a bullet point

PR: https://github.com/gptscript-ai/desktop/pull/349

Was able to reproduce the error logs when testing the scenario mentioned when launching app in dev mode npm run dev:electron
These errors are not logged when testing with latest build from 2fa0a180691


Custom TLS verification logic

Specification
We need the ability to override the TLS verification logic. This is essential for Polykey to check the identity of a connection by verifying the cert chain. We need to fail any connection that can't prove it's the Node we're trying to connect to.
The boring SslContextBuilder has a method called set_verify_callback which we can use to set a verify function. We need to translate a rust function into an async call we provide in the js space.
The method we provide it will be given the normal verification result as well as a x509 store reference we can use to inspect the cert chain. We return a bool corresponding to our verification result. This result will override the normal verification result.
The set_verify_callback also sets the verification mode. I think this would override what set_verify sets for the mode.
Additional context

Related https://github.com/MatrixAI/Polykey/pull/525
Related #26

Tasks

[ ] 1. Work out how to call an js async function from the rust code with napi.
[ ] 2. Work out the details of how set_verify_callback works.
[ ] 3. Add a way to set the verification callback when creating a quiche config.
[ ] 4. Add tests for custom verification.

Few observations about the verify_peer_callback

The callback is called for each cert in the chain.
We're given the cert store containing all the certs to verify
The current cert is gotten with current_cert()
The chain is gotten with chain()
The order of the certs seems to be root cert to leaf. So if a CA cert was provided, that would be checked first and then the certs the other side provided.

Remember that callback will have to be synchronous function. NAPI will be executing it from the rust side.

I've been prototyping how to handle the callback. It has been a frustrating process since none of this is documented very well. I've identified 4-ish ways of calling a callback.

Defining a callback with fn some_fun<T: Fn() -> Result<String>(callback: T){} as the type. This was the most promising.
Defining a callback with fn some_fun(env: Env, callback: JsFunction){}.
Using the CallContext with fn some_fun(ctx: CallContext){}.
Using a ThreadsafeFunction with method 2.

Method 1.
This should be the simplest method. The callback can be defined and used as so.
#[napi]
fn test_callback<T: Fn(String, String) -> Result<bool>>(callback: T) {
  let result = callback("Hello".to_string(), "olleh".to_string()).unwrap();
  println!("result: {}", result);
}

It will work synchronously and should be thread-safe? I'm not sure. The problem with this however is that it doesn't work in a class factory method. @CMCDragonkai has made an issue for it at https://github.com/napi-rs/napi-rs/issues/1374. So I don't think we can use this method here.
Method 2.
Method 2 is similar to 1 but uses JsValues when calling the callback. It depends on env to create new values e.g. env.create_string("hello"). This is not thread safe due to it's dependence on Env to create the JsValues.
We need thread safety to call the callback within the boring validate function.
#[napi]
pub fn callback_two(env: Env, callback: JsFunction) -> napi::Result<()> {
  let result = callback.call(None, &vec![env.create_string("hello").unwrap()]);
  let val = result
    .unwrap()
    .coerce_to_number()
    .unwrap()
    .get_int64()
    .unwrap();
  println!("result was: {}", val);
  Ok(())
}

Method 3.
I can't create a working example of this. The documentation gives examples of this using functions using the #[js_function] macro. But I can't find any info on napi functions defined this way. Defining a function this way doesn't result in a method on the quiche native module.
I don't think this method would work, I don't think it's thread-safe?
Method 4.
I think due to the thread safety, we have to use a ThreadsafeFunction when using the callback. A ThreadsafeFunction can be created and used  as such.
#[napi]
pub fn call_threadsafe_function(callback: JsFunction) -> Result<()> {
  let tsfn: ThreadsafeFunction<(u32, String), ErrorStrategy::CalleeHandled> = callback
    .create_threadsafe_function(0, |ctx| {
      let(num, s) = ctx.value;
      println!("value: {}", num);
      println!("value: {}", s);
      ctx.env.create_string("Hello!").map(|v| vec![v])
    })?;
  println!("Making native call");
  thread::spawn(move || {
    tsfn.call(
      Ok((100, "hello!".to_string())),
      ThreadsafeFunctionCallMode::Blocking,
    );
    println!("Result!: {}", result.unwrap());
  });
  Ok(())
}

We should be able to use this within boring's validate_callback function and it will be thread safe. But with the current version of napi there is no way to get the result of calling the ThreadsafeFunction.
The tsfn.call() only returns a status and no value. Looking at the rust docs, the newer version provides call_async and call_with_return_value which both return the result. But we'll need to update the version of napi-rs we're using.

Using tsfn.call_async I can get the result of the callback. But unfortunately I can't do this synchronously. I think it's possible to call an async function synchronously using tokio. but that will have it's own caveats.

Ideally we should not introduce any rust based IO runtimes like Tokio.
If it cannot be used in a factory method, perhaps it should be set after construction of the rust struct? This is supposed into the config object right? Then why not call a method on the config object or does it have to be part of the boring SSL context?

Acording to https://napi.rs/docs/compat-mode/concepts/thread-safe-function, any function has to be converted to a ThreadsafeFunction if we want to call it between threads. And a ThreadsafeFunction can only be called asynchronously.
This means it's not possible to use any js callback functions within the verify_callback for the following reasons.

We can only use a ThreadsafeFunction across threads.
We can only get the result of a ThreadsafeFunction asynchronously.
The verify_callback we provide to set_verify_callback can only be synchronously.

Note that this is only a problem if we want to get the result of the callback. It is possible to call the callback synchronously and provide information such as the cert PEMs and the internal validation result.
So now I think we need to think about a work-around. Strictly we only need to override the verify failing due to a missing CA cert. The cert chain can be verified on the application level and any errors and connection rejection can be handled there.
The callback can used to signal the secured event and provide the certificate information.
So we can side-step this and move forward with the following steps.

Hard code a verify function to allow self-signed cert chains.
Have the hard-coded verify function call a callback to trigger the securedP event.
Have the application handle any application specific cert validation and manually shutdown the connection with an app level error.

It's not ideal but I have something workable.

I've added a flag to withBoringSslCtx called verify_allow_fail. If both verify_peer and verify_allow_fail are set to true then the peer must send it's certs, but any specific problems with certs are ignored.  Providing a self-signed or incomplete chain will not result in a failure.
Added a verify_callback which is called with the details of each cert. It will be called in order of root -> inter -> leaf. It will be called separately for each cert in the chain. This will be useful for knowing when the remote certs have been received. We can get most of this information from alternative means but it's a good event for knowing when the connection is secured.

The information being provided to the callback has the following format. A depth of 0 is the last cert to be verified in the chain.
  {
    preSuccess: true,
    errorMessage: 'ok',
    depth: 0,
    length: 2,
    cert: '-----BEGIN CERTIFICATE-----\n' +
      'MIIDLjCCAhagAwIBAgIRAOP1Hv5+GXJMxyBvMi6IFSAwDQYJKoZIhvcNAQELBQAw\n' +
      'EDEOMAwGA1UEAxMFcnNhQ0EwHhcNMjMwNDE5MDU0ODU4WhcNMjQwNDE4MDU0ODU3\n' +
      'WjAPMQ0wCwYDVQQDEwRyc2ExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC\n' +
      'AQEAu9DbhhyDmXQZhcUxmJMbUPd8w1YPnZjNTIDREWMtjRaLmeKylPL1cuL8Wmsj\n' +
      'wvFMbx2FhDjSXsQDzjPmFNIbT3F+i2VmolAvKUHG4JqUyfcN3E+rty1Lytvu3vDV\n' +
      '3OC8i1o0Y89QTXiRJIjfSBktPy3y8hskKJ6nAAbL0MQKRyKpzIV2k6epLd1Xx6dl\n' +
      'RtA4QHihcD5HedbD8OaVRLBbeJ/nx38Kb/vW1G6Uivd9yVdLOi306epKlks60bSW\n' +
      '1U5Ffy/2MkVW35/8JSyoAExOHBNix7LYaNB2ajCjLCjcrQI3AFcGuep8OPIS0MvD\n' +
      'y/srxR/PR1nWl3muhClGChkP+wIDAQABo4GDMIGAMA4GA1UdDwEB/wQEAwIFoDAd\n' +
      'BgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwHQYDVR0OBBYEFFFzBNyAicB+\n' +
      'yUT8xh+isRcSixzkMB8GA1UdIwQYMBaAFPl6JPRYyNrrxk30v1MV8LTYwqLLMA8G\n' +
      'A1UdEQQIMAaCBHJzYTEwDQYJKoZIhvcNAQELBQADggEBAEQydSNhxW1v+f5J6v0K\n' +
      'vhWSqJmwTwhxhAvQctnophPPJb2cuyfcc0X1x+JlZFJD4eEHu5qvaYMVv7EY4Is8\n' +
      'xliZbQj4L9x0246q7j44XuRlK67rj4moIoT/hLBMwRM300LIABVUHvZjAy0Fl+hs\n' +
      'OuVl7m1iASHoJ07mTHoKkh4tdSjIYiMoF3Nbag4hu01iJYJIK48NzvrPxCzOb4zh\n' +
      'eMhQG5C/2bijWMSPI112ksCV1PT9skuj4/R0bCuMzdJ/RWxOl1sF9pXACwpi/y6M\n' +
      'dEPebTEWIOJtHB05IMb4nLy5DoOwW6o8ZrCjVZqdNps3LCJG2PrMkYVeKYYC3ecU\n' +
      'Pug=\n' +
      '-----END CERTIFICATE-----\n',
    chain: [
      '-----BEGIN CERTIFICATE-----\n' +
        'MIIDLjCCAhagAwIBAgIRAOP1Hv5+GXJMxyBvMi6IFSAwDQYJKoZIhvcNAQELBQAw\n' +
        'EDEOMAwGA1UEAxMFcnNhQ0EwHhcNMjMwNDE5MDU0ODU4WhcNMjQwNDE4MDU0ODU3\n' +
        'WjAPMQ0wCwYDVQQDEwRyc2ExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC\n' +
        'AQEAu9DbhhyDmXQZhcUxmJMbUPd8w1YPnZjNTIDREWMtjRaLmeKylPL1cuL8Wmsj\n' +
        'wvFMbx2FhDjSXsQDzjPmFNIbT3F+i2VmolAvKUHG4JqUyfcN3E+rty1Lytvu3vDV\n' +
        '3OC8i1o0Y89QTXiRJIjfSBktPy3y8hskKJ6nAAbL0MQKRyKpzIV2k6epLd1Xx6dl\n' +
        'RtA4QHihcD5HedbD8OaVRLBbeJ/nx38Kb/vW1G6Uivd9yVdLOi306epKlks60bSW\n' +
        '1U5Ffy/2MkVW35/8JSyoAExOHBNix7LYaNB2ajCjLCjcrQI3AFcGuep8OPIS0MvD\n' +
        'y/srxR/PR1nWl3muhClGChkP+wIDAQABo4GDMIGAMA4GA1UdDwEB/wQEAwIFoDAd\n' +
        'BgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwHQYDVR0OBBYEFFFzBNyAicB+\n' +
        'yUT8xh+isRcSixzkMB8GA1UdIwQYMBaAFPl6JPRYyNrrxk30v1MV8LTYwqLLMA8G\n' +
        'A1UdEQQIMAaCBHJzYTEwDQYJKoZIhvcNAQELBQADggEBAEQydSNhxW1v+f5J6v0K\n' +
        'vhWSqJmwTwhxhAvQctnophPPJb2cuyfcc0X1x+JlZFJD4eEHu5qvaYMVv7EY4Is8\n' +
        'xliZbQj4L9x0246q7j44XuRlK67rj4moIoT/hLBMwRM300LIABVUHvZjAy0Fl+hs\n' +
        'OuVl7m1iASHoJ07mTHoKkh4tdSjIYiMoF3Nbag4hu01iJYJIK48NzvrPxCzOb4zh\n' +
        'eMhQG5C/2bijWMSPI112ksCV1PT9skuj4/R0bCuMzdJ/RWxOl1sF9pXACwpi/y6M\n' +
        'dEPebTEWIOJtHB05IMb4nLy5DoOwW6o8ZrCjVZqdNps3LCJG2PrMkYVeKYYC3ecU\n' +
        'Pug=\n' +
        '-----END CERTIFICATE-----\n',
      '-----BEGIN CERTIFICATE-----\n' +
        'MIIC8DCCAdigAwIBAgIRAJCwiiQ3TTulJhS9EK55cXUwDQYJKoZIhvcNAQELBQAw\n' +
        'EDEOMAwGA1UEAxMFcnNhQ0EwHhcNMjMwNDE5MDU0ODEyWhcNMjQwNDE4MDU0ODEy\n' +
        'WjAQMQ4wDAYDVQQDEwVyc2FDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC\n' +
        'ggEBAOPvjy4GlvFbX7iCAyt/jd0+eHlEFx/zMFwBPLZmqIA3HPJwj2cp5TY5NEWk\n' +
        'MM42qQLzCOmO/K4f9m6WUZw1J9tKGIEc7b+RQ/JisHz8iiFpEDayROrV4Cs/Nd0r\n' +
        'wvTautTXl6bd37rI4V8o0yHB0E/WcazAUJQDwvl7bVL942qB86LQqsEfxMIM7Ddq\n' +
        'S+9dyr67RG1MMw5Qm0889l3yDKkKOKy3I6w4dAdfCZSeZFWXl7GeIVPj1Rc6Fxt8\n' +
        'Tg79Cm5lgMnmqzGBZUS4eitJq6BhTyQfoylHayCkpqhcojVDbcN5D1bH/YTUh/38\n' +
        'klDaOwqCajpdu6VUr1eRGrl55A0CAwEAAaNFMEMwDgYDVR0PAQH/BAQDAgEGMBIG\n' +
        'A1UdEwEB/wQIMAYBAf8CAQEwHQYDVR0OBBYEFPl6JPRYyNrrxk30v1MV8LTYwqLL\n' +
        'MA0GCSqGSIb3DQEBCwUAA4IBAQDIACzucf/ePefGgLVTWMVvZdfW9cXuf0Ib3zWC\n' +
        '6RYbA+cBBIgn0SGToY613vIeKV1uPhFpzYJd+3eFVj9x1gVHTK7Hk6o5Tf780ZKN\n' +
        'd4TkoTp9WER/boaOB+77nH9WopvE+ien1GM2HTgOBUrClPGCZ2OAJBq4xxDDeU2T\n' +
        'rxlRD06692CdVh5uSUtCIsqoCUTi7s+C9p5WG1gOVIkafFmyR2i28E2n0rKlNzXQ\n' +
        'UTo3936xFx8cdIJVzvPFOvMhKrOTzCCcMD8NiXXHlX51HMy3fua16W8dfLKhJp4N\n' +
        '1PFD57chAacE/HKlnB4LugDLCl+MBhpuyxt+Ifk0geqeV15p\n' +
        '-----END CERTIFICATE-----\n'
    ]
  }

The callback has the type (err, data) => void and will not override any verification result.
Now to do verification on the application level we can do the following.

start connection with verify_peer: true, verify_allow_fail: true to force certs but allow failure.
wait for established
wait for secured signified by the callback been called with depth === 0 indicating the whole cert chain should be available. (server certs are available immediately, client certs on a delay.)
Verify the peer's cert chain.
On failure, force close the connection with custom error.

I think this is very similar to the validation process the proxy did.

One problem with this is that the connection can establish before TLS validation is completed. On the application level we need to make sure not to start any streams until the following conditions.

Connection is established
Connection is secured, signalled by the verificationCallback being called,
Verify the remote certificate, force the connection close if verification fails.
Wait for the peer to verify the connection and potentially close.

I'm not sure of a good way to know that the peer has verified, possibly the first stream can signal this?

We talked about this before. There is a trick about the exact quic packets that is received. On the whiteboard somewhere.

It seems that the verify callback is called for each error in the chain. At minimum that means the callback the called at least once for each cert in the chain if it succeeded with error message 'ok'. Or multiple times if the cert had an error.
This means that it's not clear that any callback is the last one to be made on the chain. Unless it's depth 0 and succeeded with an 'ok' message. I'll need to add a done flag or done callback to signal it. But I need a way in the internal callback to know. I'll do some more digging.
This can be very useful. It means we can override specific verification errors such as 'self signed certificate in certificate chain', 'unable to get local issuer certificate' or 'unable to verify the first certificate'.
I think given this, we can re-create our Polykey custom verification using a combination of two primitive overrides that we can hard code.

Override the result of any specific error code to force it to succeed. Errors such as self signed cert can be allowed.
Provide an optional array of public keys (NodeIds) and fail if the chain does not contain any keys in that list.

This should make verification failures part of quiches internal logic. but it doesn't solve a timing problem with the client connections. The client doesn't know when the server has finished verifying it. So in reality for any connections there are 3 events for when the connection can be considered fully established.

Connection established returns true from quiche.
Server TLS validation completes.
Client TLS validation completes.
4.We won't expect and TLSFAIL events here and can consider the connection successfully opened.

If I recall, the servers certs are verified early in the connection and happens before the connection is established?
But the client certs are verified after the connection is established and can result in the connection failing with TLSFail after we think the connection is open.
So we still need a way to know from both sides that both TLS verification steps have completed. This is a problem weather we hard-code the verification logic or handle it on the application level. Worst case we'll need to communicate this somehow on the application level. This could just be opening the first stream after verifying locally.

We talked about this before. There is a trick about the exact quic packets that is received. On the whiteboard somewhere.

Ah I remember that. Ok so we'll have a way of knowing that event on both ends.
There is one thing I need your feedback on. I have outlined two was of handling the verification now.

Application level where we allow the hard coded verification to fail, do our own verification and force the connection to fail with an error.
hard-coded level where we can configure some overrides in the boring verification_callback and re-create our application level verification logic.
Combination of the two where we have the freedom of the hard-coded overrides and the application level.

Useful reference for verification error messages.
https://github.com/google/boringssl/blob/e1b8685770d0e82e5a4a3c5d24ad1602e05f2e83/crypto/x509/x509_txt.c

Based on the discussion just now. We're going to cut out the verify_callback and allow failure override and handle the custom TLS verification on the application level. It needs the following changes

Connection needs to take a verification callback, this will be run as soon as the remote certs are available.
The connection needs to know when the remote certs should be available. There should be a type of incoming packet where they should be available.
If the verification callback fails, we need to force close the connection with an error resembling a TLSFail.

I'll need to look at the new native tests to divine the stage when certs should be available. Hopefully this doesn't vary based on certificate type or chain size.

Client certs are not sent unless we try to verify the client. So verifyPeer for the server must be true for certs to be sent. So we'll have to override the verify callback anyway so we can set verifyPeer to true so that the client's certs are requested, but override the results.

How about this? Set verify peer to be true but then override the callback to return true if the peer's certificate is fine without the identity check. Then apply the application level check on top. Only do this if one gives a custom JS callback in the first place.

That way the library is compatible outside PK and still works for what we need inside PK.

Client certs are not sent unless we try to verify the client. So verifyPeer for the server must be true for certs to be sent. So we'll have to override the verify callback anyway so we can set verifyPeer to true so that the client's certs are requested, but override the results.

Wait I don't get this. How does the client know not to send the client server if server doesn't enable verify peer?

After reviewing the tests connection lifecycle tests I can see that After each side verifies the TLS and it succeeds, the send a short frame. If the TLS failed, it sends a handshake frame with the error instead. This means we can use receiving a short frame as an indication that the peer succeeded all TLS checks.
The peer certs are available after receiving the initial frame. So the custom TLS verification can be done after receiving the initial frame. This needs to be done synchronously before sending the next frame out.
If a connection receives a short frame then we can reasonably assume the peer will not fail any verification and the connection is fully established.
Two changes need to be done

Add the verifyCallback to the connection creation. This must be called after receiving the initial frame from the peer. Any failure of this callback should immediately close the connection with a descriptive error.
Add a secured promise that resolves when a short frame is first received. or reject with any error such as the TLS fail.

Ok, The custom TLS verification callback has been implemented. It is a simple callback that is called with the remote cert chain in PEM format (certs: Array<string>) => void. If the TLS fails then we throw an error. This is caught and translated into closing the connection.
Now that I think about it, It could just return {code: number, message: string} | undefined. No need to do anything with catching errors here. In any case I need to review how this will work with mapping errors to codes and vice versa.
We have a working secured event that triggers when the peer has verified without error. It is triggered by the first short header received that doesn't trigger the draining state.  Creating the client awaits the secure event before resolving, resulting in an error if it failed.
I need to update this so it only triggers a short frame has be received AND sent. Otherwise the server side connection can trigger the secured event even when client verification fails. In this case the client accepts the server's certs and sends the short frame. Ideally the connection is secure when both sides give the thumbs up. It's a simple change.
I added some tests for demonstrating custom TLS success and failure. I also fixed two skipped tests that depended on the secured event.
Some things that still need to be done.

Secure event should only trigger after both sides have secured without error.
use a proper error code for failing TLS verification. Either pretend to be a normal TLS failure or use custom codes and error mapping. I think we just use the normal TLS fail code here? either 304 or 372?
General review.

One last thing. I've been working off of the staging branch here but the changes need to be applied to the PR. There are two ways I can go about this.

Apply the change to the staging branch so we have a working commit with the new feature. This could be pre-published and used. I'll have to re-base the PR on the new feature.
Transplant the changes into the PR directly.

I'm leaning towards option 1 here. It keeps better history but is a little more annoying to PR. Not too bad though.

When this is done I can go two ways.

Proceed with custom TLS on Polykey.
Take over the js-quic refactoring PR with the monitor and life cycle changes.

There may be a problem with OKP certs.  If you fail the custom TLS verification callback on the client side, the server side doesn't respect the close frame with the error and will time out instead. I'm not sure why this happens, but it may be another issue with quiche.
I'll dig into it more after transplanting the changes into the main PR.

Can you check that the normal quiche based TLS failure works and examine the received failure code on the close frame and ensure that you are doing the exact code and whatever other information when you force a close frame from JS-based TLS failure. Based on my native tests the OKP works fine when quiche fails TLS normally.

Can you check that the normal quiche based TLS failure works and examine the received failure code on the close frame and ensure that you are doing the exact code and whatever other information when you force a close frame from JS-based TLS failure. Based on my native tests the OKP works fine when quiche fails TLS normally.

The only difference would be what the close frame/packet looks like to the other side. And I'm sure that if this is made exactly equal, we the same behaviour is expected since programs are deterministic.

Unless we manually craft the packet with the error we can't get the same result. A normal TLS failure results in a handshake frame containing the failure. Us closing the connection with the same error code results in a CC frame to close the connection.

That's strange, I thought during TLS failure we still get a CC frame? Did you check this on Wireshark?
If truly there's no CC frame, then you want to force close if that what is happening. Check the native tests that I've done, there is certain conditions where it does wait to timeout.
Alternatively we can craft the packet if we have all the information to send into the UDP socket.

It's also because when the other side checks the actual error object, it gets the TLS code and other information. Where does information come from if not from a close frame?

I need to test some expectation using the native connection tests. Based on the discussion, it seems that the handshake needs to complete before we can close the connection.
What I was doing was closing the connection immediately after receiving the peer certs and verifying them. What I should do is wait for the handshake to complete before verifying and closing the connection.
This means receiving and sending the initial frames.
I'll need to expand the native tests to check this expectation for each type of cert.

Curious, I wasn't aware of this but it seems that connection.timeout() is actually aware of time passing. Calling it multiple times will return an updated time. Calling connection.onTimeout() will not cause a state transition unless the time has actually passed.
  console.log

    ----client before timeout----
    established: true,
    draining: true,
    closed: false,
    resumed: false,
    earlyData: false,
    peerCerts: Avaliable,
    timeout: 404,

      at Object.log (tests/native/quiche.tls.test.ts:2732:15)

  console.log

    ----client after sleeping 50ms----
    established: true,
    draining: true,
    closed: false,
    resumed: false,
    earlyData: false,
    peerCerts: Avaliable,
    timeout: 353,

      at Object.log (tests/native/quiche.tls.test.ts:2735:15)

  console.log

    ----client after sleeping timeout----
    established: true,
    draining: true,
    closed: true,
    resumed: false,
    earlyData: false,
    peerCerts: Avaliable,
    timeout: null,

      at Object.log (tests/native/quiche.tls.test.ts:2738:15)

I've updated the native TLS tests in feature-key-gen branch. The earliest point we can close the connection from the application using connection.close is when the following conditions have been met.

Connection is established.
Connection has sent after establishing.

As an example, for a RSA connection the events for client <-> server will be

initial <-
initial ->
handshake <-
client established
handshake ->
server established
client or server can close connection

For a Ed25519

initial <-
client established
initial ->
server established
client or server can close connection

I think that is why it has to be called multiple times. And also even when 0, you still must call it.
21 June 2023 13:00:24 Brian Botha @.***>:

Curious, I wasn't aware of this but it seems that connection.timeout() is actually aware of time passing. Calling it multiple times will return an updated time. Calling connection.onTimeout() will not cause a state transition unless the time has actually passed.

console.log
----client before timeout----
established: true,
draining: true,
closed: false,
resumed: false,
earlyData: false,
peerCerts: Avaliable,
timeout: 404,
at Object.log (tests/native/quiche.tls.test.ts:2732:15)

console.log
----client after sleeping 50ms----
established: true,
draining: true,
closed: false,
resumed: false,
earlyData: false,
peerCerts: Avaliable,
timeout: 353,

  at Object.log (tests/native/quiche.tls.test.ts:2735:15)

console.log
----client after sleeping timeout----
established: true,
draining: true,
closed: true,
resumed: false,
earlyData: false,
peerCerts: Avaliable,
timeout: null,

  at Object.log (tests/native/quiche.tls.test.ts:2738:15)

—
Reply to this email directly, view it on GitHub[https://github.com/MatrixAI/js-quic/issues/30#issuecomment-1600000726], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AAE4OHMRZOECMB2SYIL7SYLXMJPUPANCNFSM6AAAAAAZACLQJU].
You are receiving this because you were mentioned.[Tracking image][https://github.com/notifications/beacon/AAE4OHOCMBB2JVAWWXHLJ5TXMJPUPA5CNFSM6AAAAAAZACLQJWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTS7LYJNM.gif]

In particular you have to call it wait 0, and call onTimeout possibly multiple times.
21 June 2023 15:29:22 Roger Qiu @.***>:

I think that is why it has to be called multiple times. And also even when 0, you still must call it.
21 June 2023 13:00:24 Brian Botha @.***>:

Curious, I wasn't aware of this but it seems that connection.timeout() is actually aware of time passing. Calling it multiple times will return an updated time. Calling connection.onTimeout() will not cause a state transition unless the time has actually passed.

console.log
----client before timeout----
established: true,
draining: true,
closed: false,
resumed: false,
earlyData: false,
peerCerts: Avaliable,
timeout: 404,
at Object.log (tests/native/quiche.tls.test.ts:2732:15)

console.log
----client after sleeping 50ms----
established: true,
draining: true,
closed: false,
resumed: false,
earlyData: false,
peerCerts: Avaliable,
timeout: 353,

  at Object.log (tests/native/quiche.tls.test.ts:2735:15)

console.log
----client after sleeping timeout----
established: true,
draining: true,
closed: true,
resumed: false,
earlyData: false,
peerCerts: Avaliable,
timeout: null,

  at Object.log (tests/native/quiche.tls.test.ts:2738:15)

—
Reply to this email directly, view it on GitHub[https://github.com/MatrixAI/js-quic/issues/30#issuecomment-1600000726], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AAE4OHMRZOECMB2SYIL7SYLXMJPUPANCNFSM6AAAAAAZACLQJU].
You are receiving this because you were mentioned.[Tracking image][https://github.com/notifications/beacon/AAE4OHOCMBB2JVAWWXHLJ5TXMJPUPA5CNFSM6AAAAAAZACLQJWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTS7LYJNM.gif]

Just looked at the spec, I really need to update it with details of the new changes.

Closed by !26.


[#6156] Refactor collector configuration

Codecov Report

Merging #6200 into master will decrease coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #6200      +/-   ##
==========================================
- Coverage   39.67%   39.66%   -0.01%
==========================================
  Files        3032     3032
  Lines       91214    91214
  Branches    11859    11859
==========================================
- Hits        36189    36181       -8
- Misses      52021    52026       +5
- Partials     3004     3007       +3

Impacted Files
Coverage Δ

...p/pinpoint/rpc/client/WriteFailFutureListener.java
56.25% <0%> (-18.75%)
:arrow_down:

...vercorp/pinpoint/rpc/packet/ClientClosePacket.java
55.55% <0%> (-11.12%)
:arrow_down:

...tor/metric/datasource/DefaultDataSourceMetric.java
75% <0%> (-3.13%)
:arrow_down:

...orp/pinpoint/rpc/server/DefaultPinpointServer.java
79.22% <0%> (-1.06%)
:arrow_down:

...point/rpc/client/DefaultPinpointClientHandler.java
72.07% <0%> (-0.98%)
:arrow_down:

...navercorp/pinpoint/rpc/common/SocketStateCode.java
85.36% <0%> (+2.43%)
:arrow_up:

...rc/main/java/com/navercorp/pinpoint/test/Item.java
73.33% <0%> (+3.33%)
:arrow_up:

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 d9a8390...c5e7fb1. Read the comment docs.


Fix: Run workflow on pull requests as well

This PR

[x] runs the previously introduced workflow on pull request events as well

Follows #2363.

@feelepxyz @jurre
We cannot use secrets in workflows triggered by pushes from forks:
https://github.com/dependabot/dependabot-core/blob/0610325ea0d7044dfca68c89febec635078467b4/.github/workflows/ci.yml#L11-L13

We cannot use secrets in workflows triggered by pushes from forks:

Oh yeah I think we'll need to switch to repo scoped github packages instead which should also work on the fork.

We cannot use secrets in workflows triggered by pushes from forks:

Will look into that and make sure that works 👍
Regarding the proposed change, why do we need to also build on pull_request? Every push is already built, it would be the exact same build as for the latest push of a PR right?

Regarding the proposed change, why do we need to also build on pull_request? Every push is already built, it would be the exact same build as for the latest push of a PR right?

Looks like push isn't triggered for forks: https://github.com/dependabot/dependabot-core/pull/2372

@jurre

Will look into that and make sure that works 👍

👍

Regarding the proposed change, why do we need to also build on pull_request? Every push is already built, it would be the exact same build as for the latest push of a PR right?

Perhaps it would make sense to build pushes to main only?
-  - pull_request
+  pull_request: null
-  - push
+  push:
+    - main

Perhaps it would make sense to build pushes to main only?

A workflow that I've been using more recently is pushing a branch to get CI to run, but hold off with opening a pull request until it's in a shape that I'm happy with and CI is passing, so I'd like to keep building on push for all branches, I think building on both push and pull_request is probably fine, just a little bit wasteful.

Thank you, @feelepxyz and @jurre!


Serialization seems to contain wrong data

Hi,
I've been trying using this library (version 4.0.0-beta.2) together with AsyncHTTPClient to execute a multipart POST request, where I need to upload a file.
The expected request should look like the following
> POST /rest/api/content/595596971/child/attachment/609652887/data HTTP/1.1
> Host: myHost.com
> Authorization: Basic myBasic
> User-Agent: insomnia/7.1.1
> X-Atlassian-Token: nocheck
> Content-Type: multipart/form-data; boundary=X-INSOMNIA-BOUNDARY
> Accept: */*
> Content-Length: 656151

| --X-INSOMNIA-BOUNDARY
| Content-Disposition: form-data; name="file"; filename="picture.jpg"
| Content-Type: image/jpeg
It continues. I cut it because irrelevant.

This request works well through Insomnia and I tried to convert it to Swift using MultipartKit as below
import MultipartKit
import Foundation

let boundary = "MY-BOUNDARY"
let fileUrl = URL(fileURLWithPath: "/Users/myUser/Desktop/picture.jpg")
let fileData = try! Data(contentsOf: fileUrl)
var multipart = MultipartPart(body: fileData)
multipart.headers.replaceOrAdd(
    name: "Content-Disposition",
    value: "form-data; name=\"file\"; filename=\"picture.jpg\""
)
multipart.headers.replaceOrAdd(
    name: "Content-Type",
    value: "image/jpeg"
)

let body = try MultipartSerializer().serialize(
    parts: [multipart],
    boundary: boundary
)

print(Data(body.utf8).count) // 1130517

Unfortunately the data count (1130517) is quite bigger than expected (see Content-Length from Insomnia output).
I've tried my own implementation of this simple case using Foundation and I actually am able to create the correct payload
let multipartData = try MultipartHelper().multipart(
    from: fileUrl.path,
    partName: "file",
    boundary: boundary
)

print(multipartData.count) // 656135

And MultipartHelper.swift
import Foundation

struct MultipartHelper {
    enum Error: Swift.Error {
        case fileDoesNotExist
        case unsupportedFileType(String)
    }

    func multipart(from filePath: String, partName: String, boundary: String) throws -> Data {
        guard FileManager.default.fileExists(atPath: filePath) else {
            throw Error.fileDoesNotExist
        }

        let fileUrl = URL(fileURLWithPath: filePath)
        let fileName = fileUrl.lastPathComponent
        let fileExtension = fileUrl.pathExtension
        guard !fileName.isEmpty, !fileExtension.isEmpty else {
            throw Error.fileDoesNotExist
        }

        guard let contentType = ContentType(fileExt: fileExtension) else {
            throw Error.unsupportedFileType(fileName)
        }

        let fileData: Data
        do {
            fileData = try Data(contentsOf: fileUrl)
        } catch {
            throw Error.fileDoesNotExist
        }

        let headersPart = Data("""
        --\(boundary)\r\n\
        Content-Disposition: form-data; name="\(partName)"; filename="\(fileName)"\r\n\
        Content-Type: \(contentType.header)\r\n\
        \r\n
        """.utf8)
        let footerPart = Data("""
        \r\n--\(boundary)--\r\n
        """.utf8)

        var data = Data()
        data.append(headersPart)
        data.append(fileData)
        data.append(footerPart)

        return data
    }
}

enum ContentType {
    case png, jpeg, gif

    init?(fileExt: String) {
        switch fileExt.lowercased() {
        case "png":
            self = .png

        case "jpeg", "jpg":
            self = .jpeg

        case "gif":
            self = .gif

        default:
            return nil
        }
    }

    var header: String {
        switch self {
        case .gif:
            return "image/gif"

        case .jpeg:
            return "image/jpeg"

        case .png:
            return "image/png"
        }
    }
}

Am I somehow using the library incorrectly?

Hi @dalu93, unfortunately this library's 4.0.0 version is no longer being maintained. It has been merged into vapor/vapor for the time being: https://github.com/vapor/vapor/tree/master/Sources/Vapor/Multipart.
Eventually my goal is to split the package back out again and formally pitch this to the swift server work group's package index. Until then, you can access the MultipartParser and MultipartSerializer as part of the Vapor module.
That said, I'm not sure why the length is about 2x longer via MultipartKit here. Seeing the full output (attached as a .txt or something) could help. If this bug exists in the vapor/vapor version of this code I'm happy to fix it.

Hi @tanner0101,
Vapor is not an option for us since we are planning to create a very small CLI tool and importing the whole Vapor product is going to be heavy and useless.
I created, however, an example repository where you can see the error: https://github.com/dalu93/multipartkit-issue
When running through Xcode, set the environment variable FILE_PATH to your own file path (the file is included in the project as well)

Hi @tanner0101 have you had chance to have a look at it? Unfortunately I cannot run Vapor locally because I'm on MacOS Mojave (10.14) and Vapor only supports 10.15+.
I was anyway able to verify few things:
There is a difference in terms of bytes between the two methods, using MultipartKit the data is almost 2x the data I get from using my small helper.
So I tried to replicate as much as possible what MultipartKit is doing

I created my multipartData using my small helper

let multipartData = try MultipartHelper().multipart(
    from: fileUrl.path,
    partName: "file",
    boundary: boundary
)

I created a new ByteBuffer and I wrote the data there

var buffer = ByteBufferAllocator().buffer(capacity: 0)
buffer.writeBytes(multipartData)

I converted the buffer to a String

let bufferString = String(decoding: buffer.readableBytesView, as: UTF8.self)

I expected to have multipartData.count equal to Data(bufferString.utf8).count

print(Data(bufferString.utf8).count == multipartData.count) // got `false`

When I compare the string result of this operation (bufferString) to the string I get directly using MultipartSerializer, they are identical
let body = try MultipartSerializer().serialize(
    parts: [multipart],
    boundary: boundary
)

print(body == bufferString) // got `true`

There are two serialization methods:
https://github.com/vapor/multipart-kit/blob/73706f1883f2ba950d41f18aec7e3a53766d4a6d/Sources/MultipartKit/MultipartSerializer.swift#L10-L14
https://github.com/vapor/multipart-kit/blob/73706f1883f2ba950d41f18aec7e3a53766d4a6d/Sources/MultipartKit/MultipartSerializer.swift#L26-L45
The former method you are using uses String internally so it can corrupt input data.
You have to use the latter.


Add forwarding of refs for Header component

Partially addresses #3819

@andyrichardson hey!
This thing was missed, but it will be great to bump it. Are you still interested in it?

@layershifter for sure! I just need to get it passing in CI?

@andyrichardson great, yes. Let me know if I can help somehow there.
P.S. please restore your fork as currently it's impossible to push changes 😺

You will probably will have many CI issues (at least with componentInfo), let's merge master and start fixing them 🧑🏭

Closing for housekeeping 🏠 If you would like to follow up on it, feel free to create a new PR 🐱


Update vendor to fix violations

This commit fixes go vet vendor violations, such as in explicitly
required in go.mod, but not marked as explicit in vendor/modules.
Signed-off-by: Daniel Mellado<EMAIL_ADDRESS>

This looks bogus, we don't have vendored dependencies.

/retest

/approve
/lgtm

/retest


SlidePanel flashes in IE

Bug Report
Description
SlidePanel "flashes" or seems to quickly animate when in IE.
Steps to Reproduce

Go to the "Slide Panel" Component page in terra-ui in an IE browser.
Click on the "Main Toggle Panel".
See that the panel re-animates/jumps.  You can even see the "Panel Content" display over the "Main Content" for a split second.

Additional Context / Screenshots

Expected Behavior
Do not blink.  Be more like Chrome where it appears to stay open.
Possible Solution

Environment

Component Name and Version: terra-slide-panel ^3.1.0
Browser Name and Version:   IE
Node/npm Version: [e.g. Node 8/npm 5]
Webpack Version:
Operating System and version (desktop or mobile): desktop

@ Mentions

@hboege We are having difficulty reproducing this issue. Can you reach out to @tbiethman or @ryanthemanuel to provide some more info on this.

@hboege Do we have an update on this one?

closing. as we are not able to reproduce this issue


Add support for GraphQL subscriptions season

Duck season

Flaky Test
Failure Summary
Logs

[chromium] should return list of users correctly.
The API request to get a list of users failed with a 404 Not Found error.
Logs ↗

[chromium] should display error message for invalid login correctly.
The expected HTTP status code 401 was not received, instead a function was returned.
Logs ↗

[chromium] should login with credentials correctly correctly.
The login request to the server failed with a 404 Not Found error.
Logs ↗

View Full Report ↗ ⋅ Docs


Allow Guzzle v5.x

Had to change ResponseValidator::status() since in Guzzle v5 the status code is kept as integer.

Should be available in 2.1.0

@JoakimLofgren Thanks!


are you still active   i have questions

theres a broken link in your description/instructions   the ros link i believe

Hey Homie- Just getting back to this project!  So sorry for the delay here- I am around still- sometimes discord is a better place to reach me at.  halite84
Which link is broken?  Where are you stuck currently?


Help in interpreting the test results

Yesterday, after training the model  ( https://github.com/lavis-nlp/jerex/issues/3#issuecomment-852361468 ) I tested it.
Now I ask you to give me an help in interpreting the results
I guess that the predictions made during the test by the model, which was previously trained, have been stored yesterday in predictions.json file.
Is this right?
(base) raphy@pc:~/jerex/data/runs/2021-06-01/21-32-32$ ls -lah
total 122M
drwxrwxr-x 5 raphy raphy 4,0K giu  2 08:59 .
drwxrwxr-x 3 raphy raphy 4,0K giu  1 21:32 ..
drwxrwxr-x 3 raphy raphy 4,0K giu  1 21:32 cv
-rw-rw-r-- 1 raphy raphy 120M giu  1 21:42 examples_test.html
-rw-rw-r-- 1 raphy raphy    0 giu  1 21:32 jerex_test.log
-rw-rw-r-- 1 raphy raphy 2,2M giu  1 21:42 predictions.json
drwxrwxr-x 2 raphy raphy 4,0K giu  1 21:32 run_config
drwxrwxr-x 3 raphy raphy 4,0K giu  1 21:32 tb
(base) raphy@pc:~/jerex/data/runs/2021-06-01/21-32-32$

I loaded predictions.json file in https://jsonformatter.org/json-viewer to better view and understand it.
Example:
relation number 0:
    head: 0   ----------->   entities: 0
                                          cluster: 0                -----------------> 0:13
                                                                                1: 17

                                                                                Does it mean from token 13 to token 17 ?
                                                                                tokens:
                                                                                13: -
                                                                                14: platform
                                                                                15: producer
                                                                                16: and
                                                                                17: director

                                          type: MISC

    tail: 15     -------------> entities: 15
                                           cluster: 15              -----------------> 0:12

                                                                                Does it mean token 12 ?
                                                                                tokens:
                                                                                12: cross
                                           type: TIME
    type: P577

Does it mean that it found a relation of type TIME between "platform producer and director" and "cross"?

Yes, 'predictions.json' contains the model's predictions (there is also a visualization of predictions in 'examples_test.html' - just open it with your web browser).
The indices you interpreted as token indices are actually indices of mentions in the "mentions" list. Each entry in the mention list contains the start token index (inclusive) and end token index (exclusive) of that mention. So cluster 0 (=entity) contains mentions 13 and 17 (which is both "Chasing Madoff") and cluster (=entity) 15 contains mention 12 (which is "2010"). Entity 0 is classified as MISC (its an movie) and entity 15 is classified as TIME. You need to have a look at the "relations" list for detected relations between entities.
I also just pushed an update to the json structure, since it is admittedly a bit hard to read. I collapsed clusters and entities into a single list (named 'entities) and added 'start'+'end' keys to mention entries. You can pull the new code and rerun the test procedure to obtain the updated 'predictions.json' file.

Ok.
Now I understand. Thank you!
relation number 0:
    head: 0   ----------->   entities: 0
                                          type: MISC
                                          cluster: 0                -----------------> mentions:
                                                                                0:13         --------> tokens:
                                                                                0: 76    --->  Chasing
                                                                                1: 78    --->  Madoff

                                                                                1: 17        --------> tokens:
                                                                                0: 94  --->    Chasing
                                                                                1: 96  --->    Madoff

    tail: 15     -------------> entities: 15
                                           type: TIME
                                           cluster: 15              -----------------> mentions:
                                                                                0:12        ---------> tokens:
                                                                                0: 80    ---> 2010
                                                                                1: 81    ---> feature

    type of relation: P577 : https://www.wikidata.org/wiki/Property:P577


meta.mainProgram should be set to binary name for binary crates

Without this, if we do nix run .#some-workspace-member, it tries to run $out/bin/rust_some-workspace-member as it defaults to the package name.
It'd be cool if nix run .#flake just worked.

I worked around this by setting meta.mainProgram to crateName unconditionally.

Looks like it was fixed directly in nixpkgs a while ago now so maybe don't need to do anything in crate2nix explicitly.
https://github.com/NixOS/nixpkgs/pull/171668


Added events when fade-in/fade-out are complete

According to FadeInOutSampleProvider docs:

The FadeInOutSampleProvider is a very basic fade provider, and you may want additional features like:

automatically fading out when you reach the end of the source
automatically stopping at the end of a fade out
cross-fading into another input.

These two events might be helpful for implementing such features.
It's also a contribution from our project, for the NAudio community ;)

@markheath Hi, could you please take a look at this PR?

Merged into Sonic Boom 1.1.0, which is a fork of NAudio. Thank you for your contribution!


please add option java_package

I am working on envoy data plane on top of scala and I found issue when because of packages' naming conflict.
[error] /data-plane/target/scala-2.11/src_managed/main/protobuf-generated/validate/validate/AnyRules.scala:136: missing argument list for method validate in trait GeneratedMessageCompanion
[error] Unapplied methods are only converted to functions when a function type is expected.
[error] You can make this conversion explicit by writing `validate _` or `validate(_)` instead of `validate`.
[error]   lazy val defaultInstance = validate.validate.AnyRules(
[error]                              ^

so I suggest to have option java_package = "lyft.proto.validate"; in this project.

Perhaps we can do this as part of #54


release1.1.0——jobservice——nonharbor——registry——delete，code params has a bug

ldelete.go
ine130
dstClient, err := newRepositoryClient(d.dstURL, d.insecure, dstCred,
d.repository, "repository", d.repository, "pull", "push", "*")
func newRepositoryClient(endpoint string, insecure bool, credential auth.Credential,
tokenServiceEndpoint, repository, scopeType, scopeName string,
scopeActions ...string) (*registry.Repository, error)
missing tokenServiceEndpoint

Thanks for this, but the codes are commented and if they are used an error will be found.