Operation Node

Operation Nodes currently have the fields

input - initial input to operation
during - input added over the course of the operations
output - the things come out of an operation
vessel - if needed, the container for the operation (bowl, sauce pan, dutch oven, etc)
tool - if needed, the tool for the operation (blender, oven, air fryer, etc)
intensity - if needed, a description of how to use the tool (high, low, 375°F)
terminate - if needed, a description of when the operation is done (60 seconds, 3 minutes, when thick, when temperature reaches 212°F, etc)
description - optional field to add a comment, such as "Will take approximately 15 minutes" for termination conditions like "when thick"

Questions

Should "intensity" be changed to "setting"?
Are vessel, tool, intensity (or setting), and terminate general enough to cover recipe steps?

Short answer.
Leave the intensity for now, the name is descriptive.
I think the vessel, tool intensity and terminate are enough, at least for the kind of recipes you plan on supporting.
But, maybe it will be clearer when we try to make more recipes.
When it's a bit more finished I can talk to my brother if you like.
He runs a small business making hand made chocolate pralines (or bonbons unsure of the English word?)
He also makes other chocolate creations and caramels etc....
Anyway his recipes are much more complicated compared to ice cream.
One praline has several components with multiple fillings, paint, shells etc...
So, it would be interesting to see if this method would work for him.
What tool do you use today to create your graphs? Would be nice to experiment a little.

@CAPE-PS - https://www.lucidchart.com/pages/ is what I used to make the ones I post to facebook.  I translated the pistachio from a lucidchart to pistachio.yaml by hand!  So a barebones editor is high on my list of thinks to prototype.
Your comment about "English" is important - it would be nice to think about what is needed if someone in the future wanted to present recipes in other languages.  For example, I've been thinking about terminate and how, in English, we might write "for 5 minutes" vs "until thick".  I'm thinking about adding a format field to the schemas that would indicate how to present the item.  So maybe a duration operations would have something like format: {en_US: "for {magnitude} {unit}"} but

does format need to be added to every operation node in a recipe?
if not, how is the format added to the schema?
and how is pluralization handled (minute vs minutes)?

Sorry for not replying sooner.
I'm not that familiar with schemas to know how hard it would be to add formats for different languages at a later time.
I would just go for English at the start and if needed add this at a later time.

@CAPE-PS - Before you posted your comment, I was working on a plan for specifying translatable strings and have since updated the schema files to reflect the idea. The framework will be in English and translatable strings must have an English variant, but it will support other languages.
I added a TODO list to the bottom of the README to show the status of the project.  Once I get through the first two items on that list, I'm hoping to work through a few example recipes and filling out registry entries for tools, termination conditions, etc based on the examples.
Once I get through a few more examples, I'll have some confidence that the overall framework will reasonably support recipes and then move onto prototyping some javascript to display nodes and eventually edit and do a complete graph layout.


Bridge destruction

Motivation and Context
Habitat as a whole has a fair number of bridge currently.  By my count, cpp sim -> bound python sim, bound python sim -> habitat-sim python simulator, habitat-sim python simulator -> habitat-api python simulator, habitat-api python simulator -> env.
Bridges do have their use, they allow for progressively higher level APIs as you get closer and closer to a use-case.  The geodesic_distance function in the habitat-api python simulator is a good example of this.  They also allow us to use python in locations where maximal performance doesn't matter and python is a better tool for the job than cpp.
Where the bridges fall down is that if you want to have a method in the cpp simulator and get it all the way up to the highest level, you have to write a lot of wrapper functions or do _sim._sim._sim.  This makes development and iteration on new things annoying.
This PR is a proposal for building this functionality with inheritance instead of using private member and wrapper method.  I rebuilt the of the bound python sim -> habitat-sim python simulator bridge with this idea.  This specific bridge does have one other use-case, the ability to destroy all things related to OpenGL explicitly.  I have replicated this functionality with a very carefully written close() method.
Here are the pros and cons the way I see it:
Pros

Less boiler plate code (I deleted almost 200 lines of code!)
Less things to document
It is currently confusing why once a method is bound to python from cpp why it doesn't show up in the simulator class

Cons

That close() method in cpp may or may not be a landmine.  We don't add new top level things often, but when we do, it's an extra step that needs to be done and done right
Less delineation between public/private APIs

How Has This Been Tested
Tests pass.
Types of changes
Fairly heavy refactoring.

More generally, is there any reason we have so many get/set functions exposed in Python instead of using PyBind properties to do it in a more pythonic way. Example from the PyBind tutorial:
 .def_property("name", &Pet::getName, &Pet::setName)

If we are going be changing the Python side of the API

This is not changing the python side of the API.  It is just removing the need for a lot wrapper functions.

Thanks, Erik. I like this refactor. Nice to see that one extra layer of simulator.py functions removed.

More generally, is there any reason we have so many get/set functions exposed in Python instead of using PyBind properties to do it in a more pythonic way.

Thanks for this suggestion. I'll add this to the list of considerations for python API design. This can be a separate change.

What are folks thoughts about merging this before or after the release cut for v0.1.5?


Add Python 3.6 to CI

Codecov Report

Merging #33 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #33   +/-   ##
=======================================
  Coverage   85.94%   85.94%
=======================================
  Files          34       34
  Lines        1160     1160
=======================================
  Hits          997      997
  Misses        163      163

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 375acc8...e241a44. Read the comment docs.


Youtube music download only

Requested Feature
Hello!
Is there any chance to make an mp3 download at the following url, for example, this: https://music.youtube.com/playlist?list=OLAK5uy_kp-e9UgqHLVAAXdL8bXiHh6rKWaz1RQdM. Now my files are generally downloaded, but meta-data is not added to them, as in the link from Spotify. The fact is that this artist (Neil Young) left Spotify and is only on youtube music, deezer, etc. So I wanted to download it from YouTube directly. Tell me is it possible?
Possible implementation
No response

Hey guys!
I found with the help of Google, a page with metadata in Spotify! Here it is https://open.spotify.com/album/4w1ccj8dChcGIWRMsZ2g1X. It turns out that Mr. Young is not quite gone from Spotify, so to speak. And the rest is a matter of technology! ;) The whole album downloaded safely, which makes me happy. Thanks for the script you make! I still use it.
So it goes!


Wip v2

SonarQube analysis reported 2 issues

 2 major

Watch the comments in this conversation to review them.


sleek: init at 0.3.0

Description of changes
Initial sleek at 0.3.0.
https://github.com/nrempel/sleek

Things done

Built on platform(s)

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

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

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Hi @NickCao, @marsam
Please help us review and merge this pull request, thank you so much!!


Symfony 2.7.* locked at psr/log 1.0.0

im using symfony 2.7.* and try to require composer require dizda/cloud-backup-bundle
and

i try to use version 3.5.0

I guess you have psr/log: 1.0.0 in your composer.json. Make sure it says psr/log: ^1.0.

@Nyholm no, but component symfony/symfony have in require "psr/log": "~1.0" and they deps components too.

Some of your dependencies or their dependencies is requiring psr/log: 1.0.0 instead of psr/log: ^1.0 or psr/log: ~1.0.
That package is doing things wrong. You should make a PR to that package to fix the issue. Im happy to help you with the other package, but this issue is not related to CloudBackupBundle.

Maybe changing your package.json in "psr/log": "^1.0.1" to "psr/log": "^1.0.0" would also be compatible with symfony 2.7.* since I do not demand in my package.json
see https://github.com/symfony/symfony/blob/v2.7.18/composer.json#L25

That does not make any sense Im afraid.
Like I said, your app or any of its dependencies have locked on psr/log: 1.0.0. Which means that your app or any of its dependencies do not support psr/log: 1.0.1 which is what composer is telling you.
Search your composer.lock file for "psr/log" and you will see what dependency that is creating this issue for you.


SecretsCertificate element in ApplicationManifest.xml

It wasn't clear to me from the article that adding the SecretsCertificate element to ApplicationManifest.xml was necessary to be able to decrypt the value. I had my certificate in the local machine store and the encrypted value in the settings.xml file, but a call to DecryptValue() threw an exception stating the certificate could not be located. Once I added the SecretsCertificate element with the thumbprint it worked, but the language in the article sounds like that is optional.

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

ID: 15436b0f-9b50-269f-7cab-36740b1f862c
Version Independent ID: 050deec3-d788-1d80-b826-f8ad644ed112
Content: Manage Azure Service Fabric application secrets
Content Source: articles/service-fabric/service-fabric-application-secret-management.md
Service: service-fabric
GitHub Login: @vturecek
Microsoft Alias: vturecek

To confirm, you are referring to this section?

Would something like the following be better:

The secrets should also be included in your Service Fabric application by specifying a certificate in the application manifest. Add a SecretsCertificate element to ApplicationManifest.xml and include the desired certificate's thumbprint.

@jhulbertpmn I went ahead and updated the doc. Once the PR merges the changes will go live after a few hours.


Custom theme with Custom Provider

I'm creating a Theme for MDX-Deck and I want to change current default Layout of the Presentation. After going though I thought I can be done with Custom Provider.
So I created the theme like this.

import Provider from './Provider';

export default {
...
  Provider,
};

My Provider is like
import React from 'react';
import { MDXProvider } from '@mdx-js/react';

import { Center } from '../Layout';

const Wrapper = (props) => ;

export default ({ children }) => (
  <MDXProvider components={{ wrapper: Wrapper }}>{children}</MDXProvider>
);

But i doesn't got applied to slides.
It works
Like this in my mdx file
export default (props) => {props.children};

# Heading

## Sub Heading

Some Text

---

## AbC

But from second slide onwards my em based font size get small since first slide has a media query to set 32px and it get destroyed  in next slide.
If you can help me on this I will be able to write guide on custom theming MDX-Deck

I was trying to provide my custom theme as well and found the Provider example in README very helpful:
https://codesandbox.io/s/github/jxnblk/mdx-deck/tree/master/examples/provider

@ZeningQu This is my https://github.com/iamchathu/mdx-deck-auth0 But footer doesn't get theme fonts.

I think you should export default (props) => {props.children}; in the top of every new slide like this
export default (props) => {props.children};

# Heading

## Sub Heading

Some Text

---
export default (props) => {props.children};

## AbC

I kind of did like this and it worked for me

I have been struggling with this as well.
Not sure, but I don't think the general theme is applied to a Provider, because it is not in the scope of the configured theme. I 'fixed' this by manually querying the Theme UI context via useThemeUI (a hook that gets the themeContext from the outer Provider), see the [docs][https://theme-ui.com/hooks]
Say you want to add a slide number to each slide, but you want to adhere to the same theme as the rest of the presentation:
import React from "react";
import { useDeck } from "mdx-deck";
import { useThemeUI } from "theme-ui";

