[AVM Module Issue]: os_profile fails validation checks if left to default (null)

Check for previous/existing GitHub issues

[X] I have checked for previous/existing GitHub issues

Issue Type?
Bug
(Optional) Module Version
0.2.0
(Optional) Correlation Id
No response
Description
Hello, I'm seeing validation errors if I don't specify an os_profile, which is listed as an optional parameter in both the AVM and the underlying provider documentation.  Here's an example error:
Error: Attempt to get attribute from null value

  on .terraform/modules/vmss_example/variables.tf line 600, in variable "os_profile":
 600:     condition     = var.os_profile.linux_configuration == null ? true : var.os_profile.linux_configuration.patch_mode == null ? true : contains(["ImageDefault", "AutomaticByPlatform"], var.os_profile.linux_configuration.patch_mode)
    ├────────────────
    │ var.os_profile is null

This value is null, so it does not have any attributes.

Error: Attempt to get attribute from null value

  on .terraform/modules/vmss_example/variables.tf line 604, in variable "os_profile":
 604:     condition     = var.os_profile.linux_configuration == null ? true : var.os_profile.linux_configuration.patch_assessment_mode == null ? true : contains(["AutomaticByPlatform", "ImageDefault"], var.os_profile.linux_configuration.patch_assessment_mode)
    ├────────────────
    │ var.os_profile is null

This value is null, so it does not have any attributes.

Error: Attempt to get attribute from null value

  on .terraform/modules/vmss_example/variables.tf line 608, in variable "os_profile":
 608:     condition     = var.os_profile.windows_configuration == null ? true : var.os_profile.windows_configuration.patch_mode == null ? true : contains(["Manual", "AutomaticByOS", "AutomaticByPlatform"], var.os_profile.windows_configuration.patch_mode)
    ├────────────────
    │ var.os_profile is null

This value is null, so it does not have any attributes.

Error: Attempt to get attribute from null value

  on .terraform/modules/vmss_example/variables.tf line 612, in variable "os_profile":
 612:     condition     = var.os_profile.windows_configuration == null ? true : var.os_profile.windows_configuration.patch_assessment_mode == null ? true : contains(["AutomaticByPlatform", "ImageDefault"], var.os_profile.windows_configuration.patch_assessment_mode)
    ├────────────────
    │ var.os_profile is null

This value is null, so it does not have any attributes.

