Add SwiftUI example

It'll be helpful to add a swiftUI example that uses the standard FirebaseUI.  Here's skeleton code that works for me:
import SwiftUI
import FirebaseUI
import Firebase

public var screenWidth: CGFloat {
	return UIScreen.main.bounds.width
}

public var screenHeight: CGFloat {
	return UIScreen.main.bounds.height
}

struct LoginView : View {

    @State private var viewState = CGSize(width: 0, height: screenHeight)
    @State private var MainviewState = CGSize.zero

	var body : some View {
		ZStack {
			CustomLoginViewController { (error) in
				if error == nil {
					self.status()
				}
			}.offset(y: self.MainviewState.height).animation(.spring())
			MainView().environmentObject(DataStore()).offset(y: self.viewState.height).animation(.spring())
		}
	}

	func status() {
		self.viewState = CGSize(width: 0, height: 0)
		self.MainviewState = CGSize(width: 0, height: screenHeight)
	}
}

struct LoginView_Previews : PreviewProvider {
	static var previews : some View {
		LoginView()
	}
}

struct CustomLoginViewController : UIViewControllerRepresentable {

	var dismiss : (_ error : Error? ) -> Void

	func makeCoordinator() -> CustomLoginViewController.Coordinator {
		Coordinator(self)
	}

	func makeUIViewController(context: Context) -> UIViewController
	{
		let authUI = FUIAuth.defaultAuthUI()

		let providers : [FUIAuthProvider] = [
			FUIEmailAuth(),
			FUIGoogleAuth(),
			FUIOAuth.appleAuthProvider()
		]

		authUI?.providers = providers
		authUI?.delegate = context.coordinator

		let authViewController = authUI?.authViewController()

		return authViewController!
	}

	func updateUIViewController(_ uiViewController: UIViewController, context: UIViewControllerRepresentableContext<CustomLoginViewController>)
	{

	}

	//coordinator
	class Coordinator : NSObject, FUIAuthDelegate {
		var parent : CustomLoginViewController

		init(_ customLoginViewController : CustomLoginViewController) {
			self.parent = customLoginViewController
		}

		// MARK: FUIAuthDelegate
		func authUI(_ authUI: FUIAuth, didSignInWith authDataResult: AuthDataResult?, error: Error?)
		{
			if let error = error {
				parent.dismiss(error)
			}
			else {
				parent.dismiss(nil)
			}
		}

		func authUI(_ authUI: FUIAuth, didFinish operation: FUIAccountSettingsOperationType, error: Error?)
		{
		}
	}
}

In my SceneDelegate.swift, I'm calling the following in scene:willConnectTo:
// Use a UIHostingController as window root view controller.
if let windowScene = scene as? UIWindowScene {
    let window = UIWindow(windowScene: windowScene)
    if Auth.auth().currentUser == nil {
        window.rootViewController = UIHostingController(rootView: LoginView())
    }
    else {
        window.rootViewController = UIHostingController(rootView:MainView().environmentObject(DataStore()))
    }

    self.window = window
    window.makeKeyAndVisible()
}

Hope this helps.

What is DataStore() referring to in the line
MainView().environmentObject(DataStore()).offset(y: self.viewState.height).animation(.spring())

@chrisyue1998 it's a swift class that handles my data store.

@jtressle would you mind posting the datastore file I would like to understand better how that works with your auth login function?
My hope is that you are storing user info to pass on to firebase storage with it but, I am curious on the whole function.

@swells808 my user info is all handled by the Firebase Auth library.  The only check I do is check if the user has logged in.  After that, I count on the read/write permissions on Firebase to handle object restrictions.  As shown above, if the user is not logged in, I present the login view.
if Auth.auth().currentUser == nil {
        window.rootViewController = UIHostingController(rootView: LoginView())
    }
    else {
        window.rootViewController = UIHostingController(rootView:MainView().environmentObject(DataStore()))
    }

The datastore file does not contain any user info since we rely on Firebase read/write access restrictions.
Hope this helps.

@jtressle Thank you that explains a lot! Follow up question what types of info do you use the DataStore for if not user info?

Hi @jtressle I am trying to implement this in a sheet in swiftui so that it's a popup instead of a root view.  However I am finding that at the end of the sign in flow the sheet closes but the delegate is not called.
When I use it as a root view everything works fine, any idea what may be causing the altered behavior in a swiftui sheet?

@mattbrandman I just encountered that myself. The problem is when authentication is complete, the sheet is dismissed, so the delegate methods don't get called because the Authentication view is garbage collected. You need to use a different object handle the delegate method callbacks, don't keep them in the Coordinator like the above example because the Coordinator will no longer exist when the sheet is dismissed.

@arthurgarzajr I am encountering the same issue right now. Any chance you can post some code with the different object handling the delegate callbacks?

@arthurgarzajr I too am seeing what @mattbrandman is experiencing using the Auth view in the sheet. I've created an a class AuthuiDelegate that is basically the same as what the coordinator would be. I instantiate the object in the makeViewController method by doing let authuiDelegate =  AuthuiDelegate(self) and set authui?.delegate = authuiDelegate. What am I missing?