export default function currentSlide(props) {
    const state = useDeck();
    const currentSlide = state.index;

    const themeContext = useThemeUI();
    const {theme} = themeContext;

    return (

            {props.children}

                { currentSlide }

    );
}

I am new in the world of MDX, mdx-deck, Gatsby, Theme UI and Emotion, so there is a good chance there is a better, more idiomatic solution out there.


How to Preprocess Files for fine tuning XLM-R?

❓ Questions and Help
Before asking:

search the issues.
search the docs.

What is your question?
Code

What have you tried?
What's your environment?

fairseq Version (e.g., 1.0 or master):
PyTorch Version (e.g., 1.0)
OS (e.g., Linux):
How you installed fairseq (pip, source):
Build command you used (if compiling from source):
Python version:
CUDA/cuDNN version:
GPU models and configuration:
Any other relevant information:

The checkpoint files contain sentencepiece models as well as the dictionaries.  You should apply the sentencepiece model to your text, and then use fairseq-preprocess with the provided dictionaries.


FTB Direwolf18 installation failing (at least with direwolf 1.18.0, not sure about the rest)

First of all, thank you for your work on this image - very useful and nicely developed.
Describe the problem
The issue I am facing:
After changing modpack version ID in docker-compose (2142 --> 2234), to update from direwolf18 1.5.1 to 1.8.0, the installer complained of not being able to download all mods, crashed the process and rendered the server unable to start.
2022/08/05 21:08:38 Downloaded 491 successful, 266 failed, 0 incomplete.
Using serverinstall_95_2234 file downloaded from FTB, will download all the required mods, but will also break something, because running the docker image will end up like this:
[22:24:21] [main/ERROR] [ne.mi.fm.lo.ModSorter/LOADING]: Missing mandatory dependencies: forge, forge, forge, forge, forge
After trying a lot of copying and trying to match required dependencies, I somehow ended up with:
[init] ERROR unable to locate the installed FTB server jar
minecraft_server.1.18.2.jar

While obviously, the file is present...
Thanks!
Container definition

version: "3"

services:
  mc:
    image: itzg/minecraft-server
    ports:
      - 25569:25565
      - 8127:8123
      - 21565:21565
    environment:
      EULA: TRUE
      TYPE: "FTBA"
      FTB_MODPACK_ID: "95"
      FTB_MODPACK_VERSION_ID: "2234" # 1.8.0
      MOTD: "Modded MC FTW! Direwolf 1.18 1.8.0"
      ONLINE_MODE: true
      SERVER_NAME: "FTB Direwolf 1.18 1.8.0"
      ENABLE_RCON: true
      ENABLE_QUERY: true
      QUERY_PORT: 21565
      INIT_MEMORY: "4G"
      MAX_MEMORY: "8G"
      TZ: "Europe/Budapest"
      ENABLE_QUERY: true
      ALLOW_FLIGHT: true
    tty: true
    stdin_open: true
    restart: unless-stopped
    volumes:
      - /mnt/ftb-direwolf18broken:/data

  db:
    image: mysql:5.7
    restart: always
    environment:
      MYSQL_DATABASE: 'dynmap'
      MYSQL_USER: 'dynmap'
      MYSQL_PASSWORD: 'dynmap'
      MYSQL_ROOT_PASSWORD: 'dynmap'
    ports:
      - '3306:3306'
    expose:
      - '3306'
    volumes:
      - /mnt/ftb-direwolf18-dynmap-mysql:/var/lib/mysql

Container logs
log.txt

As currently implemented there are a couple of challenges to solve  this. Since the container startup script downloads and uses FTB's installer, the failed downloads will be something their installer encountered. You may want to look closer at the installer logs to see if it gave any clues about why the downloads failed. You also may want to contact FTB.
As for upgrading in place, that's a tricky one since again the installer is taking over file management. As a result, the container startup doesn't know what to clean up from an upgrade. I'm afraid it might actually be easier to transplant the world data into a new container.

IIRC manually trying the container bundled installer (ftb_installer) resulted with the same download errors (seemingly a wget parsing bug?), while using the one downloaded from the link above downloaded all ~700 files successfully.

Ah, it could be. I do see in the script that it will skip downloading the installer if it sees one already downloaded. One thing to try is manually deleting ftb-installer -- the container itself doesn't bundle the installer, it just got downloaded during a previous startup.

This is an issue on FTB side. There were changes in the way they represent modpacks in their API, and that broke a lot of things. Here's a related issue: https://github.com/FTBTeam/FTB-Modpack-Issues/issues/1158
I tried doing a clean install, and it works without issues. The image is downloading the latest ftb-installer - 22.724.1015.
I've encountered those download issues in the past, I managed to go around them by removing version.json and running the installer manually, but this way, run.sh will not be created, and the error above will occur (unable to locate FTB server jar). This can be fixed by doing java -jar forge-1.18.2-40.1.67-installer.jar --installServer, it'll install forge correctly, and create run.sh.
Btw, I personally find the output of "unable to locate FTB server jar" misleading. It's not clear that it's outputting the .jar files it found, not the .jar files it wants.

Thanks @Rirush !
I'm not sure how to address this comment though:

I personally find the output of "unable to locate FTB server jar" misleading. It's not clear that it's outputting the .jar files it found, not the .jar files it wants.

Would you really want it to output all jar files present when it fails to find the forge server jar or run.sh? That would be a lot of files considering all the mods and the libraries of forge.

Would you really want it to output all jar files present when it fails to find the forge server jar or run.sh? That would be a lot of files considering all the mods and the libraries of forge.

No, of course not, that's too much :D It already outputs the list of all .jar files in the /data directory (https://github.com/itzg/docker-minecraft-server/blob/master/scripts/start-deployFTBA#L85), but from the wording, it might seem that those are the files it searches for, instead of those that it found. Maybe adding a remark that those are the files in /data would clear it up, not sure.
Also, the only way to find out what files actually can the script launch seems to be to look at the sources of that script. Not sure, but it might be better if that script outputted $variants, so that when you encounter this issue, you know what files can satisfy it.

Would you really want it to output all jar files present when it fails to find the forge server jar or run.sh? That would be a lot of files considering all the mods and the libraries of forge.

Yeah, if upstream makes breaking changes it's complicated. I do think a slightly more verbose error message mentioning the locations it looked for the installer would be helpful though.

Yep, output has been adjusted in the most recent image.


Move table segment handling from parser to token generator

Fixes #4390 .

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@896c857). Click here to learn what that means.
The diff coverage is 57.95%.

@@            Coverage Diff            @@
##             master    #4415   +/-   ##
=========================================
  Coverage          ?   54.97%
  Complexity        ?      332
=========================================
  Files             ?      953
  Lines             ?    18473
  Branches          ?     3413
=========================================
  Hits              ?    10156
  Misses            ?     7661
  Partials          ?      656

Impacted Files
Coverage Δ
Complexity Δ

...here/sql/parser/PostgreSQLParserConfiguration.java
0% <0%> (ø)
0 <0> (?)

...l/parser/core/visitor/ParseTreeVisitorFactory.java
0% <0%> (ø)
0 <0> (?)

...ingsphere/sql/parser/MySQLParserConfiguration.java
0% <0%> (ø)
0 <0> (?)

...ingsphere/sql/parser/SQL92ParserConfiguration.java
0% <0%> (ø)
0 <0> (?)

...phere/sql/parser/SQLServerParserConfiguration.java
0% <0%> (ø)
0 <0> (?)

...ngsphere/sql/parser/OracleParserConfiguration.java
0% <0%> (ø)
0 <0> (?)

...ere/sql/parser/sql/statement/SQLStatementType.java
100% <100%> (ø)
0 <0> (?)

...rdingsphere/sql/parser/core/constant/RuleName.java
100% <100%> (ø)
0 <0> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 896c857...cd6baaf. Read the comment docs.

Pull Request Test Coverage Report for Build 9717

22 of 29 (75.86%)  changed or added relevant lines in 2 files are covered.
7 unchanged lines in 5 files lost coverage.
Overall coverage increased (+0.3%) to 58.594%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

shardingsphere-sql-parser/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/visitor/impl/MySQLDMLVisitor.java
0
3
0.0%

sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/sharding/rewrite/token/generator/impl/TableTokenGenerator.java
22
26
84.62%

Files with Coverage Reduction
New Missed Lines
%

shardingsphere-sql-parser/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/visitor/impl/OracleDMLVisitor.java
1
0%

shardingsphere-sql-parser/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/visitor/impl/PostgreSQLDMLVisitor.java
1
0%

shardingsphere-sql-parser/shardingsphere-sql-parser-sql92/src/main/java/org/apache/shardingsphere/sql/parser/visitor/impl/SQL92DMLVisitor.java
1
0%

shardingsphere-sql-parser/shardingsphere-sql-parser-sqlserver/src/main/java/org/apache/shardingsphere/sql/parser/visitor/impl/SQLServerDMLVisitor.java
1
0%

sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/util/IpUtils.java
3
76.0%

Totals

Change from base Build 908:
0.3%

Covered Lines:
10824

Relevant Lines:
18473

💛  - Coveralls


API docs for ModelBuilder.cs

BTW the diff won't show up online because it is too large (there is a lot of API in this file). Need to pull changes locally or use https://github.com/aspnet/EntityFramework/pull/1647.patch (it's all additive comments so the lack of syntax highlighting isn't horrible).

I wonder if this constructor is a pit of failure:
        /// <summary>
        ///     Initializes a new instance of the <see cref="ModelBuilder" /> class with an empty model.
        ///     The builder will not use any conventions and the entire model must be explicitly configured.
        ///     To specify conventions to be used, use a constructor that accepts a <see cref="ConventionSet"/>.
        /// </summary>
        public ModelBuilder()
            : this(new Model())
        {
        }

especially since in the old stack it would give you a fully functional, convention-based model builder.

This is really an API review comment (as was the last one) but I'm concerned about the use of "internal" here:
protected internal ModelBuilder([NotNull] InternalModelBuilder internalBuilder)

"Returns an object that can be used to configure a given entity in the model." Entity type?

"// TODO Add info about value generators when we have API sorted out for adding/customizing them" I think this will more often be used without also setting a value generator explicitly because the provider will determine the correct generator to use based on the type of the property and what it supports. I think it would be worth documenting this.

UseStoreDefault:
Configures whether a default value generated by the store is used for this property when the entity is saved and no value has been set.
Practically speaking, this means that if you create a new entity, don't set a value for this property, and save (insert) that entity, then the column default will be used and propagated back to the entity. If you do set a value, then the value set will be saved.

Not sure if I understand this:
If multiple reference key properties are specified, the order of reference key properties should match the order that the primary key or unique index properties were configured on the principal entity.