Error: Attempt to get attribute from null value

  on .terraform/modules/vmss_example/variables.tf line 616, in variable "os_profile":
 616:     condition = var.os_profile.windows_configuration == null ? true : var.os_profile.windows_configuration.winrm_listener == null ? true : alltrue([
    ├────────────────
    │ var.os_profile is null

This value is null, so it does not have any attributes.

Here's a basic example of what I'm using to reproduce this:
module "vmss_example" {
  source  = "Azure/avm-res-compute-virtualmachinescaleset/azurerm"
  version = "0.2.0"

  location = "somelocation"
  resource_group_name = "somerg"
  admin_password = "somepass"
  name = "somevmssname"
  platform_fault_domain_count = 1

  extension = []

  network_interface = [{
    name = "VMSS-NIC"
    ip_configuration = [{
      name      = "VMSS-IPConfig"
      subnet_id = module.vnet[0].subnets.resource_id
    }]
  }]

  admin_ssh_keys = []

  extension_protected_setting = {}
  user_data_base64 = ""
}

In the AVM's variables.tf we see os_profile defaults to null, but that appears to fail the validations starting at line 599.  Could this be updated to either result in a pass on a default/null entry?
Thanks!

Thanks @MikeDembek I will fix this.

Fixed validation in v0.3.0.  The underlying provider still fails if an image and os provider is not provided.  I am closing the issue as there is nothing more I can do in the AVM.
Please create a issue in the underlying VMSS Flex provider if required.  I'd create the issue myself, but I don't know the business justification for creating VMSS without an image or os profile.  It is probably best that you interact with them directly instead of me getting in the middle.
Note that you can create a VMSS with 0 instances, but you still need to provide an image and os profile.

Thank you - for me this was about consistency between documentation and usage of the module in practice more than a specific business justification (I was doing a PoC with a minimum viable config, not something I'd do outside early-phase testing).  I appreciate the follow-up.


[Windows] Create symlinks properly in sema_symlink.swift

The mingw ln -s doesn't make a proper symlink on Windows. Thus add a
substitution to use cmd.exe /C mklink ... on Windows. Since cmd can't
handle forward slashes, also add a platform specific path separator %|
which resolves to / or || depending on platform.
I'm not particularly attached to the %| syntax, I originally did %/ but that conflicts with the lit built in %/t
The mingw ln -s doesn't make a proper symlink on Windows. Instead add a
script to use cmd.exe /C mklink ... on Windows.

@swift-ci please test Windows platform

Surely there is more than a single instance where we do use ln in the test suite.  How has that been functioning?

Surely there is more than a single instance where we do use ln in the test suite. How has that been functioning?

Of the 5 other uses, just copying rather than symlinking (which is what ln -s seems to do on Windows) is good enough for 4 of them.  For example
// RUN: ln -s "swiftc" %t/DISTINCTIVE-PATH/usr/bin/swift-update

1 was disabled for the same reason this one was failing. I've now fixed and enabled it. The difference is that sourcekit is smart enough to know if it's given a file and a symlink to the same file. If so, it will treat them as the same file. When it's a copy instead, it treats them as two different files.

I like the current version, but we can talk more about the exact substitution if someone thinks it can be improved.
@swift-ci please smoke test

@swift-ci please test

Build failed
Swift Test Linux Platform
Git Sha - 93ea365abee1b997e187dbf02bbf472ed67568e5

Build failed
Swift Test OS X Platform
Git Sha - 93ea365abee1b997e187dbf02bbf472ed67568e5

Updated this to call into a python script instead of a substitution.
@swift-ci please test

@swift-ci please test windows platform

Build failed
Swift Test Linux Platform
Git Sha - fe6a7fce50833c2fff52ee22a233fd3134082a56

Build failed
Swift Test OS X Platform
Git Sha - fe6a7fce50833c2fff52ee22a233fd3134082a56

@swift-ci please test windows

@swift-ci please test osx platform

@swift-ci please test macos

@swift-ci please test windows

@swift-ci please test windows

@jrose-apple


| Monorepo | Leftover configs / scripts

Summary:
Changelog: [Internal]
WORK IN PROGRESS
Differential Revision: D43204867

3,763 file changes! And Changelog: [Internal], force-pushed.
There is a draft pull request option by the way.
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request#creating-the-pull-request.

3,763 file changes! And Changelog: [Internal], force-pushed.
There is a draft pull request option by the way.
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request#creating-the-pull-request.

This PR was exported from Meta's internal codebase to check what is going to fail on external CI.
I am not sure if I can move PR from status Open to Draft, but this is in WIP status currently. Will be polished a bit later 🙂


Use latest version of TypeDoc

TL;DR: This change upgrades TypeDoc to the latest version which uses TypeScript 3.7.3, so we can now use it to generate docs for libraries that are using more recent versions of TypeScript. Due to some changes to TypeDoc's emitted JSON output, we now get better linking of types within packages (more linking and more accurate), imported type names no longer have the [pkg.]mod prefix in front of [pkg.]mod.Type in most cases (cleaner looking docs), and I added support for predicate types, so type guards now show a return value of obj is Type rather than boolean.

This change upgrades to the latest version of TypeDoc, which uses TypeScript 3.7.3, which has some changes to the JSON that it outputs that we need to handle:
First commit:

TypeDoc now specifies an id for types where it didn't before. This mostly happens with the types/input and types/output types. So when there is an id for the type, instead of emitting a hyperlink to that type as an anchor, actually look through all the modules to find the type, and generate a hyperlink to the type in the right module. This has a side benefit that we're now more correct with these links. Previously, it was possible we'd generate an anchor link for a type that didn't actually exist on the page. Now we get the link correct. We also now get much more linking within packages.

TypeDoc is no longer includes the pkg.module prefix in type names (in most cases; I found there were still times that it did include these; and I'm not sure why). This actually results in cleaner looking API docs, because you no longer see types.input.Foo but rather just Foo the vast majority of the time (the hyperlinking still works as expected). However, there are some cases, such as in awsx where we were using the aws.<mod>.Type to link to types in the aws package. Since we no longer have the prefix in the type name, we have to look at just the type name itself to generate these.

I went ahead and added similar lookups for eks.

Second commit:

TypeDoc now has a new "predicate" type, which are typically the return signature of type guards. Previously, these were typed as boolean, but with this upgrade, we now emit the type guard. This mostly shows up in our isInstance functions, e.g. isInstance(obj: any): obj is Bucket

Third commit:

Regenerate all the Node.js API docs.

Fixes #1654
Fixes #2103

Going to merge this. Happy to address any feedback subsequently.


Dependencies not cached while using Pipfile

Hi! Running into a strange issue where even if my Pipfile doesn't change, Heroku re-installs all dependencies. My root directory contains Pipfile and Pipfile.lock and does not have a requirements.txt file. For some reason, Heroku tries to look for a requirements.txt file in the build cache, and when it doesn't find one, re-installs all dependencies despite nothing having changed.
-----> Python app detected
cp: cannot stat '/tmp/build_ed7c4d42035089418cce3a17e584027e/requirements.txt': No such file or directory
-----> Installing python-3.6.10
-----> Installing pip
-----> Installing dependencies with Pipenv 2018.5.18…
       Installing dependencies from Pipfile.lock (103a4e)…

Fixed in #1130
Note you still need a requirements.txt file even if it's empty

Left some questions about Pipenv's behaviour in:
https://github.com/heroku/heroku-buildpack-python/pull/1130#pullrequestreview-631242455

This was previously fixed by #1350.


Update python_commands.md

add few more question to python ankis cards ;)
Pull Request Checklist

[x] You are submitting a maximum of three flashcards.

[x] You have verified that the information is correct, via a book, ChatGPT etc.

[x] You are using correct grammar and spelling.

[x] You have verified the questions do not already exist in the deck.

[x] You are using bullet answer format and the question dictates how many bullets are in the answer.

[x] You are using the below pattern to add the flashcard:
###### Question number.

Question goes here

Answer

Answer goes here

Hello Maintainer,
I have added three new flashcards to the deck, following the prescribed format and guidelines. I have verified the correctness of the information provided, ensured proper grammar and spelling, and made sure that these questions do not already exist in the deck. Each answer follows the bullet-point format as dictated by the question, and all markdown texts are properly utilized to ensure clarity and ease of reading.
Thank you for reviewing my contribution!
Best regards,
tonderflash


Missing BLK.dat files

Hi all-
First time post, apologizes if this is not the correct place.  New to github.
My node suddenly crashed and now stuck in a bitcoin restart loop.

2023-07-17T20:24:07Z Command-line arg: conf="/mnt/hdd/bitcoin/bitcoin.conf"
2023-07-17T20:24:07Z Command-line arg: daemonwait=""
2023-07-17T20:24:07Z Command-line arg: datadir="/mnt/hdd/bitcoin"
2023-07-17T20:24:07Z Command-line arg: debuglogfile="/mnt/hdd/bitcoin/debug.log"
2023-07-17T20:24:07Z Using at most 40 automatic connections (1024 file descriptors available)
2023-07-17T20:24:07Z Using 16 MiB out of 16 MiB requested for signature cache, able to store 524288 elements
2023-07-17T20:24:07Z Using 16 MiB out of 16 MiB requested for script execution cache, able to store 524288 elements
2023-07-17T20:24:07Z Script verification uses 3 additional threads
2023-07-17T20:24:07Z scheduler thread start
2023-07-17T20:24:07Z Wallet disabled!
2023-07-17T20:24:07Z [http] creating work queue of depth 16
2023-07-17T20:24:07Z Config options rpcuser and rpcpassword will soon be deprecated. Locally-run instances may remove rpcuser to use cookie-based auth, or may be replaced with rpcauth. Please see share/rpcauth for rpcauth auth generation.
2023-07-17T20:24:07Z [http] starting 4 worker threads
2023-07-17T20:24:07Z Using /16 prefix for IP bucketing
2023-07-17T20:24:07Z init message: Loading P2P addresses…
2023-07-17T20:24:07Z Loaded 0 addresses from peers.dat  0ms
2023-07-17T20:24:07Z init message: Loading banlist…
2023-07-17T20:24:07Z SetNetworkActive: true
2023-07-17T20:24:07Z Cache configuration:
2023-07-17T20:24:07Z * Using 2.0 MiB for block index database
2023-07-17T20:24:07Z * Using 15.8 MiB for transaction index database
2023-07-17T20:24:07Z * Using 8.0 MiB for chain state database
2023-07-17T20:24:07Z * Using 102.2 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space)
2023-07-17T20:24:07Z init message: Loading block index…
2023-07-17T20:24:07Z Assuming ancestors of block<PHONE_NUMBER>0000000009c97098b5295f7e5f183ac811fb5d1534040adb93cabd have valid signatures.
2023-07-17T20:24:07Z Setting nMinimumChainWork=00000000000000000000000000000000000000003404ba0801921119f903495e
2023-07-17T20:24:07Z Switching active chainstate to Chainstate [ibd] @ height -1 (null)
2023-07-17T20:24:07Z Opening LevelDB in /mnt/hdd/bitcoin/blocks/index
2023-07-17T20:24:07Z Opened LevelDB successfully
2023-07-17T20:24:07Z Using obfuscation key for /mnt/hdd/bitcoin/blocks/index:<PHONE_NUMBER>000000
2023-07-17T20:24:20Z LoadBlockIndexDB: last block file = 3711
2023-07-17T20:24:20Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=56, size=87391705, heights=798490...798573, time=2023-07-13...2023-07-13)
2023-07-17T20:24:20Z Checking all blk files are present...
2023-07-17T20:24:20Z Unable to open file /mnt/hdd/bitcoin/blocks/blk01037.dat
2023-07-17T20:24:20Z : Error loading block database.
Please restart with -reindex or -reindex-chainstate to recover.
2023-07-17T20:24:20Z Aborted block database rebuild. Exiting.
2023-07-17T20:24:20Z Shutdown: In progress...
2023-07-17T20:24:20Z scheduler thread exit
2023-07-17T20:24:21Z Shutdown: done

I also noticed that blk01037.dat and blk01038.dat files are missing from /mnt/hdd/bitcoin/blocks dir.  Im not sure how best to continue.  Any advise?  Would really prefer to not redownload the whole blockchain.

Reindexing.  Will close for now.

reindexing.

Reindexing


Document Kustomize Deployment

We added kustomize to the options for deploying this operator but need to go back and update the documentation to reflect that as well. This is a placeholder to remind me to get that updated.

It would be nice to provide too a single rendered yaml manifest generated from your kustomization, like they do in upstream argocd for manual deployment.
It would help for airgap scenarios when OLM cannot be used or github accessed.


switch from networkx to graphtool

This would require my own StructureGraph implementation. However, it should make things drastically faster.

tracked in #137


deps type is not inferred when loaderDeps is defined below loader

Which project does this relate to?
Router
Describe the bug
The property order of the loaderDeps function vs the loader function within createFileRoute seems to affect whether the correct type is inferred within the deps parameter of loader.
When loaderDeps is defined below loader, the type of deps within the loader method is {}. However, when loaderDeps is defined above loader, the type seems to correctly pull through.
I'm not sure whether this is expected or a TypeScript quirk, but it feels like this might trip others up.
Your Example Website or App
https://stackblitz.com/edit/vitejs-vite-mgoghq?file=src%2Froutes%2Findex.tsx
Steps to Reproduce the Bug or Issue

Open Stackblitz link.
Notice that the type of deps within the loader method is {}.
Move loaderDeps definition to above `loader.
Notice that the type is inferred correctly.

Expected behavior
As a user, I expect the type of deps.test within the loader function to be inferred from loaderDeps correctly, irrespective of the order in which loader and loaderDeps are defined.
Screenshots or Videos
No response
Platform

OS: macOS
Browser: Chrome
Version: 1.77.8

Additional context
No response

this is a typescript limitation. we added an eslint rule specifically for this, see https://tanstack.com/router/latest/docs/eslint/create-route-property-order


heap_free_all frees sealed objects

The heap_free_all function frees all objects allocated with an allocation capability.  This means that it can be used to attack compartments that have allocated memory for a given caller.
It shouldn't, and we should provide a heap_free_all_sealed that frees everything sealed with a particular type that can be used for cleanup.
This is somewhat complicated by the fact that we do want to drop claims on sealed objects, we just don't want to allow them to actually be freed. @nwf, what do you think the right behaviour is?

  Even a heap_free_all variant that requires an authorising sealing capability would not help here because the network stack needs to gracefully clean things up (which it actually does by posting a message to another thread to serialise all deallocation events).
The API that I think I want is actually more like this:
int heap_free_all_sealed(Timeout *timeout, SObj mallocCapability, __cheri_callback void (*callback)(SObj);

This would find all sealed objects allocated with (or claimed by) mallocCapability and call callback on them.  The callback could then gracefully free everything by dispatching to the correct cleanup function for all sealed objects that it knows about.
For this to be useful, I think we need two additional APIs.  The first lives in the token library:
uint32_t token_type(SObj)

This returns the type.  When you're handed a sealed capability, you can use this to record the type so that you know where to dispatch the cleanup.
I think we also need:
int heap_claims_count(void*);

This returns the number of claims that exist on an object (or an error) and can be called wit sealed or unsealed objects.  In the network stack's socket close function, we require that the caller pass their own malloc capability so that we can drop the claim.  We don't free it if dropping the claim fails, so that you can separate the ability to allocate and deallocate sockets from the ability to send and receive over them trivially.  This means that we need a fallback path for 'oh, dropping the claim failed, but you've already dropped the claim via heap_free_all so that's fine' (as a side effect, anyone with the socket handle can close it if the compartment that owns it has reset itself, but I don't think that's a problem).
@nwf / @nwf-msr, what do you think?

I like this API better, to be sure, but I worry that
int heap_free_all_sealed(Timeout *timeout,
                         SObj mallocCapability,
                         __cheri_callback void (*callback)(SObj));

doesn't have a way for the callback to indicate that it could not deal with a particular sealed type (perhaps because it doesn't have the authority to unseal).  Maybe that's always a bug, but... could you instead use
int heap_free_all_sealed(Timeout *timeout,
                         SObj mallocCapability,
                         SKey unsealer,
                         __cheri_callback void (*callback)(uint32_t, void*));

which iteratively frees only those sealed objects that can be free'd or decref'd by mallocCapability and that could be unsealed with unsealer, after having invoked the callback on the unsealed form and its type?  Some additional commentary on this API:

I don't think there's reason to worry about passing in the unsealer authority, since all the SObj/SKey machinery is a contract provided by the allocator anyway.
Passing the unsealed form to the callback avoids a libcall to the fast unsealer.
But since type discrimination might still be useful, it probably makes sense to pass the type to the callback.  I am not sure if this completely obviates the present need for token_type; if it does not, the latter is surely easy enough to add to the fast unsealer library.

I think your API has a different use case in mind, but I'm increasingly thinking it's a more sensible one.
If compartment A allocates something sealed on behalf of compartment B, I was imagining that B would call the API and then call into A to clean them up.  With your model, A would call into B and say 'please free anything that you've allocated for me'.
Your approach feels somewhat nicer because the fact that these things are sealed with a specific key is somewhat irrelevant.  The calling compartment doesn't want to care what types a thing allocated on its behalf has, it wants to tell things that have allocated objects for it that they should go away.
  If those things go away at surprising times then the network stack can crash, so the network of stack claims them as well.  This opens a potential denial of service attack, where you keep allocating connections and then doing heap_free_all and exhaust memory using the network stack's quota.  Your variant would mean that we could potentially do a heap_free_all_sealed in the new-connection API to enumerate all connections allocated with the quota that we're passed and gracefully clean up any that are dangling.
After considering that use case a bit more, I suspect that what I actually want is a heap_visit_sealed that returns all of the sealed capabilities created with a permit-seal capability.  There's a good reason for this to pass the sealed version to the callback: you can't free the object with just the unsealed one.  It's probably worth passing both, because most of the time you also want the unsealed version.
That said, if the desired use case is asking another compartment to free all of the things that it allocated for you, then it may be simpler to not have this functionality in the allocator at all.  If sealed things are exempted from sealed objects then a compartment can just maintain a linked list of things that it's allocated and walk that list when it wants to do cleanup (or even periodically) to clean up any dangling things.
In the TLS compartment, we currently have pretty strong flow isolation.  Per-connection state is not reachable from any global.  Not exposing a mechanism for finding sealed objects on the heap means that heap_free_all will cause in-flight TLS operations on the connection to abort, but not free the associated connection object and require the caller to keep a handle to the TLS session and free it explicitly.  I think that's fine: most compartments have zero or one TLS connections.
TLS is quite a fun case because there are three compartments:

The user compartment initiates a TLS connection and owns the allocation capability.
The TLS compartment owns the TLS state and returns a sealed capability that uses this allocation capability.
The TLS state wraps a socket, which is another sealed capability allocated from the same malloc capability.

If heap_free_all doesn't free sealed things, the internal state for the socket remains claimed by the network stack but needs explicit teardown.  The TLS connection state has strong flow isolation and so your cleanup process needs to be:

heap_free_all
tls_connection_close with any TLS connections that you hold handles to.

At this point, everything is gracefully cleaned up.  This is quite nice.
The message queue compartment uses a single (sealed) allocation for the entire allocation, so works fine if we just exclude sealed things.
So now my leaning is to not provide the visit API at all and just exclude sealed things from heap_free_all.  @nwf-msr?


Webview does not support loading url which is identical to the previous one.

I have a case, where some highly secure banking site loads the url twice in a quick succession - do not know if it is a bug on their side or some backend trick. First load of the url shows just a blank page and only the second load shows the actual content.
I'm not able to do this with accompaninst webview as it is prevented in two places.
It overrides all urls and sets content url, which should launch the update block and load the url - but not for the same url as it is not counted as state change. And then also in the update block, there is a check for url change to prevent reloading when only other parts of state changed. Both of these could probably be solved by some kind of a url-set-timestamp as part of the state, something like:

I'd think it should be generally possible to load the same url again.

I'm facing the same issue. When clicking a button in info window of a bank page i'm getting eternal loading. However, usual WebView in this case loads a page with same url.
Is there some workaround? Thanks!

I'm hoping #1344 also will fix this issue but not confident. Once it's merged, I would love for you to test your use case please.

@bentrengrove  Now it is working ok (using v0.26.5-rc), at least in my case! Thanks!


Fixed ignoring routes

Fixed it: https://github.com/jeneser/vue-scroll-behavior/issues/19
Close #19

Also added: leaveIgnored option. So it is possible to do not affect ignored routes (not setting y: 0)

Thank you for the PR.


Sections overlapping

Hi :)
Viewed your portfolio page but it seems there may be a css issue somewhere, the cards/sections are not displayed properly and some content is not visible, just wanted to let you know!

This was a firefox screenshot

Hi! Thank you for your comment. Could you please let me know your screen resolution? It seems to be something about that

The screen where I was seeing this has a 1920x1080 resolution; other size breakpoints were working fine, it was only on bigger sizes that this happened
However I see you already fixed it in #16  , nice :) 👍


runtime: TestMmapErrorSign failure on Mac OS Mojave 10.14 Beta (18A365a)

Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go 1.11rc1 darwin/amd64
Does this issue reproduce with the latest release?
no
What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/nm55336/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/nm55336/gowork"
GOPROXY=""
GORACE=""
GOROOT="/Users/nm55336/go"
GOTMPDIR=""
GOTOOLDIR="/Users/nm55336/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/yl/jnvy7ycx5gjfjt5_5j4n_5gw0000gn/T/go-build968717385=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
$ GOROOT_BOOTSTRAP=$HOME/go1.9.2 ./all.bash
Building Go cmd/dist using /Users/nm55336/go1.9.2.
Building Go toolchain1 using /Users/nm55336/go1.9.2.

Building Go toolchain2 using go_bootstrap and Go toolchain1.
Building Go toolchain3 using go_bootstrap and Go toolchain2.
Building packages and commands for darwin/amd64.
Testing packages.
ok  	archive/tar	0.068s
ok  	archive/zip	3.052s
ok  	bufio	0.067s
ok  	bytes	0.427s
ok  	compress/bzip2	0.087s
ok  	compress/flate	1.096s
ok  	compress/gzip	0.032s
ok  	compress/lzw	0.022s
ok  	compress/zlib	0.031s
ok  	container/heap	0.020s
ok  	container/list	0.012s
ok  	container/ring	0.026s
ok  	context	1.032s
ok  	crypto	0.016s
ok  	crypto/aes	0.040s
ok  	crypto/cipher	0.029s
ok  	crypto/des	0.018s
ok  	crypto/dsa	0.015s
ok  	crypto/ecdsa	0.237s
ok  	crypto/elliptic	0.565s
ok  	crypto/hmac	0.012s
ok  	crypto/internal/subtle	0.011s
ok  	crypto/md5	0.012s
ok  	crypto/rand	0.052s
ok  	crypto/rc4	0.128s
ok  	crypto/rsa	0.089s
ok  	crypto/sha1	0.025s
ok  	crypto/sha256	0.010s
ok  	crypto/sha512	0.018s
ok  	crypto/subtle	0.012s
ok  	crypto/tls	0.719s
ok  	crypto/x509	2.503s
ok  	database/sql	0.582s
ok  	database/sql/driver	0.010s
ok  	debug/dwarf	0.040s
ok  	debug/elf	0.055s
ok  	debug/gosym	0.360s
ok  	debug/macho	0.016s
ok  	debug/pe	0.030s
ok  	debug/plan9obj	0.014s
ok  	encoding/ascii85	0.018s
ok  	encoding/asn1	0.020s
ok  	encoding/base32	0.028s
ok  	encoding/base64	0.014s
ok  	encoding/binary	0.018s
ok  	encoding/csv	0.015s
ok  	encoding/gob	0.049s
ok  	encoding/hex	0.015s
ok  	encoding/json	0.553s
ok  	encoding/pem	0.045s
ok  	encoding/xml	0.033s
ok  	errors	0.011s
ok  	expvar	0.031s
ok  	flag	0.012s
ok  	fmt	0.257s
ok  	go/ast	0.014s
ok  	go/build	0.556s
ok  	go/constant	0.013s
ok  	go/doc	0.160s
ok  	go/format	0.017s
ok  	go/importer	0.209s
ok  	go/internal/gccgoimporter	0.026s
ok  	go/internal/gcimporter	0.653s
ok  	go/internal/srcimporter	2.122s
ok  	go/parser	0.039s
ok  	go/printer	0.469s
ok  	go/scanner	0.011s
ok  	go/token	0.037s
ok  	go/types	1.318s
ok  	hash	0.012s
ok  	hash/adler32	0.017s
ok  	hash/crc32	0.019s
ok  	hash/crc64	0.022s
ok  	hash/fnv	0.010s
ok  	html	0.012s
ok  	html/template	0.063s
ok  	image	0.166s
ok  	image/color	0.035s
ok  	image/draw	0.089s
ok  	image/gif	0.442s
ok  	image/jpeg	0.448s
ok  	image/png	0.055s
ok  	index/suffixarray	0.017s
ok  	internal/cpu	0.012s
ok  	internal/poll	0.039s
ok  	internal/singleflight	0.022s
ok  	internal/trace	2.565s
ok  	io	0.041s
ok  	io/ioutil	0.021s
ok  	log	0.014s
ok  	log/syslog	1.249s
ok  	math	0.014s
ok  	math/big	2.735s
ok  	math/bits	0.013s
ok  	math/cmplx	0.022s
ok  	math/rand	0.401s
ok  	mime	0.017s
ok  	mime/multipart	0.679s
ok  	mime/quotedprintable	0.125s
ok  	net	3.303s
ok  	net/http	4.100s
ok  	net/http/cgi	0.967s
ok  	net/http/cookiejar	0.040s
ok  	net/http/fcgi	0.037s
ok  	net/http/httptest	0.056s
ok  	net/http/httptrace	0.034s
ok  	net/http/httputil	0.113s
ok  	net/http/internal	0.008s
ok  	net/http/pprof	2.057s
ok  	net/internal/socktest	0.019s
ok  	net/mail	0.011s
ok  	net/rpc	0.055s
ok  	net/rpc/jsonrpc	0.025s
ok  	net/smtp	0.051s
ok  	net/textproto	0.017s
ok  	net/url	0.025s
ok  	os	0.882s
ok  	os/exec	2.100s
ok  	os/signal	6.703s
ok  	os/user	0.015s
ok  	path	0.010s
ok  	path/filepath	0.101s
ok  	reflect	0.203s
ok  	regexp	0.143s
ok  	regexp/syntax	0.760s
--- FAIL: TestMmapErrorSign (0.00s)
runtime_mmap_test.go:22: mmap = ,<PHONE_NUMBER>69751052, want nil, 12
FAIL
FAIL	runtime	29.362s
ok  	runtime/debug	0.066s
ok  	runtime/internal/atomic	0.215s
ok  	runtime/internal/sys	0.012s
ok  	runtime/pprof	9.824s
ok  	runtime/pprof/internal/profile	0.011s
ok  	runtime/trace	2.049s
ok  	sort	0.095s
ok  	strconv	1.560s
ok  	strings	0.593s
ok  	sync	0.409s
ok  	sync/atomic	0.046s
ok  	syscall	0.083s
ok  	testing	0.968s
ok  	testing/quick	0.168s
ok  	text/scanner	0.010s
ok  	text/tabwriter	0.015s
ok  	text/template	0.661s
ok  	text/template/parse	0.018s
ok  	time	2.673s
ok  	unicode	0.013s
ok  	unicode/utf16	0.010s
ok  	unicode/utf8	0.014s
ok  	vendor/golang_org/x/crypto/chacha20poly1305	0.097s
ok  	vendor/golang_org/x/crypto/cryptobyte	0.011s
ok  	vendor/golang_org/x/crypto/curve25519	0.026s
ok  	vendor/golang_org/x/crypto/internal/chacha20	0.066s
ok  	vendor/golang_org/x/crypto/poly1305	0.016s
ok  	vendor/golang_org/x/net/dns/dnsmessage	0.077s
ok  	vendor/golang_org/x/net/http/httpguts	0.016s
ok  	vendor/golang_org/x/net/http/httpproxy	0.017s
ok  	vendor/golang_org/x/net/http2/hpack	0.015s
ok  	vendor/golang_org/x/net/idna	0.014s
ok  	vendor/golang_org/x/net/nettest	0.822s
ok  	vendor/golang_org/x/net/route	0.022s
ok  	vendor/golang_org/x/text/transform	0.012s
ok  	vendor/golang_org/x/text/unicode/norm	0.010s
ok  	cmd/addr2line	2.941s
ok  	cmd/api	0.021s
ok  	cmd/asm/internal/asm	1.025s
ok  	cmd/asm/internal/lex	0.014s
ok  	cmd/compile	0.014s
ok  	cmd/compile/internal/gc	16.583s
ok  	cmd/compile/internal/ssa	0.597s
ok  	cmd/compile/internal/syntax	0.023s
ok  	cmd/compile/internal/test	0.012s [no tests to run]
ok  	cmd/compile/internal/types	0.011s
ok  	cmd/cover	5.043s
ok  	cmd/doc	0.062s
ok  	cmd/fix	8.624s
ok  	cmd/go	122.522s
ok  	cmd/go/internal/cache	4.459s
ok  	cmd/go/internal/dirhash	0.019s
ok  	cmd/go/internal/generate	0.051s
ok  	cmd/go/internal/get	0.053s
ok  	cmd/go/internal/imports	0.025s
ok  	cmd/go/internal/load	0.019s
ok  	cmd/go/internal/modconv	0.058s
ok  	cmd/go/internal/modfetch	0.046s
ok  	cmd/go/internal/modfetch/codehost	0.010s
ok  	cmd/go/internal/modfile	0.026s
ok  	cmd/go/internal/modload	0.046s
ok  	cmd/go/internal/module	0.010s
ok  	cmd/go/internal/mvs	0.015s
ok  	cmd/go/internal/par	0.039s
ok  	cmd/go/internal/search	0.013s
ok  	cmd/go/internal/semver	0.010s
ok  	cmd/go/internal/txtar	0.011s
ok  	cmd/go/internal/web2	0.031s
ok  	cmd/go/internal/work	0.030s
ok  	cmd/gofmt	0.126s
ok  	cmd/internal/buildid	0.273s
ok  	cmd/internal/dwarf	0.011s
ok  	cmd/internal/edit	0.051s
ok  	cmd/internal/goobj	1.223s
ok  	cmd/internal/obj	0.013s
ok  	cmd/internal/obj/arm64	0.065s
ok  	cmd/internal/obj/x86	0.625s
ok  	cmd/internal/objabi	0.010s
ok  	cmd/internal/src	0.011s
ok  	cmd/internal/test2json	0.153s
ok  	cmd/link	3.295s
ok  	cmd/link/internal/ld	13.525s
ok  	cmd/link/internal/sym	0.011s
ok  	cmd/nm	7.248s
ok  	cmd/objdump	4.684s
ok  	cmd/pack	3.599s
ok  	cmd/trace	0.062s
ok  	cmd/vendor/github.com/google/pprof/internal/binutils	0.037s
ok  	cmd/vendor/github.com/google/pprof/internal/driver	0.451s
ok  	cmd/vendor/github.com/google/pprof/internal/elfexec	0.010s
ok  	cmd/vendor/github.com/google/pprof/internal/graph	0.016s
ok  	cmd/vendor/github.com/google/pprof/internal/measurement	0.012s
ok  	cmd/vendor/github.com/google/pprof/internal/report	0.049s
ok  	cmd/vendor/github.com/google/pprof/internal/symbolizer	0.033s
ok  	cmd/vendor/github.com/google/pprof/internal/symbolz	0.029s
ok  	cmd/vendor/github.com/google/pprof/profile	0.104s
ok  	cmd/vendor/github.com/ianlancetaylor/demangle	0.028s
ok  	cmd/vendor/golang.org/x/arch/arm/armasm	0.023s
ok  	cmd/vendor/golang.org/x/arch/arm64/arm64asm	0.366s
ok  	cmd/vendor/golang.org/x/arch/ppc64/ppc64asm	0.016s
ok  	cmd/vendor/golang.org/x/arch/x86/x86asm	0.132s
ok  	cmd/vendor/golang.org/x/crypto/ssh/terminal	0.015s
ok  	cmd/vendor/golang.org/x/sys/unix	0.395s
ok  	cmd/vet	4.312s
ok  	cmd/vet/internal/cfg	0.010s
2018/08/15 11:37:25 Failed: exit status 1
If possible, provide a recipe for reproducing the error.
run all.bash
A complete runnable program is good.
A link on play.golang.org is best.
What did you expect to see?
All Test Passed
What did you see instead?
2018/08/15 11:37:25 Failed: exit status 1

I've re-titled this issue, since it seems to only concern a test in the runtime package.
Note that to build Go, you can simply use make.bash instead of all.bash - there's no strict need to run the tests to build Go.

Could you try 1.11 or tip?  This should have been fixed by moving to libc calls instead of raw system calls.

Sorry, you did do that. 1.9 was just the bootstrap compiler.

fix confirmed.  thanks for the quick response.


signup page looks weird i can fix it

hey @YadavAkhileshh
i just noticed the signup page looks weird

the buttons have no styling or alignment
i can fix this , kindly assign this to me with gssoc extd , level 2 labels , thankyou !

@YadavAkhileshh ?


pmap race condition (?)

Description
I've got a self-play (not important) function that I would like to execute on the CPU, but I'm running into an issue where the execution mysteriously freezes on the 32nd iteration. Now, when I say freeze or halt, I actually don't know if this is a complete freeze or just a immense slow down. The first 31 iterations run in less than a second, and I've waited for 5 minutes without the 32nd iteration completing. Anyway, let me walk through the code and what I've found so far.
This is the selfplay function that is called externally N times, and halts to a stop on exactly the 32nd call (every time):
@partial(jax.pmap, backend='cpu')
def selfplay(
    model,
    rng_key: jnp.ndarray,
    state,
) -> Sample:
    model_params, model_state = model
    batch_size = config.selfplay_batch_size // num_cpu_devices

    def step_fn(state, key):
        key1, key2 = jax.random.split(key)
        observation = state.observation

        (logits, value), _ = forward.apply(
            model_params,
            model_state,
            state.observation,
            is_eval=True,
        )
        root = RootFnOutput(prior_logits=logits, value=value, embedding=state)

        policy_output = modified_gumbel_muzero_policy(
            params=model,
            rng_key=key1,
            root=root,
            recurrent_fn=recurrent_fn,
            num_simulations=config.num_simulations,
            invalid_actions=~state.legal_action_mask,
        )

        actor = state.current_player
        keys = jax.random.split(key2, batch_size)
        state = jax.vmap(auto_reset(auto_chance(env.step), env.init))(
            state,
            policy_output.action,
            keys,
        )

        return state, observation

I've identified the modified_gumbel_muzero_policy function as the culprit (swapping it out for a dummy initialization fixes the issue). My initial thought was that there was some complex logic in modified_gumbel_muzero_policy that for some (unknown) reason was really resource intense. So I started replacing all the logic step-by-step with dummy initializers to see when the issue fixed itself, and I ended up with this:
def modified_gumbel_muzero_policy(
    params: base.Params,
    rng_key: chex.PRNGKey,
    root: base.RootFnOutput,
    recurrent_fn: base.RecurrentFn,
    num_simulations: int,
    invalid_actions: Optional[chex.Array] = None,
    max_depth: Optional[int] = None,
    loop_fn: base.LoopFn = jax.lax.fori_loop,
    *,
    qtransform: base.QTransform = qtransforms.qtransform_completed_by_mix_value,
    max_num_considered_actions: int = 4,
    gumbel_scale: chex.Numeric = 1.0,
) -> base.PolicyOutputWithValue[action_selection.GumbelMuZeroExtraData]:
    """Runs Gumbel MuZero search and returns the `PolicyOutput`.

    action = jnp.argmax(root.prior_logits, axis=-1)
    action_weights = root.prior_logits

    return base.PolicyOutput(
        action=action,
        action_weights=action_weights,
        search_tree=None,
    )

There's hardly anything left?! I've been able to remove almost all the logic from this function and everything still freezes on the 32nd selfplay call.
Swapping out action and action_weights to dummy initializers does fix the problem:
def modified_gumbel_muzero_policy(
    params: base.Params,
    rng_key: chex.PRNGKey,
    root: base.RootFnOutput,
    recurrent_fn: base.RecurrentFn,
    num_simulations: int,
    invalid_actions: Optional[chex.Array] = None,
    max_depth: Optional[int] = None,
    loop_fn: base.LoopFn = jax.lax.fori_loop,
    *,
    qtransform: base.QTransform = qtransforms.qtransform_completed_by_mix_value,
    max_num_considered_actions: int = 4,
    gumbel_scale: chex.Numeric = 1.0,
) -> base.PolicyOutputWithValue[action_selection.GumbelMuZeroExtraData]:
    """Runs Gumbel MuZero search and returns the `PolicyOutput`.

    # action = jnp.argmax(root.prior_logits, axis=-1)
    # action_weights = root.prior_logits

    action = jnp.zeros(64, dtype=jnp.int32)
    action_weights = jnp.zeros((64, 89))

return base.PolicyOutput(
        action=action,
        action_weights=action_weights,
        search_tree=None,
    )

This runs.
What is going on here? Does anything have any intuition as to why this is happening?
I'm enabling CPU executing across cores using:
USE_N_CORES = 16
os.environ['JAX_PLATFORMS'] = 'cpu'
os.environ['CUDA_VISIBLE_DEVICES'] = ''
os.environ['XLA_FLAGS'] = '--xla_force_host_platform_device_count=' + str(
    USE_N_CORES
)

System info (python version, jaxlib version, accelerator, etc.)
jax:    0.4.28
jaxlib: 0.4.28
numpy:  1.26.4
python: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
jax.devices (16 total, 16 local): [CpuDevice(id=0) CpuDevice(id=1) ... CpuDevice(id=14) CpuDevice(id=15)]
process_count: 1
platform: uname_result(system='Linux', node='75k', release='6.2.0-39-generic', version='#40~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 16 10:53:04 UTC 2', machine='x86_64')

$ nvidia-smi
Tue Jun 18 13:41:13 2024
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 530.30.02              Driver Version: 530.30.02    CUDA Version: 12.1     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                  Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf            Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce RTX 4090         Off| 00000000:01:00.0 Off |                  Off |
|  0%   39C    P8               18W / 450W|    601MiB / 24564MiB |      2%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      1534      G   /usr/lib/xorg/Xorg                          202MiB |
|    0   N/A  N/A      2531      G   /usr/bin/gnome-shell                         80MiB |
|    0   N/A  N/A      3150      G   ...irefox/1635/usr/lib/firefox/firefox      139MiB |
|    0   N/A  N/A      7585      G   ...sion,SpareRendererForSitePerProcess      175MiB |
+---------------------------------------------------------------------------------------+

Can you try adding a call to .block_until_ready() after each pmap output? 32 sounds like the size of one of our internal queues that limits how far ahead we can enqueue computations. A possible explanation is that the very first computation you run isn't terminating for some reason, and if you add block_until_ready() then you should see that behavior right away.
(As to why it isn't terminating? I don't know without a repro, but my guess is it's a bug in your code.)

Thanks for the hasty response.
Note this is how selfplay is called:
while True:
        # Log to tensorboard
        for k, v in log.items():
            writer.add_scalar(f'{k}', v, iteration)
        writer.flush()

        if iteration >= config.max_num_iters:
            break

        log = {}

        # Selfplay
        key, subkey = jax.random.split(key)
        keys = jax.random.split(subkey, num_cpu_devices)

        env_state, samples = selfplay(
            models,
            keys,
            env_state,
        )
        samples.obs.block_until_ready()

        log.update(
            {
                'stats/samples_per_sec': SAMPLES_PER_ITERATION / time_sample_generation,
            },
        )

        print(iteration)
        iteration += 1

Adding the block does seem to reveal part of the problem. The selfplay calls are extremely slow, and it takes probably a good 15 minutes until we reach the 32nd iteration. Given your suggestion of a internal queue, this makes a lot of sense. I've failed to consider the asynchronous dispatch, and was fooled by the print statements!


[Bug] When inputting content in Chinese at the head of a code block, it can cause some problems

Problem Description

When I input content in the header of the code block using Chinese input method, there will be a space like thing in front of Chinese

Animation demonstration

This problem not only occurs when inputting Chinese, but also when using the Chinese input method, regardless of whether the final screen is in English or Chinese
testing environment

obsidian v1.4.5 or previous version
obsidian sandbox vault

That's interesting. I think it might have to do something with the input method, because if you take a chines string, then it wil be displayed correctly:

Can you remove that first character?
I can look into this problem as well.

Also, can you please try it out if the same happens if you disable the plugin?

That's interesting. I think it might have to do something with the input method, because if you take a chines string, then it wil be displayed correctly:
这很有趣。我认为它可能必须对输入法做一些事情，因为如果你拿一个中文字符串，那么它就会正确显示：
Can you remove that first character? I can look into this problem as well.↳

There is no problem with the display of Chinese characters, but this space may be added during input, and may cause the entire page rendering to fail

hm. interesting, as I don't do anything that could cause this. it should be just simply text. but I believe you. I will look into it what can cause this. I might get back to you if I have any questions.

Recently, the input method I used has been updated and this issue no longer occurs

If the update of the input method fixed this, then this means for me, that the input method you use causes these issues. There are some cases when the lines loose the associated classes. For example if you have a codeblock with no text, and collapse and uncollapse it, then somtimes it can be observed that not all the lines after uncollapse gets the classes associated with them which they should have. I think however, that this is either an Obsidian or a CodeMirror bug. I leaves this issue open for now, but it could take some time to figure this out.


After send other open drafts will loose encryption settings

This problem happens when I have multiple drafts to send and my password has been expired. When I try to send the first mail, it asks for my password, but not with the following. That's how I expect it to be, but those mails don't get encrypted.
I'm still on beta 46, but I didn't see a fix in the changelogs.

This is not related to password caching. After sending an email with opp options selected (sign/encrypt), any other open drafts will loose their opp option state and will be send unencrypted.
Reproduction:

Create new email and click sign+encrypt
Create new email and click sign+encrypt
Send first email
Send second email
Second email will not be encrypted or signed

Workarounds:

Send one email at a time
Don't select encryption options until send time


⚠ Samsung has degraded performance

In 76cd1bd, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2485 ms

Resolved: Samsung performance has improved in 3a68c95.


;......................................[

Describe the problem
Tell us about the problem you're having
Steps to reproduce
Tell us how to reproduce it
System configuration

Django version:
Python version:

cat


Fix Javascript error when opening an order without a shipping address

It was not possible before to open an order in the Shopware backend if it was missing its shipping address, because a Javascript error came up. The cause is that the condition (!billingStore == null) never resolves to true because !billingStore is either true or false, but never null.

Hello,
thank you for creating this pull request.
I have opened an issue on our Issue Tracker for you. See the issue link: https://issues.shopware.com/#/issues/SW-15081.
Please use this issue to track the state of your pull request.

Hi,
The described problem is no longer reproducible. Backend order detail pages can be opened with and without any billing and/or shipping address.


while pulling sub module, gives permission denied error.

I am getting the below given error when I try to install submodule.
sam@Sam-l554d:~/meteor-url-shortener$ git submodule update --init --recursive
Cloning into 'client/lib/meteor-material-design'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Clone of 'git@bitbucket.org:npvn/meteor-material-design.git' into submodule path 'client/lib/meteor-material-design' failed

Hey @hafizali05, sorry for the late reply. I hosted the meteor-material-design submodule on bitbucket and used a git:// URL, so you were not able to clone it because you didn't have a public key registered with bitbucket.
I just updated the submodule URL to https. Now you can clone without the need of registering your key:
git clone --recursive https://github.com/npvn/meteor-url-shortener.git


Can I set sqe->flags = SQE_IO_LINK after io_uring_submit?

I curious about the design decision of SQE_IO_LINK linking the next vs. previous command.
I guess the latter approach would be more problematic as the entries placed in a ring buffer?

Once an SQE has been submitted, it's no longer read again. Anything you set after submission will not be seen. In fact, it may be completed by the time you submit the next command. Hence linking backwards cannot work, and setting the flag after cannot work either.


⚠ ClamAV has degraded performance

In e598bca, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 83 ms

Resolved: ClamAV performance has improved in 88a39f8 after 33 minutes.


treewide: switch to fetchFromGitHub part 1

Motivation for this change
use fetchFromGitHub
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
22.05 Release Notes (or backporting 21.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 150542 run on x86_64-linux 1

16 packages built:

blink1-tool
curaengine_stable
diamond
easyrsa2
geeqie
gsimplecal
kdev-php
kdev-python
kssd
lxterminal
messer-slim
niftyseg
plover.dev
scantailor
xkblayout-state
xrandr-invert-colors


Major InterruptController Refactor

Resolves #959
Resolves #632
Resolves #954
Resolves #803
Resolves #781

Coverage increased (+0.6%) to 79.018% when pulling 2a952b2f6c98c23f38dcd22f3c075957e47a7700 on migrate-isrs-to-std-function into 19a4e0fd3e3df111a3b53a809ee883b48ec659f9 on master.


Fix d ts updates

Fixed sample 14 test components.
We have still the redux-mock-store manual d.ts, but submitted a new PR to the redux-mock-store in order to get updated the d.ts on their project
https://github.com/arnaudbenard/redux-mock-store/issues/52
https://github.com/arnaudbenard/redux-mock-store/pull/51
On the other hand redux-thunk definition is outdated, needed a manual one
Once approved this changes should be propagated to other samples using this (15? )

This PR is ready.

We are using redux-mock-store index.d.ts from original library. So, we don't need manual typings


Cosmos example subgraphs: Update graph-ts dependency version from 0.27.0 to 0.29.0 in package.json

This is more of an improvement than an issue - when i was following EventHandler example on Cosmos network, I've installed the graph-ts version 0.27.0 (as in the example) and then I tried to get transaction information from EventData object, however this was added in 0.29.0.
Maybe it would be good to update this version in examples, even though transaction data is not extracted from EventData in the EventHandler example - this could be helpful in order to prevent questions like "where is the transaction related information from EventData object?".

Thanks! These examples have been migrated to the Graph Tooling repository


JSON Schema Validation

Q
A

Type
feature

BC Break
no

Fixed issues
#2233

Summary
This pull request introduces a new @Validation class annotation containing three options:

jsonSchema
action
level

; corresponding to the three options of MongoDB collections:

validator.$jsonSchema
validationAction
validationLevel

The JSON Extension
The MongoDB Driver requires an array for the validator option of the createCollection method and collMod command.
We therefore have to decode the user-defined JSON schema, thus the need to add the ext-json to the require-dev section of the composer.json.
The ext-json is still not required for users to install the package, it is only added to the suggestion list.
Adding a new Validation annotation vs. adding new options to the Document annotation
When I started working on this feature I chose to add three new properties to the @Document annotation:

validationJsonSchema
validationAction
validationLevel

But I found that it would be convenient for the validationAction and validationLevel options to be enumerations as it would help the user to realize directly during the mapping process that they made a mistake in filling those.
A wrong value would trigger doctrine/annotations's inner logic and raise an AnnotationException.
When used with Symfony for instance users wouldn't have to wait until execution of odm:schema:update command to realize they made a mistake, they would know right away on cache clear which happens on every request by default on dev environment.
Using enumerations was only possible by creating a whole new annotation class as the @Document annotation has a constructor and therefore its properties' annotations are not parsed, see https://github.com/doctrine/annotations/blob/e2623fd97c136cc7a18b467da8d8331c01de051c/lib/Doctrine/Common/Annotations/DocParser.php#L548
To sum up adding @Enum on the annotation properties was only possible by creating a new class, thus the choice of a new @Validation annotation. It makes the annotation-driven configuration similar to the XML-driven configuration which also contains enumerations.
The validationAction / validationLevel default values issue
MongoDB version ≥ 4.4.0 allows to reset the validationAction and validationLevel options of the collections to their default values by passing empty strings to the respective arguments of the collMod command.
However I found that versions 4.2.0 and bellow do not care about empty strings in the validationAction /  validationLevel arguments of the collMod command. The command options will just get ignored and the collection options will not be modified.
In order to reset those options during odm:schema:update, in case for instance the user removed the action / level options of the @Validation annotation, we need to have default values defined for those options in Doctrine.
Those default values are documented and are equal the default values defined by MongoDB.
However if the MongoDB team decides to change those default values in the future it could cause confusion for our users, but it's the only solution I found to be able to support MongoDB versions < 4.4.0.
Documentation
I updated the annotations-reference and added a new section on the validation-of-documents cookbook, I hope that's OK. Feel free to proofread it and recommend some adjustments as English is not my mother tong.
TODO

[x] Annotation
[x] AnnotationDriver
[x] XmlDriver
[x] ClassMetadata
[x] SchemaManager
[x] UpdateCommand
[x] Tests: Annotation
[x] Tests: AnnotationDriver
[x] Tests: XmlDriver
[x] Tests: ClassMetadata
[x] Tests: SchemaManager
[x] Tests : Functionnal
[x] Tests : UpdateCommand
[x] Documentation
[x] Clean Commit History

Just wanted to say thanks for a really well-thought PR! It's great you have already included documentation. Looking forward to leaving the "draft" state :)

I let myself go through the review initially, hope you don't mind :)

@malarzm Thanks ! I just wanted to increase the coverage before leaving the draft stage, but overall it was almost ready. I don't have much time this week but I will look into your review very soon. Thank you again :)

Hi, thanks again @malarzm for the draft review.
I took your advice into consideration, made the according changes and edited the documentation to reflect those modifications.
Please take a look again at the PR description because it was updated to explain some of the choices I made.
Some more tests were added to increase coverage.
It should now be ready to be reviewed :)
Thank you.

@alcaeus Thank you very much for that detailed PR review. I will work on your suggestions as soon as I get some time off during the following days.
I agree, we should definitely keep in mind the fact that we could generate that schema from metadata. That's what I was resolved to try and do when I opened #2233. But it was for sure a good suggestion by @malarzm to implement it manually first.
About the annotation's specs, this is a tough choice.
I actually started to implement this feature the "array way" first (without strings). I chose to fallback to the "string way" in the process of implementing it as I found some drawbacks. I'll try to summarize my thought process with a table (more details below):

spec
advantages
inconveniences

array
- No need for json_decode in AnnotationDriver.
- XMLDriver cannot be implemented in a similar way: ext-json is still needed in the end.- With PHP8 we will need to transform the JSON schema to PHP arrays. It is not as easy as a simple search/replace but there are online tools that can take care of it (exemple).- With PHP7 and below we need to replace square brackets to curly braces for arrays, complexity increases with the one of the JSON schema.- If we extend, in the future, the validation implementation to the whole MongoDB validator, not just the $jsonSchema part of it, we will need more types than just the JSON valid data types (ex. regex) and thus it won't be possible to implement it with PHP arrays. But this will probably be done in another annotation anyway.

string
- Implementation is similar in AnnotationDriver and XMLDriver.- With PHP8 Attributes and HEREDOC we will probably not need to escape characters anymore.
- Need for ext-json.- With PHP7 and below we need to escape double quotes, but it is as simple as search/replace all double quotes in the JSON string.

The "array way"
It would be great to implement it this way. As you said:

JSON schema is (almost) compatible with the annotations

; and we wouldn't need to json_decode the schema to PHP arrays. We could get rid of the dependency between this feature and ext-json.
However I found that this dependency was still needed for the XMLDriver as it would be terrible to ask users to write their JSON schema directly as an XML tree. Plus we would need to use some kind of <xs:any> hack in the doctrine-mongo-mapping.xsd which I didn't feel comfortable with.
In the end the XMLDriver implementation and the AnnotationDriver implementation would have needed to be different which I found kind of confusing for the user.
The "string way"
It has a major flaw: we need to escape double quotes. However it is as simple as a search/replace so it is acceptable in my opinion.
Plus, as you mentioned, we probably won't need to escape in PHP8 anymore, which is great. I haven't got to test the new PHP8 Attributes still tho so I'm not 100% sure that they accept HEREDOC, but I guess they should.
$jsonSchema vs. whole validator
Furthermore, but this is probably far-fetched, I was trying at that time to interface the whole validator component of MongoDB with doctrine, not just the $jsonSchema part of it. Citing MongoDB docs:

In addition to JSON Schema validation that uses the $jsonSchema query operator, MongoDB supports validation with other query operators...

For instance:
{
    $jsonSchema: { ... },
    $or: [
         { phone: { $type: "string" } },
         { email: { $regex<EMAIL_ADDRESS>} },
         { status: { $in: [ "Unknown", "Incomplete" ] } }
    ]
}

This could be done in doctrine if we decide to extend the feature it in the future. However those validators are not JSON typed. As I understand it they could be composed of any Javascript type (see the $regex in this example).
The validation would have to be passed as a string in the annotation (no other choice here). This is when I fell back to the "string way".
But the validation content would also need to be parsed with a Javascript object parser of some kind... That's when I understood it wasn't an easy task and I should focus on $jsonSchema first. But I didn't revert my "string way" choice since then.
Anyways, that's how I decided to use strings in the end. Sorry for the long explanation, just wanted to expose my whole thought process.
But it could still be reverted, you tell me :)
Validation errors
I actually didn't think too much about it as I thought the exception raised by the mongodb driver was enough, like a unique index exception. Feel free to guide me if there is some test I could add to make sure that this is enough.
Thank you again for taking the time to review this PR!

branch rebased on master

rebased (fixed conflicts)

@alexandre-abrioux sorry for the delay here. I'll revisit this PR in the coming days.

@alexandre-abrioux sorry for the delay here. I'll revisit this PR in the coming days.

@alcaeus Thanks! Just finished rebasing to upstream, I got an error on the sharded_cluster pipeline and I'm having a hard time figuring out what could be the cause. I understand it's a new pipeline you added this week in https://github.com/doctrine/mongodb-odm/pull/2272. Could you check it out? I'm sure you can guide me into the right direction to fix it! Thanks again :)

@alcaeus Thanks! Just finished rebasing to upstream, I got an error on the sharded_cluster pipeline and I'm having a hard time figuring out what could be the cause. I understand it's a new pipeline you added this week in https://github.com/doctrine/mongodb-odm/pull/2272. Could you check it out? I'm sure you can guide me into the right direction to fix it! Thanks again :)

I got an error on the sharded_cluster pipeline and I'm having a hard time figuring out what could be the cause.

Taking a short look I wasn't able to reproduce this locally, but I'll take another look when I return to review this.

I got an error on the sharded_cluster pipeline and I'm having a hard time figuring out what could be the cause.

Taking a short look I wasn't able to reproduce this locally, but I'll take another look when I return to review this.

@alcaeus rebased the branch off of 2.3.x, and edited the doc:

This feature has been introduced in version 2.2.0

to

This feature has been introduced in version 2.3.0

Tests are green again :)

Hi @alcaeus,
Thank you for taking the time to review this, and for the very thorough and detailed response.
I am gonna implement the changes, but before I start digging, I have a suggestion regarding your point about the annotations.
You're right: it doesn't make sense to place those long schemas inside them.
But I think we overlooked something. While thinking about it later on, I thought, why not do it like this?
/**
 * @ODM\Document
 * @ODM\Validation(
 *     jsonSchema=JsonSchemaValidated::JSON_SCHEMA,
 *     action=ClassMetadata::SCHEMA_VALIDATION_ACTION_WARN,
 *     level=ClassMetadata::SCHEMA_VALIDATION_LEVEL_MODERATE,
 * )
 */
class JsonSchemaValidated
{

    public const JSON_SCHEMA = <<<'EOT'
{
    "required": ["name"],
    "properties": {
        "name": {
            "bsonType": "string",
            "description": "must be a string and is required"
        }
    }
}
EOT;

    /** @ODM\Id */
    private $id;

    /** @ODM\Field(type="string") */
    private $name;
}

I'm really convinced it's the best of both worlds.
With the XML driver or with the Annotation driver, just copy-paste your schema, and you're done! I just tested it real quick and that works. What do you think about this?

You're right: it doesn't make sense to place those long schemas inside them.
But I think we overlooked something. After re-reading all your comments, I thought later on: why not do it like this?
[...]
I'm really convinced it's the best of both worlds. We would get the same experience with both the XML driver and the Annotation driver: just copy-paste your schema, and you're done!
I just quickly tested it in the test suite and that works. What do you think about this?

I like it - this could also be modified to include both worlds: if the schema given to the annotation is a string, assume it's JSON and try to decode it. Afterwards, we're always expecting a valid schema. This would allow people to either copy-paste the schema from an external source without any modification at all using HEREDOC, or if they want to create the schema by writing up a PHP array they can do that as well. Feel free to implement only one of these methods, I'd be happy to expanding support in a later PR.

Hi @alcaeus
I'm very sorry for the time it took me to take action after our last conversation, I got caught in other projects.
I finally implemented the requested changes:

added your edits to the documentation ;
modified the XML way of providing validation constraints, like so:

    <document name="TestDocuments\JsonSchemaValidatedDocument">
        <json-schema-validation action="warn" level="moderate">
            {
                "required": ["name"],
                "properties": {
                    "name": {
                        "bsonType": "string",
                        "description": "must be a string and is required"
                    }
                }
            }
        </json-schema-validation>
    </document>

removed the test of the database version before updating the collection ;
used HEREDOC in class constants for the JSON schema, like so:

/**
 * @ODM\Document
 * @ODM\Validation(
 *     jsonSchema=JsonSchemaValidated::JSON_SCHEMA,
 *     action=ClassMetadata::SCHEMA_VALIDATION_ACTION_WARN,
 *     level=ClassMetadata::SCHEMA_VALIDATION_LEVEL_MODERATE,
 * )
 */
class JsonSchemaValidated
{

    public const JSON_SCHEMA = <<<'EOT'
{
    "required": ["name"],
    "properties": {
        "name": {
            "bsonType": "string",
            "description": "must be a string and is required"
        }
    }
}
EOT;

    /** @ODM\Id */
    private $id;

    /** @ODM\Field(type="string") */
    private $name;
}

and rebased the PR to the latest 2.3.x branch commit.

I only implemented the JSON schema provided by the the user as a HEREDOC string. As you stated before, we can expand the feature to a schema provided as a PHP array in a later PR.
Feel free to review the code one last time if needed! Thank you again for the time spent on this :)

@alcaeus pinged me to take a look at this the other day and I just got through reading the PR from top to bottom.
The first thing that stood out to me was that this was focused only on $jsonSchema and should probably more generically support defining the validator document in its entirety. $jsonSchema is just a single query operator and from a technical standpoint I don't see any reason the feature can't support a full query (e.g. mixing $jsonSchema with $or) out of the gate.
I see this was previously alluded to in https://github.com/doctrine/mongodb-odm/pull/2238#issuecomment-735960199:

Furthermore, but this is probably far-fetched, I was trying at that time to interface the whole validator component of MongoDB with doctrine, not just the $jsonSchema part of it. Citing MongoDB docs:

In addition to JSON Schema validation that uses the $jsonSchema query operator, MongoDB supports validation with other query operators...

For instance:
{
   $jsonSchema: { ... },
   $or: [
        { phone: { $type: "string" } },
        { email: { $regex<EMAIL_ADDRESS>} },
        { status: { $in: [ "Unknown", "Incomplete" ] } }
   ]
}

This could be done in doctrine if we decide to extend the feature it in the future. However those validators are not JSON typed. As I understand it they could be composed of any Javascript type (see the $regex operator in this example).

The Javascript types you're seeing there (e.g. regex) are really just due to documentation using the MongoDB shell for its example. If this page showed examples in multiple languages/drivers (as some others do), we might expect to see native language types used (or classes like MongoDB\BSON\Regex.
As a general rule, I think it makes sense to use Extended JSON whenever we're asking users to provide JSON that needs to be converted to MongoDB data. That syntax is both valid JSON and capable of expressing all special BSON types.
With respect to this PR, I think it'd make sense to rename "json-schema-validation" to "schema-validation" (consistent with the MongoDB feature name) and then solicit the following options:

validator as a document
validationAction (or just action) as a string
validationLevel (or just level) as a string

This would require anyone using a JSON schema to provide the top-level $jsonSchema operator for validator on their own, but I think that's a small ask (easily communicated in documentation) for having this feature support all aspects of MongoDB's schema validation.

Ah, that's a good point. @alexandre-abrioux I can make those changes if you want so you don't have to do another pass. Using extended JSON for this makes sense, as it saves us from re-declaring a good amount of syntax in the XSD (like I did for partial index filters).

@jmikola Awesome! That is exactly what I had in mind when I first though about this feature, but I had no knowledge of the extended JSON specification, so couldn't wrap my head around how to solve this easily!
@alcaeus I'll take a shot at it right away! I'd love contribute and finish this feature if I can.
Just to be clear, this is what I'm headed to, using MongoDB's documentation example and using the extended JSON specification for the regex part. Please confirm me that's what you had in mind (also consider the annotation name and properties) and I'll make the changes.
For the XML part:
    <document name="TestDocuments\SchemaValidatedDocument">
        <schema-validation action="warn" level="moderate">
          {
            "$jsonSchema": { ... }
            "$or": [
              { "phone": { "$type": "string" } },
              { "email": { "$regex": { "$regularExpression" : { "pattern"<EMAIL_ADDRESS>"options": "" } } } },
              { "status": { "$in": [ "Unknown", "Incomplete" ] } }
            ]
          }
        </schema-validation>
    </document>

For the annotation part:
/**
 * @ODM\Document
 * @ODM\Validation(
 *     validator=SchemaValidated::VALIDATOR,
 *     action=ClassMetadata::SCHEMA_VALIDATION_ACTION_WARN,
 *     level=ClassMetadata::SCHEMA_VALIDATION_LEVEL_MODERATE,
 * )
 */
class SchemaValidated
{

    public const VALIDATOR = <<<'EOT'
{
  "$jsonSchema": { ... }
  "$or": [
    { "phone": { "$type": "string" } },
    { "email": { "$regex": { "$regularExpression" : { "pattern"<EMAIL_ADDRESS>"options": "" } } } },
    { "status": { "$in": [ "Unknown", "Incomplete" ] } }
  ]
}
EOT;

   // rest of the class code...
}

Yep, that looks lovely. @jmikola if I'm not mistaken we should use BSON\toPHP(BSON\fromJson($validator)) to avoid reading plain old JSON, right? BSON types are safe to serialise in Metadata, and this would give the driver the correct representation for whatever the user gives us. We need to make sure to link the extended JSON documentation in the docs here as well.

Implemented the changes, looks good to me! Notes:

The schema is parsed with BSON\fromJSON in the driver, so that the user could directly realize during the mapping process if they made a mistake creating their class' schema.
It is therefore a simple string that's being saved to the ClassMetaData::validator property: a serialized BSON document represented as a binary string.
The schema is then converted to its PHP representation with BSON\toPhp in the SchemaManager.

Don't hesitate to make edits the documentation if needed. Thanks!

if I'm not mistaken we should use BSON\toPHP(BSON\fromJson($validator)) ([see docs])(https://www.php.net/manual/en/ref.bson.functions.php) to avoid reading plain old JSON, right?

Correct. fromJSON is only going to yield a binary string, so we need toPHP to decode the binary string back to a PHP value representing a document (e.g. stdClass).

It is therefore a simple string that's being saved to the ClassMetaData::validator property: a serialized BSON document represented as a binary string.

I think it may make more sense to immediately chain fromJson() with toPHP() and only ever store the PHP value in ClassMetadata. In the event the user ever dumps ClassMetadata, the binary string may ultimately be more confusing. Also, IIRC there is mechanism for defining mappings purely with PHP (as opposed to annotations or XML), which entails explicitly constructing and configuring ClassMetadata objects. Sticking to familiar PHP types would help with that (admittedly uncommon) use case.

I think it may make more sense to immediately chain fromJson() with toPHP() and only ever store the PHP value in ClassMetadata. In the event the user ever dumps ClassMetadata, the binary string may ultimately be more confusing. Also, IIRC there is mechanism for defining mappings purely with PHP (as opposed to annotations or XML), which entails explicitly constructing and configuring ClassMetadata objects. Sticking to familiar PHP types would help with that (admittedly uncommon) use case.

@jmikola Thanks, it makes sense! I was afraid the PHP value wouldn't get serialized properly in ClassMetadata:__sleep method, but I tested it and it works perfectly.
I made the appropriate edits. However the static analysis test seems to fail now, but on part of the code I didn't modify. Would it be related to the recent upgrade of doctrine/coding-standard?

the static analysis test seems to fail now, but on part of the code I didn't modify

I'll take a look and fix this before merging. Again, thanks for your work here!

I was afraid the PHP value wouldn't get serialized properly in ClassMetadata:__sleep method, but I tested it and it works perfectly.

Serialization support for the driver's BSON classes was implemented in 1.2.0 (PHPC-460), so there should be nothing to worry about there. :+1:


Cooperation

Hello, I am a staff member of the 7claw source code trading platform,this is our platform address:http://www.7claw.com/.Our company website uses your open source source code to sell on our website, hoping to get your permission.At the same time, we can give you a 20% share for every piece of your open source code sold.If you want to get your commission or have other ideas,please contact us.This is our email<EMAIL_ADDRESS>Thanks.


Error compiling on Pi4

Mine is Pi4 running on Raspberry Pi OS (Debian based, x64, gcc (Debian 8.3.0-6) 8.3.0).
Output of the compile:
cc -D_POSIX_C_SOURCE=200809L -std=c99 -Wall -Wno-missing-braces -g -c chiaharvestgraph.c -o chiaharvestgraph.o
/usr/lib/gcc/aarch64-linux-gnu/8/cc1: /lib/aarch64-linux-gnu/libdl.so.2: version ' not found (required by /usr/lib/gcc/aarch64-linux-gnu/8/cc1) /usr/lib/gcc/aarch64-linux-gnu/8/cc1: /lib/aarch64-linux-gnu/libm.so.6: version ' not found (required by /usr/lib/gcc/aarch64-linux-gnu/8/cc1)
/usr/lib/gcc/aarch64-linux-gnu/8/cc1: /lib/aarch64-linux-gnu/libc.so.6: version `' not found (required by /usr/lib/gcc/aarch64-linux-gnu/8/cc1)
make: *** [Makefile:15: chiaharvestgraph.o] Error 1
How can this be fixed?

That seems a missing library, try running the following commands to fix this:
sudo apt-get update sudo apt-get install libc6

With that library installed, it's still not possible to compile on Raspberry Pi 4:
~/chiaharvestgraph$ make
cc -D_POSIX_C_SOURCE=200809L -std=c99 -Wall -Wno-missing-braces -g -O  -c chiaharvestgraph.c -o chiaharvestgraph.o
make: cc: No such file or directory
make: *** [Makefile:17: chiaharvestgraph.o] Error 127

Check which c compiler is installed.
$ CC=clang make
Could work, or else:
$ CC=gcc make
Provided that either clang or gcc is installed. If not, try:
$ sudo apt install gcc
On Tue, Aug 9, 2022 at 10:26 AM Pablo García de los Salmones <
@.***> wrote:

With that library installed, it's still not possible to compile on
Raspberry Pi 4:
~/chiaharvestgraph$ make
cc -D_POSIX_C_SOURCE=200809L -std=c99 -Wall -Wno-missing-braces -g -O  -c chiaharvestgraph.c -o chiaharvestgraph.o
make: cc: No such file or directory
make: *** [Makefile:17: chiaharvestgraph.o] Error 127
—
Reply to this email directly, view it on GitHub
https://github.com/stolk/chiaharvestgraph/issues/36#issuecomment-1209661822,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AADPE4CL7SXWETOS6ICZWKDVYKIGFANCNFSM46YQMGWA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

--
Owner/Director of Game Studio Abraham Stolk Inc.
Vancouver BC, Canada
@.***


fix(resetStore): fix resetStore Action

@manavbp I noticed a couple things here:

[ ] disapatch is causing an error
[ ] ancientHistory is not interable (so maybe we just need || [] when defining...
[ ] There's a Tab.tsx error re: executeJavaScript

Beyond that seems like appropriate things are firing to me.


Add GitHub issue template

Shameless lifted from Redux, with some Sentry/Raven-specific edits.
cc @mattrobenolt @LewisJEllis

This change is

Review status: 0 of 1 files reviewed at latest revision, all discussions resolved.

Comments from Reviewable

Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


ng test is not run by the CI pipeline

It seems that the ng test command is not run by Circle CI. The goal here is to activate and to fix the tests because they are likely to be red

I think we can close this issue as the move to React is on going. This issue won't be accurate anymore

I don't think that move to react will prevent us to make and run unit tests or neither modify magically our pipeline. Even in react there is the need to have some unit tests runned in the CI.

Yup but that would be another way and probably another issue if we missed it


Add sphinx-extension GitHub topic

Hi! I arrived here from https://github.com/sphinx-doc/sphinx/issues/9861. I usually browse https://github.com/topics/sphinx-extension to discover new extensions, would be great to have this extension listed there :)

@astrojuanlu Thanks, that is an excellent idea! I added some tags and hope that GitHub will pick those up soon. Let me know if you have any more ideas on how to let people know about this extension! 😀

You can also send a PR here! https://github.com/humitos/sphinx-extensions/


Migrate Base64 decoding benchmarks to Benchmark.DotNet

The method StichingRequiredNoThirdCall would report incorrect stack size in the comparison table, but this is only way how I could keep all this 3 comparison in the same table.
Closes #2318

Can you please share the results of the benchmark?

/cc @adamsitnik @ahsonkhan would you take a look again?

@dotnet-bot test Innerloop Ubuntu16.04 Release Build and Test

@kant2002, let me know when you plan to address the feedback for this PR. Thanks for contributing :)

@ahsonkhan I try to settle my understanding what optimizer could do. Sorry for delay.


Make FormModel.types accessible publicly

This allows widgets or other extensions to add validation for custom data types.
Issue: #311

Of course! I like it! I may want re-arrange code, but will look later.

:+1:

Alex if this becomes a prototype property, it will still work for you, right?

Would I just change this line:
https://github.com/alxndrsn/medic-webapp/blob/901e858912365962a0a5f419a627826908b6cd65/static/js/enketo/widgets/phone-widget.js#L19
to read
FormModel.prototype.types.phone = ...

or would I need to apply the type changes to each instance of FormModel via e.g. myForm.getModel().types?

Yes, I think so too. This should better as you won't have to changes the instances. I'll merge this now.

Great, thanks!

thank you


Switch from submodule to using source repository for car_demo

Feature request
Description
Using git submodules makes it hard to manage branches and forks for the repository hosting them as well as for the submodule'd repositories. With the switch to using vcs to manage Autoware as a multi-repository project, we no longer need to rely on submodules. We should therefore remove the car_demo submodule and replace it with an entry in the .repos file. Additionally we need to start using the upstream repository and contributing back to that rather than relying on our own fork.
Implementation considerations
The current autoware.repos file contains an entry for car_demo, but it points at the CPFL fork. This needs to be changed to point to the upstream repository and any changes made added to that via pull requests. The submodule entry in the autoware repository needs to be removed.
Alternatives
None.
Additional information

Fixed at GitLab.


v.5.7 Entities Randomly Move Their Heads

Entities randomly move their heads
MCretor v. 2024.1
Plugin v. 5.7
No other plugins installed!
https://github.com/NerdyPuzzle/MCreator-Nerdys_Geckolib_Plugin/assets/166229741/2d383d0c-a4d6-47e6-bbee-278623442c45
https://github.com/NerdyPuzzle/MCreator-Nerdys_Geckolib_Plugin/assets/166229741/1aa8053e-c8d0-4dc1-9e03-b8eea2212dae

Fixed


Better Error Reporting in Imports

If an import fails, there usually isn't a way to see that it has failed, nor is there a way to tell what the error was.
We need to catch errors and report them to the user.

Looking into this one

Stopped looking at this for now

The new endpoint to check on a task (https://github.com/ibutsu/ibutsu-server/blob/master/backend/ibutsu_server/controllers/task_controller.py) will be useful for this one.


Flutter Requires Kotlin Version 1.3.0

The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher. The following dependencies do not satisfy the required version: project ':flutter_native_admob' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71

same issues.


Support Solana minor versions

Based on the current cargo dependencies, it's a bit confusing which minor versions aresupported per each solana package.
This PR intends to give support to all 2.1 minor versions and avoid conflicts when using latest version.
Feel free to close the PR if you don't find it convenient or due security or compatibility.
Cheers

closing PR due possible incompatibilities


Simplify SharedFd close logic

Currently, the SharedFd close logic is needlessly complex. The logic within SharedFd that prevents a Fd from being closed while any IO operations are in-flight is unnecessary because the rust borrow checker already enforces this.

See this comment for an explanation of why this makes sense.

See this comment for an explanation of why this makes sense.

Those examples might be clear to you, but they aren't to me. Do I really have to dig through the details of each to get the points you are making or is there a way you can highlight which lines I, or any reader, should focus on?

I just got confirmation from the liburing team that it is racy to close a fd while in-flight operations may be working on it. They call it lazy file reference and I take that to mean they don't increment the reference when the SQE is first read, but only later, when they get around to start doing the work.  https://github.com/axboe/liburing/issues/782#event-8454026137
So our blocking safeguard on the close makes some sense. When we are trying to keep the user safe from themselves.
And I think

Currently, the SharedFd close logic is needlessly complex. The logic within SharedFd that prevents a Fd from being closed while any IO operations are in-flight is unnecessary because the rust borrow checker already enforces this.

is plan wrong. The rust borrow checker does not help us with tracking when operations have actually completed.
There are a number of ways a Future can be started and not waited for. And a File can be shared between tasks on the same thread, one for reading, one for writing, as an example. Either can call close. Is it a programming error to close while another operation may still be operating on it? Probably yes. But the compiler doesn't help us avoid that. The use of reference counts does.
But if some user wants to go into unsafe territory, I don't think this crate should block them. The question becomes, what would make for an elegant unsafe API to offer in addition the API that is developing for safe/easy use?

@FrankReh I should clarify my thoughts, but please correct me if I am saying something completely wrong. The phenomenon that I was trying to show with my examples is that the public facing API that tokio_uring exposes to users is the File type (and similar). As far as I can tell, the only time that a File (and similar) actually clones its SharedFd is in the (read_at, write_at, etc) operations. In all of these cases, we await the operation. Thus, the lifetime of the SharedFd clones is that same as the lifetime of the reference to &File held by the async method. In safe rust, it is impossible for library users to call File::close while an operation is still in progress (regardless of whether or not they await the result of the operation). So, the race condition:

it is racy to close a fd while in-flight operations may be working on it

should be impossible for library users to hit without unsafe code.

I just got confirmation from the liburing team that it is racy to close a fd while in-flight operations may be working on it. They call it lazy file reference and I take that to mean they don't increment the reference when the SQE is first read, but only later, when they get around to start doing the work. https://github.com/axboe/liburing/issues/782#event-8454026137

Thanks for reaching out btw. This is very useful to know :). Since the current implementation doesn't really impede what we are working on (fixed fds, into_raw_fd, uring_cmd, etc), l'm fine to close this and focus on other PRs.

should be impossible for library users to hit without unsafe code.

@thomasbarrett That is not correct. Safe code allows starting a future and then not waiting for it to complete, see the select! macro.
Also, I have been able to make copies of a File by wrapping in Rc<RefCell<_>> so that two tasks could operation on the same File. Both task running on the same thread. One task could be waiting for an operation of the File and the other could be trying to close it.

Also, I have been able to make copies of a File by wrapping in Rc<RefCell<_>> so that two tasks could operation on the same File. Both task running on the same thread. One task could be waiting for an operation of the File and the other could be trying to close it.

@FrankReh, while that is true for most operations, it does not apply to close. Close is special in that it takes ownership of the file. The rules of safe rust ensure that if close is called, there must not be any references (mutable or immutable) to File still in scope, regardless of whether or not those references are in another thread, another task in the same thread, in an rc, in a refcell, etc. If you have a counter-example, please share it.
    pub async fn close(self) -> io::Result<()> {
        self.fd.close().await
    }

So is it enough that futures can be dropped while an operation is outstanding or is there more worth investigating?

Awesome! Glad we are on the same page :) I spent a lot of time scratching my head over this one :P. I believe that this is all that needs to be done. I ran the CI pipeline on my fork, and all tests pass. Running this branch on my own project w/ more complex setups and a lot of logging also didn't raise any alarms.