@pedrovelmo, @smaldd14,
I created a view model that implemented the FUIAuthDelegate protocol. The view model was then passed in as a delegate to the CustomLoginViewController (based off of @jtressle's example).

I am trying to implement this and I was wondering if anyone had a sample project I could look at to help me implement this. I am having trouble with what the DataStore class does and how this all links together. I saw the explanation for datastore above but I'm still unsure how to implement it. Thanks

I am trying to implement this and I was wondering if anyone had a sample project I could look at to help me implement this. I am having trouble with what the DataStore class does and how this all links together. I saw the explanation for datastore above but I'm still unsure how to implement it. Thanks

Hello,
I have implemented this and it works well. My only problem is that I can not figure out how to change the current view when the user logs in or out. Does anyone have an example showing how to do this?

Some help with DataStore please.
Is it just an empty class or struct??

@nyxee it was just a ObservableObject that handled some snapshot listeners.  I believe I've since removed the environment object in favor of using the git Resolver (https://github.com/hmlongco/Resolver).
Basically, just handle loading data after the user has logged in.

This is what I have, and, I have failed sofar. It's crushing.
public var screenWidth: CGFloat {
    return UIScreen.main.bounds.width
}

public var screenHeight: CGFloat {
    return UIScreen.main.bounds.height
}

struct LoginView : View {

    @State private var viewState = CGSize(width: 0, height: screenHeight)
    @State private var MainViewState = CGSize.zero
    @ObservedObject var authViewModel = AuthViewModel()

    var body : some View {
        ZStack {
            CustomLoginViewController(delegate: authViewModel) { (error) in
                if error == nil {
                    self.status()
                }
            }.offset(y: self.MainViewState.height).animation(.spring())

            //FirebaseUIDemo for MainView()????
            //FirebaseUIDemo().environmentObject(DataStore()).offset(y: self.viewState.height).animation(.spring())
        }
    }

    func status() {
        self.viewState = CGSize(width: 0, height: 0)
        self.MainViewState = CGSize(width: 0, height: screenHeight)
    }
}

class DataStore: ObservableObject {

}

struct CustomLoginViewController : UIViewControllerRepresentable {
    var delegate: FUIAuthDelegate?

    var dismiss : (_ error : Error? ) -> Void

    func makeCoordinator() -> CustomLoginViewController.Coordinator {
        Coordinator(self)
    }

    func makeUIViewController(context: Context) -> UIViewController {
        let authUI = FUIAuth.defaultAuthUI()

        let providers : [FUIAuthProvider] = [
            FUIEmailAuth(),
            FUIGoogleAuth(),
            FUIOAuth.appleAuthProvider()
        ]

        authUI?.providers = providers
        authUI?.delegate = self.delegate

        let authViewController = authUI?.authViewController()

        return authViewController!
    }

    func updateUIViewController(_ uiViewController: UIViewController, context: UIViewControllerRepresentableContext<CustomLoginViewController>) {

    }

    //coordinator
    class Coordinator: NSObject {
        var parent: CustomLoginViewController

        init(_ customLoginViewController : CustomLoginViewController) {
            self.parent = customLoginViewController
        }

    }
}

class AuthViewModel: NSObject, ObservableObject, FUIAuthDelegate {

    func authUI(_ authUI: FUIAuth, didSignInWith authDataResult: AuthDataResult?, url: URL?, error: Error?) {
        print("Signed in as \(Auth.auth().currentUser?.displayName ?? "Not Signed in")")
    }

    func authUI(_ authUI: FUIAuth, didSignInWith authDataResult: AuthDataResult?, error: Error?) {
        print("Signed in")
    }

    func authUI(_ authUI: FUIAuth, didFinish operation: FUIAccountSettingsOperationType, error: Error?) {
        print("Signed in")
    }
}

struct FirebaseUIDemo: View {
    @StateObject private var postListVM = PostListViewModel()

    //var authUI = FUIAuth()

    var body: some View {
       //Text("Firebase")
        LoginView()
    }
}

struct LoginView_Previews : PreviewProvider {
	static var previews : some View {
		//LoginView()
                FirebaseUIDemo()
	}
}

Why does it not work in preview? I lost three days on that.

Feels like there should be some sample code for this now? Any pointers to newer examples?

Don't know why but it doesn't call delegates. I've resolved implementing with Combine like this:
`import Foundation
import Combine
import FirebaseAuth
import FirebaseAuthUI
class AuthenticationManager {
static let shared = AuthenticationManager()
let appUserUpdated = PassthroughSubject<AppUser?, Never>()
var appUser: AppUser?
private var authStateListenerHandle: AuthStateDidChangeListenerHandle?

init(){
    authStateListenerHandle = Auth.auth().addStateDidChangeListener { [weak self] auth, user in
        if let user = user{
            self?.updateAppUser(appUser: AppUser(name: user.displayName ?? ""))
        }else{
            self?.updateAppUser(appUser: nil)
        }
    }
}

func updateAppUser(appUser: AppUser?){
    self.appUser = appUser
    appUserUpdated.send(appUser)
}

}`


How To Change Font Family

I need change font family of slip esc pos printer

did you find any solution for changing font family


Agent fails with System.OutOfMemoryException

Agent Version and Platform
Version of your agent? 2.165.0 on Linux
What's not working?
Last night, I saw that a lot of builds were failing with an error message like this:
##[error]We stopped hearing from agent AlibabaCI007-agent2. Verify the agent machine is running and has a healthy network connection. Anything that terminates an agent process, starves it for CPU, or blocks its network access can cause this error. For more information, see: https://go.microsoft.com/fwlink/?linkid=846610

See: https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6901
Out of the 16 agents, only this particular one has this issue.
Agent and Worker's Diagnostic Logs
Here are, what I believe relevant logs from that agent: https://gist.github.com/rmetzger/d313c87bc3aea22f94c20475f67d1b7d
There are more of those cases in the _diag folder.
./svc.sh status

/etc/systemd/system/vsts.agent.rmetzger.Default.AlibabaCI007\x2dagent2.service
● vsts.agent.rmetzger.Default.AlibabaCI007\x2dagent2.service - Azure Pipelines Agent (rmetzger.Default.AlibabaCI007-agent2)
   Loaded: loaded (/etc/systemd/system/vsts.agent.rmetzger.Default.AlibabaCI007\x2dagent2.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2020-02-21 17:42:28 CST; 1 months 9 days ago
 Main PID: 4713 (runsvc.sh)
    Tasks: 37
   Memory: 3.5G
   CGroup: /system.slice/vsts.agent.rmetzger.Default.AlibabaCI007\x2dagent2.service
           ├─ 4713 /bin/bash /home/agent2/myagent/runsvc.sh
           ├─ 4716 ./externals/node/bin/node ./bin/AgentService.js
           ├─ 7031 /home/agent2/myagent/bin/Agent.Listener run --startuptype service
           └─23256 /home/agent2/myagent/bin.2.165.0/Agent.Worker spawnclient 114 120

Apr 01 02:20:45 iZgw814dze6vb5iq9eabnuZ Agent.Worker[28723]: Only single test suite found, parsing its information.
Apr 01 02:20:45 iZgw814dze6vb5iq9eabnuZ Agent.Worker[28723]: PublisherTraceSource Verbose: 0 :
Apr 01 02:21:02 iZgw814dze6vb5iq9eabnuZ runsvc.sh[4713]: 2020-03-31 18:21:02Z: Job test_ci core completed with result: Succeeded
Apr 01 02:28:14 iZgw814dze6vb5iq9eabnuZ runsvc.sh[4713]: 2020-03-31 18:28:14Z: Running job: test_ci python
Apr 01 03:01:44 iZgw814dze6vb5iq9eabnuZ runsvc.sh[4713]: 2020-03-31 19:01:44Z: Job test_ci python completed with result: Succeeded
Apr 01 08:58:01 iZgw814dze6vb5iq9eabnuZ runsvc.sh[4713]: 2020-04-01 00:58:01Z: Running job: test_cron_scala212 legacy_scheduler_core
Apr 01 14:20:09 iZgw814dze6vb5iq9eabnuZ runsvc.sh[4713]: 2020-04-01 06:20:09Z: Agent connect error: The HTTP request timed out a...cted.
Apr 01 14:21:30 iZgw814dze6vb5iq9eabnuZ runsvc.sh[4713]: 2020-04-01 06:21:30Z: Agent reconnected.
Apr 01 15:15:53 iZgw814dze6vb5iq9eabnuZ runsvc.sh[4713]: 2020-04-01 07:15:53Z: Agent connect error: The HTTP request timed out a...cted.
Apr 01 15:17:00 iZgw814dze6vb5iq9eabnuZ runsvc.sh[4713]: 2020-04-01 07:17:00Z: Agent reconnected.
Hint: Some lines were ellipsized, use -l to show in full.

Maybe there's a memory leak somewhere in the agent? it's been running for over one month, as you can see from above.

Hey @rmetzger - I'm a little confused - is there a reason to believe that the agent is what is leaking memory and its not just the worker process consuming lots of memory (doing whatever task its running)? The fact that your only seeing this on 1/16 agents makes me think there's something environmental going on as well - is the machine its running on particularly strapped for resources?
Have you tried adjusting the agent process oom scores? See this doc - https://github.com/Microsoft/azure-pipelines-agent/blob/master/docs/start/resourceconfig.md - that should also help. If the agent still gets killed after that I'd be much more suspicious of a memory leak or something similar.

Thank you for looking into this. The machine has 64GB of main memory.
Next time I see the issue, I will check the kernel log messages if the oom killer was active.
Thanks a lot for this document, it is extremely helpful! I will adjust the oom score (and also look into a cgroup config)


BTable: Sorting not working correctly with negative values

Describe the bug
BTable sorting works incorrectly when the column data contains negative values.
Example:
In the provided stackblitz link, the marks column has negative values. If the column is sorted in the ascending order then
Current output: -40, -45, 21, 38, 89, 89
Expected output: -45, -40, 21, 38, 89, 89
Reproduction
https://stackblitz.com/edit/vitejs-vite-hntimd?file=src%2Fcomponents%2FHelloWorld.vue
Used Package Manager
npm
Validations

[X] Have tested with the latest version. This is still alpha version and sometime things change rapidly.
[X] Follow our Code of Conduct
[X] Read the Contributing Guide.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
[X] The provided reproduction is a minimal reproducible of the bug.

This isn't a bvn issue. It's an issue with localeCompare in js.
localeCompare with {numeric: true} treats negative numbers as strings rather than numeric values.
If you want to take over the sorting manually, you can use the comparer value in the sortby
https://stackblitz.com/edit/vitejs-vite-dbmwxb?file=src%2Fcomponents%2FHelloWorld.vue ie comparer: (a, b) => Number.parseFloat(a) - Number.parseFloat(b),


Fix redo keyboard shortcut in notebook markdown

This PR fixes https://github.com/microsoft/azuredatastudio/issues/13894
Having the host listener call executeCommand('redo') was interfering with the markdown redo command.
Note: Keeping the redo keyboard shortcuts as cmd+shift+z on Mac and ctrl+y on Windows.

Pull Request Test Coverage Report for Build 486544958

0 of 1 (0.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.0006%) to 43.208%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/sql/workbench/contrib/notebook/browser/cellViews/textCell.component.ts
0
1
0.0%

Totals

Change from base Build 486359357:
-0.0006%

Covered Lines:
24386

Relevant Lines:
51756

💛  - Coveralls

Pull Request Test Coverage Report for Build 486544958

0 of 1 (0.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.0006%) to 43.208%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/sql/workbench/contrib/notebook/browser/cellViews/textCell.component.ts
0
1
0.0%

Totals

Change from base Build 486359357:
-0.0006%

Covered Lines:
24386

Relevant Lines:
51756

💛  - Coveralls


FLUME-2984: Fix OOM in thrift source. Make transport buffer configurable.

@laxman-ch : thank you for the PR!
Is there a way to test this change? (If a unit test is difficult to implement, do you know of any ways to reproduce the issue manually? Ie. "this is the config I use, this is the input that causes OOM".)


Customize leaf hash function

https://github.com/OpenZeppelin/merkle-tree/blob/b3d988984debfd6c951b8f1799982f191ff5b792/src/standard.ts#L9
In the provided example, the desired algorithm for getting leaves is:
bytes32 leaf = keccak256(bytes.concat(keccak256(abi.encode(addr, amount))));
And this works perfectly fine when there is more than 1 value inside the leaf.
However, when the value inside the leaf is singular, then there is no need for extra concat and keccak256, it only makes gas overhead. And the preferred algorithm is:
bytes32 leaf = keccak256(abi.encodePacked(addr));
This makes make a big difference because there is no possibility to change the leaf algorithm that this library uses, hence all trees and proofs for them can't be synced with the contract's behavior.

However, when the value inside the leaf is singular, then there is no need for extra concat and keccak256

This is not necessarily true. The reason the leaf is double-hashed is to mitigate second preimage attacks. If the leaf is a single bytes32 value the tree is likely vulnerable to those attacks, so I would say those are in fact the cases when it is particularly necessary to do double hashing.
If the singular value is an address and you use encodePacked then the tree is not vulnerable and you could omit the double hash.
The issue is not that standardLeafHash works incorrectly, it's that you want a different leaf hashing algorithm.

Want to bring that up.
I think we should support cases where:

leaves are Bytes (instead of any[])
types is undefined

In that case, we check that the leaves are all 32 bytes, and we use them directly, without any hashing.

I think customizing the leaf hash (including unhashed leaves) conflicts with the concept of "Standard" Merkle Tree that this class intends to implement. It makes me think that it should remain standard, and at most give a few preset options for hashing. However, using the core API directly is a lot more cumbersome so I see the point in a nicer wrapper with an interface like StandardMerkleTree. There could be a base MerkleTree class with the nice API for that.
Something like this?
type Hasher = <T>(leaf: T, encoding: E) => Bytes;

export class MerkleTree<T, E> {
  static of<T, E>(values: T[], leafEncoding: E, hasher: Hasher<T, E>) {
    ...
  }

  ...
}

leafEncoding and hasher could be optional arguments to support passing pre-hashed leaves but I wouldn't do that. It can always be done by just passing in the identity function as the "hasher".

I did make a local branch with
type LeafLike = any[] | BytesLike
type Encoding<T extends LeafLike> = T extends any[] ? string[] : undefined

export class MerkleTree<T extends LeafLike> {
    static of<T, E>(values: T[], leafEncoding: Encoding<T>) {
        ...
    }
}

And a hashing function that does:

double hashing (like today) if T extends any[]
check that the value is 32 bytes long, and pass it through with no modification if T is BytesLike

My issue with the hasher, is that I'm not sure there is a way to dump it / load it.
We would rely on the loading part getting the correct hasher as an argument (we could rehash all the leafs to check its correct ... or disable the hashLeaf function after construction)

My issue with the hasher, is that I'm not sure there is a way to dump it / load it.

Ah, that's true. This would be a point in favor of supporting a predefined set of options. 'double' | 'single' | 'passthrough'

#36 provides a SimpleMerkleTree that support can be used for that. Users of the SimpleMerkleTree are responsible of doing the hasing themselves.


Crash on creating empty Pandas DataFrame

Only when I use Spyder, not using Python or iPython from the console, these lines of code cause an immediate hang (endless beachball, nothing in the interface responsive):
import pandas as pd
a = pd.DataFrame()

The error only occurs when I assign the dataframe to a variable, and I don't include a "columns" or "data" input argument to DataFrame().
I running OS X, 10.9.4 and the latest versions of all the packages updated with condas, e.g.:
spyder                    2.3.7
ipython                   4.0.0
pandas                    0.17.0

This is a duplicate of issue #2744

And it'll be fixed in 2.3.8 :-)


Added lots of testing, added theme

Codecov Report

Merging #7 (a50f33c) into main (d1afb99) will increase coverage by 19.83%.
The diff coverage is 95.23%.

:exclamation: Current head a50f33c differs from pull request most recent head 1115bbc. Consider uploading reports for the commit 1115bbc to get more accurate results

@@             Coverage Diff             @@
##             main       #7       +/-   ##
===========================================
+ Coverage   76.00%   95.83%   +19.83%
===========================================
  Files           7        8        +1
  Lines          25       24        -1
===========================================
+ Hits           19       23        +4
+ Misses          6        1        -5

Impacted Files
Coverage Δ

src/Portfolio.tsx
100.00% <ø> (ø)

src/components/Header/Header.tsx
88.88% <88.88%> (ø)

src/components/ProjectCard/ProjectCard.tsx
100.00% <100.00%> (ø)

src/data/about_me.ts
100.00% <100.00%> (ø)

src/pages/Home/Home.tsx
100.00% <100.00%> (ø)

src/pages/Projects/Projects.tsx
100.00% <100.00%> (ø)

src/theme.ts
100.00% <100.00%> (ø)

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 d1afb99...1115bbc. Read the comment docs.


US_1.16 Link not in ID 🍪3

As
user
I want to
be able to click the name/title on the index pages and not the ID of an item to go to the detail page
in order to
have a better user experience
which pages?
Anfragen
Meine Bewerbungen
Benutzerverwaltung
** 🍪**
Acceptance Criteria

[ ] The ID is not visible anymore
[ ] I can click on the name or description and arrive and the detail page

@Helene0 Shouldn't the description be removed in #47? I guess it'll just be the name then?

not relevant anymore


feat(animator): add extra animator methods

add extra animator methods for extra functionality and for working with
JS based animators
fixes: https://github.com/aurelia/templating/issues/88

@EisenbergEffect I've discussed those changes before hand with @Aaike and will also apply the possible changes to the CSS-Animator. As from my side, this one is ok to merge :+1:

Has this been based solely on velocity? or have we confirmed that this abstraction would also work with something like greensock, for example?

I was going to create a GSAP implementation next ;)
Velocity has the same syntax as jQuery's $.animate.
animate(element,propertiesOrEffectName,options)
But GSAP is slightly different : tweenlite.to(element,duration,options)
However i think velocity's signature allows for more flexibility
The duration is separate in GSAP but this can be extracted from the options object.
The idea playing effects by name is done through "labels" in their TimeLine implementation.
The implementation for playing different "effects" would have to be done by creating a timeline for each effect , or to register an effect in one shared timeline.
This value can be the retrieved from the 2nd argument from the velocity/jquery signature.
I had something like this in mind for implementing GSAP with the new functions:
class GreensockAnimator{

  effects = {};

  function animate(element,effectName,options){
    if(typeof effectName == "string"){
      if(this.effects[effectName]){
        this.effects[effectName].play();
      }
    }else{
      TweenLite.to(element,options.duration,options)
    }
  }

  function registerEffect(effectName,properties){
    var tl = new TimelineLite();
    tl.to(element,options.duration,options);
    this.effects[effectName] = timeline;
  }

  function unregisterEffect(effectName,properties){
    delete this.effects[effectName];
  }

}

Other than GSAP i would also like to implement TinyAnimate
that one has a very different signature but it can be made to work with the same base functions.
The reason i want to implement all three is to let users choose between the perfect balance of features and filesize :

GSAP TweenLite (26 kb)
GSAP TweenMax (104 kb)
Velocity (35kb)
TinyAnimate (3.8kb)

Excellent. Yes, we wanted to have the abstraction for exactly this reason. I can merge this in, since it sounds like you've looked over the various apis. We can fix things up as  you implement the different animators. I don't think it will break anyone since it's only animator implementors that will have to deal with the changes at this point.


Instructor settings tab misleading for Instructors

Currently, the settings tab for instructors has several options which are meant for a different case and hence might be misleading. This is an issue if the person is only registered as an instructor. If a person is registered for both (isStudent and isInstructor) nothing needs to happen.
The following items should be removed:

certificate
subjects
tag "Student*in" (since instructors do not have to be students)
word "Fächer" since there are none

Should something else be displayed instead of a student? This also applies to the navigation bar. We could display something like "intern" and / or "tutor". @tobiasbork

Tutorin would work, yes.
Praktikantin should be avoided since it is temporary.


who did this?

https://github.com/laravel/framework/blob/5.0/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php#L389
$table->float('fk'); // the field is double in the table.

why did this ?? so weird...

Not sure what you mean? It's just an alias function?

4.2 vs 5.0
https://github.com/laravel/framework/blob/4.2/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php#L389
protected function typeFloat(Fluent $column)
{
	return "float({$column->total}, {$column->places})";
}

https://github.com/laravel/framework/blob/5.0/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php#L389
protected function typeFloat(Fluent $column)
{
	return $this->typeDouble($column);
}

it is the 'double' type in the table when im trying to add one column use '$table->float('field_name')' in the migration file.
v4.2 is normal...

here is my migration file:
<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class UserAlter extends Migration {

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('user', function(Blueprint $table)
        {
            $table->float('asdf')->after('tt')->unsigned()->index();

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('user', function(Blueprint $table)
        {
            $table->dropColumn('asdf');
        });
    }

}

@GrahamCampbell plz open this issue.


[Feature Request] Support MD syntax on descriptions and titles

First of all, thanks for providing such a tool for the community. I appreciate the effort being put into keeping the tool fresh and updated.
One thing I'd love to see is the ability to add MD syntax to have elements in bold, italicized, underlined, etc, to provide emphasis, especially on relationships.
Some examples would include
{
  service = element {
    notation 'Service'
  }
}
model {
  a = service 'Service A'
  b = service 'Service B'
  a -> b 'A calls B __only once__' {
    notes '
       This relationship is being **__deprecated__** due to:
        1. Not important
        2. Causing problems
        3. Wrong place
    '
  }
}

Hope this helps. Thank you!

I'm working on it 👍🏻


Cytolk doesn't work insite PyInstaller

Hi mate,
When building a script which uses Cytolk with PyInstaller, I have to then go int the dist directory, and place the DLLs.
Is there any way you could submit a PR to pyinstaller to include the DLLs automatically?
Just saves that extra step.
Thanks in advance.

Hello. I've added a pyinstaller hook which should copy the libraries automatically.
Are you able to test it on your end and tell me if it works? I've tested it under python 3.9 and it seems to work over here
to add the hook, simply copy the file in hooks/hook-cytolk.py in Pyinstaller/hooks.

Hello. I've added a pyinstaller hook which should copy the libraries automatically.
Are you able to test it on your end and tell me if it works? I've tested it under python 3.9 and it seems to work over here
to add the hook, simply copy the file in hooks/hook-cytolk.py in Pyinstaller/hooks.

OK, I'll give it a go now.
Take care,
Chris Norman
On Sat, 9 Jan 2021 at 19:03, Paul<EMAIL_ADDRESS>wrote:

Hello. I've added a pyinstaller hook which should copy the libraries
automatically.
Are you able to test it on your end and tell me if it works? I've tested
it under python 3.9 and it seems to work over here
to add the hook, simply copy the file in hooks/hook-cytolk.py in
Pyinstaller/hooks.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/pauliyobo/cytolk/issues/1#issuecomment-757352219, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ABBUZ2PNHVMJQ6Y4P5LCWDLSZCR6HANCNFSM4V2RKG5A
.

OK, I'll give it a go now.
Take care,
Chris Norman
On Sat, 9 Jan 2021 at 19:03, Paul<EMAIL_ADDRESS>wrote:

Hello. I've added a pyinstaller hook which should copy the libraries
automatically.
Are you able to test it on your end and tell me if it works? I've tested
it under python 3.9 and it seems to work over here
to add the hook, simply copy the file in hooks/hook-cytolk.py in
Pyinstaller/hooks.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/pauliyobo/cytolk/issues/1#issuecomment-757352219, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ABBUZ2PNHVMJQ6Y4P5LCWDLSZCR6HANCNFSM4V2RKG5A
.

Works perfectly. Good job.
Take care,
Chris Norman
On Sat, 9 Jan 2021 at 19:03, Paul<EMAIL_ADDRESS>wrote:

Hello. I've added a pyinstaller hook which should copy the libraries
automatically.
Are you able to test it on your end and tell me if it works? I've tested
it under python 3.9 and it seems to work over here
to add the hook, simply copy the file in hooks/hook-cytolk.py in
Pyinstaller/hooks.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/pauliyobo/cytolk/issues/1#issuecomment-757352219, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ABBUZ2PNHVMJQ6Y4P5LCWDLSZCR6HANCNFSM4V2RKG5A
.

Works perfectly. Good job.
Take care,
Chris Norman
On Sat, 9 Jan 2021 at 19:03, Paul<EMAIL_ADDRESS>wrote:

Hello. I've added a pyinstaller hook which should copy the libraries
automatically.
Are you able to test it on your end and tell me if it works? I've tested
it under python 3.9 and it seems to work over here
to add the hook, simply copy the file in hooks/hook-cytolk.py in
Pyinstaller/hooks.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/pauliyobo/cytolk/issues/1#issuecomment-757352219, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ABBUZ2PNHVMJQ6Y4P5LCWDLSZCR6HANCNFSM4V2RKG5A
.

@chrisnorman7 good to hear. I'm going to go ahead and consider this issue closed. Thanks for the feedback.

@chrisnorman7 good to hear. I'm going to go ahead and consider this issue closed. Thanks for the feedback.

Sorry, I should have done it myself, but I was replying via email, and I
forgot.
Good job on the hook.
Take care,
Chris Norman
On Sat, 9 Jan 2021 at 19:24, Paul<EMAIL_ADDRESS>wrote:

@chrisnorman7 https://github.com/chrisnorman7 good to hear. I'm going
to go ahead and consider this issue closed. Thanks for the feedback.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/pauliyobo/cytolk/issues/1#issuecomment-757354691, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ABBUZ2IQFAU2YVB7BEPFBO3SZCUONANCNFSM4V2RKG5A
.

Sorry, I should have done it myself, but I was replying via email, and I
forgot.
Good job on the hook.
Take care,
Chris Norman
On Sat, 9 Jan 2021 at 19:24, Paul<EMAIL_ADDRESS>wrote:

@chrisnorman7 https://github.com/chrisnorman7 good to hear. I'm going
to go ahead and consider this issue closed. Thanks for the feedback.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/pauliyobo/cytolk/issues/1#issuecomment-757354691, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ABBUZ2IQFAU2YVB7BEPFBO3SZCUONANCNFSM4V2RKG5A
.


Switch local API dev server to use gunicorn --reload instead of Django's runserver

Problem

Stems from #2566
runserver does not support critical features we will need after converting the app to ASGI:

Actually running the ASGI app in full asynchrony
Multiple workers (to test production configuration)

We're also making the configuration slightly more complex by moving to ASGI, relying on gunicorn and uvicorn workers.
Description

To anticipate these complexities and make the local development environment (a) behave more like production and (b) require fewer changes when switching to full ASGI, swap out manage.py runserver for gunicorn --reload. Once we switch to ASGI in #2790, we'll either continue using gunicorn for development (with multiple workers) or can switch to uvicorn --reload.
runserver handles static file serving locally, while gunicorn and uvicorn won't know what to do. In production we rely on nginx to handle this. We could set up Nginx locally to front the API service, but to keep this simple, it's easier to conditionally add the static route handler that runserver uses to the API's urls configuration. See these changes as an example (which require supporting changes for the ENVIRONMENT variable and changes to the static file configuration generally, all present in that commit).
Additional context
Something along these lines will be necessary for ASGI conversion anyway. Doing this as a separate issue again reduces

@sarayourfriend I'd like to take a look at this. How high of a priority is it? I don't want be a blocker

This won't necessarily block anything for another two weeks or so. If that works for you, let me know and I'll assign it to you :slightly_smiling_face:

I just saw this :( I'll start on it soon. Please don't assign me the ticket. I'll take a stab at it and see if I can make progress by early next week. I don't want to block anyone else from picking this up.

No worries, sounds good, and thanks!


Add object that can collect a set of tables and provides unified IO support.

Added 'TableDict' in #7


ecryptfs module: init

Motivation for this change
Currently, ecryptfs support is coupled to security.pam.enableEcryptfs, but one might want to use ecryptfs without enabling the PAM functionality. This PR splits it out into a boot.supportedFilesystems switch.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS)
Built on platform(s)

[x] NixOS

[x] Tested via tests/ecryptfs.nix
[x] Fits CONTRIBUTING.md.
[ ] Extend it to work with boot.initrd.supportedFilesystems too (?)
[ ] Write an additional NixOS test for this functionality, separate from the current tests/ecryptfs.nix (?)

cc @obadz

looks good, thx.


Add "output" directory

Can we have an "output" directory for results of different runs, like we used to have in the MM-PIHM (also each run has a separate folder under the "output" directory)? Thanks.

We will create an output directory for all output files. Each output file will be named after the name of the project, and the time when the simulation is performed.


Update recipe to use pip.

Checklist

[x] Used a personal fork of the feedstock to propose changes
[x] Bumped the build number (if the version is unchanged)
[ ] Reset the build number to 0 (if the version changed)
[ ] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

@conda-forge-admin, please rerender

Deprecated in favor of #19


too old and rateLimited

Describe the bug:
Okay, this is a new one. I had an old version of Istio and therefore an old version of cert-manager. I've updated cert-manager and now I see the following error for my certs.
`letsencrypt-prod: Failed to verify ACME account: acme: urn:ietf:params:acme:error:rateLimited: Your ACME client is too old. Please upgrade to a newer version.
Skipping retrying account registration as a BadRequest response was returned from the ACME server: acme: urn:ietf:params:acme:error:rateLimited: Your ACME client is too old. Please upgrade to a newer version.`
Am I getting rateLimited or is my ACME client too old? It sounds like 2 problems. And the ACME client shouldn't be too old anymore as I'm now on v0.6.2.
Expected behaviour:
Certificate works
Steps to reproduce the bug:
See above
Anything else we need to know?:
Environment details::

Kubernetes version (e.g. v1.10.2): 1.13.7-gke.24
Cloud-provider/provisioner (e.g. GKE, kops AWS, etc): GKE
cert-manager version (e.g. v0.4.0): v0.6.2
Install method (e.g. helm or static manifests): helm via istio

/kind bug

I think you have the same problem that I did. I was using stable repo for cert-manager. Need to install from jetpack repository. https://cert-manager.readthedocs.io/en/latest/tasks/upgrading/index.html#upgrading-with-helm

v0.6.2 is too old - please update to the latest version of cert-manager (v0.11 as of today). From my understanding, and from the message linked above, anything less than v0.8 is now 'too old' 😄

Thank you for your response. That was the issue. The most recent version of
istio bumped the version.
On Tue, Nov 26, 2019, 3:15 AM James Munnelly<EMAIL_ADDRESS>wrote:

Closed #2369 https://github.com/jetstack/cert-manager/issues/2369.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jetstack/cert-manager/issues/2369?email_source=notifications&email_token=AKJW2HW3L7BN5BIGYOBTKCDQVTSKTA5CNFSM4JNVKFD2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOVC7RELA#event-2831094316,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AKJW2HUVTINED6CTZIFENEDQVTSKTANCNFSM4JNVKFDQ
.


Fix build

After rebuild it's possible to use jspdf with webpack.

When are you going to release this @MrRio ?


NameError: name 'reload' is not defined

Hi, i'm trying to execute the bot using the launch.sh, but it shows me an error:
$ ./launch.sh
(SO DANGEROUS) Do you want to use auto launch? (to kill it=HOLD Ctrl+C) y
Traceback (most recent call last):
File "bot.py", line 22, in
reload(sys)
NameError: name 'reload' is not defined
Bot has crashed! Launching it again.
Traceback (most recent call last):
File "bot.py", line 22, in
reload(sys)
What should i do to solve this isse ?
Regards,

Bug fxed. Use git pull to update
Note that

this project is written in python2.7 and not python 3
its also abandoned and wont be continued anymore, so use it on your own risk.


Missing icons on Workspace menu toolbar

In the workspace view there are two missing icons for Static Web Apps and Databases
https://github.com/microsoft/vscode-azureresourcegroups/assets/4821/14165804-b8e3-47cf-ad4c-c90a9ca793bc

Thanks for reporting this. We've fixed this, but haven't released them yet.
As a workaround, you can use dark theme as this only occurs on light theme (weird).


Flexibility in requirements/dependencies

Currently the cupy-xarray package depends on the last version of cupy. This means that if an user has an older version of cupy, cupy will be installed again (which takes a lot of time). Would if be possible to put some flexibility in the pyproject.toml file and use >= or <= for cupy's versions?

Hmm, I don't see an explicit minimum version of cupy set here, only for xarray:
https://github.com/xarray-contrib/cupy-xarray/blob/a46029529a08adfb07b4130452257c819d8b0523/pyproject.toml#L17-L20
What command are you running that is causing your system to pull in the latest version of cupy?

Assuming that you've managed to handle the cupy version issue, so closing this now. Let us know if this needs to be re-opened.


[BUG] Fix COUNT(*) aggregate pushdown with the .show() command

Bug
Describe the problem
This commit https://github.com/delta-io/delta/commit/0c349da8 added support for COUNT(*) aggregate pushdown. For example, this command spark.sql("SELECT COUNT(*) FROM <my-table>").collect() is able to use just the metadata in the delta log to perform this count query, instead of scanning the parquet files.
However, this command spark.sql("SELECT COUNT(*) FROM <my-table>").show() does NOT perform the aggregate pushdown. The aggregate plan that is matched inside of OptimizeMetadataOnlyDeltaQuery does not match the plan used during the .show() command, which performs a CAST.
Expected results
COUNT(*) aggregate pushdown should also occur when you do .show(), just like how it works with .collect().
All you need to do is update OptimizeMetadataOnlyDeltaQuery and add a test.
Environment information

Delta Lake version: 2.2.0
Spark version: 3.3.1

Can I take this up?

@fuzzy-memory for sure!

@felipepessoto - yes we should. Will get to that soon. Sorry for the delay.

Hi @felipepessoto - FYI we got some community asks to get this in for 2.3 so I opened up a PR here: https://github.com/delta-io/delta/pull/1643
When we go to merge your Min/Max aggregate PR, we can just remove the additions I've added here, so long as that PR also handles the .show() case.


Merge veepee work to main

This PR merge work from #21 into main branch

Hi,
Is there something wrong with this PR ?

When can we expect this PR to be merged and released? We would like to be able to use the awx_user functionality asap

Hello, I'm really sorry for a so long delay in my answers.
Now I take a look to the opened PR and I wanted to merge this one but their are some conflicts, can you rebase it please?

Great to hear ! I have some more PR to submit, i'll prepare them tomorrow afternoon
Should be ok to merge


Chat Model

Try to automatically obtain the active Chat Models and costs.

I'm not going to automate this for now.


Faster Mass Storage mode

(Almost forgot this one...) Increases the packet size from 512 bytes to 4k. On my "fast" card this gets me ~900k both directions.

Looks like get.pimoroni.com is having a bad time...

Guess I should update the link to https://github.com/32blit/stdlibs/releases/download/newlib-3.3.0-gcc-9.2.0/stdlibs.zip now the GitHub repo is doing its thang!

Kicked the tests and all is well. Thank you. Will be interesting to see how others fare with this change. Results could be mixed!


Update Gemfile dependencies

Starting with varia_model 0.5.0, the minimum supported Ruby version
is >= 2.0, but we test on 1.9.3 as shipped with older Chef versions.
Constrain ridley and faraday to 4.2.0 and 0.9.1, respectively.
Rearrange constrains and use < Chef 12.5

:+1: lgtm (and travis)


getTxByAccount: add spend transactions with recipient equal to name hash that points to address received in arguments

To be able to show correct transaction list in the Base app

@johnsnewby we need this to re-enable send by name in the base aepp. let us know when it's feasible to have this implemented.

Should be able to do this this week, I need to update the whole name auxiliary table for Lima


Run integration tests in random namespaces

What this PR does / why we need it:
Run the integration tests for inventory_kubevirt, kubevirt_vm and kubevirt_vm_info
in a random namespace and cleanup after the tests finish.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #126
Special notes for your reviewer:
Release note:

None

/lgtm

/approve


Issue with k8s.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/

This is a Bug Report

Problem:
Please, see the output of shell:
leo@cloudshell:~ (skyhive-ml)$ kubectl exec -it task-pv-pod -- /bin/bash
error: unable to upgrade connection: container not found ("task-pv-container")
Proposed Solution:
Page to Update:
https://kubernetes.io/...

I tried executing this task and the command you mentioned in description is working perfectly fine. Please check container is running before executing this command.

/triage needs-information

/close

/priority awaiting-more-evidence


Typo here

https://github.com/shmsw25/FActScore/blob/03ff67253028337a7d26a33515aa647d98c7898b/factscore/factscorer.py#L118
should be type(topics)==type(generations)==str:

Thank you for catching this! Fixed now!


sealed-secrets: install the Bitnami Sealed Secrets operator

v0.16.0 will not work as-is with kubernetes 1.22 so vendor controller.yaml and manually apply bitnami-labs/sealed-secrets#627 until the v0.17.0 release problems (bitnami-labs/sealed-secrets#661) are resolved.

bors r+


[Segment Replication] Add components for segment replication to perform file copy.

Signed-off-by: Marc Handalian<EMAIL_ADDRESS>Description
This change adds the required components to SegmentReplicationSourceService (used on primary shards to send segments to replicas) to initiate copy and react to lifecycle events.
Along with new components it refactors common file copy code from RecoverySourceHandler into reusable pieces.
Refactoring:

Extracts RunUnderPrimaryPermit from RecoverySourceHandler to a top lvl class.
Extracts sendFiles method from RecoverySourceHandler to another class, SegmentFileTransferHandler that is used by both RecoverySourceHandler and the segrep equivalent, SegmentReplicationSourceHandler.
Extracts writeFileChunk into a separate interface, FileChunkWriter, that is extended by RecoveryTargetHandler.
Moves transport layer handling of file chunks from RemoteRecoveryTargetHandler into an implementation of FileChunkWriter, RemoteSegmentFileChunkWriter.
Move handling of copystate cache in SegmentReplicationSourceService to new component OngoingSegmentReplications.

New components:
OngoingSegmentReplications - Manages creating required handlers and copystate for performing copy events.
SegmentReplicationSourceHandler  Handler that orchestrates the copy, uses a FileChunkWriter to send files.
Issues Resolved
closes #3322
Check List

[ ] New functionality includes testing.

[ ] All tests pass

[ ] New functionality has been documented.

[ ] New functionality has javadoc added

[ ] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

start gradle check

start gradle check

start gradle check

./gradlew ':qa:remote-clusters:integTest' --tests "org.opensearch.cluster.remote.test.RemoteClustersIT.testHAProxyModeConnectionWorks" -Dtests.seed=A3F988DF3CB02562 -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=el-CY -Dtests.timezone=GMT -Druntime.java=17

start gradle check

#1703

start gradle check

Thanks @mch2 , LGTM!

@reta  Thanks very much for the review!

start gradle check


windows-2019 20210810.1 running slower than previous versions

Description
Our RSpec tests running on windows-2019 runners have been seeing degraded performance since the runner was updated to use 20210810.1. Previously, tests on Windows finished on average within 25 minutes, but are now taking an average of 40 minutes.
We also noticed that a previous RSpec test that connected to the runner itself over WinRM is now consistently failing without any changes on our end. We suspect this might be due to degraded performance on the runner causing our tests to throw a hardcoded timeout error, as the runner is responding to the connection too slowly now.
Relevant workflow is here under the "Agentless" job. This job is the last to run with 20210803.1 and this job is the first to run with 20210810.1.
Virtual environments affected

[ ] Ubuntu 16.04
[ ] Ubuntu 18.04
[ ] Ubuntu 20.04
[ ] macOS 10.15
[ ] macOS 11
[ ] Windows Server 2016
[X] Windows Server 2019

Image version and build link
20210810.1
Is it regression?
20210803.1
Expected behavior
No response
Actual behavior
No response
Repro steps
Not sure if this is reproducible with other workflows, but at least for ours:

Run the Windows workflow on 20210810.1
Compare to running the same workflow on 20210803.1

Hello, @beechtom
We will take a look at the issue.

@beechtom, Could you please run this https://github.com/actions/virtual-environments/blob/main/images/win/scripts/Installers/Run-NGen.ps1 script before test and provide a result?

@beechtom, Any updates?

I'm going to close the issue until further clarifications from your side.
Feel free to contact us at any time.


Add "morpheme" to model

Option 1: extend existing "Gloss" model to also contain morphemes. Add a binary "isMorpheme" field, use existing wordClass as the morpheme's destination word class.
Option 2; add "Morpheme" as a separate class in models (possibly building on or just re-using the existing Gloss)
Discuss with @Woseseltops what is better in terms of speed and model logic

@Woseseltops  and I had a discussion, and while it is almost 50/50, it seems that option 2 may be the better one. One factor is that there may be attributes that are specific for morphemes (e.g. the equivalent of position-within-a-word, which would be like prefix/infix/postfox for spoken languages).

Okay, added a new class "Morpheme" that builds on "Gloss".
Also added one additional field "mrpType". This makes use of "MorphemeType", which is a new category that should/can now be added to FieldChoices.


"blur" validation remove manual error UI

Hi,
I'm adding manually error with "context.addInvalidKeys(..)"
The error is show up for a sec and then disappear.
The validation type is "blur". when I remove it the error stay...
The invalidKeys function still contain the error but the UI clear it.
Tnks

I managed to workaround with sticky errors but it's not "clean"
AutoForm.templateInstanceForForm(formId)._stickyErrors[key] = {type: "customType", value: customValue};

and to remove
delete AutoForm.templateInstanceForForm(formId)._stickyErrors[key];

maybe the sticky errors should be more public.

5.7.0 now has AutoForm.addStickyValidationError and AutoForm.removeStickyValidationError.


[DO NOT MERGE] Abseil StackTrace Test

This is to have a reproduction case of stack tracer using Abseil.
How to run
$ bazel test //test/core/extra

MacOS log
[ RUN      ] ExtraTest.Basic
get_trace()=[Stack trace:
]
test/core/extra/extra.cc:122: Failure
Value of: st.find("Basic") != -1
  Actual: false
Expected: true

Windows log
[ RUN      ] ExtraTest.Basic
get_trace()=[Stack trace:
    @   00007FF679351CD7  (unknown)  (unknown)
    @   00007FF67938887C  (unknown)  (unknown)
    @   00007FF679388622  (unknown)  (unknown)
    @   00007FF679371BFA  (unknown)  (unknown)
    @   00007FF679372695  (unknown)  (unknown)
    @   00007FF679372D4D  (unknown)  (unknown)
    @   00007FF679379625  (unknown)  (unknown)
    @   00007FF679388A2C  (unknown)  (unknown)
    @   00007FF679388812  (unknown)  (unknown)
    @   00007FF67937339A  (unknown)  (unknown)
    @   00007FF6793548C1  (unknown)  (unknown)
    @   00007FF679351FA8  (unknown)  (unknown)
    @   00007FF6793D0164  (unknown)  (unknown)
    @   00007FF6793D0077  (unknown)  (unknown)
    @   00007FF6793CFF3E  (unknown)  (unknown)
    @   00007FF6793D0179  (unknown)  (unknown)
    @   00007FFDF03C7974  (unknown)  BaseThreadInitThunk
    @   00007FFDF8ADA271  (unknown)  RtlUserThreadStart
]
test/core/extra/extra.cc(122): error: Value of: st.find("Basic") != -1
  Actual: false
Expected: true

MacOS started to pass the test once Abseil is upgraded to LTS 20200923. Windows only remains.


container-level scaling

This is a work in progress, DO NOT MERGE yet!

[x] dokku ps:scale <app> proc=count [proc=count] (scales any process in Procfile. defaults to 1 if no DOKKU_SCALE file exists)
[x] nginx load balancing
[x] log aggregation
[x] dockerfile scaling?
[x] DOKKU_SCALE file precedence (app repo vs local)
[x] handle CHECKS for non-web containers
[x] fix old tests
[x] new tests (scaling 1+ proc types)
[x] docs
[x] app w/o Procfile
[ ] dokku ls improvements

show docker state?

[x] set $DYNO upon container start

Example dokku ls output:
root@dokku:/tmp/nodejs-express# dokku ls
-----> App Name           Container Type            Container Id              Running
mynewapp                  NOT_DEPLOYED              NOT_DEPLOYED              NOT_DEPLOYED
node-js-app               web                       5d3cfcc83cfb              true
nodejs-express-workers    web                       c284acaefe0b              true
nodejs-express-workers    worker                    c7df65e37899              true
nodejs-express-workers    worker                    90f7d101355d              true

closes: #1117
refs: #733 #298

On heroku, only the web process is scaled to 1 by default.

Do you have a change proposal then? :smile:

Per IRC convo, sticking with default of 1 since we don't have to pay by the container :smile:

Sounds good. It should also support zero if it doesnt.
Sent from my iPhone

On Apr 17, 2015, at 11:34 PM, Michael Hobbs<EMAIL_ADDRESS>wrote:
Per IRC convo, sticking with default of 1 since we don't have to pay by the container
—
Reply to this email directly or view it on GitHub.

Setting to zero will cause a process to not be started but I need to handle the transition from >1 -> 0. (Note to self)

My initial thought on checks for different process types was to augment the CHECKS file format. Upon more thought, that seems overly complex. Instead, I decided to only parse the CHECKS file if the PROC_TYPE is web. This seems to line up with Heroku's special treatment of the web proctype.

@josegonzalez @progrium @joshco I think this is ready for review. Please pick it apart.

Can an app have multiple web components?

What do you mean?

To clarify, an app can have as many components as the author wants. It's just that the web proctype is handled differently than others. So only web processes get exposed to nginx or the outside world and they are the only type that custom CHECKS run against.

Nevermind. I meant "can dokku load balance multiple processes in an app". The answer is no because of how the web process works, which I think we can deal with.

What do you mean by 'load balance'?  Do you mean scale the number of web workers?

Web workers are definitely load balanced with the nginx-vhosts plugin

No I meant having multiple web-like processes exposing ports. As in a web and web-admin in a single app.

My initial test.  (this is a long comment)
Overall things work.  A few problems so far
An app without a Procfile doesnt work right anymore
I pushed a rails app with no procfile, and it attempted to start 4 containers, web, worker, rake, console.
remote:        Default types for  -> rake, console, web, worker
remote: -----> Releasing foo...
remote: -----> Deploying foo...
remote: -----> New DOKKU_SCALE file generated
remote: =====> rake=1
remote: =====> console=1
remote: =====> web=1
remote: =====> worker=1
remote: -----> Running pre-flight checks
remote:        For more efficient zero downtime deployments, create a file CHECKS.
remote:        See http://progrium.viewdocs.io/dokku/checks-examples.md for examples
remote:        CHECKS file not found in container: Running simple container check...
remote: -----> Waiting for 10 seconds ...
remote: App container failed to start!!
remote: =====> foo container output:
remote:        Abort testing: Your Rails environment is running in production mode!
remote: =====> end foo container output
remote: /usr/local/bin/dokku: line 49: 19164 Killed                  dokku deploy "$APP"
To dokku@dokkudev.splitatom.com:foo
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'dokku@dokkudev.splitatom.com:foo'

dokku ls strangeness
Now when you do a dokku ls, the output is somewhat confusing.  As you see below, 'vwf' is listed three times.  This makes sense because this app's procfile has two types, and I've got jobs scaled to 2 via the scale command.
web: bundle exec  rails server -p $PORT
jobs: bundle exec rake jobs:work

The output could be improved to indicate what is going on or what type of container it is
root@ip-10-123-195-142:~# dokku ls
=====> App Name                          Container id

foo                                      1ac4ffb5d56cfe73b375604c4e291e4857d7cbe0f5ab140e225291a65769d988
tmx                                      047e7d77a1ad5a71cafb8339d1fd3dcd54480c7e0d216c4955672779250dac4c
vwf                                      0a8ceeaa66d7f7fc15fdbf267ff2637047fc36b098cde8e045304bdd861fc13f
vwf                                      f687a8c04563a1e7f8194cfa257238b9e7b0953ca1cb31e0f36e2b3d162690da
vwf                                      ddc39318e766fcca3104673d4ec7cbaf7c363e32095f02661a9506fa3e7121ba

supervisord-logger compat
Will this break compatibility with the logging supervisor plugin?  Wont it also try to create multiple processes inside each container if the Procfile has multiple types?  Seems like it's for them to change to accomodate.  I will still want to use the logging functionality, but leave the scaling to DOKKU.

I'll work on dokku ls. Regarding the other 2, I think you'll need to ship a DOKKU_SCALE file. In the first case, how do you handle this with the supervisor plugin? (Set proc scale to 0?)
In the second case, I think it may be all or nothing. My initial thought for users that want to use another process manager plugin was that they would just set every proc except web to 0 with a DOKKU_SCALE file. I can doc this up.
Thoughts on better implementation are very welcomed here.
Note to self: write test for 10+ containers. Need to sort id files correctly.

I am wondering if this would allow for dynamic scaling depending on the load/amount of requests?
Also I am curious if it would be possible to create containers that dynamically start on requests and stop after some idle time again.
A possible solution for this could be to have a lightweight go server component, that listens on a certain port for requests. If nginx can`t reach any upstream source, this server would be available, the request would arrive. The go server would check if a container is already running, just drop the connection. If it is not running, check if it is being provisioned, if not, start provisioning and wait for X seconds before dropping the connection so that nginx would switch to the running container upstream.
Thoguhts/comments?

Definitely sounds out of scope.
On Wednesday, April 22, 2015, Patrick Jahns<EMAIL_ADDRESS>wrote:

I am wondering if this would allow for dynamic scaling depending on the
load/amount of requests?
Also I am curious if it would be possible to create containers that
dynamically start on requests and stop after some idle time again.
A possible solution for this could be to have a lightweight go server
component, that listens on a certain port for requests. If nginx can`t
reach any upstream source, this server would be available, the request
would arrive. The go server would check if a container is already running,
just drop the connection. If it is not running, check if it is being
provisioned, if not, start provisioning and wait for X seconds before
dropping the connection so that nginx would switch to the running container
upstream.
Thoguhts/comments?
—
Reply to this email directly or view it on GitHub
https://github.com/progrium/dokku/pull/1118#issuecomment-94985659.

--
Jeff Lindsay
http://progrium.com

I agree that it's out of scope. However, a plugin perhaps?

@michaelshobbs

I think you'll need to ship a DOKKU_SCALE file. In the first case, how do you handle this with the supervisor plugin? (Set proc scale to 0?)

I dont have to do that.  It just picked a sensible default and ran a single 'web'   That's how dokku does it even without logging-supervisord
@patrickjahns I concur that this is out of scope.   It's an interesting idea though. Sound like your next plugin project to me ;)
Another way it might be done is based on load.  That's the way I've done amazon autoscaling.  Keep metrics and increase/decrease on that
Your comments also made me think of something else I've been threatening to do:  Modify nginx to retry connection attempts that are refused by the container to get heroku like behavior.  Eg, accept the inbound connection,  hold on to that idle, then keep trying to connect upstream server until it answers.  This allow for dynamic provisioning, though not necessarily the best UX for the end user.

I meant how do you run this branch and that plugin at the same time?

@michaelshobbs  ah :)    I feared that having them both would cause a piano to fall on my head so I disabled the logging plugin before I pulled your branch.
I'll put my helmet on and see what happens with both.

I tried it with both your branch and the supervisord plugin.  I end up with two containers with both jobs and web running inside them.  I can't think of a way to make supervisord behavior as I wish.  From the supervisor point of view, I'd want different scale factors for each container.  Eg,
Container 1: web=1,jobs=0
Container 2: web=0, jobs=1

It looks like the web processes are fighting each other, where one keeps crashing and getting restarted.  Perhaps its a fight over the bind address
2015-04-22 02:59:36,570 INFO exited: web (exit status 1; not expected)
2015-04-22 02:59:37,572 INFO spawned: 'web' with pid 26384
2015-04-22 02:59:38,574 INFO success: web entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-04-22 02:59:45,878 INFO exited: web (exit status 1; not expected)
2015-04-22 02:59:46,880 INFO spawned: 'web' with pid 26598
2015-04-22 02:59:47,881 INFO success: web entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-04-22 02:59:55,275 INFO exited: web (exit status 1; not expected)
```
In my logging dir I see:

root@ip-10-123-195-142:/var/log/dokku/vwf# ls
jobs.00.log  supervisor.log  web.00.log

My expectation is that this is not a replacement for logging. So if you want that type of scaling, then you ship a DOKKU_SCALE file to override our behavior.
For example you might use a config like this
DOKKU_SCALE (dokku core):
web=1

SCALE (dokku-logging-supervisord):
web=1
jobs=1

@joshco can you confirm that your app without a Procfile works on this branch. We test with a nodejs-express app that has no Procfile. Curious, if rails behaves differently.

@michaelshobbs Confirmed.
The problem is that that we are creating a default DOKKU_SCALE that includes the 4 types worker, rake, console, web, which is wrong.  We should just have web=1.
The particular failure is that we are trying to run a container with the 'rake' command which defaults to running the app's test suite, which fails because RAILS_ENV is production, as it should be.  (the problem is that we shouldn't be trying to run the test suite)
You can repro this yourself, by cloning the following repo and pushing it to your dokku.  No need to have ruby/rails on your local machine.

https://github.com/joshco/static_rails_app_dokku

More detail, here's what happens when we push/build:
remote:        ###### WARNING:
remote:        No Procfile detected, using the default web server (webrick)
remote:        https://devcenter.heroku.com/articles/ruby-default-web-server
remote:
remote:        -----> Discovering process types
remote:        Default types for  -> worker, rake, console, web

Which creates:
root@ip-10-123-195-142:/home/dokku/foo# less DOKKU_SCALE
rake=1
console=1
web=1
worker=1

Which then leads to
remote: =====> foo container output:
remote: ++ docker logs 09f32befad3a9de2547a3f99eee6dfd824d7df96b6ede3f182527cbb7dea332a
remote: + for line in '$(docker logs $CID 2>&1)'
remote: + dokku_log_verbose_quiet 'Abort testing: Your Rails environment is running in production mode!'
remote: + [[ -z '' ]]
remote: + echo '       Abort testing: Your Rails environment is running in production mode!'
remote: + IFS='
remote: '
remote: + dokku_log_info2_quiet 'end foo container output'
remote: + [[ -z '' ]]
remote: + echo '=====> end foo container output'
**remote:        Abort testing: Your Rails environment is running in production mode!**
remote: =====> end foo container output

because we are trying to start a container that just runs 'rake'.  The default task for rake is to run the app's tests, which will fail because the environment is RAILS_ENV production, as it should be.
The reality is that you don't want to be running tests.
The default case should be a DOKKU_SCALE with only 1 entry: web=1

Yeah I was going with the approach that we would attempt to scale everything unless the user specifies differently. You think we should scale web to 1 instead and let the user tell us differently?
@josegonzalez do you agree?
That route is much easier to code too.

Right.  A rails app is pretty much always going to have a web component.  Thats the rails MVC.
The standard way to launch that is rails s, though a user might choose to customize it or use different web engines (webrick, thin,puma etc)
It MAY have a job worker.  If it does, there really isn't one standard.  It could be a number of things that the developer will specify, Rails ActiveJob, Delayed_Job, Sidekiq, etc
So a developer will specify it with something like rake jobs:work or something completely different.
console and rake tasks are run on-demand, not automatically launched or scaled. Rake is really a task runner for app management/maintenance/deployment
Rake tasks used on production servers are typically things like
rake db:migrate | db.setup | db:drop # Prepare/migrate the database
rake assets:clean | assets:precompile # Precompile or clear static assets like css/js
rake routes # show the available application routes/controllers etc

See https://gist.github.com/joshco/38a9eccd103213bf747d for a typical set of available rake tasks in a rails app

As per our IRC conversation, we're going to go with just scaling web=1 by default. It's simpler to deal with and users will expect this coming from heroku.

Is it possible to detect if logging-supervisor is present?
If so, when it does exist, we could only scale web->1 to avoid multiplication.
When it does not exist, then behavior normally and scale each of the types defined in the Procfile -> 1

No, I would rather not have a special case for a specific plugin.

I concur

I concur too. After thinking abiut it more i agree too.
I was thinking that thay plugin is makimg us behave in an unusual way (compared to heroku) but i was wrong.
Only automatically starting web, even if others are mentioned in the Procfile is what heroku does too.
(Due to cost reasons as the first web dyno is free, the worker dynos cost $$)
Logging-supervisor, which starts all=1 is the unudual bird.
So the heroku compat pillar of my argument has disappeared like a dokku destroyed app.
I concede.

@joshco :+1: :smile:
new dokku ls output posted above. docker inspect output for state is a little weird and looks like this:
"State": {
        "Dead": false,
        "Error": "",
        "ExitCode": 0,
        "FinishedAt": "0001-01-01T00:00:00Z",
        "OOMKilled": false,
        "Paused": false,
        "Pid": 19734,
        "Restarting": false,
        "Running": true,
        "StartedAt": "2015-04-23T01:31:22.034345704Z"
    }

So I'm just show the output of docker inspect -f '{{ .State.Running }}' $CID

What is the benefit of docker inspect over docker ps to get the status of the container? I proposed in #1126 a different solution for showing the state

heyo! I completely missed that PR. My bad. Honestly I just wanted to avoid additional output parsing logic...but I don't have strong enough feelings either way if we really want to have a true "status" column...

no worries - was just wondering. I support your output and I like the status column. In my opinion adds a good overview of what is running and what is not. I don`t have all deployed projects running all the time and this way I can quickly see what is running and what not.

+1 on having a status column. Thats what im looking for the majority of the time im doing a dokku ls.
Of course then i realize it isnt there and have to type docker ps

@michaelshobbs This looks good so far, anything blocking it in your mind? I assume you're using this in prod yourself and have seen some edge-cases/things you want to improve if there are blockers.

This needs to be rebased before we can merge. I'll make an interim release now and this can be in it's own release if you're okay with that, @michaelshobbs.

If I understand correctly Dockerfile apps just scale the container based on the image up/down to X instances?

@josegonzalez as long as we feel comfortable with the response thus far, I'm good. I'll rebase now.

@3onyc that is correct

@michaelshobbs please rebase and merge :)

