Query satisfied with value from unrelated key

Hello!  Thanks for the amazing work on this crate!  I'm super excited to be able to use this crate in one of my projects.
In trying to utilize the crate though I think I've found a bug with how queries work.  I believe simple queries such as<EMAIL_ADDRESS>== 74)] will be "satisfied" by values from unrelated fields.
For example, see the following gist: https://gist.github.com/silverjam/b73c6c8ff3f6f5a20e59ad17e234346f
This runs the following code:
fn main() {
    let val = serde_json::json!({"msg_type": 75, "sender": 74});
    let q =<EMAIL_ADDRESS>== 74)]").unwrap();
    let res = q.query(&val).all();
    assert!(res.is_empty(), "query should be return no results: {res:?}");
}

You'll note that the query finds the 74 value from the sender key even though the query should only be against the msg_type.  I'm very new to JSONPath, but I don't think this is intended behavior.
The following modification works though (that is, changing the query to $.msg_type[?(@ == 74)]):
fn main() {
    let val = serde_json::json!({"msg_type": 75, "sender": 74});
    let q = serde_json_path::JsonPath::parse("$.msg_type[?(@ == 74)]").unwrap();
    let res = q.query(&val).all();
    assert!(res.is_empty(), "query should be return no results: {res:?}");
}

I'd love to be able to help fix this bug if you don't have bandwidth, so if you can provide pointers on where to look I'd be happy to help (if I'm able).

I'm able to work around this issue by wrapping the value in a list, so maybe I'm doing something that JSONPath doesn't expect:
fn main() {
    let val = serde_json::json!([{"msg_type": 75, "sender": 74}]);
    let q =<EMAIL_ADDRESS>== 74)]").unwrap();
    let res = q.query(&val).all();
    assert!(res.is_empty(), "query should be return no results: {res:?}");
}

Hey @silverjam - thank you for raising the issue! That certainly looks like a bug and I am able to replicate it in the sandbox. I am open to pull requests; however, I haven't set up a CONTRIBUTING.md yet to help people get started. Either way, I think I can get some time later this week or weekend to dig into this.
As far as my knowledge of JSONPath is concerned, given the input:
{"msg_type": 75, "sender": 74}

The query string<EMAIL_ADDRESS>== 74)] should produce an empty node list.
I would argue, given the structure of the JSON, that the query is malformed, but that does not negate the fact that serde_json_path is producing false positives here. I'll try to shed a bit of light on JSONPath and what is going on with the queries you have tried...

In this first case producing the bug, we are applying the filter ?(@.msg_type == 74) to the root node $ of the object. As per the JSONPath Spec, when a filter is applied to an object node, it will test against each object member value. So, the filter will be tested against two nodes here, for which the current node specifier @ will refer to the values 75, and then 74, respectively; in either case, neither is an object with the key msg_type, so the filter should not produce anything.
In your second example, the query $.msg_type[?(@ == 74)] is applying the filter ?(@ == 74) to the node located in the msg_type field of the root object. In this case, that node is the JSON number 75. Since filters only work on nodes that are JSON arrays, or JSON objects, then this will result in an empty node list.
Unfortunately, in the above two examples, the spirit of JSONPath is not to produce helpful error messages or warnings for malformed queries, but to just produce an empty result.
In your final example, when you change the input to an array, i.e.,
[{"msg_type": 75, "sender": 74}]

Then the query works as you might expect. Now, the root node $ is the array, and the filter is being applied against each array element; and indeed, each array element is an object with the key msg_type. So that is re-assuring.
That final case is a more typical use case for JSONPath filters: you have an array of similar objects somewhere in the root node and you want to filter them down based on some criteria. If you want to elaborate more on your particular use case, and why you are using JSONPath, I'd be happy to discuss here.
In the meantime, I will go looking into why it is producing false positives, and see if I can get a fix in.

Hey @silverjam - I believe I have the fix in #50. All tests are green, so I should be able to release before the week is out, but feel free to take a look / review if you'd like.
Thank you again for raising the issue, and for putting in the time to share all the details that you did.

Cheers! 🙌


Install RVM

RVM should be installed https://rvm.io/

It should use $HOME for rubies and gems.
gem command should not use sudo in .aliases.
The installation should be a one-time run thing, but it can't be in .brew.
The update alias should update rvm as well.

Bonus: Nice way of updating ruby and gem versions when needed.

Using rbenv now.


