[language][bytecode_verifier] implement unused entry checker

Summary
This implements a new checker that errors on unused entries in tables in the file format. It is required to cover cases the bounds checker can no longer handle with the introduction of generics.
Right now it checks for unused entries in the following pools:

locals_signatures
type_signatures
field_defs

For details, see #841.
Test Plan
New tests added.
cargo test

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

@shazqadeer Yes I was aware of that and moved the logic to this checker. (See my changes to  check_duplication.rs.) Since we prefer micro passes that each does a specific check, I think this is a better place for it.

I see unused entries as a code hygiene issue.  As @dariorussi pointed out, in the general case, if unreachable code is considered and precision is required, the problem of detecting unused code is undecidable.  We do not want to go down that rabbit hole.  Whatever we implement must be done uniformly and should have an easy specification for developers to understand (consequently, the specification should not refer to reachability of code, for example).  Something that requires syntactic scan of all tables and does not distinguish between reachable and unreachable code would be fine from my point of view.

I think we should pause on this and have a broader conversation about what we are trying to do.

I would love for others to chime in as well because personally I am not clear what we should do.
Originally I thought of this check as a comprehensive check for unused entries. There is value for that in my mind but it's also something that can be difficult to accomplish and we may decide otherwise.
If we go for the exhaustive checks we should check all tables: all "literal" pools (Address, String, ByteArray, Identifier), all handles (Module, Struct, Function), all signatures (Function, Type, Local) and all definitions (Struct, Function, Field).
For definitions we should make sure there is at least one reference from code unless it's a public function (which of course makes private functions a bit tricky).
Natives may add an interesting spin to all of this.
This diff implements only a partial check for unused entries. The implementation is absolutely fine of course, and if the intent is to implement all checks, this is a fine starting point and I am ok accepting it.
If consensus is not to implement all the checks then I don't see any value in partial checks (though you may have reasons for that, so please let us know).
There are a lot of interesting spins to this story. Should unreachable code be ok? that adds a very interesting angle to reachability of other items in the binary. And dead code elimination is a difficult topic that may lead to diverging implementations. And if I can have dead code to point to entries then maybe there is no point in checking anything.
A clean, easy and complete checks could help us all feel good about what is published but it may not be possible.
Thoughts anybody?
@bob-wilson, @sunshowers, @tnowacki, @runtian-zhou, @tzakian, @sblackshear, @shazqadeer

I had this discussion with @sblackshear a week ago. It seems to me that we only need to check the signature pools, and we possibly won't need to check unreachable code. The reason being that we don't want the verifier to run extra work to get rid of things that won't affect the runtime result. and due to the fact that we are having extra charge base on the transaction size, it will very well likely punish the "bad" code that contains the unreachable items. So IMHO as long as we set the per-size cost correctly, we won't really need to be too sensitive on those checks.

My opinion is similar to Shaz's.

The following rules are easy to define and enforce. Doing it for hygienic reason should benefit the ecosystem in a long run and shouldn't impose too much burden on either the verifier or a source to bytecode compiler.

Unreachable addresses, strings, identifiers, signatures, handles & definitions. (Maybe also locals?)

As pointed out, dead code elimination is undecidable. Doing this will force all implementations of verifiers/source to bytecode compilers to follow a specific set of behaviors, which is not desirable.
Having an unused signature that contains a type parameter troubles me, as there is no context it lives in.

Having an unused signature that contains a type parameter troubles me, as there is no context it lives in. I would personally prefer a file format where everything is at least "correct or meaningful", despite whether they are used.

I can't say it bothers me.  By having a pool, we are allowing an entity to have a set of references to it.  The entire debate appears to be whether we allow this set to be empty.  I don't see a massive conceptual leap with allowing the empty set of references. In fact, the massive leap happens when we allow more than one reference to a signature.  If such a multiply-referenced signature contains a TypeParameter, this TypeParameter could mean an entirely different thing in each reference context.

If we decide to allow unused entries, we should perhaps drop the check for unused fields also for consistency's sake.  I added this check while I was checking consistency among fields and structs without thinking too much about it.

On a related note, shall we also drop the RecursiveStructDefChecker?  The presence of recursive struct definitions is simply dead code and not a safety concern.

In fact, the massive leap happens when we allow more than one reference to a signature. If such a multiply-referenced signature contains a TypeParameter, this TypeParameter could mean an entirely different thing in each reference context.
Very good point and that sharing (multiple references) is entirely possible and fine.
We should think if there are any issues with bad signatures or unused ones.
Also maybe focus - as @shazqadeer pointed out - on what a simple syntactic check may be and just leave it at that?

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