Release Party!


Fix signal handling in legend parser

Fixes https://github.com/vega/vega/issues/1228.
I'm not at all familiar with this codebase so maybe there's more to it, but this seems to fix the issue.

Thanks @pelotom! Your fix is correct for the case of legend titles, but won't work if signal values show up in the calls to getValue within the sizeExpression method. I'll adjust with a more a general fix and include in the next vega-parser release.


run function gives 500

Hi, I have deployed kubeless v0.6.0 and kubeless-ui on kubernetes 1.10. I created test.foobar function using quick-start. I can call the function from kubeless as mentioned in guide:
$ kubeless function call get-python --data '{"echo": "echo echo"}'
{"echo": "echo echo"}

However, when I try to run function using ui, I get nothing back. In browser console, I see response to POST http://<ui-pod-ip>:3000/proxy is 500 and request payload has following:
{url: "http://localhost:8080/api/v1/proxy/namespaces/kubeless/services/get-python:8080",…}
headers:{event-id: "ui-11ebb8bc32f0", event-time: "2018-04-24T14:42:21.809Z", event-type: "application/json",…}
Accept:"application/json"
Content-Type:"application/json"
X-Requested-With:"XMLHttpRequest"
event-id:"ui-11ebb8bc32f0"
event-namespace:"ui.kubeless.io"
event-time:"2018-04-24T14:42:21.809Z"
event-type:"application/json"
json:"{"hi":"d"}"
method:"post"
url:"http://localhost:8080/api/v1/proxy/namespaces/kubeless/services/get-python:8080"