Cannot install using pip on Mac High Sierra

Error message -
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/utils/init.py", line 267, in renames
shutil.move(old, new)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 299, in move
copytree(src, real_dst, symlinks=True)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 208, in copytree
raise Error, errors
Error: [('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', '/var/folders/11/6w3_ghcs1jb421bdwv9vhc8m0000gn/T/pip-X7du9E-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', "[Errno 1] Operation not permitted: '/var/folders/11/6w3_ghcs1jb421bdwv9vhc8m0000gn/T/pip-X7du9E-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/init.py', '/var/folders/11/6w3_ghcs1jb421bdwv9vhc8m0000gn/T/pip-X7du9E-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/init.py', "[Errno 1] Operation not permitted: '/var/folders/11/6w3_ghcs1jb421bdwv9vhc8m0000gn/T/pip-X7du9E-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/init.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', '/var/folders/11/6w3_ghcs1jb421bdwv9vhc8m0000gn/T/pip-X7du9E-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', "[Errno 1] Operation not permitted: '/var/folders/11/6w3_ghcs1jb421bdwv9vhc8m0000gn/T/pip-X7du9E-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/init.pyc', '/var/folders/11/6w3_ghcs1jb421bdwv9vhc8m0000gn/T/pip-X7du9E-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/init.pyc', "[Errno 1] Operation not permitted: '/var/folders/11/6w3_ghcs1jb421bdwv9vhc8m0000gn/T/pip-X7du9E-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/init.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', '/var/folders/11/6w3_ghcs1jb421bdwv9vhc8m0000gn/T/pip-X7du9E-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', "[Errno 1] Operation not permitted: '/var/folders/11/6w3_ghcs1jb421bdwv9vhc8m0000gn/T/pip-X7du9E-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib'")]

Fixed! Just had to install the LATEST version of Python 2.7! Thanks! Looking forward to exploring this cool library! 🥇

Glad you fixed this, @refayathaque!


Limit results and scroll to load more

This is best exemplified with the select2 https://select2.github.io/examples.html#data-ajax
You should be able to limit a returned dataset and load more dynamically as the user scrolls to improve performance. If a user searches "Dave" and there are 1800 "Dave"s registered in your dataset, you wouldn't want to return 1800 results to the client.
I note that 2.0.0 roadmap has existed for some time and has some thought to this - I think it deserves to be an issue of it's own.
Detecting Scroll:
You could do this using the scroll position, or you create a

 which is at the end of the select results, when the user scrolls such that the div is visible, trigger the loading of the next page of data. Just an idea.

So we consider limiting results to be the servers job, not the plugins.  That may change in the future but its unlikely.  I don't see a real world where you need paging in this plugin.  If there are that many results that are identical, then type a little more to narrow it.  Instead of doing simple indexOf or LIMIT SQL searches, do fuzzy searches on the server.
I'm not likely to add this to the plugin, you're welcome to try and convince me of a really good reason for it but it also means we have to deal with paging data and that I'm not thrilled about.  We don't control the actual select that's rendered.  We give that control back to bootstrap-select once we are done updating the options in the original select tag.  Its not simple to just add a div because we aren't the ones rendering the custom html, bootstrap-select is.

This duplicates #32

means we have to deal with paging data and that I'm not thrilled about

Neither am I.

We don't control the actual select that's rendered.

Yep. This, unfortunately, goes outside the scope of this project.

It's a matter of user understanding, if a user searches "Dave" and gets 10 results, doesn't find the "Dave" they are looking for, they may assume that "Dave" is simply not registered in the database. Your situation of searching more to narrow assumes the user understands their results are being limited for optimisation, not because of lack of data.
An alternative would be having a way of displaying "Showing 10 of 1500 possible matches" at the bottom of the rendered dropdown. This way you don't have to do paging, but you do tell the user to filter some more to get the specific "Dave" they are looking for.
Another use case is for selects that are initialised with options.emptyRequest = true to give the user the standard select workflow of opening the select and scrolling through potential options.

I have a feeling this isn't going away. I'll re-open, but only as a discussion to see how feasible this truly would be.

No promises. Paging, especially when dealing with AJAX/autocomplete, can be a huge PITA.

Well, as you're handing off rendering to bootstrap-select and it has no dropdown scrolling events added in you'd probably have to hack in your own event trigger or your own markup - neither are ideal. You push in the statusContainer, so you could use that to display the "Showing X of Y possible matches" text which is the half way house of not much work, but clarifying the situation for the user.