@sblackshear pointed me at this since it's a topic we've talked about on and off. I think that having hygienic checks is a slippery slope. It's not the blockchain's goal to ensure that published modules accomplish a specific functionality correctly, are well written, etc. Of course, as pointed out here, there may be easy cases where such checks could take place. But to what end? We'd be unable to build a high quality tool (like an infer) here --- such tools are not appropriate for a consensus context and evolve over time. Users interested in running high quality checks have to run another tool, what benefit would we get by having a subset of that tool running on chain?
To my knowledge, this also goes well beyond what runtime checkers for other VMs do. I don't believe the JVM or .net vm take this approach. Personally, I'd even be OK with Move taking a lower bar than those VMs. For example, in JVM and .net (and AFAIK, Move right now) if you have an operation that loads a string from a constant table and the index of the string is out of bounds of the constant table, the code is considered unverifiable and doesn't load. This is in contrast to, e.g., x86 bytecode where such issues are discovered at execution time. Personally, I'd be OK with us taking a more x86 approach here.
For a naive VM (that doesn't have an internal IR of any sort / do jitting) this means redundant checks on each instruction usage. In my mind, I guess that can be an advantage -- writing a VM that relies on the checks that were done in the verifier requires careful cross referencing of the nature of the verifier checks.
Open to different approaches here -- this is a complex issue and you guys have more depth than I do. But I thought it'd be worth sharing my personal intuition that we should avoid trying to view the verifier as a linter, and potentially even consider where we want to take the x86 approach vs .net/jvm

I buy the argument for being parsimonious with respect to static verification at code ingestion time provided we enforce type, memory, and resource safety somehow at code execution time.  But enforcing safety one way or another is extremely important from my perspective.

This is in contrast to, e.g., x86 bytecode where such issues are discovered at execution time. Personally, I'd be OK with us taking a more x86 approach here.

You are referring to the classic Intel X86 architecture, right?  X86 is untyped (single type of 32 bit integers and a mostly flat memory) and does not do any dynamic enforcement by default.   A useful analogy for the "runtime type safety" approach is JavaScript.  The first Move interpreter did take this approach but we moved away from it.

@shazqadeer @bmaurer @dariorussi @sblackshear @runtian-zhou @tzakian
Thank you for all of your valuable inputs! I think we're at a point that we all agree there is a need to differentiate checks that must be run on-chain from the optional ones that should be run offline. There should definitely be more discussions around this, and I'm proposing we move forward in the following way:

Go ahead and land this PR, and implement checks for other pools (low priority).
Add a boolean argument to VerifiedModule::new, allowing the caller to specify whether to run some optional checks. This is an easy fix that allows functional tests to run all checks while the validators run only the necessary ones.
Continue the discussion and revisit the existing checkers. (MUST they be run on-chain? Other implications like storage?)

Let me know if this sounds good to you!

Dario's approach sounds good to me. It seems important to maintain a clear distinction in the source tree between trusted code (TCB) vs. other checks. The trusted code should be as small and simple as we can possibly make it. If we mix those in the same source file, it will make it harder for us to have confidence in the trusted code.

@dariorussi Sounds good to me. There are no IR-based tests for this checker so we don't have to worry about fixing functional tests immediately. I'll put up another PR to move this to a separate crate.

@dariorussi Sounds good to me. There are no IR-based tests for this checker so we don't have to worry about fixing functional tests immediately. I'll put up another PR to move this to a separate crate.

I would not even worry about the separate crate for now, not even sure we need it. TO me it's more the entry point that should be disjoint. But let's worry about that at a different time.
Thanks @vgao1996

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

@bors-libra r=dariorussi

:pushpin: Commit 56d2ba2 has been approved by dariorussi

:hourglass: Testing commit 56d2ba2fa1cac9d9007e93d7bcd74de99bc00c2d with merge 6f58cbeb23ad3141cc69192d3be5d6bb72a5e4d1...

:sunny: Test successful - checks-circle_commit_workflow
Approved by: dariorussi
Pushing 6f58cbeb23ad3141cc69192d3be5d6bb72a5e4d1 to master...


fix: Remove hjson and rely on json only

Description
Removing the hjson dependency as the JSON files used are simple enough without Loop having to build and maintain the hjson library in the loop3d channel.  Note this is for merging into v3.2 not the current version.
Also note that the current CI/CD tests are failing due to LoopProjectFile having multiple thicknesses but both master and v3.2 branches in map2loop do not have them yet.  Should we pin LoopProjectFile to v0.1.3 until multiple thicknesses are merged or just merge in multiple thicknesses soon?
Also there is a separate linting issue in one of the tests causing linting to fail.

Think it's good now, thanks @RoyThomsonMonash!
@lachlangrose I'll merge this Wednesday morning; merge should also fix the CI issues in the v3.2 branch.
Let me know if any comments until then.

@lachlangrose thanks for reviewing!


Question: Is there a way to call power automate from BotComposer

Hi, I am having a use case to call power automate (cloud) flow from bot composer. Is there any way to directly call power automate (cloud) flows?
Any help would really be appreciated. Thanks in advance.

Power Automate has a limited set of APIs that they make available. You can make HTTP requests in Composer to one of these APIs, if they match your need.

For future reference, please be aware of the following:
The Microsoft Bot Framework team prefers that how to questions be submitted on Stack Overflow. The official Bot Framework Github repo is the preferred platform for information on submitting bug fixes and feature requests.


Add Principles of Management course

I came across this course and it's helping me understand a lot of new concepts. I think this will be helpful for all new managers like me.
I found it would be a nice addition to your list.

Thanks, indeed, the assignments are super useful!


refactor(network): add gossip publisher module

Motivation

Spin-off from https://github.com/ChainSafe/lodestar/pull/5351

Description
Move publish* functions to a "gossip publisher" module that exists separately from the gossipsub implementation. This separation will allow us to serialize gossip objects in the main thread and then send them to the gossipsub implementation in the network thread.

Should the publisher API just be part of the main thread network public API? I wrote some thoughts on how the API of each components should look like

:tada: This PR is included in v1.9.0 :tada:


How to extract cam during training without creating issues to the bakpropagation

Hi,
I'm implementing the following custom function:

def return_cam_from_model(model, target_layer, batch, targets , cam_name = "gradcam"):
model.eval() # da rimettere in .train() se nel training loop

cam = None

if cam_name == "gradcam":
    cam = GradCAM(model=model, target_layers=target_layer, use_cuda=False)

elif cam_name == "scorecam":
    cam = ScoreCAM(model=model, target_layers=target_layer, use_cuda=True)

elif cam_name == "fullcam":
    cam = FullGrad(model=model, target_layers=target_layer, use_cuda=True)

elif cam_name == 'gradcamplspls':
    cam = GradCAMPlusPlus(model=model, target_layers=target_layer, use_cuda=True)

elif cam_name == 'xgradcam':
    cam = XGradCAM(model=model, target_layers=target_layer, use_cuda=True)

elif cam_name == 'eigencam':
    cam = EigenCAM(model=model, target_layers=target_layer, use_cuda=True)

elif cam_name == 'eigengradcam':
    cam = EigenGradCAM(model=model, target_layers=target_layer, use_cuda=True)

elif cam_name == 'layercam':
    cam = LayerCAM(model=model, target_layers=target_layer, use_cuda=True)

elif cam_name == 'fullgrad':
    cam = FullGrad(model=model, target_layers=target_layer, use_cuda=True)

elif cam_name == 'hirescam':
    cam = HiResCAM(model=model, target_layers=target_layer, use_cuda=True)

elif cam_name == 'gradcamelementwise':
    cam = GradCAMElementWise(model=model, target_layers=target_layer, use_cuda=True)

elif cam_name == 'NOXAI':
    return 0

else:
    raise Exception("Cam name", cam_name, "not recognized")

targets = [ClassifierOutputTarget(i) for i in targets]

ret_cam = cam(input_tensor=batch, targets=targets)

model.train()

return ret_cam

we have seen that model.train() before the CAM execution produces a wrong cam explanation, so we inverted their order.
Therefore, because the cam execution is affected by the model training, do you know if inside the cam functions there is something that may affect the model training/backward? And how to deal with it?

I'm trying to get tensors with gradient after the library execution

I'm trying to get tensors with gradient after the library execution

Hi,
What exactly do you mean by that?

I'm trying to get tensors with gradient after the library execution

I also want to do the same thing: obtain the cam matrix in the tensor version. Have you got the result?


Problem with "TEMP_CELSIUS"

The problem
On boot up/restart, I get this error: 2024-06-16 10:30:48.243 WARNING (ImportExecutor_0) [homeassistant.const] TEMP_CELSIUS was used from nest_protect, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please report it to the author of the 'nest_protect' custom integration
What version of this integration (ha-nest-protect) has the issue?
0.4.0b4
What version of Home Assistant Core has the issue?
2024.6.2
Device / Model
topaz 2.7
Diagnostics information
as above.
Home Assistant log
Logs
Copy/paste any log here, between the starting and ending backticks (`)

Additional information
No response

Please update to the latest version (v0.4.0b5).


Export different FieldValue types

Is your feature request related to a problem? Please describe.
Having typescript types that are "loose" enough to be used where they aren't wanted leaves room for error. For example, if I type a firestore field to be an array in my runtime code, I must also allow FieldValue to let FieldValue.arrayUnion work, but that will open it up to FieldValue.increment as well, which defeats the typescript typing.
Describe the solution you'd like
I'd like FieldValue.___ to return the different underlying types instead of returning the same type for all of its static operations, preferably having arrayUnion and arrayRemove to allow for generics to type it even further.
Describe alternatives you've considered
Augmenting the module to allow for it. Augmenting the module isn't possible, since you can't redefine a property to be more specific in typescript. Instead, you would have to cast it to a custom type. Adds a burden to the project for something firestore could handle.

@saiichihashimoto Thanks for the suggestion! This is definitely something we can consider adding with our next breaking change release. How would you separate the different underlying types? I'm guessing a arrayUnion and arrayRemove would have the same underlying type, whereas increment and serverTimestamp would have different types as well.
Could you mock up a sample of how you intend to use this in a ts playground? That would be very helpful.

arrayUnion and arrayRemove could take a generic, something like arrayUnion<T>(args: ...T) => ArrayFieldValue.

I added a quick snippet of what I have to do to accomplish this.


Fixes typo in mariadb's _helpers.tpl for metrics image registry

What this PR does / why we need it: It fixes a typo in metric image registry in the _helpers.tpl template file
Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #5825
Special notes for your reviewer:

It seems a new chart version appears in the meantime, I'm sorry but you need to bump the version again...

/retest

/retest


test(perf): Check for performance regressions in microbenchmarks

We will have more microbenchmarks now. e.g. expr framework and query plan generation (https://github.com/risingwavelabs/risingwave/issues/8031).
We should integrate perf regression detection into CI and decide on a regression testing threshold (e.g. 10%).
To avoid flakey or ineffective tests, we need a way to handle the general case (fixed threshold) and specific case (per-bench threshold when the general case is too strict or loose resp.).
Hopefully, with a framework like criterion, we can reduce the dependence on manually specifying the threshold. But I'm afraid that criterion runs too many iterations and would be slow and expensive.
Note that we should not run anything more than microbenchmark (single-thread, completely in-memory and no IO) regression test in CI. It will likely be flakey.
Bench is run in release mode, of course.
@lmatz @kwannoel

I don't mind not having a threshold first. We can first let the results be integrated into the performance dashboard.
Since the criterion can output in CSV format, integration should be easy.
After running for a while, we learn what the threshold should be, and this is also part of @cyliu0 's current task, i.e. alert when the performance regresses. threshold is hard to be set without a series of data points.

Alerting has been introduced now.


Fix spelling in yaml.rst

The docs build is failing right now because there are a few broken links: https://ruc.noaa.gov/wrf/wrf-chem/ , https://rapidrefresh.noaa.gov/RAPchemEPAsites/ , https://rapidrefresh.noaa.gov/RAPchemEPA/
I imagine it's just temporary so I'll try to rerun that test in a little while.

Thanks @colin-harkins !


Force loading .fnl over .lua

When writing a plugin that ships as compiled lua, you must delete the lua folder during development as Hotpot preferences loading any lua file that matches a requested module over a fnl file - because it assumes lua files are post-processed, compiled and potentially  additionally processed.
 There should be a way to preference loading any fnl files instead.

Global option (enable devmode?)

quite easy, may unintentionally effect third party plugins.
disabling requires updating config

Hook/callback similar to api.make where you're given a modname and can return some "lua then fnl" or "fnl then lua" flag.

api.make pattern matching is very flexible but sort of complicated.
disabling requires updating config
sort of like global option but better.

File located somewhere in tree that if found alters the preference order.

probably slowest, needs to check potentially all the way up to /? only to fnl/?
vim.fs provides a function to do this
may be harder to do with the binary cache as its sort of one level below the path resolution vs a callback which can operate at "modname" level and pass the flag down.
feels like a "classic" solution

colocation via #97 would also by-pass this as it requires always checking fnl files and rebuilding them into lua/

Covered by colocation


Properly handle the location list window closure when it is still in use

Vim crashes when the location list window is closed using an autocmd while
it is still in use. Properly handle this scenario.

Codecov Report

Merging #3928 into master will increase coverage by 0.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #3928      +/-   ##
==========================================
+ Coverage   78.84%   78.86%   +0.01%
==========================================
  Files         105      105
  Lines      142076   142080       +4
==========================================
+ Hits       112024   112053      +29
+ Misses      30052    30027      -25

Impacted Files
Coverage Δ

src/quickfix.c
93.5% <100%> (+0.07%)
:arrow_up:

src/window.c
83.3% <100%> (-0.04%)
:arrow_down:

src/evalfunc.c
88.44% <100%> (ø)
:arrow_up:

src/eval.c
85.13% <100%> (ø)
:arrow_up:

src/screen.c
80.1% <0%> (-0.03%)
:arrow_down:

src/ex_cmds.c
80.23% <0%> (+0.09%)
:arrow_up:

src/sign.c
92.65% <0%> (+0.13%)
:arrow_up:

src/gui_gtk_x11.c
48.57% <0%> (+0.19%)
:arrow_up:

... and 3 more

Continue to review full report at Codecov.

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

Just to confirm that after applying the change, valgrind no longer gives errors when running:
$ valgrind vim --clean -S location-list-segv.vim 2> vg.log


[Question] Moving CM from btrfs to btrfs not possible?

Hello,
First, thanks for your great work! Really appreciated.
I'm trying to move my Container Manager/docker from volume1 (btrfs HDD SHR1) to volume2 (btrfs 2x Nvme SSDs SHR1) but if I select
the corresponding menu entry the following message appears and the script exits:
WARNING Do not move ContainerManager from btrfs volume to btrfs volume!
Is it really not possible to move docker in that way or am I missing something. I searched the issue tab, but did not find anything related. I am graceful for any help.
The full output:
DS918+ DSM 7.2.2-72806

Running from: /volume1/homes/Lennart/SynologyAppMover/Synology_app_mover-4.0.71/syno_app_mover.sh

1) Move
2) Backup
3) Restore
Select the mode: 1
You selected Move

[Installed package list]
 1) /volume1  Active Backup for Business
 2) /volume1  Advanced Media Extensions
 3) /volume1  Antivirus Essential
 4) /volume1  Cloud Sync
 5) /volume1  Container Manager
 6) /volume1  Document Viewer
 7) /volume1  exFAT Access
 8) /volume1  Git
 9) /volume1  Hyper Backup
10) /volume1  MariaDB 10
11) /volume1  Node.js v14
12) /volume1  Node.js v16
13) /volume1  Node.js v18
14) /volume1  Node.js v20
15) /volume1  Perl
16) /volume1  PHP 7.3
17) /volume1  PHP 7.4
18) /volume1  PHP 8.0
19) /volume1  PHP 8.2
20) /volume1  Plex Media Server
21) /volume1  Snapshot Replication
22) /volume1  Storage Analyzer
23) /volume1  SynoCli File Tools
24) /volume1  SynoCli Kernel Tools
25) /volume1  SynoCli Monitor Tools
26) /volume1  SynoKernel USB Serial drivers
27) /volume1  Synology Application Service
28) /volume1  Synology Calendar
29) /volume1  Synology Contacts
30) /volume1  Synology Drive Server
31) /volume1  Synology Mail Server
32) /volume1  Synology Office
33) /volume1  Synology Photos
34) /volume1  Text Editor
35) /volume1  Universal Viewer
36) /volume1  VPN Server
37) /volume1  WebDAV Server
38) /volume1  WireGuard
39) /volume2  Virtual Machine Manager
Select the package to move: 5
You selected Container Manager in /volume1

Destination volume is /volume2

WARNING Do not move ContainerManager from btrfs volume to btrfs volume!```

WARNING Do not move ContainerManager from btrfs volume to btrfs volume!
Someone else reported getting WARNING Do not move ContainerManager from ext4 volume to ext4 volume!
I'll have a look at the script and upload a fixed version shortly.

Thanks a lot! Don't stress, take your time :)

WARNING Do not move ContainerManager from btrfs volume to btrfs volume!
Someone else reported getting WARNING Do not move ContainerManager from ext4 volume to ext4 volume!
I'll have a look at the script and upload a fixed version shortly.

All fixed in v4.0.72
https://github.com/007revad/Synology_app_mover/releases
Is was hard to find the cause which was a non-printable character.


[2.x] Fix mixed compilation to JAR

For the second compilation step of a mixed compilation (Scala then Java, or vice versa), Zinc copies the current output Jar to a temporary jar. All dependencies on this temporary jar must be declared as internal class dependencies. To do so we we cannot use the declared class file (the temporary jar), instead we use the binary class name, which is stored in a binaryNameToClassName map.

If possible, could you add a scripted test for this please?

@eed3si9n the scripted tests are disabled in this wip/sbt-2.x branch because it's Scala 3 only and scripted needs Scala 2.12. But I have 2 scripted tests in https://github.com/sbt/sbt/pull/7592 that would fail without this. Also the java-mixed scripted test in here would fail as soon as we switch the build to sbt 2.
Although I should backport this PR to 1.x and add a scripted test there, but I am not yet sure if it is possible to configure compilation to JAR properly in sbt 1.x.


Certain character combinations break ImageMagick commands that accept text input

Describe the bug
Certain character combinations, such as <t (in the context of a command like &caption <t), will cause the Pango parser to break and esmBot returns an error.
Steps to reproduce
Run any ImageMagick-powered command with a text argument, and use <t (or similar) as the argument
Expected behavior
The text provided is displayed as a caption on the image
Screenshots

Self-hosted instance?
No
Additional context
No response

Interesting - the bot should be filtering those characters accordingly. I looked into this and after running the same command as in the screenshot on both the main bot and my dev instance, and they both seemed to work as intended.

Can't reproduce, closing.


Setup default project structure to create editable host apps and hidden "modules" for linking projects.

Setup default project structure to create editable host apps and hidden "modules" for linking projects.
This project structure should be equivalent to running the following 2 commands in the current tooling:
flutter create -t module my_app
cd my_app
flutter make-host-app-editable
Ensure that when making these changes that anyone who currently have a "module" project gets automatically migrated to this editable structure.  We don't want public support for "make-host-app-editable" at this point in time, so we want to force everyone out of the current "module" project structure.
Rename the hidden directories for clarity:
.android_module
.ios_module
Ensure that hidden directories are marked hidden on windows.

@matthew-carroll  can you give any more details on how this will impact those of us using existing instructions?

At this point this ticket is more of a proposal than anything else.  The specifics have not been finalized.


Well defined sys logging

We need a way to define system logging like Log[j|net]  that is platform independent and does not have idefs in every file that uses it.
This will also centralize the changes for the version of nuttx on master vr the latest upstream used in nuttx next.
Proposed - with todos that need resolution
/****************************************************************************
 *
 *   Copyright (C) 2015 PX4 Development Team. All rights reserved.
 *	 Author: David Sidrane<EMAIL_ADDRESS> *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 * 3. Neither the name PX4 nor the names of its contributors may be
 *    used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 ****************************************************************************/
#ifndef PX4LOG_H_
#define PX4LOG_H_

#include "px4_config.h"

#include <stdint.h>
#include <stddef.h>

//todo:RENAME NO_BLOAT to PX4_CONFIG_NO_LOG_FILE_NAMES
//todo:define px4_panic
#include "px4_panic.h"
#include "px4_macros.h"
//todo:Position px4_macros.h in tree
//todo:Define Notion of DEBUG_BUILD and RELEASE_BUILD

/*
 * This module supports runtime and compile time message filtering.
 *
 * For a message be compiled in the message type has to be >= to
 * then the PX4_LOG_LEVEL_AT_COMPILE_TIME
 * For a message to be output the message type has to be >=
 * then the PX4_LOG_LEVEL_AT_RUN_TIME
 *
 * This module assumes one of two
 * #defines RELEASE_BUILD or DEBUG_BUILD exist
 *
 * Then the PX4_LOG_LEVEL_AT_COMPILE_TIME and PX4_LOG_LEVEL_AT_RUN_TIME are
 * set based on RELEASE_BUILD or DEBUG_BUILD
 * For a release build
 *     PX4_LOG_LEVEL_AT_COMPILE_TIME = PX4_WARN_LEVEL
 *     PX4_LOG_LEVEL_AT_RUN_TIME 		=  PX4_WARN_LEVEL
 * For a debug build:
 *     PX4_LOG_LEVEL_AT_COMPILE_TIME = PX4_LOG_LEVEL
 *     PX4_LOG_LEVEL_AT_RUN_TIME 		 = PX4_LOG_LEVEL
 *
 * The API
 * PX4_LOG(fmt,...)
 * PX4_DEBUG(fmt,...)
 * PX4_WARN(fmt,...)
 * PX4_ERROR(fmt,...)
 * PX4_PANIC(code,fmt,...)
 */

// Debug Levels
#define PX4_LOG_LEVEL       1
#define PX4_DEBUG_LEVEL     2
#define PX4_WARN_LEVEL      3
#define PX4_ERROR_LEVEL     4
#define PX4_PANIC_LEVEL     5

#if !defined(INCLUDE_FILE_INFO_IN_DEBUG) // See px4_macros.h for NO_BLOAT
#define _PX4__FILE_PATH          _FILE_NAME_
#else
#define _PX4_FILE_PATH          NULL
#endif  //

#if defined(DEBUG_BUILD)
#define PX4_LOG_LEVEL_AT_COMPILE_TIME PX4_LOG_LEVEL
#define PX4_LOG_LEVEL_AT_RUN_TIME 		PX4_LOG_LEVEL
#endif

#if defined(RELEASE_BUILD)
#define PX4_LOG_LEVEL_AT_COMPILE_TIME PX4_ERROR_LEVEL
#define PX4_LOG_LEVEL_AT_RUN_TIME 		PX4_ERROR_LEVEL
#endif

#ifdef __cplusplus
extern "C" {
#endif
// Must be provided by platform
extern uint32_t px4_log_level_at_run_time __attribute__ ((weak));
void px4_log_print_(int level, int line, const char *func, const char *file, const char *msg, ...);
void px4_panic_(int code);
#ifdef __cplusplus
}
#endif

// Short Cuts
#define __PX4_LOG_LEVEL_TEST(level) (level >= PX4_LOG_LEVEL_AT_COMPILE_TIME && level >= PX4_LOG_LEVEL_AT_RUN_TIME)

#if defined(PX4_CONFIG_USE_ONLY_PANIC)
#define PX4_LOG(fmt, ...)
#define PX4_DEBUG(fmt, ...)
#define PX4_WARN(fmt, ...)
#define PX4_ERROR(fmt, ...)
#define PX4_PANIC(code,fmt, ...) do {px4_panic_(code);}while(0)
#else
// Macros to use
#define PX4_LOG(fmt, ...)    do { if ( __PX4_LOG_LEVEL_TEST(PX4_LOG_LEVEL)  )  {px4_log_print_(PX4_LOG_LEVEL,__LINE__,__PRETTY_FUNCTION__,_FILE_PATH,fmt, ##__VA_ARGS__);}}while(0)
#define PX4_DEBUG(fmt, ...)  do { if ( __PX4_LOG_LEVEL_TEST(PX4_DEBUG_LEVEL))  {px4_log_print_(PX4_DEBUG_LEVEL,__LINE__,__PRETTY_FUNCTION__,_FILE_PATH,fmt,##__VA_ARGS__);}}while(0)
#define PX4_WARN(fmt, ...)   do { if ( __PX4_LOG_LEVEL_TEST(PX4_WARN_LEVEL) )  {px4_log_print_(PX4_WARN_LEVEL,__LINE__,__PRETTY_FUNCTION__,_FILE_PATH,fmt,##__VA_ARGS__);}}while(0)
#define PX4_ERROR(fmt, ...)  do { if ( __PX4_LOG_LEVEL_TEST(PX4_ERROR_LEVEL) ) {px4_log_print_(PX4_ERROR_LEVEL,__LINE__,__PRETTY_FUNCTION__,_FILE_PATH,fmt,##__VA_ARGS__);}}while(0)
#define PX4_PANIC(code,fmt, ...)  do { if ( __PX4_LOG_LEVEL_TEST(PX4_PANIC_LEVEL) ) {px4_log_print_(PX4_PANIC_LEVEL,__LINE__,__PRETTY_FUNCTION__,_FILE_PATH,fmt,##__VA_ARGS__);} px4_panic_(code);}while(0)
#endif

#endif /* PX4LOG_H_ */

@mcharleb
This is still 1/2 baked, but I want to run it by you to get your requirements and suggestions. We can have a skype call if need be.
David

We also need a PX4_INFO level that is not compile time filtered for output messages such as: list_devices(), dump_counters(), etc whose whole purpose is to provide output.

Closing this as the one from @mcharleb is merged.


remove one extra line in README

checking to see if danger is still failing CI

@mikedotexe fossa is failing CI
cc @chefsale


Support --no-cleanup for odo dev

/kind user-story
User Story
As a user, I want odo dev to not perform cleanup each time Ctrl+C is hit, so that:

I can use the same terminal session to start a microservice application with multiple odo components.
Each execution of odo dev doesn't have to wait to download updates required to start the application

Acceptance Criteria

[ ] odo dev --no-cleanup should disable deletion of resources created by odo dev. Such resources should be deleted when odo delete component/odo delete namespace is executed (same as current beahviour)
[ ] Hitting Ctrl+C when --no-cleanup flag is provided should only stop odo dev process. It should keep the Kubernetes resources like Deployment, Pod, Service Bindings intact.
[ ] After making any changes to source files in the component directory, when odo dev is executed again (with or without --no-cleanup flag), odo should synchronize the code and files with the previously started odo dev --no-cleanup process.

Links

Related Epic (mandatory): N/A

/kind user-story
/area dev

So far, there was no interest in this feature from users.
We can reconsider this once we have a real use-case for it.
/close


Workspace - New user invitation link does not allow entering the new password

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Go to staging.new.expensify.com
Log in with admin expensifail account
Go to Setting - Workspace - Manage members
As the workspace admin invite a new user (that doesn't have a NewDot account)
Log out of the admin account in NewDot
Navigate to the workspace user email inbox and look for an invitation to the Workspace.
Use the link included in the email to validate the account

Expected Result:
User can complete the validation flow with the link in the invitation email. For iOS/Android to the mobile OldDot app to set up the password
Actual Result:
New user invitation link does not allow entering the new password
Workaround:
Unknwon
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android / native
[ ] iOS / native

Version Number: <IP_ADDRESS>
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/3088015
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

https://user-images.githubusercontent.com/93399543/213917689-4067954b-e120-47f2-916e-c6e659738927.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub

Verified the behavior and agree that it's not the current intended behavior, but fixing is moot since we're changing to a passwordless structure.


Field label is cropped in field mapping

Create new field A in AnkiDroid
Delete existing field in both AnkiDroid and MI2A apps from AnkiDroid (f.e. instrument field)
Open field mapping (instrument field is empty)
Set for sound smaller (field below the empty field) field A from the 1 step

Actual Result: Field label is cropped
Expected Result: Field label should be displayed fully

https://user-images.githubusercontent.com/85628357/127340950-23f9b28a-2bb9-4f02-a6b5-29800336a59b.mp4

Tested:

layout issue is not reproduced


setup-crownlabs-vm - optimizations

This PR introduces different optimizations during the configuration of the CrownLabs VMs:

[x] Improves the NoVNC service file for better management with systemctl (e.g. stop, restart).
[x] Configures the vncserver working directory to the user's home (i.e. the terminal starts in ~ instead of /)
[x] Configures the VM to boot in text mode. Indeed, a second graphical session is started by vncserver (i.e. the one used by the final users), while the original one is not seen by anybody. Yet, it increases the RAM usage of an idle VM by almost 200M (350M -> 520M), as well as increases the CPU usage and the boot time.
[x] Disables the ubuntu splash screen. As above, it is never seen by the users but consumes resources during the boot.
[x] Removes the vbox guest additions (if present), since they are useless in KVM (apparently, it saves 20-25 seconds at boot time).

All optimizations are available when configuring a VM with the setup-crownlabs-vm script, while some have been backported to prepare-vm.sh.

This is huge @giorio94 ! Thanks a lot!

This is huge @giorio94 ! Thanks a lot!

Thanks. The only problem is that we have to rebuild the VM images to make them effective.
I was also thinking that we may move NoVNC outside the VM to a container (it would be easier to upgrade in case of necessity). @palexster, @AndreaCossio what is your opinion? I believe that should be easy to do.

This is huge @giorio94 ! Thanks a lot!

Thanks. The only problem is that we have to rebuild the VM images to make them effective.
I was also thinking that we may move NoVNC outside the VM to a container (it would be easier to upgrade in case of necessity). @palexster, @AndreaCossio what is your opinion? I believe that should be easy to do.

I was discussing with @ReddaHawk about that, in order to decouple the life cycle of the vm with NoVNC. I think it should be not too much pain also on the sig-api side (just a new side deployment).


Sign tron raw transaction

I have a raw transaction in hash and I want to sign it
I want to parse it into TransferTRC20Contract object using this line of code
 val trc20Contract = Tron.TransferTRC20Contract.parseFrom(ByteString.copyFrom(rawTransaction.hexStringToByteArray()))
but I getting this error
 com.google.protobuf.InvalidProtocolBufferException$InvalidWireTypeException: Protocol message tag had invalid wire type.
Am i doing it write?
Is it even possible?
What should I do?

we don't support this kind of decoding, please check out java-tron to see if that works


Compare current cross product impl with Kleisli variant

Sebastian Millies described in his blog post Cartesian Products with Kleisli Composition a Kleisli-variant for computing the cross product.
I'm curious how this variant compares to the current implementation. We should measure it (time & memory).

Interesting blog post.


Incorrect flagged demerits value

In the Knuth-Plass article, the parameters used for typesetting Seminumerical Algorithms are given:

the consecutive-hyphens and adjacent-incompatibility demerits were α = γ = 3000

The default value used in this library, 100, isn't mentioned in the article.

Was that value of 3000 specifically tuned to the needs of Seminumerical Algorithms, and 100 is a better general purpose value? Perhaps 100 wasn't mentioned because it is something that would be different on many systems.
Being able to tune this parameter might help with bad line breaking (or Breaking Bad lines!) I'm seeing with the Perl implementation PhilterPaper/Text-KnuthPlass.

I see, after having taken a dive into the typeset code, that the hyphenation penalty/demerit defaults to 100, and adjacent-incompatibility (excessive fitness change line-to-line) demerit to 3000. I didn't see anything about the two normally being the same value (3000), but then I should probably read Knuth's book of annotated TeX code and see if I can find anything.  I would think that you'd normally want to penalize line-ending hyphens a lot less than great changes in line tightness, so maybe that's a typo in the article, or something that was later changed (ease the hyphenation penalty)?

@PhilterPaper Plain TeX sets \hyphenpenalty=50 and \adjdemerits=10000 (note that demerits are calculated using the square of the penalty). So "visually incompatible" consecutive lines are penalized four times as much as hyphens. (You'll find this in The TeXbook, as these parameters are set by the macro package / plain.tex, and not in the source code of TeX itself.)

In typeset (also Text::KnuthPlass Perl port), there are three demerit values used: demerits.fitness (default 3000), demerits.flagged (default 100), and demerits.line (default 10). Which of these is α, β, and γ in the original question? From the original question, is "flagged" α? demerits.line is used in calculating fitness when ratio is between -1 and tolerance. demerits.flagged seems to be associated with hyphenated words at line-end. demerits.fitness is added in if the tightness changes by more than one step (class). Do these uses seem to be in accordance with TeX?
In the Text::KnuthPlass tolerance defaults to 30, which seems way too high. Maybe I'll reset it to 2, which is the default in typeset. Otherwise, I think the code is using these settings in the same manner as typeset, although I'm not absolutely sure if the hyphenation penalty is 50 or 100 (I need to dig deeper). The Big Question is then: was typeset written correctly (algorithm matching TeX) in the first place? And do the default settings for demerits, etc. match up with recommended TeX usage?


fix: Use listr-update-renderer from npm

Closes #533

Sorry for the late response on this one @okonet. Merged your PR and released it https://github.com/SamVerschueren/listr-update-renderer/pull/9. Had quite a lot on my mind in the last months so not much time for OSS stuff.

I just hope that you’re alright and things are better now. Take care and thanks for all your work!

Nice work @okonet, the issues I was having with lint-staged install is now fixed 🙌


Use AshPhoenix.Form.submit/2 instead of calling context functions

It is to follow what AshPhoenix.Form is showing in its documentation. Also it is closer to a real scenario where there are some form validations.
Contributor checklist

[ ] Bug fixes include regression tests
[ ] Features include unit/acceptance tests

🚀 Thank you for your contribution! 🚀


Wrong line height with prism-coy.css theme in Microsoft Edge

The coy theme doesn't have the right line height when rendered with Microsoft Edge 44.17763.1.0 (Microsoft EdgeHTML 18.17763) and the alternating blue and white background doesn't fit to text rows.
This bug doesn't occur in Forefox or Chrome.

The reason is the missing unit of the line-height in "code[class*="language-"], pre[class*="language-"]" in line 17 of prism-coy.css. If changed from "line-height: 1.5;" to "line-height: 1.5em;" the Edge browser works fine.

Can you provide an online reproducible example?

see helloworld_coy.html in the zip archive helloworld_coy.zip, please open with Edge.

Seems like Edge doesn't calculate line-height correctly.
But isn't the real question why the Coy theme works on the prismjs.com website?
Answer: The indirect font-size: 100% saves Edge.


Run script or command issue

It says
A list of executable scripts or shell commands to run, relative to the root
of the project, each separated with a new line, e.g. script/tests.sh or make.
This step will pass only if all the commands return an exit status of zero.

Unfortunately if I put two commands, the first returning non-zero and the second returning zero, BuildKite thinks it succeeded.
Moved as per https://github.com/buildkite/feedback/issues/136#issuecomment-166466812

As far as I can see the issue is fixed for me. I'll double check builds for a while just in case though. Thanks!


chore: update to swc v1.3.36

The --config flag was renamed to --config-json, so plugin support will only work with versions >= 1.3.36 going forward.
@realtimetodie It looks like module path handling may have been broken by swc-project/swc#6930, do you understand what is going on here?
Executing tests from //examples/paths:test_test
-----------------------------------------------------------------------------
5c5
< const _moduleA = require("../../../../../home/codespace/.cache/bazel/_bazel_codespace/8740319a112a77c7681d8f1244e5cd69/sandbox/linux-sandbox/11/execroot/aspect_rules_swc/examples/paths/src/modules/moduleA");
---
> const _moduleA = require("./modules/moduleA");
FAIL: files "examples/paths/src/index.js" and "examples/paths/expected.js" differ.

@//examples/paths:expected.js is out of date. To update this file, run:

    bazel run //examples/paths:test

As far as I remember, I was able to run the tests after I changed the baseUrl property in the .swcrc configuration file
https://github.com/aspect-build/rules_swc/blob/ec1228a537058507277a3682813a40cec870be82/examples/paths/.swcrc#L7
I think this needs to be set to .. Please try this out and let me know if this helps.

Unfortunately that didn't work.

{
  "jsc": {
    "parser": {
      "syntax": "typescript"
    },
    "target": "es2021",
    "baseUrl": "./src",
    "paths": {
      "@modules/*": ["./modules/*"]
    }
  },
  "module": {
    "type": "commonjs"
  },
  "sourceMaps": true
}

And then you need to fix the test, the module resolution was changed
$ bazel run //examples/paths:test

Thanks, @realtimetodie, that worked!
@gregmagolan @alexeagle This is ready for review.

//examples/paths:check_paths is still failing?

The change to the examples/paths/.swcrc also needs to be applied in examples/paths/tsconfig.json since we have an assertion that they have the same semantics. Fortunately TypeScript is okay with the change to the baseUrl.
I pushed a commit.


IDVA6-1620 - Add User content

Link to Jira:
https://companieshouse.atlassian.net/browse/IDVA6-1620
Changes:

Updated language files to reflect new design content
Added new indented list content in page template
Added unit tests for updated content

CI: No security warnings found


Is there any rules when use MXNET_CUDNN_AUTOTUNE_DEFAULT ?

some times when I don't set MXNET_CUDNN_AUTOTUNE_DEFAULT=0
It will train , but when compute the Training set's Accuracy ,it may give error like this
[10:25:56] mxnet/dmlc-core/include/dmlc/./logging.h:300:
[10:25:56] src/operator/./cudnn_convolution-inl.h:517: Check failed: cudnnFindConvolutionForwardAlgorithm(s->dnn_handle_, in_desc_, filter_desc_, conv_desc_, out_desc_, kMaxAlgos, &nalgo, fwd_algo) == CUDNN_STATUS_SUCCESS (2 vs. 0)
when I set the iteration times smaller ( from 3k to 500) , error was gone
It's there any unstable factor in   MXNET_CUDNN_AUTOTUNE_DEFAULT ?
just like buckets length is too long?

@ap-hynninen

thanks ,  if the traingset is too large,  computing the Training set's Accuracy will malloc new gpu memory , decrease the buckets length will solve this problem

This issue is closed due to lack of activity in the last 90 days. Feel free to ping me to reopen if this is still an active issue. Thanks!


Add support for GAME function and providing gaming inputs at runtime

A number of developers have requested support in SDEverywhere for Vensim's GAME function and for game mode in general (see Vensim docs here and in their user guide here.
Currently SDEverywhere accepts models that use the GAME function, but it simply returns the input value.  Adding proper support for the GAME function will entail changes to the compile and runtime packages.  I also plan on adding a simple example app that demonstrates how to use the new API that will allow for providing game inputs at runtime.

Here's a quick status report.  Most of the work on supporting "gaming mode" in SDEverywhere has been in adding the ability for an application to override lookups/data at runtime, and to make that happen there have been a series of improvements made in branches under separate issue numbers.
Completed

#471: Refactored the runtime packages to allocate buffers on demand.  This was a prerequisite for adding JS code gen and dynamic lookups.
#437 and #479: Implemented support for JS code gen.  This was already mostly complete and had been sitting on a branch.  Getting this merged first made it much easier to prototype the new support for dynamic lookups and gaming inputs.

In progress

#472: Added support for overriding data variables and lookups at runtime.  This was about 80% of what's needed to handle gaming inputs that are supplied at runtime.  I will merge this branch today.
#489: Added a new house-game example app, based on the house construction model from the Vensim user guide.  This is mostly complete as well and can be merged before I finish work on this issue (see next item).

Completing soon

#483 (this issue): Once I've merged the branches for the issues listed above, I will be finishing up the last ~20% of gaming support, which should be straightforward.  This entails changing the compiler to transform GAME function calls to read from a Lookup instance, which contains the gaming inputs (basically a lookup table) that the application sets at runtime.  Once the compiler changes are complete, I will update the house-game example to show how it all fits together.

Now that support for the GAME function is implemented in SDEverywhere, it is now possible to implement turn-based games and simulations in your SDEverywhere-based project.  See examples/house-game in this repo for a working example.


[1.18.x] Update Grafana image version to 7.5.15 (#1141)

cherry-pick: https://github.com/kiegroup/kogito-operator/pull/1141
Many thanks for submitting your Pull Request :heart:!
Please make sure your PR meets the following requirements:

[ ] You have read the contributors' guide
[ ] Pull Request title is properly formatted: [KOGITO-XYZ] Subject
[ ] Pull Request contains a link to the JIRA issue
[ ] Pull Request contains a description of the issue
[ ] Pull Request does not include fixes for issues other than the main ticket
[ ] Your feature/bug fix has a unit test that verifies it
[ ] You've ran make before-pr and everything is working accordingly
[ ] You've tested the new feature/bug fix in an actual OpenShift cluster
[ ] You've added a RELEASE_NOTES.md entry regarding this change

How to retest this PR or trigger a specific build:

Run operator BDD testing
Please add comment: /jenkins test

Run RHPAM operator BDD testing
Please add comment: /jenkins RHPAM test

/jenkins test

/jenkins test

PR job #576 was: UNSTABLE
Possible explanation: This should be test failures
You can find test error logs here: https://jenkins-kogito-tools.kogito-cluster-0ad6762cc85bcef5745bb684498c2436-0000.us-south.containers.appdomain.cloud/job/kogito/job/kogito-operator-PR-check/576//artifact/test/logs/error/
Test results:

PASSED: 8
FAILED: 2

Those are the test failures:

Deploy source files (dmn, drl, bpmn, bpmn2, ...) with CLI.Deploy .dmn source files with CLI using runtime springboot
Step Build "dmn-springboot-example" is complete after 5 minutes

Deploy source files (dmn, drl, bpmn, bpmn2, ...) with CLI.Deploy source files in folder with CLI
Step Build "process-timer-quarkus" is complete after 5 minutes

Please look here: https://jenkins-kogito-tools.kogito-cluster-0ad6762cc85bcef5745bb684498c2436-0000.us-south.containers.appdomain.cloud/job/kogito/job/kogito-operator-PR-check/576/display/redirect

PR job #575 was: UNSTABLE
Possible explanation: This should be test failures
You can find test error logs here: https://jenkins-kogito-tools.kogito-cluster-0ad6762cc85bcef5745bb684498c2436-0000.us-south.containers.appdomain.cloud/job/kogito/job/kogito-operator-PR-check/575//artifact/test/logs/error/
Please look here: https://jenkins-kogito-tools.kogito-cluster-0ad6762cc85bcef5745bb684498c2436-0000.us-south.containers.appdomain.cloud/job/kogito/job/kogito-operator-PR-check/575/display/redirect or see console log:

Console Logs
                                 FAIL	github.com/kiegroup/kogito-operator/test	2121.785sFAILTests finished with code 1-------- Pruning namespacesI0302 11:53:41.617128   64106 request.go:655] Throttling request took 1.020416711s, request: GET:https://<IP_ADDRESS>:443/apis/security.openshift.io/v1?timeout=32s{"level":"info","T":"2022-03-02T11:53:43.185Z","logger":"kogito-operator-system","msg":"Deleting namespace","namespace":"kogito-operator-system"}{"level":"error","T":"2022-03-02T11:53:43.208Z","logger":"kubernetes_client","msg":"Failed to delete resource.","name":"kogito-operator-system","error":"namespaces \"kogito-operator-system\" not found"}{"level":"error","T":"2022-03-02T11:53:43.208Z","logger":"main","msg":"Error in deleting namespace","error":"Cannot delete namespace kogito-operator-system: namespaces \"kogito-operator-system\" not found"}Pruning namespaces done./home/jenkins/agent/workspace/kogito/kogito-operator-PR-check/test-------- Delete stucked namespacesProjects deleted:-------- Clean Cluster operators--- Clean subscriptions in openshift-operatorsNo resources found in openshift-operators namespace.--- Clean clusterserviceversions in openshift-operatorsNo resources found in openshift-operators namespace.--- Clean subscriptions in operatorsNo resources found in operators namespace.--- Clean clusterserviceversions in operatorsNo resources found in operators namespace.--------


Unified ovsdpdk configuration task

Signed-off-by: Maciej Skrocki<EMAIL_ADDRESS>

This seems fine.


Smart Charging - Optimizer cannot handle arrivals of the previous day

If a car plugs at 23:45., the optimizer will get a negative value for timeStampArrival after midnight.
It is not capable of handling this.
@LucasBrazi06 How should we handle this? Setting the value back to 0?
Or should I ask Oliver for a solution proposal?

If a car plugs at 23:45., the optimizer will get a negative value for timeStampArrival after midnight.
It is not capable of handling this.
@LucasBrazi06 How should we handle this? Setting the value back to 0?
Or should I ask Oliver for a solution proposal?

Ask Oliver if he can improve this and let's see what he will propose.


Suggestions

So I used it, and have some suggestions to improve it.
1: instead of keeping the database in ./xkcd_dict.json, it should be in a dotfile (~/.xkcd_dict.json) to hide it in the home directory so it doesn't clutter it up and is in a consistent place. I believe python's method for that is os.getenv('$HOME') or something. Also make it always look there (~/.xkcd_dict.json) so it can be run from anywhere.
2: add an option/config file where you can specify a save-directory, and if no directory is specified, save to the current directory. This is the functionality I expected, so I was thrown off when it saved to ~/xkcd_archive.
3: I like the tooltip comments on the site (when you hover over the image). It would be nice to have the downloader grab that as well.
If I get the time, I might try to add those in myself and do a PR. But I'm leaving this "issue" here in hopes that you can beat me to the punch.

Thanks a lot for your time. Will fix these issues as soon as possible. :+1:

I have attempted to solve requests 1 and 2 (partially, images are downloaded to working dir) in my pull request #9.

Now that #9 has been merged most of the changes requested in sections 1 and 2 are implemented.
I'm not up for tackling section 3 or the parameter change in section 2, that'll have to be up to either @prodicus or @bradenbest.

Update: Both 1 and 2 were added by @Kickball in pull request #9

Enhancement 3 can be obtained by merely adding this to line 106:
img_tooltip = img_tag.get('title')
however writing that information to the json file will prove harder.

Are you referring to the special character's issue when writing to the file @Kickball ?

@Kickball I don't see why you can't just write it to a text file called title.txt. In fact, I'll get on that

So I found the linkaround 106, and changed a little bit:
                    for data in image_page_content_soup.find_all("div", {"id": "comic"}):
                        for img_tag in data.find_all('img'):
                            img_link = img_tag.get('src')
                            img_tooltip = img_tag.get('title')
                            # here

                    complete_img_url = "http:{url}".format(url=img_link)
                    img_tooltip_file_name = "{current_directory}/xkcd_archive/{name}/title.txt".format(current_directory=WORKING_DIRECTORY, name=xkcd_number)
                    # here

                    file_name = "{description}.jpg".format(description=new_description)
                    urllib.request.urlretrieve(complete_img_url, file_name)
                    write_tooltip(img_tooltip, img_tooltip_file_name)
                    # here

And added the write_tooltip function:
def write_tooltip(tooltip, file_name):
    f = open(file_name, "w")
    f.write("hello world")#tooltip.get_text())
    print("Debug: I should be writing \"%s\" to file '%s'" % ("Hello world", file_name))
    f.close()

Well, that's what it looked like just before I found out why it wasn't writing the file. Yeah, turns out the function isn't even being called. Even though I thought I was editing the function that downloads an xkcd page and saves it to its directory.
Nope, turns out it's a function that downloads an xkcd page, out of like 3 or 4 other ones.
I was gonna let the 80-line function slide and just say you needed to refactor your code some, but this is ridiculous. This is a classic case of data duplication. Why isn't the downloading abstracted to a single function that takes an argument (the "xkcd_number"), and downloads it? Then you can use that with all of the other xkcd-downloading functions. For example, download_all() loops through all the xkcd_numbers it knows about and calls download_page() with each of them, whereas download_latest() does whatever it does and calls download_page() for each result, and the one that acts on --download=<number> just calls download_page() with the user's input.
Your code needs some cleanup. And I don't even need proof, because the proof is in the code comments: their existence proves that the code is messy.
I'm gonna post that as a separate issue, and when that issue is resolved, I'll make another attempt at implementing enhancement 3

And just to be absolutely clear, what, in particular, I am expecting with enhancement 3 is that when you download an image, in addition to <description>.png and description.txt, there should be a file title.txt, that contains the title text of an image, e.g. for #1000, the contents of title.txt should be Thank you for making me feel less alone.

@bradenbest Title text download is now possible and is covered by https://github.com/prodicus/xkcd-dl/commit/f2bdb4870ac3e2d7198588c19217ff2c6e68b903
The hover text is saved in the description.txt file. I personally don't like having too many files.

Good work @BlitzKraft :+1:

@prodicus Everything in this issue has been addressed. Please close this.

PR https://github.com/prodicus/xkcd-dl/pull/23 and the previous PR's implement all the above suggestions.
However if anything is missed, feel free to comment on this issue and I will open it again


rich text editor for hugo

I'm thinking about developing a rich text editor for Hugo, It made Hugo more mature with a unique feature which allows people to write their thoughts easier and simpler.
Features:

Markdown/Wysiwyg Editor with live preview
Autosave posts
Draft
Github Integration

Is there any objective for this idea in Hugo roadmap?

Maybe open a topic in the discussion forum, as this is not realy an Hugo issue...

No problem, Thanks.


local provider and csrf request before login

Ask your question
Hey I'm trying to have a csrf get request run before the login route request. This https://sidebase.io/nuxt-auth/v0.6/getting-started#local-remarks indicates that this is still a WIP and does not support the csrf endpoint option mentioned here https://auth.nuxtjs.org/schemes/cookie/ yet.
Additional information
No response

Yes, this is exactly right! You'll need to implement CSRF for local yourself as it will be out of scope for the localprovider initially. Reason for this is that we want to keep the local provider compatible with fully static apps, for CSRF you need a server-side.
In the future we may add optional server-side capabilities to static providers that are opt-in, but it is not planned for now.
If you absolutely need CSRF and don't want to implement it yourself you can go with the authjs provider and then in the NuxtAuthHandler use the credential provider.
Hope that helps, have a good sunday 🌤

@BracketJohn I don't quite understand why this is out of scope for the local provider. Fetching a CSRF token before doing the login-request and setting a header for the login-request would be just as possible in a fully static app, or am I missing something?
I don't currently see how I can set a header for the login-request. This means, I am not even sure how I can implement the CSRF myself with the current implementation.

I second @Buffalom 's question. I am trying to set the csrf header.. no clue how.

My usecase was for laravel sanctum and I followed this great medium article by @manchenkoff.
It works perfectly for my usecase where I needed all api requests to be authenticated after auth.


Add integration tests

Also, reorganized the test directory to contain unit and integration
directories.  This is something Nathan and I did in the document
conversion repo.  Would be nice to follow this convention for all repos.

@germanattanasio - not sure why the integration tests fails here with username/password issue.  I did do a test build and it worked fine for me.

@germanattanasio - Another question is how do we publish the code coverage stats on the README page?

I see for visual recognition repo they are there.

Let me see

@Mikemosca you forgot to add casperjs to the dependencies in the package.json
npm install casperjs --save-dev


Need to check how much memory my hash table has taken after inserting 1 million key values

Here is the code.
https://github.com/attractivechaos/klib/blob/master/khash.h
What I want: I am entering n unique entry in this table. and after inserting key and value i want to check how much space this hastable is consuming.
Issue: Example after entering 1000 entry. When i try to get the size of hastable using kh_size(h) function given in "khash.h" I am getting 387 entry only. But when i am trying get the value by giving the key I am able to get.
Here is my code:  PFA.
`#include <stdio.h>
#include <stdlib.h>
#include "khash.h"
#include "string.h"
#define kh_get_val(kname, hash, key, defVal) ({k=kh_get(kname, hash, key);(k!=kh_end(hash)?kh_val(hash,k):defVal);})
#define kh_set(kname, hash, key, val) ({int ret; k = kh_put(kname, hash,key,&ret); kh_value(hash,k) = val; ret;})
const int khIntInt = 33;
KHASH_MAP_INIT_INT(khIntInt, long long) // setup khash to handle string key with int payload
//KHASH_MAP_INIT_STR(khStrInt, long long) // setup khash to handle string key with int payload
int int_key_int_body_example(char * filename)
{
printf("\n\nBegin khash test string key with int payload\n");
int ret, is_missing;
khiter_t k;
char *tval;
khash_t(khIntInt) *h = kh_init(khIntInt); // create a hashtable
printf("\n --------------------------------- FILE READ AND WRITE OPERTAION -------------------\n");
    FILE *fp;
	int * ch;
	char line[200];
	fp=fopen(filename,"r");
	if(!fp)
	{
            perror("could not find the file");
            exit(0);
	}

printf("\n ------------------------------------------------- PUTTING ALL KEYS ---------------------\n");

int count=0;
long long val_line=0;
    while (fgets ( line, 200, fp ) != NULL ) {

    printf(" Trying to Add key = %s and value = %s count =%lu \n", line,line,count++);
    val_line = strtoll(line, NULL, 0);
    printf("\n int_key_int_body: Here is the value in integer After Atoi = %ld \n",val_line);
    kh_set(khIntInt, h, val_line, val_line);
    printf(" ### DEBUG: h->n_buckets=%d,h->size=%d,h->n_occupied=%d,h->upper_bound=%d \n ",h->n_buckets,h->size,h->n_occupied,h->upper_bound);
    }
           fseek(fp, 0, SEEK_SET);
           printf("\n ------------------------------------------------- GETTING ALL VALUES ---------------------\n");
           count=0;
          while (fgets ( line, 200, fp ) != NULL ) {
                 val_line = strtoll(line, NULL, 0);
                 printf("\n int_key_int_body: Here is the value in integer After Atoi = %ld \n",val_line);
                 k=kh_get(khIntInt, h, val_line);
                if (k == kh_end(h)) {
                     printf("no key found for line=%ld",val_line);
                } else {
                    printf("GET value for  key = %s and value = %d count =%lu and k_iterator=%d \n",
                    line,kh_val(h,k),count++,k);
              }
           }
          printf("\n ------------------------------------------------- ---------------------\n");
          kh_destroy(khIntInt, h);
          return 0;
 }
   int main( int argc, char *argv[] )
  {
      char *filename;
      filename=argv[1];
      printf("\n filename=%s",filename);
      int_key_int_body_example(filename);
 }`

Call n=kh_n_buckets(hash_tab). The total memory is n*(sizeof(key_type)+sizeof(value_type)+0.25).

Thanks for reply. Here is some query.

n=kh_n_buckets(hash_tab ) =>> It gives number of bucket. right.
so if  I am using
KHASH_MAP_INIT_INT64(khIntInt, long long)

so total memory = n * (sizeof(long long)+sizeof(long long)+0.25) bytes  ==>> correct ??

kh_size(h) : why it is giving less number of elements ?  In my case for for 1000 entry it is giving 387.


[BUG] selfbuilt datadog agent 7.57.2 segfaults on disk check

Agent Environment
# agent version
Agent 7.57.2 - Commit: 38ba0c7 - Serialization version: v5.0.130 - Go version: go1.23.2

Describe what happened:
agent disk check
# agent check disk
SIGSEGV: segmentation violation
PC=0x777bb940e736 m=15 sigcode=1 addr=0x0
signal arrived during cgo execution

go-traceback.txt
Describe what you expected:
successful
Steps to reproduce the issue:
Just run agent disk check from a self-built agent.... note 7.56.2 works fine.
Additional environment details (Operating System, Cloud provider, etc):
Docker container on Ubuntu linux.

Oh, i think that masive traceback is trying to say

85    futex(0xc000180848, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
80    <... newfstatat resumed>0xc00111b898, 0) = -1 ENOENT (No such file or directory)
80    newfstatat(AT_FDCWD, "/sbin/blkid", 0xc00111b968, 0) = -1 ENOENT (No such file or directory)
80    newfstatat(AT_FDCWD, "/bin/blkid",  <unfinished ...>
79    <... tgkill resumed>)             = 0
80    <... newfstatat resumed>0xc00111ba38, 0) = -1 ENOENT (No such file or directory)
79    nanosleep({tv_sec=0, tv_nsec=20000},  <unfinished ...>

that blkid is not available. A better captured error message would be nice here.

Hi @xnox,
It's hard to tell from the attached log as to the root issue but it definitely seems (as you found) it's somewhere in Python checks executions. Due to the fact that Python is loaded through C APIs by Go, the error messages can get lost between the two runtimes without the right flags and tooling.
If your strace output is accurate, you have already found the problem with your build and you can find the relevant code here. If you're interested in deeper C-level debugging, I'd recommend using the gdb troubleshooting steps. It is a bit unexpected that you're not getting the Python error output from the try/catch though but there's not enough info in the bug report to indicate why and/or if this is connected somehow to how you're building the Agent.

Hi @xnox, thank you for opening the issue. This problem was resolved in versions 7.58.1, 7.59.0. Please feel free to re-open this bug if you have further issues.


Initial Introduce Redis Requirement

Description
Create initial POC to introduce Redis queue (BullMQ) to project to handle events asynchronously. Ability to get context for mikroORM in queue processors.
Note: No change to basic handling of controller has been done yet (only emitting the other event).

#324


fixing startcmd command

Context
support env var spaces
Choices
This ensures that the entire command string is correctly interpreted as a single argument to bash.
Test instructions
local docker compose
Checklist before requesting a review

[x] I have performed a self-review of my code
[x] I've added documentation about this change to the README.
[x] I've not introduced breaking changes.
^for real this time

sorry need to fix conflicts from revert. i'll make a fresh branch


TS StringLiteralMutator should not mutate JSX attribute's strings

The StringLiteralMutator in the stryker-typescript package should not mutate strings in a JSX attribute.
The code <Record class="row" /> creates one mutant right now: <Record class="" />.
We can probably prevent this from happening by changing the check on parent nodes to:
  private isInvalidParentNode(node: ts.Node): boolean {
    return node.kind === ts.SyntaxKind.ImportDeclaration ||
      node.kind === ts.SyntaxKind.LastTypeNode ||
      node.kind === ts.SyntaxKind.JsxAttribute;
  }

This is the same check on JsxAttributes that is used in the stryker-javascript-mutator

You're pretty harsh classifying it as a bug ;)

You're right! You could also see this as a feature. To me it is a bug because we have behaviour that we did not intend and if we had come across this feature/bug during the development of the TypeScript mutator, we would probably have decided not to mutate the JSX elements like we do now.


Opening a new terminal causes text input to be in the wrong place

Issue Type: Bug

Open VS Code
Open new terminal
It has scrolled far enough down to hide the "Windows Powershell - All rights reserved" message
Text input starts randomly offset from the left
Not obvious that the terminal has opened yet

This issue has been present for at least a few months (not sure of exact versions).

VS Code version: Code 1.33.1 (51b0b28134d51361cf996d2f0a1c698247aeabd8, 2019-04-11T08:27:14.102Z)
OS version: Windows_NT x64 10.0.17763

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz (8 x 4008)

GPU Status
2d_canvas: enabledchecker_imaging: disabled_offflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: disabled_softwarerasterization: enabledsurface_synchronization: enabled_onvideo_decode: enabledwebgl: enabledwebgl2: enabled

Memory (System)
31.88GB (20.22GB free)

Process Argv

Screen Reader
no

VM
0%

Extensions (17)

Extension
Author (truncated)
Version

Bookmarks
ale
10.4.3

npm-intellisense
chr
1.3.0

path-intellisense
chr
1.4.2

bracket-pair-colorizer
Coe
1.0.61

vscode-eslint
dba
1.8.2

prettier-vscode
esb
1.9.0

auto-close-tag
for
0.5.6

auto-complete-tag
for
0.1.0

auto-rename-tag
for
0.0.15

vetur
oct
0.20.0

vue-vscode-extensionpack
sdr
0.2.0

vue-vscode-snippets
sdr
1.6.0

vscode-status-bar-format-toggle
tom
1.5.0

highlight-matching-tag
vin
0.9.1

vuetify-vscode
vue
0.2.0

vscode-jumpy
wma
0.3.1

JavaScriptSnippets
xab
1.7.2

(1 theme extensions excluded)

I am having the exact same symptoms. Also using Windows 10 build 17763

I've seen this in Windows 8.1 as well as 10

This is a bug in Windows 10 1809, unfortunately we have no way to work around the issue so you will need to wait until you get the next version of Windows 10 (1903).
/duplicate https://github.com/Microsoft/vscode/issues/57803

We need to wait for Windows 10 updates to stop VS Code's terminal scrolling too far? I thought the terminal was implemented in JS? 👎

@lloydjatkinson most of it is, the backend that talks to the conhost window is C++ and something in Windows that it relied upon broke in 1809.


Call JDAActor#checkInGuild only if this is required.

I don't know if this is intended, but we cannot interact with bot in private messages, because JDAHandler registers condition that always calls JDAActor#checkinGuild(ExecutableCommand)
Also @GuildOnly annotation stays unused anywhere in jda module, so I decided to check if command has @GuildOnly annotation, and after that call JDAActor#checkinGuild(ExecutableCommand) rather that blindly calling this method.
Have a nice day!

Good catch! Thanks.


How to set  autoscale target by sdk

/kind bug
This is the example of custom autoscale for yaml
apiVersion: "serving.kubeflow.org/v1alpha2"
kind: "InferenceService"
metadata:
  name: "flowers-sample"
  annotations:
    autoscaling.knative.dev/target: "10"
spec:
  default:
    predictor:
      tensorflow:
        storageUri: "gs://kfserving-samples/models/tensorflow/flowers"

I cannot find the method to config this target by sdk.  How to config it by sdk?

/kind bug
This is the example of custom autoscale for yaml
apiVersion: "serving.kubeflow.org/v1alpha2"
kind: "InferenceService"
metadata:
  name: "flowers-sample"
  annotations:
    autoscaling.knative.dev/target: "10"
spec:
  default:
    predictor:
      tensorflow:
        storageUri: "gs://kfserving-samples/models/tensorflow/flowers"

I cannot find the method to config this target by sdk. How to config it by sdk?

Add annotation at metadata field.
isvc = V1alpha2InferenceService(api_version=api_version,
                          kind=constants.KFSERVING_KIND,
                          metadata=client.V1ObjectMeta(
                              name='flower-sample', namespace=namespace),
                          spec=V1alpha2InferenceServiceSpec(default=default_endpoint_spec))

\close


#974 Twistlock Cronjob

Description
The original plan was a twistlock cronjob to stop the slowdown twistlock brings to our pipeline and release processes.
That noted, we can implement this in parallel as well: so the focus of this PR is that the new action and script work as expected.
On the ticket it says,
"The idea here is that very few dependencies are added and approved in a day. At most, vulnerabilities will be detected in less than 24 hours."
But I focused more on the "Perform nightly Twistlock scanning of master as well as the 5? most recently commit branches to ensure in-progress work is being checked when able."
Really the goal is closer to the former statement, just to make sure that twistlock is no longer a blocker in case the ec2 is down or something weird.  All we need is every image that is built to be scanned with twistlock.
So, I want to close this ticket on the premise that the goal is complete; and in future cases where twistlock is failing, I would like to be the one who our team reaches out to fix it so I can automate that fix with an action that automatically restarts twistlock, something like that; and a second action for a twistlock action that allows the user to input a container tag in ECR, and that image will specifically be scanned (because it was missed due to an ec2 issue).
issue# 974
Type of change

[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[x] This change requires a documentation update - must add to our deployment process to check latest twistlock cronjob

How Has This Been Tested?
As a DevOps PR, this implements non-breaking changes into our pipeline that can be verified by:

[ ] Successful dev_deploy.yml run in the dev environment with the adjusted action

Checklist

[x] My changes generate no new warnings
[x] New and existing unit tests pass locally with my changes

@ldraney that 252 error is a twistlock error, it's invalid JSON. Error parsing parameter '--parameters': Invalid JSON: Expecting value: line 3 column 7 (char 41) It doesn't like the stuff after your first square bracket.


how to configure the plugin to apply on a specific directory of classes?

Hi,
I want to know if there is a way to configure input directory for the retrolambda plugin. It seems to me its not configurable since I can't see any info about it on the home page.
To elaborate, please take a look at the retrolambda maven plugin [here] (https://github.com/orfjackal/retrolambda) where you see an option 'retrolambda.inputDir' available for doing so.

I had this exact same issue (I wanted to use libraries which are compiled with Java 8) and I have solved this by making the retrolambda tasks depend on a custom task which extracted the required classes into the javaCompile output directory (build/retrolambda/$variant) so retrolambda will also transform the library classes and this worked beautifully.
// I have the java 8 dependencies as 'provided' scope, so the dex compiler will
// not complain about them. This task occurs before retrolambda and extracts
// them into the retrolambda's input directory.
task beforeRetrolambda << {
    copy {
        // Copy all the classes in debug config
        configurations.provided.asFileTree.each {
            from(zipTree(it))
        }
        into 'build/retrolambda/debug/'
        include '**/*.class'
    }

    copy {
        // Copy all the classes in release config
        configurations.provided.asFileTree.each {
            from(zipTree(it))
        }
        into 'build/retrolambda/release/'
        include '**/*.class'
    }
}

// Hook them to retrolambda, so you get transformed classes for the libraries.
afterEvaluate {
    compileRetrolambdaDebug.dependsOn beforeRetrolambda
    compileRetrolambdaRelease.dependsOn beforeRetrolambda
}

Retrolambda now assumes that all these classes are from your android application module, and includes them in dex file and the apk. This is how it worked for me.


Update ipass-smartconnect-provisioning-tutorial.md

Link 'https://www.ipass.com/buy-ipass/' points to a page that doesn't exist. Check the path or URL and update the link.

#sign-off

#sign-off

#reassign:thomasakelo

#sign-off


Enh(grouping): BREAKING change aggregation options and improve custom…

… aggregation support
Add gridOption treeAggregationFns, to add custom aggregations with support for both the column menu and saveState.
Refactor native aggregations to follow the same api as custom aggregations.
Remove columnDef option treeAggregation and replace with separate options treeAggregationType and treeAggregationLabel
Remove "custom" aggregation type, as it is redundent with specifying a custom
aggregation function.
Allow custom aggregation finalizers to omit setting the rendered string. Render the value (and label if provided)
if a rendered string is not provided.
Fix groupingShowCounts option
Breaking changes are:

options previously specified on the treeAggregation object are now  separate options (see docs)
aggregation entity type property may be undefined in the case of a unnamed custom aggregation function
aggregation entity previously set the initial value to 0, it now begins as undefined

Closes #3302

@PaulL1 I have butchered one of your tests in treeBase (some aggregations over two parents). It looks like you were testing multiple aggregations on one column (some native and one custom). I don't think that is supported the way I re-implemented aggregations. You can have multiple aggregations on the same field with different columns, or set different values on the aggregation entity using custom aggregation functions.
If that doesn't work for you, could you please describe the use case?

That was just laziness on my testing - easier to do lots of aggregations on the same column, and that subset of the code at that time didn't particularly mind.  The full code base didn't support multiple aggregations on the same column.
This overall looks really good @AgDude, the codes clean and better than it was before, which is always hard when touching someone else's code.
The only glitch I see is a commented out block in src/features/tree-base/test/tree-base.spec.js that could probably be deleted, but we can do that sometime.  I've merged.


Allow runners to forbid time.Duration casting on expressions of integer type

Casting integers to time.Duration is usually as incorrect as implicitly assigning integer expressions to constants, variables, fields, and parameters of type time.Duration. You can usually replace instances of time.Duration(x) with x * time.Nanoseconds if you really want to convert your type into nanoseconds.
There should be an analyzer flag which, when enabled, also forbids explicit casts to time.Duration.

This is a lot more intricate than I first realized. Basically the right thing would be to permit "proper" conversions like this:
ticker := time.NewTicker(time.Duration(intervalMillis) * time.Millisecond)

But forbid "improper" conversion like this:
ticker := time.NewTicker(time.Duration(intervalMillis))

I have a proof of concept to implement this. It's not free of bugs, but neither is the underlying project, and it catches the most common footguns.


issue with metrics-server from 113 lesson

Error: could not download chart: no cached repo found. (try 'helm repo update'): open D:\Users\patha\AppData\Local\Temp\helm\repository\bitnami-index.yaml: The system cannot find the file specified.
│
│   with helm_release.metrics-server,
│   on 9-metrics-server.tf line 13, in resource "helm_release" "metrics-server":
│   13: resource "helm_release" "metrics-server" {
│

The metrics-server repo URL has been changed. Please looks into it.,

First try to run
helm repo add metrics-server https://kubernetes-sigs.github.io/metrics-server/
helm repo update
helm search repo metrics
...
metrics-server/metrics-server               	3.10.0       	0.6.3      	Metrics Server is a scalable, efficient source ...

Still works for me, what's the new url?


As a developer I want to have a static site base to build upon

Description
Following our decision around static site generators  (here ), we should create a template based on this framework and commit to the repo for future iteration.
Solution
Use site generator to create scaffolding for a new site.
Describe alternatives you've considered
See https://github.com/usds/justice40-tool/issues/6
Links to user research or other resources
See above
Tasks

[ ] Generate static site

Definition of "Done"

[ ] Bare site scaffolding has been committed to the repo
[ ] Localization framework/tooling set up as relevant

Opting to close this because it's too implementation focused and will be covered by #16


ocaml-lsp: init at 2020-07-07

Motivation for this change
Add https://github.com/ocaml/ocaml-lsp
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

Merged ppx-yojson-conv-lib in master as fa535b53140b2c4387b8199b600ee744ca7df151
Do you know how to test the ocaml-lsp stuff?

I think you need to configure your editor to work with a Language Server client.
If you use Emacs, I think lsp-mode supports ocaml-lsp out-of-the-box. It should provide completions/syntax checking/docs/etc.

But I could crash the server using emacs & eglot:

ocaml-lsp uses textDocumentItem'slanguageId to identify the OCaml syntax to be used.
Currently eglot builds languageId from major-mode, and doesn't offer a way to customize it; so you need patch it for tuareg-mode:
--- i/eglot.el
+++ w/eglot.el
@@ -1648,9 +1648,11 @@ THINGS are either registrations or unregisterations (sic)."
   (append
    (eglot--VersionedTextDocumentIdentifier)
    (list :languageId
-         (if (string-match "\\(.*\\)-mode" (symbol-name major-mode))
-             (match-string 1 (symbol-name major-mode))
-           "unknown")
+         (if (eq major-mode 'tuareg-mode)
+             "ocaml"
+           (if (string-match "\\(.*\\)-mode" (symbol-name major-mode))
+               (match-string 1 (symbol-name major-mode))
+             "unknown"))
          :text
          (eglot--widening
           (buffer-substring-no-properties (point-min) (point-max))))))

I didn't have the time to submit a proper patch to Eglot

Version 1.0.0 is out: https://github.com/ocaml/ocaml-lsp/releases/tag/1.0.0

Closed by #103133


Allow specifying some allowed "extraneous-dependencies"

When using the import/no-extraneous-dependencies rule, while having a webpack resolve.alias configured so as to avoid deep relative paths when importing modules (e.g. from within a test/ directory), the no-extraneous-dependencies rule is triggered.
I'd like to define a whitelist of allowed "extraneous dependencies" that map to my webpack aliases.
Suggestion for configuration option
Use a key "whitelist" to enumerate dependencies that should be skipped in the check.
{
  "import/no-extraneous-dependencies": [
    "error",
    {
      "devDependencies": false,
      "optionalDependencies": false,
      "peerDependencies": false,
      "whitelist": ["src"]
    }
  ]

Repro
Webpack config
...
resolve: {
  extensions: ['', '.js', '.json'],
  alias: {
    src: path.join(process.cwd(), 'src')
  }
},
...

Code
import MyComponent from 'src/components/MyComponent';

I figured out that properly configuring eslint-import-resolver-webpack with the correct path to my webpack configuration resolved the issue! This project has a lot of features, thank you :]


Conflict when importing duplicated version conflicted modules (latest npm)

Now npm tries to install a flat dependency tree, but when there's a version conflict, it installs a the conflicted module in a sub node_modules directory.
So if module a depends on c#v1 and b depends on c#v2, c#v1 will be installed in the root level node_modules directory, whil c#v2 will be install in node_modules/b/node_modules.
This seems to produce a conflict when compiling using this plugin, and the conflicted module is undefined in the bundle. I've had this issue compiling https://github.com/mafintosh/webrtc-swarm and https://github.com/mafintosh/signalhub which use different versions of through2

Those packages have no updates > 2 years. When I try to build project with it I got thousands of circular dependencies warnings. Best way to resolve this: mark them as external.
I think it can be closed too.

Hey folks (this is a canned reply, but we mean it!). Thanks to everyone who participated in this issue. We're getting ready to move this plugin to a new home at https://github.com/rollup/plugins, and we have to do some spring cleaning of the issues to make that happen. We're going to close this one, but it doesn't mean that it's not still valid. We've got some time yet before the move while we resolve pending Pull Requests, so if this issue is still relevant, please @ me and I'll make sure it gets transferred to the new repo. :beer:


Remove dependency on Foundation

which leaked in with AnyCodable

Closed by https://github.com/pokryfka/aws-xray-sdk-swift/pull/68


Resolve #16 - use /bin/sh not /bin/bash.

Resolve #16.  Using box that doesn't include /bin/bash results in failure.  Switch to /bin/sh.

@mnelson /bin/sh is most portable as it’s posix but you have to stick w posix shell features in the script to stay portable- if you use bash only constructs you’re out of luck either way.

I feel that /bin/sh is just as portable as using env

ok by me

I agree that /bin/sh is better. But again for the run.sh it doesn't matter. I could dig into the code tomorrow to see how it is being invoked, but I'll probably do some other things.


Detect/Select keyboard layout to display shortcuts in

The Monaco editor currently only displays shortcuts in the US layout when opening the command palette or the context menu.

As stated in https://github.com/microsoft/monaco-editor/issues/1233 some shortcuts simply don't translate over to other layouts. For example, on the German layout "Toggle Line Comment" is displayed in Monaco as Ctrl+/ but you have to use Ctrl+#to trigger the action.

The browser version of VS Code (https://vscode-web-test-playground.azurewebsites.net) has a status bar item to open a quick pick where you can select your layout or enable auto-detection while you type.

I searched a bit for that feature in the VS Code codebase and found the picker here https://github.com/microsoft/vscode/blob/99e3914c7ec8f7b24a49d38c7387ac60b88f95aa/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.ts#L96 and the corresponding service here https://github.com/microsoft/vscode/blob/19f6f3103606da3fe5d8be4b722d96fe8e18271a/src/vs/workbench/services/keybinding/browser/keyboardLayoutService.ts#L506. The service and all other supporting code is currently located under workbench/services/keybinding/browser and .../common.
As someone who doesn't know the codebase that well I can't quite tell if it would be possible to do so dependency-wise. But is it possible to move that service and supporting code to platform so that it could be consumed from the standalone editor? Additionally, a corresponding quick pick would need to be implemented in the standalone layer, that let's you pick a layout + maybe a setting that let's you predefine it?
And please let me know if you want me to merge this issue into https://github.com/microsoft/monaco-editor/issues/1233, then I will move it over as a comment.

There is an implicit cost with that feature: VS Code ends up shipping the 10 most popular keyboard layouts we have seen and loads them as necessary. This would increase the bundle size of the editor or complicate further the webpack configuration to make things load on-demand. I would be very interesting if there are by now any new browser APIs that can help us read the current keymap.

Ah I see. From what I can tell, and you probably know way better than me, you're already using the experimental navigator.keyboard.getLayoutMap() here https://github.com/microsoft/vscode/blob/19f6f3103606da3fe5d8be4b722d96fe8e18271a/src/vs/workbench/services/keybinding/browser/keyboardLayoutService.ts#L389.
But just so I can wrap my head around that: That map only maps the physical key Backslash to the character # on the German keyboard layout, and is therefore missing some crucial information from the shipped maps? For instance here https://github.com/microsoft/vscode/blob/f90a0abe02b932182bd72d689ce5dd0836583493/src/vs/workbench/services/keybinding/browser/keyboardLayouts/de.win.ts#L60 you also provide mappings for the shifted version, the altGr version, and especially the virtual key code. If I understand correctly, that last part is the important bit to map from US_SLASH in the VS Code keybinding to VK_OEM_2 to # in the display together with the map here https://github.com/microsoft/vscode/blob/7bbc15a60e0adfdeae901bf149f56c72c83a9a65/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts#L655?

@rebornix do you remember why navigator.keyboard.getLayoutMap() was not enough and we had to ship the popular keymaps as well?


[Event Request] Database::"Job Planning Line" - Function UpdateAmountsAndDiscounts - OnBeforeUpdateAmountsAndDiscounts

We like to request the following Event:
Object: Database::"Job Planning Line"
Function: UpdateAmountsAndDiscounts
Publisher Event: OnBeforeUpdateAmountsAndDiscounts
Reason: To implement custom business logic
Where is the event placed:
local procedure UpdateAmountsAndDiscounts()
var
IsHandled: Boolean;
begin
OnBeforeUpdateAmountsAndDiscounts(Rec, xRec, IsHandled);
if IsHandled then
exit;
if "Total Price" = 0 then begin
"Line Amount" := 0;
"Line Discount Amount" := 0;
Event Code:
[IntegrationEvent(false, false)]
local procedure OnBeforeUpdateAmountsAndDiscounts(var JobPlanningLine: Record "Job Planning Line"; var xJobPlanningLine: Record "Job Planning Line"; var IsHandled: Boolean)
begin
end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.


Testing the comminucation between the users and the server

Signed-off-by: Erez Cohen<EMAIL_ADDRESS>Desired Outcome
Having the ability to ensure that the webserver communicates with the users
Implemented Changes
Adding the test_root_entrypoint test,  that verifies the desired connection so that the application can communicate with users
You can see the test in the tests/ folder
Connected Issue/Story
Resolves #53
Definition of Done

create new folder tests for the project
build the test as described above
pass the test

Changelog

[ ] The CHANGELOG has been updated
[x] This PR does not include user-facing changes and doesn't require a
CHANGELOG update

Test coverage

[x] This PR includes new unit and integration tests to go with the code
changes
[ ] The changes in this PR do not require tests

Documentation

[ ] Docs (e.g. READMEs) were updated in this PR
[ ] A follow-up issue to update official docs has been filed here: insert issue ID
[x] This PR does not require updating any documentation

LGTM