How to create project using Jinja & Yaml file

Hi,
As per below document, i have created Jinja and Yaml file. And my account has added the role role: roles/resourcemanager.folderCreator. And i also i have create SA and i did iam binding to add this role to my SA,.
When i tired to execute the below template in deployment manager it getting failed due to below error:
Reference URL for Jinja and Yaml file:
https://github.com/GoogleCloudPlatform/deploymentmanager-samples/blob/e22fd9592e5c3db15918e4ca0d10baa820851d5b/google/resource-snippets/cloudresourcemanager-v1/project.yaml
My code:
Folder.jinja
resources:

name: folders/{{ properties['folderid'] }}
type: gcp-types/cloudresourcemanager-v2:folders
properties:
parent: organizations/{{ properties['orgrid'] }}
displayName: {{ properties['displayName'] }}

Error:
message: '{"ResourceType":"gcp-types/cloudresourcemanager-v2:folders","ResourceErrorCode":"403","ResourceErrorMessage":{"code":403,"message":"The
caller does not have permission","status":"PERMISSION_DENIED","statusMessage":"Forbidden","requestPath":"https://cloudresourcemanager.googleapis.com/v2/folders","httpMethod":"POST"}}'
Note: However the same SA account is working in terraform code to create a project/folder. It is not working when in deployment manager.
Kindly advise me how to use the project creation Jinja/yaml file in GCP deployment manager.

Hi,
I would like to highlight the Cloud Foundation Toolkit - Project Factory template for project automation. It is well documented and tested and contains many functionalities you will likely wish to use for project automation.
Furthermore if you look up it's code (, schema and examples) you may find many implementation tricks you are looking for.
If you check the link, the read me has detailed prerequisites which may also help you.
To actually answer your question, can you please confirm, which SA you set the roles/resourcemanager.folderCreator role? My intuition says, you did not set the IAM role for the DM SA on the Organization level, so it cannot create a folder under the organization.

Find the Cloud Services service account associated with the DM Creation Project.
It is formatted as<EMAIL_ADDRESS>and is listed under IAM & Admin
in Google Cloud Console. This account is henceforth referred to as the DM Service Account. See https://cloud.google.com/resource-manager/docs/access-control-proj.

Ty, it is well documented.
Now i can do folder creation and project creation.
However i'm facing folder and project creation in single file using jinja, not by python.
Please see the issue:-
Hi Team,
I'm doing project factory automation in jinja file, However i faced issue while split the folder name and folder id from folder api. Please find the below steps for more details
step1: I have created a folder using below code and it is successfully created.
resources:

name: {{ properties['foldername'] }}
type: gcp-types/cloudresourcemanager-v2:folders
properties:
{% if properties['isorg'] == "yes" %}
parent: organizations/{{ properties['orgid'] }}
{% else %}
parent: folders/{{ properties['parentfolderid'] }}
{% endif %}
displayName: {{ properties['folderdisplayName'] }}

Step 2: once created i need the folder id to parse the value in parent->id of project.

name: {{ properties['projectid'] }}
type: gcp-types/cloudresourcemanager-v1:projects
properties:
projectId: {{ properties['projectid'] }}
parent:
type: folders
id: $(ref.{{ properties['foldername'] }}.name).split('/')[1]

I'm getting error that above split command, it is not working. Kindly assist me how to split the above value>
Example:
Output of Inline reference value for newly created folder name is : core/123456789
I want to split foldername is core and folderid is 12345678 with above jinja file.

TL;DR; You can't do string manipulation on references.
Unfortunately it is a known limitation of how deployment manager works.
The short advise is to manage folders and project from separate deployments.
There is a detailed thread with answers here: #353 .

HI Thank you,
I have created project based on this above python, However i unable to do billing link to the new projects while deployment manager.
Step1 :

DM service account (@cloudservices.gserviceaccount.com) has below roles

"Project Billing Manager,Billing Account User,Project Creator roles"
.

my deployment manager account (@<domain.com>) has also same privilege.

Other than Deployment manager it working fine with my personal account, as mentioned below,
When i use the gcloud command i can link the billing account to new project, Manually i can link it and also i tried to API call by google API url and it is working fine.
However when use same in deployment manager by yaml file it get failed due to permission issue. Since DM service account (@cloudservices.gserviceaccount.com) and personal account (@<domain.com>) is same roles, May i know why it failing due to permission.
Only differ is my personal account (@<domain.com>) mapped in billing admin group by Gsuite. However DM service account (@cloudservices.gserviceaccount.com) is not the gsuite group, so do we need to add this DM service account (@cloudservices.gserviceaccount.com) to billing admin gsuite group?

Since DM service account (@cloudservices.gserviceaccount.com) and personal account (@<domain.com>) is same roles, May i know why it failing due to permission.
I believe that is a misunderstanding how DM/IAM works. The Deployment Manager SA does not get any IAM permissions from you, or whoever triggers the deployment.

The DM SA is be default Project Editor within the project where the deployment is created. Above that, IAM permissions has to be added to that particular SA to perform actions. So if you want that DM SA manage something outside the project, like a Billing account, you need to set permission either directly or indirectly.
(Other Note: G-suite groups/Cloud Identity groups are are part inherited in GCP, so you can set IAM permissions to users or SAs via Group membership as well.)
Let me know if this cleared up your situation.

Apologies, i unable to get it, I need more details.

I have created demo org (for testing the automation)
I have created the sample project in the demo org (initial project for DM service account)
I have Linked the billing account of sample project in demo org
my Billing account it is in billing org.
My personal id has access to the Billing account and both org (demo and billing) with admin privilege.
I have created new project using above python code, However it is failing while linking the billing account to my new project in demo org.
When i try do link the billing to the new project in demo org by using my personal account it is working.
When i use API url of google https://cloud.google.com/billing/reference/rest/v1/projects/updateBillingInfo i tried with my personal account and it working.
However when i tried with python and yaml it is failing in deployment is failing due ti

My question is: Since My personal account and DM service account has same permission in IAM and project, May i know why it is failing in Deployment manager. Is there any role do i need to setup in IAM or do i need to add the billing admin privilage to my DM service account in Billing account and respective billing org? Or kindly advise me to sort out this issue.
Error:-
ERROR: (gcloud.deployment-manager.deployments.create) Error in Operation : errors:

code: RESOURCE_ERROR
location: /deployments/deploymentid01/resources/projects/
message: '{"ResourceType":"deploymentmanager.v2.virtual.projectBillingInfo","ResourceErrorCode":"403","ResourceErrorMessage":{"code":403,"message":"The
caller does not have permission","status":"PERMISSION_DENIED","details":[],"statusMessage":"Forbidden","requestPath":"https://cloudbilling.googleapis.com/v1/projects//billingInfo","httpMethod":"PUT"}}'

Since My personal account and DM service account has same permission in IAM

Can you please confirm to me, if the Service Account what DM is using for your deployment<EMAIL_ADDRESS>) has Billing Account User ( or Admin) rights ON the billing account what you are trying to attach?
You can check it here:
gcloud beta  billing accounts get-iam-policy<PHONE_NUMBER>01-012345
CFT Project Factory Readme

7 Create/find the Billing Account associated with the Organization. See: https://cloud.google.com/support/billing/. Take note of the Billing Account's ID, which is formatted as follows:00E12A-0AB8B2-078CE8.
8 Give the DM Service Account the following permissions on the Billing Account: roles/billing.user. This is visible in Cloud Console's IAM permissions in Billing -> Billing Account User.

Hi,
Thank you. Once i added the DM service account into the billing account by suite it is working fine.
However now im facing to add assets in security command center for respective org. Which mean as per project factory i have to add this new project into the assets of the security command center to enable the vulnerability.
Since there is no gcp-types for SCC so unable to add it. Is there any gcp-types for scc, or shall i execute the gcloud command by  GDM template


Add top-level functions for JSON-compatibility

When replacing wasm_bindgen::… with serde_wasm_bindgen::… for JSON-scenarios the ergonomics suffer when compared to non-JSON-compatible ones.
This adds JSON-compatible equivalents for to_value() and from_value(), allowing for the same level of convenience.

Sorry, forgot to respond here - I don't think we want to encourage using JSON variants that much (via easily-accessible top-level API) as they're lossy compared to proper JS->Rust conversions and shouldn't be something that is easy to accidentally use instead of the default mode.


[Suggestion] Allow Flash Forge to provide XP for mined ores

Flash forge doesn't give XP when smelting ores

Changing this in the next release. Thank you!


vscode search by page weightage

Searching for a term/terms should not be taken literarily and exact match, but should find closest match and rank pages by weightage of the search terms, like pages having high number of matches should be on top and descending thereafter.
Use cases - I manage my notes in markdown files using vscode + foam, an alternative to obsidian, so can search for words in pages
Ex - searches in onenote, obsidian, etc

You can set "search.sortOrder": "countDescending" in your settings so that files with more matches will appear first in the search result list view.


svg-to-png now spawning phantomjs – Phantom Error

I'm having an issue similar to #130, but no luck fixing it with the permissions solutions provided. Grunticon had been working fine, then without me changing any svg files (I have about 28 icons) or gruntfile.js, it stopped working. I get the following output:
Running "grunticon:dist" (grunticon) task
Look, it's a grunticon!
grunticon now minifying the stylesheet loader source.
grunticon loader file created.
Coloring SVG files
Converting SVG to PNG
svg-to-png now spawning phantomjs...
(using path: /Users/tracystone/Sites/project/node_modules/grunt-grunticon/node_modules/svg-to-png/node_modules/phantomjs/lib/phantom/bin/phantomjs)

Something went wrong with phantomjs...

Then, it outputs the following for each icon and color: /var/folders/xf/jr0ct9wx4db6_j30brtfxv280000gn/T/grunticon-tmp/access-admin.svg
And, at the end:
PHANTOM ERROR: Error: Error: fail
TRACE:
 -> /Users/tracystone/Sites/project/node_modules/grunt-grunticon/node_modules/svg-to-png/lib/phantomscript.js: 43
 -> /Users/tracystone/Sites/project/node_modules/grunt-grunticon/node_modules/svg-to-png/lib/rsvp.js: 241
 -> /Users/tracystone/Sites/project/node_modules/grunt-grunticon/node_modules/svg-to-png/lib/rsvp.js: 872

Any ideas?

@tracystone 2 things:
First, which version of Grunticon?
Second, I actually, weirdly enough, know WHERE the "fail" error comes from. It happens when phantomjs cannot open the file it's being told to open. Any chance you could post up your Gruntfile and the project structure as well? (If the project is able to be public in the way that I could look at how it's set up, that would be world-changing levels of helpful as well)

