Toolchain built for 64bit wide time_t fails to build working hello-world-example (IDFGH-6318)

Environment

Development kit: ESP32 NodeMCU Development Board
Module or chip used:  ESP32-WROOM-32
IDF version: v4.3.1-448-g48997e82c0
Build System: Make/Cmake
Compiler version: xtensa-esp32-elf-gcc (crosstool-NG esp-2021r2.2-abb32e6-dirty) 8.4.0
Operating System: Linux
Using an IDE?: No
Power Supply: USB

Problem Description
I want to use 64bit wide time_t in an application. Therefore i followed the instructions to compile the Toolchain from Source and removed --enable-newlib-long-time_t from crosstool-NG/samples/xtensa-esp32-elf/crosstool.config leading to the following diff (and a "dirty" compiler version, see above):
diff --git a/samples/xtensa-esp32-elf/crosstool.config b/samples/xtensa-esp32-elf/crosstool.config
index 5fa14eaf..fea33731 100644
--- a/samples/xtensa-esp32-elf/crosstool.config
+++ b/samples/xtensa-esp32-elf/crosstool.config
@@ -30,7 +30,7 @@ CT_NEWLIB_DEVEL_REVISION=""
 CT_NEWLIB_DEVEL_SUBDIR=""
 CT_NEWLIB_DEVEL_BOOTSTRAP=""
 CT_LIBC_NEWLIB_TARGET_CFLAGS=""
-CT_LIBC_NEWLIB_EXTRA_CONFIG_ARRAY="--enable-newlib-long-time_t --enable-newlib-nano-malloc --enable-newlib-retargetable-locking --enable-newlib-iconv"
+CT_LIBC_NEWLIB_EXTRA_CONFIG_ARRAY="--enable-newlib-nano-malloc --enable-newlib-retargetable-locking --enable-newlib-iconv"
 CT_LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y
 CT_LIBC_NEWLIB_REENT_SMALL=y
 CT_LIBC_NEWLIB_IO_C99FMT=y
@@ -41,7 +41,7 @@ CT_LIBC_NEWLIB_WIDE_ORIENT=n

 CT_LIBC_NEWLIB_AUX_BUILD=y
 CT_LIBC_NEWLIB_AUX_BUILD_NAME="nano"
-CT_LIBC_NEWLIB_AUX_BUILD_EXTRA_CONFIG_ARRAY="--with-newlib --enable-multilib --disable-newlib-io-c99-formats --disable-newlib-supplied-syscalls --enable-newlib-nano-formatted-io --enable-newlib-reent-small --enable-target-optspace --enable-newlib-long-time_t --enable-newlib-nano-malloc --enable-newlib-retargetable-locking --disable-newlib_wide_orient --enable-newlib-iconv"
+CT_LIBC_NEWLIB_AUX_BUILD_EXTRA_CONFIG_ARRAY="--with-newlib --enable-multilib --disable-newlib-io-c99-formats --disable-newlib-supplied-syscalls --enable-newlib-nano-formatted-io --enable-newlib-reent-small --enable-target-optspace --enable-newlib-nano-malloc --enable-newlib-retargetable-locking --disable-newlib_wide_orient --enable-newlib-iconv"
 CT_LIBC_NEWLIB_AUX_BUILD_TARGET_CFLAGS=""

 # For compatibility with GCC 8, change it when update

When compiling the hello world example with CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS=y in the sdkconfig everything looks fine.
Expected Behavior
I would expect to have the hello world example running as usual.
Actual Behavior
After flashing the application gets stuck in a restart loop:
[...]
[100%] Built target flash
--- Miniterm on /dev/ttyUSB0  115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
I (168) esp_image: segment 4: paddr=00033a78 vaddr=40086910 size=049c4h ( 18884) load
I (176) esp_image: segment 5: paddr=00038444 vaddr=50000000 size=00010h (    16) load
I (182) boot: Loaded app from partition at offset 0x10000
I (182) boot: Disabling RNG early entropy source...
I (197) cpu_start: Pro cpu up.
I (197) cpu_start: Starting app cpu, entry point is 0x40081044
I (0) cpu_start: App cpu up.
I (211) cpu_start: Pro cpu start user code
I (211) cpu_start: cpu freq: 160000000
I (211) cpu_start: Application information:
I (216) cpu_start: Project name:     hello-world
I (221) cpu_start: App version:      v4.3.1-448-g48997e82c0
I (227) cpu_start: Compile time:     Nov 29 2021 17:58:51
I (233) cpu_start: ELF file SHA256:  49bbf3c4f1676a0c...
I (239) cpu_start: ESP-IDF:          v4.3.1-448-g48997e82c0
I (246) heap_init: Initializing. RAM available for dynamic allocation:
I (253) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (259) heap_init: At 3FFB3208 len 0002CDF8 (179 KiB): DRAM
I (265) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (271) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (278) heap_init: At 4008B2D4 len 00014D2C (83 KiB): IRAM
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:7360
load:0x40078000,len:14912
load:0x40080400,len:3688
entry 0x4008067c
I (27) boot: ESP-IDF v4.3.1-448-g48997e82c0 2nd stage bootloader
I (27) boot: compile time 17:58:35
I (28) boot: chip revision: 1
I (32) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (39) boot.esp32: SPI Speed      : 40MHz
I (43) boot.esp32: SPI Mode       : DIO
I (48) boot.esp32: SPI Flash Size : 2MB
I (52) boot: Enabling RNG early entropy source...
I (58) boot: Partition Table:
I (61) boot: ## Label            Usage          Type ST Offset   Length
I (69) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (76) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (84) boot:  2 factory          factory app      00 00 00010000 00100000
I (91) boot: End of partition table
I (95) boot_comm: chip revision: 1, min. application chip revision: 0
I (102) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=06da8h ( 28072) map
I (121) esp_image: segment 1: paddr=00016dd0 vaddr=3ffb0000 size=02930h ( 10544) load
I (126) esp_image: segment 2: paddr=00019708 vaddr=40080000 size=06910h ( 26896) load
I (139) esp_image: segment 3: paddr=00020020 vaddr=400d0020 size=13a50h ( 80464) map
I (168) esp_image: segment 4: paddr=00033a78 vaddr=40086910 size=049c4h ( 18884) load
I (176) esp_image: segment 5: paddr=00038444 vaddr=50000000 size=00010h (    16) load
I (182) boot: Loaded app from partition at offset 0x10000
I (182) boot: Disabling RNG early entropy source...
I (197) cpu_start: Pro cpu up.
I (197) cpu_start: Starting app cpu, entry point is 0x40081044
I (0) cpu_start: App cpu up.
I (211) cpu_start: Pro cpu start user code
I (211) cpu_start: cpu freq: 160000000
I (211) cpu_start: Application information:
I (216) cpu_start: Project name:     hello-world
I (221) cpu_start: App version:      v4.3.1-448-g48997e82c0
I (227) cpu_start: Compile time:     Nov 29 2021 17:58:51
I (233) cpu_start: ELF file SHA256:  49bbf3c4f1676a0c...
I (239) cpu_start: ESP-IDF:          v4.3.1-448-g48997e82c0
I (246) heap_init: Initializing. RAM available for dynamic allocation:
I (253) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (259) heap_init: At 3FFB3208 len 0002CDF8 (179 KiB): DRAM
I (265) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (272) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (278) heap_init: At 4008B2D4 len 00014D2C (83 KiB): IRAM
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[...]

Steps to reproduce

Setup Linux Toolchain from Scratch using using crosstool-NG on branch esp-1.24.x (abb32e6) with the above mentioned patch (or remove --enable-newlib-long-time_t as described in the docs).
Checkout latest "hello-world" example, set CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS=y, compile with toolchain from step 1 and flash.

Additional notes

when i build the toolchain without removing --enable-newlib-long-time_t and use it for building the hello world example, everything works as expected

Thanks in advance!

I tried "https://docs.espressif.com/projects/esp-idf/en/release-v4.4/esp32/get-started/linux-setup-scratch.html"
it same problem.when it set to "64bit time_t",but it cloudn't start the hello_world application.reboot every 9 second.
please see my log:
ets Jun  8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:6756
load:0x40078000,len:14796
load:0x40080400,len:3792
0x40080400: _init at ??:?
entry 0x40080694
I (27) boot: ESP-IDF v5.0-dev-957-g6cb6087dd0-dirty 2nd stage bootloader
I (28) boot: compile time 15:57:29
I (29) boot: chip revision: 1
I (32) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (39) boot.esp32: SPI Speed      : 40MHz
I (44) boot.esp32: SPI Mode       : DIO
I (49) boot.esp32: SPI Flash Size : 2MB
I (53) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (62) boot: ## Label            Usage          Type ST Offset   Length
I (69) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (77) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (84) boot:  2 factory          factory app      00 00 00010000 00100000
I (92) boot: End of partition table
I (69) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (77) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (84) boot:  2 factory          factory app      00 00 00010000 00100000
I (92) boot: End of partition table
I (96) boot_comm: chip revision: 1, min. application chip revision: 0
I (103) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=0796ch ( 31084) map
I (123) esp_image: segment 1: paddr=00017994 vaddr=3ffb0000 size=0243ch (  9276) load
I (127) esp_image: segment 2: paddr=00019dd8 vaddr=40080000 size=06240h ( 25152) load
I (141) esp_image: segment 3: paddr=00020020 vaddr=400d0020 size=149fch ( 84476) map
I (172) esp_image: segment 4: paddr=00034a24 vaddr=40086240 size=0500ch ( 20492) load
I (181) esp_image: segment 5: paddr=00039a38 vaddr=50000000 size=00010h (    16) load
I (187) boot: Disabling RNG early entropy source...
I (203) cpu_start: Pro cpu up.
I (203) cpu_start: Starting app cpu, entry point is 0x40081004
0x40081004: call_start_cpu1 at /home/npikachu/esp/esp-idf/components/esp_system/port/cpu_start.c:152
I (0) cpu_start: App cpu up.
I (217) cpu_start: Pro cpu start user code
I (217) cpu_start: cpu freq: 160000000 Hz
I (217) cpu_start: Application information:
I (222) cpu_start: Project name:     hello_world
I (227) cpu_start: App version:      1
I (232) cpu_start: Compile time:     Jan  5 2022 15:57:15
I (238) cpu_start: ELF file SHA256:  7d70f879a8b69dfa...
I (244) cpu_start: ESP-IDF:          v5.0-dev-957-g6cb6087dd0-dirty
I (251) heap_init: Initializing. RAM available for dynamic allocation:
I (258) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (264) heap_init: At 3FFB2D30 len 0002D2D0 (180 KiB): DRAM
I (270) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (277) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (283) heap_init: At 4008B24C len 00014DB4 (83 KiB): IRAM
[after 9second repeat forever]
how to resolve?