I ran kubectl proxy -p 8080 locally and tried following:
 $ curl http://localhost:8080/api/v1/proxy/namespaces/kubeless/services/get-python
{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {  },
  "status": "Failure",
  "message": "the server could not find the requested resource",
  "reason": "NotFound",
  "details": {  },
  "code": 404
}

is this url correct? As per kubernetes doc, shouldn't this be localhost:8080/api/v1/namespaces/kubeless/services/get-python:8080/proxy?

did you run the UI using the manifest at?:

yes, I used the same.

how are you accessing the UI?|

ui services exposes 3000 on host using NodePort as you mentioned. I am using <ui-host-ip>:3000 to access UI.

both URLs are correct:

can you please re-confirm this? I used following steps:
$ minikube start --kubernetes-version v1.10.0
$ kubectl config use-context minikube
$ export RELEASE=v0.6.0
$ kubectl create ns kubeless
$ kubectl create -f https://github.com/kubeless/kubeless/releases/download/$RELEASE/kubeless-non-rbac-$RELEASE.yaml
$ cat <<EOT >> test.py
def foobar(event, context):
  print event
  return event['data']
EOT
$ kubeless function deploy get-python --runtime python2.7  --from-file test.py   --handler test.foobar
$ kubectl proxy -p 8080 &
$ curl -L --data '{"Another": "Echo"}' \
>   --header "Content-Type:application/json" \
>   localhost:8080/api/v1/proxy/namespaces/default/services/get-python:8080/
{  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {  },
  "status": "Failure",
  "message": "the server could not find the requested resource",
  "reason": "NotFound",
  "details": {  },
  "code": 404
}
$ curl --data '{"Another": "Echo"}'   --header "Content-Type:application/json"   localhost:8080/api/v1/namespaces/default/services/get-python:http-function-port/proxy/
{"Another": "Echo"}


