Add two methods for consuming repositories in scenarios where repositories could be longer lived (e.g. Blazor component Injections)

Provides two solutions for #280

BREAKING CHANGE - requires support for netstandard2.0 to be dropped from Ardalis.Specification.EntityFrameworkCore.csproj in order to make use of IDbContextFactory
Add IRepositoryFactory interface and EFRepositoryFactory concrete implementation to encapsulate the 'Unit of Work' principle at the repository level, consuming DbContextFactories from DI containers such as those added using the .AddDbContextFactory method, following blazor best practices for managing DbContext lifetimes
Add ContextFactoryRepositoryBaseOfT.cs abstract implementation of IRepositoryBase which again consumes DbContextFactories from DI containers such as those added using the .AddDbContextFactory method but creates a new instance of the DbContext for every method call in the repository. This breaks Entity Framework change tracking so Update and Delete methods will have to be overloaded in concrete implementations using the TrackGraph method on the context.

Let me know when you want me to review again @jasonsummers . Are you thinking it's good to go now?

Hi @ardalis, I think this is good to go. Unit tests are have been added to cover all of the permutations I could think of which would cause the entity is already tracked by another dbcontext error.

Hi,
We've been holding back this PR for a while. It has to do with the breaking change, we have to drop the support for netstandard2.0. If we do that, then EF Core 3 users won't be able to consume the library anymore. We have been using multi-targeting to offer support for the following consumers:

EF Core 3 - they will consume the netstandard2.0 TFM
EF Core 5 - they will consume the netstandard2.1 TFM
EF Core 6 (and above) - they will consume the net6.0 TFM

@ardalis what are your thoughts here? Should we drop everything prior EF Core 6?

Hi @fiseni. Wondering, can you provide a general time line is for releasing these changes? Thanks so much!

Would releasing this as a prerelease first be an option?


float16 switch

added simple float16 switch to config.  helpful for lowering vram.

Good idea with the float16 flag. However, from my experience, it's possible to add this support simply by loading the model like this:
stable = AttendAndExcitePipeline.from_pretrained("CompVis/stable-diffusion-v1-4", torch_dtype=torch.float16).to(device)

Would it be possible to simply defined it like so?
dtype = torch.float16 if config.half_precision else None  # None defaults to float32
stable = AttendAndExcitePipeline.from_pretrained("CompVis/stable-diffusion-v1-4", torch_dtype=dtype).to(device)

If this works, I believe this would be simpler then the proposed change.