Anything is possible. Yes, we could separate message for the status container; that isn't the issue.
The issue revolves around handling scrolling + adding/removing elements based on scroll.
I can assure you, this topic is far more complicated than you may realize.

So if I'm write the cache must store an array of results associated with the search string entered to provide those results, when you scroll you don't need to remove the previous results, just append the new ones (so pull your previous X results for search STR and append Y results). Use a method similar to dataTables where you have to pass back the "page" number (or "draw" in their case) which can be used to detect whether you already have cached results for page N.

when you scroll you don't need to remove the previous results

Common misconception.
To do infinite scrolling, properly, one has to be conscientious about what the impact of adding DOM elements to the page will be. Even more so if there any assets that require storing the resource along with it, like images.
Simply "just appending" DOM elements can have serious animation performance issues if there is any transitions/transforms involved on the dropdown or its items.
Never mind actual browser or device limitations.
However, the real performance hit is one that many don't even consider: adding DOM elements can actually impact other JS loaded on the page (which also traverses said DOM). If those JS plugins/apps not optimized properly (which many plug 'n play ones aren't because they only think of themselves), this change would likely and inadvertently cause more (harder to track) problems than it originally intended to solve.
This is actually why this project exists in the first place. If you have ever attempted to load the parent plugin where a select element has hundred/thousands of options, it can lock up the browser (or appear to rather) because it takes so long for all the DOM manipulation to complete.
If this were something like twitter.com or facebook.com, where we had complete control over the entire DOM, then appending would likely be fine (but even they eventually remove DOM elements to account for above mentioned browser/device limitations).
This is a plugin, we don't control the entire DOM, just parts of it. We would most certainly have to manage adding/removing items based on current scroll position.
I actually have some experience on this topic as I have actually attempted to implemented this in a JS based git patch review tool where the DOM is manipulated constantly to handle a multitude of performance related issues when dealing with "varying content" like this:
https://github.com/unicorn-fail/dreditor-ui/blob/master/src/js/Infinity.js
https://github.com/unicorn-fail/dreditor-ui/blob/master/src/js/InfinityItem.js
Like I said, this is far more complicated than you realize.

Also to add on to this we don't actually control any of the dom other than the options in the original select which is hidden.  Bootstrap-select even renders the the textarea for search, we just strip all their event listeners and add our own to take control.  When we get results we replace the options in the select and call refresh on bootstrap-select.  We never render visible dom contents onto the page, bootstrap-select does.
So knowing that, in addition to having to add rendering, we would also have to trigger the right event on select because bootstrap-select wouldn't be rendering the rendered option we would, so we would have to trigger the change event.  On a mult-select we would have to render the checkbox denoting this was selected.  It's just out of the purview of this plugin which is meant as essentially an add-on for bootstrap-select, not a replacement.

I'm going to close this if you want to limit the results shown either do that on the server or in the preprocessData option.


Can't run a configuration file from the summary screen.

Dev Home version
0.18
Windows build number
No response
Other software
No response
Steps to reproduce the bug
Clone DevHome.
In the summary screen select "Run file"
Expected result
UAC prompt to launch CMD as admin.
Actual result
Nothing.  No message either.
Logs say System.ComponentModel.Win32Exception (1726): An error occurred trying to start process 'winget' with working directory 'C:\WINDOWS\system32'. The remote procedure call failed.
Seems like an OS change.  The same version works with no issues on my personal computer.
Included System Information
No response
Included Extensions Information
No response

I'm closing this as it is not a DevHome specific issue.
Here is a simpler repro.
    static void Main(string[] args)
    {
        var processStartInfo = new ProcessStartInfo();
        processStartInfo.UseShellExecute = true;
        processStartInfo.FileName = "winget";
        processStartInfo.ArgumentList.Add("configure");
        processStartInfo.Verb = "RunAs";

        Process process = Process.Start(processStartInfo);
    }


extract.include symlink problem

When working from a monorepo with pnpm (which uses symlinks for package management) and requiring package A from package B, and pointing extract.include to include node_module package A, the following occurs.
Initial load works. But when using HMR, WindiCSS works for changes in package B, but not for changes in package A.
When pointing pointing extract.include to package A directly (not using the symlink, so like ../packageA/**/*.{html,js}) and using HMR, WindiCSS also updates changes in package A.
Maybe the included path/globs kan be turned to realpaths before using passing it on for scanning? But then, I don't have sufficient knowledge of this code base and have not considered possible consequences.