It would be unusual to use this call to point to a primary key because we do that by default. It would also be unusual to explicitly specify a unique index because one will be created by convention once you use this call to specify an alternate principal key. Also, you could use the same properties as the principal key or any unique index but in a different order, in which case you would be creating a new alternate key/unique index different from the existing one. This would be unusual, but is perfectly valid.

"one-to-many or zeroOrOne-to-many relationship." I don't think we should use these terms--I had a discussion with Diego about this a while back. They imply a level of abstraction that doesn't really exist, especially when you get to 1:1 type relationships. EDM and the old state manager gave some illusion that they existed, but even that was largely smoke and mirrors. In reality, all that Required does it determine whether the FK is nullable or not. If we want to describe that in non-relational terms we could talk about whether the reference navigation can be null or not.

:shipit:

Regarding the 'pit of failure constructor' I think it is... I took a few notes on the API surface as I was going and that was one of them. I think we need to make it more obvious how to construct with the default set of conventions.


Adding a simple MultiChildRenderObjectWidget should have less boilerplate

We should create a RenderMultiChildProxyBox similar to RenderProxyBox.

When we say "API Stability", do we mean "fixing this will be a breaking change" ? If not, we could consider moving this out to M3.

When we say "API Stability", do we mean "fixing this will be a breaking change" ?

Yes.