Thanks for looking at this!  using torch_dtype=float16 does work.  Note however that since this line:
https://github.com/AttendAndExcite/Attend-and-Excite/blob/a3b3441184450502a97d7c7c984d67ce85ab072c/run.py#L74
sets the default to float16, setting the torch_dtype in from_pretrained is unnecessary.
That being said, though both setting revision and setting dtype to float16 (either explicitly for model or as default) will result in float16 type used and therefore lower vram, I am not sure that the behavior is the same.  revision="fp16" will pull the weights from here (https://huggingface.co/CompVis/stable-diffusion-v1-4/tree/fp16/unet) whereas omitting revision will pull from here (https://huggingface.co/CompVis/stable-diffusion-v1-4/tree/main/unet).  note size in weights for unet for example.  Not sure which is better, (if user already has float32 weights then at least they do not have to download new weights, but if they do not then preferable that they download just float16).  I am okay with either change since in practice it seems both allow me to run with much lower vram :)


Avoid data races in Discovery

Similar PR submitted to master: #8315

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: nmittler
If they are not already assigned, you can assign the PR to them by writing /assign @nmittler in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

pilot/OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

related PR here: https://github.com/istio/istio/pull/8327

@ymesika @rshriram is this needed in master? I tried cherrypicking but there is a conflict. Could you do that if this is indeed needed for 1.1.


Minor release of v9 with seabolt support?

I've been experimenting with the seabolt driver on my v9.6 application, it's a bit tricky to set-up, but once done it's fast and reliable -- everything works except one thing: attempting to load the schema results in a Neo4j::Driver::Exceptions::ClientException "Cannot perform data updates in a transaction that has performed schema updates.".  Looking at the 9.6.1 source locally, modifying lib/neo4j/tasks/migration.rake from
Neo4j::ActiveBase.run_transaction do
  Neo4j::Migrations::Schema.synchronize_schema_data(...)
  runner = Neo4j::Migrations::Runner.new
  runner.mark_versions_as_complete(schema_data[:versions]) # Run in test mode?
end

to
Neo4j::ActiveBase.run_transaction do
  Neo4j::Migrations::Schema.synchronize_schema_data(...)
end
Neo4j::ActiveBase.run_transaction do
   runner = Neo4j::Migrations::Runner.new
   runner.mark_versions_as_complete(schema_data[:versions]) # Run in test mode?
end

Fixes the issue.  I see you have already done the same in master.
So could I request that there is a minor release of the v9 branch (9.6.2?) which back-ports this two-line fix enabling use of Seabolt?  I'll be jumping on v10 as soon as it's out of beta, but I'm sure there are those who will be using v9 for some time yet.

Yes, this is probably possible with the right version of neo4j-ruby-driver. @jjg-dressipi could make a PR to the 9.6.x branch with all the changes needed to make it work of if only the changes above could you describe the tricks you had to apply?

Many thanks, I'll make that PR shortly.
May be best to describe the changes here.  This is for a Rails 5 API-only application.
First, you need to have some configuration options set in config/application.rb, and when those are found your config/neo4j.yml is ignored.  This means that neo4j.rb will use the default (http) URL and you get errors like "ArgumentError: Invalid URL http://localhost:7474" even though you have specified the bolt protocol and URL in config/neo4j.yml.   So move all options defined in config/neo4j.yml into config/application.rb and the per-environment files config/environments/*.rb as follows
Modify config/application.rb to have the extra lines
require 'neo4j/core/cypher_session/adaptors/driver'
require 'neo4j_ruby_driver'
  :
 module Neo4jUserUser
    :
    config.neo4j.session.type = :bolt
    config.neo4j.session.options = {
      ssl: false,
      adaptor_class: Neo4j::Core::CypherSession::Adaptors::Driver
    }

Modify config/environments/test.rb adding the line
config.neo4j.session.url = 'bolt://localhost:7572'

Modify config/environments/development.rb adding the line
config.neo4j.session.url = 'bolt://localhost:7572'

and so on.

@jjg-dressipi neo4j-9.6.2 released!
in your application.rb only adaptor_class is necessary, the other 2 are ignored.
One important thing to find out is which version of neo4j-ruby-driver is compatible with 9.6.2. I can say for sure that the newest 0.4.0 is not. I didn't pay attention to that as so far the driver was supporting only beta versions of activegraph.

Great -- thanks!

Just a note to confirm that this fixes the issue with my application: my Gemfile now reads
gem 'neo4j', '~> 9.6.2'
gem 'neo4j-ruby-driver', '< 0.4.0'
  :

which should coerce and maintain the version restrictions mentioned above by @klobuczek


Expand key and Visual Mode selection

This branch is based on #81 so that should be merged first.

[x] expand_key

[x] ISwap, ISwapWith
[x] ISwapNodeWith
~ISwapNode~ already can select arbitrary nesting

[ ] visual mode select (all the at_cursor functions need to handle visual mode and ranges)

Address #79

What if cursor was just a special case of range with length 1, for purposes of calculating things?

Yeah that would be the first solution. I'm just wondering if that's really the best way in terms of utility. This branch is in a working state so you can try it out. I've implemented both behaviors controlled by a config variable

Have you gotten to try this out?

not yet... been busy, i will definitely try it by EOD Wednesday

Flash-confirm highlighting is broken on a case like this:
{'a', 'bcdefg'}

The 'a' is supposed to be highlighted first but something happens. I can look into it.

Yeah I think its actually related to the refactor of swap_ranges_and_return_new_ranges that I did in my last PR

New idea implemented, now sure how visually clear it is, but basically it labels the parents of the node, hitting one of those labels relabels which nodes will be swapped (basically the same as hitting expand/shrink a few times). Now ISwapNodeWith is kind of similar but mostly better than ISwapNode (2 keypresses for any 2 nodes, 1 keypress if you started it at the correct nesting level). I even think if ISwapNodeWith was made to use the list query to find the initial list, it would be strictly better than ISwapWith (1 key for the most common case, able to swap almost any 2 nodes with 2 keys).


O365 F3 not included

Please add O365 F3 and his informations

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

ID: 7c245452-161d-89a1-c026-99a0721cf071
Version Independent ID: 16dec59a-eb83-1837-4efd-4645e7aeaed2
Content: Product names and service plan identifiers for licensing - Azure AD
Content Source: articles/active-directory/users-groups-roles/licensing-service-plan-reference.md
Service: active-directory
Sub-service: users-groups-roles
GitHub Login: @kkern
Microsoft Alias: kakern

@EDEKA-LUNAR Thank you for your feedback. We will investigate and update the thread.

@kkern13 could you please look into this request ?

@shashishailaj Item has been added, please give it 24 hours to update.

Thank you @kkern13 for your assistance.
@EDEKA-LUNAR We have added the information . It must be available globally in teh next release convergence of the content on the portal within next 24 hours. We will now close this issue. In case of any further query , please tag any of us to your reply and we will be happy to help . Alternatively you can always open a new issue if it is related to something else.


Issue using certain flags...

When using virtual-time-budget + background color flag & set to transparent. Program get's stuck in a loop..
There are lot's of other instances and bugs that get it stuck in a loop.
As well if you set background style sheet to transparent - same thing.

Hello, I've never stumbled on such a problem, could you provide some information about your system (OS + Chrome/Chromium version should do) and a minimal piece of code that would allow to reproduce the issue?

Feel free to reopen the issue if you want to provide more insight.


update cmake for linux_desktop

fixes linux cmake

Looks like the stuff in here is contained in #11 so I will close this and merge that


Fast-path for Syntax.Subst compress

This PR splits compress in Syntax.Subst into a fast-path and slow-path. The fast-path checks if the term is a Tm_uvar or Tm_delayed if it is not, then we know there is no further work and return immediately. The cost to this is that it makes the code a bit more brittle in that you need to update the fast-path if functions called by compress change to use more terms than Tm_uvar or Tm_delayed.
Several files in ulib are showing compress being a significantly hot function. I get the following benchmark results from the change.
                  Old                               New
                  n       total   user    system    n       total   user    system
micro-benchmarks  61      59.99   55.96   3.809     61      57.71   53.56   3.858.
ocaml_extract     38      120.8   116.4   4.422     38      119.9   115.5   4.318.
ulib              208     399.9   379.3   19.94     208     357.7   337.2   19.82.

Thanls @ctk21! The changes look fine to me. Similar warning comments on try_read_memo, force_uvar, and their auxiliary functions would be nice.
@nikswamy and @mtzguido should have a look too, as substitution code is a core functionality.

I looked at this change and it seems fine by me. I suspect that the performance improvements would be even more noticeable on files like Vale.AESGCM which are notoriously substitution-heavy.
Nik and Guido are both at a summer school this week. Hopefully we can ping one of them to give a quick look at this, if you think @aseemr that it needs another pair of eyes.

Thanks @ctk21! The changes look fine to me. Similar warning comments on try_read_memo, force_uvar, and their auxiliary functions would be nice.

Thanks for the suggestion. I've added additional warnings around try_read_memo and force_uvar.

Also looks good to me! Doesn't seem to be a functional change and the improvements seem pretty good. Thanks!

That's an impressive speedup for a small, well-scoped change! Nice work!
Any explanations for why we think this causes such gains? The non-recursive fast path is eligible for inlining?

Thanks, glad it's useful!
The gain doesn't look like it is from inlining; I don't see any entry point into compress_slow in the binary produced with 4.07.1 except from compress. I did try using flambda (an alternative more advanced OCaml inliner) on F* a couple of weeks ago and got a 1-2% improvement; it's possible this change may give flambda more opportunities.
The binary for compress with the fastpath becomes simple:
  c23e80:      mov    (%rax),%rbx
  c23e83:      test   $0x1,%bl
  c23e86:      jne    c23e9c <camlFStar_Syntax_Subst__compress_2969+0x1c>
  c23e88:      movzbq -0x8(%rbx),%rbx
  c23e8d:      add    $0xfffffffffffffff3,%rbx
  c23e91:      cmp    $0x1,%rbx
  c23e95:      ja     c23e9c <camlFStar_Syntax_Subst__compress_2969+0x1c>
  c23e97:      jmpq   c23df0 <camlFStar_Syntax_Subst__compress_slow_2959>
  c23e9c:      retq

However the compress_slow path (which is the old code) contains several function calls and checks.
The change is leading to gains because the function is very hot (called from a great deal of places) and when called there are a lot of instances where it is quick to determine that we don't need to do any work.


BleError: Cannot start scanning operation

I'm getting the following error when I'm trying to call this.manager.startDeviceScan method.  I did the following but non of them solved the issue.
BleError: Cannot start scanning operation
AndroidManifest  file has the following
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission-sdk-23 android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>

Both phones had bluetooth enabled and location enabled.

Restarted my phone(Huawei GR5 2017: Android Nougat) and tried to call the method(No other apps were running).
Tried using a different device (Nokia 8: Android Pie )

How can i sort this out?
Thanks
PS: This is the same error which mentioned in Issue #390. Opened a new issue because the issue #390 is closed and I have tried all the methods mentioned in that issue.

https://github.com/Polidea/react-native-ble-plx/wiki/=-FAQ:-I-got-an-BleError.-Now-what%3F


add CI run on PRs targeting staging branches

Description
This PR adds the CI pipeline trigger to PRs targeting staging branches
Type of change

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

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

[x] Tasks are running in this PR now

Checklist:

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules

Thanks for add this back! :)


Missing parameters in Hall sensor models

When checking the examples some errors occured. In the examples the parameters hallSensor.intervalTest[...].constantUpperLimit and hallSensor.intervalTest[...].constantLowerLimit are not set. This seems to be a matter of default values of BLDC.Sensors.HallSensor.

Seems that you got an erroneous intermediate version, sorry.
All examples are running now!


Settings screens updates

Update inner settings screens to match new design.
Screens:
Change password https://zpl.io/ad1vBwL https://zpl.io/boDgkdW
Clear data https://zpl.io/bzqnAvX
Node address https://zpl.io/2pvneqQ

Design:
https://app.zeplin.io/project/5c73dc8aa74b4b4085a86a91/screen/5cb962ed3ce4e433afcbd236
https://app.zeplin.io/project/5c73dc8aa74b4b4085a86a91/screen/5d8221145c120588c7110f31

Actual:


[FEATURE REQUEST]: Investigate custom export template for Firebase Cloud Messaging

Is your feature request related to a problem? Please describe.
We currently cannot support the Firebase Cloud Messaging API simply because we do not have a custom export template that provides for notifications. The notification channel has to be opened up via the actual Android/iOS app, not the Godot runtime, so it requires the custom template.
Describe the solution you'd like
I'd like to see us publish two custom export templates that allow for push notifications to be sent to devices and handled through the game. This can probably be done either through a JavaScript call, or possibly with a runtime argument to the game, but this is something which needs to be researched.
If possible, I would really like to be able to provide a website or something on GitHub (perhaps a page) that can generate the custom template based on whatever version they are requesting.
Describe alternatives you've considered
I've considered implementing the same thing via GDScript and a plugin, but it seems it might be impossible due to requiring direct access to the app bundles themselves.
Additional context
https://docs.godotengine.org/en/stable/development/compiling/compiling_for_android.html#building-the-export-templates
https://godotengine.org/qa/17987/export-templates
https://godotengine.org/qa/7603/android-push-notifications

I've actually been thinking about this recently. I don't want to take that one directly, at least not without asking the person first, but secondly, I don't even know if it actually makes sense in our library, since ours is designed to support only the features which are inherently cross-platform, and FCM is inherently not cross-platform. So I'm still thinking about it. I'm leaving this open and really appreciate the suggestion and link, and may ask DrMoriarty what his thoughts are even. Thanks!

Watch this, will save a lot of time


Add Bandcamp support

I'd like to add support to display Bandcamp embed URLs.
However, Bandcamp does not provide an API to control the player, meaning it would only display the embed, but not press play(or not hear when the song is finished).
Is that something that would be considered for this brilliant library?

After a bit of research I came across iframely.com and embed.ly, they both seem to offer event listeners for media embeds according to the schema of Player.js. I bet we could work with that... only downside is that they are both paid services

I don0t believe that this would handle Bandcamp, though? 🤔 Did you see any indicator of that?

Actually no. I also don't want to try it as they both vaguely claim to support "unified" video control via Player.js

It's pointless to support a player that just renders an iframe with no event listeners or interaction. You might as well just render the iframe directly and save bloating your bundle with ReactPlayer.
The Bandcamp player would have to support player.js for it to be picked up by services like iframely and embedly. If it does then great – pull requests welcome!

Fair point, let's close this then!


[ROCM]Disable clang builds on CPU builds when using tf-build

CPU builds had moved to clang as well. There is no separate cpu_gcc.bazelrc, so just comment out the differences for now.

Also includes a commit to increase timeouts in the new gpu_gcc.bazelrc file.

retest Ubuntu-GPU-single please


Add: Chinese Hope Channel

Channel Name
Chinese Hope Channel
Alternative Names (optional)
希望電視台
Network (optional)
No response
Owners (optional)
No response
Country
HK
Subdivision (optional)
No response
City (optional)
Sha Tin District
Broadcast Area
c/HK;c/CN
Languages
zho;eng
Categories (optional)
religious
NSFW
FALSE
Launched (optional)
No response
Closed (optional)
No response
Replaced By (optional)
No response
Website (optional)
http://chinesehope.tv/live.php
Logo
https://www.tvchinese.net/uploads/tv/chinesehope.jpg
Notes
No response

Already in the database: https://iptv-org.github.io/channels/cn/HopeTVChinese


[FEATURE]: Update file structure

As the project grow and even right now, the index.js file is getting bigger and bigger.
It could be nice if we can split the code and move the route handler inside a routes folder and the business logic inside a controller folder.
We can also put the sources and twitterAccounts inside a json file.

I absolutely agree and honestly thought I'd made an issue regarding this before but apparently not 😅
Splitting into separate files would be quite a big task so perhaps we can split it into smaller stages? To me it makes the most sense to do in the following order:

Sources lists into a .json
All routes as they are into a routes.js
Then split business logic out into controllers.js

What do you think?

That's a great idea, we can also add a task list so that every time a task is completed, we marked it as resolved.

Can I start working on the first one??

Yes, by all means

List of tasks:

[ ]Sources lists into a .json
[ ]All routes as they are into a routes.js
[ ]Then split business logic out into controllers.js

Task 1: done ✔
We can now move to the next 🔥

Massive thanks to both @TAKANOME-DEV and @Yoshemith for the great work on this big task! 🚀🚀🚀


Seamless switching results in a broken state on Android

If you are getting access from Server A, and click "Start VPN" on Server B, uProxy will seamlessly switch from A to B ... but on Android the VPN just stops, and doesn't continue/restart.  Tested on Android N.
We should also check that this works when clicking "Start Browsing" on Server B.

This issue also affects Chrome. The UI in Chrome updates to reflect the switch, when in reality proxying stops.


More readme updates with new parameters and descriptions

Can you replace the tabs with spaces?

Tabs removed

Looks good, :shipit:


bug with JPS and ORTHOGONAL mode?

Hi,
Thank for awesome Jumper! I think we have a bug with JPS and ORTHOGONAL combo? If i change JPS to ASTAR, the path is found.
Thanks!
-- Usage Example
-- First, set a collision map
local map = {
{1,0,1,0,0},
{0,0,0,0,0},
{1,0,0,0,0},
{0,0,0,0,0},
}
-- Value for walkable tiles
local walkable = 0
-- Library setup
local Grid = require ("zgame.jumper.grid") -- The grid class
local Pathfinder = require ("zgame.jumper.pathfinder") -- The pathfinder lass
-- Creates a grid object
local grid = Grid(map)
-- Creates a pathfinder object using Jump Point Search
local myFinder = Pathfinder(grid, 'JPS', walkable)
myFinder:setMode ('ORTHOGONAL')
-- Define start and goal locations coordinates
local startx, starty = 1,1
local endx, endy = 2,2
-- Calculates the path, and its length
local path = myFinder:getPath(startx, starty, endx, endy)
if path then
print(('Path found! Length: %.2f'):format(path:getLength()))
for node, count in path:nodes() do
print(('Step: %d - x: %d - y: %d'):format(count, node:getX(), node:getY()))
end
end

Hi, @takaaptech,
Much thanks for the kind words.
I'd like to point out a few things...
Actually, from your example, I cannot really say what is the issue. Maybe you can use images to let me know what kind of path do you get and what is the result you were expecting.
But I somehow suspect you are mentioning a known issue, #20. Thing is, the JPS algorithm was not devised for orthogonal mode as-is. Since the algorithm itself takes advantages of heading diagonal first-moves over orthogonal moves, eliminating adjacent (diagonal) moves is a bit trickier than it looks and need some work. I already field this as an issue and I'll try my best to fix in in the next version of the library.
Second, from the syntax you are using, I can notice you are using the very last version of Jumper, which is untagged, in-development and not stable at all. I'll strongly recommend to use instead the latest stable, which is 1.8.1 as of this writing. Documentation is available here.
Regards,
Roland.

Hi @Yonaba!
I think issue #20 is as same as my bug. Using JPS i can not move the red item from (1,1) to (2,2), but ASTAR can. So should i use ASTAR for my game? I just need to check path for item moving around a board, like bellow:

Thank so much!

For such a board, performance is not much of an issue. Indeed, you can definitely go ahead with ASTAR, it will be fast enough!

OK i got it, thank you so much!


Check for existing configuration and display notification if user has not added configuration for same

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

We will move this in next release

we will do it in future


added updates to view contributions  and search_contributions pages

Uploading view_contributions corrections.mp4…

Description
I applied feedback gotten from the last pr on both the search contributions and view contributions page
Type of Change

[ x] ✨ New feature (non-breaking change which adds functionality)
[x ] 🛠 Bug fix (non-breaking change which fixes an issue)
[ ] ❌ Breaking change (fix or feature that would cause existing functionality to change)
[ ] 🧹 Code refactor
[ ] ✅ Build configuration change
[ ] 📝 Documentation
[ ] 🗑 Chore

Changes

Please which part of the project your changes affect ?

[ x] Frontend (Templates, CSS, JS)
[ ] Backend (Dancer2, api-docs, Dockerfile)

@manwar, kindly review, I added the changes you requested for, kindly review.

Thanks for your contributions. @kemsguy7

Good job, merging now, will review layout later.

Thank you mentor @manwar


[ZEPPELIN-909] Apply new mechanism to Elasticsearch interpreter

What is this PR for?
This PR applies the new interpreter registration mechanism to Elasticsearch interpreter.
What type of PR is it?
Improvement
Todos

[x] - Remove static property definition code lines in ElasticsearchInterpreter.java and create interpreter-setting.json under elasticsearch/src/main/resources
[ ] - fix CI build error

What is the Jira issue?
ZEPPELIN-909
How should this be tested?

apply this patch
rm -r interpreter/elasticsearch and rm conf/interpreter.json
build source
bin/zeppelin-daemon.sh start
Run a paragraph with elasticsearch commands

Screenshots (if appropriate)
Questions:

Does the licenses files need update? No
Is there breaking changes for older versions? No
Does this needs documentation? No

Current CI failure:
org.apache.zeppelin.elasticsearch.ElasticsearchInterpreterTest
org.apache.zeppelin.elasticsearch.ElasticsearchInterpreterTest  Time elapsed: 8.15 sec  <<< ERROR!
java.lang.NumberFormatException: null
	at java.lang.Integer.parseInt(Integer.java:454)
	at java.lang.Integer.parseInt(Integer.java:527)
	at org.apache.zeppelin.elasticsearch.ElasticsearchInterpreter.<init>(ElasticsearchInterpreter.java:118)
	at org.apache.zeppelin.elasticsearch.ElasticsearchInterpreterTest.populate(ElasticsearchInterpreterTest.java:99)

Results :

Tests in error:
  ElasticsearchInterpreterTest.populate:99 Â» NumberFormat null

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0

@bzz CI is green now :)

Thank you for pointing out Lens case!
May be we could extract this error handling logic to the method and re-use it everywhere, so the client code would look like:
this.resultSize = parseIntegerOrDefault(getProperty(ELASTICSEARCH_RESULT_SIZE), 10);

and the API
class Interpreter {
  protected Integer parseIntegerOrDefault(String str, Integer defaultValue) { }
}

This can be done in a separate PR though and include refactoring of all existing interpreters (this, Lense, Python, etc).
What do you think?

@bzz Sure that make sense and thanks for clarifying it. Let me do that in other PR then :)


In Getting Started page, add how to label specific columns with tags

This is covered in the video at around 1:50 but is not in the getting started guide.   This is a nice tool, but it took me quite a while to figure that bit out.

Thanks @adam-campbell-mfe for raising this!
Glad that you found this tool useful 🙌
Let me review and get back to you.
But you’ll be more than welcome to create PR for it, please let me know today if that’s the case. Thanks 🙏

Thanks @adam-campbell-mfe for raising this!
Glad that you found this tool useful 🙌
Let me review and get back to you.
But you’ll be more than welcome to create PR for it, please let me know today if that’s the case. Thanks 🙏

FYI: This should be included in PR #12

Thank you! Had a look and that makes a lot more sense.


Reworked dynamic available help message logic.

Original issue: #1320
First iteration: #1325
In the previous iteration of this PR, #1396, the branch wasn't tested enough by me, causing many errors. One is shown below.

This was caused by the bot trying to edit the webhook in #how-to-get-help, which I didn't think was going to happen. On the test server, fetching the previous message with message.last_message could get a deleted message.
This caused me to think that the message fetched wouldn't get one sent by a webhook.
In this hopefully final version of this feature, the logic has been reworked so that the bot only tries to get the last message in the channel, where the author is the bot.
If one is found, then it will be edited and set to be the dynamic message. If one is not found, a new message is sent, and set to be the dynamic message.

That's odd, I'll look into it.

The approach taken is perfectly fine, I'd just like to mention the option of persisting the message ID with Redis, since it seems that we could remove some complexity that way. In fact, as long as you know the message ID (in Redis) and channel ID (in config), editing a message is possible with a direct call:
self.bot.http.edit_message(channel_id, message_id, content=new_content)

This avoids having to acquire and store the channel and message objects, allowing you to work with just the IDs, and you never have to "guess" which message is the one you want to edit. The downside is that I believe it's undocumented.
The logic could (very roughly) be:
fresh_content = "Available channels: ..."
message_id: t.Optional[int] = self.message_cache.get("available_channels")  # Probably needs better names

if message_id is not None:  # We know the message ID ~ message should exist
    try:
        self.bot.http.edit_message(channel_id, message_id, content=fresh_content)
    except NotFound:  # Someone must have deleted the message, we'll have to make a new one
        pass
    else:
        return  # We're done!

# If we reach here, either we don't have a message ID (we never sent a message),
# or the cached message ID is expired (someone deleted the message)
m = channel.send(fresh_content)  # Can optionally also use a HTTP method to avoid needing a channel obj
self.message_cache.put("available_channels", m.id)  # Cache the latest message ID for future use

This way there is no "warm-up" logic on bot restart and you avoid having to acquire the objects. But I don't know whether it's ok to use undocumented methods for this project. Either way, just thought I'd mention that this is possible.

@kwzrd Thank you for this information!
I'll see where I can get with Redis caching, and hopefully get this implemented.

Coverage decreased (-0.1%) to 56.547% when pulling d7fbccf28a8b4f44266cb55978da25d16f8d18da on dynamic-available-message-patch into 2384a670dda3e63e9f6d16013de65eb8aa189d33 on master.

I'm coming back to this, just figuring out Redis things. Should be done relatively soon.


Set a default version value of "" to pass AutoPkg's init validation

Any recipe using PlistReader to set version needs to have a fakeout input variable set to pass the validation in AutoPkg. Set a default value of "" to allow it to pass, especially since that's never going to be the case (i.e. you still need a version).

version is no longer required; but it is heavily used in jss-recipes' workflow, so JSSImporter will use "<IP_ADDRESS>" if it's absent. It will also output a warning to the AutoPkg output to help users figure out what's going on.


Build backend issue with VS for Mac

Hi,
Trying to build the backend project in VS for mac 7.0 (build 3148) and the following error appears:
/Users/daniel/Documents/Xamarin/app-evolve/src/XamarinEvolve.Backend/XamarinEvolve.Backend.csproj(3,3): Error MSB4019: The imported project "/Library/Frameworks/Mono.framework/Versions/5.0.0/lib/mono/xbuild/Microsoft/VisualStudio/v15.0/WebApplications/Microsoft.WebApplication.targets" was not found. Confirm that the path in the  declaration is correct, and that the file exists on disk. (MSB4019) (XamarinEvolve.Backend)

The solution is here: http://stackoverflow.com/a/43985605
Thanks.

Not my bug, already filed in bugzilla


Node version 8 support

Hey there. I am currently trying out this package and I'm trying to release it on Netlify. However, Netlify's highest supported node version is 8.10.
Is node >= 9.0.0 really required? If no - could you lower the version to 8?

@TheDiehard22 No worries, you should be able to use it on Node 8 from v0.5.0 onwards. I can't guarantee that'll it work exactly as expected with the other dependencies (namely prismic-dom and prismic-javascript), but it's passing tests on Travis.
When v8 drops out of LTS maintenance at the end of the year I might have to come back to this one and reconsider, but for now it should work.

Thanks! I upgraded to 0.5.0 and deployed it on Netlify without any issues. Deprecating at the end of the year seems fine as they will probably support node 10 by then.


Example README.md modification.

Modified basic example more clear.
Changed main README.md to go to Example folder as well as adding information about a cloudpickle dependency issue.

Can one of the admins verify this patch?

Closed because it wasn't rebased. It contains unnecessary commits.


Add the ability to specify the name of an Edge when using the UsePaging attribute

Product
Hot Chocolate
Is your feature request related to a problem?
Yes.
My company are going through a large migration from GraphQL.Conventions to HotChocolate. One of our requirements is for the HotChocolate schema to match the current one generated by Conventions.
This is required to reduce the amount of changes our customers need to make. The downstream services which call our GraphQL service, use many different clients. Some of these import schemas in various formats and generate objects based on the imported files, others rely heavily on the __typeName property.
We are struggling to match objects which use paging. Particularly the edge name, which is blocking us from moving across to HotChocolate. The UsePaging attribute allows us to specify the connectionName, but we also need the ability to specify the edgeName. I’ve included some sections of our schema to demonstrate the mismatch we are facing.
This is our current schema, generated by GraphQL.Conventions
type LibraryContentSearchConnection {
  edges: [LibraryContentEdge]
  items: [LibraryContent]
  pageInfo: PageInfo!
  totalCount: Int
}
type LibraryContentEdge {
  cursor: Cursor!
  node: LibraryContent
}

This is our new schema, generated by HotChocolate using this attribute [UsePaging(ConnectionName = "LibraryContentSearch", IncludeTotalCount = true)]
type LibraryContentSearchConnection {
  pageInfo: PageInfo!
  edges: [LibraryContentSearchEdge!]
  nodes: [LibraryContent]
  totalCount: Int!
  items: [LibraryContent!]
}
type LibraryContentSearchEdge {
  cursor: String!
  node: LibraryContent
}

The solution you'd like
Currently in HotChocolate.Core, Edge names are generated like this
// HotChocolate/Core/src/Types.CursorPagination/NameHelper.cs

public static string CreateEdgeName(string connectionName)
        => connectionName + "Edge";

We would like to extend this (via a PR) to include an optional edgeName string and fall back to the current logic if one isn’t provided. Before opening a PR though, we want to check the following:
A) there isn’t a better way to accomplish this
B) the maintainers don’t object

The edge name is generated as in the connection spec defined. What is the value of diverting from the spec? I in general feel it would just lead to less well understandable schema.

The edge name is generated as in the connection spec defined. What is the value of diverting from the spec? I in general feel it would just lead to less well understandable schema.

I don’t disagree with you. In an ideal world we want our Edge name to follow along with our Connection name.
Unfortunately for us, we’re stuck trying to get to the ideal world. We want to migrate to HotChocolate, but to do that we need to match the current schemas which we have inherited.  Because we can’t rename the Edge, either with a type extension or the Paging override we are blocked.
Due to the way our Connection types are currently created (in the library we are replacing) we are getting the weird Connection and Edge names shown in the snippet above. Refactoring the Connection code has a big knock on effect due to the way downstream clients are using the typeNames.
We are stuck between a rock and hard place. We can’t refactor the existing code and we can’t use the out of the box edge names. So we are looking for an alternative solution to help us proceed with our migration.
We are proposing this minor change to add the flexibility for our use case. Looking at the HotChocolate code it was the smallest feasible change we could see.


libc should let you manage errno

Originally filed as https://github.com/rust-lang/rust/issues/17714

There's also some discussion at https://github.com/rust-lang/rust/pull/18642

+1 for fn errno() -> c_int and fn set_errno(c_int). We already have a fundamental semantic gap between Rust and C here, so there's no point in sticking to literally the same identifiers with the C language spec.
I believe there are several C APIs for which checking errno is the best way to detect their errors, so clearing errno beforehand can be an essential requirement. For example... well... strtol(3) with base!=10?

I'd like us to fix this too. Another use case is writing libraries in Rust that expose a C ABI interface using errno for error signalling.

In nix, we have an errno module that provides errno() -> i32 across unix platforms. We don't have a set_errno() function though.

This library's scope is now defined by an RFC so if these sorts of function as such exist in libc on various platforms then we can certainly bind them, otherwise it'll be up to an external crate to add extra "rustic handling" for these functions.
Currently we don't necessarily keep an issue for all APIs we'd like to implement, so I'm going to close this, but PRs are always welcome!

@alexcrichton

if these sorts of function as such exist in libc on various platforms then we can certainly bind them,

I assume you didn't mean a "C function" for which libc.so has a symbol here, because the RFC
includes "C macros" such as CPU_ZERO() in its target.
POSIX states

The value of errno shall be defined only after a call to a function for which it is explicitly stated to be set and until it is changed by the next function call or if the application assigns it a value.

(emphasis mine.)
So assignment to the lvalue errno is a part of the public interface of what you call libc. Given that C's notion of "lvalue" doesn't readily map to Rust's (especially when we consider memory safety and multithreading,) and errno is typically implemented as a C macro, it would best fit with the spirit of the RFC to provide a setter function fn set_errno().
So the topic is not about "rustic handling." It's about whether you can handle it or not with the libc crate.
And again, because the original C interface based on a "lvalue" doesn't readily map to Rust, it is definitely worth having a discussion on the interface here. You shouldn't simply close this ticket.
I'd even say it is __errno_location() which should be removed from the libc crate because it is merely an implementation detail. The glibc reference doesn't even spend a word on it.
Do you think it makes more sense to define a Rust macro which closely mimics the typical errno macro (in C)? I don't think so.
extern {
    fn malloc(n: usize) -> *mut i8;  // just for an experiment
    pub fn __errno_location() -> *mut i32;  // implementation detail, but it has to be pub
}

macro_rules! errno {
    () => (
        *__errno_location()
    )
}

fn main() {
    println!("{:?}", unsafe { malloc(1 << 63) });  // sets errno
    println!("{}", unsafe { errno!() });
    unsafe { errno!() = 0 };
    println!("{}", unsafe { errno!() });
}

Strongly agree that any library whose scope includes access to standard C library functions should include a way to set errno to 0.  Both POSIX:

An application that needs to examine the value of errno to determine the error should set it to 0 before a function call, then inspect it before a subsequent function call.

and C99:

Thus, a program that uses errno for error checking should set it to zero before a library function call, then inspect it before a subsequent library function call. Of course, a library function can save the value of errno on entry and then set it to zero, as long as the original value is restored if errno’s
value is still zero just before the return. (§7.5, footnote 176)

don't merely permit modifying errno, they specify that applications and user-created libraried should do it under certain situations.  Furthermore, neither of them permits referencing __errno_location (declaring an identifier with two leading underscores is undefined behavior).
In every implementation I know of, &errno is legal, but this does not seem to be guaranteed by either C or POSIX (I can't find anything that would forbid struct __thread_state { ...; signed int __errno: 14; ... }; extern struct __thread_state *__current_thread(); #define errno (__current_thread()->__errno)).  errno = 0; and errno = ENOENT; are legal by spec though.
So, given that the scope of libc in RFC1291 includes "C macros" and "C statics", and errno is usually one or the other of those, and the specified interface to errno allows and in some cases requires assigning to errno, I would argue that our binding to errno is objectively incomplete and this is a needed improvement.

Can crate libc even implement setting errno properly without compiling a C shim for it? Without shim it requires all the platforms to provide something like __errno_location. If a shim is needed, it makes sense to use a separate crate to provide it.

@bluss

You could make exactly the same argument about get_errno.  Are you willing to state that Rust code using the libc crate should have no access of any kind to errno?
AFAICT, all Rust-supported POSIXy platforms do provide something like __errno_location; glibc and musl call it that, Android/bionic has __errno (not bound by the libc crate?), FreeBSD has __error, OpenBSD has __errno.  VS CRT documents a _errno.
My interpretation of RFC1291 is that a Rust program using the libc crate should be approximately as portable as the corresponding C program.  So we shouldn't do anything about the fact that different platforms have different Exxx constants, but we should provide read and write access to the errno variable, because C programs can use errno without knowing how it is #defined.

I said the opposite in issue #81

Since the issue is that libc scope as defined in RFC 1291 doesn't include anything about errno, I opened https://github.com/rust-lang/rfcs/pull/1571 to add it. Let's see where that goes.

Thanks @kamalmarhubi! I think that's the best next step here.

is this still valid or can we move https://github.com/lambda-fairy/rust-errno here?


Request: more info when too long prompt with InferenceClient.text_generation

When using InferenceClient.text_generation with a really long prompt, you get an error:
huggingface_hub.utils._errors.BadRequestError:  (Request ID: <redacted>)
Bad request:
Input is too long for this model, shorten your input or use 'parameters': {'truncation': 'only_first'} to run the model only on the first part.

Can we have this message contain more info:

Length of your input
Length of max allowable input
Instructions on how to get a larger max allowable input

What model are you using? If you use a model powered by TGI or a TGI endpoint directly, this is the error you should get:
# for "bigcode/starcoder"
huggingface_hub.inference._text_generation.ValidationError: Input validation error: `inputs` tokens + `max_new_tokens` must be <= 8192. Given: 37500 `inputs` tokens and 20 `max_new_tokens`

In any case, I think this should be handled server-side as the client cannot know this information before-hand.

The model I was using is https://huggingface.co/microsoft/biogpt with text_generation. It's supported per InferenceClient list_deployed_models, but it's not powered by TGI, just transformers.
I think this request is to add more info to that failure message, so one can better understand next steps.  I am not sure where that failure message is being made, if you could link me to a line in a Hugging Face repo, I just want to use some f-strings in its message


Redirected URL is not being encoded?

I am loading a URL that is being redirected. It looks like the URL that is being redirected to is not being URL encoded first.
Illegal character in query at index 43: https://xxx.xxxxx.xx/xxxxxx/?offering_type="buy"...
                                                                                ^

Am I right, and if so, how can this be solved?

URLs in redirects are encoded / normalized using the UrlBuilder. The entrance is here:
https://github.com/jhy/jsoup/blob/1e69577e358c75a85b769583f0cf860eedb18a5e/src/main/java/org/jsoup/helper/HttpConnection.java#L906
Can you give a full code example test case so it's possible to reproduce your issue?

Closing as there's no reproduction path - if you can supply a reproducer, please reopen.


Respond to audit report

Tracker for action items resulting from this repo's audit report.
Tracking
Major

[x] #60
[x] #61
[x] #62

Minor

[x] #63
[x] #64
[x] #65

Informational

[x] #66
[x] #67
[x] #68
[x] #69
[x] #70
[x] #71
[x] #72
[x] #73
[x] #74

Update: We've followed up with the auditing team with actions taken here and are awaiting any subsequent feedback.


StreamingLinkScrubberTest::test_01_streaming_link_scrubber - Failed: Timeout

https://github.com/skupperproject/skupper-router/actions/runs/3191058224/jobs/5206924541#step:29:1636
2022-10-05T16:45:48.2639619Z __________________________________________________ StreamingLinkScrubberTest.test_01_streaming_link_scrubber ___________________________________________________
2022-10-05T16:45:48.2639919Z
2022-10-05T16:45:48.2640198Z self = <tests.system_tests_two_routers.StreamingLinkScrubberTest testMethod=test_01_streaming_link_scrubber>
2022-10-05T16:45:48.2640497Z
2022-10-05T16:45:48.2640644Z     def test_01_streaming_link_scrubber(self):
2022-10-05T16:45:48.2640947Z         """
2022-10-05T16:45:48.2641325Z         Ensure extra streaming links are closed by the periodic scrubber
2022-10-05T16:45:48.2641632Z         """
2022-10-05T16:45:48.2641877Z         address = "closest/scrubber"
2022-10-05T16:45:48.2642106Z
2022-10-05T16:45:48.2642410Z         # scrubber removes at most 10 links per scan, the test pool size is 2
2022-10-05T16:45:48.2642724Z         sender_count = 12
2022-10-05T16:45:48.2642948Z
2022-10-05T16:45:48.2643243Z         # fire up a receiver on RouterB to get 1 message from each sender:
2022-10-05T16:45:48.2643586Z         env = dict(os.environ, PN_TRACE_FRM="1")
2022-10-05T16:45:48.2644173Z         cmd = ["test-receiver",
2022-10-05T16:45:48.2644536Z                "-a", self.RouterB.listener,
2022-10-05T16:45:48.2644866Z                "-s", address,
2022-10-05T16:45:48.2645186Z                "-c", str(sender_count),
2022-10-05T16:45:48.2645463Z                "-d"]
2022-10-05T16:45:48.2645737Z         rx = self.popen(cmd, env=env)
2022-10-05T16:45:48.2645984Z
2022-10-05T16:45:48.2646237Z         self.RouterA.wait_address(address)
2022-10-05T16:45:48.2646492Z
2022-10-05T16:45:48.2646894Z         # remember the count of inter-router links on A before we start streaming
2022-10-05T16:45:48.2647391Z         pre_count = len(get_inter_router_links(self.RouterA.listener))
2022-10-05T16:45:48.2647651Z
2022-10-05T16:45:48.2647846Z         # fire off the senders
2022-10-05T16:45:48.2648121Z         cmd = ["test-sender",
2022-10-05T16:45:48.2648426Z                "-a", self.RouterA.listener,
2022-10-05T16:45:48.2648694Z                "-t", address,
2022-10-05T16:45:48.2648949Z                "-c", "1",
2022-10-05T16:45:48.2649188Z                "-sx",
2022-10-05T16:45:48.2649422Z                "-d"
2022-10-05T16:45:48.2649614Z                ]
2022-10-05T16:45:48.2649872Z         senders = [self.popen(cmd, env=env) for x in range(sender_count)]
2022-10-05T16:45:48.2650134Z
2022-10-05T16:45:48.2650326Z         for tx in senders:
2022-10-05T16:45:48.2650556Z             tx.wait(timeout=TIMEOUT)
2022-10-05T16:45:48.2650767Z
2022-10-05T16:45:48.2651095Z         # expect: more inter-router links opened.  Should be 12 more, but
2022-10-05T16:45:48.2651435Z         # depending on when the scrubber runs it may be as low as two
2022-10-05T16:45:48.2651775Z         post_count = len(get_inter_router_links(self.RouterA.listener))
2022-10-05T16:45:48.2652098Z         self.assertGreater(post_count, pre_count)
2022-10-05T16:45:48.2652371Z
2022-10-05T16:45:48.2652658Z         # expect: after 5 seconds 10 of the links should be closed and 4 (2 per each of 2 data connections)
2022-10-05T16:45:48.2653307Z         # should remain (--test-hooks router option sets these parameters)
2022-10-05T16:45:48.2653733Z         while (post_count - pre_count) > 4:
2022-10-05T16:45:48.2654003Z             sleep(0.1)
2022-10-05T16:45:48.2654423Z >           post_count = len(get_inter_router_links(self.RouterA.listener))

The test times out since it expects more idle links should be deleted.
2022-10-05 16:38:46.135789 +0000 ROUTER_CORE (info) Streaming link scrubber: Scan interval: 5 seconds, max free pool: 2 links (/home/runner/work/skupper-router/skupper-router/skupper-router/src/router_core/modules/streaming_link_scrubber/streaming_link_scrubber.c:177)
...
2022-10-05 16:39:02.154567 +0000 ROUTER_CORE (trace) Core background action 'streaming_link_scrubber' (/home/runner/work/skupper-router/skupper-router/skupper-router/src/router_core/router_core_thread.c:237)
2022-10-05 16:39:02.154578 +0000 ROUTER_CORE (debug) [C3] Streaming link scrubber: scanning connection (/home/runner/work/skupper-router/skupper-router/skupper-router/src/router_core/modules/streaming_link_scrubber/streaming_link_scrubber.c:63)
2022-10-05 16:39:02.154589 +0000 ROUTER_CORE (debug) [C3] Streaming link scrubber: found 3 idle links (/home/runner/work/skupper-router/skupper-router/skupper-router/src/router_core/modules/streaming_link_scrubber/streaming_link_scrubber.c:86)
2022-10-05 16:39:02.154600 +0000 ROUTER_CORE (debug) [C3][L46] Streaming link scrubber: closing idle link qdlink.hXwRpEugVevdTop (/home/runner/work/skupper-router/skupper-router/skupper-router/src/router_core/modules/streaming_link_scrubber/streaming_link_scrubber.c:93)
2022-10-05 16:39:02.154617 +0000 ROUTER_CORE (debug) [C3][L44] Streaming link scrubber: closing idle link qdlink.L2nVxaamdOwOTYR (/home/runner/work/skupper-router/skupper-router/skupper-router/src/router_core/modules/streaming_link_scrubber/streaming_link_scrubber.c:93)
2022-10-05 16:39:02.154641 +0000 ROUTER_CORE (debug) [C3][L42] Streaming link scrubber: closing idle link qdlink.efe70LIrlU_SJso (/home/runner/work/skupper-router/skupper-router/skupper-router/src/router_core/modules/streaming_link_scrubber/streaming_link_scrubber.c:93)
...
2022-10-05 16:39:02.154657 +0000 ROUTER_CORE (trace) Core background action 'streaming_link_scrubber' (/home/runner/work/skupper-router/skupper-router/skupper-router/src/router_core/router_core_thread.c:237)
2022-10-05 16:39:02.154668 +0000 ROUTER_CORE (debug) [C4] Streaming link scrubber: scanning connection (/home/runner/work/skupper-router/skupper-router/skupper-router/src/router_core/modules/streaming_link_scrubber/streaming_link_scrubber.c:63)
2022-10-05 16:39:02.154678 +0000 ROUTER_CORE (debug) [C4] Streaming link scrubber: found 2 idle links (/home/runner/work/skupper-router/skupper-router/skupper-router/src/router_core/modules/streaming_link_scrubber/streaming_link_scrubber.c:86)
2022-10-05 16:39:02.154688 +0000 ROUTER_CORE (debug) [C4][L49] Streaming link scrubber: closing idle link qdlink.QbSRooLqlg2rTCA (/home/runner/work/skupper-router/skupper-router/skupper-router/src/router_core/modules/streaming_link_scrubber/streaming_link_scrubber.c:93)
2022-10-05 16:39:02.154703 +0000 ROUTER_CORE (debug) [C4][L55] Streaming link scrubber: closing idle link qdlink.fKU1_qWuW5psxX9 (/home/runner/work/skupper-router/skupper-router/skupper-router/src/router_core/modules/streaming_link_scrubber/streaming_link_scrubber.c:93)

#772 does not fix this issue but does add additional logging to track the streaming link lifecycle

Closing this issue as we have not been able to reproduce this in over a year.


Level 4

Can someone explain whats the average waiting time for customers who have been served?
Dont quite understand how the numbers add up

in serve class i had an updatestats method that would return the difference of current server next avail time - customer arrival time.
and in the statistic class we would divide this value by the num of cust served.
is this the right way to calculate the avg waiting time?

The average waiting time for customers who have been served is calculated by getting the total waiting or all the served customers / total number of customers served. How i calculated the waiting time for each customer was to get the time the customer was served minus the customer arrival time!

thank you for the quick response.
I did something like this. is my logic right?

The average waiting time for customers who have been served is calculated by getting the total waiting or all the served customers / total number of customers served. How i calculated the waiting time for each customer was to get the time the customer was served minus the customer arrival time!

Regarding the updateStats method in the Serve class you mentioned, would you need to check if the Server is not available to use this.currentServer.getNextAvailableTime()? Based on my understanding, this.currentServer.getNextAvailableTime() - super.customer.getArrivalTime() would equate to 0 if the customer is served immediately after it joins the queue.

If I can recall, the waiting time of a served customer is the event time that it gets served - the arrival time of the customer. So the average waiting time is the sum of the waiting times of all the customers that were served, divided by the total number of customers that were served. hope it clarifies!

i think what u can do is to sum up all the wait event times and then use that waitevent.execute(shop) to get the serve event and from there get its time, so ur getting like all the times. then cos theyre asking for average time for those being served you shld use serveCounter instead of like waitCounter!! maybe thats why

time cust was served - time cust arrived!
meaning in future levels u will need to ensure the time served is updated too!

total waiting time divided by number of customers served

u can try to use number of served customers instead of number of waiting customers to try divide, then for the total time use the sum of all the wait->serve events subtract the sum of all wait events

Hi! for the statistics class this is what I did in my simulate:
You should have these variables: numofserved, totalwaittime, numofleft
If it is a serve event -> numofserved += 1 , totalwaittime += event.getwaitingtime()
(Serve Event should have a get waiting time method which is ServeEventtime - CustomerArrivalTime
If it is a Leave event -> numofleft += 1
Then the final stats should just be
totalwaittime/numofserved   ,  numofserved ,    numofleft
hope this helps!

Hi you can get the waiting time by taking the difference between customer arrival time and the event time of a serve event, then divide by total number of customers who got served

Thanks guys!! :D


Use New Plot Feature from NOMAD

We need to update our base sections to use the new plot feature from NOMAD.

closed with #31


Automated reminders based on manually entered db rows

So far just added a db table for storing cron expressions for a channel. We should be able to setup reminders by adding a row manually. Cron doesn't seem perfect but 🤷♂, it worked with the library.
Next step is to add some UI for managing these reminders.

Couldn't figure out how to reply to your other comment. But yeah, this approach doesn't work for zero or > 1 dynos. External schedulers may/may not make sense, but glancing through the articles I didn't see a way to control the schedule from user input, e.g. /action remind @10:00 every weekday (probably less fancy though). If this were ever to scale we would need to find a different solution but I feel the app is still in the phase of discovery and I'd like to throw some features out for validation.


[NP-4426] ReadReferenceView update

address: https://nanopay.atlassian.net/browse/NP-4426
nanopay pr: https://github.com/nanoPayinc/NANOPAY/pull/12766
Summary

can now configure access to the link and what is set to the link using enableLink, menuKeys, and controlAccessToDAOSummary

Flowchart

determines access to the link and what is set to the link

@Nauna I am using 'controlAccesstoDAOSummary' to control access to the link to dao summary view. I wasn't able to achieve this with menus because we don't (can't?) have a dao summary menu. We do have dao menus, but they are different from summary view, right?

@Nauna I am using 'controlAccesstoDAOSummary' to control access to the link to dao summary view. I wasn't able to achieve this with menus because we don't (can't?) have a dao summary menu. We do have dao menus, but don't we want the link to take you to a dao summary view, not dao menus?

we need to make https://github.com/kgrgreer/foam3/pull/350/files#diff-b058fc1e2382ec3709d5e66ed2ddb87e4c6398f1ba1f51c9601d1218d757b350R105-R112
into a menu and check if user has permission - is what im thinking

I don't really understand the point of 'controlAccessToDAOSummary' when would we ever want this to be false?

We would set this to true if we want to permission the access to the link reference. For instance, if we set this is to true for group reference property, then the link to the summary view for this group will only be enabled if the group has permission to read group summary view.

The flowchart looks correct to me, except I think the 'can read DAO Summary' check should just be an attempt to read the object from the dao and if it can, then display the DAO Summary. No other configuration is required because if they want to disable linking, then they have the enableLink feature and if they want something more sophisticated, then they have menus.

@kgrgreer @Nauna The reason for that config was to permission access to the link based on group. I believe we specifically wanted this feature to only allow access to dao summary to certain group (more precisely disable some links to fraud-ops).


[flash_ctrl,dv] tl integrity error from rd_fifo rsp

cmd:
./util/dvsim/dvsim.py ./hw/ip/flash_ctrl/dv/flash_ctrl_sim_cfg.hjson -i flash_ctrl_ro_derr -r 1 -v m -s 1 --waves
This is double bit error test. From the wave,
@35977.4 TB sends rd_fifo read but return data has integrity error (tb.dut.core_tl_o.d_user)
obs: 0x7F  exp: 2a (looks like 1 cycle off )

waveform is attached

@jdonjdon for the double bit errors, since it cannot be corrected, can actually manifest as integrity errors.
The integrity errors are then passed directly to the host (like sram and otbn).  Is that what you are observing?

Should be addressed by #13817 , give it a try and let me know.

Should be addressed by #13817 , give it a try and let me know.

You mean #13868 ,  that fixes issue, But you need to update
hw/ip/flash_ctrl/flash_ctrl.core to add a new file "rtl/flash_phy_rd_buf_dep.sv"

Should be addressed by #13817 , give it a try and let me know.

You mean #13868 , that fixes issue, But you need to update hw/ip/flash_ctrl/flash_ctrl.core to add a new file "rtl/flash_phy_rd_buf_dep.sv"

ah yes i need to rebase.


Support for Azure Pipelines for StrykerJS

Question
Is there a way to integrate StrykerJS in an Azure CI Pipeline? We are needing it for an Angular project.
Stryker environment

+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>

+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>

Hi @andrelutza 🙋♂
Sure you can. We're running it in a github workflow as well, see https://github.com/stryker-mutator/stryker-js/blob/master/.github/workflows/mutation-testing.yml
An example for azure devops:
trigger:
- master

pool:
  vmImage: ubuntu-latest

steps:
- task: NodeTool@0
  inputs:
    versionSpec: '16'
    checkLatest: true
  displayName: 'Install Node.js'

- script: |
    npm ci
    npm run stryker
  displayName: 'npm install and run Stryker'

Hello @nicojs !
Thanks, that's what I needed!


Demo doesn't looks properly in nbviewer

Unshowable:Graphics.Rendering.Chart.Renderable ()
No instance for (Show (Graphics.Rendering.Chart.Renderable ())) arising from a use of `print'

--

Unshowable:Html
No instance for (Show Html) arising from a use of `print'

--

import qualified Data.ByteString as B
B.readFile "code/IHaskell/images/ihaskell-notebook.png"

"\137PNG\r\n\SUB\n\NUL\NUL\NUL\rIHDR\NUL\NUL\SOH\248\NUL\NUL\STXQ...

--

> Not in scope: \`diagram'
> Perhaps you meant \`dimgray' (imported from Diagrams.Prelude)

--

http://nbviewer.ipython.org/github/gibiansky/IHaskell/blob/master/demo/IHaskell.ipynb
http://nbviewer.ipython.org/github/gibiansky/IHaskell/blob/v<IP_ADDRESS>/demo/IHaskell.ipynb

<bountysource-plugin>
---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/2859663-demo-doesn-t-looks-properly-in-nbviewer?utm_campaign=plugin&utm_content=tracker%2F332399&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F332399&utm_medium=issues&utm_source=github).
</bountysource-plugin>

This is noted in #410.


v5.19 Changelog

@mkraft Please help with the following information for v5.19 Changelog:

Any new config.json settings
Any API changes
Any Websocket Event changes
Any Database changes

FYI that RC-1 was cut before the holidays and RC-2 will be cut tomorrow or Friday (not sure if this affects gathering the above requested information or not).

@mkraft Please help with the following information for v5.19 Changelog:

Any new config.json settings
Any API changes
Any Websocket Event changes
Any Database changes

FYI that RC-1 was cut before the holidays and RC-2 will be cut tomorrow or Friday (not sure if this affects gathering the above requested information or not).

No config changes.
API changes:

Etag header was added to the API endpoint to get the client license.
Oath IsTrusted configuration can only be changed if the user has the manage_system permission.

No websocket changes.
No DB changes.


Better UX for gale as lib

Currently gale executed by it's own wrapper like:
Current usage of gale:
gale.New(&cfg, client).
	WithModifier(func(container *dagger.Container) (*dagger.Container, error) {
		// create a file in the container to use for artifact upload
		container = container.WithNewFile("/foo/bar.txt", dagger.ContainerWithNewFileOpts{
			Contents:    "Hello World",
			Permissions: 0600,
		})

		// bind artifact service to the container
		container = container.WithServiceBinding("artifact", services.ArtifactService(client))

		// mock run id and runtime variables
		container = container.WithEnvVariable("GITHUB_RUN_ID", "1")
		container = container.WithEnvVariable("ACTIONS_RUNTIME_TOKEN", "test")
		container = container.WithEnvVariable("ACTIONS_RUNTIME_URL", "http://artifact:8080/")

		// enable debug mode
		container = container.WithEnvVariable("RUNNER_DEBUG", "1")

		return container, nil
	}).
	WithStep(&model.Step{Uses: "actions/upload-artifact@v2", With: map[string]string{"name": "test", "path": "/foo/bar.txt"}}, false).
	WithStep(&model.Step{Uses: "actions/download-artifact@v2", With: map[string]string{"name": "test"}}, false).
	WithStep(&model.Step{Run: "cat bar.txt"}, false).
	Exec(context.Background())

This approach creates relatively simpler usage for when working on Github Actions but it makes really hard to combine with dagger.Container workflows or use custom action support in your container.
Instead of using the wrapper option, we could use a collection of atomic operations like:
dagger.Container().
  From(image).
  With(gale.AddStep(&gale.Step{...}).
  With(gale.AddStep(&gale.Step{...}).
  With(gale.Exec{...}).
  Stdout(ctx)

Some thoughts about the topic. Just random thoughts about gale on a higher level.  Not finalized version yet
Improve DX of the project
The easiest method for setting up the dagger container is utilizing the 'dagger.WithContainerFunc' function. This function requires a function that will be executed using the 'dagger.With' function.
The easiest method to standardize this process in the library is to create an interface that includes WithContainerFunc, and then implement this interface for all configurable components in the gale like:
Interface:
// Configurator defines an interface that can be implemented to configure the container.
type Configurator interface {
	// WithContainerFunc is a function that can be used to configure the container.
	WithContainerFunc(*dagger.Container) *dagger.Container
}

An element:
var _ Configurator = new(Job)

type Job struct {
	// job-related data
}

func (j *Job) WithContainerFunc(container *dagger.Container) *dagger.Container {

	// configure the container here

	return container
}

A simple wrapper to improve readability:
func Configure[T Configurator](t T) dagger.WithContainerFunc {
	return t.WithContainerFunc
}

Usage:
container = container.With(gale.Configure(job))

Topics
These is the main topics we should consider when we re-design DX of the library.
Environment
The execution environment contains tools, services, and configurations to run Github Actions Workflows. This is the part eventually integrated with #project-gale
Configuration
Configuration of the execution environment, repository, and workflow. This is one of the most complicated parts of the library.  We need this to customize the environment and keep it in sync with actual GHA runners.
Job
Representation of the Github Actions Job in gale. Mostly Load / Build or Customize Github Actions Jobs with gale compatible format. We should re-think our interactions with jobs here as well.
Step
Representation of the Github Actions steps. Atomic execution unit for gale. This can be part of the custom action, job, or individual executor for gale environment.

it's not meaningful anymore


Async websocket creates a large binary & object file

Version of Boost 1.70 ( 1.73 too )
Steps necessary to reproduce the problem
Build sample async ssl websocket example
https://www.boost.org/doc/libs/1_70_0/libs/beast/example/websocket/client/async-ssl/websocket_client_async_ssl.cpp
On Mac OS with clang,
This will produce a release binary 6.3 MB. This is not due to OpenSSL. You will see that object file ( websocket_client_async_ssl.o ) is also 3.8 MB.
And following statement contributes to shocking 3.1 MB of it.
// Perform the websocket handshake
ws_.async_handshake(host_, "/",
beast::bind_front_handler(
&session::on_handshake,
shared_from_this()));
while sync version of same ( ws_.handshake ), contributes only 400 KB extra.
File size changes as below.

Async ws-handshake - ( obj: 3.8 MB,  exe: 6.3 MB )
No ws-handshake - ( obj: 0.5 MB,  exe: 2.9 MB )
Sync ws-handshake - ( obj: 0.9 MB,  exe: 3.2 MB )

SSL present in all of above case.
I checked some cases with latest boost version 1.73 also, no noticeable change in reduction. Probably it takes more.

Debug build or release? If release build, did you strip debugging symbols?
On Sat, 11 Jul 2020 at 12:41, amnuwan<EMAIL_ADDRESS>wrote:

Version of Boost 1.70 ( 1.73 too )
Steps necessary to reproduce the problem
Build sample async ssl websocket example
https://www.boost.org/doc/libs/1_70_0/libs/beast/example/websocket/client/async-ssl/websocket_client_async_ssl.cpp
On Mac OS , clang
This will produce a release binary bigger than 2.5 MB. This is not due to
OpenSSL. You will see that object file ( websocket_client_async_ssl.o ) is
also around 2 MB.
And following statement contributes to around 1.6 MB of it.
// Perform the websocket handshake
ws_.async_handshake(host_, "/",
beast::bind_front_handler(
&session::on_handshake,
shared_from_this()));
Striping reduces the size little bit ( like 200 KB ).
However sync version is not this big. If you replace above statement with
ws_.handshake size get smaller by around 1 MB. Making total object size
around 1 MB.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/boostorg/beast/issues/2013, or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABHOZSIAXXAJAA7YC6KF623R3A6W7ANCNFSM4OXH3D6A
.

--
Richard Hodges
<EMAIL_ADDRESS>office: +442032898513
home: +376841522
mobile: +376380212

Debug build or release? If release build, did you strip debugging symbols?

Release build.
Stripping ( compiling with option -S ) increases object file further : from 3.8 MB to 23 MB
Anyway I'm not able to link after stripping.
No luck with striping for me but better if we can find the reason for this bloat specially in async mode. These symbols can help to debug a crash I suppose, which could be the reason they are in a release build, right ?

@amnuwan That's the wrong flag, -S does the following:

Stop after the stage of compilation proper; do not assemble. The output is in the form of an assembler code file for each non-assembler input file specified.

The flag for stripping is -s.
As for the bloat- it's most likely related to how the async functions of websocket stream cause multiple instantiations of the async algorithms of the underlying stream, because multiple buffer types are passed.

@djarek thanks, I'll check about the option, I know striping can reduce the size a little, but if it has a cost to crash error reporting, I don't preffer that.
single statement cause 3.1 MB size increase, making beast is a difficult option for a mobile or embeded library overall. I'm developing a communication library, can't sacrifice around 5 MB of size just for websocket connectivity.
@djarek Mentioned template instantiation, how many templates would it require increase the size to this level by a single line of code. If this is unavoidable, then something is not right with the design of asio/beast. It lead us to consider, beast as a heavy library to perform websocket connectivity.

Some things that may help:

don't use polymorphic executor (the default) on I/O object, prefer the exact type (usually io_context::executor_type)
try to use the same buffer type in all async calls
if you're not using the timeouts/rate limiting features of  beast::tcp_stream , don't use it, use a socket type from ASIO instead
enable LTO (not really related to beast, but in general), which enables more optimization opportunities
make sure you optimize for size (-Os), if size is important.

No. The issue remains. 1st message has details to reproduce.
On Sun, 16 Aug 2020 at 3:19 PM, stale[bot]<EMAIL_ADDRESS>wrote:

This issue has been open for a while with no activity, has it been
resolved?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/boostorg/beast/issues/2013#issuecomment-674490938,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGCND2G7HLKEOCG73SUF5MDSA6CADANCNFSM4OXH3D6A
.
--

A.M Nuwan Abeysinghe
Mobile : +94 71 5800808
T.P     : +94 11 2617273

Ok, I’ve been off work for a few days. I’ll tackle this on Monday.
Thanks for your patience.

Nice, so I will continue to use beast for mobile assuming size will be reduced in the recent future.
Below library generate a really small binary I was thinking use it if beast couldn't fix this.
https://machinezone.github.io/IXWebSocket/
Thanks !

great. we're on it.

Can this take some time to be resolved ? Like 2-4 months ?

It can, depending on what else is distracting the maintainer :)
PRs are always welcome if you'd like to help move the process along.

As a mitigation, following things helped
-fvisibility=hidden -Os -flto=full
-Wl,--gc-sections,--as-needed
Also striping
In my project, overall I was able to obtain .so file of size 3.1 MB ( Around 2 MB goes to beast ).
Object file correspond to beast connection with above line is still 4.3 MB. It's a small 350 lines class which has nothing else but beast websocket connection with SSL.
This problem is severe only when it comes to android mobile applications. It will be really helpful for others if we put some warning at main page. Like below,
Warning : Websocket code with SSL contributes to additional ~1-2 MB release binary size when compiled as ".so" library.

I am using Boost.Beast to implement a Websocket SSL server on a range of embedded devices. Although "losing" around two megabytes of free space is not a big issue, it would be great if the resulting binary (or object file) could be trimmed down a bit.

I've noticed massive binary sizes too. I'm also using Boost.Json for parsing/writing HTTP requests/response. A very simple HTTP + Websocket over SSL application with some JSON parsing results in a 7MB binary with everything statically linked. It's massive. I'm also putting this on an embedded device but i can get away with it. I've noticed this a lot with Boost libraries. The compile times and binary sizes are massive. Fantastic libraries but what is it about Boost and bloated bins.

I've noticed massive binary sizes too. I'm also using Boost.Json for parsing/writing HTTP requests/response. A very simple HTTP + Websocket over SSL application with some JSON parsing results in a 7MB binary with everything statically linked. It's massive. I'm also putting this on an embedded device but i can get away with it. I've noticed this a lot with Boost libraries. The compile times and binary sizes are massive. Fantastic libraries but what is it about Boost and bloated bins.

Are you sure you're building in release mode? Based on what you've explained, a binary size of 1 to 2 MB is expected.

I'm building with -O3 -ffast-math -s.
In debug mode, I get a binary of size 47MB.

OK, I guess that's the nature of heavily templated libraries. There is no such thing as a zero-cost abstraction.

Something is wrong if the size increase is this big for a websocket
implementation over existing asio socket layer. I understand the
unavoidable size difference for TLS implementation but there is a
significant increase on top of it.
Also make sure to try related “strip” commands post release build.
Sometimes it reduces the size by like 60%.
On Mon, 14 Oct 2024 at 21:27, pfeatherstone @.***>
wrote:

OK, I guess that's the nature of heavily templated libraries. There is no
such thing as a zero-cost abstraction.
—
Reply to this email directly, view it on GitHub
https://github.com/boostorg/beast/issues/2013#issuecomment-2411275442,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGCND2AUCTESUFSV6M7YI53Z3PBFTAVCNFSM6AAAAABP463PUSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJRGI3TKNBUGI
.
You are receiving this because you were mentioned.Message ID:
@.***>


How to make struct file from android?

May I ask what tool or method you used to extract the binder structure from Android？

@sam-f0
I found that the TRANSCATION_CODE in my device is different from the one defined in the struct file. I had to adjust the definitions in the struct file to ensure that the results were correct.
Would you please update the definition of the struct interfaces in the future ?

@sam-f0 can you include android 14 structs? I'm using android-14.0.0_r28 but any android 14 tag would work. thank you.

@madushan1000 I will endeavor to generate them and push a new version this week

Thank you :) any plans to open source the struct generator? I'm playing around with adding new aidl apis and I've been hand writing some struct files. Good enough for small apis but not that great for functions with complex types/custom parcelebles.

@madushan1000 binder-trace 3.1.2 has been released with the Android 14 structures from android-14.0.0_r28
There are no current plans to open source the generator, as per my prior comment https://github.com/foundryzero/binder-trace/issues/9#issuecomment-1584657286

Okay, thank you for the update, I'll try it out :)

We have added some more information about struct files in release 1.4.0 in https://github.com/foundryzero/binder-trace/blob/main/STRUCTURES.md


Fix Fixed Feature Version

This PR set the playlist module's version to the match the rest of the project, rather than a hardcoded 16-SNAPSHOT.  Works fine as long as you're in develop, but when we switch to OC 17 this wouldn't otherwise get updated!
Your pull request should…

[x] have a concise title
[ ] ~close an accompanying issue if one exists~
[x] be against the correct branch
[ ] ~include migration scripts and documentation, if appropriate~
[x] pass automated tests
[x] have a clean commit history
[x] have proper commit messages (title and body) for all commits

Merging this without discussion at tomorrow's technical meeting since this could cause trouble with the branch cut and hard-coding this was an obvious mistake.


[language] kill bytearray type

Summary
This gets the bytearray type removed from Move.
Note: byte array values still exist in the file format & source compiler, with type vector<u8>.
Test Plan
cargo test

@wrwg @junkil-park I didn't remove bytearrays from bytecode-to-boogie -- they are just unreachable though. Let me know if this is fine for now! If not I can put up a followup PR to delete those.

Hmm... I did update the baseline files for Move prover. Could it be that I'm using a different version of boogie?

Hmm... I did update the baseline files for Move prover. Could it be that I'm using a different version of boogie?

Have you rebased since yesterday afternoon?

CI uses boogie 2.5.7.

@wrwg I might have not -- trying to rebase and run it again now.

Nope, it still doesn't output those on my machine, and I am using version 2.5.7.

Just to make sure. Did you do UPBL=1 cargo test in the `language/move-prover' directory to generate the baseline files?

:umbrella: The latest upstream changes (presumably 4c1e580c1f08d0ed28dc741c3fb2c25888c474cf) made this pull request unmergeable. Please resolve the merge conflicts.

Yes. That's exactly I did.

I suggest to go ahead and just merge this even if the prover tests fail. We figure then out later.
@junkil-park @DavidLDill

@vgao1996, could you delete the line #4 in language/move-prover/tests/sources/stdlib.move, and retry? The line to delete is:
// dep: ../stdlib/modules/bytearray_util.move.

Yeah I reverted that file by mistake. It should be good now.

Prover test passed on your latest commit! (log: https://github.com/mimoo/mirai-bot/runs/512012082?check_suite_focus=true)

@bors-libra r=wrwg

:pushpin: Commit db97512 has been approved by wrwg

:hourglass: Testing commit db97512a48eb59de12c64f3bcd0ada753d954736 with merge e534540146d19ec0eb883bb814e8cfedaa641e5f...

@bors-libra r=wrwg

:pushpin: Commit f2c56be has been approved by wrwg

@tnowacki I've fixed the test you mentioned. Thanks for catching this!

:hourglass: Testing commit f2c56be3db4856801429df2d14e8d33fa8a03f7f with merge 11872f551413526667f57c6ee34b3b4507468a61...

:sunny: Test successful - checks-actions_land_blocking_test, checks-circle_commit_workflow
Approved by: wrwg
Pushing 11872f551413526667f57c6ee34b3b4507468a61 to master...


fix(react-email): Missing Headers on the global context for email templates

Hello, I noticed Headers doesn't in the get-email-component.ts. Because of this, you can't see the preview of your email template if you are using Headers in your code. This PR should fix it.
(BTW I spent 4 hours while investigating why tf is this can't find Headers 🤣)

Can you also format?

I sent one more commit to format it. It shows ok when I run format:check but don't know why gh actions shows like this


Regression for ECR access with IAM Role: "external_id referenced before assignment"

Affects version: v0.5.0 only
If accessing an ECR registry via an IAM role added via:
anchore-cli registry add <ecr url> _iam_role arn:aws:...
there is a regression introduced in the addition of external_id support that causes an error:
Error: cannot refresh credentials for supplied registry, with supplied credentials - exception: local variable ‘external_id’ referenced before assignment
Workaround: re-add the role with a trailing semicolon
anchore-cli registry add <ecr url> _iam_role 'arn:aws:...;'

Note the surrounding single quote to ensure the semi-colon is passed to the api call properly.

It is already merged into the 0.5 maintenance branch and will be in the 0.5.1 release. This ticket won't get auto-closed until the fix is merged into master for the 0.6.0 release Typically we push a maint release every month or so. Note the above described workaround that resolved the error if you have it in production now. The fix will not cause that workaround to break so it is safe to apply.

Anchore already has support for external_id and assuming roles to interact with ECR, but I think the docs are lacking. @pklanka are you asking about that support in general, or just this specific bug fix?

I was talking about this specific bug fix. Our iam role integrations are down. Do you know what is the release date for 0.5.1.

Likely end of Sept or early Oct. However, we auto-build containers with dev code, so you can try the anchore/anchore-engine:v0.5-dev container (I'd get the digest for the current build and lock it if I were you), and try that as a test. if that works you can use that specific container (locked by digest) until the release is ready and there is a v0.5.1 container to swap out.

However, I highly recommend the workaround for now: re-add the registry credential record with a trailing semicolon on the arn: example: "arn:aws:::/role/;" that will fix the problem until the fix is released


Node - Help

I've created a "Hello, World" node.js package with app.js
const http = require('http');
var chess = require('@chrisoakman/chessboardjs');
var fs = require('fs');

const hostname = '<IP_ADDRESS>';
const port = 3000;

const server = http.createServer((req, res) => {
        fs.readFile('index.html', function(err, data) {
                res.writeHead(200, {'Content-Type': 'text/html'});
                res.write(data);
                return res.end();
        });
});

server.listen(port, hostname, () => {
        console.log(`Server running at http://${hostname}:${port}/`);
});

and index.html:

My Header

My paragraph.

and installed the dependency using npm:
npm install @chrisoakman/chessboardjs

Some proof it installed:
walter@fluffy:~/chess-web-frontend$ tree node_modules/ -L 2
node_modules/
|-- @chrisoakman
|   `-- chessboardjs
`-- jquery
    |-- AUTHORS.txt
    |-- LICENSE.txt
    |-- README.md
    |-- bower.json
    |-- dist
    |-- external
    |-- package.json
    `-- src

6 directories, 5 files

So first issue is I node is not seeing the module:
walter@fluffy:~/chess-web-frontend$ node app.js
node:internal/modules/cjs/loader:928
  throw err;
  ^

Error: Cannot find module '@chrisoakman/chessboardjs'
Require stack:
- /home/walter/chess-web-frontend/app.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:925:15)
    at Function.Module._load (node:internal/modules/cjs/loader:769:27)
    at Module.require (node:internal/modules/cjs/loader:997:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/home/walter/chess-web-frontend/app.js:2:13)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:973:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/home/walter/chess-web-frontend/app.js' ]
}

And then I'm pretty sure I need to include the chess library (module?) so the client can actually access it. This is definitely just my unfamiliarity with how node and npm plays together and is probably quite straight forward. Might be a nice idea to have such an example on your website so folks like me can bootstrap easier :)

Hi - thank you for the detailed issue report!
chessboard.js is a JavaScript library that is intended to be used in a browser context. In other words, it is not designed to run on Node.js.
If you are using Node.js as a backend platform for your project, then that will be orthogonal from anything that chessboard.js is doing. Most likely you will want to include jQuery and chessboard.js on the webpage that is delivered by your Node.js server to the browser as static assets.

Quick response :D Awesome!
Yip that's mostly what I understood before. What threw me off was that your downloads page has a section for installing using npm. i.e.:
# using npm
npm install @chrisoakman/chessboardjs

This made me think that there's maybe some idiomatic way client side javascript modules are imported from node using npm or something that I'm unfamiliar with (since this is my first dive into node npm etc)

This made me think that there's maybe some idiomatic way client side javascript modules are imported from node using npm or something that I'm unfamiliar with (since this is my first dive into node npm etc)

Yes - I can see how this is causing confusion. Many "modern JavaScript" projects are built using tooling that pulls together files from npm and bundles them together into something that is ultimately delivered to a web browser (Browserify and webpack exist for this purpose, for example). Often these files go through a compilation phase using Babel or additional tooling as well.
Most of this tooling is built on top of Node.js, and they naturally use npm for the "fetch my frontend dependencies" part of the equation. The bottom line is that many npm modules these days are ultimately destined for a web browser, and may not even work on the Node.js platform.
chessboard.js was created largely before this ecosystem gained traction and only has one dependency: jQuery.
I added chessboard.js to npm so that folks using "modern tooling" could easily require and fetch chessboard.js as a dependency for their projects. How chessboard.js gets bundled and shipped to a web browser will be different for every project.
Another reason to put chessboard.js on npm is to enable certain CDNs that automatically mirror the npm registry. This is how you are able to use https://unpkg.com/<EMAIL_ADDRESS>for serving up chessboard.js if you prefer that route. See the "Content Delivery Network" section on the Download page or "view source" on one of the Example pages for an example of using chessboard.js via CDN.

Oh! That was easy. Got it up and running in less that 10 minutes :P
Thanks for the detailed explanation and history lesson!
Thanks for the project! So glad when others maintain such high quality projects.
Will let you know when I've got setup what I wanted to do with your project (visualization of chess-ai games).
Thanks a bunch!


fix: release iItemProperty repeatedly

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

Project coverage is 79.99%. Comparing base (412286b) to head (18d2f89).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #16      +/-   ##
==========================================
- Coverage   80.12%   79.99%   -0.14%
==========================================
  Files          27       26       -1
  Lines        2762     2719      -43
==========================================
- Hits         2213     2175      -38
+ Misses        361      357       -4
+ Partials      188      187       -1

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


Add "force smart charging" option to configuration flow

Add "force smart charging" option to configuration flow
Suggested by drc38 in https://github.com/lbbrhzn/ocpp/pull/599#issuecomment-1225090294, https://github.com/lbbrhzn/ocpp/discussions/474#discussioncomment-2577256
Fixes https://github.com/lbbrhzn/ocpp/issues/510, https://github.com/lbbrhzn/ocpp/pull/599 (at least partially)
Fixes https://github.com/lbbrhzn/ocpp/discussions/474

Please update the tests to include the new config option and fix linting, cheers

I do have a suggestion for this (I do own a ABB Terra AC so I am actually affected by this)
Wouldn't cases like these be a typical scenario for "vendor/model specific quirks" as uses e.g. in ZHA?
Most typical users barely understand options like this and start a "trial and error session" until everything does what they want it to.
At least for known cases it should be possible to detect device specific quirks and handle them within the code and in return improve the "plug 'n play" experience for users.

I do have a suggestion for issues like this (I do own a ABB Terra AC so I am actually affected by this).
Wouldn't cases like this one be a typical scenario for "vendor/model specific quirks" as used e.g. in ZHA? Most typical users barely understand options like this and start a "trial and error session" until everything does what they want it to. Plus there is a real "threat" that the list of "device specific options" gets longer and longer.
At least for known cases it should be possible to detect device specific quirks and handle them within the code and in return improve the "plug 'n play" experience for users.

In terms of the Ocpp HA integration it was intended to be completely generic to the standard and not to really accommodate device specific quirks. However over time it has become clear a number of manufacturers are not fully compliant with the standard or there are some "grey" areas eg websockets, supporting a feature but not reporting that it does.
To assist others with device specific quirks or configuration this can be documented in the docs via a PR or the repo forked to create a device/manufacturer specific integration. Hopefully over time most quirks will be addressed through firmware upgrades.

I don't mean to be to pessimitic, but having worked with communication "standards" in multiple industries (primarily EDI in the automotive sector Automotive and pretty much every single standard ever used in the "Enterntainment Sector" (DVB, HDMI, CeC) this seems like an unachievable goal.
I do understand and honor the concept/wish though and agree that user-side configuration is fine when documented properly.


feat: tickLabelFormat callback in axis component

Please modify one of the stories to show that it works as expected.
For example in the Nasdaq story, we could have:
const formatter = new Intl.DateTimeFormat('en-GB' , { timeStyle: 'short' });

<Axis
  label="Time (hh:mm)"
  tickLabelFormat={(time)=>timeFormat.format(time*1000)}


Support Pagination

Hi ,
this framework is great for making forms in iOS
but it missing Pagination
when there is alot of data only display frist 10 from example
and every time user scrolling down it will display more cells
this fremwork is do the job
https://github.com/salmaanahmed/PaginatedTableView
it will good to have it on this fremwork !

@X901 Thanks for the suggestion. I will surely try to integrate if possible.