Support regenerate for execute API

Description
Support regenerate on existing interaction, regenerate_interaction_id and memory_id must be provide for regenerate case.
POST http://localhost:9200/_plugins/_ml/agents/MBWOSIwBAnQBpyKtmAkn/_execute
{
  "parameters": {
    "memory_id": "A5CgV4wBiufF8-BkxC0r",
    "regenerate_interaction_id": "BJCgV4wBiufF8-BkxC2b",
    "verbose": false
  }
}

Response
{
    "inference_results": [
        {
            "output": [
                {
                    "name": "response",
                    "dataAsMap": {
                        "response": "Your OpenSearch cluster contains many security audit log indices from late 2023, with most replicas in a yellow status. The cluster and index storage sizes and document counts appear normal.",
                        "additional_info": {}
                    }
                },
                {
                    "name": "QuestionSuggestor",
                    "result": "[\"What are some ways I can analyze these security audit logs further?\",\"Can you help me understand why the replicas are in yellow status?\"]"
                }
            ]
        }
    ]
}

Issues Resolved
[List any issues this PR will resolve]
Check List

[ ] New functionality includes testing.

[ ] All tests pass

[ ] New functionality has been documented.

[ ] New functionality has javadoc added

[ ] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

done in #1816


Sidebar folders for macos

Previously due to xdg not being able to show any folders, I hardcoded the locations only for macos. It works well on my machine and should work on others as well because it only affects mac machines.

@lescx please check if this is a good solution. This doesn't really affect any other machine except mac machines but because macos doesn't use xdg folder spec, i had to hardcode the locations

When the mac local language is different, will the mac use English or the local language?

that needs to be handled. I didn't think of it. For now this can work, but i think we can look for a package that gets it for macos natively


Comments controller not properly initializing from Post controller populated only with subreddit and fullname

Stumbled upon this one myself.  Here's the problem:  The Comments controller relies on the parent Post controller's Id property.  However, when Post is initialized with just the fullname and subreddit without then calling .About(), the Id never gets set, which results in the Comments controller's PostId property being null.  This, in turn, causes Comments to be populated with comments from all kinds of different posts/subreddits.

Fixed.


Lpfg 520 manage learner provider

Added learningProviderController.js, learningProviderFactory.js
Validation on input for adding a learner provider
Added add-terms-and-conditions page
Removed goBack.js
Styling added for provider list; new template for listing learning providers
Refactored backbutton & phaseBanner
Changed the way right hand menu works
Nav links added to main template and removed from individual pages

Next work, package structure to be changed


Organize documentation and sync ipython notebooks instead of nbconvert-generated RST files

This will implement #32. I plan to sync ipython notebooks, have sphinx generate cell output automatically (and use this to automatically test changes, as an addendeum to scripts in tests, like climpred does), and use the auto-generated output in the documentation. Will also require more judicious merges/pushes to master, because the time for sphinx to generate documentation will probably go from ~1 minute to something like 5-10 minutes.

This PR will also clean up the documentation layout and make it look more like other readthedocs projects, e.g. xarray and climpred. There will be three sections:

Getting Started: Splits up some of the text in the README, and add some new sections like FAQ, "Why ProPlot" (where I get philosophical, talk about some fundamental limitations of matplotlib API and how I address them, etc.), definitely a dedicated "Installation" section with instructions for pip and conda.
User Guide: Mostly contains the content of current "Overview", but might flesh out certain sections some more, and divide things up into more pages (e.g. a "Colorbars and legends" page).
Help & Reference: Includes What's new changelog (also... I will start keeping a changelog), API Reference in its own section (will no longer have the subsections laid out in the main sidebar), Contributing Instructions, and maybe an External Links page to related projects.

As for the limitations section these are the first things that come to mind.

Power users / academics generally want to change a ton of plot setting all at once, but to do this required a bunch of one-liner setters and getters (ProPlot has "format") and verbose class names (ProPlot has constructor functions like "Locator", "Formatter", ...).
Gridspec requires fixed spacing between adjacent rows and columns which makes "tight layout" algorithms clumsy (note: should add a tight layout option that keeps spaces constant).
Certain backends require figure size to be fixed and cannot be changed at drawtime by the "tight layout" algorithm. Got this to work with the static inline backend (simple fix) and the Qt popup backend (only fixable because of a sketchy detail in its implementation; might break someday), but it is unfixable for the "notebook" and "macosx" backends, and possibly other popup backends.

Also there are some ProPlot limitations I need to figure out.

There is an "Artist.set" method, which makes format kind of redundant, but it is quite hidden and not at all recommended in examples. I think the problem is its usage is implicit/undocumented... its valid keyword args are any name that has an Axes.set_name method. Perhaps all features should be implemented as new "setter" methods, while use of format is highly encouraged and its arguments are explicitly documented.
ProPlot immediately updates default settings with a .proplotrc file on import. This conflicts with people who have their own edits to matplotlibrc or use "style sheets". In the future ProPlot should respect user settings.

Also the new User Guide may have the following sections.

Creating figures
Customizing figures
Tight layout
Colorbars and legends
Color usage
X and Y axis settings
Projection axes
Xarray and pandas integration
2D plotting commands
1D and statistical plotting commands

There are a lot of features that are introduced way too quickly / probably go over people's heads, need to take more time introducing them.

Switching focus to this branch now. The main thing will be syncing ipython notebooks so that contributors can add/edit examples, and performing automatic testing with nbsphinx.

FYI you can add a readthedocs build test on your PR now. See "Getting Started" here. You just email them and they'll add this repo to their beta access.
It will automatically add readthedocs as a check. It will start showing up on your next pushed commit after you hear back from them (and on all new PRs). Then you can see on this isolated PR if it builds the docs without breaking and you can click a link to see what they look like.
Saves headaches for weird dependency things on the docs that you don't catch here.

Awesome, thanks for the tip. I'll do that.

The force push removes commited ipython notebook inline figure output. This was accidentally commited because nbstripout was not configured properly, and it increased the repo size by about 100MB! There are now also instructions for configuring nbstripout for new contributors in HOWTOCONTRIBUTE.rst, and a new local .gitconfig filter setup that makes the nbstripout commands verbose so you always know they are working.
Anyway, really excited about this branch! It significantly cleans up and fleshes out the documentation, and it adds a brand new minimal RTD theme with a light-dark mode toggle at the top of very page.

Beautiful. We finally have some basic testing (make html with nbsphinx on every PR) and the documentation looks so much better. Hopefully RTD has no issues; merging now.

RTD had memory usage issues. New docs should be live after readthedocs/readthedocs.org#6412 is resolved.


Plugin doesn't support this project's cordova-ios version. cordova-ios: 3.8.0, failed version requirement: >=4.0.0-dev

When adding ios the following error is produced:
Couldn't finish generator:
CordovaError: Plugin doesn't support this project's cordova-ios version. cordova-ios: 3.8.0, failed version requirement: >=4.0.0-dev

Apparently this is a bug in the new plugin release of cordova-plugin-whitelist-1.1.0
Release notes: https://cordova.apache.org/news/2015/06/22/plugins-release.html
Stackoverflow issues:

http://stackoverflow.com/questions/30991828/cordova-plugin-whitelist-failed-asking-for-cordova-ios-4
http://stackoverflow.com/questions/30696234/can-not-add-ios-platform-on-cordova
Cordova issue: https://issues.apache.org/jira/browse/CB-8898

Maybe a suggestion as I've also experienced this issue. If the generator fails, it could ask user at the end, if it should clear the created files so we get the blank directory again?

@gruppjo is there any difference in the generated code between project created with your workaround and project created with fixed whitelist 1.1.0?