Hmm... there is more worth investigation. Notably, this implementation still suffers the same issue as the current implementation. When a future that is in-flight is  dropped (cancelling), it isn't synchronously deleted. It still holds a reference to a SharedFd until the "cancelled" operation completes. See this issue for an example.
On this branch, this behavior results in panic!. On the current implementation, it causes the SharedFd implementation to "hang"

Closing this PR to reduce noise.


ok...

I have the windows release. I installed and it created the config.toml. I filled out my labels.
I have my Clockify API, Workspace ID, and Project IDs.
So the dumb question, where do I put all of that? Once I fill out the labels on the config.toml, where should I put it and where do I put the API and IDs.

Did you run the program with the --setup flag? When you run that it will ask which site you want to use and then the rest of the data needed(api key, workspace id etc)

Ok. I have that part running and I can see in cmd that it is tracking when I turn the timeular and the labels are matching. I have the API in the config.toml now, as well as the workspace_id so something is working because it can definitely track the cube. I don't see any of it in Clockify though so now I think I am missing something there?
Second, do I need to run this every time for it to actively track? Where should the .exe and config.toml be stored going forward, right now they are just in my Downloads folder.

The exe and config have to be next to each other, other than that you're free to store it wherever you want. As for autostart you will need to create that manually, maybe this will help you https://stackoverflow.com/questions/76766511/how-do-i-automatically-have-a-command-run-from-my-windows-10-command-prompt-when