Thank you for reporting @sven-hm @itadori-1. We found the issue and will soon fix it in master and release branches.
The issue is caused by mismatch of struct stat size between IDF code and the ROM. After switching to 64-bit time_t, IDF code expects larger size of struct stat, but some parts of ROM code assume the original size of struct stat which was valid for 32-bit time_t. This mismatch causes stack corruption which (luckily) caused a crash in this situation.
Here is the patch which can be applied to master branch.
7980.zip
Instead of applying the patch, you may also manually remove the following lines from components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld:
_isatty_r = 0x40000ea0;
__sfvwrite_r = 0x4005893c;
__smakebuf_r = 0x40059108;
__srefill_r = 0x400593d4;
__swsetup_r = 0x40058cc8;

Thanks @igrr for the fix! I can confirm that the suggested fix works with the example code.

@igrr in which release do you plan to include the fix?

@sven-hm The fix is currently in master, so will be included in v5.0 release. v5.0 will switch to 64-bit time_t as the default option.
I can also backport this to release/v4.4 and release/v4.3 branches, in this case the fix will appear in v4.4.1 and v4.3.3, respectively.

Ok, nice! Thank you, @igrr !


Any help appreciated.

I have been struggling with this for a bit. Do you know exactly where the key parameter in the useSend function is converted to a string? I'd like to pass an object through, but I am unsure where the conversion takes place. To be clear this is when you're moving items between grids.

The parameter in the onSend function is the key of the react component that is sent. In a react component the key must be a string.
If you are doing this
<Component key={myObject} />

then you are breaking your application as all the components will have the same "[object object]" key, react should show you a warning.
You should get information of the component that is sent in another way, the kanban demo may help.


Backup recovery services

@jruckle @eschubert @gavin-lai @lmcornejo please Q&A and offer feedback
@rpdubose @srveit @jim-phillips Don't merge until we have Q&A done

Looks good Chris.


⚠ Secret Website 3 has degraded performance

In d5ca3ba, Secret Website 3 ($SECRET_WEBSITE_3) experienced degraded performance:

HTTP code: 200
Response time: 2710 ms

Resolved: Secret Website 3 performance has improved in 93a4610.


Aplication's output

Hello,
I was going through the resulting relations' embeddings and noticed there are double the amount of relations in these files, in comparison to the number of relations present in the input graph. I understand this is due to reciprocal learning.
However I am struggling with understanding the interpretation of the resulting relations' embeddings.
How can I get a relation's embedding from these files?
Given a KG with 11 relations, would it be safe to assume that the embeddings present in row 0 and in row 11 correspond to the embeddings of relation with ID 0 and the embedding of its inverse relation?
Thanks in advance,
Alexandra Silva

Hello,
I was going through the resulting relations' embeddings and noticed there are double the amount of relations in these files, in comparison to the number of relations present in the input graph. I understand this is due to reciprocal learning.
However I am struggling with understanding the interpretation of the resulting relations' embeddings.
How can I get a relation's embedding from these files?
Given a KG with 11 relations, would it be safe to assume that the embeddings present in row 0 and in row 11 correspond to the embeddings of relation with ID 0 and the embedding of its inverse relation?
Thanks in advance,
Alexandra Silva

Hi,
Yes, you are right. (Refer the function around Line 176 in run_DensE.py)
Cheers,
Haonan

Thank you 👍


Use 'actions/cache@v1' for CI

Waiting resolve this issue.

Hmm. It doesn't look like this saved much time over a master run (6m23s there, 6m52s here). I expect caching to take some time, but it'd be nice to see how much this is actually saving.
I suspect caching the wasm-bindgen build is likely to get much more out of this since it seems to be the lowest-hanging fruit.
The approach seems good; I'd just like to see how much it actually improves things (maybe it needs merged to show that?).


Add readonly modifier to readonly structs

Started with ObjectMethodExecutor and noticed many other structs could be made readonly.
Please review and check that these won't break anything. If a type can't be made readonly then I'll update the struct with a comment explaining why not.

@pranavkm @halter73 I've created an issue for that piece of work - https://github.com/aspnet/AspNetCore/issues/7180
This PR is already 25 files across many projects. I don't want to turn this PR into a giant monster.


invoke loaddata - traceback

Environment

Python version: 3.8.5
Nautobot version: 26b111640f43 (v1.0.3b1)

I haven't added custom status data in database. I also checked that the export file contains only a single entry with the primary key listed in traceback
-   model: extras.status
    pk: 093f43ab-4d78-42ee-958f-76d86b1482a4
    fields:
        created: 2021-05-26
        last_updated: 2021-05-26 09:21:48.120080+00:00
        _custom_field_data: {}
        name: Retired
        color: f44336
        slug: retired
        description: Site has been retired
        content_types:
        - 2

Steps to Reproduce

invoke dumpdata -f yaml
invoke destroy
invoke start
invoke createsuperuser
invoke loaddata -f db_output.yaml

Expected Behavior
Data should be loaded

Observed Behavior
Traceback during load
 $ invoke loaddata -f db_output.yaml
Running docker-compose command "ps --services --filter status=running"
Running docker-compose command "exec nautobot nautobot-server loaddata db_output.yaml"
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "extras_status_name_key"
DETAIL:  Key (name)=(Retired) already exists.

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