Thanks.
Grunticon version 1.6.0. I also tested it with 2.0.0-beta.1, but had the same issue.
I'm only able to show the portion of the Gruntfile that includes grunticon:
grunticon: {
      dist: {
        files: [{
          expand: true,
          cwd: 'svg/compressed',
          src: ['*.svg', '*.png'],
          dest: 'public/img/ui/icons'
        }],
        options: {
          cssprefix: '.icon--',
          colors: {
            dark: '#555555',
            primary: '#0099cc',
            tertiary: '#003366',
            quaternary: '#f9c900',
            explorer: '#004f84',
            admin: '#4a5259',
            reverse: '#ffffff',
            alert: '#E2565C',
            success: '#3CB57E',
            googlecolor: '#d03324',
            linkedincolor: '#0077b5'
          }
        }
      }
    },

Hey @tracystone, just to doublecheck, can you - in the place for cwd, instead try
path.resolve( path.join( 'svg', 'compressed' ) )

It may be unrelated, but I'd like to see if I can find an error somewhere. Meanwhile, I'll try to find a way to catch this error earlier

@jefflembeck Do you mean replace cwd: 'svg/compressed', with cwd: path.resolve( path.join( 'svg', 'compressed' ) )?

Yeah.  If you're not using path elsewhere in your Gruntfile, you'll need to require it at the top:  var path = require( 'path' );

@jefflembeck Produced the same errors.

Hey @tracystone, any chance you can try 2.0.0-beta.2? It should have a slightly better error message.
Thanks!

@jefflembeck Thanks for the better error message. I tried 2.0.0-beta.2 and it came up with the following:
Something went wrong with phantomjs...
PHANTOM ERROR: Error: Error: fail: Phantom had an error opening - /var/folders/xf/jr0ct9wx4db6_j30brtfxv280000gn/T/grunticon-tmp/publish-success.svg - Does it exist? true
TRACE:
 -> /Users/tracystone/Sites/sage-ui/node_modules/grunt-grunticon/node_modules/svg-to-png/lib/phantomscript.js: 43
 -> /Users/tracystone/Sites/sage-ui/node_modules/grunt-grunticon/node_modules/svg-to-png/lib/rsvp.js: 241
 -> /Users/tracystone/Sites/sage-ui/node_modules/grunt-grunticon/node_modules/svg-to-png/lib/rsvp.js: 872

I removed the publish.svg icon, to see if something was wrong with it. But, then it snagged on the next icon in alphabetical order. So I tried removing those icons and a few more. It appears grunticon works up to 24 icons (no matter which 24), beyond which it errors out.
I then checked the /var/folders/…/grunticon-tmp/ directory and found that it contained all svg icons in all colors. So they do exist.
Does this mean Phantom is timing out? Or the cache is too full?

@tracystone - so, I was able to get this working with 50 icons, so it's not necessarily a set number.
Which version of OSX are you using? Is the 24th icon different than any of the others in any specific way (really large)? Just trying to get whatever info I can get to help

Also, how many individual icon + color combinations are there? Are there 24 all together or are there 100+?

@jefflembeck OSX 10.9.5. All icons are the same size (48x48). It errors on the 25th icon no matter which one it is.
There are 10 colors per icon including the default color. (I know, trying to reduce the number of colors!)

ok, so I just tried with 500 icons and was still able to make it work. I'm super curious as to what is happening here.

@tracystone what type of size (in KB) are the icons that are being produced? I'm struggling to reproduce so I'm reaching for whatever I can.

@jefflembeck Thanks for trying to help here. Unfortunately I haven't been able to test in the past week.
The svgs are compressed with svgmin and range from 200 bytes to 1kb.

@jefflembeck We've since moved to a Vagrant virtual machine, so I don't have the icon issues anymore. It very well may have been a permissions issue. Not sure.
Thanks again for your help!

@tracystone - glad it's working for you!

I was having this issue today on version 2 of grunticon where it was saying it couldn't find the file even though it existed.
Also on a Mac.
I ended up just splitting the processing into two tasks and it worked:
   grunticon: {
      iconsA: {
        files: [{
          expand: true,
          cwd: 'images/icons',
          src: ['**/*_icon.svg'],
          dest: 'generated/grunticon/icons'
        }],
        options: {
          cssprefix: '.ski-icon-'
        }
      },
      iconsB: {
        files: [{
          expand: true,
          cwd: 'images/icons',
          src: ['**/*_logo.svg'],
          dest: 'generated/grunticon/icons'
        }],
        options: {
          cssprefix: '.svg-icon-'
        }
      }
    }

@jaiew

I was having this issue today on version 2 of grunticon where it was saying it couldn't find the file even though it existed.

Can you clarify what you mean by this? Which file? What was the exact error message? What was reporting the error?

