iBeacon demo fails to detect beacons other than Kontakt.io's Beacon Pro (IDFGH-1027)

Environment

Development Kit:      [ESP32-Wrover-Kit]
Kit version (for WroverKit/PicoKit/DevKitC): [v4.1]
Module or chip used:  [ESP32-WROVER]
IDF version: v4.0-dev-402-ga20d02b7f
Build System:[Make]
Compiler version: crosstool-NG crosstool-ng-1.22.0-80-g6c4433a
Operating System:     [Linux]
Power Supply:         [USB]

Problem Description
iBeacon Demo project only detects Kontakt.io's Beacon Pro (https://store.kontakt.io/next-generation/32-beacon-pro-bp16-3.html), but no other beacon transmitting devices within it's proximity.
//Detailed problem description:
Downloaded the Beacon Simulator app (https://play.google.com/store/apps/details?id=net.alea.beaconsimulator&hl=en) on my phone to see other beacon transmitting devices within proximity, and they show up. But the ESP32 WROVER dev kit could not see them, except for the Kontakt.io's Beacon Pro. I tried setting up the Beacon Simulator app to be a transmitter, and detect it's beacon using another mobile phone with the same app, and it seems to be transmitting correctly, but the ESP32 WROVER dev kit still could not see it's beacon. I tried to move the Kontakt.io's Beacon Pro outside of the proximity to see if the ESP32 stops detecting it, and yes, it stopped detecting it, but could not see any other beacon transmitter (even though the Beacon Simulator app can see a lot).
Expected Behavior
ESP32-WROVER dev kit detects iBeacons within its proximity.
Actual Behavior
ESP32-WROVER dev kit can only detect Kontakt.io's Beacon Pro transmitter.
Steps to repropduce

Compile the ble_ibeacon demo project and program to the ESP32-WROVER dev kit.
Do a "make flash monitor" and check the results of the BLE scan to see if it detects any iBeacon devices.

Code to reproduce this issue
static esp_ble_scan_params_t ble_scan_params = {
    .scan_type              = BLE_SCAN_TYPE_ACTIVE,
    .own_addr_type          = BLE_ADDR_TYPE_PUBLIC,
    .scan_filter_policy     = BLE_SCAN_FILTER_ALLOW_ALL,
    .scan_interval          = 0x50,
    .scan_window            = 0x30,
    .scan_duplicate         = BLE_SCAN_DUPLICATE_DISABLE
};

static void esp_gap_cb(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param)
{
    esp_err_t err;

    switch (event) {
    case ESP_GAP_BLE_ADV_DATA_RAW_SET_COMPLETE_EVT:{
#if (IBEACON_MODE == IBEACON_SENDER)
        esp_ble_gap_start_advertising(&ble_adv_params);
#endif
        break;
    }
    case ESP_GAP_BLE_SCAN_PARAM_SET_COMPLETE_EVT: {
#if (IBEACON_MODE == IBEACON_RECEIVER)
        //the unit of the duration is second, 0 means scan permanently
        uint32_t duration = 0;
        esp_ble_gap_start_scanning(duration);
        ESP_LOGI(DEMO_TAG, "Starting BLE scan...");
#endif
        break;
    }
    case ESP_GAP_BLE_SCAN_START_COMPLETE_EVT:
        //scan start complete event to indicate scan start successfully or failed
        if ((err = param->scan_start_cmpl.status) != ESP_BT_STATUS_SUCCESS) {
            ESP_LOGE(DEMO_TAG, "Scan start failed: %s", esp_err_to_name(err));
        } else {
            ESP_LOGI(DEMO_TAG, "Scan start successful.");
        }
        break;
    case ESP_GAP_BLE_ADV_START_COMPLETE_EVT:
        //adv start complete event to indicate adv start successfully or failed
        if ((err = param->adv_start_cmpl.status) != ESP_BT_STATUS_SUCCESS) {
            ESP_LOGE(DEMO_TAG, "Adv start failed: %s", esp_err_to_name(err));
        } else {
            ESP_LOGI(DEMO_TAG, "Adv scan start successful.");
        }
        break;
    case ESP_GAP_BLE_SCAN_RESULT_EVT: {
        esp_ble_gap_cb_param_t *scan_result = (esp_ble_gap_cb_param_t *)param;
        switch (scan_result->scan_rst.search_evt) {
        case ESP_GAP_SEARCH_INQ_RES_EVT:
            /* Search for BLE iBeacon Packet */
            if (esp_ble_is_ibeacon_packet(scan_result->scan_rst.ble_adv, scan_result->scan_rst.adv_data_len)){
                esp_ble_ibeacon_t *ibeacon_data = (esp_ble_ibeacon_t*)(scan_result->scan_rst.ble_adv);
                ESP_LOGI(DEMO_TAG, "----------iBeacon Found----------");
                esp_log_buffer_hex("IBEACON_DEMO: Device address:", scan_result->scan_rst.bda, ESP_BD_ADDR_LEN );
                esp_log_buffer_hex("IBEACON_DEMO: Proximity UUID:", ibeacon_data->ibeacon_vendor.proximity_uuid, ESP_UUID_LEN_128);

                uint16_t major = ENDIAN_CHANGE_U16(ibeacon_data->ibeacon_vendor.major);
                uint16_t minor = ENDIAN_CHANGE_U16(ibeacon_data->ibeacon_vendor.minor);
                ESP_LOGI(DEMO_TAG, "Major: 0x%04x (%d)", major, major);
                ESP_LOGI(DEMO_TAG, "Minor: 0x%04x (%d)", minor, minor);
                ESP_LOGI(DEMO_TAG, "Measured power (RSSI at a 1m distance):%d dbm", ibeacon_data->ibeacon_vendor.measured_power);
                ESP_LOGI(DEMO_TAG, "RSSI of packet:%d dbm", scan_result->scan_rst.rssi);
            }
            break;
        default:
            break;
        }
        break;
    }

    case ESP_GAP_BLE_SCAN_STOP_COMPLETE_EVT:
        if ((err = param->scan_stop_cmpl.status) != ESP_BT_STATUS_SUCCESS){
            ESP_LOGE(DEMO_TAG, "Scan stop failed: %s", esp_err_to_name(err));
        }
        else {
            ESP_LOGI(DEMO_TAG, "Stop scan successfully");
        }
        break;

    case ESP_GAP_BLE_ADV_STOP_COMPLETE_EVT:
        if ((err = param->adv_stop_cmpl.status) != ESP_BT_STATUS_SUCCESS){
            ESP_LOGE(DEMO_TAG, "Adv stop failed: %s", esp_err_to_name(err));
        }
        else {
            ESP_LOGI(DEMO_TAG, "Stop adv successfully");
        }
        break;

    default:
        break;
    }
}

I (0) cpu_start: App cpu up.
I (865) heap_init: Initializing. RAM available for dynamic allocation:
I (872) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (878) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (884) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (890) heap_init: At 3FFBDB5C len 00000004 (0 KiB): DRAM
I (896) heap_init: At 3FFD4D80 len 0000B280 (44 KiB): DRAM
I (903) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (909) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (915) heap_init: At 4009188C len 0000E774 (57 KiB): IRAM
I (922) cpu_start: Pro cpu start user code
I (270) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (299) BTDM_INIT: BT controller compile version [484c057]
I (309) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (419) phy: phy_version: 4100, 2a5dd04, Jan 23 2019, 21:00:07, 0, 0
I (819) IBEACON_DEMO: register callback
I (829) IBEACON_DEMO: Starting BLE demo.

I (839) IBEACON_DEMO: Starting BLE scan...
I (839) IBEACON_DEMO: Scan start successful.

Other items if possible

[ ] sdkconfig file attached.
[ ] elf file in the build folder attached

sdkconfig.txt
ble_ibeacon_demo.elf.zip

ibeacon example only detects apple beacon,  please refer to esp_ibeacon_api.c :
/* For iBeacon packet format, please refer to Apple "Proximity Beacon Specification" doc /
/ Constant part of iBeacon data */
esp_ble_ibeacon_head_t ibeacon_common_head = {
.flags = {0x02, 0x01, 0x06},
.length = 0x1A,
.type = 0xFF,
.company_id = 0x004C,
.beacon_type = 0x1502
};
bool esp_ble_is_ibeacon_packet (uint8_t *adv_data, uint8_t adv_data_len){
bool result = false;
if ((adv_data != NULL) && (adv_data_len == 0x1E)){
    if (!memcmp(adv_data, (uint8_t*)&ibeacon_common_head, sizeof(ibeacon_common_head))){
        result = true;
    }
}

return result;

}

@marjon-halter Thanks for reporting the issue, feel free to reopen the issue if it still exists. Thanks.

Hello,
i can CONFIRM. a real iBeacon works.
ALL Apps in the Google Playstore i tested send out this Signature for a iBeacon (simulated)
02 01 06 1a 16 ee fd 03 05
while the REAL iBeacon according to Apples Spec would be:
02 01 06 1a ff 4c 00 02  15


Added the hidden key to the pack metadata file

Status
Ready
Related Issues
fixes: link to the issue
Description
Added the hidden key to the pack metadata file
Screenshots
Paste here any images that will help the reviewer

@bakatzir Doc review completed.


Select doesn't work well with Datatables, starting from version 0.96

As the title says, you can see from this fiddle http://jsfiddle.net/ebRXw/1323/ that when I select how many rows to show, the select doesn't close itself after i click a choise, but re-opens itself right away.
This doesn't happen with an older version of materializecss, for example 0.95.2: http://jsfiddle.net/ebRXw/1324/

Dear friends, has anyone managed to find a workaround for this issue?
Thank you,
Roberto

Is there any news on this subject?
Cheers,
Roberto

Anyone else having this issue?
Cheers,
Roberto

I have the same issue. Did you found any solution?

Same here. Is there any solution to this ?

I got the same problem as well, i have other select on the same page but they are working perfectly fine, only the select belonging to the Data Tables is showing this bug.
Is there a solution?

I made it work in very dirty way.. I'm currently detaching whole UL from DOM and attaching it again after 200ms. Something like this:
$("select")
        .change(function() {
            var t = this;
            var content = $(this).siblings('ul').detach();
            setTimeout(function () {
                $(t).parent().append(content);
                $("select").material_select();
            }, 200);
        });

maybe it'll help you :)

I made a hack too, maybe less intrusive.
$('.datables-container')
    .on('click', '.select-dropdown li', e => e.preventDefault()})

Please test this with the v1-dev branch.

I checked this on v1-dev and it is working


build issue

Does anybody have build issue? We download the source code and one maven dependency is not available. imageio is not available and only imageio-core is available. When try to resolve dependency one by one, stuck at org.bytedeco.javacpp-presets - caffe . Not sure exactly version used in this project.
I think this is a very basic thing to let other users leverage this contribution.

Have you tried using SBT? That is the way we are building the project. The maven file was contributed by @javadba and if it is currently broken, we should update or remove it.

Hi - the versions have changed in SparkNet and i will provide an update to the pom.xml by the coming weekend 7/4/16

Great, thanks a lot!

Hi Amplab folks:  I am unable to get maven to resolve your custom repository. Do you have any suggestions?
resolvers += "javacpp" at "http://www.eecs.berkeley.edu/~rkn/snapshot-2016-03-05/"
libraryDependencies += "org.bytedeco" % "javacpp" % "1.2-SPARKNET"
libraryDependencies += "org.bytedeco.javacpp-presets" % "caffe" % "master-1.2-SPARKNET"
libraryDependencies += "org.bytedeco.javacpp-presets" % "caffe" % "master-1.2-SPARKNET" classifier "linux-x86_64"
libraryDependencies += "org.bytedeco.javacpp-presets" % "opencv" % "3.1.0-1.2-SPARKNET"
libraryDependencies += "org.bytedeco.javacpp-presets" % "opencv" % "3.1.0-1.2-SPARKNET" classifier "linux-x86_64"
libraryDependencies += "org.bytedeco.javacpp-presets" % "tensorflow" % "master-1.2-SPARKNET"
libraryDependencies += "org.bytedeco.javacpp-presets" % "tensorflow" % "master-1.2-SPARKNET" classifier "linux-x86_64"
Here is what I have tried with maven:
    <repository>
        <id>javacpp</id>
        <url>https://www.eecs.berkeley.edu/~rkn/snapshot-2016-03-05</url>
    </repository>