@lordgreg, I agree that would be convenient, but I don't think we're going to implement this. This is an issue with cordova which will be fixed soon. It shouldn't happen in the first place. More info here: https://issues.apache.org/jira/browse/CB-8898.
I do realise this is a very cumbersome workaround right now. However it has proven more beneficial to dedicate our time on things that actually improve the generator rather than fixing things that will be fixed soon elsewhere (see the gulp cordova-install command we introduced in 1.0.0 and removed in 1.1.0 because cordova implemented this 5.0.0. Please be patient on this on and be assured that the time we save on not implementing this will come in form of other developments as a reward to you.
@shpoont the whitelist plugin version is different. Anything else is the same

issue is resolved. Apparently cordova rolled back the version of the cordova-plugin-whitelist to 1.0.0 which is compatible with cordova-ios v3.8.0!
https://issues.apache.org/jira/browse/CB-9232


Error building Obscuro

Hi, I have installed sgx sdk as mentioned in the readme and when I am trying to build Obscuro using 'make' command I am getting following error:
error: ocall_getpwnam_r': invalid 'string' attribute - pwd' is not char pointer.
Makefile:138: recipe for target 'App/MyEnclave_u.c' failed
make: *** [App/MyEnclave_u.c] Error 255

Ubuntu 16.04

Unfortunately, this prototype was tested with Ubuntu 14.04.
Let me check if I can make it work with a more recent OS.

@fairaschain I have updated the guide with more details, you may try to follow the steps again.

Thank you so much. I will try and get back to you if I face any other problem.

I am trying to install it on my ubuntu 18.04 version and I am facing the same issue. Can you help with this?

I am trying to install it on my ubuntu 18.04 version and I am facing the same issue. Can you help with this?

I think the SGX SDK for Linux version 1.8 (which we use in this prototype) cannot work on Ubuntu 18.04.

Is there any way I can modify the code such that it works on 18.04?

Is there any way I can modify the code such that it works on 18.04?

The earliest version of SGX SDK for Linux that supports Ubuntu 18.04 is v2.3, which is significantly different from the version 1.8.
Our prototype will need a major upgrade to be compatible with Ubuntu 18.04, unfortunately.

When i make the project, I a getting the following error. The operating system is Ubuntu 14.04 i386 32 bit
/usr/bin/ld: i386:x86-64 architecture of input file `App/vrfcert_u.o' is incompatible with i386 output
I am not able to figure out the error. Can you please help

Probably you have to install Ubuntu 64-bit or make your Ubuntu works with 64-bit applications.

Thank you, got that figured. But original problem in this query i.e.
error: ocall_getpwnam_r': invalid 'string' attribute - pwd' is not char pointer.
Makefile:138: recipe for target 'App/MyEnclave_u.c' failed
make: *** [App/MyEnclave_u.c] Error 255
The above error still persists and I am not able to find out the fault. I am using ubuntu 14.04 64 bit version. Hence ubuntu version should not be problem right?

Certainly, Ubuntu version is not a problem in this situation. Few people have independently tested with Ubuntu 14.04, VirtualBox, etc..
Please make sure that you have done exactly the instructions.
Probably you can try to "make clean", re-install everything from scratch.
Sorry I cannot be more helpful. I cannot reproduce the errors so all I can do is to guess. I can also provide a link include an OVA file including everything ready to run.

Hi, I am getting the same error even if I try to reinstall the entire project. Can you please provide the OVA file as mentioned in the above comment

Did you face any compiling errors before making the project?
In other words, did you see any problem when installing the Intel SGX SDK?
I'm preparing the OVA file and updating the README file.

Sorry, I have not noticed this earlier. But I have an error while running dependency commands.
There is no such file or directory isgx.ko while running this sudo cp isgx.ko "/lib/modules/"uname -r"/kernel/drivers/intel/sgx"

Oh this is an easy fix. You have to compile the Intel SGX Driver by entering "make" command.
I updated the README file. Thanks for the bug report. You will be able to compile the project now.
OVA file will be available soon. I need to find somewhere to post it.

Thank you for the fix! Its compiling now!!


[Event Request] Report 7304 "Get Outbound Source Documents" – New Event “OnBeforeReport”

Could we please have a new publisher “OnBeforeReport” in trigger “OnPreReport”, Report "Get Outbound Source Documents”?
    trigger OnPreReport()
    begin
*** start new code ***
        OnBeforeReport();
*** stop new code ***
        LineCreated := false;
    end;
…
*** start new code ***
    [IntegrationEvent(false, false)]
    local procedure OnBeforeReport()
    begin
    end;
*** stop new code ***

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.


chore(merge): master <- develop

Changes:

Add Content Security Policy
README modifications
Handle TypeORM configuration in config.ts
Error handling on requests
Misc changes

The ESLint action failed due to a file missing, not due to style errors.
The missing file is the database.controller.ts. This file previously stored database configuration options for TypeORM, these have been moved to config.ts.
On my machine ESLint lints the codebase and finds no style errors.


Merge from upstream.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.0 out of 33 committers have signed the CLA.:x: NancyLi1013:x: JackBoosY:x: Rastaban:x: seanwarren:x: myd7349:x: greg7mdp:x: Helco:x: markdegreef:x: Asozial:x: SuperWig:x: MistGebaut:x: kiwixz:x: ShelleyLake:x: lrineau:x: dlech:x: dzenanz:x: ras0219-msft:x: Cheney-W:x: wangli28:x: PhoebeHui:x: angelmixu:x: LarryIII:x: grdowns:x: djarek:x: philjdf:x: zharkov-eu:x: Neumann-A:x: andreadps:x: fradav:x: vicroms:x: cenit:x: koprok:x: coryanYou have signed the CLA already but the status is still pending? Let us recheck it.


sync tests; throw on negative .allocUnsafe() argument; remove hacks

sync node.js tests to master (node v6.4.0)
throw on negative .allocUnsafe() argument (to match new node v6.4.0 behavior)
remove assert hack (Bug in node.js core was fixed in node v6.4.0!)

Released as 4.9.1


check and convert contiguous tensor when model saving

Type of Change
https://jira.devtools.intel.com/browse/NLPTOOLKIU-1310
https://jira.devtools.intel.com/browse/NLPTOOLKIU-1311
Description
detail description
JIRA ticket: xxx
Expected Behavior & Potential Risk
the expected behavior that triggered by this PR
How has this PR been tested?
how to reproduce the test (including hardware information)
Dependency Change?
any library dependency introduced or removed

https://inteltf-jenk.sh.intel.com/view/lpot-validation/job/LLM_accuracy_INC_ITREX/301/


Dockerfile: add git-lfs

We ship the git plugin, but all git lfs related behaviour fails, because
the image doesn't ship the git-lfs package.
Closes #801.
cc @oleg-nenashev

CI complains
not ok 13 do not upgrade if plugin has been manually updated
for maven-plugin - that same error is currently on master, too - so unrelated to this PR.

See discussion in #552 that explains why this type of extension was rejected in the past.  I'm still of the opinion that the docker image should include git lfs because there are operations on the master (multibranch pipeline scan, others) which will require git lfs.  However, I also understand the reasoning from @rtyler and @carlossg for rejecting #552

I adressed the comments, but merged the commands into the same RUN line - we don't want /var/lib/apt/lists/* to end up in an intermediate layer.

Ping ;-) Is there anything else to do on my side, or is this good to merge?

@flokli I believe the final decision to merge or not merge rests with the current maintainers and their position on the reasoning as described in #552 .

@rtyler, @carlossg: git-lfs has matured a lot since 2017, and is available and used in many different code hosting platforms. We ship git in the base image, but git-lfs repos are cloned in a nonworking state. Would you reconsider the decision from back then?
Extending from base containers still is quite painful, especially the "keeping track of updates of the underlying image" part - I'd really only need the git-lfs part, and would be very happy to just be able to use the official image.

I do not disagree with it. Will merge once CI is green (infra issues on some Docker agents)

@flokli it appears that Dockerfile-centos cannot build properly because the git-lfs package is not available

git-lfs doesn't seem to be packaged in the official repos, I added the additional one as described in https://github.com/git-lfs/git-lfs/wiki/Installation#rhelcentos .

The "Build" phase in CI did succeed:
[2019-11-21T16:47:11.250Z] The repository is setup! You can now install packages.

[2019-11-21T16:47:11.508Z] Reading package lists...

[2019-11-21T16:47:11.765Z] Building dependency tree...

[2019-11-21T16:47:11.765Z] Reading state information...

[2019-11-21T16:47:11.765Z] The following NEW packages will be installed:

[2019-11-21T16:47:11.765Z]   git-lfs

[2019-11-21T16:47:12.331Z] 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.

[2019-11-21T16:47:12.331Z] Need to get 6083 kB of archives.

[2019-11-21T16:47:12.331Z] After this operation, 14.8 MB of additional disk space will be used.

[2019-11-21T16:47:12.331Z] Get:1 https://packagecloud.io/github/git-lfs/debian buster/main amd64 git-lfs amd64 2.9.0 [6083 kB]

[2019-11-21T16:47:12.588Z] debconf: delaying package configuration, since apt-utils is not installed

[2019-11-21T16:47:12.588Z] Fetched 6083 kB in 1s (12.1 MB/s)

[2019-11-21T16:47:12.846Z] Selecting previously unselected package git-lfs.

There's still some unrelated failures in the make test phase, not sure what do do about that, but they seem unrelated.

@rtyler is there anything left to be done from my side? Happy to help getting this in!

@oleg-nenashev rebased on top of master, and added git-lfs for Dockerfile-openj9*. PTAL.

:tada: wohoo, thanks a lot! Looking forward to see this being released soon :-)


O3R Multithreaded Data Capture Issue

In our use case, we require to capture 3D data from multiple camera heads(O3R252) connected to a single VPU(OVP810) from separate threads as shown below in the figure.

We want data capture process for each camera head to be independent of each other and can be initiated at different point of time, that is why we are handling them in different threads. In our use case it might be possible that data is captured at the same time (2 or 3 heads are running simultaneously). Due to noisy point cloud we have to run temporal filter for few seconds to improve the point cloud quality. In our test we tried to run data capture for each camera head in separate thread,  first thread was able to get 3D data successfully but later, other threads failed with framegrabber timeout error.
void IfmO3rPcdGrabber::getPCDFromSensor(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_xyz) {
    std::cout << "Getting point cloud from sensor: " << sensor_ip << " " << port_3d << std::endl;
    auto t1 = std::chrono::high_resolution_clock::now();

    auto cam = std::make_shared<ifm3d::O3R>(sensor_ip);

    //enable temporal filter and set to run mode
    std::cout << "Enabling filter to sensor: " << sensor_ip << " " << port_3d << std::endl;
    auto parameter = cam->ToJSON();
    parameter["ports"][port_3d]["state"] = "RUN";
    parameter["ports"][port_3d]["processing"]["diParam"]["enableTemporalFilter"] = true;
    cam->FromJSON(parameter);

    //wait for temporal filter
    std::this_thread::sleep_for(std::chrono::milliseconds(4000));

    const auto PCIC_PORT = cam->Port(port_3d).pcic_port;
    auto fg = std::make_shared<ifm3d::FrameGrabber>(cam, PCIC_PORT);
    fg->Start({ifm3d::buffer_id::XYZ});
    auto future = fg->WaitForFrame();
    if (future.wait_for(10s) != std::future_status::ready){
        throw std::runtime_error("Timeout waiting for camera!");
    }
    std::cout << "Got frame from sensor: " << sensor_ip << " " << port_3d << std::endl;
    auto frame = future.get();
    auto xyz = frame->GetBuffer(ifm3d::buffer_id::XYZ);

    convertToPointCloud(xyz, cloud_xyz);
    fg->Stop();

    // disable temporal filter, and set to idle mode
    std::cout << "Disabling filter to sensor: " << sensor_ip << " " << port_3d << std::endl;
    parameter["ports"][port_3d]["state"] = "IDLE";
    parameter["ports"][port_3d]["processing"]["diParam"]["enableTemporalFilter"] = false;
    cam->FromJSON(parameter);
}

void testParallelization() {
    //create threads, one for each camera
    std::thread t1([](){
        IfmO3rPcdGrabber sensor("<IP_ADDRESS>", "port0");
        pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_xyz(new pcl::PointCloud<pcl::PointXYZ>);
        sensor.getPCDFromSensor(cloud_xyz);
    });
    std::thread t2([](){
        IfmO3rPcdGrabber sensor("<IP_ADDRESS>", "port1");
        pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_xyz(new pcl::PointCloud<pcl::PointXYZ>);
        sensor.getPCDFromSensor(cloud_xyz);
    });
    std::thread t3([](){
        IfmO3rPcdGrabber sensor("<IP_ADDRESS>", "port2");
        pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_xyz(new pcl::PointCloud<pcl::PointXYZ>);
        sensor.getPCDFromSensor(cloud_xyz);
    });
    t1.join();
    t2.join();
    t3.join();
}

Hello @robinbansal08 ,
I will take a look and get back to you.

Hey @robinbansal08,
I tried your code (I guessed at the missing parts), and I was able to reproduce the timeouts. I am not exactly sure why this happens. Probably something to do with the way ifm3d handles the wait for frame, I will check.
Have you tried using the callback instead? This way, you would not need to handle threading yourself.
The simplified example below gets you the same behavior (in this case the callback will be called every time a frame is received, which will depend on the frame rate):
#include <chrono>
#include <ifm3d/common/json_impl.hpp>
#include <ifm3d/device/err.h>
#include <ifm3d/device/o3r.h>
#include <ifm3d/fg.h>
#include <iostream>
#include <string>
#include <thread>
#include <pcl-1.12/pcl/common/common.h>
#include <pcl-1.12/pcl/pcl_base.h>

using namespace std::chrono_literals;
using namespace ifm3d::literals;

void convertToPointCloud(const ifm3d::Buffer& buffer, pcl::PointCloud<pcl::PointXYZ>::Ptr cloud)
{
    // Assuming the buffer contains XYZ data in a specific format
    // Adjust the following code according to the actual format of the buffer
    std::cout << "Converting buffer to PCL format." << std::endl;
    int width = buffer.width();
    int height = buffer.height();
    cloud->width = width;
    cloud->height = height;
    cloud->is_dense = false;
    cloud->points.resize(width * height);
    std::cout << "Width: " << width << std::endl;
    std::cout << "Height: " << height << std::endl;
    ifm3d::Buffer_< ifm3d::Point3D_32F>  xyz_data = buffer; // no copy of data
    for (const auto& point : xyz_data)
    {
        cloud->push_back(pcl::PointXYZ(point.val[0], point.val[1], point.val[2]));

    }
    std::cout << "Finished converting the buffer" << std::endl;
}

int main(){
    auto IP = "<IP_ADDRESS>";
    auto o3r = std::make_shared<ifm3d::O3R>(IP);
    auto ports = {"port0", "port1", "port2"};
    o3r->Set(ifm3d::json::parse(R"({"ports":{"port0":{"state":"RUN", "processing": {"diParam":{"enableTemporalFilter": true}}}, "port1":{"state":"RUN", "processing": {"diParam":{"enableTemporalFilter": true}}}, "port2":{"state":"RUN","processing": {"diParam":{"enableTemporalFilter": true}}}}})"));

    std::vector<ifm3d::FrameGrabber::Ptr> fgs;
    std::vector<pcl::PointCloud<pcl::PointXYZ>::Ptr> clouds;
    for (auto port: ports){
        std::cout << "Setting up callback for port " << port << std::endl;
        auto fg = std::make_shared<ifm3d::FrameGrabber>(o3r, o3r->Port(port).pcic_port);
        pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_xyz(new pcl::PointCloud<pcl::PointXYZ>);
        fg->OnNewFrame([port, cloud_xyz](ifm3d::Frame::Ptr frame){
            std::cout << "Handling frame from " << port << std::endl;
            auto xyz = frame->GetBuffer(ifm3d::buffer_id::XYZ);
            convertToPointCloud(xyz, cloud_xyz);
            });
        fg->Start({ifm3d::buffer_id::XYZ});
        fgs.push_back(fg);
        clouds.push_back(cloud_xyz);
        //Do something with clouds.
    }
    std::this_thread::sleep_for(0.2s);

    for (auto fg: fgs){
        fg->Stop();
    }
    o3r->Set(ifm3d::json::parse(R"({"ports":{"port0":{"state":"IDLE", "processing": {"diParam":{"enableTemporalFilter": false}}}, "port1":{"state":"IDLE", "processing": {"diParam":{"enableTemporalFilter": false}}}, "port2":{"state":"IDLE","processing": {"diParam":{"enableTemporalFilter": false}}}}})"));

    return 0;
}


Fix to allow using Exists as the then clause of Case When statements

This change allows the usage of Exists as the "then" clause of Case(When(...)) statements.  Prior to this change, attempting to do so would yield a "2 arguments expected, 6 arguments received" exception.  This is due to the fact that most of the subquery (and subquery derived classes) have the same args to resolve_expression, and then sometimes pass them by kwargs, and other times by args.  Changing the signature of resolve_expression for Exists to allow either fixes this issue.  You can see this behavior in the added unittest CaseThenSubqueryTests.test_exists, which fails as described before the rest of the patch is added.

Thanks for the contribution. Here are some notes:

A Trac ticket is required for all bug fixes. See our patch review checklist.
It's okay to include additional test coverage, but please don't iinclude an already passing test (test_subquery) with a bug fix commit as that makes it unclear what issue is fixed.
Please don't include unrelated cosmetic changes with the fix.
All pull requests should go to the master branch. The committer will decide whether or not to backport from there based on the supported versions policy.


.Net: Update M.E.AI.Abstractions version

Bumped the version of Microsoft.OpenApi.ApiManifest being included to pull in https://github.com/microsoft/OpenApi.ApiManifest/pull/117, which was breaking the build.

Ugh, now it's blocked on Microsoft.Plugins.Manifest having a similar upper bound set. Looks like a fix was made to that repo but there's no nuget package with that fix yet.

@RogerBarreto, do you know what's wrong with CI here?

@stephentoub AFAIK 2 UT failing only.

Yeah, I just couldn't figure out which. But whatever it was, it seems to have resolved itself.


Incorrect Information for Cosmos DB Built In Users

The built-in role definitions seems to be place holders as the IDs don't seem to be valid

ID
Name
Included actions

00000000-0000-0000-0000-000000000001
Cosmos DB Built-in Data Reader
Microsoft.DocumentDB/databaseAccounts/readMetadataMicrosoft.DocumentDB/databaseAccounts/sqlDatabases/containers/items/readMicrosoft.DocumentDB/databaseAccounts/sqlDatabases/containers/executeQueryMicrosoft.DocumentDB/databaseAccounts/sqlDatabases/containers/readChangeFeed

00000000-0000-0000-0000-000000000002
Cosmos DB Built-in Data Contributor
Microsoft.DocumentDB/databaseAccounts/readMetadataMicrosoft.DocumentDB/databaseAccounts/sqlDatabases/containers/Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/items/

I've tried executing this via CLI v 2.26 and returns an error
The specified role definition with ID '00000000000000000000000000000001' does not exist.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: aba612b3-f404-11b2-45d9-6e10f1fbf11d
Version Independent ID: 86ccb46e-5ebd-50a4-a911-2ac83c8a41f4
Content: Configure role-based access control for your Azure Cosmos DB account with Azure AD
Content Source: articles/cosmos-db/how-to-setup-rbac.md
Service: cosmos-db
GitHub Login: @ThomasWeiss
Microsoft Alias: thweiss

@JFolberth Thanks for your feedback! We will investigate and update as appropriate.

@JFolberth Please make sure you're using the Cosmos DB CLI commands. This command should show the built-in roles: az cosmosdb sql role definition list --account-name $accountName --resource-group $resourceGroupName.

Thanks that was it!

@JFolberth ... fancy seeing you here. ALSO. this is SOOO Funny because I was like.. Joel this number looks fake.


Allow setting a field with partially defined field

Pull Request Test Coverage Report for Build 980695702

10 of 16 (62.5%)  changed or added relevant lines in 3 files are covered.
4 unchanged lines in 2 files lost coverage.
Overall coverage decreased (-0.007%) to 69.265%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

common/type_system/TypeSystem.cpp
4
10
40.0%

Files with Coverage Reduction
New Missed Lines
%

common/type_system/TypeSystem.cpp
1
71.53%

test/goalc/test_with_game.cpp
3
98.64%

Totals

Change from base Build 977747166:
-0.007%

Covered Lines:
37009

Relevant Lines:
53431

💛  - Coveralls


support for visual studio 2019 or higher

In case of Release-Override(/mt) on vs2019
issue:1327
after using a higher version of the sdk, the compiler will report an error such as the issue (1327), because some functions are not rewritten

Thanks for the patch. Any details about what those new functions do?

pseudocode from libucrt.lib

more details here
_msize_base implementation

Thanks for the patch. Any details about what those new functions do?

And Release-Patch(mt) should also be added to support higher version sdk

Shouldn't such update include all of the missing functions which the asan_malloc_win.cc file from the linked LLVM page patches? At least some of them definitely seem to be missing from libtcmalloc currently.
void ReplaceSystemMalloc() {
#if defined(ASAN_DYNAMIC)
  TryToOverrideFunction("free", (uptr)free);
  TryToOverrideFunction("_free_base", (uptr)free);
  TryToOverrideFunction("malloc", (uptr)malloc);
  TryToOverrideFunction("_malloc_base", (uptr)malloc);
  TryToOverrideFunction("_malloc_crt", (uptr)malloc);
  TryToOverrideFunction("calloc", (uptr)calloc);
  TryToOverrideFunction("_calloc_base", (uptr)calloc);
  TryToOverrideFunction("_calloc_crt", (uptr)calloc);
  TryToOverrideFunction("realloc", (uptr)realloc);
  TryToOverrideFunction("_realloc_base", (uptr)realloc);
  TryToOverrideFunction("_realloc_crt", (uptr)realloc);
  TryToOverrideFunction("_recalloc", (uptr)_recalloc);
  TryToOverrideFunction("_recalloc_base", (uptr)_recalloc);
  TryToOverrideFunction("_recalloc_crt", (uptr)_recalloc);
  TryToOverrideFunction("_msize", (uptr)_msize);
  TryToOverrideFunction("_msize_base", (uptr)_msize);
  TryToOverrideFunction("_expand", (uptr)_expand);
  TryToOverrideFunction("_expand_base", (uptr)_expand);

Not sure why asan are trying to override _xxxx_crt
like _malloc_crt is a macro


Can I create work by using original K8s API?

I want to create work like deployment by using K8s API but not a WorkManifest with template in it, just like what kubefedV2, karmada or clusternet does. Is it possible?

I do not think kubefedv2, karmada and clusternet has a similar API to deploy workload? Do you ask an API that in higher level primitive which you can define "I want to create deployment in a set of clusters". Or do you want a way that you can directly call deployment API in a spoke cluster?

Use karmada as an example,  if I want to create deployment across multiple clusters. I can use the native deployment API of k8s in hub cluster,  the components of karmada will do reconciling, and generate ResourceBindingSpec as a result, which is similar to the concept of work in work-api. Is it possible to use OCM the same way? That is, use k8s native API in hub cluster directly rather than use ManifestWork directly.

oh, we do not do it in ocm core component. But it is possible to develop an extension to do that. There is a proposal by @yue9944882  https://github.com/open-cluster-management-io/enhancements/pull/31 that may be able to support this case.
We try to avoid normalizing the interface of the end user in ocm core part, since we see a bunch of different ways users can deliver workload (native way, gitops way, helm way etc.). Instead the ocm core component is trying to provide an interface that other more user oriented interfaces can easily plug in.

Got it! Does it mean that I can create an add-on through addon-framework or even a third-party system writen by myself (as long as it can transform a native resource to manifestwork) to support my case?

That is for sure!

weeks ago i had a poc implementation of the enhancement above, now it's holding on the status-reporting feature by the work api from https://github.com/open-cluster-management-io/api/pull/108 b/c the advance workload distribution needs to actively reading the existence/status from the distributed resources. the new api proposed in the enhancement allows users to "import" an existing workload resource from the hub cluster as the template then replicate them to the selected managed clusters and the imported native workload will be automatically packed into a work api.
btw i am also thinking of another approach to convert native api to work -- by a custom kustomize generator plugin, the plugin should be packing all the resources under the kustomize folders to a single work resource.


SSR Site construct support for base path option

All the SSR frameworks support rendering on a base path like
example.com/docs

svelte - https://kit.svelte.dev/docs/configuration#paths
astro - https://docs.astro.build/en/reference/configuration-reference/#base
next - https://nextjs.org/docs/pages/api-reference/next-config-js/basePath

I can't get this working with sst  :(

Hey Thomas, can you post this on #help and we'll take a look at supporting it.

@jayair Any updates on this? Searching discord just turns up workarounds and callouts that basePath isn't currently supported. We use basePath extensively  with multiple apps behind a reverse proxy, so not having having basePath is certainly a hindrance!

I think this is supported for Astro and maybe Next.js. Which one are you looking for?

Next.js, yeah, we use it in our app's Next config, but when deployed with SST, that basePath isn't used as a prefix in cloudfront (specifically the app looks for static bundles at <basePath>/.next/*, but the cloudfront route has it as .next/. That was at least the obvious one, not sure if there are other places it should apply.
I've got a workaround for now, but certainly would be nice if the next construct used it when defining the CF routing rules!

Let me check on the Next.js one with the team.

I derped/lied. My workaround doesn't actually solve the issue. Regarding what I said before:

We use basePath extensively with multiple apps behind a reverse proxy

Without base path support, my next app will request all static bundles and such from the root path /. When behind a reverse proxy, the routing rules will have no idea that the / root requests should be routed to my app without putting all requests behind a basePath. Those requests will be sent to the default routing rule.
So this remains a big hindrance.

@jayair since I saw how it was previously done, went ahead and opened a suggested PR ☝ to address at least the Next.js part of this issue.

Just wanted to bump this, since using basePath seems to result in 403 forbidden errors for static assets for me. Just curious if anyone else using basePath experiences this?

We are transition this repo to https://github.com/sst/v2 and are closing this issue for now. If it is still relevant please reopen it there - sorry for the trouble


SW-6223 Fix permission error on variable value update

When a user edits the value of a deliverable variable, we reset the variable's
workflow status in the project to "In Review." Commit 0a442949 moved the logic
for that from an event handler to a method of VariableValueService, but didn't
include the systemUser.run from the event handler. Variable updates started
failing because non-admin, non-system users don't have permission to update
variable workflow statuses.
Fix it by changing the permission check to only require admin privileges for
statuses that are set via the accelerator console; regular users can set the
status to "In Review" as long as they have write access to the project.

#2574  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @sgrimm and the rest of your teammates on  Graphite


returning char[32]*

Describe the bug
When you define char[32]* as the return type it shows in the c decompiler char (*) [32] foo() {,
To Reproduce

Open any decompiled function
change return type to char[32]*
save, see decompiled code appear with this weird char (*) [32]

Expected behavior
return type should be valid c, char[32] * foo() {
Environment (please complete the following information):

OS: windows
Java Version: openjdk 18.0.2
Ghidra Version: 10.2
Ghidra Origin: github distro

Additional context
The executable i'm working with is an x86 one
Note that the edit function window does show correctly the signature to be the expected char[32]*

Valid c should be char (*foo())[32] { but this is not generating valid C regardless I think.


Add plop plugin

Hello 👋
We use Plop quite a bit for managing boilerplate, it would be nice if it could be automatically added to the configuration.
Thanks!

Any chance you could run bun run format from root of repo?

:rocket: This pull request is included in v5.38.0. See Release 5.38.0 for release notes.
Using Knip in a commercial project? Please consider becoming a sponsor.

Thanks again @ben-eb!


Explicit Waits?

Hey there! Working on transitioning some selenium tests I've written in Ruby to Go and I've used explicit waits quite a bit throughout the suite. In looking through the docs/code here, I've been unable to locate anything but updating the implicit wait time.
Is something yet to be implemented that I could help with, or are there particular reasons it hasn't/won't be? Is there any other implementation method for this type of selenium functionality that'd you recommend instead?
Thanks!

I apologize for the delay in response!
I'm definitely open to making changes to help your use-case.
Can you further explain the scenarios in which explicit waits are needed? Also, does the Ruby API handle this better?
I know that client-side binding imposes some bad interactions with this API (see #54). I'd wish that there was better a WebDriver API available for this, but we can probably cover it up at this level.

Thanks for the reply!
So Selenium's concept of an implicit wait, which is the length of time that it'll wait if it can't perform an action immediately, is more of a default time and changing that time repeatedly isn't ideal. Instead, Selenium has explicit waits which can be thought of as one-off overrides.
An actual use case of mine is automating video playback verification: I need to know that playback has started and one way I can do that is waiting for a data field showing the current play-head to be greater than 0.
Ruby's implementation looks like this:
# Create a wait with the desired time.
wait = Selenium::WebDriver::Wait.new(timeout: 60)

# Use wait.until to repeatedly run the provided code block
# until:
#   It comes back as true.
# or
#   It fails
# If the block returns true at any time before the wait
# time, then it'll continue on with code execution
wait.until { @driver.find_element(id: 'currentime').text.to_f.positive? }

Here's Ruby's implementation &
here's Java's implementation of it
Ultimately it's a shortcut for manually specifying sleeps and whatnot; it's just really useful.

I'm open to an addition like that. On one hand, I'm hesitant to provide functionality in the main interface that can be easily accomplished by the caller in a simple loop. On the other, I think this is oft-repeated functionality that other language APIs already have.
If you're interested in adding this, can you first make a proposal of what the caller would look like? (The proposal can either be here or take the form of a PR with a test). Do any other Go APIs have a similar function that we can borrow from? Should this be a helper function in the package or an addition to the existing WebDriver type?
Thanks for volunteering!

@minusnine I have a proposal, something like how it's done in Node.js and Java.

Add a condition type that is alias to a function that returns func(arguments) bool
Add a webdriver.Wait(cond condition, timeout int, interval int) (and also aliases with 1 and 2 arguments that uses default timeout and interval) that runs a for loop, where it checks for the result of the condition and then sleeps for interval, or fails if there's a timeout.
Probably write some internal helpers, like .urlIs(s string), titleIs(s string)  and so on (not sure which is the better way to implement it though).

That way we would have the ability to write a code this way:
webdriver.Wait(func() func() bool {
    return webdriver.Title() === ""Google
}(), 30 * time.Second)

I can make a PR on the first 2 points, if you are interested.

Thanks for the concrete suggestion.
Does it really have to be a func() func() bool? I think providing a closure that is a func() bool would be sufficient.
One other minor problem with the example is that errors are not handled. One of the most common wait conditions is for an element to exist, which can be tested using FindElement, and which returns an error if no element is found.
One way to handle this would be to require that the closure be a func() (bool, error). Either the caller or selenium.Wait would have to distinguish whether the error should allow waiting to continue or whether the error is terminal. The API would be that selenium.Wait waits until the bool return parameter is true or an error occurs.
So then selenium.Wait needs to return an error to indicate if the function returned because the condition became true or for another error.
(I admit that Go's error handling dogma in this case of small utility functions is slightly less elegant compared to other exception-based languages).
I'd be happy to continue this discussion over a PR.
As for the chaining suggestion, I'd rather leave that to a separate, higher-level package that provides syntactic sugar.

@minusnine I've thought about func() func() bool being too much for this, but the thing is, I want to have the ability to pass the function as the argument (like in my example):
webdriver.Wait(webdriver.Conditions().TitleIs("Google"), 30 * time.Second)

I want also to implement some basic conditions support, so the user would just pass a function, like in the example above. The problem is, the implementation need to call the function that is passed, and that means that this argument function should return another function that would be called from .Wait(). That's why I proposed to do it this way (btw, in Node.js it's done exactly this way). I don't see a solution how it could be solved in another way, feel free to suggest something if you know how to do it better ;)
(I don't have that much experience with Golang, in fact I started learning it 2 weeks ago, but I have a lot of experience with Node)
As for error handling, I think you're totally right, the selenium.Wait() should definitely return an error, either in the case of timeout or function execution error. I just didn't include it for the case of the simplicity of the example.
About the chaining, what do you mean?

By "chaining", I meant "method chaining". This isn't often used in idiomatic Go, often because this prevents error handling in the intermediate functions, since we lack exceptions and handling multiple return values must be explicit.
I still don't think a func() func() bool is appropriate, but a func() (bool, error) is sufficient, since the func() will close over the WebDriver instance. In your most recent example, the TitleIs function could return a func() (bool, error) if it were to obtain the selenium.WebDriver instance somehow. One way would be to have Conditions take it as an argument:
err := selenium.Wait(selenium.Conditions(wd).TitleIs("Google"), 30 * time.Second)
err := selenium.Wait(selenium.Condition{Driver: wd, Title: "Google"}, 30 * time.Second)

Or add it to the Wait API, where Wait would know how to handle a Condition:
err := selenium.Wait(wd, selenium.Condition{Title: "Google"}, 30 * time.Second)

or to make Wait part of the WebDriver interface:
err := wd.Wait(selenium.Condition{Title: "Google"}, 30 * time.Second)

I also highlight that I don't think there needs to be a Conditions function. I could see having a factory function like TitleIs that produces a type that can be consumed by Wait, but it could also just be a struct. Or, that type produced by the TitleIs function could be a closure of type func() (bool, error), a pure function of type func(d WebDriver) (bool, error), or something else.
I would prefer to not add to the WebDriver interface if possible, since I'd like to get rid of that interface (#72), but this isn't a hard requirement.
For the record, another consideration (which I'm not sold on either) could be to use a context.Context, which is used for deadline and cancellation propagation, instead of a time.Duration:
ctx, done := context.WithTimeout(ctx, 30*time.Second)
defer done()
err := selenium.Wait(ctx, selenium.Condition(wd).TitleIs("Google"))

This provides more flexibility on how waiting is terminated, at the cost of a lot more typing if you aren't already using contexts, which I suspect most WebDriver-oriented tests are not. Plus, there is no way currently to cancel outgoing requests at the moment, but this will change (#71).
A more complicated and more expressive API idea is fine, but I'd like to keep only the basics in this package. This package should handle the low-level boundary between the WebDriver protocol and client operations with it, plus supporting setting up the infrastructure needed to speak the protocol. This package should encourage other packages to build more expressiveness, if that is what is needed.
I think I'm still partial to the simple case, maybe with helper functions for the common scenarios:
package selenium
func Wait(d time.Duration, func() (bool, error)) error { ... }

package condition  // maybe?
func TitleIs(wd selenium.WebDriver, s string) func() (bool, error) { ... }
func Exists(wd selenium.WebDriver, by, value string) func() (bool, error) { ... }
func Visible(wd selenium.WebDriver, by, id string) func() (bool, error) { ... }

package some_test
if err := selenium.Wait(30*time.Second, condition.TitleIs(wd, "Google")); err != nil { ... }

or, shifting wd around:
package selenium
func Wait(wd WebDriver, d time.Duration, func(wd WebDriver) (bool, error)) error { ... }

package condition  // maybe?
func TitleIs(s string) func(wd WebDriver) (bool, error) { ... }
func Exists(by, value string) func(wd WebDriver) (bool, error) { ... }
func Visible(by, id string) func(wd WebDriver) (bool, error) { ... }

package some_test
if err := selenium.Wait(wd, 30*time.Second, condition.TitleIs("Google")); err != nil { ... }

and possibly adding, as you suggested:
type Condition func(wd WebDriver) (bool, error)

which reduces a bit of verbosity in either of the two options above.

@minusnine I like your approach actually.
I think I'll implement selenium.Wait() function that accepts func (wd Webdriver) (bool, error), and create the package that provides the syntax sugar for creating such conditions.

Fantastic! Thank you!
Unfortunately, I will only be able to look at this next Wednesday, as I'm
at the airport for a camping trip and without a real computer. I apologise
for the delayed.
On Wed, Aug 9, 2017, 01:46 Sergey Peshkov<EMAIL_ADDRESS>wrote:

@minusnine https://github.com/minusnine I like your approach actually.
I think I'll implement selenium.Wait() function that accepts func (wd
Webdriver) (bool, error), and create the package that provides the syntax
sugar for creating such conditions.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tebeka/selenium/issues/62#issuecomment-321158856, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAG27nP1s9I8LrQtbM1bKxtiv17ygzAVks5sWUfFgaJpZM4NYSHo
.

@minusnine yeah, sure, just don't forget about it.
Have a nice trip!

@serge1peshcoff just committed 988bde7, which adds an API for waiting for a condition.
I still think adding a few common (read: used often) condition functions as in the commentary above could be useful.

@minusnine I've actually started working on this already: https://github.com/serge1peshcoff/selenium-go-conditions
For now there are only a few wrappers, but I'm going to implement at least basic conditions helpers/wrappers in the future, like in Node.js/Java/other bindings.

Ok. I'd be open to a PR that adds a new package to this repository for those helper functions, mostly because I'd want to use a subset of them within the existing tests, without a circular dependency. Either way works, though!

@minusnine I suggest that you implement some basic helpers and I would implement some advanced helpers in my library, will that do?

Sounds good.


InstanceRef returned for a closure is not valid

The InstanceRef returned for a bound closure contains fields closureFunction and closureContext. However, these fields are only valid for an actual Instance.
Example returned BoundVariable:
{"type":"BoundVariable","name":"b","value":{"type":"@Instance","_vmType":"Closure","class":{"type":"@Class","fixedId":true,"id":"classes\/46","name":"_Closure","_vmName":"_Closure@0150898"},"kind":"Closure","id":"objects\/10","closureFunction":{"type":"@Function","fixedId":true,"id":"classes\/1099\/implicit_closures\/1","name":"staticOnClass","owner":{"type":"@Function","fixedId":true,"id":"classes\/1099\/functions\/staticOnClass","name":"staticOnClass","owner":{"type":"@Class","fixedId":true,"id":"classes\/1099","name":"Foo"},"_kind":"RegularFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"_kind":"ImplicitClosureFunction","static":true,"const":false,"_intrinsic":false,"_native":false},"closureContext":{"type":"@Instance","_vmType":"Context","class":{"type":"@Class","fixedId":true,"id":"classes\/141","name":"Null"},"kind":"Null","fixedId":true,"id":"objects\/null","valueAsString":"null"}},"declarationTokenPos":714,"scopeStartTokenPos":723,"scopeEndTokenPos":891},{"type":"BoundVariable","name":"c","value":{"type":"@Instance","_vmType":"Closure","class":{"type":"@Class","fixedId":true,"id":"classes\/46","name":"_Closure","_vmName":"_Closure@0150898"},"kind":"Closure","id":"objects\/11","closureFunction":{"type":"@Function","fixedId":true,"id":"classes\/1099\/implicit_closures\/2","name":"instanceMethod","owner":{"type":"@Function","fixedId":true,"id":"classes\/1099\/functions\/instanceMethod","name":"instanceMethod","owner":{"type":"@Class","fixedId":true,"id":"classes\/1099","name":"Foo"},"_kind":"RegularFunction","static":false,"const":false,"_intrinsic":false,"_native":false},"_kind":"ImplicitClosureFunction","static":false,"const":false,"_intrinsic":false,"_native":false},"closureContext":{"type":"@Context","id":"objects\/12","length":1}},"declarationTokenPos":745,"scopeStartTokenPos":756,"scopeEndTokenPos":891}

I think this is WAI (Observatory seems to allow for these fields in @Instance objects), but the documentation is wrong. I'll go ahead and update it to match.

I think you'll need to update package:vm_service as well.

I think you'll need to update package:vm_service as well.

Yup, that was done as part of this CL. Published as 1.1.2.


Fix minor issue with year rendering in Calendar.tsx

Description
Check if YEAR is a valid number. If YEAR is not a number, then just do not render the span tag.
Changes Made
Just one line in Calendar.tsx
Related Issues
N/A
Additional Notes
N/A
Before

After

We are sure that the year will be set before we start the app. It shouldn't be an issue.
If we don't have the year, the whole app should be error, not just hide it.


Activate code coverage

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (f498238) 100.00% compared to head (6cb5cc8) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #13   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            1         1
  Lines            7         7
=========================================
  Hits             7         7

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


Update verbiage about default Container Runtime to Containerd

In the Nodes and node pools section it says "In AKS, Moby is used as the container runtime"

The container runtime is the component that allows containerized applications to run and interact with additional resources such as the virtual network and storage. In AKS, Moby is used as the container runtime.

Moby is no longer the default runtime since 1.19 and I believe this documentation should be updated to reflect the new default. See Container runtime configuration for the new defaults. The language should match and possibly link together.

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

ID: a445f8cc-6581-ad43-1dba-719a94eda81a
Version Independent ID: 31280746-d8de-91b4-d430-91693c2e869d
Content: Concepts - Kubernetes basics for Azure Kubernetes Services (AKS) - Azure Kubernetes Service
Content Source: articles/aks/concepts-clusters-workloads.md
Service: container-service
GitHub Login: @mlearned
Microsoft Alias: mlearned

Closing. Duplicate of #68996


let-else binding in macro-rules makes unintended indent forever

For example, if one runs rustfmt on the following rust code
macro_rules! fmt_wrong {
    ($foo: ident := $bar: expr) => {
        let Some($foo) = $bar else {
            return; // This
        }; // This
    };
}

fn main() {
    println!("Hello, world!");
}

is formatted by indenting This parts. Each time one runs rustfmt, This parts are indented as much as we want.

Thanks for reaching out. This is a duplicate of #5213 and other related issues. This issue will be resolved once let-else formatting is added to rustfmt. You can follow #4914 to be informed when let-else support is available.
To prevent this issue your best option would be to use the #[rustfmt::skip] attribute when writing a macro with let-else.
#[rustfmt::skip]
macro_rules! fmt_wrong {
    ($foo: ident := $bar: expr) => {
        let Some($foo) = $bar else {
            return; // This
        }; // This
    };
}


feat(server): gRPC + REST API with protobuf + OpenAPI schemas

refactor(sdk): Improve model naming and semantics
feat(server): Add protobuf schema and service
chore(server): Add generated stubs + OpenAPI schema
feat(server): Implement gRPC + HTTP server

Getting merged 4 months in. Quick enough I guess :slightly_smiling_face:


[FEATURE] Barbarian - Pact of Wild Magic - Tasha's Cauldron of Everything

Describe the new feature
Tasha's Cauldron of Everything added a Primal Path for the Barbarian class called Path of Wild Magic. At 3rd level the PC gains a Path of Wild Magic feature that causes a roll against a shorter table whenever Rage is used.
Expected behavior
It would be great to have this new Pact of the Wild Magic included in this module.
Additional Information
The source content and roll table can be found in Tasha's Cauldron of Everything.

Note for myself
Source: https://www.dndbeyond.com/sources/tcoe/barbarian#PathofWildMagic
Given I am a Barbarian
And I have the feat Path of Wild Magic
When I cast Rage
I roll on a Custom Wild Magic Table
Requirements

Add additional options menu
Set custom Wild Magic Table for this feat
Add a check like Sorcerer for the above configuration


Sourcemaps Path Incorrect

We use gulp-sass and gulp-sourcemaps on an open source framework called Phoenix and are currently prepping a new release.  Updating gulp-sass from 1.3.3 to 2.0.1 introduced an issue where the path to source SCSS files for gulp-sourcemaps are missing a directory.
1.3.3:

2.0.1:

Note that as of gulp-sass 2.0.1 the css directory is missing from the path, thereby loading empty files in the Chrome inspector.  Is this an issue with gulp-sourcemaps or gulp-sass?  If you need additional details or information about how to get our code up and running locally to see for yourself, let me know.
I've posted this issue on gulp-sourcemaps as well.

Pretty sure this fixes it: https://github.com/dlmanning/gulp-sass/pull/286
Can you confirm?

What does your pipe stream look like?

Here's our pipe stream:
https://github.com/connectivedx/Phoenix/blob/master/Assets/src/build/drivers/css.js
cc @elseloop

I have same issue. I  compile sass to css only, the issue still occur.

Same issue here, I also get completely random references to partials.
E.g. the class ".btn", only found in "theme/objects/_btn.scss" when inspected shows references to "_typography", "_forms", etc.
Completely unrelated files :)

Yep, same issue sources array is empty.

Maybe this helps anyone. I've finally figured out, how to fix the empty sourcemap files by using sourceRoot as a function.
I have the following setup:
files:
main-file 1: <src-dir>/src/scss/app/main.scss
main-file 2:  <src-dir>/src/scss/utils/utils.scss

pipe stream
return gulp.src('**/*.scss',
    { cwd: '<src-dir>/scss' }
)
    .pipe( sourcemaps.init() )
    .pipe( sass() )
    .pipe( sourcemaps.write('.', {
        includeContent: true,
        sourceRoot: function(file) {
            var dir = path.dirname(file.relative);
            return path.join('<src-dir>', 'scss', dir);
        }
    }) )
    .pipe( filterMap.restore({ end: true }) )
    .pipe( gulp.dest('<dist-dir>/scss/dist') );

The underlying problem is that gulp-sourcemaps usese file.base when no sourceRoot is provided. file.base is not necessarily the directory the source files are in. So I needed to correct the sourceRoot according to the current main file.
This may not be the cause for everyone's problems here, as the problems described in this issue thread are different from each other.

This issue might be duplicated by #319

Closing as there is #394 which is more recent


Store modifiers sparsely when there are only a few.

The maximizer spends most of its time in Modifiers::add, so that's a prime target for improvements. Every time that function runs, it iterates over all 145 elements of Modifiers::doubles to add any double modifiers on the right-hand side to the Modifiers on the left-hand side. In the vast majority of cases, this is used to accumulate modifiers for e.g. an item onto an object that is accumulating all modifiers for the player. In these cases, the right-hand side will have an effectively sparse doubles array.
This all means that it makes more sense to store Modifiers as sparse, rather than dense, arrays until they reach a certain size. The intuition is that we want the right-hand side in add to be sparse and the left-hand side to be dense. This PR does just that.
Seems to be a 10-15% speedup on the benchmark I posted earlier.

Not sure what is going on with the checks, I think they're okay.

What's the perf if you just always use a Map (probably a HashMap, as I don't think order matters in that case)?

The naive version using HashMap is not good, equivalently bad to the current code, unless you put in some more sophisticated logic to pick the size. There are a few issues:

As the Modifiers object that acts as an accumulator grows, it triggers multiple resizes of the HashMap which need to copy every value.
The default HashMap capacity is 16, so any add() call has to iterate over 16 entries in the RHS to find the modifiers to add. Neither reducing nor increasing the initial capacity helps.
It seems be spending a lot of time calling HashMap::hash, which should be fast for integer keys. I'm not sure exactly why. Maybe boxing/unboxing. Or the profiler might be confused.

I think you'd need some kind of densify function that upsized it when accumulating onto, which would end up looking a lot like this PR in terms of complexity.
Using a TreeMap doesn't work very well either, since it has to spend lots of time traversing the tree of the LHS.

I'm concerned about the apparent increase in complexity in the code. If the perf change is significant, could you make a class that stores either a map or an array, and do all the logic to get / set / iterate inside that? e.g. getInternal, densify, the set logic, etc.

It's tricky because the add methods tie together other logic in Modifiers with the updates to the data structure itself. I'll keep thinking about it and report back.

Okay, how's this? @midgleyc

Sorry, there was a test failure caused by an NPE. Needs to be looked at again :)

Conflicts resolved.


Can we get a figma for visualisation purposes please?

Is your feature request related to a problem? Please describe.
I am a designer and I'd love to be able to use these components in my projects. But I don't code like many other designers. I want to be able to visualise these components in my own theme / fonts / use cases etc. so that my team can develop it accordingly.
Describe the solution you'd like
Perhaps a figma file that has these components, even static versions would suffice. This way I'd be able to demonstrate the designs in the appropriate use cases with custom themes to the team for approval before it goes into dev.
Describe alternatives you've considered
If not a figma file, a way to at least theme the components and view them so that I can grab screenshots from the website and use it in my design demos maybe?
Additional context
Google's Material design system for example has interactive components on their website but they also have a static version of all the components available as a figma file published to the community. I think this could boost collaboration and promote designers to use this library in their work too. This is a major a workflow issue that is currently limiting my use of this library.

Hi!
This is an interesting idea but difficult in practice since "animated landing page components" isn't really standardized in any way. It's more of a cherry-picked collection of effects and animations.
Definitely appreciate the interest and I think it'd be a really good idea but I won't be able to support it myself at the current moment.
However, I'm really open to any contributions from the community!


Use spawn instead of fork in root saga and add fake error handling so…

… that a failed call doesn't make app unresponsive

To kill the app and see this issue, put a debugger right before the call to reddit and replace the URL with something that will fail.

One thing I dont understand - why did you change forks to spawns?

@Andarist to avoid killing all the sagas on any single http call error
Related to https://github.com/yelouafi/redux-saga/issues/570

@slorber
but that is already handled by try/catch over yield call(fetchPosts, reddit)

That's right @Andarist :) still I believe sagas should be isolated from each others, it's easy to forget catching errors and make your whole app unusable

@Andarist @slorber Yes, I am handling all errors in the try/catch because the catch just swallows them and doesn't re-throw. I think to make the example more clear, I could handle certain types and then re-throw the rest.  I'm very very open to suggestions, but this example caused confusion for me when I was a newcomer to saga (which, granted, was only like two months ago).

Or maybe we should be using the task.done.catch feature in the root saga? Mainly, I just want this example to highlight a good, idiomatic pattern for the problem of top level exception handling / not killing all your sagas on an unhandled exception.

Would something like this work for centralized error handling in all sagas in an app?
function* rootSaga () {
  yield sagas.map(saga =>
    spawn(function* () {
      while (true) {
        try {
          yield call(saga)
        } catch (e) {
          console.log(e)
        }
      }
    })
  )
}

Or would it possibly cause complex bugs due to scheduling issues internal to redux-saga? I'm wondering if something could get messed up going from the catch back to the try. Assuming this all happens synchronously, there should be no problem, right? Or wrong?

@granmoe uncatched errors are automatically logged as far as I know so it's not really worthy to catch just for logging unless you customize error message
There are multiple ways that you can do.
Personnally in my app I'm simply doing:
    sagas.forEach(saga =>
      runSaga(saga,reduxSagaIO)
    );

Sorry, my console.log is just an example (a confusing one)! We will be sending uncaughts through an error monitoring service. What is 'runSaga' and 'reduxSagaIO' in your example?

Nevermind, I found runSaga in the docs

I would still be curious to see your reduxSagaIO.  Or do you handle that in reduxSagaIO?

@granmoe I have a special setting, because I actually make Redux-saga work on top of a legacy framework I have that is not redux (we'll migrate someday to redux)

OK, I pushed a new commit with my top level error handling solution. My only concern is if a situation happens, somehow, where calling the saga itself triggers an exception synchronously, how should that be handled? Maybe something like this to prevent infinite synchronous exceptions from a saga?
  yield sagas.map(saga =>
    spawn(function* () {
      let hasError = false
      while (!hasError) {
        try {
          setTimeout(() => { hasError = false }, 0)
          yield call(saga)
        } catch (e) {
          hasError = true
          handleError(e)
        }
      }
      throw new Error('Unrecoverable exception thrown while spawning saga', saga)
    })
  )

I'm kind of questioning this whole idea now. Maybe it would be better to rip out the while (true) that I have at the top here and instead just send the error to whatever logging/monitoring service you want to use and then re-throw. Handle network errors at the source and don't ever throw anything in a saga that you don't explicitly handle.

I'm going to close this for now and possibly come back to it. It would be great to get a consensus from the community regarding the right approach here.


Edit Docker command on Low Latency Reads and Writes in a Multi-Region Cluster Doc

Re: Low Latency Reads and Writes in a Multi-Region Cluster
Issue Description
the following command is incorrect
sudo docker run -it --rm cockroachdb/movr:19.09.2 --app-name "movr-load" --url "postgres://root@<address of HAProxy in US East>:26257/movr?sslmode=disable" load --num-users 100 --num-rides 100 --num-vehicles 10 --city-pair us_east:"new york" --city-pair central:chicago --city-pair us_west:seattle

it fails with unrecognized argument error
Suggested Resolution
change to
sudo docker run --rm cockroachdb/movr:19.09.2 --app-name "movr-load" --url "postgres://root@<IP_ADDRESS>:26257/movr?sslmode=disable" load --num-users 100 --num-rides 100 --num-vehicles 10 --city "new york" --city "chicago" --city "seattle"

@taroface I think this is relevant to deploy ops, but feel free to reroute if you think otherwise.

Will <address of HAProxy in US East> now be hardcoded as
root@<IP_ADDRESS>:26257?

@mokaixu Thank you for taking this issue! I think you're right that --city-pair is what needs to be updated and not <address of HAProxy in US East>.

@taroface Cools! Changed as per your comments :)

@dbist Can you clarify which version you used to run the revised command?

must've been 20.1 at the minimum, this was back in October, my memory fails me.


Check that /partyinfo/validate message is UUID

Return a 400 if the /partyinfo/validate request body is not a UUID & return an empty response so the caller fails validation.

Codecov Report

Merging #1113 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##             master    #1113   +/-   ##
=========================================
  Coverage     99.35%   99.35%
- Complexity     2326     2328    +2
=========================================
  Files           364      364
  Lines          6516     6523    +7
  Branches        376      377    +1
=========================================
+ Hits           6474     6481    +7
  Misses            5        5
  Partials         37       37

Flag
Coverage Δ
Complexity Δ

#unittests
99.35% <100.00%> (+<0.01%)
2328.00 <4.00> (+2.00)

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

Impacted Files
Coverage Δ
Complexity Δ

...java/com/quorum/tessera/p2p/PartyInfoResource.java
100.00% <100.00%> (ø)
17.00 <4.00> (+2.00)

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 f8ca31a...b650831. Read the comment docs.


Removing site does not lower tracked entities

I have been having UPS issues with YARM for a while now in my heavily modded save (1000h+) where it is causing on average 300ms lag per tick. I tried cutting the number of sites by more than half (it was very high), but it did nothing to improve UPS. I ran /c remote.call("YARM", "how_many_entities_tracked", game.player.name) before and after deleting sites but the number did not change at all. I tested this in a blank map with no other mods, but the number of entities tracked still did not change. Is it possible there is a problem with the site deletion process that results in "deleted" sites still being tracked?
EDIT: After going through the code it seems this is exactly what is happening. It deletes the "site" from the list of sites, but not the entities that were in the site. Whether a site is removed before or after depletion does not seem to make a difference. The list of entities scanned can only grow, it is never cleaned up. Was this by design?

I modified the add_entity function in ore_tracker.lua to add entity.timestamp to each entity, passed from current_site.added_at. From there, I modified the remove_site function in resmon.lua to iterate through both the position_cache and the global.ore_tracker.entities table and sets all entities where the site.added_at for the site being removed matches the entity.timestamp. It also checks the ore type just as a failsafe. I also added global.ore_tracker.max since the length of ore_tracker cannot be used reliably as index anymore. After brief testing (like 5 minutes spamming stuff), it finally did not crash. I've never used Lua before and have no experience modding anything so it's very likely I broke a bunch of stuff elsewhere. I also know I have not accounted for migration from existing saves, but that can be dealt with later. This was mostly just a proof of concept for me.
`function resmon.on_click.remove_site(event)
local site_name = string.sub(event.element.name, 1 + string.len("YARM_delete_site_"))
local player = game.players[event.player_index]
local force_data = global.force_data[player.force.name]
local site = force_data.ore_sites[site_name]

**if site.deleting_since then
    for k,v in pairs(global.ore_tracker.entities) do
        if v.timestamp == site.added_at and v.entity.name == site.ore_type then
            ore_tracker.position_cache[string.format("%d,%d", global.ore_tracker.entities[k].position.x * 100, global.ore_tracker.entities[k].position.y * 100)] = nil
            global.ore_tracker.entities[k] = nil
        end
    end**

    force_data.ore_sites[site_name] = nil

    if site.chart_tag and site.chart_tag.valid then
        site.chart_tag.destroy()
    end
else
    site.deleting_since = event.tick
end

resmon.update_force_members_ui(player)

end`
and
`function ore_tracker.add_entity(entity, added_at)
if not entity or not entity.valid or entity.type ~= "resource" then return nil end
if not global.ore_tracker or not global.ore_tracker.entities then
    global.ore_tracker = {
        entities = {},
    }
    **global.ore_tracker.max = 1**
end

local position_key = position_to_string(entity.position)
if ore_tracker.has_entity(entity) then
    local its_index = ore_tracker.position_cache[position_key]

    -- We're accessing the entity.position anyway, let's also use this
    -- opportunity to update the tracker values (and be 1000% certain
    -- that it's tracking the right entity).
    local tracking_data = global.ore_tracker.entities[its_index]
    tracking_data.entity = entity
    tracking_data.valid = entity.valid
    tracking_data.position = entity.position
    tracking_data.resource_amount = entity.amount

    return its_index
end

-- Otherwise, create the tracking data and store it, including position_cache
local entities = global.ore_tracker.entities
**local next_index = global.ore_tracker.max
global.ore_tracker.max = global.ore_tracker.max + 1**

entities[next_index] = {
    entity = entity,
    valid = entity.valid,
    position = entity.position,
    resource_amount = entity.amount,
    timestamp = added_at`

I modified the add_entity function in ore_tracker.lua to add entity.timestamp to each entity, passed from current_site.added_at. From there, I modified the remove_site function in resmon.lua to iterate through both the position_cache and the global.ore_tracker.entities table and sets all entities where the site.added_at for the site being removed matches the entity.timestamp. It also checks the ore type just as a failsafe. I also added global.ore_tracker.max since the length of ore_tracker cannot be used reliably as index anymore. After brief testing (like 5 minutes spamming stuff), it finally did not crash. I've never used Lua before and have no experience modding anything so it's very likely I broke a bunch of stuff elsewhere. I also know I have not accounted for migration from existing saves, but that can be dealt with later. This was mostly just a proof of concept for me.
function resmon.on_click.remove_site(event)
    local site_name = string.sub(event.element.name, 1 + string.len("YARM_delete_site_"))

    local player = game.players[event.player_index]
    local force_data = global.force_data[player.force.name]
    local site = force_data.ore_sites[site_name]

    if site.deleting_since then
        for k,v in pairs(global.ore_tracker.entities) do
            if v.timestamp == site.added_at and v.entity.name == site.ore_type then
                ore_tracker.position_cache[string.format("%d,%d", global.ore_tracker.entities[k].position.x  100, global.ore_tracker.entities[k].position.y  100)] = nil
                global.ore_tracker.entities[k] = nil
            end
        end

        force_data.ore_sites[site_name] = nil

        if site.chart_tag and site.chart_tag.valid then
            site.chart_tag.destroy()
        end
    else
        site.deleting_since = event.tick
    end

    resmon.update_force_members_ui(player)
end

and
function ore_tracker.add_entity(entity, added_at)
    if not entity or not entity.valid or entity.type ~= "resource" then return nil end

    if not global.ore_tracker or not global.ore_tracker.entities then
        global.ore_tracker = {
            entities = {},
        }
        global.ore_tracker.max = 1
    end

    local position_key = position_to_string(entity.position)
    if ore_tracker.has_entity(entity) then
        local its_index = ore_tracker.position_cache[position_key]

        -- We're accessing the entity.position anyway, let's also use this
        -- opportunity to update the tracker values (and be 1000% certain
        -- that it's tracking the right entity).
        local tracking_data = global.ore_tracker.entities[its_index]
        tracking_data.entity = entity
        tracking_data.valid = entity.valid
        tracking_data.position = entity.position
        tracking_data.resource_amount = entity.amount

        return its_index
    end

    -- Otherwise, create the tracking data and store it, including position_cache
    local entities = global.ore_tracker.entities
    local next_index = global.ore_tracker.max
    global.ore_tracker.max = global.ore_tracker.max + 1

    entities[next_index] = {
        entity = entity,
        valid = entity.valid,
        position = entity.position,
        resource_amount = entity.amount,
        timestamp = added_at

I have my implementation working quite reliably now, although I haven't tested it outside of basic use. I think I also fixed an issue where map pins were left behind occasionally. All that is left for me is to find a way to migrate data from previous versions. I can post it here once I figure it out. Fair warning, this is my first time using LUA or modding anything in general, so it's very likely there are better ways to achieve what I have done, and it's also likely there are a bunch of bugs I did not catch.
Separately, I noticed that extending sites was broken, although fixing that is beyond my abilities, and I have never had a use for it personally.

I came up with my own fix for this issue, feel free to reach out if you would like to test it and use it.


Listing doesn't work for KPIs

Example

@jakcpto
the same question here - whats wrong with MDX, seems like the problem goes from back.
How should it work correctly?

Request needed which will allow to make request for KPI drillthrough

MDX based KPI - mdx drill through
SQL based KPI - new approach? end point for KPI-drill through
KPI - type from MDX2JSON
new MDX2KSON method

re-work to keep secure

@evshvarov take a look on this code. Eduard says that we have to take sql directly from kpi. What if we try this?

TestSQL gets the kpi name, fetches the sql, checks the sql query if everything is ok and returns it for further execution

@eduard93 means that end-point shouldn't expect SQL.
Could the end-point expect kpiname and necessaary params and then SQL will be formed from KPI callback on the server side?

@evshvarov yes it can. Work still in progress but here the preliminary result

format - drill through
Parameter Drillthrough:1 ...

Made quick changes to REST. KPI endpoint changed as requested
https://github.com/intersystems-ru/Cache-MDX2JSON/pull/98/files#:~:text=}-,ClassMethod KPIExecute() As %25Status,},-/// Wrapper for %23%23class

to check

@evshvarov checj after release

@eduard93 could you please merge this update

where we are here?

@evshvarov the new method gets values from KPIs, but tables are not displayed due to missing properties. At the moment, the method has returned what the KPI contains. Are these KPI issues or do we need to work on this further to get properties?

Example

find parser - columns sql

Here is the final result

Super!

The new method is on pie-chart already
https://pie-chart-bug.demo.community.intersystems.com/dsw/index.html#/USER/KPIs & Plugins/KPI with Listing.dashboard
The reason that only one column is shown is because the data properties only match on the product column, and the other three are not provided by the data source, which is a KPI

[ ] Ignore data property while drill through for KPI

[ ] back button

Done in 3.1.88

works!


BFArchive "extract" doesnt' work

BFarchive version =9.3.1
BFArchive.exe -a C:\TEM\ExploreActions.pdf archive1
--> archive1 is fine created and the content displayed:
BFArchive.exe -l archive1
C:/TEM/ExploreActions.pdf
But the extract fails:
BFArchive.exe -x archive1 decompress
Error: Failed to open or create file
-> decompress folder is being created but with nothing in it.
note: as per usage of the tool:
BFArchive.exe
Usage:
bfarchive -a
bfarchive -x  [target directory]
bfarchive -l
I can specify a source file or directory to compress but I discovered the extract issue is only when
I compress a single file as in the above example. Compressing an entire directory compress/extract run fine.

I'm unable to reproduce this. Can you verify the version of BFArchive that you're using with bfarchive --version, and list the exact sequence of commands along with the complete directory contents before and after. Like, is it possible that 'decompress' is a file not a folder? Is it possible you're not using version 9.3.?

Error Scenario :
C:\TEM\Tools\bfarchive-win-x64>BFArchive.exe -V
9.3.1
C:\TEM\Tools\bfarchive-win-x64>BFArchive.exe -a C:\TEM\ExploreActions.pdf archive1009
C:\TEM\Tools\bfarchive-win-x64>dir
Volume in drive C has no label.
Volume Serial Number is 9A19-F69B
Directory of C:\TEM\Tools\bfarchive-win-x64
09/10/2015  11:53 AM              .
09/10/2015  11:53 AM              ..
09/10/2015  11:53 AM            11,666 archive1009
09/10/2015  11:52 AM           262,144 BFArchive.exe
2 File(s)        273,810 bytes
2 Dir(s)   2,559,021,056 bytes free
C:\TEM\Tools\bfarchive-win-x64>BFArchive.exe -l archive1009
C:/TEM/ExploreActions.pdf
C:\TEM\Tools\bfarchive-win-x64>BFArchive.exe -x archive1009 decompress
Error: Failed to open or create file
C:\TEM\Tools\bfarchive-win-x64>dir
Volume in drive C has no label.

Volume Serial Number is 9A19-F69B
Directory of C:\TEM\Tools\bfarchive-win-x64\decompress
09/10/2015  11:54 AM              .
09/10/2015  11:54 AM              ..
0 File(s)              0 bytes
2 Dir(s)   2,558,951,424 bytes free

The problem occurs just in case you provide a full path in -a parameter.
In case you provide only the file name to archive, tool works fine:
C:\TEM\Tools\bfarchive-win-x64\BFArchive.exe -a ExploreActions.pdf archive_new
C:\TEM>C:\TEM\Tools\bfarchive-win-x64\BFArchive.exe -a ExploreActions.pdf archive_new
C:\TEM>C:\TEM\Tools\bfarchive-win-x64\BFArchive.exe -l archive_new
ExploreActions.pdf
C:\TEM>C:\TEM\Tools\bfarchive-win-x64\BFArchive.exe -x archive_new decompress_new
C:\TEM>dir decompress_new
Volume in drive C has no label.
Volume Serial Number is 9A19-F69B
Directory of C:\TEM\decompress_new
09/10/2015  11:59 AM              .
09/10/2015  11:59 AM              ..
07/14/2015  04:26 PM            14,325 ExploreActions.pdf
1 File(s)         14,325 bytes
2 Dir(s)   2,558,857,216 bytes free

Thanks! I understand.


std.algorithm.searching.extremum - fix float comp in unittest

@andralex @CyberShadow @Hackerpilot turns out that Dscanner also scans for this errors that slipped that slipped through. Travis should pass now ;-)
Maybe we should have autotester check Travis from now on...
Edit: for reference introduced by #4221

I'm not sure this is necessary. Seems like a false positive. Comparisons of two float literals are expected to be exact (except for NaN etc.), though might fail if the number gets in/out of a FPU register (which may or may not indicate a compiler bug).

I'm not sure this is necessary. Seems like a false positive.

It seems more like a bug, that I couldn't reproduce in other functions. Just rearranging the method solves the error. I hope this doesn't occur in the future...

Auto-merge toggled on


Model snapshots

Hi,
According to the readme, trains supports:

Model snapshots (With optional automatic upload to central storage: Shared folder, S3, GS, Azure, Http)

Indeed I do see references to google, azure and aws in the configuration example but no examples for an Http or shared folder.
I'd like to store my models on a nexus server which supports file upload through http POST.
Is it possible ?

Hi @elinep ,
Your observation is correct, model snapshots (and also artifacts) will be automatically copied if an experiment is initialized with output_uri destination,
In the following example, all model files and artifacts will be copied to sub-folders in /tmp/data
task = Task.init('examples', 'model test', output_uri='/tmp/data')

And here we will upload a copy of the models / artifacts to an http/s server using http post:
task = Task.init('examples', 'model test', output_uri='https://demofiles.trains.allegro.ai')

Notice that if you are working with http post, I recommend upgrading to the latest RC, as we increased upload timeouts after receiving feedback that sometimes uploads fail too quickly.
$ pip install trains==0.12.2rc0
Is this what you were looking for?

Thanks for your reply.
Indeed, this is the feature I was looking for.
I still have some questions:

Is it possible to put the output_uri in the trains.conf file?
The default artifact destination is set in trains.conf api.file_server. Why model parameters behave differently?

you can set the api.files_server in the trains.conf this will change the default artifacts upload destination, as well as the debug images destination. It will not cause Trains to store a copy of the model file in that destination though ...

I guess the reason for that is the thin line between auto-magic and being creepy :)

Now for a longer more tedious explanation on what and why we designed it this way.
Artifacts & debug images are uploaded by the user as an active function call, this creates full transparency to the fact they are actively being sent and stored somewhere ( i.e. api.files_server but can be changed in the SDK).
Models are copied auto-magically, i.e. you still call model.save but trains will catch this call and copy the model file to some central storage.
One option we had was to always have this behavior and constantly copy models to the trains-server. But we received feedback from users that during "debugging" they usually had very little use for these models, and constantly storing made little sense.
This is why we opted for logging the location of the model files stored, but not for copying them somewhere.
That said we allowed this behavior to be controlled through the UI, so when automating the training process with trains-agent (right-click Clone + right-click Enqueue) you can set the output_uri destination by editing the "Output Destination" in the "Execution" tab of the experiment.
This will cause the remotely executed experiment to auto-magically copy all the model files the experiments creates to the desired output destination.
@elinep feel free to suggest other strategies for logging/storing models, we always welcome new ideas :)

Thank you for your detailed answer.
In principle, I would not make any differences between images, curve data or models. In my opinion, it makes sense for Trains to intercept and save every production.
In practice, I understand that models can be heavy and that systematic copy might cause issues (disk space, latency when downloading/uploading from/to the file server)
Still, I feel like it would make sense to have a default model output_uri parameter in the config. Then we can optionally disable (or enable) the automagical model update during the task init. I guess in practice users don't change this address so often, it would be convenient to set it once for all.
What do you think?

I actually think this is a great approach!
My thinking is that we will add it to the trains.conf as following:
sdk.development.default_output_uri=""
Then when no specific output_uri is provided for Task.init(...) it will use the the default value from the configuration file. Obviously when running with trains-agent you will be overriding both in the UI, but the value appearing in the UI will be the last value used when executed "manually".
Sounds good?

:+1:
Thanks for your time.

Hi @elinep ,
I'm happy to say the default_output_uri feature is already in RC, you can start using it :)
$ pip install trains==0.12.2rc2

well done


Data model is not reacting to model changes

Steps to reproduce
Add two jsoneditors on the same html page and connect them to the same date model.
Change some values in one model and you will see that the other josonditor's model is not updated.
Live Demo
http://juicy.github.io/juicy-jsoneditor/
Screenshot

Seems to be old, and recurring Polymer binding issue, please try to addEventListener for change and notify the other elements (apply given patches if needed)

So that's the same issue as https://github.com/Starcounter/starcounter-debug-aid/issues/38.
If I understand correctly, you suggest to solve it in starcounter-debug-aid?


Output format to consumed by the 'Violations' publisher of jenkins

A like in tickett #177, I would like to integrate phan into my auto build systems.
One problem I'm experiencing is that the checkstyle is not ideal for me because

The Jenkins check style publisher doesn't have an option for multiple checkstyle source files (?) and I am already using phpcs with the checkstyle publisher.
Forcing a second checkstyle publisher by editing the config.xml directly will duplicate all user interface elements in a way that is incorrect.

One possible other solution would be to use the Jenkins violations publisher.
To do so, another output format from phan would be required.  If this output format would use the node name 'findbugs' for example, the existing Jenkins Violations plugin could be used to report on the phan output.

https://wiki.jenkins-ci.org/display/JENKINS/Violations

Hi @christopherowen. Can you link to any docs on what the format looks like, or example output we could copy?

There appears to be an example here at 'File #4: findbugs.xml with four  entries':
http://www.sw-engineering-candies.com/blog-1/howtotransformtheresultsfromfindbugscheckstyleandpmdintoasinglehtmlreportwithxslt20andjava#TOC-XML-from-Findbugs-Checkstyle-and-PMD-

https://github.com/etsy/phan/pull/368 was merged, adding the "pylint" option.
I have had success using the "pylint" output format with the Jenkins plugin, and the reported errors show up in the "Violations" view.
Not sure whether or not it supports multiple pylint report files, but it's easy to concatenate pylint reports.

I'm using pylint with Jenkins right now, and as I said, the violations view works properly.
Closing this since I haven't heard anything


Increase test coverage

Just do it!

Hi
Add TestFX to start improving coverage into AbstractJavaFxApplicationSupport #44
Chris.


Make Error Ubuntu 20.04.3 LTS

keyhunt.cpp: In function ‘int main(int, char**)’:
keyhunt.cpp:545:50: warning: format ‘%i’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
545 |      fprintf(stderr,"[E] Invalid Minikey length %i : %s\n",strlen(optarg),optarg);
|                                                 ~^         ~~~~~~~~~~~~~~
|                                                  |               |
|                                                  int             size_t {aka long unsigned int}

This is not a Error but a warning.The compiled file must already be in the folder.

What need I do ? Or is it normal ?

You don't need to do anything.
It is already compiled


new ATC staff changes

https://community.vatsim.uk/news/atc-training/appointment-training-group-instructor-tgnc-r279/

:tada: This PR is included in version 4.14.6 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


"Checking for quick fixes..." never solves on screen but response is on server

Does this issue occur when all extensions are disabled?: Yes/No

VS Code Version: 1.89.1
OS Version: Windows 11 - 10.0.22621

Steps to Reproduce:

Install eslint plugin
Setup eslint config
Create .js file with autofix available
Save file
Issue shows up in issues bar below
Hover over issue, and "Checking for quick fixes..." never resolves.
Review log on service is following

[Trace - 11:50:50 AM] Sending request 'textDocument/codeAction - (52)'.
Params: {
    "textDocument": {
        "uri": "file:///c%3A/Users/USER/workspace/REPO/common/app/lwc/component/component.js"
    },
    "range": {
        "start": {
            "line": 657,
            "character": 8
        },
        "end": {
            "line": 657,
            "character": 69
        }
    },
    "context": {
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 657,
                        "character": 8
                    },
                    "end": {
                        "line": 657,
                        "character": 69
                    }
                },
                "message": "Invalid reassignment of public property \"records\"",
                "code": "@lwc/lwc/no-api-reassignments",
                "codeDescription": {
                    "href": "https://github.com/salesforce/eslint-plugin-lwc/blob/v1.8.1/docs/rules/no-api-reassignments.md"
                },
                "severity": 1,
                "source": "eslint"
            }
        ],
        "only": [
            "quickfix"
        ],
        "triggerKind": 1
    }
}

[Trace - 11:50:50 AM] Received response 'textDocument/codeAction - (52)' in 1ms.
Result: [
    {
        "title": "Disable @lwc/lwc/no-api-reassignments for this line",
        "command": {
            "title": "Disable @lwc/lwc/no-api-reassignments for this line",
            "command": "eslint.applyDisableLine",
            "arguments": [
                {
                    "uri": "file:///c%3A/Users/USER/workspace/REPO/common/app/lwc/component/component.js",
                    "version": 6,
                    "ruleId": "@lwc/lwc/no-api-reassignments"
                }
            ]
        },
        "kind": "quickfix"
    },
    {
        "title": "Disable @lwc/lwc/no-api-reassignments for the entire file",
        "command": {
            "title": "Disable @lwc/lwc/no-api-reassignments for the entire file",
            "command": "eslint.applyDisableFile",
            "arguments": [
                {
                    "uri": "file:///c%3A/Users/USER/workspace/REPO/common/app/lwc/component/component.js",
                    "version": 6,
                    "ruleId": "@lwc/lwc/no-api-reassignments"
                }
            ]
        },
        "kind": "quickfix"
    },
    {
        "title": "Show documentation for @lwc/lwc/no-api-reassignments",
        "command": {
            "title": "Show documentation for @lwc/lwc/no-api-reassignments",
            "command": "eslint.openRuleDoc",
            "arguments": [
                {
                    "uri": "file:///c%3A/Users/USER/workspace/REPO/common/app/lwc/component/component.js",
                    "version": 6,
                    "ruleId": "@lwc/lwc/no-api-reassignments"
                }
            ]
        },
        "kind": "quickfix"
    }
]

settings.json
{
  "search.exclude": {
    "**/node_modules": true,
    "**/bower_components": true,
    "**/.sfdx": true
  },
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "salesforcedx-vscode-core.show-cli-success-msg": false,
  "editor.bracketPairColorization.enabled": true,
  "editor.guides.bracketPairs": true,
  "files.eol": "\n",
  "editor.formatOnSave": true,
  "[xml]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[html]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[visualforce]": {
    "editor.defaultFormatter": "salesforce.salesforcedx-vscode-visualforce"
  },
  "apexPMD.enableCache": true,
  "apexPMD.priorityErrorThreshold": 3,
  "apexPMD.priorityWarnThreshold": 5,
  "apexPMD.runOnFileChange": true,
  "files.exclude": {
    "**/.git": false
  },
  "xml.validation.schema.enabled": "onValidSchema",
  "eslint.useESLintClass": true,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "always"
  }
}

Updated and same result

cc. @dbaeumer seems like eslint is taking a lot of time here. do you have any insight on this?

@DougMidgley correct me if I am wrong but what you are seeing is that the server delivered the response (in the trace above in 1ms) but the UI never resolves.

@dbaeumer  exactly :)

@justschen the ESLint server delivered the result in 1ms :-)

@DougMidgley has updating to our latest Insiders and eslint extensions changed anything?

Hey,
Updates came in but still not working - I could also replicate this on other projects, can anyone else?
VSCODE
Version: 1.92.1 (system setup)
Commit: eaa41d57266683296de7d118f574d0c2652e1fc4
Date: 2024-08-07T20:16:39.455Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: <IP_ADDRESS>-electron.0
OS: Windows_NT x64 10.0.22621
ESLINT
Name: ESLint
Id: dbaeumer.vscode-eslint
Description: Integrates ESLint JavaScript into VS Code.
Version: 3.0.10
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint

@DougMidgley can you provide us with a GitHub repository we can clone with a minimal setup that reproduce this. It is very hard to say what is going on without a repro case.

Hey @dbaeumer  - sure thing https://github.com/DougMidgley/214771-checking-for-quick-fixes is not working, as per the above error. Using only most basic setup.

@DougMidgley actually, doesn't reproduce for me:
https://github.com/user-attachments/assets/a58b3e75-05f0-4fe8-8dc6-7a72d1717971
Any additional steps, setup instructions?

Tried full clean install and seems resolved. There was really nothing obvious causing it and uninstalling both extension and vscode app alone didnt work, only full clean reinstall.
https://code.visualstudio.com/docs/setup/uninstall covers the clean uninstall process.