Traceback (most recent call last):
  File "/usr/local/bin/nautobot-server", line 5, in <module>
    main()
  File "/source/nautobot/core/cli.py", line 55, in main
    run_app(
  File "/source/nautobot/core/runner/runner.py", line 266, in run_app
    management.execute_from_command_line([runner_name, command] + command_args)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 330, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 371, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/loaddata.py", line 72, in handle
    self.loaddata(fixture_labels)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/loaddata.py", line 114, in loaddata
    self.load_label(fixture_label)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/loaddata.py", line 181, in load_label
    obj.save(using=self.using)
  File "/usr/local/lib/python3.8/site-packages/django/core/serializers/base.py", line 223, in save
    models.Model.save_base(self.object, using=using, raw=True, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/db/models/base.py", line 790, in save_base
    updated = self._save_table(
  File "/usr/local/lib/python3.8/site-packages/django/db/models/base.py", line 895, in _save_table
    results = self._do_insert(cls._base_manager, using, fields, returning_fields, raw)
  File "/usr/local/lib/python3.8/site-packages/django/db/models/base.py", line 933, in _do_insert
    return manager._insert(
  File "/usr/local/lib/python3.8/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/db/models/query.py", line 1254, in _insert
    return query.get_compiler(using=using).execute_sql(returning_fields)
  File "/usr/local/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1397, in execute_sql
    cursor.execute(sql, params)
  File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 98, in execute
    return super().execute(sql, params)
  File "/usr/local/lib/python3.8/site-packages/cacheops/transaction.py", line 93, in execute
    result = self._no_monkey.execute(self, sql, params)
  File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 66, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/usr/local/lib/python3.8/site-packages/django/db/utils.py", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
django.db.utils.IntegrityError: Problem installing fixture '/source/db_output.yaml': Could not load extras.Status(pk=093f43ab-4d78-42ee-958f-76d86b1482a4): duplicate key value violates unique constraint "extras_status_name_key"
DETAIL:  Key (name)=(Retired) already exists.

This is a common issue when importing from dumps because we're automatically creating Status objects when a new Nautobot database is bootstrapped.
Please try deleting all your Status objects on the new instance, prior to importing your dump:
$ nautobot-server nbshell
>>> Status.objects.all().delete()

And then run nautobot-server loaddata...

I still think it is reasonable for invoke loaddata to handle this for the user. I know I was surprised by this as well.

If this is not handled by invoke loaddata then at least display a message to help resolving the problem.
A users expectation is that importing previously exported data would be possible without running into an error.

@jathanism  I've tested again with no success on import.

Running docker-compose command "down --volumes"
Stopping nautobot_worker_1   ... done
Stopping nautobot_nautobot_1 ... done
Stopping nautobot_redis_1    ... done
Stopping nautobot_postgres_1 ... done
Stopping nautobot_selenium_1 ... done
Removing nautobot_worker_1   ... done
Removing nautobot_nautobot_1 ... done
Removing nautobot_redis_1    ... done
Removing nautobot_postgres_1 ... done
Removing nautobot_selenium_1 ... done
Network nautobot-dev-net is external, skipping
Removing volume nautobot_pgdata_nautobot

# Startup Nautobot

$ invoke start
Starting Nautobot in detached mode...
Running docker-compose command "up --detach"
The Docker Engine you're using is running in swarm mode.

Compose does not use swarm mode to deploy services to multiple nodes in a swarm. All containers will be scheduled on the current node.

To deploy your application across the swarm, use `docker stack deploy`.

Creating volume "nautobot_pgdata_nautobot" with default driver
Creating nautobot_selenium_1 ... done
Creating nautobot_redis_1    ... done
Creating nautobot_postgres_1 ... done
Creating nautobot_nautobot_1 ... done
Creating nautobot_worker_1   ... done

# Successfully verified that WEB UI is responsive.

# try import - traceback

$ invoke loaddata db_output.json
Running docker-compose command "ps --services --filter status=running"
Running docker-compose command "exec nautobot nautobot-server loaddata db_output.json"
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/django/db/models/fields/related_descriptors.py", line 173, in __get__
    rel_obj = self.field.get_cached_value(instance)
  File "/usr/local/lib/python3.8/site-packages/django/db/models/fields/mixins.py", line 15, in get_cached_value
    return instance._state.fields_cache[cache_name]
KeyError: 'status'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/django/core/serializers/json.py", line 70, in Deserializer
    yield from PythonDeserializer(objects, **options)
  File "/usr/local/lib/python3.8/site-packages/django/core/serializers/python.py", line 146, in Deserializer
    obj = base.build_instance(Model, data, using)
  File "/usr/local/lib/python3.8/site-packages/django/core/serializers/base.py", line 270, in build_instance
    return Model(**data)
  File "/source/nautobot/dcim/models/cables.py", line 122, in __init__
    self._orig_status = self.status
  File "/usr/local/lib/python3.8/site-packages/django/db/models/fields/related_descriptors.py", line 187, in __get__
    rel_obj = self.get_object(instance)
  File "/usr/local/lib/python3.8/site-packages/django/db/models/fields/related_descriptors.py", line 154, in get_object
    return qs.get(self.field.get_reverse_related_filter(instance))
  File "/usr/local/lib/python3.8/site-packages/cacheops/query.py", line 353, in get
    return qs._no_monkey.get(qs, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/db/models/query.py", line 429, in get
    raise self.model.DoesNotExist(
nautobot.extras.models.statuses.DoesNotExist: Status matching query does not exist.

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

Traceback (most recent call last):
  File "/usr/local/bin/nautobot-server", line 5, in <module>
    main()
  File "/source/nautobot/core/cli.py", line 55, in main
    run_app(
  File "/source/nautobot/core/runner/runner.py", line 266, in run_app
    management.execute_from_command_line([runner_name, command] + command_args)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 330, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 371, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/loaddata.py", line 72, in handle
    self.loaddata(fixture_labels)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/loaddata.py", line 114, in loaddata
    self.load_label(fixture_label)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/loaddata.py", line 172, in load_label
    for obj in objects:
  File "/usr/local/lib/python3.8/site-packages/django/core/serializers/json.py", line 74, in Deserializer
    raise DeserializationError() from exc
django.core.serializers.base.DeserializationError: Problem installing fixture '/source/db_output.json':

Second try
# delete all data

$ invoke destroy
Destroying Nautobot...
Running docker-compose command "down --volumes"
Stopping nautobot_worker_1   ... done
Stopping nautobot_nautobot_1 ... done
Stopping nautobot_postgres_1 ... done
Stopping nautobot_redis_1    ... done
Stopping nautobot_selenium_1 ... done
Removing nautobot_worker_1   ... done
Removing nautobot_nautobot_1 ... done
Removing nautobot_postgres_1 ... done
Removing nautobot_redis_1    ... done
Removing nautobot_selenium_1 ... done
Network nautobot-dev-net is external, skipping
Removing volume nautobot_pgdata_nautobot

# Start Nautobot

$ invoke start
Starting Nautobot in detached mode...
Running docker-compose command "up --detach"
The Docker Engine you're using is running in swarm mode.

Compose does not use swarm mode to deploy services to multiple nodes in a swarm. All containers will be scheduled on the current node.

To deploy your application across the swarm, use `docker stack deploy`.

Creating volume "nautobot_pgdata_nautobot" with default driver
Creating nautobot_selenium_1 ... done
Creating nautobot_redis_1    ... done
Creating nautobot_postgres_1 ... done
Creating nautobot_nautobot_1 ... done
Creating nautobot_worker_1   ... done

# Successfully verified than Web UI is responsive

# Delete Statuses from Database

$ invoke nbshell
Running docker-compose command "ps --services --filter status=running"
Running docker-compose command "exec nautobot nautobot-server nbshell"
### Nautobot interactive shell (f77a7faadaf7)
### Python 3.8.7 | Django 3.1.12 | Nautobot 1.0.4b1
### lsmodels() will show available models. Use help(<model>) for more info.
>>> Status.objects.all().delete()
(67, {'extras.Status_content_types': 48, 'extras.Status': 19})
>>> quit()

# try import - traceback

$ invoke loaddata db_output.json
Running docker-compose command "ps --services --filter status=running"
Running docker-compose command "exec nautobot nautobot-server loaddata db_output.json"
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/django/db/models/fields/related_descriptors.py", line 173, in __get__
    rel_obj = self.field.get_cached_value(instance)
  File "/usr/local/lib/python3.8/site-packages/django/db/models/fields/mixins.py", line 15, in get_cached_value
    return instance._state.fields_cache[cache_name]
KeyError: 'status'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/django/core/serializers/json.py", line 70, in Deserializer
    yield from PythonDeserializer(objects, **options)
  File "/usr/local/lib/python3.8/site-packages/django/core/serializers/python.py", line 146, in Deserializer
    obj = base.build_instance(Model, data, using)
  File "/usr/local/lib/python3.8/site-packages/django/core/serializers/base.py", line 270, in build_instance
    return Model(**data)
  File "/source/nautobot/dcim/models/cables.py", line 122, in __init__
    self._orig_status = self.status
  File "/usr/local/lib/python3.8/site-packages/django/db/models/fields/related_descriptors.py", line 187, in __get__
    rel_obj = self.get_object(instance)
  File "/usr/local/lib/python3.8/site-packages/django/db/models/fields/related_descriptors.py", line 154, in get_object
    return qs.get(self.field.get_reverse_related_filter(instance))
  File "/usr/local/lib/python3.8/site-packages/cacheops/query.py", line 353, in get
    return qs._no_monkey.get(qs, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/db/models/query.py", line 429, in get
    raise self.model.DoesNotExist(
nautobot.extras.models.statuses.DoesNotExist: Status matching query does not exist.

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

Traceback (most recent call last):
  File "/usr/local/bin/nautobot-server", line 5, in <module>
    main()
  File "/source/nautobot/core/cli.py", line 55, in main
    run_app(
  File "/source/nautobot/core/runner/runner.py", line 266, in run_app
    management.execute_from_command_line([runner_name, command] + command_args)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 330, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 371, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/loaddata.py", line 72, in handle
    self.loaddata(fixture_labels)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/loaddata.py", line 114, in loaddata
    self.load_label(fixture_label)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/loaddata.py", line 172, in load_label
    for obj in objects:
  File "/usr/local/lib/python3.8/site-packages/django/core/serializers/json.py", line 74, in Deserializer
    raise DeserializationError() from exc
django.core.serializers.base.DeserializationError: Problem installing fixture '/source/db_output.json':

@jathanism Hello, is it planned to fix this in near future or should I proceed using the database`s backup / restore functionality to transfer data between environments?


Exposure in wimp source

What? Why?
This pull request introduces another class variable exposure_tonneyear to the WIMPEnergySpectrum class so that it is easier to change the exposure of the WIMP source.
How?
The spectra computed by wimprates.rate_wimp_std is in the units of events / (keV tonne year) and it is scaled by the exposure in units of tonne year in this line.
The way to scaling the WIMP rate is inspired by @pelssers's sensitivity studies notebook. He tried to scale the spectrum from the class but there is a comment that suggests that that would not work because 'populate tensor cache is already called so has no effect' so in this PR, the scaling factor is introduced to WIMPEnergySpectrum instead.
Testing? Screenshots (optional)
The changes are tested using the a class which inherits from fd.SR1WIMPSource and with the class variables overwritten as such:
class wimp_variable_f2(fd.SR1WIMPSource):
    variable_drift_field = True

    mw = this_mw
    sigma_nucleon = this_sigma_nucleon
    energy_edges = np.geomspace(0.7, 50., 100) # sticking to default values
    exposure_tonneyear = this_exposure

    #'''
    pretend_wimps_dont_modulate = False
    n_time_bins = 24
    #'''
    '''
    pretend_wimps_dont_modulate = True
    n_time_bins = 1
    #'''

Setting the exposure to 4 tonne * 10./365. years, the ~38 expected number of 50 GeV WIMP events(cross section 1e-45 cm2/nucleon) is obtained, which is equivalent to ~348 events, which is the number of expected WIMP events given 1 tonne year of exposure (default, no scaling).

Thanks for looking through this PR Jelle!
Yups, I smuggled in the exposure scaling into the ER source through rates_vs_energy using the following:
fm_t = 4.2                                                                        # fiducial mass in tonnes
liveyears_yr = 42./365.                                                    # livetime in years
this_exposure_tyr = fm_t*liveyears_yr                             # exposure in tonne years
er_per_tyr = 42.                                                                # expected ER events per tonne year

num_expected_er = er_per_tyr*this_exposure_tyr           # expected ER events for given exposure

# Defining energy spectrum of ER band
max_er_energy = 20 # keV
num_energies = int(1000)

class er_fixed_f(fd.SR1ERSource):
    variable_drift_field = False
    default_drift_field = 42.
    energies = tf.cast(tf.linspace(0., max_er_energy, num_energies), dtype=tf.float32)
    rates_vs_energy = tf.ones(num_energies, dtype=tf.float32)*num_expected_er/num_energies


Added route to fetch openapi.json

Closing this PR in favor of #73

@bzwei This PR was adding functionality that is not in PR #73.  Should it be closed or was it meant to be updated after that PR is merged.  (btw - I prefer we keep the two as separate PRs and not combine them if this is still requried.)

Sorry. I accidentally closed. Reopening.

@hsong-rh Please rebase and adjust paths.


Test WebUI when Update

If the version changed a recovery will be an update and the webui will show slightly different screens ... also make sure to check this again before final release.

Found a bug, that needs to be solved - see #332

tested update with WebUI - looks good now. Closing for v1.8.0RC2 release.


Marqo Integration into cacheGPT

Is your feature request related to a problem? Please describe.
I'm building a customer service voice-bot and time to first utterance (a. time to yield first sentence) is critical for creating a synchronous LLM conversation CX. However, current commercial API's  provide c. 50 tokens/second on a good day. If the first utterance has more than 20 words, then the entire latency budget is blown. Caching is the obvious solution and, in particular semantic caching, as exemplified by cacheGPT (6.1k stars) in order to use natural language understanding to hit the cache.
Describe the solution you'd like

Create an integration of marqo with cacheGPT. https://github.com/zilliztech/GPTCache?tab=readme-ov-file
For bonus points, create an alternative semantic layer that uses Marqo DNA which allows us to bring our own embedding models for caching.

Describe alternatives you've considered

cacheGPT but this adds yet another backend that I need to maintain and I'd like my stack to get smaller not larger.
redisVL but like cachGPT has limited embedding model support (and text only).

Additional context
Add any other context or screenshots about the feature request here.

Hey @mattma1970 , I have created this integration in GPTCache. Let me know if you find it useful, or any suggestions/improvements, or if there are any bugs. Looking forward to feedback!


[BEAM-7578] add py35 hdfs integration test

Post-Commit Tests Status (on master branch)

Lang
SDK
Apex
Dataflow
Flink
Gearpump
Samza
Spark

Go

---
---

---
---

Java

Python

---

---
---

Pre-Commit Tests Status (on master branch)

---
Java
Python
Go
Website

Non-portable

Portable
---

---
---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

Run Python PostCommit

Run Python PostCommit

@tvalentyn could you help me, I am trying to figure out why this test won't run? It says Task with path ':sdks:python:test-suites:hdfs:py35:hdfsIntegrationTest' not found in root project 'beam'. Can you see what I am doing wrong?

I think you'd need to update https://github.com/apache/beam/blob/master/settings.gradle#L135 to include the new project to make this work in current structure, however, since this is a direct runner test, let's keep it within direct runner integration test suites.

Run Python PostCommit

Run Python PostCommit

Run Python PostCommit

Run Python PostCommit

Run Portable_Python PreCommit

R: @tvalentyn

Run Python PreCommit

Run Python PostCommit

Run Python PostCommit

Run Python PostCommit

Run Python PreCommi

Run Python PreCommit

We can also rename the PR to s/py35/py37, a committer or an author could do it.

@udim, could you help squash+merge this please?


[PE-D][Tester C] remark allows for multiple remarks to be saved, but overwrites the first remark.

Running remark 1 r/This is a test remark. r/This is the second remark results in only the second remark being saved, only showing the remark "This is the second remark".
I think this is because your regex/logic breaks the string up using "r/", and then only saves the last group? Consider specifying this overwriting behaviour in the UG? I think can just try splitting by spaces instead: i.e. take everything in the second space onwards as the note. Or actually even better to restrict input to alphanumeric + punctuation for actual PE.
So new format would be
remark 1 This is a note and whatever is left of the second space is a note resulting in a remark "This is a note and whatever is left of the second space is a note".

Labels: type.FunctionalityBug severity.Low
original: conradsoon/ped#12

Easy settle


Back button behaves strangely while editing cards

Home Assistant Android version:
1.8.0-144
Android version:
10
Phone model:
Xiaomi Mi9T Pro
Home Assistant version:
Home Assistant 0.107.6
Last working Home Assistant release (if known):
Never saw this working properly before.
Description of problem:
Pressing the back button while editing a card doesn't exit the editing, but instead acts on the level underneath.
Traceback (if applicable):

Screenshot of problem:
Additional information:

@federicoodorizzi please do not delete the issue template, all requested information is required to help you out.  Please edit your post and add the template back with all requested info.

Thanks for providing the template @federicoodorizzi .  Do you experience the same behavior if you use Chrome on Android?

I just tried and I found the problem there as well. Should I post the issue somewhere else then? Thanks!

/move frontend

closing as duplicate of https://github.com/home-assistant/frontend/issues/5515


[UTIL] Fix corner case in quantile sketch

Current coverage is 33.78% (diff: 0.00%)

Merging #1959 into master will not change coverage

@@             master      #1959   diff @@
==========================================
  Files            68         68
  Lines          5293       5293
  Methods         828        828
  Messages          0          0
  Branches        528        528
==========================================
  Hits           1788       1788
  Misses         3427       3427
  Partials         78         78

Powered by Codecov. Last update ef8d92f...571d639

The fix has been incorporated into #1940. Thanks!


Something Strange with Custom Primary Key

I'm having some strange problems when using a custom PK... Not too sure where it is, but my gut feel is two bugs are related somehow.
Assume a DB with:
CREATE TABLE my_table (my_pk TEXT NOT NULL PRIMARY KEY, data INTEGER, name TEXT)

Then try something like this
$db = new \flight\ActiveRecord($pdo, "my_table", ["primaryKey" => "my_pk"]);
echo "IsHydrated: " . ($db->isHydrated() ? "Yes" : "No") . PHP_EOL;  // No

$my_pk = time();

$db->my_pk = $my_pk;
$db->data: = 12345;
echo "PK: " . $db->my_pk . PHP_EOL;

$db->save();  // Doesn't Work
echo "IsHydrated: " . ($db->isHydrated() ? "Yes" : "No") . PHP_EOL;  // No
echo "PK: " . $db->my_pk . PHP_EOL;  // PK

$db->insert();  // Now it really gets inserted
echo "IsHydrated: " . ($db->isHydrated() ? "Yes" : "No") . PHP_EOL;  // No
echo "PK: " . $db->my_pk . PHP_EOL;  // This is Row No, not PK

$db->find($my_pk);  // This works
echo "IsHydrated: " . ($db->isHydrated() ? "Yes" : "No") . PHP_EOL;  // Yes
echo "PK: " . $db->my_pk . PHP_EOL;  // Back to PK instead of Row No

$db->name = "Boo";
echo "IsDirty: " . ($db->isDirty() ? "Yes" : "No") . PHP_EOL;  // Yes
$db->save();
echo "IsDirty: " . ($db->isDirty() ? "Yes" : "No") . PHP_EOL;  // No
echo "IsHydrated: " . ($db->isHydrated() ? "Yes" : "No") . PHP_EOL;  // Yes
echo PHP_EOL;

Strange Issue 1
After insert(), the PK changes to become the table row number. I don't think this is intended behaviour right?
Strange Issue 2
$db->save() is supposed to either insert() or update() depending on the situation right? But it doesn't do anything for "inserts" in this case, so you have to specifically insert()...
Can also try:
$db = new \flight\ActiveRecord($pdo, "my_table", ["primaryKey" => "my_pk"]);
$db->my_pk = "Duplicate ID";
$db->save();  // No exception
$db->insert();  // Exception

I would have thought that an exception would have occurred on the save() ..
I have a feeling that these two problems are related somehow. Maybe there's something I missed, so I'm still investigating...
Additional Discussion
After insert(), isHydrated() continues to say no. I think it is fine - documentation states that it is true only if a find() was successful.
I'm perfectly OK with this behaviour, but just wanted to ask if it should also be true after a successful insert() ? Does a successful "insert" also imply a successful "find" in an ORM pattern like ActiveRecord because the model remains with the record data? Note that after "updating/saving" a previously "found" record, isHydrated() is still true... so maybe people might misunderstand and try to use isHydrated() as a form of hasData() when it is not really ?
Ha ha.. not trying to start a flame war here...

So this only works if the primary key is an integer. If I'm being honest, I don't know if I've ever seen a TEXT field be a primary key ever in my career unless they are being used as UUID's (which in and of themselves are complex to properly increment). This library doesn't handle text based primary keys. What I would recommend is if you need the value of the TEXT field be unique, I would add an id column to your table and assign that as a primary key, and then I would add a UNIQUE index to your TEXT field.

Umm, my guess is it would be a problem. Right now the way the $ActiveRecord->id is assigned is from calling the $pdo->lastInsertId() method. I'd have to do a little experimenting to see if you did an insert/save and you supplied to PK, what that would do and if you fetched rows off of that what it would do....might be a fun experiment :) I've looked into auto figuring out the next UUID if it was a trigger/function in the database and I didn't find very many good answers on how to address that.

What do you think about splitting ->id from ->PK .. If ->internal_row_id is used for internal mechanics, and the ->PK is used mostly for "dev facing" code?
And then, if the current record (via find) has a +ve ->internal_row_id then it has been retrieved, and ->save() can do an ->update() .. If not, then it is probably meant to be an ->insert() ..
So most of the existing mechanisms would not be affected, only when doing a default ->find() we need to use primaryKey instead of id.. Or so I think.. LOL...
Actually, to be honest, I'm find to not use ->save() because it becomes explicitly clear when we are trying to update existing information vs creating new information.. So yeah.. ^_^

So I spent a little time to see what I could do here. I actually found several bugs in the setup.

It was only checking if there was a primaryKey field and if it had one, it would assume an update() was going to happen.
It was always assuming that the new ID was going to be an int (but I knew that already).
It also never marked a successfully inserted row as hydrated.

So with those things fixed, can you test the current master branch and see if it does what you want?
Additionally, just so you're aware, you can automate your uuids if you wanted if you did something like:
class MyTextRecord {
    public function __construct($myDbConnection, $config = []) {
        parent::__construct($myDbConnection, 'my_text_table', $config);
        $this->primaryKey = 'my_pk';
    }

    public function beforeInsert(self $self) {
        $self->my_pk = time(); // or however you generate your uuid
    }
}

Awesome! Looks pretty good!
$db->my_pk = "something";
echo "PK: " . $db->my_pk . PHP_EOL;

$db->save();  // Works
echo "IsHydrated: " . ($db->isHydrated() ? "Yes" : "No") . PHP_EOL;  // Yes
echo "PK: " . $db->my_pk . PHP_EOL;  // PK

->save() works just fine now. And it exceptions when the PK is duplicated. And ->isHydrated() is true after save/insert. I think the biggest thing is that PK doesn't change after the insert().. that was messing up code after the insert that depended on PK..
And yeah, thanks for the beforeInsert() reminder! I've been using afterFind() a bit for some pretty-fier magic getters. But yeah, good tip!
If there are no further issues, and no one else sees any problem, feel free to close.. ^_^

https://github.com/flightphp/active-record/releases/tag/v0.4.2 She's released into the wild. Thanks for your help! Come hang out in the chat room for Flight sometime. And tell your friends about flight :)

I've also added some documentation in the insert() method surrounding text based primary keys. https://docs.flightphp.com/awesome-plugins/active-record#crud-functions

https://github.com/flightphp/active-record/releases/tag/v0.4.2 She's released into the wild. Thanks for your help! Come hang out in the chat room for Flight sometime. And tell your friends about flight :)

Awesome thanks! It's working well so far..
Yep, I've been pushing flightphp as a framework of choice since almost 10 years ago now.. I think it was like version 1.2 or something.,. LOL..
Ah IRC? Ha ha ha, it has been more than a decade since I last went into IRC .. 🤣  Been on discord more nowadays, but let me go have a look..
Thanks for keeping flight and active-record alive. It's much appreciated. Wish I had more time to contribute back..

ha, it's not IRC, that takes me way back. It's like IRC 2.0. I would use discord but there are some folks that I've worked with in Europe that have issues with some of discords privacy issues and requiring phone numbers and such. Just hop in the room. I typically use app.element.io for the web and the Element chat client for my phone. https://matrix.to/#/!cTfwPXhpkTXPXwVmxY:matrix.org?via=matrix.org&via=integrations.ems.host&via=leitstelle511.net
And thank you for your help. You may not be able to contribute much but you were very detailed in your Issue which made it so easy for me to write a unit test, replicate, and then safely fix the issue moving forward.


Trigger database syncing with Background Sync

Fixes #731.
Do initial sync in the main thread. Subsequent syncing is triggered with a Background Sync event and only happens in the Service Worker.
cc @HospitalRun/core-maintainers

@gnowoel thanks for your work on this PR.  I think we need to hold off on further work on this until this PR for PouchDB is completed: https://github.com/pouchdb/pouchdb/pull/5903.  I believe this maybe why you are having trouble doing the initial sync.
Basically, PouchDB wasn't testing fetch properly in their test suite, so it appears there may be some issues with using fetch with PouchDB, which is needed to use PouchDB within a Service Worker.
Also, in looking at your code, listening for changes in the Service Worker will not work because the service worker can be killed at any time by the browser, so we can't rely on the changes listener to be long running.
I haven't had time to test the concept in full but I think the solution for HospitalRun should be as follows in browsers that support background sync and service workers

The UI thread just has a remote DB
The Service Worker intercepts all network requests to remote DB (the code in HR already does this).
On network requests that are updating data, register a background sync event if the network request fails.
Server side Push API is used to push changes from server side to local db.

@jkleinsc My motivation of the PR was to fix the upfront bug, while laying ground work for possible future update. I totally respect your decision to hold it off, but I really think we could perhaps improve this PR first. Here're the reasons just for your consideration.

... listening for changes in the Service Worker will not work...

Actually, we listen for database changes in the main thread (in the application adapter). The Server Worker on the other hand only responds to the sync event fired on database change.

The UI thread just has a remote DB

We created a PouchDB instance in the UI thread. This is for doing the initial sync and watching database changes. Considering the initial sync in fact only happens once (because the data would be persisted in IndexedDB) and watching database changes is a relatively lightweight operation, the performance impact should be acceptable.

On network requests that are updating data, register a background sync event if the network request fails.

I didn't do intensive testing, but this seems to be working already. If there're any bugs, I'd be happy to fix them.

Server side Push API is used to push changes from server side to local db.

It's a great idea for sure. However, as I briefly mentioned above, while it's not ideal, watching database changes in the UI thread should be acceptable. So, it's more like an enhancement than a necessity for me. Could we leave the watching code in the UI thread for now, and worry about how to integrate Push API (which requires more work because it needs service-side cooperation) for later?

I think we need to hold off on further work on this until this PR for PouchDB is completed...

If the bug is fixed, maybe we can move the initial syncing code into the Service Worker. But it also sounds more like an enhancement to me. The initial sync only happens initially, when we start the app in the browser for the very first time. Once the databases has been fully synced for once, all subsequent calling to the one-shot sync function would do about nothing.
Suggesion
While I totally respect your decision to hold it off, I would suggest that we fix the bug first. If we stop here, we get something that works already. If we want to improve it later by introducing advanced techniques like Pushing API, the current implementation shouldn't get in the way.
Please correct me if I'm completely wrong.

@gnowoel I misread your code.  I mistakenly thought the changes listeners were in the service worker.  Let me take a closer look at your code and what you are proposing.
Can you check on one thing on your end?  It looks like Travis CI is failing and I suspect if you run ember test locally you will see the errors as well.  The full output from Travis is available here:
https://travis-ci.org/HospitalRun/hospitalrun-frontend/builds/177716747
The error I am seeing is:
'Error: Failed to create an instance of 'adapter:application'. Most likely an improperly defined class or an invalid module export. at http://localhost:7357/assets/vendor.js, line 12015\n' }

@jkleinsc I missed the test part. Sorry about that.
The failure in the CI is due to undefined databases. We created databases when initializing the database service and I guess this means it's triggered by the first page request. However, there won't be a page request when running the app in a CI.
I updated the code to just skip the initial sync unless database are created.
By the way, do you think it's a good idea to implement a poor man's Periodic Sync with setInterval(), which repeatedly triggers lightweight Background Sync events from the UI thread?

@gnowoel as far as setInterval, I think that is unnecessary for now.

@gnowoel, do you think you'll be willing / able to make the recommended changes from @jkleinsc?

@tangollama Sorry for the long delay. I didn't forget it, but I was trapped by my own life's struggle. Your reminder reminds me that there's no better time than now. And yes, I'm willing to finish what I started, at least give it another try before it's too late.

@gnowoel My apologies here.  Sorry to hear about your own life's struggle - I hope everything is going ok.  @tangollama and I weren't in sync on this.  I have been doing some work on this whole issue and given that we are trying to get a 1.0 release out this month, I need to take primary responsibility for this issue, so please feel released from taking care of this.  I am going to close this PR, but please feel free to contribute in the future!

@jkleinsc Thanks for your kind words. It means a lot to me!
I was trying to update PR today, based on your very inspiring comment above. It's only partially completed, but along the way, I've found a few things that might be useful.

The local and remote PouchDB instances are only available after logging in, which makes it difficult to setup database syncing in the application adapter.
The application adapter seems to be initialized for every request, but we only want to setup syncing once.
The db of the application adapter would change based on the connection status, so it might be a challenge to correctly use onChange() to trigger a background sync.

I ended up defining the sync-related methods in a service, and then injecting it in the module that handles authentication. That way, I can setup syncing just by adding a then() block:
authenticate(credentials).then(() => this.get('sync').setup());

I'm not sure if it's a good idea. Perhaps Ember initializers are the way to go. I don't know. But I'm sure your solution will be much better.
Thanks again!
(I'd like to attach my latest update below. It's just a prototype. So, please ignore it if it's useless.)

Oops. The code is not showing. Guess it's because the issue is closed. Never mind :) In case you want to take a look, please see here.


Import Existing Resources

The Issue
The process of importing existing resources from a provider into a crossplane resource is quite tedious and a bit dangerous. The crossplane resource must match exactly all the properties to the existing resource from the provider. If the props don't exactly match; the resource will be modified to match what the crossplane resource says. If one were to accidentally omit a property then that property will be removed and/or set to its default instead of what it should be.
here are the docs on importing, which in my opinion are a little lite on the specifics: Crossplane Import Existing Resources
Suggested Solution
Would be nice to have the Crossplane CLI make the imported resource yaml for me.
I imagine a command like:
kubectl crossplane import aws vpc MyCoolVPC
The command would take a few different kinds of params like name, id, or ARN.
kubectl crossplane import aws vpc vpc-123abc456def
Then the generated output would be something like:
apiVersion: network.aws.crossplane.io/v1alpha3
kind: VPC
metadata:
  name: my-cool-vpc
  annotations:
    crossplane.io/external-name: MyCoolVPC
spec:
  cidrBlock: <IP_ADDRESS>/16
  enableDnsHostNames: true
  enableDnsSupport: true
  reclaimPolicy: Retain
  tags:
    Name: MyCoolVPC
    "aws:cloudformation:logical-id": VPCA1B23C
    "aws:cloudformation:stack-id": "arn:aws:cloudformation:us-west-2:1234567:stack/MyStack/8f834j340"
    "aws:cloudformation:stack-name": MyStack
  providerRef:
    name: aws-provider

In the example above, if I were to forget to add the tags made by cloudformation, then the resource would get disassociated from the cloudformation stack and bad things would happen. Even worse, what if the cidrBlock was typed in wrong. . .

So I just learned the tags that start with aws: are reserved for AWS internals and therefore Crossplane can safely ignore them.

Thanks for raising this @kferrone. This sounds very similar to our thinking in https://github.com/crossplane/crossplane/issues/1093. I think this repository is the right place for the issue, so I'm going to close the older one and mark it as a duplicate. Future readers - please note the issue I'm about to roll into this one has some good context on how this might be built.


[TISPARK-45] Fix ScanIterator logic where index may be out of bound

In previous implementation, if index is not initialized, IndexOutOfBoundsException would be thrown.

/run-all-tests


Fix CSS issue in mxnet docs site header

Issue

When browser window size is reduced, header gets distorted.
After reducing size to very small size, headers will not even be visible.

Reproduce the issue

open http://mxnet.io
Keep shrinking (reducing) size of web page in your browser
Observe that first headers get distorted later even disappears.

Possible solutions
Solution 1:  Fix minimum width so all headers will be visible and not get distorted.
Solution 2:  Change CSS for headers such that it gets elongated and all headers are listed one below other when users shrinks web page size.

For example, open https://www.tensorflow.org/versions/r0.11/how_tos/index.html and start reducing the web page size. It reduces till acceptable width and donot change after that.
Headers will all get re-arranged.
This is achieved by:

Making header position relative
Fixing header  min width (Post that scroll bars comes in to picture)

On small vertical screens (e.g. a phone), the common behavior that other websites adopt is that the menu is collapsed into a button that the user could click to expand and navigate. Currently it is impossible to navigate our doc on a phone.

Also the style of the doc needs some fixing. For example, currently the parameters and returns are not very clearly separated. Take the doc for infer_shape for example, it is very difficult to tell which one is the return value and which one is parameters. I'm not sure if we have any other small glitches here and there. If we do not have front-end developer, a good solution might be to clone one of the widely used theme and then only change the color scheme to match our website. Some good documentation include numpy, keras, tensorflow, etc.

Also current the indentation in the example code of the doc string are somehow removed. See here for example.

Indentation of headers, bullet points etc. have issues. see this page for example - http://mxnet.io/get_started/setup.html

We need better font size and style

Heading after 5th nesting i.e., "#####" will have very small font size. Actually smaller than other content font size. Need to fix this.

I took a look at tensor flow website. The design for navigation bar is not so nice especially for smart phone screens. I agree that maybe we should consider to collapse the nav bar into a dropdown menu or a hamburger button.

Another mysterious issue is that the "Regression Test" header is eaten in the docstring. For example, if you look at python/mxnet/symbol_doc.py, to check the doc for Dropout. Comparing with what doc we currently have online. The "Regression Test" header somehow disappeared.

I have updated nav bar and need to push my branch. can someone add me to this project?

Also for the sidebar of TOC issue, it is due to that margin left of container is set to auto. So what is the effect we need for TOC sidebar? If we just need a fixed-width sidebar, we just need to change the margin left value.

@kevinthesun Thanks a lot! We do not directly push to the main repo. You can make a clone and then submit a pull request. See the mxnet doc and the github doc.

Another issue is that "Setup and Installation" is linked to the absolute address "http://mxnet.io/get_started/setup.html". Should it be linked to relative address "../get-started/setup/html"?

Yes, relative path is always preferred.

How to modify these dynamic contents?

Docs are generated from the markdown files in docs directory.

Currently I'm working on my local branch. I need to push it to remote and make a new pull request right? But it requires github username and password.

@kevinthesun You will need to make a clone of your own repo, add a remote to your own clone, push to your own clone and submit a pull request from there.

I found that the devdocs website has a very nice style for documentations. It also works well with mobile devices. If someone would like to adapt that to MXNet documentation, the source code of devdocs is hosted here.

I have opened a new pull request. If you have chance to take a look at the changes and test them, it would be nice!

Do we need to immigrate the whole site to this template? Or we just modify the current version?

@kevinthesun Thanks! That is one of the reference style that (I think) looks good and also works one mobile phone. My guess is starting from an existing working stylesheet and adapt that to our existing theme (e.g. overall color scheme and make the front page works properly) is easier than modify our existing style trying to mimic others, because it can be hard to cover all aspects and glitches and inconsistency throughout browsers and devices. But I'm not an expert in front end so my words might not make sense. :)

@pluskid  It is a good suggestion we should use a template, but right now since most contents are completed, I prefer modifying the existing website. I have fixed the index page to make it work well for mobile device. The change has been merged into master so you can check it out.

Can we close this?

Issues at the top seem to have been fixed.


Create a new Documontation

The Docs is now in [WIKI}(https://github.com/Marco5dev/jsonverse/wiki)


not generating transaction hash

hi there, i keep trying to wrap eth via metamask/chrome but the txn addresses i am signing do not seem to be valid

Its the same for me... I am for one week trying Unwrap 1ETH from Oasisdex to my etherwallet of Metamask, or also trying buy 0.5 Maker with this ETH and is not possible. Whats happen really? I am paying more fees but the transation doesn´t work from one week ago, and before it worked perfetly and fastly. Please help me, thanks

Hello, colleagues, I have the same problem with Oasisdex.com, I have 1.2 ethereum trapped there since a few months ago. Currently I have tried to unwrap again from oasisdex, to my metamask portfolio in which I have only 0.2 but I still do not succeed. It appears as sent but neither arrives nor subtracts from the balance, and the ethereum icon appears as discontinuous. When I want to check the hash in etherscan it tells me that it can not access that data because it is not in the main network. My money is still there ... But I do not know how to get it out being a fairly experienced user in this area


No Swift-3.0 Branch

Hi there.
I was trying to install this module according to your readme and got the following error:
Pre-downloading: `Charts` from `https://github.com/danielgindi/Charts.git`, branch `Swift-3.0`

[!] Error installing Charts
[!] /usr/bin/git clone https://github.com/danielgindi/Charts.git /var/folders/nz/__btsnk12tbbqlmk1_gkr0kc0000gn/T/d20160921-14615-uc3mfs --template= --single-branch --depth 1 --branch Swift-3.0

Cloning into '/var/folders/nz/__btsnk12tbbqlmk1_gkr0kc0000gn/T/d20160921-14615-uc3mfs'...
warning: Could not find remote branch Swift-3.0 to clone.
fatal: Remote branch Swift-3.0 not found in upstream origin

I've tried replacing that line with one of the other branches found in the Chards repo but I get various errors no matter what I choose. Any chance you can verify this podfile entry?

@mahlon-gumbs replace it with the master branch. By their current standing they support Swift 3 on that branch

Hmmm... thanks @noxowe. I'll try that and see if I can at least get things working. The issue there, however, is that I wouldn't be able to check that into our repo for other developers since master will continue to change. Since we don't check in modules or Pods, other developers may wind up with different versions of this. :-(

The master branch doesn't work. At the time of writing the Chart2.2.5-Swift3.0 does appear to work.

@lammertw Thanks. Finally got a chance to cleanup my project and got this working with the Chart2.2.5-Swift3.0 branch you mentioned. I had tried that branch in the past but kept getting hundreds of errors (literally) as Xcode tried the swift conversion.
Turns out...for now, that I had to add the files to the project root rather than have them in a group. I'll try to clean that up at a later time, but at least I can render charts now.


Status of Express

Will Sails continue to be supported and maintained in the event that Express fails to get back under development?

Hey @jdcauley, absolutely.  We're committed to Sails regardless of what happens to any of our dependencies.  Specifically re: Express, see https://github.com/balderdashy/sails/pull/3235#issuecomment-170417122 for more context.

(@jdcauley Going to reopen this for a little while in case that link helps anyone else out who has questions about the future of Express.)


feat(payments): INT-3637 removed Zip code from individual fields form on StripeV3

What? INT-3637
Removed Zip code from individual fields form on StripeV3
Why?
Removed the zip code field from payment step to reduce the redundancy of having to enter zip code twice in checkout.
Testing / Proof
Before:

After:

@bigcommerce/checkout @bigcommerce/apex-integrations

Would be nice to see a "Before" screenshot here too.

💚  Tested

💚  Tested


bump golangci lint to v1.46.2

Signed-off-by: RuliXu<EMAIL_ADDRESS>

golangci-lint often times out, we can increase the timeout to 10m
https://github.com/clusterpedia-io/clusterpedia/blob/19a5b23b61ed19899b68420b70071d33cbdd14da/.golangci.yml#L1-L3


rework CMake files ; can be used on macOS and compatible with fetchCo…

…ntent
See also https://github.com/maxmind/libmaxminddb/issues/242

Hey @oschwald all the test passed on all platforms. Is there anything that you'd like to tweak ?
The code scanning thing is failing but it looks like it was like that before my change.

Actually it sounds related but a bit stale, the src/CMakeLists.txt file is missing now.
make[1]: Leaving directory '/home/runner/work/libmaxminddb/libmaxminddb'
make  dist-gzip am__post_remove_distdir='@:'
make[1]: *** No rule to make target 'src/CMakeLists.txt', needed by 'distdir'.  Stop.
make[1]: Entering directory '/home/runner/work/libmaxminddb/libmaxminddb'
make: *** [dist] Error 2
make[1]: Leaving directory '/home/runner/work/libmaxminddb/libmaxminddb'
Makefile:778: recipe for target 'dist' failed
Error: Process completed with exit code 2.

I fixed the CodeQL problem by keeping the src/CMakeLists.txt file and having it empty. We can tweak its content or add a better comment. Not sure what's going on really, Running boostrap on my mac does not work.

I just did a refactoring of the test/CMakeLists.txt, so that it works off a list of names. Each target was pretty much the same so it should make it easier to add / remove tests. Let me know what you think.

Thank you!


Note resize panel

Proposal:
Users should have the ability to resize the note panel on dashboard cells.
Current behavior:
Create a note that may extend beyond ~34 characters. Instead of using a space between the characters use an underscore. This will cause any characters beyond 34 to be trimmed from view.
Desired behavior:
While the note panel does a great job of scaling it fails when a single string is longer than 34 characters. Adding the ability to drag the window a little wider would be great!
Example of some text that was placed into a note. This data is the HELP information from a measurement being scraped.
cluster_autoscaler_cluster_safe_to_autoscale

Whether or not cluster is healthy enough for autoscaling. 1 if it is, 0 otherwise.

Results of the above text.

Not sure what changed but now the screen is allowing me to scroll to the right. I'll close this and reopen if I see the issue again.


Events not being marked as silenced correctly

We're seeing checks with "silenced: false" in their data but we can verify that there are silences in redis which should match.
Expected Behavior
checks should have silenced attribute set to true
Current Behavior
Check data:
  "name": "check-blarg",
  "output": "CheckWinService CRITICAL: blarg.exe is not running\r\n",
  "status": 2,
  "type": "standard",
},
"action": "create",
"silenced": false,
"silenced_by": []
}```

Redis:
```redis <IP_ADDRESS>:6379> KEYS "silence:*:check-blarg"
1) "silence:client:client1:check-blarg"```

EDIT: I'm wondering if this is related to older client versions. It looks like newer clients include "client:hostname" in thier subscriptions.

## Possible Solution

## Steps to Reproduce (for bugs)
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code or configuration to reproduce, if relevant -->
1.
2.
3.
4.

## Context
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context (e.g. links to configuration settings or log data) helps us come up with a solution that is most useful in the real world -->
This is causing events which should be silenced to generate pagerduty alerts for things which do not need to be investiaged.

## Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
* Sensu version used: 0.26.4
* Operating System and version (e.g. Ubuntu 14.04): CentOS 6.8
* Transport and runtime versions (e.g. RabbitMQ 3.6.2 on Erlang 18.2): rabbitmq

Heya,
Seeing the same thing here too with version: 0.26.5-2

@mariusv @nevins-b can you please confirm that the clients in question are running sensu 0.26 or later and show a "client:$CLIENT_NAME" subscription, either in the client registry or your dashboard?

They are not, these are older clients.
Am I correct in now thinking that the newer silence logic isn't backwards compatible with older clients?

@nevins-b that's correct. We've just recently published a reference document for the new silencing feature at https://sensuapp.org/docs/0.26/reference/silencing.html which describes how the client:$CLIENT_NAME subscription is automatically added by clients running Sensu 0.26 or later.
You can also specifically configure such a subscription on older clients in order to take advantage of silencing without updating the client itself. Of course I recommend upgrading whenever possible. :)

@cwjohnston Thanks, I'll close this issue then though it may be good to mention this is in the changelog


Docs.MS Release Updates for azure-synapse-artifacts

Update docs metadata and targeting for release of azure-synapse-artifacts

Docs Build status updates of commit e8771b5:
:warning: Validation status: warnings

File
Status
Preview URL
Details

docs-ref-services/preview/synapse-artifacts-readme.md
:warning:Warning
View (azure-node-preview || azure-node-legacy || azure-node-latest)
Details

ci-configs/packages-preview.json
:white_check_mark:Succeeded

docs-ref-services/preview/synapse-artifacts-readme.md

Line 0, Column 0: [Warning-h1-missing] H1 is required. Use a single hash (#) followed by a space to create your top-level heading.
Line 9, Column 16: [Warning-ms-prod-technology-invalid] Invalid value for 'ms.technology': 'azure' is not valid with 'ms.prod' value 'azure'.
Line 2, Column 1: [Suggestion-description-missing] Missing required attribute: 'description'.
Line 55, Column 1: [Suggestion-duplicate-alt-text] Alt text 'Impressions' is duplicated. Within an article, alt text must be unique. NOTE: This Suggestion will become a Warning on 1/29/21.
Line 75, Column 1: [Suggestion-duplicate-alt-text] Alt text 'Impressions' is duplicated. Within an article, alt text must be unique. NOTE: This Suggestion will become a Warning on 1/29/21.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

Docs Build status updates of commit 93309e9:
:clock10: Pending: waiting for processors (7 builds ahead of you)
:warning: Docs Build is busy, currently there are 7 builds ahead of this one, for more information you can view the Build queue graph on the Docs Portal.

Docs Build status updates of commit 93309e9:
:clock10: Pending: waiting for processors (7 builds ahead of you)
:warning: Docs Build is busy, currently there are 7 builds ahead of this one, for more information you can view the Build queue graph on the Docs Portal.

Docs Build status updates of commit 93309e9:
:warning: Validation status: warnings

File
Status
Preview URL
Details

docs-ref-services/preview/synapse-artifacts-readme.md
:warning:Warning
View (azure-node-preview)
Details

ci-configs/packages-preview.json
:white_check_mark:Succeeded

docs-ref-services/preview/synapse-artifacts-readme.md

Line 0, Column 0: [Warning-h1-missing] H1 is required. Use a single hash (#) followed by a space to create your top-level heading.
Line 9, Column 16: [Warning-ms-prod-technology-invalid] Invalid value for 'ms.technology': 'azure' is not valid with 'ms.prod' value 'azure'.
Line 2, Column 1: [Suggestion-description-missing] Missing required attribute: 'description'.
Line 55, Column 1: [Suggestion-duplicate-alt-text] Alt text 'Impressions' is duplicated. Within an article, alt text must be unique. NOTE: This Suggestion will become a Warning on 1/29/21.
Line 75, Column 1: [Suggestion-duplicate-alt-text] Alt text 'Impressions' is duplicated. Within an article, alt text must be unique. NOTE: This Suggestion will become a Warning on 1/29/21.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

Docs Build status updates of commit 93309e9:
:warning: Validation status: warnings

File
Status
Preview URL
Details

docs-ref-services/preview/synapse-artifacts-readme.md
:warning:Warning
View (azure-node-preview)
Details

ci-configs/packages-preview.json
:white_check_mark:Succeeded

docs-ref-services/preview/synapse-artifacts-readme.md

Line 0, Column 0: [Warning-h1-missing] H1 is required. Use a single hash (#) followed by a space to create your top-level heading.
Line 9, Column 16: [Warning-ms-prod-technology-invalid] Invalid value for 'ms.technology': 'azure' is not valid with 'ms.prod' value 'azure'.
Line 2, Column 1: [Suggestion-description-missing] Missing required attribute: 'description'.
Line 55, Column 1: [Suggestion-duplicate-alt-text] Alt text 'Impressions' is duplicated. Within an article, alt text must be unique. NOTE: This Suggestion will become a Warning on 1/29/21.
Line 75, Column 1: [Suggestion-duplicate-alt-text] Alt text 'Impressions' is duplicated. Within an article, alt text must be unique. NOTE: This Suggestion will become a Warning on 1/29/21.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


Create webpack.yml

Closes #[issue number]
Description

Screenshots

Release notes

Notes:

Could you let me know if there’s anything specific you were aiming to improve or any changes you need me to make in the current workflow?


⚠ Bofrost.lu has degraded performance

In f488bed, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 875 ms

Resolved: Bofrost.lu performance has improved in 23dfb10 after 7 minutes.


Always use the memory access obtained via disassembly for  EXC_BAD_ACCESS / EXC_I386_GPFLT exceptions

I didn't realize it right away but macOS always returns a NULL address to the exception handler when hitting an x86 general protection fault. See Apple's kernel sources here and here. We should build on top of https://github.com/rust-minidump/rust-minidump/pull/665 to reveal the right address.

Nevermind, we already handle this properly, not sure what was I thinking the other day.


This does the opposite work

I've ran your Debloater and I will say, you can easily call it Bloater because once I ran it, restarted my PC, all the bloat was INSTALLED
I've already removed some of the things from my Windows 10
Downloaded your "debloater", followed instructions, ran it, restart computer and all of it was there... Cortana, Tips, Weather, News, Maps, Solitare, Snip, etc etc etc....
Thanks...for bloating my pc again

You sure you ran it correctly?

I don't think it does the opposite but Cortana, Weather, News, Maps were not removed from my computer.
Any idea why?


2.0 docs: "Minimal example of tab-based navigation" yields error

I'm trying to figure out how to set up a bottom tab bar nav on 2.0.0-rc.2. This 2.0 doc on the subject uses the new createBottomTabNavigator API method:
https://github.com/react-navigation/react-navigation.github.io/blob/2.x/docs/tab-based-navigation.md#minimal-example-of-tab-based-navigation
When I copy that verbatim into my App.js, I see the tab navigation as expected. However, when I select the other tab I get the error "navigation.navigate is not a function". See screen for trace. I'm guessing that this is an error in the docs and not the release candidate. I poked around in the 2.0 source for about an hour trying to figure out the right way to do this, but came up empty handed. If someone can explain how tab navigation is supposed to work in 2.0, I can open a PR to fix the docs.
Thanks!
Peter

This appears to be fixed in 2.0.0-rc.5

sorry about that!


Compile error with latest version

This compile error started popping up in my Angular project after updating to latest version:
ERROR in src/app/shared/custom-forms/components/inputs-complex/input-emoji/input-emoji.component.ts:3:8 - error TS1259: Module '"/home/mic/dev/qontrol/product/frontend/node_modules/@joeattardi/emoji-button/index"' can only be default-imported using the 'allowSyntheticDefaultImports' flag

    3 import EmojiButton from '@joeattardi/emoji-button';
             ~~~~~~~~~~~

      node_modules/@joeattardi/emoji-button/index.d.ts:3:1
        3 export = EmojiButton;
          ~~~~~~~~~~~~~~~~~~~~~
        This module is declared with using 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag.

Playing around with allowSyntheticDefaultImports in my tsconfig.json didn't fix the error.
Typescript doc mentions it's just for type-checking.
Any idea on how to fix that?

I guess it's located in this commit, but don't know much about how types definitions work.

Hmm, sorry about that. This was my first time writing TypeScript definition files, I probably made a mistake somewhere.
I will work on figuring out what the right fix is. In the meantime, I tested locally and if you enable the esModuleInterop flag, it should compile. At least, it did for me under TypeScript 3.8.2.

So it looks like I did write the declaration file correctly. There are two ways you can consume the library in a TypeScript project:

Enable the esModuleInterop flag
Import the class like this: import EmojiButton = require('emoji-button');

See https://www.typescriptlang.org/docs/handbook/modules.html#export--and-import--require for more details.
I will update the documentation to reflect this - didn't know about that. Sorry for any inconvenience!

Oops, it looks like I forgot return types for some of my methods in the TypeScript definition file. I'll need to fix that and publish a new release.

Just published v2.9.2 which has a few minor fixes in the type declaration file. If you follow the steps above you should be good to go, let me know if you still have problems though! I'll close this for now.

Unfortunately, looks like this format is not enabled in my config because of reasons I'm not so clear with:
ERROR in src/app/shared/custom-forms/components/inputs-complex/input-emoji/input-emoji.component.ts:4:1 - error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.

    4 import EmojiButton = require('@joeattardi/emoji-button');
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I should put a few hours understanding the modules stuff with TS & JS to understand the underlying reasons.
I don't know how other packages do to be compatible with all possibles compile configs though.

 That worked for me when I tested it locally.

Yup, just tried it but it makes other imports in my project fail, for example:
import * as moment from 'moment';
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.
src/app/core/services/intercom.service.ts:42:21 - error TS2349: This expression is not callable.
  Type 'typeof moment' has no call signatures.

Can you share your tsconfig.json file?

Sure:
{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "paths": {
      "@core/*": ["src/app/core/*"],
      "@shared/*": ["src/app/shared/*"],
      "@environments/*": ["src/environments/*"]
    },
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "downlevelIteration": true,
    "experimentalDecorators": true,
    "module": "esnext",
    "moduleResolution": "node",
    "importHelpers": true,
    "target": "es2015",
    "typeRoots": ["node_modules/@types"],
    "lib": ["es2018", "dom", "esnext.asynciterable"],
  }
}

What if you try this:
import * as EmojiButton from '@joeattardi/emoji-button';

Cool, it works ok.
But I thinks there are two problems in the types definitions, so I get compile errors:
on(event: string, callback: () => void): void;

The callback should have one string parameter to be able to write what's in the doc:
picker.on('emoji', emoji => {
    document.querySelector('input').value += emoji;
  });

And the options parameter should be optional since options can be fetched from the constructor supplied options:
showPicker(referenceEl: HTMLElement, options: EmojiButton.Options): void;
  togglePicker(referenceEl: HTMLElement, options: EmojiButton.Options): void;

Oops again! 😄 Sorry again about that. I've published version 2.9.4 which hopefully should have the correct typings.

That's great, all green now :) Thanks!

Great, I’m glad you’re up and running now. Sorry again for the inconvenience!


vim-dadbod-completion coming up on `:CmpStatus' but not giving any suggestions

Trying to get the dadbod trilogy working, and its all working fine except for this plugin which seemingly isn't giving any suggestions even though its on :CmpStatus
Here is all my nvim-cmp/dadbod code in my init.lua:
(lazy.nvim)
    {
        "hrsh7th/nvim-cmp",
        dependencies = {
            -- Snippet Engine & its associated nvim-cmp source
            "L3MON4D3/LuaSnip",
            "saadparwaiz1/cmp_luasnip",

            -- source path
            "hrsh7th/cmp-path",

            -- Adds LSP completion capabilities
            "hrsh7th/cmp-nvim-lsp",

            -- Adds buffer completion capabilities
            "hrsh7th/cmp-buffer",

            -- Adds a number of user-friendly snippets
            "rafamadriz/friendly-snippets",
        },
    },

    {
        'tpope/vim-dadbod',
        lazy = true,
    },
    {
        'kristijanhusak/vim-dadbod-ui',
        dependencies = {
            { 'tpope/vim-dadbod',                     lazy = true },
            { 'kristijanhusak/vim-dadbod-completion', ft = { 'sql', 'mysql', 'plsql' }, lazy = true }, -- Optional
        },
        cmd = {
            'DBUI',
            'DBUIToggle',
            'DBUIAddConnection',
            'DBUIFindBuffer',
        },
        init = function()
            -- Your DBUI configuration
            vim.g.db_ui_use_nerd_fonts = 1
        end,
    }

additional settings:
-- [[ Configure nvim-cmp ]]
-- See `:help cmp`

local cmp = require("cmp")
local luasnip = require("luasnip")

require("luasnip.loaders.from_vscode").lazy_load()
luasnip.config.setup({})

cmp.setup({

    snippet = {
        expand = function(args)
            luasnip.lsp_expand(args.body)
        end,
    },

    completion = {
        completeopt = "menu,menuone,noinsert",
    },

    --TODO: not a clue what this does but it's important
    mapping = cmp.mapping.preset.insert({

        ["<C-n>"] = cmp.mapping.select_next_item(),
        ["<C-p>"] = cmp.mapping.select_prev_item(),
        ["<C-d>"] = cmp.mapping.scroll_docs(-4),
        ["<C-f>"] = cmp.mapping.scroll_docs(4),
        ["<C-Space>"] = cmp.mapping.complete({}),

        ["<CR>"] = cmp.mapping.confirm({
            behavior = cmp.ConfirmBehavior.Replace,
            select = true,
        }),

        ["<Tab>"] = cmp.mapping(function(fallback)
            if cmp.visible() then
                cmp.select_next_item()
            elseif luasnip.expand_or_locally_jumpable() then
                luasnip.expand_or_jump()
            else
                fallback()
            end
        end, { "i", "s" }),

        ["<S-Tab>"] = cmp.mapping(function(fallback)
            if cmp.visible() then
                cmp.select_prev_item()
            elseif luasnip.locally_jumpable(-1) then
                luasnip.jump(-1)
            else
                fallback()
            end
        end, { "i", "s" }),
    }),

    sources = {
        { name = "nvim_lsp" },
        { name = "luasnip" },
    },

})

-- nvim-cmp settings for sql completion (100% stolen from TJ)

cmp.setup.filetype({ "sql" }, {
    sources = {
        { name = "vim-dadbod-completion" },
        { name = "buffer" }, -- Use buffer source for path completion
    }
})

NOTE: im a bit of a noob when it comes to neovim so it might be a really dumb issue im not seeing
My full config -> https://github.com/BenjyRead/nvim-config

Which DB are you using? And is vim-dadbod-ui working fine, in terms of showing the tables, schemas, etc?

Which DB are you using? And is vim-dadbod-ui working fine, in terms of showing the tables, schemas, etc?

MariaDB, and in this example it was just a recently created empty db on localhost

Are you able to test with another db type, like postgres?
Also, can you try commenting out the filetype part (last 6 lines), and add { name = "vim-dadbod-completion" } to the sources above?
I don't see anything wrong in your config, but if dadbod-ui works, it is probably something small.

Ah ok, I think I know what it is. Try creating an empty buffer from your dadbod-ui connection, and see if it works from there. It should.

I see that your buffer is messingaround.sql, so the file does not now from where to autocomplete. I'm not sure how you set up a connection, but to work  in this case you need to have g:db (or vim.g.db in lua) set up with a default connection.

Ah ok, I think I know what it is. Try creating an empty buffer from your dadbod-ui connection, and see if it works from there. It should.  I see that your buffer is messingaround.sql, so the file does not now from where to autocomplete. I'm not sure how you set up a connection, but to work in this case you need to have g:db (or vim.g.db in lua) set up with a default connection.
Edit: Also, remove the cmd part and add event = 'VeryLazy' instead, to properly load DBUI when the neovim is loaded.

Sorry about the screenshot showing an SQL file instead of the query buffer it was a mistake. It still is not working on the query buffer.
    {
        'kristijanhusak/vim-dadbod-ui',
        dependencies = {
            { 'tpope/vim-dadbod',                     lazy = true },
            { 'kristijanhusak/vim-dadbod-completion', ft = { 'sql', 'mysql', 'plsql' }, lazy = true }, -- Optional
        },
        -- cmd = {
        --     'DBUI',
        --     'DBUIToggle',
        --     'DBUIAddConnection',
        --     'DBUIFindBuffer',
        -- },
        event = "VeryLazy",
        init = function()
            -- Your DBUI configuration
            vim.g.db_ui_use_nerd_fonts = 1
        end,
    }

was this the change you wanted me to make? The completions are still not working

Yes, try also removing lazy from both dependencies and add VeryLazy to them too.
It should work like this though but give that a try.

    {
        'kristijanhusak/vim-dadbod-ui',
        dependencies = {
            { 'tpope/vim-dadbod',                     event = "VeryLazy" },                                   --lazy = true  },
            { 'kristijanhusak/vim-dadbod-completion', ft = { 'sql', 'mysql', 'plsql' }, event = "VeryLazy" }, -- lazy = true }, -- Optional
        },
        -- cmd = {
        --     'DBUI',
        --     'DBUIToggle',
        --     'DBUIAddConnection',
        --     'DBUIFindBuffer',
        -- },
        event = "VeryLazy",
        init = function()
            -- Your DBUI configuration
            vim.g.db_ui_use_nerd_fonts = 1
        end,
    }

this what your saying? still doesnt work :(

Try also removing the ft part. Also, did you manage to test some other db type?

Im sorry I think I must have made a mistake at some point, because now when I do :CmpStatus it comes up as vim-dadbod-completion being unused

You know this is going to seem really anti climactic and lame after all this, and thanks for being so patient helping me solve this. but adding nvim-dadbod-completion here:
sources = {
        { name = "nvim_lsp" },
        { name = "luasnip" },
    },
```lua
    sources = {
        { name = "nvim_lsp" },
        { name = "luasnip" },
        { name = "vim-dadbod-completion" },
    },

fixed it

I'm not sure how cmp.buffer.filetype works under the hood. You can also try this to use it only for sql files (this is what I use):
  vim.api.nvim_create_autocmd('FileType', {
    pattern = { 'sql', 'mysql', 'plsql' },
    callback = function()
      cmp.setup.buffer({
        sources = {
          { name = 'vim-dadbod-completion' },
          { name = 'vsnip' },
        },
      })
    end,
  })

Can we then close this?

Can we then close this?
Absolutely, thank you


#3 P2P code review

You did very nice job, Kudoz!
Your projects matches the figma design.
Watch the comments on the respective PR #3

You have done good work
your readme file looks good.

I see you are right with this changes.

Good code review on the button color contrast.

Nice work

No linters error
correct git flow
Your project met the project requirements.

I think that if you follow the figma templates colors you dont must change the colkor, but do a note in the PR about it. (check if your site color follow figma template colors. Before anything :)


Allow a query-expr to construct a stream

This works lazily: the stream has a closure that returns the next result when the closure is called. Errors are also returned lazily through the stream's iterator's termination value: this includes errors in the source iterator or from check expressions in the where and select clauses.
Because of the above difference in semantics, queries returning streams are prefixed with the stream keyword.
stream-query-expr := "stream" query-expr

Example
function myMap(string) returns int|Error1;

function foo(string[] source) returns int[]|Error1
{
   return from s in source select check myMap(s);
}

function foo(stream<string,Error2> source)
   returns stream<int,Error1|Error2>
{
   return stream from s in source select check myMap(s);
}

Closing hence duplicated in https://github.com/ballerina-platform/ballerina-lang/issues/21789


Adds UI input to capture custom port for Postgres integration

Describe your changes and why you are making these changes
The issues were:

The port is hardcoded to 5432
The host prompt is misleading (prompt was <IP_ADDRESS>:5432 while this input was used just for the host/ip address part and the port was hardcoded to 5432 so if the user puts in <IP_ADDRESS>:5432, the backend tries to access <IP_ADDRESS>:5432:5432).

Manually tested it works with this input:

In the Python executor, the port is set to the user's input (not 5432) in the config and the engine url is correctly set to postgresql://test:test@<IP_ADDRESS>:4321/test.
"connector_config": {
        "conf": {
            "database": "test",
            "host": "<IP_ADDRESS>",
            "password": "test",
            "port": "4321",
            "username": "test"
        }
    }

Related issue number (if any)
This is ENG 1277.
Checklist before requesting a review

[x] I have performed a self-review of my code.
[N/A] If this is a new feature, I have added unit tests and integration tests.
[N/A] I have manually run the integration tests and they are passing.
[x] All features on the UI continue to work correctly.

Thanks for the reminder @vsreekanti! I wonder if we can add this to the PR template--perhaps as part of the checklist.

Great idea @eunice-chan! Why don't you go ahead and submit a PR with the changes to the template?


chore: deprecate variants other than inductive ... where

Deprecates inductive ... :=. Also, makes where required if there is at least one constructor. Currently produces a warning, controlled by linter.deprecated.
We don't require where when there are no constructors.
Closes #5236

Out of curiosity, why should where be optional in the case of no constructors, rather than making it either mandatory or forbidden?

(where of course "forbidden" means "deprecated for a long long time" in this context)

I think having it be optional is defensible:

It should be allowed to be omitted because there is a legitimate aesthetic/readability argument against it (inductive Foo where looks like an unfinished sentence)
It should be allowed to be included because it is more regular (it makes editing easier if lists of 0+ things can be added or removed without requiring surrounding edits as well)

That is, downstream style guides could go either way on this, and we shouldn't try to fight with either option.

Aw man


Library release removal request

Library name
Stone_serial
Version to remove
1.1.0

Done:
2023/03/15 15:09:44 Loaded 5625 libraries from DB
Removing<EMAIL_ADDRESS>Success!


Define website shell behavior for narrow screens

The website shell is using a fixed panel side nav that does not expand or collapse until screen width goes below a certain threshold.
https://w3.ibm.com/design/product/experimental/layout/#grid-behaviors
This task is to define that behavior and produce redlines for the mockups.

do we have any of this defined for UI Shell at all @aagonzales @joshblack ?

I don't know if there are any in-context, but in the Sketch file there is:

For mobile

Minimum make sure the navigation works correctly for mobile.

Shell behavior spec for v10 site:
Sketchfile: https://ibm.box.com/s/kf8vioa1kgtg0ntuy6deyc19sa4qlcer

Updated behavior after team discussion. Nav will now hide on md breakpoint, instead of lg. Change is updated in the same sketchfile.


DOC:  UnstructuredExcelLoader code comment‘s error

Issue with current documentation:
In  UnstructuredExcelLoader code comment,  introduce 'elements' mode for twice, but nothing about 'single' mode.
Original code comment are following:
Unstructured loaders, UnstructuredExcelLoader can be used in both "single" and "elements" mode. If you use the loader in "elements" mode,  each sheet in the Excel file will be a an Unstructured Table element. If you use the loader in "elements" mode, an HTML representation of the table will be available in the "text_as_html" key in the document metadata.
Idea or request for content:
No response

@Mike575 are you talking about this code comment? in that there is mentioned about single, element mode.