..
    <dependency>
        <groupId>org.bytedco</groupId>
        <artifactId>javacpp</artifactId>
        <version>1.2-SPARKNET</version>
    </dependency>
    <dependency>
        <groupId>org.bytedco.javacpp-presets</groupId>
        <artifactId>caffe</artifactId>
        <version>1.2-SPARKNET</version>
    </dependency>
    <dependency>
        <groupId>org.bytedco.javacpp-presets</groupId>
        <artifactId>caffe</artifactId>
        <version>1.2-SPARKNET</version>
        <classifier>${platform}</classifier>
    </dependency>
    <dependency>
        <groupId>org.bytedco.javacpp-presets</groupId>
        <artifactId>opencv</artifactId>
        <version>1.2-SPARKNET</version>
    </dependency>
    <dependency>
        <groupId>org.bytedco.javacpp-presets</groupId>
        <artifactId>opencv</artifactId>
        <version>1.2-SPARKNET</version>
        <classifier>${platform}</classifier>
    </dependency>
    <dependency>
        <groupId>org.bytedco.javacpp-presets</groupId>
        <artifactId>tensorflow</artifactId>
        <version>1.2-SPARKNET</version>
    </dependency>
    <dependency>
        <groupId>org.bytedco.javacpp-presets</groupId>
        <artifactId>tensorflow</artifactId>
        <version>1.2-SPARKNET</version>
        <classifier>${platform}</classifier>
    </dependency>

None of these are able to be resolved.