Auto-add Microsoft a co-owner for packages pushed by blessed Organizations

Fixes https://github.com/NuGet/Engineering/issues/1419
Opening this PR already for early review and feedback.
Note: this focuses on the package push API side of things. Not covering the web upload scenario, yet.

                        if (!(ConfigurationService.Current.AsynchronousPackageValidationEnabled && ConfigurationService.Current.BlockingAsynchronousPackageValidationEnabled))

on nuget.org async validation is enabled, so this code block will never be called

Refers to: src/NuGetGallery/Controllers/ApiController.cs:533 in 6228911. [](commit_id = 6228911d9196b59402fffc2c12f6350378d1eb02, deletion_comment = False)

                        if (!(ConfigurationService.Current.AsynchronousPackageValidationEnabled && ConfigurationService.Current.BlockingAsynchronousPackageValidationEnabled))

Great point! Plumbing the warnings down to orchestrator would be a mess.
Couldn't we do the warning emails asynchronously for "blessed" owners? This would also mean we could check for existing IDs that don't fall under a namespace.

In reply to: 407812683 [](ancestors = 407812683)

Refers to: src/NuGetGallery/Controllers/ApiController.cs:533 in 6228911. [](commit_id = 6228911d9196b59402fffc2c12f6350378d1eb02, deletion_comment = False)