I am having symlink problems too using vite-plugin-windicss.
Everything works on dev, but building makes things on the package inside node_modules not being extracted


nixos: properly disable sound by default, if stateVersion > 18.03

Motivation for this change
#35355 done properly:

no breaking of existing configs,
no sneaking in any PulseAudio-related changes.

 I made a minimal possible change that doesn't break anything existing. Lets refactor (and break custom .merge for custom types) later if anyone cares.
Closes #35319 and closes #35355.
Things done

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

[X] NixOS
[ ] macOS
[ ] other Linux distributions

[X] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[X] Fits CONTRIBUTING.md.

I've merged #35355 in favour of the sound changes here but I do love the warning about missing stateVersion. :+1:
/cc @nbp if this approach is the right one to accomplish this.

Maybe just quietly rebase it to add all the warnings? I don't use any NixOS-derived code for sound configuration
, so I could check for sanity and merge, but won't rebase myself.

@7c6f434c I would, but I agree with @edolstra in that stateVersion is not a best variable to bind this to. NixOS needs configVersion.

Any updates on this pull request, please?

Closing because 18.03 is pretty old.


Default sheet

Hi there!
That's very handy addon for Laravel! I am trying to figure out is there a way to set default opened sheet for xlsx file (it always opens last created sheet)?

Don't think there is, sorry.

still no way for this? any way for it to open the first sheet instead?

These questions should be asked at the parent package PHPExcel. These core functionalities are not something we can add.

Actually this seems to work:
$excel->setActiveSheetIndex(0);
Seems like the index is being set internally when rendering here - https://github.com/Maatwebsite/Laravel-Excel/blob/2.1/src/Maatwebsite/Excel/Writers/LaravelExcelWriter.php#L486


Synchronizing events

Hello! Currently metal-rs provides no APIs to synchronize GPU/CPU work (like MTLEvent and MTLSharedEvent, example: Synchronizing Events Within a Single Device).
Would it be ok to open a PR to support that?

Yes, it would be great to have!


review comments from LWG small group on 2022-12-13

Sender queries are moved into a separate queryable "attributes" object that is accessed by passing the sender to get_attrs(). The sender concept is reexpressed to require get_attrs() and separated from a new sender_in<Snd, Env> concept for checking whether a type is a sender within a particular execution environment.
The placeholder types no_env and dependent_completion_signatures<> are no longer needed and are dropped.
ensure_started and split are changed to persist the result of calling get_attrs() on the input sender.

see NVIDIA/stdexec#641

@tomaszkam moving the sender queries into a separate environment-like object is a non-trivial change, but it's a good one IMO. Do you think you could give this a look-over?

see NVIDIA/stdexec#641

I reviewed the parts that we already went through in small groups and they look ok. I skimmed the rest and found nothing glaring.

Couple questions