Hi  I am on Mac.  I can not build due to the classifier for Mac are not built / stored on the amplab maven repo.
[ERROR] Failed to execute goal on project sparknet: Could not resolve dependencies for project org.amplab:sparknet:jar:1.0: The following artifacts could not be resolved: org.bytedeco.javacpp-presets:caffe:jar:macosx-x86_64:master-1.2-SPARKNET, org.bytedeco.javacpp-presets:opencv:jar:macosx-x86_64:3.1.0-1.2-SPARKNET, org.bytedeco.javacpp-presets:tensorflow:jar:macosx-x86_64:master-1.2-SPARKNET: Could not find artifact org.bytedeco.javacpp-presets:caffe:jar:macosx-x86_64:master-1.2-SPARKNET in javacpp (http://www.eecs.berkeley.edu/~rkn/snapshot-2016-03-05/) -> [Help 1]

So I have the updated pom.xml but can not test it.

OK it appears that the requirement were to build javacpp for mac locally: shown here;
https://github.com/bytedeco/javacpp-presets/wiki/Build-Environments
I will get back after attempting to use the locally built presets.

Wow. Building javacpp-presets is a big complicated deal. Is there any documentation you guys have about how to do it wrt SparkNet?

There are some instructions here https://github.com/amplab/SparkNet/blob/master/doc/creating-jars.md

Those instructions do not work for macos.  I have been following the instructions for macos from the javacpp-presets site.
After about an hour of compilations there is a failure on  "tar: Unrecognized archive format".  This is not a Sparknet project issue but a javacpp-presets project issue.  Overall this is just a big job to get javacpp-presets up and running on os/x.
I am going to create a separate issue specifically for os/x: the issues here are not for my pom.xml or even spark 2.X .

This issue should be marked as depending on  https://github.com/amplab/SparkNet/issues/139


Fix part of warnings for MSVC

(1) static_cast size_t to int
(2) convert time_t to int
(3) the other warnings related to type conversions are not fixed
(4) define a wrapper for getenv() to turn off CRT deprecation warnings.

PR
Author
Editor
Reviewers
Assignment
Approval
Merge

#4562
@adam-sim-dev
@tzanio
@najlkin + @acfisher + @v-dobrev
11/10/24
⌛due 11/24/24
⌛due 12/1/24

PR Checklist

[ ] Code builds.
[ ] Code passes make style.
[ ] Update CHANGELOG:

[ ] Is this a new feature users need to be aware of? New or updated example or miniapp?
[ ] Does it make sense to create a new section in the CHANGELOG to group with other related features?

[ ] Update INSTALL:

[ ] Had a new optional library been added? If so, what range of versions of this library are required? (Make sure the external library is compatible with our BSD license, e.g. it is not licensed under GPL!)
[ ] Have the version ranges for any required or optional libraries changed?
[ ] Does make or cmake have a new target?
[ ] Did the requirements or the installation process change? (rare)

[ ] Update continuous integration server configurations if necessary (e.g. with new version requirements for each of MFEM's dependencies)

[ ] .github
[ ] .appveyor.yml

[ ] Update .gitignore:

[ ] Check if make distclean; git status shows any files that were generated from the source by the project (not an IDE) but we don't want to track in the repository.
[ ] Add new patterns (just for the new files above) and re-run the above test.

[ ] New examples:

[ ] All sample runs at the top of the example source file work.
[ ] Update examples/makefile:

[ ] Add the example code to the appropriate SEQ_EXAMPLES and PAR_EXAMPLES variables.
[ ] Add any files generated by it to the clean target.
[ ] Add the example binary and any files generated by it to the top-level .gitignore file.

[ ] Update examples/CMakeLists.txt:

[ ] Add the example code to the ALL_EXE_SRCS variable.
[ ] Make sure THIS_TEST_OPTIONS is set correctly for the new example.

[ ] List the new example in doc/CodeDocumentation.dox.
[ ] If new examples directory (e.g.examples/pumi), list it in doc/CodeDocumentation.conf.in
[ ] Companion pull request for documentation in mfem/web repo:

[ ] Update or add example-specific documentation, see e.g. the src/examples.md.
[ ] Add the description, labels and screenshots in src/examples.md and src/img.
[ ] In examples.md, list the example under the appropriate categories, add new categories if necessary.
[ ] Add a short description of the example in the "Extensive Examples" section of features.md.

[ ] New miniapps:

[ ] All sample runs at the top of the miniapp source file work.
[ ] Update top-level makefile and makefile in corresponding miniapp directory.
[ ] Add the miniapp binary and any files generated by it to the top-level .gitignore file.
[ ] Update CMake build system:

[ ] Update the CMakeLists.txt file in the miniapps directory, if the new miniapp is in a new directory.
[ ] Add/update the CMakeLists.txt file in the new miniapp directory.
[ ] Consider adding a new test for the new miniapp.

[ ] List the new miniapp in doc/CodeDocumentation.dox
[ ] If new miniapps directory (e.g.miniapps/nurbs), add it to MINIAPP_SUBDIRS in the makefile.
[ ] If new miniapps directory (e.g.miniapps/nurbs), list it in doc/CodeDocumentation.conf.in
[ ] Companion pull request for documentation in mfem/web repo:

[ ] Update or add miniapp-specific documentation, see e.g. the src/meshing.md and src/electromagnetics.md files.
[ ] Add the description, labels and screenshots in src/examples.md and src/img.
[ ] The miniapps go at the end of the page, and are usually listed only under a specific "Application (PDE)" category.
[ ] Add a short description of the miniapp in the "Extensive Examples" section of features.md.

[ ] New capability:

[ ] All new public, protected, and private classes, methods, data members, and functions have full Doxygen-style documentation in source comments. Documentation should include descriptions of member data, function arguments and return values, template parameters, and prerequisites for calling new functions.
[ ] Pointer arguments and return values must specify whether ownership is being transferred or lent with the call.
[ ] Any new functions should include descriptions of their intended use e.g. for internal use only, user-facing, etc., along with references to example code whenever possible/appropriate.
[ ] Consider adding new sample runs in existing examples to highlight the new capability.
[ ] Consider saving cool simulation pictures with the new capability in the Confluence gallery (LLNL only) or submitting them, via pull request, to the gallery section of the mfem/web repo.
[ ] If this is a major new feature, consider mentioning it in the short summary inside README (rare).
[ ] List major new classes in doc/CodeDocumentation.dox (rare).

[ ] Update this checklist, if the new pull request affects it.
[ ] Run make unittest to make sure all unit tests pass.
[ ] Run the tests in tests/scripts.
[ ] (LLNL only) After merging:

[ ] Update internal tests to include the new features.

Hi @v-dobrev , I see https://github.com/mfem/mfem/issues/4013#issuecomment-2072839096. What's the progress now? I use Windows, MSVC, Intel oneAPI for building mfem regularly. I am glad to test together.

This PR is now under review (see the table in the PR description). To help with the review process, please do not force push to the branch.

The problem with the definition in the CMake file is that people may use different tools for build MFEM. I personally use Make, so this will not work with that. These warnings are platform specific and really excessive, so maybe we could move this to something global like error.hpp or globals.hpp ? A trouble is that it will be propagated to the user code, but if you say it appears even during linking, I do not see a way around it... 🤔

I link to mfem and also use the header files of mfem.

My application links to mfem and also included the installed header files of mfem.

So you would include #define _CRT_SECURE_NO_WARNINGS from general/error.hpp or general/globals.hpp, which are included from mfem.hpp 🙂 .

I just reverted the commits related to _CRT_SECURE_NO_WARNINGS so the changes in this PR are minimal.

Ok, I had a brief look at the logs from our Windows builds and there are just a few major sources: kernel_reporter.hpp and device.cpp. I think we should fix this directly by defining a wrapper for getenv(), which is safe for reading, but just returns an old-school char *. So we should place maybe to globals.hpp/cpp something like this:
#ifdef _WIN32
// Turn off CRT deprecation warnings for getenv
#define _CRT_SECURE_NO_WARNINGS
#endif

namespace mfem{
const char *getenv(const char *name)
{
   return ::getenv(name);
}
}

Ok, I had a brief look at the logs from our Windows CI builds and there are just a few major sources: kernel_reporter.hpp and device.cpp. I think we should fix this directly by defining a wrapper for getenv(), which is safe for reading, but just returns an old-school char *. So we should place maybe to globals.cpp something like this:
#ifdef _WIN32
// Turn off CRT deprecation warnings for getenv
#define _CRT_SECURE_NO_WARNINGS
#endif

namespace mfem
{
const char *getenv(const char *name)
{
   return ::getenv(name);
}
}

and declaration to globals.hpp. (I tested that on Linux and links nicely and does not require any further changes of the code, but check on Windows) PS: You do not need to merge master every time, makes sense mainly when there are some conflicts 😉

Done. Thanks.

Looks good 😉 , the log on Windows is shorter by multiple hundreds of lines. Another low-hanging fruit would be to fix conversion of pointer differences (__int64 in log) to int in Array, which is inlined at many places, generating a lot of output. Specifically, I see FindSorted() and Unique().

(int) 😄 It happens anyway, you would just specify that explicitly so the compiler will not complain. Btw, do not worry, there are no overflows, because differences of pointers are converted, not pointers themselves.

(int) 😄 It happens anyway, you would just specify that explicitly so the compiler will not complain. Btw, do not worry, there are no overflows, because differences of pointers are converted, not pointers themselves.

Done in https://github.com/mfem/mfem/pull/4562/commits/4eac35a79a728a0f54b56317fc4cd4e259c768b5

The following include: https://github.com/mfem/mfem/blob/7c1a0eb5e3f70ff9d161c9d6e3f228ba2513acca/general/socketstream.cpp#L39
is no longer needed. It is best to move it to general/globals.cpp -- this will ensure that we get the definition of getenv in globals.cpp without relying on it being included by some of the other included headers.

Merged in next for testing...


Google Apps scripts

could you publish this die roller as a Google Apps Script library, so it could be consumed by third parties? I found your code so usefull, and would love to use it in my Telegram Dungeon World RPG bot.
Thanks

Hi @MotoMeltar!
Is Google Apps script not just for use within Google docs, sheets etc? I can't seem to find any refernce of using it outside of that ecosystem, or a way to add a library not written in scripts into their library.
Does Telegram specifically use Google App Scripts?
The dice roller is available on NPM.
If you can give me some more information, I can look into it.

Thank you for your interest.
Google Apps Script provides free hosting and service of javascript based apps and web pages, and offers a lot of interfaces to interact with google services. That was my main motivator, as I wanted to develop a TelegramBot that read from a google spreadsheet and rolled according to those values. So if I use the command /fue, the bot will roll 2d6+(fue modifier) and award me an XP if the result is a failure (6 or less, in dungeon world).
Telegram does not require you to develop your bots in anything. But it's interface provides a WebHook so you can reroute the calls to the bot to anything. So it was easy to link both products.
But I made a mistake during development: My mechanics are all interlinked beetween each other. So if I want to develop another bot (I'm thinking Lady Blackbird for my next trick) I would have to copy-paste everything relevant to the new bot. Or I could take parts of that code and make Google Apps Script libraries, as documented here: https://developers.google.com/apps-script/guides/libraries
There are parts of my code (processing the Telegram message and linking a google sheet to the user/chat where is called) that I have to publish as a library, that's for sure. But, as you can share libraries, I thought maybe ther already is one?
Looking around github I found no one had a dice roller library for Google Apps Script, and by chance found your dice roller. It was exactly what I needed! but Google Apps Script does not let me get the code published anywhere.
don't get me wrong: If it's any trouble I'll create my own. But no harm in asking, is there? thanks for your time and interest.

I'm not this that this is that feasible. It looks like it would require re-writing the library as a GAS project, but there's a lot of JS functions in the library that don't work in GAS.
It does look like it may be possible to include NPM packages in GAS. I found this article, just gave it a cursory glance so not certain: https://blog.gsmart.in/es6-and-npm-modules-in-google-apps-script/
The NPM package has a compiled version of the library that may or amy not be compatible.


Port synth_clifford_ag to Rust

I think that this algorithms has been superseded by synth_clifford_greedy which has better CX count and depth, so I don't think it's worth to transfer it to rust, and perhaps it can be deprecated.

Ok sure, I just went through everything in the synthesis module to open these issues. If this function isn't useful anymore then I'll close this issue and can you open a separate one to track deprecating and removing it instead?


nLog target to .Net 4.8

Hi! Thanks for reporting this feature!
Please keep / fill in the relevant info from this template so that we can help you as best as possible.
NLog version: 5019
Platform: .Net 4.8
Support for .NET Framework 4.5.2, 4.6, and 4.6.1 ended on April 26, 2022. Would it be possible that all projects targeted to net48;netstandard2.1;netcoreapp3.1 ? Thanks!

Would it be possible that all projects targeted to net48;netstandard2.1;netcoreapp3.1 ?

What is the goal of changing the target-platforms for the NLog-project ?

The goal is get nLog.DLL with net48. I am able to add it. No issues. Thanks!

Yes the nuget-website now have a supported-frameworks-page:
https://www.nuget.org/packages/NLog#supportedframeworks-body-tab

Many Thanks!


Buttons ASDS-16

Pull Request Test Coverage Report for Build<PHONE_NUMBER>8
Details

0 of 229 (0.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.004%) to 0.183%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/pages/patterns/messaging/alert.vue
0
40
0.0%

src/pages/elements/button.vue
0
189
0.0%

Totals

Change from base Build<PHONE_NUMBER>8:
-0.004%

Covered Lines:
15

Relevant Lines:
8673

💛  - Coveralls


Enable JsonParser.Feature.ALLOW_UNQUOTED_CONTROL_CHARS

Enable JsonParser.Feature.ALLOW_UNQUOTED_CONTROL_CHARS by default
Added system property to allow user enable/disable JsonParser.Feature.ALLOW_UNQUOTED_CONTROL_CHARS

API change check
API changes are not detected in this pull request.

Did not fix the issue customer was facing


Weekly review freeze

Love the plugin. Used it quite frequently in the past with no problem. Just fired it up and obsidian freezes. I restarted, uninstalled etc.. but it still doesn't work. Please let me know if there' something I can do. Thank you

So each time you launch the plugin Obsidian freezes?

Yes. I repeated several time and got same result. I had to force restart.

If you go into the Plugin preferences and set the "How many days to show?" to 1 does it not crash?

That solved the problem. I went up to 6 days. And then I went to 7 and it froze. I restarted and went back in and the space for number of days was blank. I put in the number 1 and it worked but when I returned to the plugin, it was blank. I repeated a few times and each time it was blank. I uninstalled and then reinstalled and changed base number to 3 and it is working again. I'm not going to put it past 3.
On Sep 19, 2023 at 10:00 AM -0400, @.***, wrote:

I’ll try that and let you know
On Sep 19, 2023 at 7:27 AM -0400, Brandon Boswell @.***>, wrote:

If you go into the Plugin preferences and set the "How many days to show?" to 1 does it not crash?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>


Unable to change properties containing dashes. Lexical error.

Hello everyone!
We have used this neat GitHub action for a while within our team and it's worked really well.
A few days ago we noticed an issue with replacing a property within a YAML file, receiving the following error:  Lexical error on line 1. Unrecognized text.
The below picture shows the full error and file content acting on:

Line 42 (missing from the screenshot) points clearly at the dash as the source of the lexical error.
The property name comes from external sources and we cannot change them. Trying to use the other ways in this GitHub action to specify changes leads to the same error.
We worked around the issue by using a different GitHub action so in case other people are needing a workaround here is the code used:
      - name: (Shared) Update Api Key
        uses: mikefarah/yq@master
        with:
          cmd: yq -i '.opentelemetry-collector.config.exporters.otlp.headers.api-key = "${{ secrets.NEW_RELIC_API_KEY }}"' 'Kubernetes/shared/values.yaml'

Please let me know if you need any other detail to help in torubleshooting the issue.

For things like slashes, dashes etc you can use this syntax:
".headers['api-key']": "value"
If the dash is on. the root level: "$['root-level'].childKey"


Submit starboard CLI to krew-index

Submit the starboard cli executables to krew-index so we can install it with krew:
$ kubectl krew install starboard
$ kubectl starboard -h
...

I'm glad to help with this item

Submitted  to krew-index https://github.com/kubernetes-sigs/krew-index/pull/647

Great! I think the last step to close this one is to update README https://github.com/aquasecurity/starboard#kubectl-plugin


Implement incremental backoff for s3 reads

Fix #551
The previous implementation did a single retry without sleeping.
The proposed approach is to perform multiple retries with incremental backoff (sleep longer after consecutive failures).

This is ready for another round @piskvorky

This is ready for another round @piskvorky


Hydration Error: "An error occurred during hydration. The server HTML was replaced with client content in " (Astro Website) #936

Describe the bug
Hello, I'm having a bit of trouble tracing down the root of this so forgive me if this is not the correct spot to note this but I wanted to raise an issue to see if anyone else has encountered this or has a path forward.
I am using shadcn inside an Astro project and am attempting to display data in a DataTable component as documented on the shadcn documentation site. When I attempt to run the website locally, I get this hydration error when trying to apply custom formatting or JSX to the header or cell items on my ColumnDef.  An error occurred during hydration. The server HTML was replaced with client content in 'astro-island'
I've been able to reproduce this exact same issue on a fresh repro project after following these exact steps:

Astro setup - https://ui.shadcn.com/docs/installation/astro
DataTable setup - https://ui.shadcn.com/docs/components/data-table

Here is the repro link which uses exact same component as in the docs: https://github.com/lucaswalter/astro-shadcn-tanstack-repro/blob/main/src/pages/index.astro
In short, I am attempting to render and hydrate the DataTable like in the snippet below. Is it currently possible to use the DataTable component in an Astro project?
<Layout title="Welcome to Astro.">

			Welcome to Astro

		<DataTable client:load columns={columns} data={data} />

</Layout>

Full Strack Trace
react-dom.development.js:86 Warning: Did not expect server HTML to contain a
 in .
    at th
    at http://localhost:3000/src/components/ui/table.tsx:53:3
    at tr
    at http://localhost:3000/src/components/ui/table.tsx:44:3
    at thead
    at http://localhost:3000/src/components/ui/table.tsx:17:3
    at table
    at div
    at http://localhost:3000/src/components/ui/table.tsx:5:3
    at div
    at DataTable (http://localhost:3000/src/components/data-table.tsx:6:3)
printWarning @ react-dom.development.js:86
error @ react-dom.development.js:60
warnForDeletedHydratableElement @ react-dom.development.js:10477
didNotHydrateInstance @ react-dom.development.js:11424
warnUnhydratedInstance @ react-dom.development.js:12313
warnIfUnhydratedTailNodes @ react-dom.development.js:12707
popHydrationState @ react-dom.development.js:12677
completeWork @ react-dom.development.js:22176
completeUnitOfWork @ react-dom.development.js:26593
performUnitOfWork @ react-dom.development.js:26568
workLoopConcurrent @ react-dom.development.js:26543
renderRootConcurrent @ react-dom.development.js:26505
performConcurrentWorkOnRoot @ react-dom.development.js:25738
workLoop @ scheduler.development.js:266
flushWork @ scheduler.development.js:239
performWorkUntilDeadline @ scheduler.development.js:533
react-dom.development.js:86 Warning: An error occurred during hydration. The server HTML was replaced with client content in <astro-island>.
printWarning @ react-dom.development.js:86
error @ react-dom.development.js:60
errorHydratingContainer @ react-dom.development.js:11473
recoverFromConcurrentError @ react-dom.development.js:25846
performConcurrentWorkOnRoot @ react-dom.development.js:25750
workLoop @ scheduler.development.js:266
flushWork @ scheduler.development.js:239
performWorkUntilDeadline @ scheduler.development.js:533
react-dom.development.js:12507 Uncaught Error: Hydration failed because the initial UI does not match what was rendered on the server.
    at throwOnHydrationMismatch (react-dom.development.js:12507:9)
    at popHydrationState (react-dom.development.js:12678:9)
    at completeWork (react-dom.development.js:22176:30)
    at completeUnitOfWork (react-dom.development.js:26593:16)
    at performUnitOfWork (react-dom.development.js:26568:5)
    at workLoopConcurrent (react-dom.development.js:26543:5)
    at renderRootConcurrent (react-dom.development.js:26505:7)
    at performConcurrentWorkOnRoot (react-dom.development.js:25738:38)
    at workLoop (scheduler.development.js:266:34)
    at flushWork (scheduler.development.js:239:14)
throwOnHydrationMismatch @ react-dom.development.js:12507
popHydrationState @ react-dom.development.js:12678
completeWork @ react-dom.development.js:22176
completeUnitOfWork @ react-dom.development.js:26593
performUnitOfWork @ react-dom.development.js:26568
workLoopConcurrent @ react-dom.development.js:26543
renderRootConcurrent @ react-dom.development.js:26505
performConcurrentWorkOnRoot @ react-dom.development.js:25738
workLoop @ scheduler.development.js:266
flushWork @ scheduler.development.js:239
performWorkUntilDeadline @ scheduler.development.js:533
react-dom.development.js:12507 Uncaught Error: Hydration failed because the initial UI does not match what was rendered on the server.
    at throwOnHydrationMismatch (react-dom.development.js:12507:9)
    at tryToClaimNextHydratableInstance (react-dom.development.js:12535:7)
    at updateHostComponent (react-dom.development.js:19902:5)
    at beginWork (react-dom.development.js:21618:14)
    at beginWork$1 (react-dom.development.js:27426:14)
    at performUnitOfWork (react-dom.development.js:26560:12)
    at workLoopConcurrent (react-dom.development.js:26543:5)
    at renderRootConcurrent (react-dom.development.js:26505:7)
    at performConcurrentWorkOnRoot (react-dom.development.js:25738:38)
    at workLoop (scheduler.development.js:266:34)
throwOnHydrationMismatch @ react-dom.development.js:12507
tryToClaimNextHydratableInstance @ react-dom.development.js:12535
updateHostComponent @ react-dom.development.js:19902
beginWork @ react-dom.development.js:21618
beginWork$1 @ react-dom.development.js:27426
performUnitOfWork @ react-dom.development.js:26560
workLoopConcurrent @ react-dom.development.js:26543
renderRootConcurrent @ react-dom.development.js:26505
performConcurrentWorkOnRoot @ react-dom.development.js:25738
workLoop @ scheduler.development.js:266
flushWork @ scheduler.development.js:239
performWorkUntilDeadline @ scheduler.development.js:533
react-dom.development.js:19849 Uncaught Error: There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering.
    at updateHostRoot (react-dom.development.js:19849:57)
    at beginWork (react-dom.development.js:21615:14)
    at beginWork$1 (react-dom.development.js:27426:14)
    at performUnitOfWork (react-dom.development.js:26560:12)
    at workLoopSync (react-dom.development.js:26466:5)
    at renderRootSync (react-dom.development.js:26434:7)
    at recoverFromConcurrentError (react-dom.development.js:25850:20)
    at performConcurrentWorkOnRoot (react-dom.development.js:25750:22)
    at workLoop (scheduler.development.js:266:34)
    at flushWork (scheduler.development.js:239:14)
updateHostRoot @ react-dom.development.js:19849
beginWork @ react-dom.development.js:21615
beginWork$1 @ react-dom.development.js:27426
performUnitOfWork @ react-dom.development.js:26560
workLoopSync @ react-dom.development.js:26466
renderRootSync @ react-dom.development.js:26434
recoverFromConcurrentError @ react-dom.development.js:25850
performConcurrentWorkOnRoot @ react-dom.development.js:25750
workLoop @ scheduler.development.js:266
flushWork @ scheduler.development.js:239
performWorkUntilDeadline @ scheduler.development.js:533

Your minimal, reproducible example
https://stackblitz.com/github/lucaswalter/astro-shadcn-tanstack-repro
Steps to reproduce
See the repro project here: https://github.com/lucaswalter/astro-shadcn-tanstack-repro/blob/main/src/pages/index.astro#L41 or StackBlitz

Clone repro project
Install dependencies
Run npm run dev
Open in browser and see error in console

Expected behavior
As a user, I expect to be able to provide custom cell and header JSX which will render and hydrate on my website.
How often does this bug happen?
Every time
Screenshots or Videos

Platform

Mac OS
Chrome (latest version)

react-table version
^8.9.3
TypeScript version
No response
Additional context
No response
Terms & Code of Conduct

[X] I agree to follow this project's Code of Conduct
[X] I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

To clarify further, this seems to only happen when I utilize "Cell Formatting" on the table like in this snippet:
export const columns: ColumnDef<Payment>[] = [
  {
    accessorKey: 'status',
    header: 'Status',
  },
  {
    accessorKey: 'email',
    header: 'Email',
  },
  {
    accessorKey: 'amount',
    // header: 'Amount', // This works for me
    header: () =>
Amount
, // This does not work for me
  },
];

Hi,
I tried to reproduce this issue. According to my findings the react 18 version is creating the issue. Try to use react 17 version and it will fix most of the hydration errors.

Thanks @Rohan-07 for the additional context and for sharing your findings. It will be difficult for me to downgrade to react 17 because of other peer dependencies I have in my project.
From what you found, was the React.render and ReactDOM.hydrate usage actually in the @tanstack/react-table dependency? Or was it used somewhere else?
I personally think it may be best to go forward raising an issue in the appropriate spot so it can be fixed on the latest dependency versions. Would you mind sharing a bit more context around that? I'd be happy to take forward with reporting the issue.

Same issue is still appearing for me when providing a function for a header / table cell.
header: () =>
Amount
, // This does not work for me

Workaround documented here: https://discord.com/channels/830184174198718474/1130952479555735612

@lucaswalter can you share your findings? This link is broken and I am in the same boat as you.

@lucaswalter can you share your findings? This link is broken and I am in the same boat as you.

Heres the link it referenced.  Discord links are bad because you cant really index the discord stuff. So I'm going to copy/paste the reference here for future reference:
here another solution
on the unmodified example from lucaswalter repo just change this
<DataTable client:load columns={columns} data={data} />

to this, (removing the client directive)
<DataTable columns={columns} data={data} />

this shows a sort of mismatch between react usage as a component rendered by Astro on server side and the workaround usage as client component when wrapped in another jsx.
When removing the client:load directive, there's obviously no react on client anymore and it's all rendered to html by astro on serevr side```

Any idea how to fix this hydration error ?

This seems more like an astro/react bug than a TanStack Table bug. I don't know how we would package this differently that would make a difference.

Actually react table adds unnecessary div inside the tag which creating the issue.
More detail here: https://github.com/withastro/astro/issues/10860

Do you think that the problem is that your column definitions are defined inside of a react component? Anything with jsx like a custom cell render should probably only be defined inside of react, and not in an Astro file.

Actually, it could be a related bug too if I create the react table as separate component then import into astro page then it works fine without hydration error.
Hydration Error
page.astro
---
import Layout from '../layouts/Layout.astro'
import { DataTable } from '@/components/datatable/datatable'
import { createColumnHelper } from '@tanstack/react-table'

const columnHelper = createColumnHelper()

const columns = [
  columnHelper.accessor('name', {
    cell: (info) => info.getValue(),
  }),
]

const defaultData = [
  {
    name: 'tanner',
    lastName: 'linsley',
    age: 24,
    visits: 100,
    status: 'In Relationship',
    progress: 50,
  },
]
---

<Layout title='List of Countries in the World'>
  <DataTable data={defaultData} columns={columns} client:load />
</Layout>

chunk-BVI7NZOO.js?v=4b8af205:521 Warning: Did not expect server HTML to contain the text node "tanner" in .
    at td
    at _c13 (http://localhost:4321/src/components/ui/table.tsx:142:13)
    at tr
    at _c9 (http://localhost:4321/src/components/ui/table.tsx:96:12)
    at tbody
    at _c5 (http://localhost:4321/src/components/ui/table.tsx:53:12)
    at table
    at div
    at _c (http://localhost:4321/src/components/ui/table.tsx:20:11)
    at div

Working Good
Separate React Component
TestTable.tsx
import { createColumnHelper } from '@tanstack/react-table'
import { DataTable } from '@/components/datatable/datatable'

const columnHelper = createColumnHelper()

const columns = [
  columnHelper.accessor('name', {
    cell: (info) => info.getValue(),
  }),
]

const defaultData = [
  {
    name: 'tanner',
    lastName: 'linsley',
    age: 24,
    visits: 100,
    status: 'In Relationship',
    progress: 50,
  },
]

export const Demo1 = () => {
  return <DataTable data={defaultData} columns={columns} />
}

page.astro
---
import Layout from '../layouts/Layout.astro'
import { Demo1 } from '@/components/rt/Demo1'
---

<Layout title='List of Countries in the World'>
    <Demo1 />
</Layout>


Upgrade org.pitest:pitest-maven 1.9.6 -> 1.9.7

This PR contains the following updates:

Package
Type
Update
Change

org.pitest:pitest-maven (source)
build
patch
1.9.6 -> 1.9.7

Release Notes

hcoles/pitest
v1.9.7
Compare Source

[ ] If you want to rebase/retry this PR, click this checkbox.

Suggested commit message:
Upgrade pitest-maven-plugin 1.9.6 -> 1.9.7

See https://github.com/hcoles/pitest/compare/1.9.6...1.9.7

Github actions says:

This job was cancelled

I wonder why :thinking:.. Retriggered it.


Dont actually Tranform CSS on SSR

Hey dude
Im using your babel-server so i dont need a build on both sides.
I was able to get scss to work, but ive got some scenarios where i need to provide variables and mixins to each file (global colors and stuff)
As you can imagine the compile fails because the variables are not directly imported
Is there a way to prevent a transformation from happening but still get the chunk-names for flushing?

I'm actually not too sure what you're looking to do, but does this help:
https://github.com/michalkvasnicak/babel-plugin-css-modules-transform

mehh not really, but thank you for taking the time. From one webpack guy to another. ill show you what i mean in webpack lingo ;)
`            {
            // im adding my own mixins and globals, dont wanna go import them
            // this loader doesnt need to be here if you import your mixins directly per file
            test: /\.(scss|css)$/,
            use: [
                {
                    loader: 'sass-resources-loader',
                    options: {
                        resources: [
                            // i need these bastards otherwise i dont have mixins or variables
                            path.join(appRoot, '/node_modules/@myCompany/sass-assets/_base-external.scss'),
                            path.join(appRoot, '/src/common/resources.scss')
                        ]
                    }
                }
            ]
        },`

I still don't know what you mean by:

Is there a way to prevent a transformation from happening but still get the chunk-names for flushing?

However, I have used sass-resources-loader before. I ended up creating my own solution like the following for full control:
prepend-loader:
const loaderUtils = require('loader-utils')

module.exports = function(source) {
  const { prepend = '' } = loaderUtils.getOptions(this)
  return prepend + '\n' + source
}

collect scss vars/mixins:
const { readFileSync } = require('fs')
const { join } = require('path')
const { sync: glob } = require('glob')

const p = (path) => join(__dirname, '../../..', path)

const colors = { red: 'red', blue: 'blue', foo:  '#9b59b6' }
const primaryColor = colors[process.env.SITE_COLOR]

// join our initial scss so imported files can performantly make use of cached vars/mixins/etc
const joinScss = (rawScss, files) =>
  rawScss + '\n' + files.map(f => readFileSync(f, 'utf8')).join('\n')

module.exports = joinScss(`$brand-primary: ${primaryColor};`, [
  p('vendor/bootstrap/_variables.scss'), // bootstrap
  ...glob(p('vendor/bootstrap/mixins/**/*.scss')),

  p('vendor/theme/_variables.scss'), // bootstrap theme

  p('src/stylesheets/_constants.scss'), // internal
  p('src/stylesheets/_mixins.scss'),
])

Usage (webpack config):
{
        test: /\.scss$/,
        use: [
          MiniCssExtract.loader,
          {
            loader: 'css-loader',
            options: {
              modules: false,
            }
          },
          // 'resolve-url-loader', // if @imported scss files use `url('../../background.jpg')` -- not needed in one-level-deep files imported using ES6
          {
            loader: 'sass-loader',
            options: {
              includePaths: [
                p('mode_modules'),
              ]
            }
          },
          {
            loader: p('webpack/loaders/prepend-loader.js'),
            options: {
              prepend: require('./helpers/cachedScss'),
            },
          },
]

ES6 requires:
require('foo.scss')

requireAll(require.context('../src/', true, /\.(css|scss)$/))

require('bar.scss') // if order matters, use `require` instead of `import` so `requireAll` which does not use `import` is respected

// https://github.com/webpack/docs/wiki/context#context-module-api
function requireAll(requireContext) {
  return requireContext.keys().map(requireContext);
}

Since I see you're using Sass, my hunch is the issues you're running into simply have to do with Sass. I used primarily Stylus last year, but going forward I'll likely be using Emotion and circumventing a lot of the css related issues. There are a few tradeoffs (especially when it comes to code splitting), such as independently cacheable stylesheets, sending duplicate css definitions when server-rendering (both in js + flushed css), but after a long time fighting the css fight with things like extract-css-chunks-webpack-plugin, and even though Webpack 5 is slated to have better support for this stuff, I'm outa the game.
The above is the best I was able to come up with, and it's very fast. I realize it has no signs of code splitting handling. I just thought I'd put it out there cuz I saw you were also doing the sass-resources-loader thing. Mine doesn't follow @import in the prepended variables, but I decided to get "low level" and make it as fast as I can, while not being dependent on outside libs--similar to what you meant by "remove human error."
Ima close this out cuz it sounds like u have some ideas of what to do.

Thanks this has given me some direction.
Im trying to run babel-server, but with something like sass-resources-loader to actually inject all those mixens and such back into my imported stylesheets.
I had also though just injecting them as strings the same way you are with joinScss but i didnt think it would be performant :P
However it sounds like you are getting some good results so Im going to try modifying your code into a babel sass loader. Ill make a repo and send you a link to it, in case you ever get the question again.

As long as the prepended scss doesn't generate CSS it's very fast. It's basically the same thing as @importing mixins/vars, but a little bit faster as whatever scss tools you're using don't have to parse the scss and follow imports like sass-resources-loader does:
https://github.com/shakacode/sass-resources-loader/blob/master/src/utils/rewriteImports.js#L26-L38
If what you prepended did generate css, it would be very slow and mess up styles a bit (as well as browser performance) due to tons of duplicate styles--I had this problem initially.

Oh yeah, you've gotta be very careful when using resource injection. I strictly only store color variables and mixins, absolutely no actual styles are ever injected - thus no performance hit.
I think we both have experienced the troubles around css optimization, i must applaud your efforts, chunking is hard and in the end i think alot of style optimization still boils down to how a developer sets up their CSS. POSTCSS is awesome but theres just no real good solution to chunk optimization for stylesheets as a whole.
Im ive also been looking at the roadmap for WP5 and i think the CSS thing is way overdue! With the new chunking system, hopefully it will work well


Hello World - Classic vs ADT

Current hello-world exercise uses ADT interface which requires some explanation for newbies and students solving directly on the website.

Change description of current "Hello World" to "Hello World (Modern)" and extend instructions to explain ADT interface
Add "Hello World (Classic)" using class without ADT interface

Just a thought: If none of the other exercises use the ADT interface, does it even make sense to do so here?
Why not just use a method with a RETURNING parameter just like all other exercises and most languages?
I remember there was a small debate about it on slack and the ADT console interface seemed like a good idea at the time but in retrospect I don't think so.
If we extend the explanation to tell the user that there is an output that they might see if they weren't using this website but even with a real SAP system they might or might not see depending on which IDE they were using, ands therefore might have to write using different syntax is possibly a bit confusing and maybe a bit negative impression.
Almost all other languages use a function or method that returns a hello world result as far as I can tell.
https://github.com/exercism/javascript/blob/main/exercises/practice/hello-world/.meta/proof.ci.js
https://github.com/exercism/cpp/blob/main/exercises/practice/hello-world/.meta/example.cpp
https://github.com/exercism/x86-64-assembly/blob/main/exercises/practice/hello-world/.meta/example.asm
https://github.com/exercism/c/blob/main/exercises/practice/hello-world/.meta/example.c
A syntactically similar language to ABAP is PL/SQL and that uses functions too.
https://github.com/exercism/plsql/blob/main/exercises/practice/hello-world/.meta/example.plsql
One exception is bash, but I think that's a special case.
https://github.com/exercism/bash/blob/main/exercises/practice/hello-world/.meta/example.sh

yea, change it to a RETURNING
and then the existing can be moved to a "hello world, advanced" exercise


[iOS] Initial value of AppState.currentState is incorrect when app is launched into the background

Bug
When the app is launched into the background, AppState.currentState should be 'background'. However, instead, if you read it too soon, its value is 'active'. If you wait long enough, it'll become 'background'.
I haven't tested this on Android but I suspect Android has the same bug. It looks like the JavaScript code initializes currentState to active and then relies on an async call to set it to its actual value.
Impact
When an app launches into the background, it's common to want to handle this case specially to minimize the amount of work that is done (for example, there's no need to render UI). This bug breaks such optimizations by causing the app to think it's being launched into the foreground even though it's being launched into the background. By the time AppState.currentState has the correct value, the app has already started some unnecessary work.
Repro Steps
Tested with react-native 0.26.3.

Use react-native init to create a new project.

Put the following code after the project imports in index.ios.js:

console.log('init currentState: ' + AppState.currentState);
setInterval(function () {
console.log('currentState: ' + AppState.currentState);
}, 1000);
3. Edit the app's capabilities. Under "Background Modes" check "Background fetch".
4. Go to the `Product > Scheme > Manage Schemes` menu item.
5. Select the app
6. Under "Run", go to the "Options" tab
7. Check "Launch due to a background fetch event"

Run the app. You should see the following logged to the console:

init currentState: active
currentState: background
currentState: background
...

Instead, I would expect the first line to read `init currentState: background`

### Possible fix

Can we fix this by including `UIApplication`'s `applicationState` in `constantsToExport` of the `AppState` module? Then we can initialize `currentState` to that value rather than to `'active'`.

It looks like this approach was already tried and then it was reverted (https://github.com/facebook/react-native/commit/0fb3d8de83c4d8b79a8a110e9cd1300b39ab8918). Why?

cc @zjj010104

@zjj010104 @nicklockwood Any thoughts on the "Possible fix" listed above? It's important for me to get this bug fixed for my app. However, it looks like the fix I have in mind was already tried and reverted. I'd like to understand why and what the right way to fix this would be.

@facebook-github-bot label iOS


Carbon Management: Rename "Other" to "Other Source"

Would it make sense to not replace "Other" with a more description name (e.g., "Other Method") to avoid ambiguity later? Maybe we can establish the convention that plain "Other" is only used for energy carrier?

Hm, possible. I thought it was important for carbon capture, because there are other sources and other sinks. For land and ocean I think we could also live with other to avoid inventing new terms too often

As far as I remember, there is a logic behind using the generic terms "Other" and "Other Source". "Other" is for destination, e.g. energy carrier, and "Other Source" is for origin. I think there is also "Other Sector" for sectoral breakdown. Strongly suggest to stay with these generic terms in keeping with the naming convention/logic. So if it is about an other source of captured carbon, I think "Carbon Capture|Other Source" is the right choice.

Sorry, need to correct myself. As far as I can see, "other source" is not used at all in the common reporting as it stands. So let us not introduce it here. I suggest to close this issue without any change.

For Carbon Capture we need it, because we disaggregate both sources and sinks. So we need to be clear here that what we mean is "Other Source". Suggest to merge this  PR as is.

@strefler, should I go ahead and implement the suggested updates to the descriptions as suggested and then merge this PR? Or do you want to discuss that further before I merge?

Yes, I'd say let's go ahead and merge. Thanks!


Necessary Hardware for SteamVR games like Half-Life: Alyx

Sorry for the inconvenience, I try to get into VR for long time now, but the topic seems so obscure.
Now I found your git and I have one PS Move controller laying around from past days, so if I want to go full VR with PSMoveService, from my research, what I need will be:

2 PS Move Motion Controllers
2 PS Move Navi Controllers
2 Joiner Clips
1 Kinect 360
1 Gear VR Headset (or similar)
1 extra Bluetooth adapter
Diver4VR

Now, without the Move Controller I already own, this will leave me at about €190EUR. With the prices of conventional VR Kits being absurdly high at the moment, I wonder wether it is worth going for the PS Move setup or waiting another few months would be the better option.
Thanks in advance.

You can use ps3 eye cams, maybe 4 are cheaper than 1 kinect 360, and the tracking is much better. But a little bit more setup to do. I´m doing it with intern onboard Bluetooth adapter. At the moment there is no way to play half life alyx with psmove, attracting things seems to dont work.  Don´t know if navi controllers work with Driver4vr, but with 3 ps move controllers you are ready to go. ( 1+ for head tracking). If you would like to play with kinect 360 you need only 2 ps move controller.  To move with  sticks, you can use that, too https://de.aliexpress.com/item/32857382935.html?src=google&src=google&albch=shopping&acnt=494-037-6276&isdl=y&slnk=&plac=&mtctp=&albbt=Google_7_shopping&aff_platform=google&aff_short_key=UneMJZVf&&albagn=888888&albcp=9317151805&albag=93621837065&trgt=299423776478&crea=de32857382935&netw=u&device=c&albpg=299423776478&albpd=de32857382935&gclid=EAIaIQobChMI49Gr5Ky76AIVBLDtCh2Hcw7QEAQYASABEgItAvD_BwE&gclsrc=aw.ds

It's not worth. Unfortunately the tracking quality is really lackluster even with the ideal setup. I've tried PSMoveService several times over the past 4 years and sure the tracking has improved, but it's not a playable/usable level. I have tried out several sized playspaces, from medium to large, hours of finicky setup. Result was in no way playable. Tracking inaccurate and drifty.

Right, half life alyx is not working here either. The key binding doesn't work at all.

Just start HLVR with PSVR+P3Eye+2xPSMove.
I can see hands and I can point laser to menu but trigger is not working and other buttons to.
When I try to open Binding I have only "Loading current binding..."
Also I have an error in HLVR debug console - "Unknown controller type name 'playstation_move' - falling back to HMD manufacturer name."
Can I do something to play HLVR?)))

Same here.
No way yet.
Just download the non-vr mod, and play with PSVR and mouse and keyboard.

PSVR (iVRy) + Kinect (Driver4VR) + 2xPSMove(PSMoveService) + HL Alyx = more or less playable.

PSVR (iVRy) + Kinect (Driver4VR) + 2xPSMove(PSMoveService) + HL Alyx = more or less playable.

So the binding works with Driver4VR? I'll try it.

I've been able to get through a large section of the game just using PSmoveService and Vridge, I've had to manually set all the binding's and the game has been playing perfect aside from the Throwing and Gravity Gloves, I've managed to bypass the tutorial that requires you to use the Russell's by giving myself a gun through Dev Cheats, I've been trying multiple ways of getting the Russell's to work but it seems until this program gets updated we won't have any way of fully using the Gravity Gun and seeing how the last update was in 2018 I don't believe we're gonna get any more help, unless we throw some cash at a Kinect and Driver4VR.

use 1.5.2 steamvrbridge this fix for trigger not work

use 1.5.2 steamvrbridge this fix for trigger not work

Where to dl 1.5.2? Only has 1.5.1 or 1.6
https://github.com/HipsterSloth/PSMoveSteamVRBridge/releases


DependencyArtifact erroneously requires name when using Gradle 7 catalogs and custom artifacts

Expected Behavior
I am using a Gradle 7 catalog that defines the following artifact.
alias('foo').to('com.foo.bar','foo-bar').versionRef('fooVersion')
This artifact includes a jar for Java class files, as well as two zip files for native libs and executable programs that are part of our deployment. In my build I want to use all three of the artifacts of the module
configurations { native64 }
dependencies {
    implementation libs.foo

    native64(libs.foo) {
        artifact {
            classifier = 'native'
            type = 'zip'
        }
    }

    native64(libs.foo) {
        artifact {
            classifier = 'programs'
            type = 'zip'
        }
    }
}

Current Behavior
Loading the build.gradle model fails with the error:
Could not resolve all dependencies for configuration ':compileClasspath'.
Artifact name must not be null!

that forces me to use:
    native64(libs.foo) {
        artifact {
            name = 'foo-bar'
            classifier = 'programs'
            type = 'zip'
        }
    }

Context
The requirement to use name means leaking hidden implementation details of the catalog. I have many interrelated projects and want to use catalog aliases for centralized dependency mgt. Requiring 'name' to resolve custom classifiers requires hidden knowledge of the catalog, and if that name changes every build that uses that artifact has to be changed too. That defeats the advantage of using the catalog.
Your Environment
gradle 7.0-rc-2
IntelliJ IDEA 20201.1
Windows 10

Also, a more compact syntax would be nice. Without catalogs I can do
implementation('com.foo.bar:foo-bar:${fooVersion}:native@zip")
So it would be nice to be able to do something like,
implementation("${libs.foo}:native@zip")
or something along those lines.

My bad, but I apparently didn't understand the artifact closure correctly (I've never used it before). It adds the artifact to dependency resolution rather than specifies it uniquely. With something like
    native64(libs.foo) {
        artifact {
            classifier = 'programs'
            type = 'zip'
        }
    }

I really just want to resolve the foo-bar-programs zip, and not the foo-bar.jar (the jar is resolved as part of the implementation configuration). So I guess I don't know how I can do something like,
native64("com.foo.bar:foo-bar:${fooVersion}:programs@zip") using the new Gradle 7 catalog feature. Is it possible? If not then this is a request for enhancement to make it possible.
We have a Java project with a lot of jni/jna legacy native code that has to be supported. Something along the lines of the following seems reasonable, e.g.: native64("${libs.foo}:native@zip"). I'd prefer the one-liner anyway.

I am able to make this work for me, but it's rather too verbose. A more compact syntax for the native64 dependency is desirable.
configurations {
   native64
}
dependencies {
    implementation libs.foo
    ...
    def foo = libs.foo.get()
    native64("${foo.module.group}:${foo.module.name}:${foo.versionConstraint.toString()}:native@zip")
}


Create a mockup of collapsable table

Please do work for this task in a branch called issue-11.


the consumers show wrong number on 2.0.2

I add 2 clusters on kafka-manager such as A and B ,when I step in the consumers web page of A,I can get consumers from B,it's more than I will

That's not possible since each cluster has completely independent state management.


the copy and TryIt buttons

they don't make much sense. the copy also copies the prompt, which is of course a syntax error after pasting in the shell and the TryIt doesn't copy at all

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

ID: d429ecd5-657d-35fc-fbe5-d8131c4da484
Version Independent ID: 5b51f1ff-c0b2-4810-7c05-b867a9aa06af
Content: PowerShell in Azure Cloud Shell Quickstart
Content Source: articles/cloud-shell/quickstart-powershell.md
Service: azure
GitHub Login: @maertendMSFT
Microsoft Alias: damaerte

#15615

@rs38 Thanks for the feedback! I have assigned the issue to the content author to evaluate and update as appropriate.

@rs38, thanks for the feedback.  We are currently have improvements for these experiences in the backlog.  As for the content that is displayed in code blocks, the prompt and outputs are included since they provide more context into the use scenarios than only having the cmdlet.

@Adam-Smith-MSFT @maertendMSFT thank you for the very fast reaction and answer.  Did you notice my link to the Edge issues? I tried on different computer with different windows 10 (1803 and 1809) but the embedded azure shell is not working with edge. only with IE and Chrome.

@rs38, I am not able to repro Cloud Shell not working in Edge.  Can you send me some repro steps please?

@maertendMSFT

opening a private Edge tab
browsing to https://docs.microsoft.com/en-us/azure/cloud-shell/quickstart-powershell?view=azure-cli-latest
clicking on the first tryit from the top
entering my azure credentials
waiting symbol spins
a big "X" occurs in the terminal windows on the right for only some milliseconds.
right side stays completly black.

If I check with F12 tools, there is an JS error  SCRIPT5022: SecurityError in main.js (1463,2)
this is suppose to be in function createTerminal()
this is the last web request in the failing edge
https://management.azure.com/providers/Microsoft.Portal/userSettings/cloudconsole?api-version=2017-12-01-preview	HTTPS	GET	200
this is the following step when I test with IE which works fine:
https://management.azure.com/providers/Microsoft.Portal/userSettings/cloudconsole?api-version=2017-12-01-preview	HTTPS	PATCH	200
Is there more I can provide?

this is what fiddler shows me when it fails with Edge:
CONNECT http://ux.console.azure.com:443
200 Connection Established ()

GET https://ux.console.azure.com/monaco-editor/min/vs/loader.js
304 Not Modified ()

GET https://ux.console.azure.com/monaco-editor/min/vs/editor/editor.main.js
304 Not Modified ()

CONNECT http://az416426.vo.msecnd.net:443
200 Connection Established ()

GET https://az416426.vo.msecnd.net/scripts/a/ai.0.js
304 Not Modified ()

GET https://ux.console.azure.com/monaco-editor/min/vs/editor/editor.main.css
304 Not Modified ()

CONNECT http://ux.console.azure.com:443
200 Connection Established ()

GET https://ux.console.azure.com/monaco-editor/min/vs/editor/editor.main.nls.js
304 Not Modified ()

GET https://ux.console.azure.com/xterm/xterm.js.map
404 Not Found (text/html)

CONNECT http://ux.console.azure.com:443
200 Connection Established ()

CONNECT http://ux.console.azure.com:443
200 Connection Established ()

CONNECT http://ux.console.azure.com:443
200 Connection Established ()

CONNECT http://ux.console.azure.com:443
200 Connection Established ()

CONNECT http://ux.console.azure.com:443
200 Connection Established ()

CONNECT http://ux.console.azure.com:443
200 Connection Established ()

CONNECT http://ux.console.azure.com:443
200 Connection Established ()

GET https://ux.console.azure.com/xterm/addons/attach/attach.js.map
404 Not Found (text/html)

GET https://ux.console.azure.com/monaco-editor/min-maps/vs/loader.js.map
404 Not Found (text/html)

GET https://ux.console.azure.com/xterm/addons/winptyCompat/winptyCompat.js.map
404 Not Found (text/html)

GET https://ux.console.azure.com/monaco-editor/min-maps/vs/editor/editor.main.js.map
404 Not Found (text/html)

GET https://ux.console.azure.com/xterm/addons/fit/fit.js.map
404 Not Found (text/html)

GET https://ux.console.azure.com/xterm/addons/fullscreen/fullscreen.js.map
404 Not Found (text/html)

GET https://ux.console.azure.com/xterm/addons/webLinks/webLinks.js.map
404 Not Found (text/html)

GET https://az416426.vo.msecnd.net/scripts/a/ai.0.js.map
304 Not Modified ()

GET https://ux.console.azure.com/monaco-editor/min-maps/vs/editor/editor.main.nls.js.map
404 Not Found (text/html)

GET https://ux.console.azure.com/monaco-editor/min/vs/base/worker/workerMain.js
304 Not Modified ()

GET https://ux.console.azure.com/monaco-editor/min/vs/editor/editor.main.css
304 Not Modified ()

CONNECT http://dc.services.visualstudio.com:443
200 Connection Established ()

OPTIONS https://dc.services.visualstudio.com/v2/track
200 OK ()

POST https://dc.services.visualstudio.com/v2/track
200 OK (application/json)

GET https://ux.console.azure.com/monaco-editor/min-maps/vs/base/worker/workerMain.js.map
404 Not Found (text/html)

GET https://ux.console.azure.com/js/editor/ts/quickOpenFile.ts
200 OK (video/mp2t)

GET https://ux.console.azure.com/js/editor/ts/explorer.ts
200 OK (video/mp2t)

which looks quite different to IE when it connects:
CONNECT http://ux.console.azure.com:443
200 Connection Established ()

GET https://ux.console.azure.com/monaco-editor/min/vs/loader.js
304 Not Modified ()

GET https://ux.console.azure.com/monaco-editor/min/vs/editor/editor.main.js
304 Not Modified ()

CONNECT http://az416426.vo.msecnd.net:443
200 Connection Established ()

GET https://az416426.vo.msecnd.net/scripts/a/ai.0.js
304 Not Modified ()

CONNECT http://management.azure.com:443
200 Connection Established ()

GET https://ux.console.azure.com/monaco-editor/min/vs/editor/editor.main.css
304 Not Modified ()

GET https://ux.console.azure.com/monaco-editor/min/vs/editor/editor.main.nls.js
304 Not Modified ()

OPTIONS https://management.azure.com/providers/Microsoft.Portal/userSettings/cloudconsole?api-version=2017-12-01-preview
200 OK ()

GET https://management.azure.com/providers/Microsoft.Portal/userSettings/cloudconsole?api-version=2017-12-01-preview
200 OK (application/json)

GET https://ux.console.azure.com/monaco-editor/min/vs/base/worker/workerMain.js
304 Not Modified ()

CONNECT http://dc.services.visualstudio.com:443
200 Connection Established ()

GET https://web.vortex.data.microsoft.com/collect/v1/t.js?ver='2.1'&name='Ms.Webi.PageAction'&time='2018-11-........'

POST https://dc.services.visualstudio.com/v2/track
200 OK (application/json)

PATCH https://management.azure.com/providers/Microsoft.Portal/userSettings/cloudconsole?api-version=2017-12-01-preview
200 OK (application/json)

CONNECT http://management.azure.com:443
200 Connection Established ()

and a 3rd comment to narrow the problem:
Azure shell embedded in the Portal as well as https://shell.azure.com/ works fine with Edge.

@rs38, that definitely helps.
Does the same thing happen with the Bash experience?  You can try here: https://docs.microsoft.com/en-us/azure/cloud-shell/quickstart

@maertendMSFT yes, same result.

@jluk

@rs38
The only failure from the fiddler trace is the a few 404s. Looks like some js files failed to load from ux.console.azure.com. For the js security error in main.js createTerminal, do you see request sent out to create Terminal?
I just followed your repro steps and cannot repro. My CloudShell showed up properly.
If the symptom still exists for you, please give me the time and your domain name, so that we can dig into logs to investigate. Thanks!

yes, still the same. may it be CDN related? do you have coworkers that could glance on it from europe (like me)?

@rs38, I have reached out to some folks on the docs side of things.  With the Thanksgiving Holiday in the United States many people are out this week.  I will follow-up with them next week if we haven't gotten a response by then.

@rs38 are you behind a corporate VPN/firewall? Do you by chance have third-party cookies blocked?

no, not at all!!
but I have a chance to check it tomorrow on completely different hardware and corp environment with proxy etc. with chrome, IE and Edge.
Did not try it with cell phone browser :)

tested it with a different corporate notebook with win10 1803 in a corp network in the same city and the shell console works.
any chance to narrow it down?

no further comment/support? No idea how many more support I can provide…..
discontinuing Edge like reported sounds logical for me https://www.theverge.com/2018/12/4/18125238/microsoft-chrome-browser-windows-10-edge-chromium

I tried "Repair and reset the app" and now it eventually works!!!
Select the Start  button > Settings  > Apps > Apps & features. Select Edge, and then select Advanced options. On the page that opens with information about Edge, select Repair. when repairing the app doesn't fix the problem, select Reset.
For some other reasons Edge is getting slower and slower and I have trouble with other "rich and mobile optimzied" sites. but this is not subject of this issue....


Makefile: add targets to build the docs via Docker

Add a Dockerfile to package hugo+extended and a Makefile to run hugo server easily from the root folder and /docs folder.
Also vendor dependency to avoid fetching the theme each time we build with Docker and also make sure we have the dependencies safe.

I tested it on amd64 with a native Docker install and it did not work for obscure Docker builds and permission reasons, I added a fix so that it should work for everyone!

The remaining checks are unrelated to the changes of this PR, merging! 🚢


Add first draft of wmagent-component-standalone script

Fixes #12023
Status
In development
Description
With the current PR we suggest a generic script which should preload a minimal set of often used modules in WMagent components  and a minimal component runtime environment setup like WMAgent configuration preload together with a desired component to be loaded passed as a parameter to the script. This is meant to speed up the debugging process of loading and configuring the wmagent components in interactive mode.
USAGE:
(WMAgent-v2.3.4rc12) [cmst1@vocms264:current] $ ipython -i $WMA_DEPLOY_DIR/bin/wmagent-component-standalone -- --component JobAccountant

Is it backward compatible (if not, which system it affects?)
YES
Related PRs
This one  is meant to facilitate  the resolution of this issue https://github.com/dmwm/WMCore/issues/12007 but not only
External dependencies / deployment changes
Documentation provided with: https://gitlab.cern.ch/dmwm/wmcore-docs/-/merge_requests/51

Todor, just a kind reminder on the review.

Hi @amaltaro  I think you may take a final look at the PR. With my latest commits I enhanced enhancing  the configuration and the usability of both scripts. Unfortunately there are one or two pylint checks that are unavoidable, simply because of the nature of the scripts. I am talking about the definition of the logger in the global scope (which is needed for the interactive run of both of them) and the eval  statement in the strToDict function used  for sqlArgs option parsing. And to answer in advance  the question "Why can we not use any of the decoders from standard modules as json and ast.literal_evaluate?" The answer is simple - we need to construct a complicate python object from the .pkl files we send as input to the dao internal call. And these objects are not  only big, but the need to refer to an instances in memory which are created during import of the .pkl file.  In addition, both ast.literal_evaluate  and Json have the restriction to create python objects only from the literal string which is sent to them as input. It cannot refer to an object already created inside python.:
e.g. This works:
In [7]: ast.literal_eval("{'file': 'pklFile'}")
Out[7]: {'file': 'pklFile'}

while this one does not:
In [8]: ast.literal_eval("{'file': pklFile}")
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[8], line 1
----> 1 ast.literal_eval("{'file': pklFile}")

File /usr/lib64/python3.9/ast.py:105, in literal_eval(node_or_string)
...
File /usr/lib64/python3.9/ast.py:66, in literal_eval.<locals>._raise_malformed_node(node)
     65 def _raise_malformed_node(node):
---> 66     raise ValueError(f'malformed node or string: {node!r}')

ValueError: malformed node or string: <ast.Name object at 0x7f6c5311b5b0>

because  the pklFile is an object by its own means:
In [9]: pklFile
Out[9]:
{'data': [{'lfn': '/store/unmerged/GenericNoSmearGENBackfill/InclusiveDileptonMinBias_TuneCP5Plus_13p6TeV_pythia8/GEN/BACKFILL-v5/90383/b5a147fe-904e-4e2e-9159-7a4c73e6d4ef.root',
   'runs': {<WMCore.DataStructs.Run.Run at 0x7f6c5833a640>}},
  {'lfn': '/store/unmerged/GenericNoSmearGENBackfill/InclusiveDileptonMinBias_TuneCP5Plus_13p6TeV_pythia8/GEN/BACKFILL-v5/90383/b5a147fe-904e-4e2e-9159-7a4c73e6d4ef.root',
   'runs': {<WMCore.DataStructs.Run.Run at 0x7f6c5833a640>}},

And even if use the object canonical representation through repr(pkFile) to send it it will still break because the so created  pklFile contains reference to objects which are instances of <WMCore.DataStructs.Run.Run>.  And the reason why this would break  I already mentioned few lines above, but anyway, here is what the help tells us:
In [4]: help(ast.literal_eval)

Help on function literal_eval in module ast:

literal_eval(node_or_string)
    Safely evaluate an expression node or a string containing a Python
    expression.  The string or node provided may only consist of the following
    Python literal structures: strings, bytes, numbers, tuples, lists, dicts,
    sets, booleans, and None.
(END)

Example usage
Here is how the usability improves:

wmagen-component-standalone:

Loading the component for interactive usage:
(WMAgent.venv3) cmst1@vocms0290:WMAgent.venv3 $ ipython -i $WMA_ROOT_DIR/srv/WMCore/bin/wmagent-component-standalone -- -c $WMA_CONFIG_FILE  -p JobAccountant
Python 3.9.18 (main, May 16 2024, 00:00:00)
Type 'copyright', 'credits' or 'license' for more information
IPython 8.18.1 -- An enhanced Interactive Python. Type '?' for help.
%reload_ext autoreload
%autoreload 2
2024-07-26 12:24:27,377:INFO:wmagent-component-standalone:<module>(): Trying to source explicitely the WMAgent environment file: /data/WMAgent.venv3/deploy/env.sh
2024-07-26 12:24:27,421:INFO:FileTools:loadEnvFile(): Environment file: /data/WMAgent.venv3/deploy/env.sh loaded successfully
2024-07-26 12:24:27,424:INFO:wmagent-component-standalone:<module>(): wmaEnvFilePath: /data/WMAgent.venv3/deploy/env.sh
2024-07-26 12:24:27,424:INFO:wmagent-component-standalone:<module>(): wmaConfigPath: /data/WMAgent.venv3/srv/wmagent/2.3.4/config/config.py
2024-07-26 12:24:27,424:INFO:wmagent-component-standalone:<module>(): wmaComponent: JobAccountant
2024-07-26 12:24:27,424:INFO:wmagent-component-standalone:<module>(): logLevel: INFO
2024-07-26 12:24:27,424:INFO:wmagent-component-standalone:<module>(): daemon: False
2024-07-26 12:24:27,432:INFO:DBCore:__init__(): Instantiating base WM DBInterface
2024-07-26 12:24:27,432:INFO:wmagent-component-standalone:<module>(): Creating default component objects.
2024-07-26 12:24:27,432:INFO:wmagent-component-standalone:<module>(): Importing all possible modules found for this component
2024-07-26 12:24:27,432:INFO:wmagent-component-standalone:<module>(): Loading package: WMComponent.JobAccountant.AccountantWorker
2024-07-26 12:24:27,463:INFO:wmagent-component-standalone:<module>(): Populating the namespace with all definitions from AccountantWorker
2024-07-26 12:24:27,463:INFO:wmagent-component-standalone:<module>(): Trying to create an instance of all class definitions inside: AccountantWorker
2024-07-26 12:24:27,463:INFO:wmagent-component-standalone:<module>(): WMComponent.JobAccountant.AccountantWorker:AccountantWorker
2024-07-26 12:24:27,951:INFO:wmagent-component-standalone:<module>(): WMComponent.JobAccountant.AccountantWorker:AccountantWorkerException
2024-07-26 12:24:28,020:INFO:wmagent-component-standalone:<module>(): Loading package: WMComponent.JobAccountant.JobAccountant
2024-07-26 12:24:28,040:INFO:wmagent-component-standalone:<module>(): Populating the namespace with all definitions from JobAccountant
2024-07-26 12:24:28,041:INFO:wmagent-component-standalone:<module>(): Trying to create an instance of all class definitions inside: JobAccountant
2024-07-26 12:24:28,041:INFO:wmagent-component-standalone:<module>(): WMComponent.JobAccountant.JobAccountant:JobAccountant
2024-07-26 12:24:28,041:INFO:wmagent-component-standalone:<module>(): Loading package: WMComponent.JobAccountant.JobAccountantPoller
2024-07-26 12:24:28,042:INFO:wmagent-component-standalone:<module>(): Populating the namespace with all definitions from JobAccountantPoller
2024-07-26 12:24:28,042:INFO:wmagent-component-standalone:<module>(): Trying to create an instance of all class definitions inside: JobAccountantPoller
2024-07-26 12:24:28,042:INFO:wmagent-component-standalone:<module>(): WMComponent.JobAccountant.JobAccountantPoller:JobAccountantPoller
2024-07-26 12:24:28,042:INFO:wmagent-component-standalone:<module>(): WMComponent.JobAccountant.JobAccountantPoller:JobAccountantPollerException
In [1]:

Start executing it interactively:
In [1]: jobaccountantpoller.setup()

In [2]: jobaccountantpoller.algorithm()
2024-07-26 12:24:55,047:INFO:JobAccountantPoller:algorithm(): Found 0 completed jobs
Out[2]: (0.0026, None, 'algorithm')

Objects instances and contents of the component's global scope:
n [3]: dir()
Out[3]:
['AccountantWorker',
 'AccountantWorkerException',
 'ArgumentParser',
 'BaseWorkerThread',
 'CRIC',
 'ChangeState',
 'CouchConnectionError',
 'CouchServer',
 'DAOFactory',
 'DBSBufferFile',
 'DataCollectionService',
 'FORMAT',
 'File',
 'Harness',
 'In',
 'Job',
 'JobAccountant',
 'JobAccountantPoller',
 'JobAccountantPollerException',
 'LOGLEVEL',
 'Out',
 'RawDescriptionHelpFormatter',
 'Report',
 'ResourceControl',
 'WMConnectionBase',
 'WMException',
 'WMStatsWriter',
 '_',
 '_1',
 '__',
 '___',
 '__builtin__',
 '__builtins__',
 '__doc__',
 '__loader__',
 '__name__',
 '__package__',
 '__spec__',
 '_dh',
 '_i',
 '_i1',
 '_i2',
 '_i3',
 '_ih',
 '_ii',
 '_iii',
 '_oh',
 'accountantworker',
 'accountantworkerexception',
 'args',
 'classDefs',
 'className',
 'collections',
 'comPath',
 'connectToDB',
 'createOptionParser',
 'exit',
 'fullPkgName',
 'gc',
 'get_ipython',
 'get_python_lib',
 'grouper',
 'importlib',
 'index',
 'inspect',
 'jobaccountant',
 'jobaccountantpoller',
 'jobaccountantpollerexception',
 'libPath',
 'loadConfigurationFile',
 'loadEnvFile',
 'logFileHandler',
 'logFilePath',
 'logStdoutHandler',
 'logger',
 'logging',
 'main',
 'modReload',
 'modSpec',
 'module',
 'modules',
 'msg',
 'names',
 'obj',
 'objName',
 'open',
 'optParser',
 'options',
 'os',
 'pformat',
 'pkgName',
 'pkgSource',
 'pkgutil',
 'pprint',
 'pythonLibPaths',
 'quit',
 'resourceControl',
 'runpy',
 'subprocess',
 'sys',
 'threading',
 'timeFunction',
 'wmaComponentModule',
 'wmaComponentName',
 'wmaComponentPaths',
 'wmaConfig']

ExecuteDao:

Executing the dao once and staying in the interactive console for further debugging:
(WMAgent.venv3) cmst1@vocms0290:WMAgent.venv3 $ ipython -i $WMA_ROOT_DIR/srv/WMCore/src/python/WMCore/Database/ExecuteDAO.py -- -p  WMCore.WMBS -m Files.AddRunLumi -f $WMA_INSTALL_DIR/JobAccountant/runLumiBinds.pkl  -s "{'file': pklFile['data']}"
Python 3.9.18 (main, May 16 2024, 00:00:00)
Type 'copyright', 'credits' or 'license' for more information
IPython 8.18.1 -- An enhanced Interactive Python. Type '?' for help.
%reload_ext autoreload
%autoreload 2
2024-07-26 12:25:20,100:INFO:ExecuteDAO: PklFile: /data/WMAgent.venv3/srv/wmagent/2.3.4/install/JobAccountant/runLumiBinds.pkl loaded as: `pklFile`. You can refer to its content through the -s argument.
2024-07-26 12:25:20,100:INFO:ExecuteDAO: Trying to source explicitely the WMAgent environment file: /data/WMAgent.venv3/deploy/env.sh
2024-07-26 12:25:20,143:INFO:FileTools: Environment file: /data/WMAgent.venv3/deploy/env.sh loaded successfully
2024-07-26 12:25:20,143:INFO:ExecuteDAO: Loading configFile: /data/WMAgent.venv3/srv/wmagent/2.3.4/config/config.py
2024-07-26 12:25:20,152:INFO:DBCore: Instantiating base WM DBInterface
2024-07-26 12:25:20,152:INFO:ExecuteDAO: DAO Factory initialised from package: WMCore.WMBS
2024-07-26 12:25:20,156:INFO:ExecuteDAO: DAO Module initialised as: Files.AddRunLumi
2024-07-26 12:25:20,588:INFO:ExecuteDAO: DAO Results:
True

In [1]:

Fetching some dryRun  information and full sql query with adjacent objects to be executed from the interactive session:
In [7]: daoObject(*args.sqlArgs, dryRun=True, daoHelp=True, **args.sqlKwArgs)

2024-07-26 12:57:41,534:INFO:ExecuteDAO: DAO SQL queries to be executed:
2024-07-26 12:57:41,534:INFO:ExecuteDAO:
----------------------------------------------------------------------
sql: INSERT INTO wmbs_file_runlumi_map (fileid, run, lumi, num_events)
                SELECT wfd.id, :run, :lumi, :num_events FROM wmbs_file_details wfd WHERE lfn = :lfn
                  AND NOT EXISTS (SELECT fileid FROM wmbs_file_runlumi_map wfrm2
                                   WHERE wfrm2.fileid = wfd.id
                                   AND wfrm2.run = :run
                                   AND wfrm2.lumi = :lumi)
----------------------------------------------------------------------

2024-07-26 12:57:41,539:INFO:ExecuteDAO: DAO SQL arguments provided:
(), {'file': [{'lfn': '/store/unmerged/GenericNoSmearGENBackfill/InclusiveDileptonMinBias_TuneCP5Plus_13p6TeV_pythia8/GEN/BACKFILL-v5/90383/b5a147fe-904e-4e2e-9159-7a4c73e6d4ef.root',
           'runs': {<WMCore.DataStructs.Run.Run object at 0x7fd4fbb3a670>}},
          {'lfn': '/store/unmerged/GenericNoSmearGENBackfill/InclusiveDileptonMinBias_TuneCP5Plus_13p6TeV_pythia8/GEN/BACKFILL-v5/90383/b5a147fe-904e-4e2e-9159-7a4c73e6d4ef.root',
           'runs': {<WMCore.DataStructs.Run.Run object at 0x7fd4fbb3a670>}},
          {'lfn': '/store/unmerged/GenericNoSmearGENBackfill/InclusiveDileptonMinBias_TuneCP5Plus_13p6TeV_pythia8/GEN/BACKFILL-v5/90383/b5a147fe-904e-4e2e-9159-7a4c73e6d4ef.root',
...
          {'lfn': '/store/unmerged/GenericNoSmearGENBackfill/InclusiveDileptonMinBias_TuneCP5Plus_13p6TeV_pythia8/GEN/BACKFILL-v5/90383/b5a147fe-904e-4e2e-9159-7a4c73e6d4ef.root',
           'runs': {<WMCore.DataStructs.Run.Run object at 0x7fd4fbb3a670>}}]}
Out[7]: []

Help on AddRunLumi in module WMCore.WMBS.Oracle.Files.AddRunLumi object:

class AddRunLumi(WMCore.WMBS.MySQL.Files.AddRunLumi.AddRunLumi)
 |  AddRunLumi(logger, dbinterface)
 |
 |  _AddRunLumi_
 |
 |  overwirtes MySQL Files.AddRunLumi.sql to use in oracle.
 |
 |  To Check: might not need to overwrite if modifiy MySQL.Files.AddRunLumi.sql
 |  a bit to work with both
 |
 |  Method resolution order:
 |      AddRunLumi
 |      WMCore.WMBS.MySQL.Files.AddRunLumi.AddRunLumi
 |      WMCore.Database.DBFormatter.DBFormatter
 |      WMCore.DataStructs.WMObject.WMObject
 |      builtins.object
 |
 |  Data and other attributes defined here:
 |
 |  sql = 'INSERT INTO wmbs_file_runlumi_map (fileid, run, ...            ...
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from WMCore.WMBS.MySQL.Files.AddRunLumi.AddRunLumi:
...

Todor, before proceeding with this review, please squash the commits accordingly; amend commit messages if needed and update the PR description.

The commits have been squashed appropriately

Todor, in addition, please provide a basic documentation for these in one of the WMAgent topics in our gitlab repo.
Maybe we could add it in this stale - and likely outdated - documetation: https://gitlab.cern.ch/dmwm/wmcore-docs/-/blob/master/docs/wmcore/WMAgent-developer-tutorial.md?ref_type=heads
Otherwise a sub-section at the bottom of this one: https://gitlab.cern.ch/dmwm/wmcore-docs/-/blob/master/docs/wmcore/WMAgent.md?ref_type=heads
Or we just start a new one with content like "WMAgent Debugging".

Test this please

hi @amaltaro I think I addressed the two major issues from the pylint and unit tests. Please take another look.
As of the documentation, I prefer to create one additional section at   https://gitlab.cern.ch/dmwm/wmcore-docs/-/blob/master/docs/wmcore/WMAgent.md?ref_type=heads But it seems I am having some  problems using the 2fa on gitlab. Working on understanding what is going on so far, so please  do not wait for me to solving those before checking the code again.

@todor-ivanov I just stumbled upon this already approved PR.
It looks like the only thing holding the merge of this pull request is to come up with the relevant documentation. Did you manage to work on that? If so, please link it in the original PR description and then we can go ahead with merging this.

hi @amaltaro, Here is the needed documentation:
https://gitlab.cern.ch/dmwm/wmcore-docs/-/merge_requests/51/diffs

Thanks! I have updated the initial description of this PR with a link to the documentation, otherwise it is too easy to have it lost in all these comments.


Fix flaky testGlobalCheckpointIsSafe

Checklist

[x] Added an entry in CHANGES.txt for user facing changes
[x] Updated documentation & sql_features table for user facing changes
[x] Touched code is covered by tests
[x] CLA is signed
[x] This does not contain breaking changes, or if it does:

It is released within a major release
It is recorded in CHANGES.txt
It was marked as deprecated in an earlier release if possible
You've thought about the consequences and other components are adapted
(E.g. AdminUI)

There is a strange failure on jenkins SQLActionException[RelationUnknown: Relation 'locations' unknown]. It seems that interfaces/http.rst is running against the wrong crate version. SQLActionException is gone.

There was a stale crate docker container running on the slave. That caused hiccups with the test suite.

retest this please


Related Repositories Give 404

The two links in the README of "related" repositories are broken.

xsngine-assets correctly directs me to https://github.com/Razish/xsngine-assets, xsngine-tools simply doesn't exist yet.
If that's what you're experiencing, then everything is working as intended.

Brilliant ;)

xsngine-tools now exists and will soon contain some .XMF utility scripts.


Value of ValueGenerated property set in a convention is lost

We set a default value and a ValueGenerated property to Never in a convention (IPropertyAddedConvention) using a IConventionPropertyBuilder.
When the model is completed the ValueGenerated property of IProperty has an OnAdd value, but the Never value is expected. See Debug.Asserts in the code below.
Steps to reproduce

Create a new .NET Core 3.0 console app
Add Microsoft.EntityFrameworkCore.SqlServer nuget package (3.0.0 or 3.1.0-preview1.19506.2)
Run (debug) the application and see the Debug.Assert calls.

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore.Metadata.Conventions;
using Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Diagnostics;

namespace ConsoleApp1
{
	public class Program
	{
		public static void Main(string[] args)
		{
			var dbContext = new MyDbContext();
			var nameProperty = dbContext.Model.FindEntityType(typeof(Person)).FindProperty(nameof(Person.Name));
			Debug.Assert(nameProperty.ValueGenerated == Microsoft.EntityFrameworkCore.Metadata.ValueGenerated.Never, "ValueGenerated set in convention was somehow lost."); // fails
		}
	}

	public class MyDbContext : DbContext
	{
		protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
		{
			base.OnConfiguring(optionsBuilder);
			((IDbContextOptionsBuilderInfrastructure)optionsBuilder).AddOrUpdateExtension(new ConventionSetDefaultValuePluginServiceInstallerExtension()); // infrastructure to add DefaultValueConvention
			optionsBuilder.UseSqlServer("we are not going to make a connection");
		}

		protected override void OnModelCreating(ModelBuilder modelBuilder)
		{
			base.OnModelCreating(modelBuilder);
			modelBuilder.Entity<Person>();
		}
	}

	#region Model
	public class Person
	{
		public int Id { get; set; }
		public string Name { get; set; } // we are going to setup a default value to this property
	}
	#endregion

	public class DefaultValueConvention : IPropertyAddedConvention
	{
		public void ProcessPropertyAdded(IConventionPropertyBuilder propertyBuilder, IConventionContext<IConventionPropertyBuilder> context)
		{
			if (propertyBuilder.Metadata.ClrType == typeof(string))
			{
				propertyBuilder.HasDefaultValue("some default value");
				// The following line is the line which matters.
				// We would like to set the value generated property to Never.
				// (https://stackoverflow.com/questions/40655968/how-to-force-default-values-in-an-insert-with-entityframework-core)
				propertyBuilder.ValueGenerated(Microsoft.EntityFrameworkCore.Metadata.ValueGenerated.Never, fromDataAnnotation: false /* Convention */);

				Debug.Assert(propertyBuilder.Metadata.ValueGenerated == Microsoft.EntityFrameworkCore.Metadata.ValueGenerated.Never, "ValueGenerated in convention was not set to Never."); // OK
			}
		}
	}

	#region Infrastructure
	public class DefaultValueConventionPlugin : IConventionSetPlugin
	{
		public ConventionSet ModifyConventions(ConventionSet conventionSet)
		{
			conventionSet.PropertyAddedConventions.Add(new DefaultValueConvention());
			return conventionSet;
		}
	}

	internal class ConventionSetDefaultValuePluginServiceInstallerExtension : IDbContextOptionsExtension
	{
		public DbContextOptionsExtensionInfo Info => new ExtensionInfo(this);

		public void ApplyServices(IServiceCollection services)
		{
			services.AddSingleton<IConventionSetPlugin, DefaultValueConventionPlugin>();
		}

		public void Validate(IDbContextOptions options)
		{
			// NOOP
		}

		private class ExtensionInfo : DbContextOptionsExtensionInfo
		{
			public override bool IsDatabaseProvider => false;

			public override string LogFragment => "";

			public ExtensionInfo(IDbContextOptionsExtension extension) : base(extension)
			{

			}

			public override long GetServiceProviderHashCode()
			{
				return 0;
			}

			public override void PopulateDebugInfo(IDictionary<string, string> debugInfo)
			{
				// NOOP
			}
		}
	}
	#endregion
}

Workaround
To workaround the issue just claim that fromDataAnnotation is true.
propertyBuilder.ValueGenerated(Microsoft.EntityFrameworkCore.Metadata.ValueGenerated.Never, fromDataAnnotation: true /* DataAnnotation */);

Further technical details
EF Core version: 3.0.0, 3.1.0-preview1.19506.2
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET Core 3.0

Note for triage: looks like RelationalValueGenerationConvention is overriding the value set in the custom convention.
/cc @AndriySvyryd

Yes, the custom convention should derive from SqlServerValueGenerationConvention, override GetValueGenerated and replace the convention in the convention set.

I guest, I can replace SqlServerValueGenerationConvention with only one convention. So there is no easy way how to use more conventions setting ValueGenerated (each one to some subset of model properties).

@jirikanda If you don't derive from SqlServerValueGenerationConvention you would need to implement all the same convention types to be able to override the value set by SqlServerValueGenerationConvention

Notes from triage:

Adding to Andriy's comment above, specifically, the convention should implement all convention interfaces that are implemented by SqlServerValueGenerationConvention--see below
Public conventions (#214) will likely make this easier; current convention support is targeted to providers and other extensions.

public class SqlServerValueGenerationConvention :
    RelationalValueGenerationConvention
{
}

public class RelationalValueGenerationConvention :
    ValueGenerationConvention,
    IPropertyAnnotationChangedConvention,
    IEntityTypeAnnotationChangedConvention
{
}

public class ValueGenerationConvention :
    IEntityTypePrimaryKeyChangedConvention,
    IForeignKeyAddedConvention,
    IForeignKeyRemovedConvention,
    IForeignKeyPropertiesChangedConvention,
    IEntityTypeBaseTypeChangedConvention
{
}


Strange issue with Windows 10 Firefox

Hi, when I first loaded the web URL using Firefox it loaded a webpage with 4 buttons and references to Bitnami. It wasn't the "Server Side Request Forgery" page. I discovered what the page should be when I opened it in Chrome. Since doing this, it has now loaded correctly in Firefox.
It had left me puzzled as to how to complete the rest of the exercise because the "Submit Query" form wasn't showing. I wonder if it's worth including a screenshot of the page the user should expect to see in the README. Something like:
This is the page you should expect to see:

Thanks @namloc2001 , this is noted now on https://github.com/avishayil/caponeme/commit/955b9d180199dc9e1cdefddab6f22a54b031340f


Fix an error for rubocop -V when .rubocop.yml contains ERB

The config file is allowed to include ERB syntax which was being parsed as YAML as is without being resolved.
Uses Util.silence_warnings to supress the potential warnings from check_duplication.

Before submitting the PR make sure the following are checked:

[x] The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
[x] Wrote good commit messages.
[x] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[x] Added tests.
[x] Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
[x] Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

Looks good to me. Thanks!