In today's update:

new MicrosoftTeamSubscription

the new RequirePackageMetadataCompliancePolicy is now generic, and validation values are passed in via policy State (which is configurable in the db)
no more using IEntitiesContext directly in RequirePackageMetadataCompliancePolicy (instead using IUserService and IPackageOwnershipManagementService
a new unit test asserts that the new package security policy calls service APIs using commitChanges:false

Open questions:

if package policy results in warnings, a sync message is currently sent when gallery is configured to use async validation
there's still a todo in the OnSubscribeAsync of MicrosoftTeamSubscription: should that be part of v1?

@skofman1 oops, good catch :) I've pushed an update that addresses that scenario. Notice the subtle difference in email subject (published vs pushed) and email body (no link to email settings when push warning message is sent).
Merging is blocked by @scottbommarito's request for changes, but if all good, feel free to merge and deploy to DEV later today.

@scottbommarito your review is still requesting changes. Can you please check if changes are good, or let me know what needs changed still?
@karann-msft @skofman1 had an offline discussion with @joelverhagen regarding the email with warnings message, and he had an interesting suggestion:

Is it necessary the email is sent immediately?
Why don’t we just create a dedicated job to scan Microsoft owner IDs every day and send an email once on IDs that don’t have reserved namespaces. This way we get the benefit for existing IDs too. Or we can make it a report that PMs see and reach out to teams manually. Since this is sent from the same sender as normal package push and to the same recipient, don’t you think it’s likely this message will go unnoticed? I imagine the package push notification is noise for a lot of users.