(Or at least we think there's a good chance it might.)

I'm not entirely sure what we should do here, but it seems like we should be able to do it without breaking the API.

I'm going to close this. We don't need to track this particular problem independently. If it becomes a real issue we'll just fix it.


refactor(Probability): Make kernels a type

Turn kernel : AddSubmonoid (α → MeasureTheory.Measure β) into Kernel : Type _. This is similar to #12386 but here to gain access to dot notation rather than for performance reasons.

A later PR will rename the predicates like IsMarkovKernel, IsFiniteKernel... to use dot notation.

Thanks for the quick review!
bors merge


Document annotation: pod-security.kubernetes.io/enforce-policy

This is a Bug Report

Problem: Pod Security admission sets an annotation, pod-security.kubernetes.io/enforce-policy. However, this annotation is not registered / documented.
Proposed Solution:
Add that annotation to Well-Known Labels, Annotations and Taints.
Page to Update:
https://kubernetes.io/docs/reference/labels-annotations-taints/

Kubernetes Version:
v1.23
Additional Information:
/sig auth
/language en
/priority backlog

/triage accepted

It piqued my curiosity, and the label was added by this commit (link in the mirror repo). It's an audit annotation that it's returned in the response of the admission control. It is only visible in audit logs but I think it is still relevant to be on the cited page.
/assign

@mtardy if you're willing to expand this issue to cover all the audit annotations that Pod Security admission sets, that's even better.

Yes, that would be a good idea, I found the PR that added these annotations. There are three annotations added by this change in the audit logs:

pod-security.kubernetes.io/exempt
pod-security.kubernetes.io/audit-violations
pod-security.kubernetes.io/enforce-policy

I think I can start writing the doc, I explored the commits, the code of the admission and experimented to trigger those annotations in the audit logs to see them act live. Thanks to the super Pod Security tutorial, I was able to start a minikube cluster with the audit logs and the custom AdmissionConfiguration quite fast!

/sig docs

Fixed in https://github.com/kubernetes/website/pull/31602
/close

Thanks @mtardy


ompstub causes problems with existing OpenMP code

I'm part of a larger project where we use OpenMP and someone added a dependency to OpenBLAS recently, and I've just noticed that now omp_get_max_threads, omp_get_thread_num, and omp_get_num_threads return unexpected results (1, 0, and 1 respectively), presumably due to ompstub.dll overriding these functions. Our OpenMP code does appear to run with multiple threads despite omp_get_max_threads returning 1 which is a bit confusing if nothing else. (This is on Windows, using dynamic linking; I don't know how the other parts of our team are using OpenBLAS unfortunately.)
I don't see much documented about this ompstub library or why it's needed (other than a few old issues here.) Can someone explain? If it can't be avoided, what are the strategies for working around the inconsistent omp function returns. (And apologies in advance since I don't know anything about OpenBLAS itself.)

Are you compiling OpenBLAS yourself, or are using some provided binary ? There is nothing in our build files that expressly links in ompstub, so this is probably some compiler default based on the options it was started with (I strongly suspect the stub comes in automatically when not; building with OpenMP support, i.e.when USE_OPENMP is not set.)

see also #3069

Thanks for the replies. I don't know if we compiled it ourselves - I'm guessing not but I can ask around internally (but unfortunately, since it's a big distributed project, things tend to appear "out of nowhere").
I've seen #3069 but I don't follow all the details. Can you help "bottom line" it for me? Sounds like if we rebuild OpenBLAS ourselves against a newer version of flang (maybe with the mp flag?) this might be resolved...?

At least worth trying to build everything with same compiler, using same OMP library.


Use the proper output filename when invoking prettier

When using near-operation-file where the configuration doesn't point to a file, prettier was invoked incorrectly
For example, with this:
 ./packages/app/src:
    preset: near-operation-file

The filename passed to prettier was ./packages/app/src and not the actual generated file name

Thank you @mvestergaard !


Responsive variants

Is your feature request related to a problem? Please describe.
We are re-writing our component library and want to leverage Tailwind. One big impediment is responsive props. For instance, we have a Card component with two sizes sm | md and we would like to be able to update the size based on the breakpoint. Given that tailwind offers responsive classes out of the box e.g. sm:text-sm md:text.lg, it would be amazing to extend this to variants. I have no idea if this is something that tw-classed can do, though.
Describe the solution you'd like
I'd like to have the option to do something like this:
<Card size="sm lg:md" />

This means that the card will have a size sm by default and size md on breakpoint lg.
Describe alternatives you've considered
We are toying with some other ideas entirely based on classes like so:
<Card className="card-sm lg:card-md" />

This is not bad but it's a departure from the standard React way of building components with props.

Unfortunately the limiting factor is Tailwind itself. I recommend taking a look at https://www.tailwind-variants.org/
Its the equivalent of tw-classed's vanilla API but with support for native variants.


When tileset fails to load, report all heights not sampled

Previously, we rejected the future. Now, we resolve it, and report all heights as having failed to sample. This should be easier for users to deal with because they don't need to handle two different types of errors in their height queries.

I'm merging this for today's release.


tweak HTTP status code language

is any further clarification needed?

This looks good to me.  Is this good to merge? /cc @OAI/tdc

@dret I tried to fix the merge conflict, but ended up needing to create a new PR.  Do you want to update the PR and I'll merge it, or do you want me to merge my version of your PR and close this one?

how would i update the PR? i am mostly curious how this works.... ;-)
On 2016-09-12 15:42, Darrel wrote:

@dret https://github.com/dret I tried to fix the merge conflict, but
ended up needing to create a new PR. Do you want to update the PR and
I'll merge it, or do you want me to merge my version of your PR and
close this one?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/OAI/OpenAPI-Specification/pull/723#issuecomment-246518723,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABw1JLoGUMoL_YOpogipmSKTcAxnhhoiks5qpdVWgaJpZM4JEPF0.

--
erik wilde |<EMAIL_ADDRESS>|
| http://dret.net/netdret    |
| http://twitter.com/dret    |

on the other hand, given that it's just two text fixes, maybe the easiest thing to do for you is to just use our own PR? i think i am fine either way.

@dret I'm not really sure how it works with PRs from forks.  I'm guessing you would just checkout your PR branch and then push it back up and GitHub will update the PR, but not 100% sure.  Regardless, I have a pr/723 branch now.  I'll merge that one.

Applied using PR #787

@darrelmiller If your branch contains all commits of some other branch, then merging your branch automatically marks the PR of the other branch as merged, too.
This doesn't seem to apply here, as you used a rebase instead of a merge commit to resolve the commits, as it seems.


Handle case of memory limit not set.

If the memory limit isn't set, the server extension raises an exception by doing int(None). This fixes it.

Just verified the fix on my deployment @yuvipanda

@yuvipanda I've tested this too by.

better nate than lever!


Add keyword searching to $FML

Added via https://github.com/UclCommander/Dan/commit/20f0b82308a8d1d85b0342858695769ee55f3e29


On make file gerber can rename .gbr to .gtl .gbl and all ?

On make file gerber can rename .gbr to .gtl .gbl and all ?
        pcbnew.F_Cu:      '[boardProjectName].GTL',
        pcbnew.B_Cu:      '[boardProjectName].GBL',
        pcbnew.F_SilkS:   '[boardProjectName].GTO',
        pcbnew.B_SilkS:   '[boardProjectName].GBO',
        pcbnew.F_Mask:    '[boardProjectName].GTS',
        pcbnew.B_Mask:    '[boardProjectName].GBS',
        pcbnew.Edge_Cuts: '[boardProjectName].GKO',
        pcbnew.In1_Cu:    '[boardProjectName].G2L',
        pcbnew.In2_Cu:    '[boardProjectName].G3L',

thankyou

Why is that necessary?

This is possible with this checkbox in the Plot dialog, quite sure it's also possible using the Python API

I think some old PCB houses used the extensions to determine which layers are which, but most ones these days understand the KiCad layer names and don't really need this anymore. However having this as an option could be nice.

Why is that necessary?

some software can't display layer *.gbr

I could easily add this by tossing in a popt.SetUseGerberProtelExtensions(True) in this section
https://github.com/Bouni/kicad-jlcpcb-tools/blob/main/fabrication.py#L85-L113
But to make it selectable by the user that would require a checkbox somewhere and I don't want to clutter the main window with more options.
I think I create a new modal that comes up on clicking the generate Gerber button. There you can select various option and click an actual generate button to generate the files.
Or maybe its time for a settings menu? 🤔
Not sure how to deal with this kind of things ...

add SetUseGerberProtelExtensions button on it

@Witawat That is exactly what I don't want! I do not want button on the main UI that just a very limited fraction of users will ever need.
I'll create som sort of settigs menu where you can set such options soon.

I'm totally agree the point is to generate gerber which work fine with JLCPCB and actual plugin do exactly that
I clearly do not see the point to add an other format which will bring nothing (except probably some problems with JLCPCB...)

If you need this you can add this line popt.SetUseGerberProtelExtensions(True) in fabrication.py somewhere in the generate_gerber method: https://github.com/Bouni/kicad-jlcpcb-tools/blob/main/fabrication.py#L85-L113
Maybe I'll add this to a settings menu later.


Frontend: Switch from EmailJS to NodeMailer for automatic emails

Two emails:
Organization sign up:
To: [admin_email] (store this as an env var)
Subject: New org has signed up
Body:
New org has signed up
Org name: [org_name]
Status: [org_status]

User sign up:
To: [user_email]
Subject: Welcome to TSE Moneta!
Body:
Hi [user_name],
You've been signed up for TSE Moneta! To create a password and complete the sign up process, follow this link [link to reset password page with id].
-The Moneta Team

@navidboloorian What from/sender email address should we use?


Expand children when pattern matches

Hi,
I have collapsed tree for better performance. Is it possible on search to expand the root node if it contains child whose name matches the search value ?
Best

Could you please provide a demo on plunker (or any other service of your choice)?
Technically there's nothing that would stop you from keeping your nodes hidden because the filter operates on the data, not on DOM nodes.
I assume you have a piece of logic for enabling/disabling the child nodes. You'd have to incorporate the filter into that logic the same way it is now responsible for hiding (or dimming) the non-matching nodes (see the demo)

I also have this same issue. The tree is initially collapsed, and upon searching for a child node, no nodes are expanded. The best example (see plunk ) I have would be to type 'Kev' and nothing will happen. Then type 'Kevv' and as should be, nothing happens. BUT upon removing the extra 'v', the correct functionality ocurrs. I am not too sure why the child nodes are not expanded unless a typo happens and is corrected. I have tried to correct this but I just can't figure it out.

@TLenahan please compare your example and mine: http://plnkr.co/edit/NNSgfC0Qs8vr9iIZTJp2?p=preview
I added pattern && to collapsed attributes.
This is because attribute observer (which is used internally by the angular-ui-tree to allow toggling nodes using collapsed attribute) needs the value of the expression to change.
treeFilter matches when pattern is an empty string. A value filter returns must change to false and then back to true. This explains why a typo "helps".

Cool thanks for the help!
Also I'd like to mention that the subitemlist has to be called 'items'. I had problems using a custom name like 'childs'.
Do you have a solution of triggering the treeFilter if the user clears the input again? It will stay expanded currently. I think this is connected with the filter needing to change state.


Attempt subprojects/environments by longest match first

When using choice, the first matching parser wins. This means if we are trying a list of strings, and one is a prefix of another, the longest string should be attempted first, or the smallest will always win.

@OpsBotPrime merge thyself


Basic API structure

I am thinking of creating an Xdebug provider for this package

@joefitzgerald I am interesting in working on this repo. Do you have anything in mind related to this? I mean about the UI or what the base API should look like.

@steelbrain I did some research on the subject. I think that the best course of action is to create a common high level protocol that providers can then use directly in case the debugger is implemented in a form of a library or provide a translator to a different protocol.
To get the widest range of supported languages with minimal effort I suggest we focus on the following:

GDB/MI: support for C, C++, D, Go, Objective-C, Fortran, Java, OpenCL C, Pascal, assembly, Modula-2, and Ada. We can use the work done in https://github.com/xndcn/atom-debugger/.

DBGP: support for PHP, Python, Ruby, Perl, Tcl and NodeJS. Maybe we can create something similar that was done for vim in https://github.com/joonty/vdebug.

Browser DevTools: I've seen https://developer.mozilla.org/en-US/docs/Tools/Valence mentioned somewhere, but I'm not sure how useful it is.

Thoughts?

@wfdctrl are you on atom slack? I would love to collaborate with you on this

@steelbrain well I am now :smile:

To everyone subscribed on this, I'll be updating this reply to reflect API updates as we work them through. I'll make sure to note every significant change at the bottom, here's the object that the debugger service providers will export
{
  name: 'ruby',
  scopes: ['source.ruby'],
  supportedFeatures: ['repl', 'breakpoints', 'stepping'],
  statusChanged: Function(bool)<void>,
  stepIn: Function()<void>,
  stepOut: Function()<void>,
  pause: Function()<void>,
  resume: Function()<void>,
  breakPointAdded: Function(TextEditor, int lineNumber)<void>
  breakPointRemoved: Function(TextEditor, int lineNumber)<void>,
  replHandle: Function(String)<void>
}

I'm also thinking that we should assign certain objects to the debugger, like the repl console for example,
They could do
replHandle: function(contents) {
  this.console.write(parseInt(contents) + 1) // this is a stream, so you can even pipe into it
}

Changelog

Initial API proposed

Hey! That looks like linter's api! ;)
On Mon, Dec 28, 2015, 12:06 PM Steel Brain<EMAIL_ADDRESS>wrote:

To everyone subscribed on this, I'll be updating this reply to reflect API
updates as we work them through. I'll make sure to note every significant
change at the bottom, here's the object that the debugger service providers
will export
{
name: 'ruby',
scopes: ['source.ruby'],
supportedFeatures: ['repl', 'breakpoints', 'stepping'],
statusChanged: Function(bool),
stepIn: Function(),
stepOut: Function(),
pause: Function(),
resume: Function(),
breakPointAdded: Function(TextEditor, int lineNumber)
breakPointRemoved: Function(TextEditor, int lineNumber),
replHandle: Function(String)
}
I'm also thinking that we should assign certain objects to the debugger,
like the repl console for example,
They could do
replHandle: function(contents) {
this.console.write(parseInt(contents) + 1) // this is a stream, so you can even pipe into it
}
Changelog

Initial API proposed

—
Reply to this email directly or view it on GitHub
https://github.com/atom-community/debugger/issues/2#issuecomment-167629957
.

This is much better than my original idea, I should have looked at the linter API more closely. I guess it's best to leave the protocol choice to the providers and only define the API in terms of a contract. Things that are missing:
Crucial:

stepOver (aka next)
evaluate (evaluate an expression)
refresh (get the current line number, stack trace, local variables, watched expressions etc.)

Nice to have:

addWatch
removeWatch
different types of breakpoints: conditional, exception, watch...
disableBreakpoint (must-have for huge files)
enableBreakpoint
goToCursor or temporary breakpoints

Most of these are pretty much self explanatory... I think I'm going to start working on a DBGP provider, that way we get support for most languages Atom is actually used for.

I did some more research... I compiled a list of all protocols that should be supported:

Chrome: https://developer.chrome.com/devtools/docs/protocol/1.1/debugger#type-Scope
Firefox: https://wiki.mozilla.org/Remote_Debugging_Protocol
DBGP: http://xdebug.org/docs-dbgp.php
GDB/MI: https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI.html#GDB_002fMI

Only thing that is still missing are commands for Threads. @steelbrain I noticed you wanted to work on the Xdebug provider, which uses DBGP, maybe we should create a common repository and work on this together?

@wfdctrl Sure, We could create base packages on npm named like debugger-protocol-dbgp and debugger-protocol-chrome and then extend them in atom packages

@steelbrain This sounds like a great plan. I guess somebody already created a similar package for the chrome debugger https://github.com/DickvdBrink/chrome-debug-protocol, it might be of some use to us.

@wfdctrl I think we have a confusion among ourselves. What I'm trying to achieve is that we use the debugger protocols and talk to languages or programs and debug them and provide our own UI completely instead of exporting it to chrome dev tools or firefox dev tools. What you have linked seems to be like a remote-control of the UI of Chrome Dev Tools.
I would really appreciate it if you would clarify what you have in mind

@steelbrain there is no confusion here. The chrome remote debugging protocol allows debugging javascript that is running inside a browser. That means that we use our custom UI to drive a browser debugger directly out of the editor. I think eclipse supports something similar...

@steelbrain and I had a discussion about the console input and output.
There are currently two ways to go about this:

Start the program in an embedded terminal window.
Pros: simple, the stdin and stdout can be handled in one place by the base class.
Cons: console programs cannot be debugged remotely because the terminal window is not accessible in that case

Use the commands provided by the protocol.
Pros: remote access to stdin and stdout, therefore console programs can also be debugged remotely.
Cons: each provider has to handle stdin and stdout.

Any thoughts on this?


Inventory screen gets pushed to the right

If this is an intentional feature to make room for more effects would it be possible to make it configurable?  It compresses REI quite a bit.

The GUI shift is the same as the vanilla one in all modes, I'll see what I can do
And probably butcher config screen while at it...

The GUI shift is the same as the vanilla one in all modes, I'll see what I can do
And probably butcher config screen while at it...

Oh, does vanilla do that?  I really appreciate that you're trying to address it then =]

Oh, does vanilla do that?  I really appreciate that you're trying to address it then =]

Addressed in 1.3.0


Resolve promise on completing drawImage

Hey not sure you're taking PRs but I hit an issue that I fixed locally so thought I'd share the solution. The issue I had was the promise for printImage was resolving before the image is actually drawn.
For example:
await printImage({
  path: "https://deno.land/images/deno_city.jpeg",
  width: 20,
});

console.log("This should be logged after image is printed!");

Results in the following output:

This PR adds a promise resolve once final frame is drawn, which allows proper await behaviour. Have also replaced showCursor with showCursorSync to avoid issues with sharing stdout resource.
With the fix, the output for the script above is:

Closing for now. Feel free to re-open 🙏

Fixed in version 3.1.0.


Fixed setting roundcubemail skin

E.g., when $ROUNDCUBE_SKIN is set to "cameleon", the sed command writes $config['chameleon'] = 'larry'; which doesn't seem to be quite right :)

Good, thanks!


Pipe for filterreset and stale conntrack handling for iptable

Currently stale conntrack entries for iptables are not handled and hence conntrack related test cases are failing.
Fixes: #261

/lgtm
/approve
This is required so that we can pass the 1 final failing IP TAbles testttttttttttt


Example

Do you have any example of Flaui being used in Python for eventual testing?
Or any documentation on how to use it?

Hi @digaumlv
There is currently no Getting Started page in this form.
However, we have some subpages like XPath functioning see --> https://gdatasoftwareag.github.io/robotframework-flaui/xpath.html
The documentation of all keywords for the Robotframework usage can be found here --> https://gdatasoftwareag.github.io/robotframework-flaui/
Active examples could be taken from the atests folder which shows the use of the keywords in detail.
https://github.com/GDATASoftwareAG/robotframework-flaui/tree/main/atests
The installation is carried out via --> pip install --upgrade robotframework-flaui
And the tests can then be called with the keen.bat test or individually via the robot command.
If this information is not sufficient, a How to use it might be very useful. which summarizes all the information.
Are you missing further information?


Configuration cache fails if a task uses a java record as a property type

Current Behavior
If a task which uses a java record as a property type is executed with configuration cache enabled it fails with an error along the lines of
* What went wrong:
Could not load the value of field `__inputRecord__` of task `:taskUsingRecordAsInput` of type `com.github.erdi.gradle.configuration.cache.bug.TaskUsingRecordAsInput`.
> Can not set final java.lang.String field com.github.erdi.gradle.configuration.cache.bug.InputRecord.value to java.lang.String

Expected Behavior
Tasks using java records as property types can be used with configuration cache.
Context (optional)
No response
Steps to Reproduce
A reproducer project can be found at https://github.com/erdi/gradle-record-input-configuration-cache-bug. After checking it out run ./gradlew :taskUsingRecordAsInput --configuration-cache to reproduce. Note that running ./gradlew :taskUsingRecordAsInput succeeds.
Gradle version
8.4
Build scan URL (optional)
No response
Your Environment (optional)
No response

Thank you for providing a valid report.
The issue is in the backlog of the relevant team and is prioritized by them.


AADSTS700211 invalid_client

Describe the bug
I'm getting the error AADSTS700211: WorkloadIdentityCredential: Microsoft Entra ID error '(invalid_client) AADSTS700211: No matching federated identity record found for presented assertion issuer 'https://oidc.prod-aks.azure.com/879-...-a6425/'. Please check your federated identity credential Subject, Audience and Issuer against the presented assertion. https://docs.microsoft.com/en-us/azure/active-directory/develop/workload-identity-federation Trace ID: REDACTED Correlation ID: REDACTED Timestamp: 2023-12-08 16:17:27Z'
Steps To Reproduce
Deploy Workload Identity v1.2.0 inside an AKS cluster v1.27.7
Create an AAD Service Principal and a k8s service account using the azwi cli:
azwi serviceaccount create \   --service-account-name "saName" \   --skip-phases role-assignment \   --subscription-id "<SUB_ID>" \   --aad-application-name "<AAD_APP_NAME>" \   --service-account-issuer-url "https://oidc.prod-aks.azure.com/879-...-a6425/" \   --service-account-namespace <K8S_NAMESPACE>
Create a pod associating the SA and with a label azure.workload.identity/use: "true"
Trying to authenticate and get a Key Vault secret using Python 3.10 with DefaultAzureCredential(), using azure-identity==1.15.0 lib
Expected behavior
Get the secret value.
Logs
WorkloadIdentityCredential: Microsoft Entra ID error '(invalid_client) AADSTS700211: No matching federated identity record found for presented assertion issuer 'https://oidc.prod-aks.azure.com/879-...-6425/'. Please check your federated identity credential Subject, Audience and Issuer against the presented assertion. https://docs.microsoft.com/en-us/azure/active-directory/develop/workload-identity-federation Trace ID: REDACTED Correlation ID: REDACTED Timestamp: 2023-12-08 16:55:37Z'
Environment

Kubernetes version (use kubectl version): AKS 1.27.7
Cloud provider or hardware configuration: Azure Public Cloud
OS (e.g: cat /etc/os-release): Ubuntu 20.04.6 LTS
Kernel (e.g. uname -a): 5.15.0-1051-azure #59-Ubuntu SMP Wed Oct 11 18:49:16 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Install tools:
Network plugin and version (if this is a network-related bug):
Others:

Additional context
AAD Service Principal is created without problems:
Fri, 08 Dec 2023 13:11:16 -03  role-assignment  workflow/runner.go:133  skipping phase
Fri, 08 Dec 2023 13:11:20 -03  aad-application  create/aadapplication.go:71  created an AAD application  {"name": "$AAD_NAME", "clientID": "d861-...-7de", "objectID": "4e11-...-8eec"}
Fri, 08 Dec 2023 13:11:20 -03  serviceaccount/create.go:175  --service-principal-name not specified, falling back to AAD application name  {"warning": true}
Fri, 08 Dec 2023 13:11:21 -03  aad-application  create/aadapplication.go:95  created service principal  {"name": "$AAD_NAME", "clientID": "d861-..-7de", "objectID": "9e0-..-9512"}
Fri, 08 Dec 2023 13:11:22 -03  service-account  create/serviceaccount.go:94  created kubernetes service account  {"namespace": "$K8S_NAMESPACE", "name": "$K8S_SA_NAME"}
Fri, 08 Dec 2023 13:11:24 -03  federated-identity  create/federatedidentitycredential.go:96  added federated credential  {"objectID": "4e11-...-8eec", "subject": "system:serviceaccount:$K8S_NAMESPACE:$K8S_SA_NAME"}

Name:                REDACTED
Namespace:           REDACTED
Labels:              <none>
Annotations:         azure.workload.identity/client-id: d861-...-7de
                     azure.workload.identity/tenant-id: 73d-...-26f
Image pull secrets:  <none>
Mountable secrets:   <none>
Tokens:              <none>
Events:              <none>

OIDC: az aks show -n $AKS_NAME -g $AKS_RG --query "oidcIssuerProfile.issuerUrl" -otsv
https://oidc.prod-aks.azure.com/879-...-a6425/
On AAD App Registration I can see all the values populated correctly (issuer, namespace, service account name).

+1

Have you looked at the troubleshooting guide: https://azure.github.io/azure-workload-identity/docs/troubleshooting.html#aadsts70021-no-matching-federated-identity-record-found-for-presented-assertion?
Check exact match for following in the Azure AD App:

Issuer URL
Service account name and namespace; this is the subject field in FIC system:serviceaccount:<sa namespace>:<sa name>.

@aramase Yep, all the data in Azure AD App has the right values (issuer URL, service account, namespace).
azwi populates it with the parameters that we pass to it, we do not populate it manually. We checked N times, recreated the service account and the Azure AD app, but the problem persists.

Having the same issue.
I am trying the following docs:
https://learn.microsoft.com/en-us/azure/application-gateway/for-containers/quickstart-deploy-application-gateway-for-containers-alb-controller?tabs=install-helm-windows
https://learn.microsoft.com/en-us/azure/application-gateway/for-containers/quickstart-create-application-gateway-for-containers-managed-by-alb-controller?tabs=new-subnet-aks-vnet
The result is the same error. I can see the resources on azure-portal but I am not sure what the problem is.

having the same issue with flux addon and workload identity on AKS

I ran into the same error message (without using the azwi cli) while using the Azure Secret store CSI driver, and for the life of me I couldn't figure out what was going on. Finally, I checked the secret store provider logs, and it turned out that I was deploying with the wrong keyvault configured 😮💨 . So if someone encounters this error you might want to double check your resource / authorization configuration

I had the same issue; restarting the keda-controller fixed the issue.

same issue here. any luck? Issuer URL (with the trailing slash), subject and audience all look good. Still hitting this error

adding correlation IDs if that helps for debuggin on your side
Content: {"error":"invalid_client","error_description":"AADSTS700211: No matching federated identity record found for presented assertion issuer 'https://eastus2.oic.prod-aks.azure.com/7******************/c*****************/'. Please check your federated identity credential Subject, Audience and Issuer against the presented assertion. https://docs.microsoft.com/en-us/azure/active-directory/develop/workload-identity-federation Trace ID: 93eb6af6-43b5-4b16-ad6e-63cf2a050b00 Correlation ID: 8f043819-8577-46b9-b330-a72e2e114665 Timestamp: 2024-03-01 07:41:07Z","error_codes":[700211],"timestamp":"2024-03-01 07:41:07Z","trace_id":"93eb6af6-43b5-4b16-ad6e-63cf2a050b00","correlation_id":"8f043819-8577-46b9-b330-a72e2e114665"}

This works if I use user-assigned managed identity only and not with an AAD app.
Is this communicated anywhere?

We are encountering the same issue as the original poster. I have validated the federated credential against the JWT token mounted to the pods and everything seems to match. Any updates?
{
  "aud": [
    "api://AzureADTokenExchange"
  ],
  "exp":<PHONE_NUMBER>,
  "iat":<PHONE_NUMBER>,
  "iss": "https://eastus2.oic.prod-aks.azure.com/yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx/",
  "kubernetes.io": {
    "namespace": "my-namespace",
    "pod": {
      "name": "test-pod",
      "uid": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
    },
    "serviceaccount": {
      "name": "my-service-account",
      "uid": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
    }
  },
  "nbf":<PHONE_NUMBER>,
  "sub": "system:serviceaccount:my-namespace:my-service-account"
}

![Federated Credential](https://github.com/Azure/azure-workload-identity/assets/17103771/1e6ee134-2c22-40b6-af55-c04ca76fdbdb)

I was also having this same problem. It took me longer than I care to admit to realize that I had a trailing \n character in the FIC issuer which the portal was not displaying. It was only visible in the raw JSON of the FederatedIdentityCredential.
Once I fixed that, everything was working well.
@aramase - wondering if these other issues might be a similar issue in either the issuer or subject identifier section... do we have a contact on the identity team who could verify if/why they even accept newlines in these fields? It seems like a bit of a foot-gun.

@aramase - wondering if these other issues might be a similar issue in either the issuer or subject identifier section... do we have a contact on the identity team who could verify if/why they even accept newlines in these fields? It seems like a bit of a foot-gun.

Have started a thread internally to discuss catching such errors as part of API validation. I'll update this thread once we hear back from the Entra team.

This has been a complete time suck trying to figure out what the issue was here and happy to have landed on this post with the appropriate search terms. As stated above, there is a problem with line endings. In my situation, \r was added to the end.
I get my OIDC Issuer from the following command:
az aks show --name "${CLUSTER_NAME}" \
    --resource-group "${RESOURCE_GROUP}" \
    --query "oidcIssuerProfile.issuerUrl" \
    --output tsv

The above output is stored as a variable and then used in the command to create the federated credential:
az identity federated-credential create --name ${FEDERATED_IDENTITY_CREDENTIAL_NAME} \
    --identity-name "${USER_ASSIGNED_IDENTITY_NAME}" \
    --resource-group "${RESOURCE_GROUP}" \
    --issuer "${AKS_OIDC_ISSUER}" \
    --subject "system:serviceaccount:${SERVICE_ACCOUNT_NAMESPACE}:${SERVICE_ACCOUNT_NAME}" \
    --audience api://AzureADTokenExchange

The output from creating the federated credential shows a line ending:
{
  "audiences": [
    "api://AzureADTokenExchange"
  ],
  "id": "<FIC_RESOURCE_ID>",
  "issuer": "https://westus3.oic.prod-aks.azure.com/aaaaaaaa-86f1-41af-91ab-aaaaaaaaaaaa/bbbbbbbb-0443-47ec-b4c5-bbbbbbbbbbbb/\r",
  "name": "<FIC_NAME>",
  "resourceGroup": "<RESOURCE_GROUP>",
  "subject": "system:serviceaccount:default:workload-identity-sa",
  "systemData": null,
  "type": "Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials"
}


Serve pre-compiled JavaScript for browsers

I want to be able to use Deno modules written in TypeScript directly from a browser without using Deno bundling.
See https://github.com/denoland/deno_std/issues/641#issuecomment-739518201.
This way great modules like from the standard library and others can be used and cached browser-side as an alternative to bundling. Probably most useful for one-off cases as bundling is probably still best for larger clients but for small use cases a direct import may be ideal.

Duplicate of https://github.com/denoland/dotland/issues/1728


!voteythumbs typo in reaction_removed

https://github.com/UQComputingSociety/uqcs-hubot/blob/master/scripts/voteythumbs.js#L112

Fixed in 91bbbf3, closing :)


SupportsReturningClause mysql

Problem Description
Following the get started guide step by step I was willing to run insert code with mysql.
        // ...
        let inserted = diesel::insert_into(entities::table)
            .values(&ext)
            .get_result::<Entity>(&conn)
            .unwrap();

But I was constantly getting a compile error.
the trait bound `diesel::mysql::Mysql: diesel::backend::SupportsReturningClause` is not satisfied
required because of the requirements on the impl of `diesel::query_builder::QueryFragment<diesel::mysql::Mysql>` for `diesel::query_builder::returning_clause::ReturningClause<schema::extension::columns::id>`
required because of the requirements on the impl of `diesel::query_builder::QueryFragment<diesel::mysql::Mysql>` for
...

And eventually (after figuring out that execute doesn't return id :smile: ) I took a look at the doc and it seems to me currently it's impossible to run such code with mysql since its supported only by postgress right?
https://docs.diesel.rs/diesel/backend/trait.SupportsReturningClause.html
What are you trying to accomplish?
If it's true I would consider adding some information somewhere that it's not work with mysql could reduce peoples time spent on trying to resolve it. Probably in get_result doc comment.
Comment
I may be incorrect in my assumptions in which case I am sorry :disappointed:
And thank you for the crate.

I would like to take this issue as first contribution to Diesel.
May I ask you @weiznich to assign it to me?

I would like to take this issue as first contribution to Diesel.
May I ask you @weiznich to assign it to me?

@thecooldrop Feel free to submit a PR for this. I should probably add that I don't think that get_result is the right place for this as get_result is available for queries using the mysql backend, just not for insert statements.

@thecooldrop Feel free to submit a PR for this. I should probably add that I don't think that get_result is the right place for this as get_result is available for queries using the mysql backend, just not for insert statements.

@weiznich Your comment is really confusing me since according to my analysis, given that MySql does not implement SupportsReturningClause we should not be able to have get_results for any of the statement types with MySql backend. Here is why:

RunQueryDsl::get_result<U>(self, conn: &Conn ) -> QueryResult<U> is defined only for those implementors of the trait which also implement the LoadQuery<Conn,U>
LoadQuery<Conn,U> is implemented only for those types which implement AsQuery whose associated AsQuery::Query associated type implements the QueryFragment<DB: Backend>.
The structs InsertStatement, UpdateStatement and DeleteStatement have AsQuery implementations, which have ReturningClause<T::AllColumns> as Ret type.
The QueryFragment<DB: Backend> is implemented only only for those statements whose Ret type parameters are themselves QueryFragment<DB: Backend> implementors
Due to (4) for QueryFragment<DB: Backend> to be implemented for the ReturningClause<Expr> the associated backend has to implement the SupportsReturningClause, which is only implemented for Pg, thus it can not be applicable to any of those statement types for any other backend.

This can be further complicated and nested if type parameter of 'Ret' of given statement type is again merely implementation of QueryFragment, where recursion continues down until we reach a Ret type whose type parameter is merely an expression.
Given the argumentation above, I would agree that complete documentation does not belong into RunQueryDsl::get_result<U>' method, but a simple remark saying that this method is applicable only to those backends implementing the SupportsReturningClause` is appropriate. Further a link to SupportsReturningStatement should be included to lead the readers, where further more detailed documentation can be placed

@weiznich Your comment is really confusing me since according to my analysis, given that MySql does not implement SupportsReturningClause we should not be able to have get_results for any of the statement types with MySql backend. Here is why:

RunQueryDsl::get_result<U>(self, conn: &Conn ) -> QueryResult<U> is defined only for those implementors of the trait which also implement the LoadQuery<Conn,U>
LoadQuery<Conn,U> is implemented only for those types which implement AsQuery whose associated AsQuery::Query associated type implements the QueryFragment<DB: Backend>.
The structs InsertStatement, UpdateStatement and DeleteStatement have AsQuery implementations, which have ReturningClause<T::AllColumns> as Ret type.
The QueryFragment<DB: Backend> is implemented only only for those statements whose Ret type parameters are themselves QueryFragment<DB: Backend> implementors
Due to (4) for QueryFragment<DB: Backend> to be implemented for the ReturningClause<Expr> the associated backend has to implement the SupportsReturningClause, which is only implemented for Pg, thus it can not be applicable to any of those statement types for any other backend.

This can be further complicated and nested if type parameter of 'Ret' of given statement type is again merely implementation of QueryFragment, where recursion continues down until we reach a Ret type whose type parameter is merely an expression.
Given the argumentation above, I would agree that complete documentation does not belong into RunQueryDsl::get_result<U>' method, but a simple remark saying that this method is applicable only to those backends implementing the SupportsReturningClause` is appropriate. Further a link to SupportsReturningStatement should be included to lead the readers, where further more detailed documentation can be placed

Just to confirm, get_result should not be implemented for insert queries on MySQL. As the compile error points out, MySQL provides no mechanism to perform an insert and get the resulting row in a single query (which is done using a RETURNING clause on PG).

Just to confirm, get_result should not be implemented for insert queries on MySQL. As the compile error points out, MySQL provides no mechanism to perform an insert and get the resulting row in a single query (which is done using a RETURNING clause on PG).

@sgrif It seems like the get_result method should not be implemented for update or delete statements for MySQL, or by extension of my argumentation above, for any backend other than Postgres. Did I miss something?

@sgrif It seems like the get_result method should not be implemented for update or delete statements for MySQL, or by extension of my argumentation above, for any backend other than Postgres. Did I miss something?

Nope, you didn't miss anything. PostgreSQL is the only driver we support by default for which we can reasonably implement this method. I'm just using language which excludes MySQL instead of language which specifies PostgreSQL since there are other SQL databases for which this could be implemented, that Diesel doesn't support out of the box, but for which a third party crate could provide a driver

Nope, you didn't miss anything. PostgreSQL is the only driver we support by default for which we can reasonably implement this method. I'm just using language which excludes MySQL instead of language which specifies PostgreSQL since there are other SQL databases for which this could be implemented, that Diesel doesn't support out of the box, but for which a third party crate could provide a driver

Nope, you didn't miss anything. PostgreSQL is the only driver we support by default for which we can reasonably implement this method. I'm just using language which excludes MySQL instead of language which specifies PostgreSQL since there are other SQL databases for which this could be implemented, that Diesel doesn't support out of the box, but for which a third party crate could provide a driver

Is there any guide on how to make a driver for such? I'm currently using MariaDB and it does kinda work but I lose support for get_result, if there are any guides I would gladly setup something even if just so I can temporarily use it.

@WildEgo Unfortunately we do not provide a guide how to implement a third party backend. I can outline some general steps you can follow to implement such a backend, but be warned that this is likely no easy task.
Basically you "only" need to provide types that implement Connection and Backend](https://docs.diesel.rs/master/diesel/backend/trait.Backend.html) + implement support for serialization and deserialization for a bunch of types. For a mariadb backend you can likely start from the existing mysql backend.
Additionally if you are really interested on working on this have a look on #1882. Contributions there are welcome and I will try to find time to provide some mentoring for that.

@WildEgo Unfortunately we do not provide a guide how to implement a third party backend. I can outline some general steps you can follow to implement such a backend, but be warned that this is likely no easy task. Basically you "only" need to provide types that implement Connection and Backend + implement support for serialization and deserialization for a bunch of types. For a mariadb backend you can likely start from the existing mysql backend. Additionally if you are really interested on working on this have a look on #1882. Contributions there are welcome and I will try to find time to provide some mentoring for that.

If you can get me a bit of guiding light on how to test it in real time and stuff I'll gladly try to do it even tho I'm kinda just out of reading the basic guide on rust, if I can make it it's good experience and so it is if I don't

@WildEgo Have a look at the CONTRIBUTING.md document. It contains quite a lot details about how diesel is setup.
If you really plan working on this I suggest to open a new discussion thread to start discussing a general strategy there and as soon as there are actual code changes open a WIP PR, to discuss the exact changes there.

Hi all,
do you planing solve problem with .get_result() related to MariaDB/MySql? It's not a big thing, but it will be really helpful.
diesel::insert_into(posts::table)         .values(&new_post)         .get_result::<Post>(connection)                 .expect("Error saving new post");

@RfDzDeveloper As already written above: For the Mysql backend that's impossible to solve due to restrictions of the SQL implementation. For MariaDB we would need a new backend to support this. We would accept contributions there, but we as maintainer team do not plan to implement that in the near future. Repeating these kind of questions does not chaneg the answers.

@sgrif I'd like to add some feedback after struggling with this(due to my own ignorance) while using MySQL/MariaDB. I suggest adding a note to the home page Inserting Data section as it doesn't mention MySQL/PostgreSQL support:

Also, is the below example query the best non-PostgreSQL way to retrieve the newly inserted record?
users::table
    .order(users::id.desc())
    .first(&mut conn)

@alexwatever Please do not ping people to ask your questions. Otherwise: Feel free to open a PR against the websites to change this guide. I personally feel that it is already pretty clear that the getting started guide uses postgresql as database system.

@alexwatever Please do not ping people to ask your questions. Otherwise: Feel free to open a PR against the websites to change this guide. I personally feel that it is already pretty clear that the getting started guide uses postgresql as database system.

@weiznich Fair enough, I apologise. I've removed my comment.

@weiznich the MariaDB has supported the "insert returning", so Maybe we could let diesel to solve this problem.

@jiker-burce Please don't ping me. Otherwise see my last comment above for an answer.


eWallet internal exchange mechanism

Simple Summary
Enables an eWallet server to perform exchanges and transfers from/to different minted tokens within its own eWallet environment.
Abstract
This RFC describes the standard endpoints, flows, request/response formats, error codes needed to allow an eWallet server to perform cross-token exchanges within its own eWallet environment.
It is expected that there will be following RFCs for exchanges across eWallet environments and across the OMG network.
Motivation
Prior to this RFC, the eWallet server is able to transfer values between accounts and/or users, if and only if the from and to are of the same minted token.
One of the main purposes of the eWallet is to enable exchanges of different minted tokens. Since, different mechanisms could be used and potentially impact future integrations with centralized & decentralized exchanges, it is important for this mechanism to be put up as an RFC and discussed before implementing.
Specification
Definitions

Internal exchange: An exchange transaction that happens within the same eWallet environment.

External exchange: An exchange transaction that involves a third-party, e.g. exchanging with a centralized or decentralized exchange services. The external exchange is out of scope of this RFC.

Exchange pair: A pair of minted tokens that are allowed to be exchanged.

Same-token transfer: A transaction whose its from_address and to_address are different, but from_token_uuid and to_token_uuid are the same.

Exchange transaction: A transaction whose its from_address and to_address are the same, but the from_token_uuid and to_token_uuid are different.

Exchange transfer: A transaction whose its from_address and to_address are different, and the from_token_uuid and to_token_uuid are also different.

Data schemas
EWalletDB.ExchangePair: Contains the data about a pair of minted tokens that are allowed to be exchanged.

from_minted_token (string)
to_minted_token (string)
rate (float)
reversible (boolean)
effective_at (datetime) - so the exchange rate can be set in advance

EWalletDB.Transfer: Contains the data about each transaction that happened.

To add:

from_amount (integer)
from_token_uuid (uuid)
to_amount (integer)
to_token_uuid (uuid)
metadata.exchange_rate (float, containing the exchange rate used for the transfer)

To migrate:

from_amount <- amount
from_token_uuid <- token_uuid
to_amount <- amount
to_token_uuid <- token_uuid

To remove:

amount (use from_amount and to_amount instead)
token_uuid (use from_token_uuid and to_token_uuid instead)

LocalLedgerDB.Transaction: A logical group of ledger entries that represents a single business event (e.g. a same-token transfer, an exchange transaction, an exchange transfer).
Each EWalletDB.Transfer item is one LocalLedgerDB.Transaction. One LocalLedgerDB.Transaction for an exchange has at least 4 LocalLedgerDB.Entry. For example:

transaction.type = “exchange”
transaction.metadata

exchange_pair_id
exchange_rate
exchange_reversed

transaction.entry[0], e.g. credit user 10 OMG
transaction.entry[1], e.g. debit exchange account 10 OMG
transaction.entry[2], e.g. credit exchange account 1 ETH
transaction.entry[3], e.g. debit user 1 ETH

Mechanisms
For internal exchanges, the operation happens at the DB's transaction level so it should be seamlessly handled within the eWallet server as long as the exchange operations are wrapped inside a single DB transaction.
At the API level, this can be represented as a typical /transfer endpoint, where the only difference is that for exchanges, the from_token_id and to_token_id have different values.
Same-token transfers (existing feature)

Alice has 100 AAA
Alice wants to send 10 AAA to Bob
Alice sends 10 AAA to Bob
Bob receives the 10 AAA from Alice

Example:
(Assuming subunit_to_unit = 1 for simplicity)

# EWalletDB.Transfer
{
  "id": "tfr_1234567890",
  "type": "internal",
  "from": "bal_alice_1111",
  "from_amount": 10,
  "from_token_id": "tok_AAA_1234",
  "to": "bal_bob_2222",
  "to_amount": 10,
  "to_token_id": "tok_AAA_1234"
}

# LocalLedgerDB.Transaction
{
  "uuid": "44d7fc38-b250-4456-a4e8-0d23dc52f310"
}

# LocalLedgerDB.Entry
[
  {
    "transaction_uuid": "44d7fc38-b250-4456-a4e8-0d23dc52f310",
    "type": "debit",
    "amount": 10,
    "wallet_address": "bal_alice_1111",
    "token_id": "tok_AAA_1234"
  },
  {
    "transaction_uuid": "44d7fc38-b250-4456-a4e8-0d23dc52f310",
    "type": "credit",
    "amount": 10,
    "wallet_address": "bal_bob_2222",
    "token_id": "tok_AAA_1234"
  }
]

Exchange transaction (proposed by this RFC)
This is when a user wants to exchange a token for another, where the sender and the receiver is the same address.

Alice has 100 AAA
Alice wants to exchange 10 AAA for 1 BBB with ExchangeAccount
Alice sends 10 AAA to ExchangeAccount
ExchangeAccount sends 1 BBB to Alice
If 3. or 4. fails, the transaction is reverted

Example:
(Assuming subunit_to_unit = 1 for simplicity)

# EWalletDB.Transfer
{
  "id": "tfr_1234567890",
  "type": "exchange",
  "from": "bal_alice_1111",
  "from_amount": 10,
  "from_token_id": "tok_AAA_1234",
  "to": "bal_alice_1111",
  "to_amount": 1,
  "to_token_id": "tok_BBB_1234"
}

# LocalLedgerDB.Transaction
{
  "uuid": "44d7fc38-b250-4456-a4e8-0d23dc52f310"
}

# LocalLedgerDB.Entry
[
  {
    "transaction_uuid": "44d7fc38-b250-4456-a4e8-0d23dc52f310",
    "type": "debit",
    "amount": 10,
    "wallet_address": "bal_alice_1111",
    "token_id": "tok_AAA_1234"
  },
  {
    "transaction_uuid": "44d7fc38-b250-4456-a4e8-0d23dc52f310",
    "type": "credit",
    "amount": 10,
    "wallet_address": "bal_exchange_2222",
    "token_id": "tok_AAA_1234"
  },
  {
    "transaction_uuid": "44d7fc38-b250-4456-a4e8-0d23dc52f310",
    "type": "debit",
    "amount": 1,
    "wallet_address": "bal_exchange_2222",
    "token_id": "tok_BBB_1234"
  },
  {
    "transaction_uuid": "44d7fc38-b250-4456-a4e8-0d23dc52f310",
    "type": "credit",
    "amount": 1,
    "wallet_address": "bal_alice_1111",
    "token_id": "tok_BBB_1234"
  }
]

Exchange transfers (proposed by this RFC)
This is when a sender wants to transfer a token and expects the receiver at a different address to receive a different token.

Alice has 100 AAA
Alice wants to send 1 BBB to Bob using his/her funds of 100 AAA via ExchangeAccount that has liquidity
Bob receives the 10 OMG from Alice (via ExchangeAccount)

Example:
(Assuming subunit_to_unit = 1 for simplicity)

# EWalletDB.Transfer
{
  "id": "tfr_1234567890",
  "type": "exchange_transfer",
  "from": "bal_alice_1111",
  "from_amount": 10,
  "from_token_id": "tok_AAA_1234",
  "to": "bal_bob_2222",
  "to_amount": 1,
  "to_token_id": "tok_BBB_1234"
}

# LocalLedgerDB.Transaction
{
  "uuid": "44d7fc38-b250-4456-a4e8-0d23dc52f310"
}

# LocalLedgerDB.Entry
[
  {
    "transaction_uuid": "44d7fc38-b250-4456-a4e8-0d23dc52f310",
    "type": "debit",
    "amount": 10,
    "wallet_address": "bal_alice_1111",
    "token_id": "tok_AAA_1234"
  },
  {
    "transaction_uuid": "44d7fc38-b250-4456-a4e8-0d23dc52f310",
    "type": "credit",
    "amount": 10,
    "wallet_address": "bal_exchange_3333",
    "token_id": "tok_AAA_1234"
  },
  {
    "transaction_uuid": "44d7fc38-b250-4456-a4e8-0d23dc52f310",
    "type": "debit",
    "amount": 1,
    "wallet_address": "bal_exchange_3333",
    "token_id": "tok_BBB_1234"
  },
  {
    "transaction_uuid": "44d7fc38-b250-4456-a4e8-0d23dc52f310",
    "type": "credit",
    "amount": 1,
    "wallet_address": "bal_bob_2222",
    "token_id": "tok_BBB_1234"
  }
]

Rounding method
The rounding method to use is "Round half to even", or the banker's rounding.
Exchange rates
Transactions are always made with the exchange amounts, not the rate. Although an exchange transaction is based on the exchange rate, the parties agree on the exchanging amounts, not the rate. This is important because the division remainders and the rounding will almost always cause the exchanging parties to get more or less tokens depending on the rounding method used.
Consequently, the UI must display the exchanging amounts and asks user to confirm the amount, not the rate. The rate can be displayed as a complimenting information.
/exchange.calculate endpoint
Calculate the amount of minted tokens to be exchanged, used for confirming the exact amount with the user before executing the actual exchange.

Use this endpoint to avoid discrepancies between how endpoint consumer and the server calculates the exchange amount.
Errors are returned if it is anticipated to happen in an actual transfer.

Request
Fields

from_amount (integer, optional)
from_token_id (string, required)
to_amount (integer, optional)
to_token_id (string, required)

Conditions

If from_amount is provided, to_amount will be calculated based on the exchange rate and rounding method.
If to_amount is provided, from_amount will be calculated based on the exchange rate and rounding method.
If both from_amount and to_amount are provided, and the amounts are the same as the server's calculation, a successful response is returned.
If both from_amount and to_amount are provided, but the amounts are different from the server's calculation, an exchange:invalid_rate response is returned.

Example
{
  "from_amount": 100,
  "from_token_id": "tok_AAA_1234",
  "to_amount": 100,
  "to_token_id": "tok_BBB_1234"
}

Response
{
  "version": "1",
  "success": true,
  "data": {
    "object": "exchange_calculation",
    "from_amount": 100,
    "from_token_id": "tok_AAA_1234",
    "to_amount": 100,
    "to_token_id": "tok_BBB_1234",
    "exchange_pair": "exg_AAA_BBB_123456",
    "exchange_rate": "1.00",
    "exchange_reversed": false
  }
}

/transfer endpoint
Exchange a certain amount of minted tokens between two addresses.
Request
Fields

from_amount (integer, optional)
from_token_id (string, required)
from_address (string, required)
to_amount (integer, optional)
to_token_id (string, required)
to_address (string, required)
exchange_account_id (string, optional)

The request may be sent without from_amount or to_amount and subjects to the same conditions as /exchange.calculate.
If the exchange_account_id is not provided, the exchange will be performed with the master account.
Example
{
  "from_token_id": "tok_AAA_1234",
  "from_address": "81e75f46-ee14-4e4c-a1e5-cddcb26dce9c",
  "to_amount": 100,
  "to_token_id": "tok_BBB_1234",
  "to_address": "4aa07691-2f99-4cb1-b36c-50763e2d2ba8",
  "exchange_account_id": "acc_01ca2p8jqans5aty5gj5etmjcf",
  "metadata": {},
  "encrypted_metadata": {}
}

Response
Use the current response format (returns a list of affected wallets).
Error codes

transaction:insufficient_funds - when requestor does not have enough funds to exchange.
exchange:insufficient_funds - when the counterparty does not have enough funds to exchange back. It is important to distinguish between the user and the counterparty so that user-friendly error message can be displayed, and the user knows if its the counterparty's funds or theirs that is insufficient.
exchange:pair_not_found - when request requires an exchange pair that does not exist.
exchange:pair_not_reversible - when request requires an exchange pair that exists, but the pair does not allow to be exchanged in the opposite direction.
exchange:invalid_rate - when the provided exchange amounts or the exchange rate is invalid.

Rationale

Round-half-to-even or banker's rounding is used as it is commonly used in financial systems. It is also the default rounding mode for IEEE 754 (IEEE Standard for Floating-Point Arithmetic).

The exchange account defaults to the master account (the top-level account) for ease of use. However, for larger use cases, it's expected that an exchange_account_id is provided as it's probably not ideal for all exchange transactions to go through the master account (for separation of concerns and accountability). This exchange_account_id would also allow for more use cases, e.g. dedicate an account as the exchange account and put funds in there. It is then possible to limit the amount of tokens that can be exchanged by limiting the funds that the account has.

This RFC chose to reuse the /transfer endpoint because of its similarities to an exchange transaction and exchange transfer. An exchange transaction is basically a transfer of different tokens to the same address, while an exchange transfer can be represented by a transfer that has different from/to tokens.

There could be a discrepancy between the time /exchange.calculate is made and when /transfer happens. Given that this is an internal exchange and exchange rates are fixed, unchanged for most of the time. The discrepancy will be very rare to occur.

References
Mostly from internal discussions. Any suggestions for the references (either for or against this RFC) is appreciated.

@ripzery mentioned on Jun 6, 2018, 10:47 PM GMT+7:
Question about exchange_account_id:
Let's say we have accounts a1, a2, a3 and master.  a1 want to do Exchange transaction or Exchange transfer with a2. The question is how does a1 know which account has sufficient fund to make the exchange successful?
I also wonder that should a1 interest about which account is going to act as an Exchange?
If a1 doesn't have any reason to interest, then is it possible to remove an exchange_account_id and let the API automatically pick some account that has sufficient fund with some priority mechanism to make the exchange successful? When the API cannot find an account which has enough fund, then return some error.

@unnawut mentioned on Jun 7, 2018, 12:54 PM GMT+7:
I have two scenarios while designing this:
Scenario 1: Enterprises - Large entities that need multiple accounts.

master account
a1 for branch1
a2 for branch2
a3 as a dedicated exchange account
a4 for a "June 8 - June 30 Summer Sale Point Exchange" program

Having these accounts enable the entities to control budget & funds for their logical groups easily.
I anticipate these entities will want exchanges to happen with a specific account in order to manage their funds accurately. The system should not simply exchange with an account that has sufficient fund and hence exchange_account_id is needed.
Scenario 2: SMEs - Entities that need only one or relatively few accounts.
But not all ewallet providers will need a complex account setup, and having master as their exchange account is sufficient enough. Hence the Rationale #2 for defaulting to master account.
Although I'm not so sure if defaulting to master account is a good enough idea since this means not providing exchange_account_id in the Enterprise scenario will default to master account which might not be desirable.

@unnawut mentioned on Jun 7, 2018, 6:42 PM GMT+7:
Actually since now /user.credit_wallet and /user.credit_wallet also requires the account_id input (ref), it's probably good to be explicit about the exchange_account_id as well.
I'm inclined to remove an exchange_account_id default value out of this RFC unless anyone disagrees.

@T-Dnzt mentioned on Jun 11, 2018, 4:20 PM GMT+7:

I agree, let's make the exchange_account_id mandatory since we've started doing that everywhere. Other than that, looks good to me! I have some doubts about the exchange being made by an account on behalf of a user instead of the user getting the exchanged value and that value being transferred to the other user afterwards... but I guess it removes a transaction in the user's logs that they don't really care about.

Let's not use metadata to store internal values, we can add more columns if needed.
The type for the Transfer should probably be internal_exchange if we really want to have a type for that. Thoughts?

@jarindr: Should we add something like balanceBefore balanceAfter ? it would be quite hard to track the balance after that specific transaction happen.

balanceBefore & balanceAfter is a bit tricky. It could be done either:

Start with balanceBefore, perform the transaction, query for balanceAfter after the transaction.
Start with balanceBefore, calculate the balanceAfter by adding the transaction amount.
Start with balanceAfter, calculate the balanceBefore by subtracting the transaction amount.

All of which could produce different results for the same transaction from parallelism.
However, right now /transfer returns a list of affected wallets instead of the transaction. This should be changed to return the transaction object. Then I think it's up to the client how to display it (the client then has enough information to do any of the above choices).
TLDR: Let's change /transfer to return the transaction data instead of affected wallets and let clients determine balanceBefore and balanceAfter the way it suits them.

Also I've updated /transfer to return the transaction object instead of a list of affected wallets. The wallet balances can still be retrieved (separately) by using the wallet address in the transaction object.

@unnawut is it possible to keep both list of affected wallets and tx? there are a few use case for that

@jarindr @T-Dnzt The returned transaction contains the wallet addresses. I could embed the wallet object next to the addresses. Would that work?

@unnawut yep, that would work for me. maybe @T-Dnzt will have comment on that.

@T-Dnzt Stumbled upon this while doing the bookkeeping entries...
Since an account can contain multiple wallets, replacing exchane_account_id with exchange_wallet that takes a wallet address would make more sense?


Add marshal-unmarshal for ContainerContext

Please add docs and unit test (see Token). Also add [#390] pkg/session: to commit msg.


Add support for Azure Private DNS zones and its virtual network links

Hi @iriahk89, we had a look at the issue and considering that the expected domain name (i.e contoso.com) it doesn't make sense to temper with the name. For instance we don't want to generate privatezone-contoso.com as a result of using the naming convention


add manifest with AllAlpha=true

What type of PR is this?
/kind documentation
What this PR does / why we need it:
Add a manifest with AllAlpha=true as part of release artifacts. Uses can use this manifest if they want to try and experiment with alpha features.
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?

add release manifest with AllAlpha=true

/release-note-edit
NONE

We don't add release notes for documentation


Roll engine to 2812ea3ed304eac01d89fe456cd5d45f658ce11c

This contains the following commits:
flutter/engine@2812ea3 Define Uri.base as CWD to match the standalone Dart VM.
flutter/engine@6f15a91 Roll src/third_party/skia/ 4912d903b..dc3192b30 (7 commits)
flutter/engine@f9165be Roll src/third_party/skia/ c353ee211..4912d903b (1 commit)
flutter/engine@fb51bf2 Roll src/third_party/skia/ d5750b6b3..c353ee211 (1 commit)
flutter/engine@a859432 Roll buildroot to a69ebc4e1.
flutter/engine@89a8dff Roll src/third_party/skia/ 0ce19fa0b..d5750b6b3 (3 commits; 1 trivial rolls)

@fkorotkov do you know how to restart a failed Cirrus task, to deflake?

@tvolkert you should see a Re-Run button on task's page: https://cirrus-ci.com/task/4897204238024704

@fkorotkov the task page actually goes completely blank for me after it starts to render.
MacOS
Chrome Version 66.0.3359.139 (Official Build) (64-bit)

@fkorotkov other comments:

It appears maybe I'm just not authenticated.  If I load the page in an incognito window, I can get it to render, but I don't see a way to sign in.

When it does render, it looks like maybe Cirrus is swallowing stderr?  e.g. if you search for -1: in the task page, you'll see the first test failure, but no associated error message.

...goes completely blank for me after it starts to render.

@fkorotkov removing the "local storage" cookies fixed this

@tvolkert first of all, sorry for the inconvenience.

I've checked the logs and seems you've never authorized with Cirrus CI and it means that Incognito mode shouldn't change anything. I wonder what was in your cookies and how it got there.

Cirrus CI's agent combines stderr and stdout together. We have integration tests with Gradle output for that. We'll investigate Flutter's case and add tests.

Now you can sign-in via GitHub in the top right corner. I would Re-Run it but I don't have permissions. Only PR's author and people with write permissions to the repo can re-run tasks.
Once again, sorry for the troubles, and thanks for the feedback! I will investigate the issues.

@fkorotkov re #1, @Hixie reported the same behavior after he tried to expand the shelf on the left of the page.  I can reliably reproduce the failure by expanding the shelf as well.
If I look in the top right of the page, here's what I see:

Yet if I hover over the area to the right of "Documentation", indeed it's a hidden link to authorize! 😄

OMG. 😔Need to add some tests using Puppeteer.

btw @fkorotkov now that I'm authorized, the left shelf works fine, so it seems to be that there are problems when unauthenticated users try to expand the shelf.

@tvolkert @Hixie found out why it was breaking for unauthorized users once they open the side panel with user's top repositories. Fix will be automatically deployed in ~5 minutes. Sorry for the inconvenience.


Print daily leaderboard

Added new method that will either count all of the units of exercise for a given day or count all if "None" is passed. Added a call to the save() method in main() during the first non-office hour block of the day.

Wrong branch to merge into


Array.fill() with a Script Class based variant parameters make them linked like you filled with a reference to one object.

So here we go : The bug is if you use Array.fill( Class.new() ) the Array may be filled with certainly, copies of this Class with default propriety.
But when you change one propriety of one Array member (class specified attribute), it change it for all array members.
Steps to reproduce
Create a Class with a script (one with a class_name, easier this way)
Add an variable in that class, anything you like
In another script, you gonna create an Array. And instantiate it in the func _init().
With a resize, any size.
Then fill it with your previously created class from that another script (so I guess Class.new() and not just Class cuz else it just refuse to change anything cuz I guess that the object instantiated from the class you want in multiples examplaries, not the class itself right ?)
Then try changing the propriety previously put in that Class, with a for i in Array.size() for example, changing for each different id.
Then do a second for i in Array.size(), just to be sure you see the END result, and not the while rewriting the array result, and print each Array members attribute.
And then you will see that first they're all the same, and the last result possible from your previous for
Well I don't have real proof that this is indeed a reference to the same object that is in each Array members, but that look very similar at least, and even if it's not, it a very indesirable behavior.
Minimal reproduction project
ArrayFill() Bug.zip

This is intended behavior, if you want to fill the array with unique values use a for loop or .map()
# Example:
var array = range(num_of_elements).map(func(__): return Class.new())

Oh.
Well I guess I was false once again...
Thanks for the answer.
Well I would still end up with a small suggestion, to add that ... somewhere, maybe in the docs, just to avoid misunderstanding and errors like that again I guess.

Well I would still end up with a small suggestion, to add that ... somewhere, maybe in the docs, just to avoid misunderstanding and errors like that again I guess.

It's already documented:
https://github.com/godotengine/godot/blob/0ca8542329888e8dccba89d59d3b728090c29991/doc/classes/Array.xml#L282
See: #68032, #68051.

Right, I missed that one, my bad. Then I guess I once again opened a topic for a false alert on my side...
Thanks for the answers.