Do we need get_attrs to be aware of awaitables (e.g., like get_completion_signatures's awareness of awaitable types)? Should get_attrs(s) return empty-attrs when s is awaitable?
How do the senders returned from algos like then or let_value interact with get_attrs? It wasn't clear whether std::forwarding_query or a similar "forwarding" mechanism applies in these cases (I might have missed where this is specified in the updated text).

How do the senders returned from algos like then or let_value interact with get_attrs? It wasn't clear whether std::forwarding_query or a similar "forwarding" mechanism applies in these cases (I might have missed where this is specified in the updated text).

Ok, I found the answer under "<IP_ADDRESS> [exec.adapt.general]:"

Unless otherwise specified, all sender adaptors that accept a single sender argument return sender objects that delegate get_attrs to that single sender argument...

Do we need get_attrs to be aware of awaitables (e.g., like get_completion_signatures's awareness of awaitable types)? Should get_attrs(s) return empty-attrs when s is awaitable?

If it doesn't implement get_attrs itself, then yes I think so. Nice catch, thank you.


Test Tour: Angular 2 getting started (TypeScript)

Follow https://angular.io/ in Code.
Setup the project

tsconfig.json
install the chrome debugger extension and debug angular2

@Sofian any findings, observations?

Everything worked as expected, intellisense, debugging, etc..


not full code

sorry bro this is not full code
where is ........include '../vendor/autoload.php';  ....this file ?

It`s composer package. You need install package in your project:
composer require idg/idg

Composer generate vendor dir and autoload file.


TODO Next Round

Add helpers...

[x] to check NAs (row, col, and full df)

Add testing...

[x] to throw error if a col (or more than one) contains all NA; making up data at that point. Suggest use of pre-processing function (below) to drop these columns based on some percentage set by the user

Add pre-processing options, e.g.:

[ ] cleaning to drop columns with more than X% missing values (optional argument)
[ ] cleaning to separate demographic features from all others (optional argument)
[ ] cleaning to define dropped subset of data, minus above two subsets of columns

Add post-processing options, e.g.:

[x] join imputed sets (minus demographic features, if selected in pre-processing) with demographic subset (optional argument)

made relevant changes and avoided suggestions that don't make sense. Also, not included on this list of suggestions is the addition of the evaluative mad() scores metric. Included in latest release (v0.2.1)


Add missing pragmas

Opening up a PR to collect chunks of commits addressing issue #4349.

Thanks @erikmaarten, other than the one comment about the switch statements, this looks good to me.
Does anyone else want to take a look at this?  It's possible that some of these errors should really be RuntimeError, but we can re-evaluate that in a future separate issue.

On an unrelated note, in this PR or a separate one, can you add yourself under the AGI section of Contributors.md?  Thanks.

That's the only comment I have, everything else looks good.  Thanks @erikmaarten!

@mramato @hpinkos Thanks for the review, I've addressed comments in one commit, then added the rest of the missing pragmas in commit b857e23.

It's possible that some of these errors should really be RuntimeError, but we can re-evaluate that in a future separate issue.

At quick glance, nothing worth changing right now.
Nice job, @erikmaarten!

@pjcozzi Do you mean a doc comment like in f2d0b2d? If so, I think this is ready.

Thanks @erikmaarten I think that's what @pjcozzi had in mind.

:+1:


[requires.io] dependency update on master branch

Current coverage is 96.82% (diff: 100%)

Merging #8 into master will not change coverage

@@             master         #8   diff @@
==========================================
  Files             6          6
  Lines           409        409
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
  Hits            396        396
  Misses           13         13
  Partials          0          0

Powered by Codecov. Last update dfb557a...f51fccd


createReducer with optional slice parameter

Adding the slice as an optional parameter to createReducer allows the slice to be defined once (in the reducer) and reused within combineReducers and selectors.

Closing this on the grounds that it's stale.


browser must be set to 100% for completion but it is

Challenge Name

Issue Description

Browser Information

Browser Name, Version:
Operating System:
Mobile, Desktop, or Tablet:

Your Code

Screenshot

browser must be set to 100% for completion but it is


Add HasSameTypeDefinition

Helper function for identifying types that are similar

Hi @davidwrighton, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.
TTYL, DNFBOT;


what-if doesn't show all resources in a new deployment with multiple modules

Describe the bug
My deployment deploys 4 resources. What-if only shows 2.
To Reproduce
Steps to reproduce the behavior:

Open Powershell
Make sure you're logged into Azure with the CLI, and have an active subscription
Follow the commands below. Note the -w switch on the last line

git clone -b topic/whatif-1 https://github.com/jcoliz/AzDeploy.Bicep
az group create --name whatif-1 --location "West US 2"
az deployment group create --name "WhatIf-$(Get-Random)" --resource-group whatif-1 --template-file .\AzDeploy.Bicep\Devices\iothub-dps-storage-upload.bicep -w

Result:
The deployment will update the following scope:

Scope: /subscriptions/768673ce-59ff-4109-9176-b8642424d38e/resourceGroups/whatif-1

  + Microsoft.Storage/storageAccounts/storage0003n4o2ni7ucvc6 [2022-09-01]

      apiVersion: "2022-09-01"
      id:         "/subscriptions/768673ce-59ff-4109-9176-b8642424d38e/resourceGroups/whatif-1/providers/Microsoft.Storage/storageAccounts/storage0003n4o2ni7ucvc6"
      kind:       "Storage"
      location:   "westus2"
      name:       "storage0003n4o2ni7ucvc6"
      sku.name:   "Standard_LRS"
      type:       "Microsoft.Storage/storageAccounts"

  + Microsoft.Storage/storageAccounts/storage0003n4o2ni7ucvc6/blobServices/default/containers/uploads [2022-09-01]

      apiVersion:              "2022-09-01"
      id:                      "/subscriptions/768673ce-59ff-4109-9176-b8642424d38e/resourceGroups/whatif-1/providers/Microsoft.Storage/storageAccounts/storage0003n4o2ni7ucvc6/blobServices/default/containers/uploads"
      name:                    "uploads"
      properties.publicAccess: "None"
      type:                    "Microsoft.Storage/storageAccounts/blobServices/containers"

Expected behavior
I expect all four resources in this deployment to be identified by the what-if invocation. Let's look at what happens when we actually deploy it:
az deployment group create --name "WhatIf-$(Get-Random)" --resource-group whatif-1 --template-file .\AzDeploy.Bicep\Devices\iothub-dps-storage-upload.bicep

    "outputResources": [
      {
        "id": "/subscriptions/768673ce-59ff-4109-9176-b8642424d38e/resourceGroups/whatif-1/providers/Microsoft.Devices/IotHubs/iothub-3n4o2ni7ucvc6",
        "resourceGroup": "whatif-1"
      },
      {
        "id": "/subscriptions/768673ce-59ff-4109-9176-b8642424d38e/resourceGroups/whatif-1/providers/Microsoft.Devices/provisioningServices/dps-3n4o2ni7ucvc6",
        "resourceGroup": "whatif-1"
      },
      {
        "id": "/subscriptions/768673ce-59ff-4109-9176-b8642424d38e/resourceGroups/whatif-1/providers/Microsoft.Storage/storageAccounts/storage0003n4o2ni7ucvc6",
        "resourceGroup": "whatif-1"
      },
      {
        "id": "/subscriptions/768673ce-59ff-4109-9176-b8642424d38e/resourceGroups/whatif-1/providers/Microsoft.Storage/storageAccounts/storage0003n4o2ni7ucvc6/blobServices/default/containers/uploads",
        "resourceGroup": "whatif-1"
      }
    ],

Client [e.g. PowerShell, CLI, API)
PS> az version
{
  "azure-cli": "2.43.0",
  "azure-cli-core": "2.43.0",
  "azure-cli-telemetry": "1.0.8",
  "extensions": {
    "azure-devops": "0.20.0",
    "azure-iot": "0.18.3"
  }
}

PS> pwsh --version
PowerShell 7.2.9

PS> systeminfo
OS Name             : Microsoft Windows 10 Pro
OS Version          : 10.0.19045 N/A Build 19045
OS Manufacturer     : Microsoft Corporation
OS Configuration    : Standalone Workstation
OS Build Type       : Multiprocessor Free
System Boot Time    : 4/1/2023, 9:07:34 AM
System Manufacturer : Gigabyte Technology Co., Ltd.
System Model        : B550I AORUS PRO AX
System Type         : x64-based PC
System Directory    : C:\Windows\system32
System Locale       : en-us;English (United States)
Hotfix(s)           : 18 Hotfix(s) Installed.,[01]: KB5022502,[02]: KB5000736,[03]: KB5012170,[04]: KB5015684,[05]:
                      KB5023696,[06]: KB5006753,[07]: KB5007273,[08]: KB5011352,[09]: KB5011651,[10]: KB5014032,[11]:
                      KB5014035,[12]: KB5014671,[13]: KB5015895,[14]: KB5016705,[15]: KB5018506,[16]: KB5020372,[17]:
                      KB5022924,[18]: KB5005699

@alex-frankel Thanks for having a look!


prevent duplicate tokens being added in adminJS

On a few different occasions now we have had instances of donations going missing because of duplicate tokens being added to the adminJS. We should create some checks and error conditions to prevent this from recurring.
We should check two conditions when a user is adding a new token for a given network and throw an error if true

the token SYMBOL already exists in the DB on the given network
the token address already exists in the DB for the given network

the error thrown should be descriptive depending on the condition that triggers it

i.e "This token symbol already exists for {network}", "This token address already exists for this network"

@RamRamez have you had a chance to investigate this issue?

[ ] I can create new token with a symbol that is already exist @RamRamez

but when I try to add token with address that is already exist on our db I got below error

@maryjaf those tokens you added are on different chains. This was scenario:
"the token SYMBOL already exists in the DB on the given network"
The error you showed is ok.
"(FYI We have a full page error for these scenarios and I couldn't customize the error page in adminjs)"

@maryjaf those tokens you added are on different chains. This was scenario:

now the Acs have bben passed .
Thanks @RamRamez