I guess it all depends on the answer to the above question, and the amount of effort we want to put into it.

Xavier, as I commented above regrading Joel's suggestion: it's good, but let's not invest the work now, and leave the code as is.
Feel free to merge if you think Scott's comments were addressed.


Clicking/tapping focusable prefix and suffix elements should not focus the input

For example, when using a custom number field on iOS the UX is poor when the plus button shifts from under the original place after the first tap, making it hard to increase the number quickly.

Does this issue relate to prefix/suffix in common or plus/minus controls for number-field in particular?

Any focusable prefix/suffix elements in general, not just the plus/minus buttons in number-field.

But, that said, one exception is the reveal button in password-field, which should focus the field, as required by #124

Clear control which was requested in https://github.com/vaadin/vaadin-text-field/issues/92 probably should focus the input also.

Clear control which was requested in #92 probably should focus the input also.

Yeah, that feels natural.
And by focusable I don’t necessarily mean buttons that can receive keyboard focus. The plus and minus buttons on the number field, for example, should not be in the tab order of the page, only the field itself should be.
This is similar to the toggle button on vaadin-combo-box, which should open the dropdown, but not focus the field.

Solution proposal:

implement mousedown prevention support in ControlStateMixin: https://github.com/vaadin/vaadin-control-state-mixin/pull/17
whenever clicking something shouldn’t steal focus, use mouseDownEvent.preventDefault(), exactly the same way as with native mouse focus.


Handle null value for DeclaringType property

While I can't repro, I have seen evidence that supports this can happen.
As a rule, logging should never crash the hosting application, so best to be safe when using code that has conditional paths that throw exceptions:
https://referencesource.microsoft.com/#mscorlib/system/reflection/introspectionextensions.cs,e4a35c1ec2b91f27,references


HTTP request or updating [(data)] will not keep array length > 1

Describe the bug
which template:

[x] MaterialDesignFrameworkModule — Material Design
[ ] Bootstrap3FrameworkModule — Bootstrap 3
[ ] Bootstrap4FrameworkModule — Bootstrap 4
[ ] NoFrameworkModule — plain HTML
[ ] Other (please specify below)

A clear and concise description of what the bug is.

Array of string in schema will only render the first item in the list.

For examples HTTP request will return an data & schema.
Example
// schema
var schema = {
  type: "object",
  properties: {
    phone_number: {
      type: "array",
      items: {
        type: "string"
      }
    }
  }
}