Feature/world info v2

Messed up with #8, so here's the changes again in a new pull request. Sorry for the inconvenience.
Added functionality for world info/lorebooks. Information will be added into your context regex keys find a match in a selected range of your prompt.

Also added an option for context ordering that allows you to modify how the different contexts will be assembled.

Nice job, it looks great!
I noticed a small problem in the context order text area, it looks really small to me:

Also, I think the grid would be better with border lines:

Style issue should be fixed now, and I removed tokenRatio from the session storage.

The context order textarea still looks broken to me, looks like a problem related to the CollapsibleGroup. Weird that this doesn't happen to you.

The context order textarea still looks broken to me, looks like a problem related to the CollapsibleGroup. Weird that this doesn't happen to you.

The wonders of CSS.
Anyways, thanks for the review. Suggestions committed.

I think evverything should be fine now, thank you for the contribution!

@neCo2 No worries whatsoever, my life got busy. Every time I remembered that PR, I felt bad for abandoning it; happy to see someone fully fleshed it out :)


Enterprise Admin account Required

I learned the hard way that we need enterprise admin access to configure the MFA Server. In other words, Azure AD: Domain Services is not supported at the moment.

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

ID: 75965afd-b39c-5bf0-bc9a-7520bddfd4af
Version Independent ID: be56aebb-04fb-0518-017f-5a7115c8038b
Content: Getting started Azure Multi-Factor Authentication Server
Content Source: articles/active-directory/authentication/howto-mfaserver-deploy.md
Service: active-directory
GitHub Login: @MicrosoftGuyJFlo
Microsoft Alias: joflore

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