@jefflembeck Originally I was processing all the logos and icons in one config as such:
grunticon: {
      icons: {
        files: [{
          expand: true,
          cwd: 'images/icons',
          src: ['**/*_{icon,logo}.svg'],
          dest: 'generated/grunticon/icons'
        }],
        options: {
          cssprefix: '.ski-icon-'
        }
      },

The process would end with the same error that @tracystone mentioned. Even when I removed the file it failed on it would just fail on the next file after that.
So I split it into two processes iconsA and iconsB.
I hope that clarifies it.

Same problem here, exactly. It seems there is an issue with max temp files opened at the same time on macOS (10.10.3 for me).

@LouAdrien there's most definitely a maximum amount of files that one can open at once on OSX (and unix in general)
ulimit -n should expose that for you


different behavior from podman pull when manifest is 404

/kind bug
(Related to RHBZ https://bugzilla.redhat.com/show_bug.cgi?id=1375323)
When trying to pull invalid images from various registries, the behavior of podman is not consistent.
$ for r in docker.io registry.fedoraproject.org quay.io registry.access.redhat.com registry.centos.org; do sudo podman pull $r/deadbeef; printf "\n"; done

Trying to pull docker.io/deadbeef...Failed
error pulling image "docker.io/deadbeef": unable to pull docker.io/deadbeef: unable to pull image: Error determining manifest MIME type for docker://deadbeef:latest: Error reading manifest latest in docker.io/library/deadbeef: errors:
denied: requested access to the resource is denied
unauthorized: authentication required

Trying to pull registry.fedoraproject.org/deadbeef...Failed
error pulling image "registry.fedoraproject.org/deadbeef": unable to pull registry.fedoraproject.org/deadbeef: unable to pull image: Error determining manifest MIME type for docker://registry.fedoraproject.org/deadbeef:latest: Error reading manifest latest in registry.fedoraproject.org/deadbeef: manifest unknown: manifest unknown

Trying to pull quay.io/deadbeef...Failed
error pulling image "quay.io/deadbeef": unable to pull quay.io/deadbeef: unable to pull image: Error determining manifest MIME type for docker://quay.io/deadbeef:latest: Error reading manifest latest in quay.io/deadbeef: error parsing HTTP 404 response body: invalid character '<' looking for beginning of value: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n<title>404 Not Found</title>\n
Not Found
\n
The requested URL was not found on the server.  If you entered the URL manually please check your spelling and try again.
\n"

Trying to pull registry.access.redhat.com/deadbeef...Failed
error pulling image "registry.access.redhat.com/deadbeef": unable to pull registry.access.redhat.com/deadbeef: unable to pull image: Error determining manifest MIME type for docker://registry.access.redhat.com/deadbeef:latest: Error reading manifest latest in registry.access.redhat.com/deadbeef: unknown: Not Found

Trying to pull registry.centos.org/deadbeef...Failed
error pulling image "registry.centos.org/deadbeef": unable to pull registry.centos.org/deadbeef: unable to pull image: Error determining manifest MIME type for docker://registry.centos.org/deadbeef:latest: Error reading manifest latest in registry.centos.org/deadbeef: manifest unknown: manifest unknown

Ultimately, each of the registries returns an HTTP 404 when trying to retrieve the manifest for the non-existent image (well, except for the CentOS registry which returns 403?).
$ for r in docker.io registry.fedoraproject.org quay.io registry.access.redhat.com registry.centos.org; do printf "$r\n"; curl -I -L https://$r/v2/deadbeef/manifests/latest; done
docker.io
HTTP/1.1 301 Moved Permanently
Content-length: 0
Location: https://www.docker.com/v2/deadbeef/manifests/latest
Connection: close

HTTP/2 404
content-type: text/html; charset=UTF-8
content-length: 0
server: nginx
date: Thu, 03 Jan 2019 19:46:49 GMT
link: <https://www.docker.com/not-found>; rel="canonical"
link: </not-found>; rel="revision"
link: <https://www.docker.com/not-found>; rel="canonical"
link: </not-found>; rel="revision"
x-ua-compatible: IE=edge
content-language: en
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
last-modified: Thu, 03 Jan 2019 19:23:31 GMT
etag: W/"1546543411"
content-encoding: gzip
x-varnish: 2809607
strict-transport-security: max-age=31536000
age: 262
x-cache: Error from cloudfront
via: 1.1<PHONE_NUMBER>3dfd27a095a32cf5b86723.cloudfront.net (CloudFront)
x-amz-cf-id: uwi-OPpwlqSQnrVtwqW5VnJfQ85lUUp1JmZ6y86W9726ytgknQp4CQ==

registry.fedoraproject.org
HTTP/2 404
date: Thu, 03 Jan 2019 19:51:11 GMT
server: Apache/2.4.37 (Fedora)
strict-transport-security: max-age=31536000; includeSubDomains; preload
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
referrer-policy: same-origin
content-type: application/json; charset=utf-8
docker-distribution-api-version: registry/2.0
vary: Accept
content-length: 96
x-varnish: 1460070
age: 0
via: 1.1 varnish (Varnish/6.0)
apptime: D=282286
appserver: proxy05.fedoraproject.org

quay.io
HTTP/2 404
server: nginx/1.14.2
date: Thu, 03 Jan 2019 19:51:12 GMT
content-type: text/html
content-length: 233

registry.access.redhat.com
HTTP/1.1 404 Not Found
Server: Apache
Content-Length: 53
Content-Type: application/json
Expires: Thu, 03 Jan 2019 19:51:12 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Thu, 03 Jan 2019 19:51:12 GMT
Connection: keep-alive
X-N: S

registry.centos.org
HTTP/1.1 403 Forbidden
Server: nginx/1.12.2
Date: Thu, 03 Jan 2019 19:51:12 GMT
Content-Type: text/html
Content-Length: 169
Connection: keep-alive
Vary: Accept-Encoding
Strict-Transport-Security: max-age=31536000
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Referrer-Policy: same-origin
X-Frame-Options: SAMEORIGIN

Is it possible to change the behavior to be consistent when the manifest is 404'ed?
These tests were done on Fedora Silverblue 29 with:
$ podman --version
podman version <IP_ADDRESS>
$ rpm -q podman
podman-<IP_ADDRESS>-1.git9551f6b.fc29.x86_64

@mtrmac PTAL

Right, the docker/distribution protocol defines an error reporting mechanism that is not principally based on HTTP status codes, and the “denied+unauthorized”, and “unknown”, and “manifest unknown” are all errors causes that have been returned by the server (and are, to an extent, machine-parseable in Go callers of c/image).
At least in the case of the clearly non-compliant 404+HTML quay.io (unless c/image is somehow to blame for seeing HTML?), it is very reasonable to expect c/image to silently map it to something more useful.
But it’s not obviously correct to map the (reminder, machine-parseable) values “denied”/“unauthorized” into “not found”, or the other way around, nor to just throw away all of them and replace them by a generic “something failed; contact your system administrator :)” — though something like that may well be what a high-level application would decide to do, ignoring the details.
Or maybe, no callers actually care and c/image would be more useful if it represented all of these as a single error type with a single string? We do define an ErrUnauthorizedForCredentials in c/image/docker, so it’s not quite a new idea.

From our perspective, I think we'd prefer the more verbose errors - we can always choose to discard them when we print what's gone wrong.
For reference, I believe we originally did that, but switched to our current implementation (print the result of the failed pull) to give more insight into what had gone wrong.

Right, https://github.com/containers/libpod/commit/2188d8f7ada15caddd8b721745a0a4b6f61ce111 replaced a generic string with returning the underlying data.

This is very akin to https://bugzilla.redhat.com/show_bug.cgi?id=1375323 also filed by @miabbott ... I agree with @mtrmac here.  The more I look at it the more I don't like the idea of trying to map the errors because this really comes from the registry itself ... so the next registryfoobar that comes out, will not match us.

Ok lets close this as close won't fix.


TkFallback.java:49-52: {@link TkFallback} class is very...

The puzzle 918-47bb7809 from #918 has to be resolved:
https://github.com/yegor256/takes/blob/5a7041763ed2b59d9ea142c54a25dbea1596a5a2/src/main/java/org/takes/facets/fallback/TkFallback.java#L49-L52
The puzzle was created by @fanifieiev on 20-Nov-19.
Estimate: 30 minutes,  role: DEV.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

@paulodamaso/z please, pay attention to this issue

Job #1000 is now in scope, role is DEV

The job #1000 assigned to @fabriciofx/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job

@0crat refuse

@0crat refuse (here)

@fabriciofx The user @fabriciofx/z resigned from #1000, please stop working. Reason for job resignation: Order was cancelled

@0crat status

@0crat status (here)

@andreoss This is what I know about this job in C3FFK3YAY, as in §32:

The job #1000 is in scope for 16mon
The role is DEV
The job is assigned to @andreoss/z for 2mon
There is no monetary reward attached, it's a free job
The job doesn't have any impediments
The budget is 30 minutes/points
These users are banned and won't be assigned:

@0pdd/z: This user reported the ticket
@fabriciofx/z: User was resigned from the ticket

Job footprint (restricted area)

@0crat status


Children property is not being updated after drag complete

Describe the bug
The Children property of an item is not being updated after a different item is dragged into it.
Steps to reproduce the bug

Clone the master branch of this repository: https://github.com/dpaulino/treeviewtest
Press F5 to launch the uwp app
Drag the item named second into the item named first. This will trigger logic that effectively "cancels" the drop and reinserts second back into the root list.
Now do the opposite. Drag first into second.
Crash occurs because the Children property of second was not updated.

Expected behavior
No crash
Version Info
NuGet package version:
Microsoft.UI.Xaml 2.2.190702001-prerelease

Windows 10 version
Saw the problem?

Insider Build (xxxxx)

May 2019 Update (18362)
Yes

October 2018 Update (17763)

April 2018 Update (17134)

Fall Creators Update (16299)

Creators Update (15063)

Device form factor
Saw the problem?

Desktop
yes

Mobile

Xbox

Surface Hub

IoT

Additional context
This may be related to my previous issue https://github.com/microsoft/microsoft-ui-xaml/issues/631

@kaiguo sounds similar to the other bug you fixed. It looks like this data source is observable so I think it's doing the right thing on the app side for this to work.

Hey all, any updates on this issue? Let me know if I can help determine root cause. My customers have been asking for drag and drop in my app for 3 months now and this issue is blocking me.

Hey all, any updates on this issue? Let me know if I can help determine root cause. My customers have been asking for drag and drop in my app for 3 months now and this issue is blocking me.

Looking at it now...

@dpaulino Some operations are async due to the way ItemSource and Layout update works, so the children collection in ItemsSource doesn't have anything yet when you try to access it.
It should work if you put the code in a dispatcher like this,
private void TreeView_DragItemsCompleted(MUXC.TreeView sender, MUXC.TreeViewDragItemsCompletedEventArgs args)
{
    if (args.Items[0] is ExplorerItem item)
    {
        var dispatcher = CoreApplication.MainView.Dispatcher;
        var ignore = dispatcher.RunAsync(CoreDispatcherPriority.Normal,
            () => {
                ExplorerItem parent = GetParent(ViewModel.Nodes, item);
                parent.Children.Remove(item);
                ViewModel.Nodes.Add(item);
            });
    }
    originalParent = null;
}

I think you can probably consider overriding OnDrop method on TreeViewItem to prevent the operation happening from the beginning instead of manually "cancel" the drag&drop by swapping items back.

I will try the OnDrop method, and I'll report back soon.

@kaiguo can you point out exactly which "OnDrop" method I'm supposed to use? I tried the code below but the event is never fired when I drop a tree view item onto another tree view item.
<c:TreeViewItem ItemsSource="{x:Bind Children}" Content="{x:Bind Name}" AllowDrop="True"
                            Drop="TreeViewItem_Drop" DropCompleted="TreeViewItem_DropCompleted"/>

        private void TreeViewItem_Drop(object sender, DragEventArgs e)
        {
            // breakpoint here is never hit
        }

        private void TreeViewItem_DropCompleted(UIElement sender, DropCompletedEventArgs args)
        {
            // breakpoint here is never hit
        }

Here's a branch you can clone to test out the above code: https://github.com/dpaulino/treeviewtest/tree/dropOnTreeViewItem

By the way, it may be possible to close this issue if this question could be answered: https://github.com/microsoft/microsoft-ui-xaml/issues/1154

By the way, it may be possible to close this issue if this question could be answered: #1154

I commented in #1154, closing this one.


Possible bug in twister gtest harness

Discussed in https://github.com/zephyrproject-rtos/zephyr/discussions/71635

Originally posted by GeekOffTheStreet April 17, 2024
I tried using Twister with the gtest harness and ran into issues with it detecting unit test execution.   The behavior for how it parses sample.yaml/testcase.yaml doesn't match what I would expect. I should not that I'm not using pigweed.  Consider this simple test case:
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include <stdio.h>
using namespace testing;

class HelloWorld : public Test {
public:
    HelloWorld() {}
    void SetUp() {}
    void TearDown() {}
};

TEST_F(HelloWorld, foo) {
    EXPECT_TRUE(true);
}

I build that for qemu using:
$ west build -p always -b qemu_leon3--build-dir zephyr-build .
$ /opt/zephyrproject/zephyr/scripts/twister  -vvv -p qemu_leon3 -T ./

If I  use the console harness with a sample.yaml resembling:
sample:
  description: Hello World sample, the simplest Zephyr
  name: test hello world
common:
  tags: introduction
  platform_allow: qemu_leon3
  harness: console
  harness_config:
    type: multi_line
    ordered: false
    regex:
      - ".*OK\\s+\\]\\s+HelloWorld.foo.+"

tests:
  HelloWorld.foo:
    tags: introduction

The test works as expected (sample output):
DEBUG   - Determine test cases for test instance: qemu_leon3/HelloWorld.foo
DEBUG   - Determine test cases for test suite: HelloWorld.foo
DEBUG   - Test instance qemu_leon3/HelloWorld.foo already has 1 cases.
DEBUG   - run test: qemu_leon3/HelloWorld.foo
DEBUG   - Reset instance status from 'passed' to None before run.
DEBUG   - Spawning QEMUHandler Thread for qemu_leon3/HelloWorld.foo
DEBUG   - Running qemu_leon3/HelloWorld.foo (qemu)
DEBUG   - Spawning QEMUHandler Thread for qemu_leon3/HelloWorld.foo
DEBUG   - QEMU (232776): [==========] Running 1 test from 1 test case.
DEBUG   - QEMU (232776): [----------] Global test environment set-up.
DEBUG   - QEMU (232776): [----------] 1 test from HelloWorld
DEBUG   - QEMU (232776): [ RUN      ] HelloWorld.foo
DEBUG   - QEMU (232776): [       OK ] HelloWorld.foo (0 ms)
DEBUG   - HARNESS:Console:EXPECTED(1/1):'.*OK\s+\]\s+HelloWorld.foo.+'
DEBUG   - QEMU (232776): [----------] 1 test from HelloWorld (0 ms total)
DEBUG   - QEMU (232776):
DEBUG   - QEMU (232776): [----------] Global test environment tear-down
DEBUG   - QEMU (232776): [==========] 1 test from 1 test case ran. (10 ms total)
DEBUG   - QEMU (232776): [  PASSED  ] 1 test.
DEBUG   - QEMU (232776): *** Booting Zephyr OS build zephyr-v3.5.0-2466-g654a74ecb7d6 ***
DEBUG   - QEMU (232776) complete (passed) after 2.050739288330078 seconds
DEBUG   - No timeout, return code from QEMU (None): 0
DEBUG   - return code from QEMU (None): 0
DEBUG   - run status: qemu_leon3/HelloWorld.foo passed
INFO    - 1/1 qemu_leon3                HelloWorld.foo                                     PASSED (qemu 2.051s)

INFO    - 1 test scenarios (1 test instances) selected, 0 configurations skipped (0 by static filter, 0 at runtime).

If I try to use the gtest harness:
sample:
  description: Hello World sample, the simplest Zephyr
  name: test hello world
common:
  tags: introduction
  platform_allow: qemu_leon3
  harness: gtest
tests:
  HelloWorld.foo:
    tags: introduction

The runner tries to match HelloWorld.foo.HelloWorld.foo instead of just HelloWorld.foo and fails:
DEBUG   - Determine test cases for test instance: qemu_leon3/HelloWorld.foo
DEBUG   - Determine test cases for test suite: HelloWorld.foo
DEBUG   - Test instance qemu_leon3/HelloWorld.foo already has 1 cases.
DEBUG   - run test: qemu_leon3/HelloWorld.foo
DEBUG   - Reset instance status from 'passed' to None before run.
DEBUG   - Spawning QEMUHandler Thread for qemu_leon3/HelloWorld.foo
DEBUG   - Running qemu_leon3/HelloWorld.foo (qemu)
DEBUG   - Spawning QEMUHandler Thread for qemu_leon3/HelloWorld.foo
DEBUG   - QEMU (234555): [==========] Running 1 test from 1 test case.
DEBUG   - QEMU (234555): [----------] Global test environment set-up.
DEBUG   - QEMU (234555): [----------] 1 test from HelloWorld
DEBUG   - QEMU (234555): [ RUN      ] HelloWorld.foo
DEBUG   - Could not find a matching testcase for HelloWorld.foo.HelloWorld.foo
DEBUG   - QEMU (234555): [       OK ] HelloWorld.foo (0 ms)
Exception in thread qemu_leon3/HelloWorld.foo:
Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/zephyrproject/zephyr/scripts/pylib/twister/twisterlib/handlers.py", line 902, in _thread
    harness.handle(line)
  File "/opt/zephyrproject/zephyr/scripts/pylib/twister/twisterlib/harness.py", line 573, in handle
    tc is not None and tc == self.tc
AssertionError: gTest error, mismatched tests. Expected HelloWorld.foo.HelloWorld.foo but got None
DEBUG   - return code from QEMU (None): 2
DEBUG   - run status: qemu_leon3/HelloWorld.foo failed
INFO    - 1/1 qemu_leon3                HelloWorld.foo                                      FAILED Timeout (qemu)

I didn't see an obvious way to alter the matching behavior.
@yperess

Thank you, I'll take a look this week.

I am also experiencing a similar issue with twister. In my case I want to integrate CPPUTest so I had a look at the Gtest Harness. This brought me to this issue.
As far as I understand the problem is that each test case name obtained dynamically from the std output of the Harness (Gtest in this case), is created by the format {test case id}.{test suite}.{test case}. This is done specifically here:
https://github.com/zephyrproject-rtos/zephyr/blob/4d0a8c1e8b8316ec5071a3fcc98cd292d3bc4e6d/scripts/pylib/twister/twisterlib/harness.py#L582
I think that is the reason we get from harness handle from Gtest a created instance with name HelloWorld.foo.HelloWorld.foo.
What happen is the following:

Test suite Hello world with test case Foo runs and prints
[ RUN      ] HelloWorld.foo

The Test instance module does not find the instance and prints
DEBUG   - Could not find a matching testcase for HelloWorld.foo.HelloWorld.foo
This happens due to the format I mentioned at the beginning. This in turn creates a new test instance called HelloWorld.foo.HelloWorld.foo

Test suite Hello world with test case Foo finishes and prints
[OK ] HelloWorld.foo (0 ms)

The GTest Harness detects that a test finished here:
https://github.com/zephyrproject-rtos/zephyr/blob/4d0a8c1e8b8316ec5071a3fcc98cd292d3bc4e6d/scripts/pylib/twister/twisterlib/harness.py#L613

Now here is the important part. The refex pattern TEST_PASS_PATTERN I think is wrong. If I test it with regex101.com this is the result I get https://regex101.com/r/Uj6EYf/1

As you see the string representation of the test case will be HelloWorld.foo.HelloWorld.foo (0 ms) instead of the expected HelloWorld.foo.HelloWorld.foo. This in turn returns None
https://github.com/zephyrproject-rtos/zephyr/blob/4d0a8c1e8b8316ec5071a3fcc98cd292d3bc4e6d/scripts/pylib/twister/twisterlib/testinstance.py#L159-L163
and makes the assertion fail.
https://github.com/zephyrproject-rtos/zephyr/blob/4d0a8c1e8b8316ec5071a3fcc98cd292d3bc4e6d/scripts/pylib/twister/twisterlib/harness.py#L620-L623

Possible solution
Change the Pass pattern (and similarly the fail pattern as well) to something as
.*\[       OK \] (?P<suite_name>\S+)\.(?P<test_name>\S+) \(\d+ ms\)

https://regex101.com/r/NX5ul9/1

I recently stumbled on this issue because I'm seeing the same error
DEBUG   - Could not find a matching testcase for HelloWorld.foo.HelloWorld.foo
It looks like the pull request resolved another issue related to test timing being at the end of the gtest output, but did not address the duplicated suite and test name in the search?  or am I missing something here?
My testcase.yaml looks like:
tests:   HelloWorld.foo:     tags: foo

@byteinthewild I'm on vacation right now, but I'll try to take a look ASAP

Great, thank you very much, enjoy your vacation!

Applying the changes from here: https://github.com/zephyrproject-rtos/zephyr/pull/65430/files fixed the issue for Googletest 1.15.0.
Unfortunately the changes have not been merged into zephyr.

Started working on this, should have it fixed by the end of the week.


GeckoDriver Compatibility

Mozilla's GeckoDriver translates between the WebDriver and the (Firefox-specific) Marionette protocols. Is this library compatible with it, instead of having to use the standalone Selenium server?

I was able to get it working with chromium.chromedriver by modifying *uri* to match the default port (9515, but you could also set it to 4444 using --port) and by modifying *prefix* to be an empty string, per this issue. It would be nice if this was documented somewhere.

Forgot to mention, but my PR (https://github.com/copyleft/cl-webdriver-client/pull/5) fixed this.


[mockhub] Initial mock event hubs package

/cc @HarshaNalluru @richardpark-msft  @ramya-rao-a

@chradek: Would this be useful to clients in other languages?  Is this a mock Event Hubs Service which happens to be implemented in JS but could be used with any client?

@chradek: Would this be useful to clients in other languages? Is this a mock Event Hubs Service which happens to be implemented in JS but could be used with any client?

That's the intention/final goal. Chris is on a vacation now, he mentioned that he couldn't get the .NET SDK to work with this mock server. Needs more investigation for the other languages.

Replaced by #13737


After updating iOS app, the photos taken by MediaPlugin dissapear

Hi,
Maybe, this could be very simple, I don't know if I'm missing something because i have searched a lot this issue and I haven't found anything related. My scenario is the following one:
When I update the iOS app, seems that the private folder is deleted and my photos disappear.  Below, all the information required:
Bug Information
Version Number of Plugin: <IP_ADDRESS>
Device Tested On: IPhone SE
Simulator Tested On: iPhone X iOS 11.4
Version of VS: Visual Studio Form Mac - Version 7.5.3 (build 7)
Version of Xamarin: Xamarin.Forms (<IP_ADDRESS>3944)
Versions of other things you are using:
Steps to reproduce the Behavior

Just install a new version of the App in iOS, and the photos taken in the version before get disappear.
Even, when you debug the application, every time that you run it, the photos get disappear.

Expected Behavior
The photos must be kept between different updates. Android works perfect.
Actual Behavior
The photos are not kept after an update of an app in iOS.
Code snippet
        var file = await CrossMedia.Current.TakePhotoAsync(new Plugin.Media.Abstractions.StoreCameraMediaOptions
        {

            Directory = Constants.RootFolder,
            CompressionQuality = Constants.CompressionPhotoQuality,
            Name = Guid.NewGuid().ToString()
        });

NOTE: I don't know if it's possible to change the default location where photos are stored.
Thanks!!

What directory are you attempting to save them in?

The debug is probably not a real use case as it may clear out your files each time on deploy too.

Hi James,
I'm just setting the Directory name and that's it. I don't know where I can change the default location of the images folder. I suppose that I'm saving all the image in the default location that the component uses.
Hope to be clear, regards!!

Gotcha, we save it in the Personal Folder... I will double check this stuff next week, but I think it should be okay....

Hi James,
Take a look of this post:
https://forums.xamarin.com/discussion/73940/environment-specialfolder-personal-is-a-good-place-to-store-photos-in-my-app
Seems that storing photos in "Personal" folder is not enough to keep photos between updates. A good place could be the "Library" folder.
Regards,

I'm having the same issue, @jamesmontemagno ! It keeps them on startup and shutdown, but not on update or debug... ONLY IN iOS... Android works fine.

I have spent days on this, @jamesmontemagno and I don't know what to do. I desperately need to update my app  but I can't because if I do, all of my users will lose their images in their photo logs. I have tried everything I can think of. I copied the photo using a dependency service to:
 string documentsPath = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "..", "Library");
and then saved the path, but that didn't work, so I just saved the file name and added the above path on during the binding when I'm displaying the photos in a listview, but that didn't work either.
The debugging doesn't make the photos disappear if I don't change anything in the code, but if I change ANYTHING, then the photos don't show up. PLEASE HELP!

Hi Billy,
I did that, moving images to the Library folder, but seems that each time that the app is updated, the App Id changes, so the path is different and the component is not able to find the images. The weird of that situation is that the sqlite db3 file is kept between updates. I'm wondering whether on production, the appid changes each time that you are going to update your app. In the meantime, i'm going to save photos in the photo library and referencing images from there.
Regards,

@juancho559 , I ended up saving my images to Sqlite. My users will have a problem on the first upgrade, since their images are no longer showing up for them, but after that, they will be fine.
With Sqlite, I'm dealing with byte arrays, which is sort of a pain. I was able to let my users share photos to social media in Xamarin Forms iOS, but can't find any code for Android.
Would you happen to know how to share photos from a byte array in Xamarin forms Android? This is what I have so far, but bitmap is null after bitmap.Compress:
public class ShareClass : Activity, IShare
   {
       public async void Share(byte[] imageData)
       {

           try
           {
               Bitmap bitmap;
               using (var stream = new MemoryStream(imageData))
               {
                   var imageSource = ImageSource.FromStream(() => stream);
                   bitmap = await GetBitmap(imageSource);
               }
               using (var writeStream = new MemoryStream())
               {
                    bitmap.Compress(Bitmap.CompressFormat.Png, 100, writeStream);
               }

               var intent = new Intent(Intent.ActionSend);
               intent.SetType("image/png");
               intent.PutExtra(Intent.ExtraStream, bitmap);
               var intentChooser = Intent.CreateChooser(intent, "Share via");
               StartActivityForResult(intentChooser, 1);

           }
           catch (Exception e)
           {
               Console.WriteLine(e);
               throw;
           }
       }

       Task<Bitmap> GetBitmap(ImageSource image)
       {
           return GetImageFromImageSource(image, Forms.Context);
       }

       private async Task<Bitmap> GetImageFromImageSource(ImageSource imageSource, Context context)
       {
           IImageSourceHandler handler;

           if (imageSource is FileImageSource)
           {
               handler = new FileImageSourceHandler();
           }
           else if (imageSource is StreamImageSource)
           {
               handler = new StreamImagesourceHandler(); // sic
           }
           else if (imageSource is UriImageSource)
           {
               handler = new ImageLoaderSourceHandler(); // sic
           }
           else
           {
               throw new NotImplementedException();
           }
           return await handler.LoadImageAsync(imageSource, context);
       }
   }

@BillyMartin1964 I haven't done that before. I will be worried about the size of the database.
Finally I found a solution, I'm going to try to explain it.
@jamesmontemagno The default location that the MediaPlugin component use to save the photos is not persistent between updates. As I told you in a post before, seems that storing photos in "Personal" folder is not enough to keep photos between updates. A good place could be the "Library" folder, so it would be great to fix that. For that reason, the first step that I'm doing when I take or pick a picture, is moving images from the Media Plugin default location to the "Library" folder .
Second, iOS doesn't keep the same paths between redeploys (A new GUID is generated each time that an installation happens). @BillyMartin1964 For that reason, when you save in the database the path even with the "Library" folder included, the component is not able to find the photo when a new installation will be sent. But seems that iOS copies the "Library" folder to a Cache folder and then restored with the new GUID of the installation according to this post. https://forums.xamarin.com/discussion/comment/217282/#Comment_217282
Now, make sense that the db3 database is kept between updates if you reference the file like this:
   public static OrganizaDatabase Database
    {
        get
        {
            if (_database == null)
            {
                _database = new OrganizaDatabase(DependencyService.Get<IFileHelper>().GetLocalFilePath(Constants.DatabaseFileName));
            }

            return _database;
        }
    }

    public string GetLocalFilePath(string fileName)
    {
        string docFolder = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
        string libFolder = Path.Combine(docFolder, "..", "Library", "Databases");

        if (!Directory.Exists(libFolder))
        {
            Directory.CreateDirectory(libFolder);
        }

        return Path.Combine(libFolder, fileName);
    }

So the idea is not saving the fullpath of the image in the sqlite database. A better way is saving the name of the image and create a computed property that gets the current path of the application and combine it with the name of the file.
    [Ignore]
    public string FotoPath
    {
        get
        {
            if (Device.RuntimePlatform == Device.Android)
            {
                return this.Foto;
            }else
            {
                if (string.IsNullOrEmpty(this.Foto))
                    return string.Empty;

                return Path.Combine(DependencyService.Get<IFileHelper>().GetImagesFolder(Constants.RootFolder), this.Foto);
            }
        }
    }

This is the GetImageFolder method:
    public string GetImagesFolder(string folderName)
    {
        if (string.IsNullOrEmpty(folderName))
        {
            throw new ArgumentNullException(nameof(folderName));
        }

        string docFolder = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
        string imagesFolder = Path.Combine(docFolder, "..", "Library", folderName);

        if (!Directory.Exists(imagesFolder))
        {
            Directory.CreateDirectory(imagesFolder);
        }

        return imagesFolder;
    }

Now, you just have to make the binding with the new computed property in all the forms that you want to show the photo.
Hope to be clear, regards!!

@juancho559 , I'm not quite sure I understand. I have never had a problem with iOS finding my database.
I have this in MainActivity:

 var fileName = "HunterTracker.db3";
            var fileLocation = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
            var fullPath = Path.Combine(fileLocation, fileName);

And this as my Xamarin Forms Application Constructor:
 public App(string DB_Path)
        {
            DbPath = DB_Path; // Database Path

And it seems to work fine, except I can't use Xamarin Forms Previewer because I'm not allowed to have an argument in the constructor if I want to use it.
As for images, I was saving the ImageSource string into my database, but then switched to saving the byte[]. However, your comment has got me wondering if this would make my database too large.
Also, I would love to have my database stored on the sdCard when the phone has one.
At this point, I am totally lost and could really use your help. Thanks.

@juancho559 , what would the Constants.RootFolder be? I am using a custom folder when a user takes a picture with media plugin, but when he just chooses one of his photos from the gallery, I don't resave it, so I have no idea what the folder would be.

@jamesmontemagno , I'm confused about what directory to find the pictures that are CHOSEN in the media plugin as opposed to the ones that are TAKEN. Taken photos are easy since they are saved to a folder of my choosing, but how do I find the folder that @juancho559 uses in his code above?
His Code:
return Path.Combine(DependencyService.Get<IFileHelper>().GetImagesFolder(Constants.RootFolder), this.Foto);

Hi @BillyMartin1964,
According to the explanation that I gave in my last post, I had to copy all the images (taken and picked) to an specific folder inside the “Library” folder in order to keep the files between updates. As I said before, I’m saving just a part of the path in my local database and then rebuilding the path with the new Guid that is generated each time that an installation in iOS is done. Feel free to send me an email with your contact info and we can talk about it if you want.
Regards,

Thanks. I'm particularly interested on how to save the files that are chosen in the media plugin. The taken photos have an option for choosing the directory, but not the chosen photos.
Your email doesn't seem to be public. Please email me:
<EMAIL_ADDRESS>

@juancho559 , haven't heard from you. Code you please post the code that you use to save the chosen photos?
As you said, I NEED to have all of my fishing log photos saved to the same folder so that I can find them after an iPhone update.
This is what I have for both the taken and chosen photos... mostly from @jamesmontemagno 's examples:

 async void TakePhotoClicked(object sender, EventArgs e)
        {
            await Permissions.CheckPermissions(Permission.Camera);
            await CrossMedia.Current.Initialize();

            if (!CrossMedia.Current.IsCameraAvailable || !CrossMedia.Current.IsTakePhotoSupported)
            {
                DisplayAlert("No Camera", ":( No camera available.", "OK");
                return;
            }

            var file = await CrossMedia.Current.TakePhotoAsync(new Plugin.Media.Abstractions.StoreCameraMediaOptions
            {
                Directory = "FishingFanatic",
                Name = $"{DateTime.Now}.jpg",
                DefaultCamera = CameraDevice.Front,
                SaveToAlbum = true,
                CompressionQuality = 75,
                CustomPhotoSize = 50,
                PhotoSize = PhotoSize.MaxWidthHeight,
                MaxWidthHeight = 2000
            });

            if (file == null)
                return;

            PhotoLocation = file.Path;

            //DisplayAlert("File Location", file.Path, "OK");

            image.Source = ImageSource.FromStream(() =>
            {
                var stream = file.GetStream();
                file.Dispose();
                return stream;
            });
        }

        async void PickPhotoClicked(object sender, EventArgs e)
        {
            if (!CrossMedia.Current.IsPickPhotoSupported)
            {
                await DisplayAlert("Photos Not Supported", ":( Permission not granted to photos.", "OK");
                return;
            }
            var file = await Plugin.Media.CrossMedia.Current.PickPhotoAsync(new Plugin.Media.Abstractions.PickMediaOptions
            {
                PhotoSize = Plugin.Media.Abstractions.PhotoSize.Medium
            });

            if (file == null)
                return;

            PhotoLocation = file.Path;

            image.Source = ImageSource.FromStream(() =>
            {
                var stream = file.GetStream();
                file.Dispose();
                return stream;
            });
        }

Hi @BillyMartin1964, according to your code, you need to do a copy of the file taken from the Media Plugin component in a specific folder that can be kept between updates. I'm going to mail you with my contact info.
regards,


Add WIP banner for 4.4.0 docs

Purpose
This PR adds the WIP banner to APIM 4.4.0 docs.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Tharika Madurapperuma seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


FLUME-3173: Upgrade joda-time

Unit tests are passing.
Found no suspicious change in joda-time release doc.

I think we can go with the latest stable release (v.2.9.9) which has the current (2017b) tz information out of the box.

@marcellhegedus I upgraded to v 2.9.6, because you tested s3 authentication with this version. Could you test this with v2.9.9 too?

@mcsanady Right. Retested s3 authentication and it also works with joda-time-2.9.9.jar. Thanks for the patch! LGTM +1

Thank you @mcsanady for the patch and @marcellhegedus for the review, I'm about to commit this.


[Fix] Quick open panel init every time keyboard shortcut fires

Fix quick open panel init every time keyboard shortcut fires, may produce multi quick open view instance if you open Quick Open multi time.
How to reproduce this problem?
cmd + shit + O multi times or "File -> Open Quickly" multi times, see the debug view hierarchy
Solution
See file change in CodeEditViewController.swift
Before:

After:

Hi ,@pkasila.
I change my code to close the Quickly Open with the same shortcut in my latest commit.
And Quickly Open also immediately closes when it's out of focus in the solution in the main branch, because there are codes in OverlayPanel:
public func windowDidResignKey(_ notification: Notification) {
        if let panel = notification.object as? OverlayPanel {
            panel.close()
        }
    }


BINARY SEARCH

Description
Description
I will add some question to explain and understand binary search search in a better way.
Domain
C/CPP
Type of Contribution
Documentation
Code of Conduct

[X] I follow Contributing Guidelines & Code of conduct of this project.

/assign


Guides keep dissappearing in KODI

Description
Not sure how many of you use these URLs in Kodi, but did someone had disappearance issues after adding URLs or xml files? Usually it's fine at the start (exc ept for some important guides missing) , but after I add more than five URLs, the old ones dissappear completely. Thanks!

Sounds like this is not a guide issue but a Kodi issue.
Either Kodi or the device you are using is not able to handle more than 5 EPG URLs. You should try a different  IPTV Player to see if that helps.

Yeah, I was using IPTV Extreme which has it's own EPG sources- and it downloads it instantly.It's kinda niche, but I would like to have EPG on Kodi because I'm using it for everything. YT, Films, TV, you name it.


Add AzureCosmosDBMongoVectorStore for LlamaIndexTs

Add Vector Store for CosmosDB

Support multiple operations for CosmosDB vCore such as query, delete, createIndex
Support multiple index types for CosmosDB vCore.


State refreshing

Is your feature request related to a problem? Please describe.
At the moment, state only reflects whatever configuration was applied last and doesn't read data from Grafana. This means any manual change in the dashboard will not be detected when running plan and will be overwritten the next time GDBT updates the resource.
Describe the solution you'd like
Let the state serve the purpose of mapping GDBT resources to Grafana entities, and load their actual state from Grafana. It can significantly increase load times, but this is a reasonable sacrifice.
As long as this feature is implemented, it should also introduce the refresh command which will update the remote state.

Resolved in 2.0.0 as state no longer stores the resource parameters, "refreshing" on every run

Resolved in 2.0.0 as state no longer stores the resource parameters, "refreshing" on every run


[FLINK-23373][task] Fully support object reuse in OperatorChain

What is the purpose of the change
This adds the missing parts to make object reuse work in OperatorChain.
Brief change log
See commit messages.
Verifying this change
This change added tests and can be verified as follows:
MultipleInputStreamTaskChainedSourcesCheckpointingTest and MultipleInputStreamTaskTest
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): no
The public API, i.e., is any changed class annotated with @Public(Evolving): no
The serializers: no
The runtime per-record code paths (performance sensitive): yes
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
The S3 file system connector: no

Documentation

Does this pull request introduce a new feature? no
If yes, how is the feature documented? not applicable

The change itself looks good. Could you add a test(s) to verify that the copying actually takes place?

Thanks for the feedback @dawidwys. I updated the PR. Please have another look.

Btw I also manually verified the change using the HiveDialectQueryITCase.


Failed to load resource: net::ERR_CERT_COMMON_NAME_INVALID

Hey guys,
First of all thanks for the great work. I tried integrating with my project like below:
// inside template
<vue-disqus shortname="student-burger.disqus.com"></vue-disqus>
// Inside script
 import VueDisqus from 'vue-disqus/VueDisqus.vue'
and
components: {
      VueDisqus
    },

I'm getting this error in the console as Failed to load resource: net::ERR_CERT_COMMON_NAME_INVALID  from embed.js
I gave only shortname as that is only mandatory.
Thanks in advance

I'll do some tests tomorrow and see what can be.
Thanks @harishankards

Great. Thanks, @ktquez. Looking forward

@harishankards
I tested it and everything is ok with the plugin
This problem seems to be your browser, I found a link about this error.
https://productforums.google.com/forum/#!msg/chrome/95NrJOxJKSg/mlThr4wbAwAJ
Any question just open this issue again

Hey @ktquez! Thanks for the help. Fixed the issue.


minor wording change to fix

Thanks for this tool, it is really great thought seems ppl still not got hang of it.

@prageethw Glad you liked it 😃 thank you for your changes, I'm merging


Cannot find PURL in Package search

I have a codebase where the<EMAIL_ADDRESS>exists (a simple scan_package using https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.14.0/jackson-core-2.14.0.jar as an input)
I go to the Packagdes details and I can see the<EMAIL_ADDRESS>package.
I copy the PURL<EMAIL_ADDRESS>and paste this in the search box, press enter and there is nothing found

The package search was improved to support full PURLs or any segment of a PURL.
For your example, you can now use:

<EMAIL_ADDRESS>maven
com.fasterxml.jackson.core
jackson-core
2.14.0


Roll Flutter Engine from 7dd1cffaad06 to ce0a0d285b5f (2 revisions)

https://github.com/flutter/engine/compare/7dd1cffaad06...ce0a0d285b5f
2024-12-09<EMAIL_ADDRESS>Roll Skia from 0971c208bb9f to afa77852dcde (1 revision) (flutter/engine#57061)
2024-12-09<EMAIL_ADDRESS>Roll Dart SDK from c7e47c6c5df6 to 264c0c6f5894 (1 revision) (flutter/engine#57060)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC bdero<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Commit queue failed; closing this roll.


Support weaker finality signatures during sync to genesis

This PR makes the system accept lower finality signatures threshold during the "sync to genesis" process.
Closes https://github.com/casper-network/casper-node/issues/3082

bors r+


Article elements for widgets in sidebar and footer..

I was contemplating this the other day and then I saw a couple people commenting on it on the FoundationPress Demo (although they may be talking about different things). https://foundationpress.olefredrik.com/page-templates/featured-image .
What are your thoughts on changing widget areas to section elements vs article?

I am in favor of this change. If we go by the Mozilla developer docs, section makes more sense than article for widgets.

The HTML <section> element represents a standalone section of functionality contained within an HTML document, typically with a heading, which doesn't have a more specific semantic element to represent it.

vs.

The HTML <article> element represents a self-contained composition in a document, page, application, or site, which is intended to be independently distributable or reusable (e.g., in syndication). Examples include: a forum post, a magazine or newspaper article, or a blog entry.

I agree. Feel free to create a pull request.


6834 enable remote db user not mocked in carto user test factory

This fixes #6834. Checked here: https://ci.cartodb.net/view/PRs/job/CartoDB-master-testing/72/
@javitonino CR this, please.

Retest this, please.


[MANOPD-82072] fix containerd version

Description
It ihas been identified during kubemarine operations that containerd 1.4 version might not be stable. 1.5 provided approved stable run.  Need to use 1.5 for new created clusters.
Fixes #MANOPD-82072
How to apply

prepare.cri

Test Cases
Checklist

[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] Integration CI passed
[ ] Unit tests. If Yes list of new/changed tests with brief description
[ ] There is no merge conflicts

Unit tests
Indicate new or changed unit tests and what they do, if any.

As discussed with @koryaga, need to merge the PR without patch, but in general it is necessary, and may be implemented in new minor version.


mongo database seed creation support

initial support for mongoid seed creation

@rroblak do we want to support Mongo ? I don't use it and don't intend to, nor know about it.

@kofronpi I think it would be nice to support if we're able to without sacrificing the overall design.


[ISSUE #2706]  Fix the problem of returning SEND_OK after flush failed

    modified:  broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java
modified:   client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java
modified:   client/src/main/java/org/apache/rocketmq/client/producer/SendStatus.java
modified:   common/src/main/java/org/apache/rocketmq/common/protocol/ResponseCode.java
modified:   store/src/main/java/org/apache/rocketmq/store/CommitLog.java
modified:   store/src/main/java/org/apache/rocketmq/store/MappedFile.java
modified:   store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java
modified:   store/src/main/java/org/apache/rocketmq/store/PutMessageStatus.java

Make sure set the target branch to develop
What is the purpose of the change
You can see from the code below. When flush fails, only an error is reported, but the client is not notified 。
If there is an error, a try catch will be performed .Then log.error("Error occurred when force data to disk.", e);
But there is no error code returned to the client, and the client still thinks that the send is successful.
public int flush(final int flushLeastPages) {
if (this.isAbleToFlush(flushLeastPages)) {
if (this.hold()) {
int value = getReadPosition();
            try {
                //We only append data to fileChannel or mappedByteBuffer, never both.
                if (writeBuffer != null || this.fileChannel.position() != 0) {
                    this.fileChannel.force(false);
                } else {
                    this.mappedByteBuffer.force();
                }
            } catch (Throwable e) {
                log.error("Error occurred when force data to disk.", e);
            }

            this.flushedPosition.set(value);
            this.release();
        } else {
            log.warn("in flush, hold failed, flush offset = " + this.flushedPosition.get());
            this.flushedPosition.set(getReadPosition());
        }
    }
    return this.getFlushedPosition();
}

Brief changelog
So I add an error code FLUSH_DISK_FAILED, and then notify the client to deal with it 。
I have used mvn to package and run it locally, which can fix this problem 。

Coverage increased (+0.1%) to 51.992% when pulling b335ba550a4fcd19755df7f7aa0090443e5b485e on iamqq23ue:master into 9eae1d676b1533efcc2af636331816700bb1522e on apache:develop.

Thanks。But in my test，there is no FLUSH_DISK_TIMEOUT，my client get SEND_OK.In fact，I first tested the impact of the file system read only and found this problem, and then I went to analyze the code.
------------------ 原始邮件 ------------------
发件人:                                                                                "apache/rocketmq"                                                                                @.>;
发送时间: 2021年4月22日(星期四) 上午10:17
@.>;
<EMAIL_ADDRESS>主题: Re: [apache/rocketmq] [ISSUE #2706]  Fix the problem of returning SEND_OK after flush failed  (#2707)
@RongtongJin commented on this pull request.
Good catch! But I feel that the change is a bit complicated. When the flushing error occurs, the location flushedPosition does not move and will return to the client FLUSH_DISK_TIMEOUT.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Good catch! But I feel that the change is a bit complicated. When the flushing error occurs, the location flushedPosition does not move and will return to the client FLUSH_DISK_TIMEOUT.

this.flushedPosition.set(value);
You can see that this line of code will be executed no matter what。So even if an error is reported, the position will change。

Good catch! But I feel that the change is a bit complicated. When the flushing error occurs, the location flushedPosition does not move and will return to the client FLUSH_DISK_TIMEOUT.

this.flushedPosition.set(value);
You can see that this line of code will be executed no matter what。So even if an error is reported, the position will change。

You're right. But when an exception is thrown, we can not set  flushedPosition.

But there is a try catchcatch (Throwable e) {                 log.error("Error occurred when force data to disk.", e);             }
In my test,I can see the error "Error occurred when force data to disk." in log,but there is no exception.
------------------ 原始邮件 ------------------
发件人:                                                                                "apache/rocketmq"                                                                                @.>;
发送时间: 2021年4月22日(星期四) 下午3:00
@.>;
@.>;"State @.>;
主题: Re: [apache/rocketmq] [ISSUE #2706]  Fix the problem of returning SEND_OK after flush failed  (#2707)
Good catch! But I feel that the change is a bit complicated. When the flushing error occurs, the location flushedPosition does not move and will return to the client FLUSH_DISK_TIMEOUT.
this.flushedPosition.set(value);
You can see that this line of code will be executed no matter what。So even if an error is reported, the position will change。
You're right. But when an exception is thrown, we can not set  flushedPosition.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or unsubscribe.

Good catch! But I feel that the change is a bit complicated. When the flushing error occurs, the location flushedPosition does not move and will return to the client FLUSH_DISK_TIMEOUT.

this.flushedPosition.set(value);
You can see that this line of code will be executed no matter what。So even if an error is reported, the position will change。

You're right. But when an exception is thrown, we can not set flushedPosition.

请问什么时候可以修复这个bug呢，目前想考虑多个单master组成集群的架构，主要困难就是这个bug可能导致数据丢失。

The pr has codes conflicts, please review and resolve it in your local enviroments. @iamqq23ue

It should be that the code changed after I fixed the bug. I will try to deal with it.
------------------ 原始邮件 ------------------
发件人:                                                                                "apache/rocketmq"                                                                                @.>;
发送时间: 2021年9月16日(星期四) 晚上7:10
@.>;
<EMAIL_ADDRESS>主题: Re: [apache/rocketmq] [ISSUE #2706]  Fix the problem of returning SEND_OK after flush failed  (#2707)
The pr has codes conflicts, please review and resolve it in your local enviroments. @iamqq23ue
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

The pr has codes conflicts, please review and resolve it in your local enviroments. @iamqq23ue

May I ask which branch  should I  modify.

The new pull request is #3382。The code is basically unchanged, slightly adjusted according to the new version 。


Zotero Better Bib(La)Tex is not compatible with Iceweasel 38.7.1

Hello,
I am using Iceweasel on Debian and had a system upgrade towards Iceweasel 38.7.1. Iceweasel is basically the Debian branding of Firefox. During this upgrade, the Zotero Better Bibtex module got deactivated, and in the Iceweasel modules Better Bibtex appears deactivated with the following message: Zotero Better Bib(La)Tex is not compatible with Iceweasel 38.7.1. I am using Better BibTex version 1.6.39.
Since everything was working fine before the Iceweasel upgrade (according to this Debian page, the upgrade was from Iceweasel version 38.6.1 to 38.7.1), I installed the checkCompatibility addon for Firefox (that does not enforce the version check) and everything seems to be back to normal.
Do you have any idea why these versions are not compatible?
Thanks in advance,

That was a mistake on my part. I try to keep the supported versions a little limited because I have so little time to test all variants, but I hadn't considered Debian would still be on 38. Tests are running for release.

Awesome! I installed the update and it is working. Thanks a lot!
Regarding Debian... hum... I know...


AST: Factor out GenericSignature::getLocalRequirements() method

This encapsulates GenericEnvironment's usage of the GSB.

@swift-ci Please smoke test

The windows failure is addressed by https://github.com/apple/swift/pull/38416

Already merged as part of another PR.


Is there any management interface to setup tenants?

I am looking forward to use "hyn" but I want to make some points clear. Please tell me are there any limitations to use this package that will bound me in terms of development of application?
Is there any ready to use interface to setup a new tenant or I have to develop it?
My application structure will be like separate database for each customer and single code base for all but each tenant will have customised application means different modules will be available for each customer, does this package support this feature? I have read somewhere, it will but I want to make it clear.
I will PHP Laravel framework and my template is built on bootstrap html5 and my database will be MySQL,   all these technologies are compatible with this package? I know Laravel is ofcourse compatible with hyn but I am asking about MySQL.

Thank you.

What do you mean with limitations? It's MIT, do with it what you want.
The "old" management interface is no longer supported in 2.x of this package. There are no plans yet to add one again.
Adding tenants should be done from within your code, each use case is different.
Separating databases and code per tenant is possible, using system and global code is also possible. So no worries.
Frontend tech is irrelevant for this package.
MySQL and any database Laravel 5+ support, this package supports.

If there's anything else that requires clarification or I missed something, please let us know.

Thanks for the quick response. I am glad to know it will be great to use this package. My point # 1 about limitations is regarding to development, I want to ask Can I develop any type of application with whatever features with any kind of plugins in it or there are some limitations in this domain? Do you have a detailed documentation that explains how to start using it because I find this link for documentation https://hyn.readme.io/docs/eloquent-facade-tenant-system-model but I need more detailed one, if there is any please let me know I will very thankful to you.

Please tell me this one also, here on this link https://hyn.readme.io/docs/requirements it is mentioned that it must be PHP 7+ and I have PHP 5.6, so it means it won't be compatible with mine PHP installation?

So far I've not heard someone complain that something the envisioned was not possible due to using this package. There might be some tough work ahead depending on your goal, but with the help of ioc and laravel in general, you should be able to get there one way or another.

Thanks so much Luceos for all your answers.


Update to 2.0

Updates the mod to 2.0 without changing anything else

Sorry I'll do better lol. One sec

All done, apologies on being lazy. Also congrats on the chrome bug report!

The mod functions properly in 2.0 which is great, but I really don't think blahaj should spoil lol

I figured out why the spoilage couldn't be removed before. I just needed to make the mod load after space age by setting it as an optional dependency.


Shareable resource provider is mentioned in doc, but nowhere documented

File: themes/default/content/docs/intro/concepts/resources.md
Quote: "The third type of resource provider is shareable. You write it yourself and then you can distribute it so that others can use it."
However, I am not able to find any mention about the shareable resource provider anywhere else in the documentation. Does this option even exist? Or is it known under a different name?
I suggest that the doc is clarified.

Thanks @GoodMirek, we'll get this clarified!

This content has moved to https://www.pulumi.com/docs/concepts/resources/dynamic-providers/, but is unfortunately still there.


Azure Digital Twins 0.1.0 SDK

Includes support for 2020-03-01-preview API

Hi @c-ryan-k  please leave a link to your openapi spec PR, thanks

Hi @c-ryan-k please leave a link to your openapi spec PR, thanks

@isra-fel
https://github.com/Azure/azure-rest-api-specs/pull/9667

/azp run net - core - ci

@isra-fel - is there anything holding this back from being merged?
Once it's merged, how soon until we can get it released?

@c-ryan-k my bad, sorry
And Wes is right, the versioning guideline requires the first preview version to equal 1.0.0-preview.1: see https://github.com/Azure/azure-sdk-for-net/blob/master/doc/dev/Versioning.md


RS doesn't divide work over all crafters that are available

Issue description:
I have 2 crafters with the same pattern Iron Ore -> Iron ingot  and they are connected to furnace when i request 64 iron ingots all of the ore is getting to only one of the furnaces
What happens:
RS system doesn't divide work between all available crafters
What you expected to happen:
RS system do divide work between all available crafters
Version (make sure you are on the latest version before reporting):

Minecraft: 1.10.2
Forge: <IP_ADDRESS>
Refined Storage: 1.2.26

Does this issue occur on a server? yes

That is a 1.11+ feature, you'll have to use other solutions in 1.10.2 (eg. chest and EIO conduits with roundrobin).


Add note about Jacoco upgrade to upgrade guide

@bot-gradle test and merge

There's merge conflict between your PR branch and base branch. Please fix it and try again.

@bot-gradle test and merge

Your PR is queued. See the queue page for details.

I've triggered a build for you.


docs: Add Vibe

Thanks!

Hey @alexpate can you take a look pls? 🙏🏼

Sorry for the delay, thanks for adding this 🙏


Deadlink on CS Career Hackers

CS Career Hackers link expired
CS Career Hackers link is dead and also name seems to be changed to CS Career Hub
It should be updated with current invite link : https://discord.com/invite/ndFR4RF

Fixed with https://github.com/mhxion/awesome-discord-communities/pull/115. Thanks for reporting.


⚠ Bofrost.de has degraded performance

In 0f854f8, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1892 ms

Resolved: Bofrost.de performance has improved in 92a640b after 7 hours, 43 minutes.


New Future constructor: Future.void

If we want to change the signature of Future.value to feature a required parameter, then the shorthand, Future.value() (with zero args), used for Future<void>s or Future<Null> perhaps, would disappear. Future.void() would be a nice way to migrate code incrementally. Would there maybe be const / performance benefits to this as well?
Is there a similar incremental move for Completer.complete() (zero arguments)? Maybe a Completer.completeVoid() method? It would be cool to make it an extension method, in an extension on Completer<void>. Unfortunately, an extension on Completer<void> matches statically on any-and-all Completer types.

cc @jakemac53

A related thing I was realizing today is that once we are in sound mode everywhere, I believe that we have a much stronger case for changing Future.value to have a required parameter, with a dart fix to auto pass null for anything that calls it with no arguments today.
In a sound world, this only changes a guaranteed runtime failure into a static failure, where in an unsound world the runtime failure was not guaranteed, so it was a harder sell.

Would love to make that breaking change (and I'm sure there are a couple of other similar functions with an optional argument which is only really optional if the type parameter is nullable).
Adding Future.nullFuture or Future.voidFuture is possible, but it won't be const.
We have had enough trouble with out internal _Future._nullFuture which was created once in the root zone, and reused in other zones. Every fetch of Future.nullFuture would give you a future set to the current zone. It can be cached on the zone, so each zone only needs one, but it's equally likely that it will just be a new one each time. (Futures are not that big, and reusing a future is likely to make it end up in old-space and require old-to-new-space pointers when you add a new listener to it, which is bad for GC, according to my limited GC knowledge.)
(The internal "null future" was added as a hack to make some other code recognize it and avoid awaiting it, to be timing compatible with an earlier non-null-safe API where someone could return null and not be delayed. It wasn't done to save on allocations. Please don't write timing-dependent code.)

Would love to make that breaking change (and I'm sure there are a couple of other similar functions with an optional argument which is only really optional if the type parameter is nullable).

Completer.complete for sure, probably others too


in_app_purchase: How to validate receipts on iOS?

Hi!
I've made flutter app with auto-renewable subscriptions. It works well on Android, but from Appstore i received this letter:

Please give me advice, how to deal with it?

duplicate #61339

oh actually i think no. they are similar and can be closed by one PR but not duplicate

duplicate #61339
There is very laconic advice there. I have no idea how to realize this in flutter neither local nor server... (((
Maybe anyone flutter guru can send me steo-by-step lesson or so to deal with this quest?
Actually a lot of dart pub libraries (such a local_auth, etc) have samples what code one need to write in native - swift or kotlin to achive a result, but not in_app_purchase alas. I really got stucked. Some double-trouble it is.

@ValeriusGC this actually goes beyond what flutter handles, and this is really up to you how you handle purchase validation
here are basic steps to get server validation:

get serverVerificationData from in_app_purchase - on iOS this is base64 encoded string

if (purchaseDetails != null) {
  var verificationData = purchaseDetails.verificationData;
  if (Platform.isIOS && verificationData == null) {
    verificationData = await InAppPurchaseConnection.instance.refreshPurchaseVerificationData();
  }
  // call to backend
  final bool subscriptionActive = await firebaseRepository.validatePurchase(
    verificationData.serverVerificationData
  );
// ...
}

on server setup such function (i use nodejs firebase cloud functions for example)

/**
*  This function validates the user purchase on iOS.
*  It queries the data from the Apple verifyReceipt method, checks whether subscription is still active
*  and returns a boolean value.
*/
export const validatePurchase = functions.https.onCall(async (data, context) => {
   const { verificationData } = data;
   if (verificationData === undefined) {
      throw new functions.https.HttpsError('invalid-argument', 'Required `verificationData` field is missing');
   }
   const requestData = JSON.stringify({
      'receipt-data': verificationData,
      'password': itunes.password, // this is API key from appstoreconnect
      'exclude-old-transactions': true,
   });
   const headers = {
      'Content-Type': 'application/json',
      'Content-Length': requestData.length,
   };
   let res = await axios.post('https://buy.itunes.apple.com/verifyReceipt', requestData, { headers: headers });
   if (res.data.status === 21007) {
      res = await axios.post('https://sandbox.itunes.apple.com/verifyReceipt', requestData, { headers: headers });
   }
   const latestInfo = res.data?.latest_receipt_info;
   const pendingRenewalInfo = res.data?.pending_renewal_info;
   if (!latestInfo || !pendingRenewalInfo || !latestInfo[0] || !pendingRenewalInfo[0]) {
      functions.logger.log(`{ verificationData: ${verificationData}, status: ${res.data?.status}, false, description: no latest_receipt_info or pending_renewal_info }`);
      return false;
   }
   const graceMs = pendingRenewalInfo[0].grace_period_expires_date_ms;
   const now = Date.now();
   if (graceMs) {
      const value = now < graceMs;
      functions.logger.log(`{ verificationData: ${verificationData}, ${value}, description: grace period }`);
      return value;
   }
   const expiresMs = latestInfo[0].expires_date_ms;
   const value = now < expiresMs;
   functions.logger.log(`{ verificationData: ${verificationData}, ${value}, description: default period (no grace) }`);
   return value;
});

local validation is not reliable, heavy and not implemented in flutter
see https://github.com/flutter/flutter/issues/52522

Шt turns out that, that no way to realize it without making my own server?

yes, refer to https://github.com/flutter/flutter/issues/77232#issuecomment-790778672

i reconsidered, it's actually a duplicate of #61339 @TahaTesser

yes, refer to #77232 (comment)

I am really shocked! Do thousands of lone programmers build their own servers to get subscriptions? don't make me wrong, please, i can not believe this is really so complex.

i didn't say it's complex. you can always implement it your own by writing some native code
i updated my previous comment a bit as well

summarized all from above in https://github.com/flutter/flutter/issues/61339#issuecomment-790791205

Apple and Google both highly recommend handling the verification of receipts on the server-side. Since yesterday a codelab is available which will take you through the steps on setting up server-side receipt verification using Firebase. Even if you don't want to use Firebase as a backend solution, the codelab might be helpful as it discusses all steps necessary to verify a receipt in detail.
More information can be found in the store specific documentation:

Apple StoreKit: https://developer.apple.com/documentation/storekit/in-app_purchase/validating_receipts_with_the_app_store?language=objc
Google Billing Client: https://developer.android.com/google/play/billing/security

Local validation is also possible as the in_app_purchase API provides all the data necessary to do so, however since it is not recommended no examples have been worked out.
I will close this issue as I feel with the codelab there is clear information on how to handle the verification (be it server-side). However please don't hesitate to leave a comment if you have any more specific questions and I would be happy to re-open it.


Fix sample1 to base from Alpine

Why switch to alpine?

AFAIR, this was because the shell file failed to run somehow. I can't remember the exact details though.

ok, I don't mind using the alpine.


CodeBuild Reporting

US Gov West 1 recently received reporting support for CodeBuild. This PR just show cases that to see if it's something that the team would be interested in.
Report

Yeah I do need to do some IAM changes, but was interested on your thoughts of using the reporting feature prior to changing IAM roles etc. One question though, does the report link work for you?

Yeah I do need to do some IAM changes, but was interested on your thoughts of using the reporting feature prior to changing IAM roles etc. One question though, does the report link work for you?

Yeah I do need to do some IAM changes, but was interested on your thoughts of using the reporting feature prior to changing IAM roles etc. One question though, does the report link work for you?

I think it's a great addition. The report link works for me.

Yeah I do need to do some IAM changes, but was interested on your thoughts of using the reporting feature prior to changing IAM roles etc. One question though, does the report link work for you?

I think it's a great addition. The report link works for me.

Closing for now, until this is ready to be dusted off.


Do not wait 5 seconds in QuantumInstance by default

What is the expected enhancement?
VQE and the like are basically unusable with FakeBackends because the QuantumInstance is waiting 5 sec to get results.  It would be nice to have wait=0 by default.
For example, a 2Q problem takes 21min by default, verse 39sec on the same machine using a custom SPSA solver following this tutorial: https://qiskit.org/documentation/partners/qiskit_ibm_runtime/tutorials/sample_vqe_program/qiskit_runtime_vqe_program.html

Opflow is now deprecated soon to be removed. New features/enhancements are no longer a consideration.


chore(devtools): Delete testbench

copilot:all

Current dependencies on/for this PR:

main

PR #3326   👈

This comment was auto-generated by Graphite.


Remove Wait call to prevent deadlock

Prerequisites

[x] I have written a descriptive pull-request title
[x] I have verified that there are no overlapping pull-requests open
[x] I have verified that I am following the Nancy code style guidelines
[x] I have provided test coverage for my change (where applicable)

Description
The call to Task.Wait() causes a deadlock on many concurrent requests. This changes the method to do a synchronous copy instead.
Fixes #2533

This would imply we have a task that's not CAF'd somewhere?

CAF'd?

I was trying to not have to type ConfigureAwait(false) ;)

This would imply we have a task that's not CAF'd somewhere?

Yes, probably. How do you track those down? It would be interesting if we found it and it fixed the problem.

I think it might be time to look at #1920 again...

There's this:
https://github.com/aelij/ConfigureAwaitChecker
But I'm not sure that can be run as a solution wide (or project wide) analysis.

A few months back I ran the ConfigureAwaitChecker on the project. The only thing that stood out to me was #2471

We merging this bad boy? @NancyFx/most-valued-minions

@jchannon if we think that there is a stray ConfigureAwait(false) somewhere and that's the real cause, then I hope not

This might be worth setting up https://github.com/DotNetAnalyzers/AsyncUsageAnalyzers

Go go go :)
On Friday, 12 August 2016, Brian Surowiec<EMAIL_ADDRESS>wrote:

This might be worth setting up https://github.com/DotNetAnalyzers/
AsyncUsageAnalyzers
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/NancyFx/Nancy/pull/2534#issuecomment-239503583, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAGapi4Ct_ZhDdwwKhiW0PxI1YEF_X23ks5qfKiKgaJpZM4JiByT
.

So I added this to Nancy's project.json and ran dotnet build but I get no warnings about async stuff. Is this all I have to do to enable the analyzers?
"AsyncUsageAnalyzers":{
                    "version":"1.0.0-alpha003",
                    "type":"build"
                }

@jchannon wouldn't that just let the compiler know it's a buildtime dependency? Wouldn't you have to tell something (Roslyn?) to use it to analyze the code ?

No idea I can't find any info on how to use these analysers on Google. I
found something on style cop but guess that's different. That says you have
to point to a rule set location but not sure these async ones have these
On Saturday, 13 August 2016, Andreas Håkansson<EMAIL_ADDRESS>wrote:

@jchannon https://github.com/jchannon wouldn't that just let the
compiler know it's a buildtime dependency? Wouldn't you have to tell
something (Roslyn?) to use it to analyze the code ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/NancyFx/Nancy/pull/2534#issuecomment-239614939, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAGapuCvQaTmKkGV-qeMD6VmA2LVe8Ixks5qfaC-gaJpZM4JiByT
.

It looks like there's no tooling to setup/configure code analysis when you use Nancy.Next.sln (unless it's been moved) but it's there when using Nancy.sln. I'm putting together a PR for this right now that sets some of it up.

So are we confident after @xt0rted PRs etc that there is no CAF issue?

👀

@khellang could we update this please.. unsure if we should be merging or closing it? Thanks ❤

Update? I think this should be merged ASAP.

Done

@thecodejunkie @khellang I believe this pull request was overwritten during the merge of #2502 specifically by commit 6e46bc491665f7545338b473400f250b4d79c1b0 . Should I make a PR for the change that was intended by this pull request to prevent the deadlock? I discovered this while encountering a similar issue described by the OP in #2533 and wasn't sure why I was still experiencing it, but it looks like this PR was overwritten.

Hmm. Yeah, that's really bad. No clue how that got past a code review :confused:

😢 @davidallyoung mind re-sending the fix?

Sure, I should be able to get it in this evening. @thecodejunkie


feat: changed start icon

didn't changed the search icon since it'll be removed during the UI overhaul.

All icons are not replaced. Terminal needs more effort.

LGTM!


chore(scanner): scanner version 2.34.2

Description
Scanner previously did not validate digests prior to reaching out to registries. This version of Scanner now ensures any image/layer digests are validated prior to reaching out to the associated registry.
User-facing documentation

[x] CHANGELOG is not needed
[x] documentation PR is not needed

Testing and quality

[x] the change is production ready: the change is GA or otherwise the functionality is gated by a feature flag
[x] CI results are inspected

Automated testing

[ ] added unit tests
[ ] added e2e tests
[ ] added regression tests
[ ] added compatibility tests
[ ] modified existing tests

No
How I validated my change
Scanner E2E tests

Rerunning https://github.com/stackrox/scanner/actions/runs/10423223768 because I see it actually failed to build the tagged version (NVD...)

/retest

/retest


Styling the connected lines in Stepper widget

Hey, I'm beginner at flutter,  I actucaly faced this probelm, then I tried to fix it and it's work for me, so yeah, hope it'll be helpful.
also be in your mind that maybe I did this wrong, so a feedback will helpful.
here is the description:
This PR gives Stepper widget users ability to custom the lines that connect each node.
here is the result:
Before

After

Fixes #37229
Pre-launch Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[x] I signed the CLA.
[x] I listed at least one issue that this PR fixes in the description above.
[x] I updated/added relevant documentation (doc comments with ///).
[x] I added new tests to check the change I am making, or this PR is test-exempt.
[x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Gold has detected about 1 new digest(s) on patchset 7.
View them at https://flutter-gold.skia.org/cl/github/97576

@gspencergoog any updates?

@mub-pro Will you have the opportunity to integrate the above review comments? It's totally fine if you don't have time to do this, we'd be happy to (eventually) take care of it. Thanks for your contribution!

@mub-pro I'm going to close this PR for now to get it off our review queue, but please don't hesitate to submit a new PR if you have the time to get back to it. In the meantime I'll mention this PR on the issue so that anyone else who wants to pick it up can do so. Thanks again for your contribution!


Feature request: Add etcd components back

Describe the feature
etcd components were removed from Dapr a year or two ago. Could these be added back?
See: https://github.com/dapr/components-contrib/issues/818

Will be fixed by #2671

@taenyang please comment on this documentation issue: https://github.com/dapr/docs/issues/3269
Leave a comment /assign


New version: Baidu.TeraBox version 1.25.0

[X] Have you signed the Contributor License Agreement?
[X] Have you checked that there aren't other open pull requests for the same manifest update/change?

[ ] Have you tested your manifest locally with winget install --manifest <path>?
[X] Does your manifest conform to the 1.5 schema?

Microsoft Reviewers: Open in CodeFlow

Automatic Validation ended with:

Hi @SpecterShell,
Does this package have a dependency?

This "installer" seems to be the main executable of the program. Its dependencies can be found in the previous versions of the installers.
I guess they accidentally uploaded the wrong file to their server.


[Question] Requests aren't logged

Information

Version: 5.43.0
Packages:

Love this library, has made the development of a typescript node backend so streamlined.
TsED used to log all incoming requests, but all of a sudden they stopped. Is there a new configuration needed for this feature? My current ServerSettings is shown below.
Example
@ServerSettings({
  rootDir: __dirname,
  acceptMimes: ["application/json"],
  port: process.env.PORT || 5000,
  debug: !PROD,

  mount: {
    "/": PROD ? "dist/controllers/*" : "src/controllers/*"
  },

  mongoose: {
    url: PROD ? process.env.MONGODB_URI : "mongodb://<IP_ADDRESS>:27017/db1",
    connectionOptions: {
      useNewUrlParser: true,
      useUnifiedTopology: true,
      useCreateIndex: true
    }
  },

  logger: {
    debug: !PROD,
    level: "debug",
    logRequest: true,
    logStart: true,
    logEnd: true,
    disableRoutesSummary: true,
    requestFields: [
      "reqId",
      "method",
      "url",
      "headers",
      "body",
      "query",
      "params",
      "duration"
    ]
  }
})

This produce no logs on any type of request. Even on error.

Hello @alexichristakis
thanks for your issue. The fix will be released soon :)

Fixed