var data = {
    phone_number: ["12321", 12312", "1321"]
}

However, when I hard code the object it behaves correctly, it's only when doing an HTTP request. that it will remove index 1,2 from data.phone_number. I can see it in Augury using $$el.componentInstance.data.phone_number it will no longer have the additional 2 items in the array..?
to do the HTTP request I use Angular HTTP Client with subscribe pattern nothing special, I even log it as soon as I as soon as I get the response in the success (data) => call and it shows correctly the array has 3 items...
To Reproduce
Steps to reproduce the behavior:
Get the schema and data from a HTTP request where the schema & data is based on the example above.
Expected behavior
A clear and concise description of what you expected to happen.
I expect add the data in the array to render and not only the first item.
Screenshots
If applicable, add screenshots to help explain your problem.
snip
missing rendered items

log of HTTPrequest

Augury element right after it loads

Desktop (please complete the following information):

OS: [Windows 10]
Browser [chrome@latest]

After digging into the code base I found that after setFormValues is called once it hits this.jsf.formGroup.patchValue(newFormValues); it changes this.jsf.data to no longer contain any array items with more than 1 element... Not sure why in this case will keep looking
JsonSchemaFormComponent.prototype.setFormValues = function (formValues, resetFirst) {
        if (resetFirst === void 0) { resetFirst = true; }
        if (formValues) {
            var newFormValues = this.objectWrap ? formValues['1'] : formValues;
            if (!this.jsf.formGroup) {
                this.jsf.formValues = formValues;
                this.activateForm();
            }
            else if (resetFirst) {
                this.jsf.formGroup.reset();
            }
            if (this.jsf.formGroup) {
                this.jsf.formGroup.patchValue(newFormValues);
            }
            if (this.onChange) {
                this.onChange(newFormValues);
            }
            if (this.onTouched) {
                this.onTouched(newFormValues);
            }
        }
        else {
            this.jsf.formGroup.reset();
        }
    };

I believe it's due to a limitation of angular.forms.PatchValue stackoverflow-patchValue currently the structure of the array wont change unless push is done and there's currently no arrayPatchValue any suggestions?

As a work-around added a *ngIf around json-schema-form to only show after all data & schema is loaded from the HTTP request this way the reset is never called and this.jsf.formGroup.reset() is never called which will allow data integrity.

In my case, I made a custom select, then a I tried to resolve the HTTP request at own component, then a got a similar situation like yours. the select list item is only shows if a touch another input..
Now I will try your work-around! @lunchboxsushi , thanks for share it!

Hi @lunchboxsushi!
I am having problems to make it to works when I have multiple widget with dynamic schemas..
ngOnInit():
 ngOnInit() {
  const sub =  this.route.paramMap.pipe(
      switchMap(params => this.service.geByCTIformItemId(params.get('form_id'), params.get('form_item_id'))),
      map(res => {
        this.resource = res;
        const row = {};

        if (this.route.snapshot.routeConfig.path !== ':form_id/novo') {
          const allowed = Object.keys(res.data).filter(f => !RegExp('^__').test(f));

          allowed.forEach(i => {
            row[i] = res.data[i];
          });
        }
        this.formData = row;

        this.formSchema = this.loadDependenciesFromUiSchema(res.json_schema, res.ui_schema);
        this.formSchema.formData = this.formData;
        return res;
      }),
    ).subscribe(res => {
       const validate = res.ui_schema.includes('source');
       !validate ? this.formActive = true : this.formActive = false;
      },
    );
  }

method to load other sources
private loadDependenciesFromUiSchema(json_schema: any, uiSchema: any): any {

        const jsonSchemaObj = JSON.parse(json_schema);
        const uiSchemaObj = JSON.parse(uiSchema);

        const uiItems = Object.keys(uiSchemaObj).filter(item => !item.includes(':'));

        uiItems.map(uiItem => {
          const widItem = uiSchemaObj[uiItem];

          if (widItem['ui:widget'] === 'select') {
            if (this.hasValidDynamic(widItem.options)) {
              const columnName = widItem.options.columnName;
              const columnValue = widItem.options.columnValue;
              this.http.get(widItem.options.source)
                .subscribe(res => {
                  this.formActive = false;
                  if (isArray(res)) {
                    const resArr = res as [];

                    widItem.options.titleMap = resArr.map(itemRes => {
                      return {
                        value: itemRes[columnValue],
                        name: itemRes[columnName],
                      };
                    });
                  } else if (isArray(res['data'])) {

                    widItem.options.titleMap = res['data'].map(itemRes => {
                      return {
                        value: itemRes[columnValue],
                        name: itemRes[columnName],
                      };
                    });
                  }
                  uiSchemaObj[uiItem] = widItem;

                  jsonSchemaObj.properties[uiItem].enum = widItem.options.titleMap.map(i => i.name);
                  this.formActive = true; // works only for unique component
                });
            } else {
              this.hasHttpRequest = false;
            }
          }
        });
        // this.formActive = true; //does not working if I put here
        return {
          schema: jsonSchemaObj,
          form: uiSchemaObj,
        };
      }

When I did a deep dive into the source code, what I found is that if you update the data while the jsonSchema component is rendered (not in an *ngIf)  it will try to update vs initialize. When updating it will always remove the array items except the first one. This is main issue, my suggestion is to make sure you only have the jsonSchema in the dom rendered after all HTTP requests. If you try to update the data object in the future it will break the functionality.
At the very least that was my understanding perhaps I might be off on the underlying cause but verify that JsonSchemaFormComponent.prototype.setFormValues = function (formValues, resetFirst) is not being called, add a break point if it's hitting this.jsf.formGroup.pathcValue(newFormValues) then it will break functionality.
Hope this helps.

Hi @lunchboxsushi , follow below my demo fully working! Damn! I will go to Pub to celebrate!! 🎉🍻
https://stackblitz.com/edit/angular-json-schema-form-dynamic-select-data-form-demo


Add id field into pipe command

The integrator has a need to call pipe line command in asynchronouse mode. For this purpose, we need to add the id field in the pipeline command. Then integrator will be able to match requests and responses.

id field has been added into json pipeline commands.
Commands example
{
    "command": "CMD_SIGN",
    "id": 1,
  "params":
  {
    "chainid": "de5f4d8974715e20f47c8bb609547c9e66b0b9e31d521199b3d8d6af6da74cb1",
    "transaction": "871689d060721b5cec5a010080841e00000000000011130065cd1d0000000000000000",
    "keyname": "test0"
  }
}

{
    "command": "CMD_SIGN",
    "id": 2,
  "params":
  {
    "chainid": "de5f4d8974715e20f47c8bb609547c9e66b0b9e31d521199b3d8d6af6da74cb1",
    "transaction": "871689d060721b5cec5a010080841e00000000000011130065cd1d0000000000000000",
    "keyname": "test0"
  }
}{
  "id": 1,
  "result": "1f3314428fe189b2a5424b874dc4ef25c8df65c9d13504ede32a2b2c4c8ada5041161705139e81b981c5c31336d719cf40bd5619a24d890c89b1772944c3fffcc4"
}
{
  "id": 2,
  "result": "1f3314428fe189b2a5424b874dc4ef25c8df65c9d13504ede32a2b2c4c8ada5041161705139e81b981c5c31336d719cf40bd5619a24d890c89b1772944c3fffcc4"
}

Keychain read id field from request and past it into response (it can be result or error).
The uniqueness of the identifier must be provided by the integrator.

There is a suggestion from @dtaipov to not remove id field from keychain pipeline protocol, because this field is useful JS integration programmers.
What have you to say about this?


fix(#1814): allow form-item slotted content for helptext and error

GoAFormItemProps also need to be updated...in the form-item.tsx
error?: React.ReactNode;
helpText?: React.ReactNode;

Issue is passed for react

:tada: This PR is included in version 1.17.0-alpha.57 :tada:
The release is available on:

npm package (@alpha dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 1.21.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 4.21.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 3.0.0-alpha.4 :tada:
The release is available on:

npm package (@alpha dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 3.0.3 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Revised how dataframes are stored for efficiency

Summary Change Description
I realized that a number of methods were converting back and forth between dataframes and dicts and I realized that it would all be much easier if I save the production of actual dataframes until after the samples (etc) have been added.
So I converted all instances of dfs_dict from a dict of pandas dataframes to a dict of pandas' style dicts, e.g. {"columnname": {0: "row 1 value", 1: "row 2 value"}}.
This prevents the necessity of various methods converting back and forth between dataframes and dicts.  It also addresses issues of places where I was temporarily using lists instead of pandas' version of lists (dicts keyed by sequential integeras starting from 0).
Affected Issues/Pull Requests

Resolves no issue, but related to #829
Merges into PR #930
Next PR: #932

Review Notes

See comments in-line.
Checklist

This pull request will be merged once the following requirements are met.  The
author and/or reviewers should uncheck any unmet requirements:

Review requirements

Minimum approvals: 1
No changes requested
All blocking issues resolved by reviewers
Specific reviewers: @add_username_here

Review period: 2 days

Associated issue/pull request requirements:

[x] All requirements in affected issues marked "resolved" are satisfied
[x] All required pull requests are merged (or none)

Basic requirements

[x] All linters pass
[x] All tests pass
[x] All conflicts resolved

Overhead requirements

[x] New/changed method tests implemented/updated (or no change)
[ ] Updated Unreleased section of changelog.md (or no change)
[x] Migrations created & committed (or no change)

Also, it's not clear why this is stacked on top of the all_missing_treatments_exception branch and not merging directly into main. It seems tangential, but not a blocking issue.

Sorry, I forgot and already merged.  Too many concurrent conversations, lol.  I suspect they're all changed. 🤞🏻

Ok. phew  They are changed... with one caveat: I intentionally left get_dataframe_template().  My thinking was that they are a template for a dataframe, which explains their structure (using dict keys that are sequential integers).  If you don't use integers, they don't play well with excel files that are read into dataframes (and dicts).


Complex markdown formatting in comments doesn't behave as expected

No matter what I do I can't get the formatting of this comment right: https://www.metaculus.com/questions/28329/gaza-war-end-and-two-state-solution/#comment-195490
It's a bit too complex for the WSYWIG editor, so I was trying to do it in markdown, but it doesn't seem like it respects the markdown formatting I enter. The fine print should look like this, and this is what I enter in markdown format:

The end of the Gaza war is defined as a cessation of hostilities lasting a minimum of 60 consecutive days. This may be achieved through various means, including but not limited to: a peace treaty, a bilateral ceasefire, or the substantial degradation of Hamas's military capabilities resulting in a de facto end to the conflict.

If the state of Palestine is dissolved, this question will resolve as No even if a successor state takes its place.

West Bank and Gaza are defined based on the 1949 Armistice Agreement.

Sorry, just edited your comment and I could set the formatting to the above without problem. Maybe show me live when you're on later today?


Concurrently requesting a node w/ and w/o an identity triggers #380

This seems like it might be somewhat different than #380 - so reporting as a separate issue:
In our application, we have configured ROOT_QUERY.viewer to be the current user.  As seems common, many of our queries are rooted off of that node for convenience.  In this instance, we made the following requests concurrently (but far enough apart that they are not merged):
{
  viewer {
    id
    name
    ...
    organization {
      posts { ... }
    }
  }
}

{
  viewer {
    organization {
      posts { ... }
    }
  }
}

Depending on which returns first, we can encounter the following error:
Can't find field id on object {"organization": "ROOT_QUERY.viewer.organization", "__typename": "User"}.
Perhaps you want to use the `returnPartialData` option?

If we run the queries in serial (requesting the viewer's id first) this does not occur.  Subsequent queries that use viewer but do not reference its id field also go through.

I don't think this is related to #380 but it is closely related to #410 and #344.
Judging from the fact that the ids generated by Apollo don't have "$" in front of them, the application is still using a release that's older than one of the two released today. If so, could you update to the latest release and see if that fixes the issue? If not, I'll look into it tomorrow and hopefully fix it.

Aha, awesome - I'll get our copy rebased and caught up today

Alright, caught up - the errors still fail (which is expected?), but I get a more reasonable error:
the application attempted to write an object with no provided id but the store already contains an id of <blah>

Yup, that's what should happen. The way the store is structured, there isn't really a way out of this problem other than just asking for IDs as far as possible.
I guess we can now close this issue since it is exhibiting intended behavior.

👍


added sounds and updated version also increased speed of repeated keys

I have modified it little you can see commits


Website is down

Website seems to be down?

Yes. I've received a report of this too. Haven't had time to look into it.
On 29 Apr 2015 8:54 pm, "Abraham Petrillo"<EMAIL_ADDRESS>wrote:

Website seems to be down?
—
Reply to this email directly or view it on GitHub
https://github.com/GavinJoyce/rubyjobs2/issues/12.

After a quick whois looks like this is hosted on aws? Looks like the EC2 instance needs a reboot :)

It's a heroku app I think.
On 29 Apr 2015 8:59 pm, "Abraham Petrillo"<EMAIL_ADDRESS>wrote:

After a quick whois looks like this is hosted on aws? Looks like the EC2
instance needs a reboot :)
—
Reply to this email directly or view it on GitHub
https://github.com/GavinJoyce/rubyjobs2/issues/12#issuecomment-97564498.

It was a dns issue. Not sure why it just started recently. The www
subdomain is fine. The naked domain still needs tweakin'
On 29 Apr 2015 9:06 pm, "Declan McGrath"<EMAIL_ADDRESS>wrote:

It's a heroku app I think.
On 29 Apr 2015 8:59 pm, "Abraham Petrillo"<EMAIL_ADDRESS>wrote:

After a quick whois looks like this is hosted on aws? Looks like the EC2
instance needs a reboot :)
—
Reply to this email directly or view it on GitHub
https://github.com/GavinJoyce/rubyjobs2/issues/12#issuecomment-97564498
.

This is no longer an issue.