What do you mean? Azure Active Directory Domain Services is used to join Azure virtual machines to a domain without having to deploy domain controllers. You still need enterprise admin access to configure the MFA Server, and you can grant this access to yourself.

This is an unsupported scenario. If you would like to request this, please post to Azure product feedback: "If you recently added a Windows 2016 DC, make sure to refresh your AAD Connect directory schema."

Hi Marilee,
What I mean, is that there is a undocumented requirement and I an reporting
that is is undocumented so the requirement can be clearly highlighted in
the documentation.
Please reopen and update the documentation to include the requirement for
enterprise admin rights.
On Wed, Aug 29, 2018, 6:59 PM Marilee Turscak - MSFT <
<EMAIL_ADDRESS>wrote:

Closed #14214 https://github.com/MicrosoftDocs/azure-docs/issues/14214.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/MicrosoftDocs/azure-docs/issues/14214#event-1816897088,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AO83gH_HytmuFvPS-o7Jg3djnNW-NEWJks5uVxzFgaJpZM4WSBLe
.

How is my request related to deploying a windows 2016 DC?
I already submitted feedback for this scenario.
Also, I am attempting to improve the documentation, so the requirement for
enterprise admin rights is stated as a requirement.
On Wed, Aug 29, 2018, 6:59 PM Marilee Turscak - MSFT <
<EMAIL_ADDRESS>wrote:

This is an unsupported scenario. If you would like to request this, please
post to Azure product feedback: "If you recently added a Windows 2016 DC,
make sure to refresh your AAD Connect directory schema."
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/MicrosoftDocs/azure-docs/issues/14214#issuecomment-417134180,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AO83gH_HytmuFvPS-o7Jg3djnNW-NEWJks5uVxzFgaJpZM4WSBLe
.

@jonwbstr shoot me an email and we can figure this out. My email is in my profile.


DeclareTableVariableStatement statements cannot be covered, so report falsely as missing coverage

The statement type DeclareTableVariableStatement cannot be covered and does not appear in the extended events files so causes a false report of uncovered code. It should be added to the cases in StatementParser.CanBeCovered.

cool i'll add this when I do the next build :)

Great, thanks!

The pull request accepted yesterday resolves this issue, so this can now be closed.


I required gem declaration in _config.yml

Thanks for the awesome plugin. Before I could get Pug to compile for my Jekyll site I had to ensure that in my _config.yml file I had declared the gem.
Like so:
gems:
- jekyll-pug

Maybe that will help the next person if it makes it into the docs. I didn't want to make a PR without knowing if my situation was unique or not.

Hi, Eric! Happy to hear the plugin is helping you out!
You shouldn't be required to declare the gem though. I just ran a test project and I didn't have to do that.
Step 1.) Create a file named Gemfile with the following content:
source "https://rubygems.org/"

group :jekyll_plugins do
  gem 'jekyll-pug'
  # Add other Jekyll plugins you are using below this line.
end

Step 2.) Create your index.pug file.
h1 Welcome to Jekyll-Pug!

Step 3.) Run the command bundle install
Step 4.) Run the Jekyll server with jekyll serve.

Well of course it works now that you looked at it...
Perhaps my actually updating bundler helped. Thanks anyway!

Glad the issue is resolved! If you ever publish a site written in Jekyll-Pug and want to share it, we started a thread to do so here. Once there's a decent list of 2 or more sites, they will be featured in the docs.


Added functionality, Generate Workout Btn take precipitation and disp…

…lays correct modal

I'm not sure why this says this branch has conflicts that must be resolved.


Be able to batch create files ?

Hi !
I'd like to know if it would be possible to create multiple files with this plugin ?
Currently, when you add new lines and then run :Ren, you get the following message :
Dir contains 10 writeable files, but there are 12 listed in buffer.  These numbers should be equal
It would be awesome to have this feature !
If you think it's not possible, do you know an alternative to do that by any chance ?
Thanks for your help !

Hey - sorry for not getting back to you.
I hear you on this feature - but I'm not sure about the details.  If there were 10 files in the directory initially, but 12 when you hit :Ren - can it be assumed that the last two filenames should be created from scratch, and the first 10 should be renamed?  What if someone accidentally inserts an extra file in the middle of the list - the script would renamer everything after it incorrectly.
I certainly hope you solved all your problems - but out of curiosity, a little playing around yielded this snippet, to be run from the vim command line when your buffer contains a list of file names to create:
:for f in getline(1,'$')|call writefile([], f)|endfor

Closing as too slow to respond (even by my standards!)


Add a config option as well.

Config option would take the file name along with relative path which would be processed for data set generation.

Shift this to an argument


[ui2] Gallery sequence initialization problem

In ui2 at the moment, when I click on "Gallery" in the top bar, the Gallery page opens up but three of the options (Latticework, Residue Rise, and Chaos Game) list their sequence as "uninitialized random integers". At a quick guess, there's some kind of race condition between the sequence initializing and those subheadings being displayed (after all, the thumbnails are running fine, so the sequence must be initialized before that happens).

All Gallery items are now showing their proper sequence descriptions in ui2, thanks to #420. Closing.