How validators should work?

Hi, I have question to you about validators. I'm working now on implementing them as a module for Meteor Astronomy. Here is the repository. It's not finished yet and I need your support on how it should work to be the most intuitive and easy in use. Please take a look at read me in the repository.
Let me describe here how it works. Right now, we can define array of validators in the class schema. In validator definition, we have to provide name of the field on which validation should take place, type of the validator, some options if required and error messages. We can also add validators that works on many fields like Compare validator. To validate object we call validate() function on given object. Now few questions arises.

Should validation take place automatically when calling save() method on the object?
In what form would you like to get error message? Should it throw exception that you're gonna catch and display somewhere error or you want just true or false return value from the validate() method? And later you would like to call function like for instance object.getErrors() to get all errors.
Right now you can have multiple validators per one field and validators that work on two fields (Compare). With validators working on one field there is no problem because we exactly know with what field it's related. But where to display error messages saying for instance that two values are not equal? What kind of customisation would you like to see?
Do you need possibility to validate single field? Or single validator that works on two fields? Like object.validate('comparePasswords')?
Do you want error messages to be reactive?

If you have any other idea I'm open for discussion :)

@jagi Hello, my two cents

Maybe we can have a true\false value in model for autoValidate on save. And maybe we may have a global value for that to specify the default action as true or false. smth like Astronomy.validateOnSave = true.

Maybe we can have a callback function, which fires onSuccess and onError. I think true\false is ok with a method to retrieve errors.

Actually, the questions are hard to answer as we would show the errors on form submit, right? Or, on keyUp from an input. So, we need to use this with forms, and then see, how to implement the error messages, validation. Maybe you have an example on how to use it with forms?
I really would like to use your package, but I don't know where I can use it as for the forms & validation I use aldeed packages. If we can easily make reactive forms and validation with astronomy, I can test or discuss.

I'd stick with simplicity and a fine-grained API. This gives the developer the choice of how to use them and abstract them.

Should validation take place automatically when calling save() method on the object?

It would definitely make sense if the validation happened when you called save. But in this case validation and saving are 2 different actions. You can always create another function that does both of these actions, but its nice to give the developer the choice of how to do it. And someone may want to use save with validate...

In what form would you like to get error message? Should it throw exception that you're gonna catch and display somewhere error or you want just true or false return value from the validate() method? And later you would like to call function like for instance object.getErrors() to get all errors.

Suppose it just returns true or false (my preference). Then you can do something like this:
if (doc.validate()) { doc.save() }
Now you can allow developers to abstract this api in whatever you want, depending on their coding style or whatever framework they're using. I would never do this, but just to give an example of the diversity:
save(doc)
  .error( function() { ... })
  .success( function() { ... })

Thank you for your feedback.
Considering your suggestions I think that the best solution will be leaving user as high flexibility as possible. I will split validation and saving processes. We will have following functions:

save() - just saves object without validation,
validate() - validates object and returns true / false,
validate(validationName) - runs validation only on validator with the validationName name and returns true / false,
validateAndSave() - validates and saves object if it's valid and also returns true / false.

Moreover I will introduce reactive variables that can be used for displaying errors in a template:

object.isValid(validationName) - true / false reactive variable. Can be handy when validating single field and when user wants to display green tick that given field is OK after leaving that field (blur event on the field),
object.getErrors() - return reactive dictionary of fields / validators that didn't pass validation,
object.getError(validationName) - returns reactive var related to particular validator with the name validationName.

As validation is synchronous process, there is no need for callback functions. Having validation and saving as separate tasks I will also not include Astronomy.validateOnSave = true. In fact in the newest version of Meteor Astronomy (not published yet) validation had been moved to external module which can be installed with meteor add jagi:astronomy-validators. This leave much more flexibility to user. He/she can decide if he/she wants to use Astronomy Validators or entirely different solution.
@VladShcherbin in following days I will be working on validation extensively so I will post some example of using validation with forms. Stay tuned :). I think you will like it when I'm finished.
Tomorrow I will also ask you about one more thing but I have to go right now.
I you have any other suggestions, please let me know.

For validation, I think it would be best to be as functional as possible.
Rather than have something like:
validator = {
  name: {
    type: String
    min: 2
  }
}

I think it would be better to compose functions. This would take a little more thought but maybe something like this:
`validator.name = [isString, compose(gt(2), map(len))]
This talk will give you some more inspiration:
https://www.youtube.com/watch?v=m3svKOdZijA
And if you're up for more, check out this stuff
https://vimeo.com/104807358
https://github.com/DrBoolean/lenses

There are also some edge cases to think about like timestamps. Are those validated simply as a number? Or are they written by the server before inserted?

Functional programming and functions composition seems to be nice thing but I don't think that schema definition is a good place to use it. Schema for me is like description. In fact, I would like to avoid defining functions in the schema at all. But we have object methods and events. Maybe validators should also be "functional".
However this example
validator.name = [isString, compose(gt(2), map(len))]

is not intuitive. At the beginning I didn't know what does it do until I've watched talk about composing functions. But in fact such approach is interesting. It would be nice to have something like:

Take field title
Get length
Is grater than 2

However user can write his/her own validator that does the job. Or I could create validator FunctionValidator or similar name that would allow user to pass function where he/she could use whatever tool he/she wants. In this function this context would be the object being currently validated. I just don't want to introduce entirely different programming paradigm as a built in feature. I have to think about it in more details.
To answer your question about timestamps. I just use standard Date objects comparison. When you compare Date objects, valueOf function is used which returns numerical timestamp. So, dates comparison is just timestamps (numbers) comparison.

@jagi just use the simple string validators with the ability to create a new validator with a title. It is a common practise and works extremely well, there is no need to reinvent the wheel.
The validators should be reusable, so we can write a custom one and use it everywhere we want.

@jagi, so my point wasn't to get everyone using functional composition (although that would be great!).
*My point was to give utmost flexibility to the developer. *
And by that, I mean every validator should be (or at least accept) a function. That way, the developer isn't constrained to the framework. The biggest problem I have when using a framework is when I having some very specific thing I know how to do but I'm not given the freedom to do it within the framework. With functions for validators, you can validate however you want. It gives the developer the choice of how to do it and makes the framework much easier to create because you don't need to worry about how things are validated. You just need to run the function!
If you want to parse strings and create your own validators that way, you're free to do that, and that would likely be a separate package. Your validators will just be a function that evaluates those strings.
My concern with time stamps is slightly different. You can check they're a number and you can check the time is within some arbitrary number of seconds from now. But that's not the right way to do it. The time stamp should be generated on the server, not the client. And the owner of a document (the current user) should likely be set on the server as well (rather than compared to make sure it is the current user). Auto form has this "autovalue" concept for this. It's just something to think about for this framework.
Also security is interesting to think about. In any large app, you're going to stop using allow-deny rules and start using meteor methods because they're easier to manage. So I'd make sure that security is reasonable to manage in a larger app through this framework.

On Apr 19, 2015, at 08:57, jagi<EMAIL_ADDRESS>wrote:
Functional programming and functions composition seems to be nice thing but I don't think that schema definition is a good place to use it. Schema for me is like description. In fact, I would like to avoid defining functions in the schema at all. But we have object methods and events. Maybe validators should also be "functional".
However this example
validator.name = [isString, compose(gt(2), map(len))]
is not intuitive. At the beginning I didn't know what does it do until I've watched talk about composing functions. But in fact such approach is interesting. It would be nice to have something like:
Take field title
Get length
Is grater than 2
However user can write his/her own validator that does the job. Or I could create validator FunctionValidator or similar name that would allow user to pass function where he/she could use whatever tool he/she wants. In this function this context would be the object being currently validated. I just don't want to introduce entirely different programming paradigm as a built in feature. I have to think about it in more details.
To answer your question about timestamps. I just use standard Date objects comparison. When you compare Date objects, valueOf function is used which returns numerical timestamp. So, dates comparison is just timestamps (numbers) comparison.
—
Reply to this email directly or view it on GitHub.

@ccorcos if it goes about timestamps, I agree that timestamps should be generated on the server and you can do so. You just create Meteor method (for both environments client and server) that just saves some document and generate timestamp on save. On the client it's only simulation, and on the sever it takes server time and saves document. Even if user on the client modify timestamp it will be updated with the version from the server. So not big deal here. The same is true for any other use case. When working with Meteor applications there were many situations where I had to choose between methods and allow/deny rules for security. And almost always I chose methods. It's a lot saver to use them.
Validation. Ok so let's think about it. Validators are in fact functions they are not atomic right now. So, they for example don't check whether string's min length is 5 but they check many string rules. If it's string, min string length, max string length. What are you proposing is creating atomic validators. So we would have to split it in individual checks: isString(), gt(5), lt(5) etc. I like such concept but how should it look like? It couldn't look like you presented: [field('title'), gt(5)] because it would require validation functions like isString or gt to be global and I don't want to clutter global namespace. And if we would use Astronomy namespace it would be looooong: [Astronomy.Validators.field('title'), Astornomy.Validators.gt(5)] or something like this. Instead the only way to achieve that is using function with the this context equal to Validators module. And it would look like this:
{
  fields: {
    /* ... */
  },
  validators: {
    firstValidator: function() {
      /* this - introduces functions that developers can use to validate */
      this.field('title').isString().length().gt(5).lt(10);
    },
    secondValidator: function() {
      this.field('pass1').eq('pass2');
    }
  }
}

We use chaining here and non of validation function return true/false. These function could set internally set some flag and create error message. This approach is not functions composition but I still don't see possibility to replace it with functions composition and to be it easily readable. I would like to see some example that could work :).
@VladShcherbin I definitely don't want to reinvent the wheel :) I will try to make things as easy as possible. I had been using Doctrine validation for a long time on which I based my approach and I've never had any problem with them. It's easy and readable. But there always can be some areas to improve. I don't know everything and I'm open to discussion :). But as I said I want to make it simple :)

And there is one more thing that would be hard to implement with functional composition, it's error messages customisation. Additional argument passed to function? Could cause mess...

Hey @jagi!
Are you familiar with Rails ActiveRecord Validations? They have a very nice validation interface which is easy to learn, read and extend.
Taking some of those ideas, I could imagine an API syntax similar to this (just brainstorming):
Post.validates('title', { presence: true, max: 20 });
Post.validates('releaseDate', { type: Date });
Post.validates('category', { in: ['software', 'gadgets', 'security'] });

In my view the validators are the constructs which actually run the validations (like type, presence, in, etc.). They are not added to the Astronomy Class, they are just used. Users could define their own validators if they want:
Astronomy.defineValidator('email', {
  validate: function (field, doc) {
    // check if field is an email, add an error to the doc if not
  },
  message: "needs to be an email"
});

And then use it like so:
Post.validates('authorEmail', { presence: true, email: true });

Error messages could be stored in a special property on the document object. For example:
var post = new Post({ title: 'New post' });
post.errors // => undefined

post.validate() // => false
post.errors // => { authorEmail: 'needs to be an email', body: 'must be present' }

Using reactivity and some Blaze helpers, the error messages could be displayed to the user automagically.
For custom validations, the validates method could take an anonymous function as mentioned before:
Post.validates(function (doc) {
  if (doc.body.length < doc.title.length) {
    doc.addError('body', 'may not be shorter than title');
  }
});

oops, didn't see the validations repo
@jagi why are you using such crazy markup? let's see
Post = Astronomy.Class({
  name: 'Post',
  collection: Posts,
  transform: true,
  fields: ['title'],
  validators: [{
    type: 'String',
    options: {
      field: 'title',
      min: 10
    },
    messages: {
      min: 'Title is to short!'
    }
  }]
});

so, this validator checks for a string, min 10. I guess, two fields would be:
options: {
  field: ['title', 'slug']
  min: 10
}

What if I want to have the same validator with min:5 for a slug ? Copy-Paste and change the min value ?
{
    type: 'String',
    options: {
      field: 'title',
      min: 10
    },
    messages: {
      min: 'Title is to short!'
    }
},
{
    type: 'String',
    options: {
      field: 'slug',
      min: 5
    },
    messages: {
      min: 'Title is to short!'
    }
}

That will be a horrible mess!
Why you go with specifying the validator and passing fields there? We should have a better syntax!
smth more for human like:
validators
  title
    type: String
    min: 10,
    max: 30
  slug
    type: String
    min: 5

I've got a php background with Laravel and validators there are awesome. I don't know, if it is possible to create in js smth similar. The syntax there is like:
validators:
  title: 'alpha|min:10|max:30',
  slug: 'alpha|min:5'

This syntax is very neat, so we can make big validations very compact. eg:
public static $rules = [
	'title' => 'required|alpha|min:5|max:200|unique:mass_media_articles',
	'slug' => 'required|slug|min:3|max:70|unique:mass_media_articles',
	'contents' => 'required',
	'published_at' => 'required|date',
	'original_author' => 'required|alpha',
	'original_website' => 'required|alpha',
	'original_url' => 'required|url|unique:mass_media_articles',
	'seo_description' => 'required|alpha|min:50|max:200|unique:mass_media_articles',
];

Here, you can see clearly, what field with what rules is validated.
If we use current validators, it will be a mess and a pain to find what is validated and where.
This way it is extended:
Validator::extend('slug', function ($attribute, $value)
{
	return preg_match('/^[a-z\pN-]+$/u', $value);
});

I don't know, if it is a good idea to parse a string in JS for rules, but this looks very clean.
Similar, but much longer would be smth like:
title: {
  required: true,
  alpha: true,
  min: 5,
  max: 200,
  unique: mass_media_articles
}

Longer, but still better than current version.
We definitely need to make validation work that way:
field - validation rules
And we MUST have a set of default and changeable default validation messages.

@jagi

You just create Meteor method (for both environments client and server) that just saves some document and generate timestamp on save.

Well what does doc.save() do? It probably uses .insert or .update which would require allow-deny validation.

would require validation functions like isString or gt to be global and I don't want to clutter global namespace.

Leave that to the developer! Its trivial. Use _.isString and gt = _.curry((n, str) -> str.length > n). This library doesnt need to provide all that.
And rather than [isString, compose(gt(2), map(len))], you would want to do something like and(isString, compose(gt(2), map(len))

And there is one more thing that would be hard to implement with functional composition, it's error messages customisation. Additional argument passed to function? Could cause mess...

Well now its a question of what we want this package to do. A simple true/false validation would make sense for something things. For other things, it would make sense to throw a Meteor.error so we can catch the error.reason through a meteor method. We could return an object with {success:false, reason: 'something'}. I think the proper way of doing this the functional way is with the railway method:
http://fsharpforfunandprofit.com/rop/
This is similar to the Either monad.
https://www.npmjs.com/package/monads.either
Check this out:
TwoWayInput = function(value) {
  this.value = value
  this.error = null
}

TwoWayValidator = function(func, msg) {
  return function(twoWayInput) {
    if (!twoWayInput.error && !func(twoWayInput.value) {
      twoWayInput.error = msg
    }
    return twoWayInput
  }
}

Then we can do something like:
checkName = compose(
  TwoWayValidator(_.gt(2), 'Name must have more than 2 characters.'),
  TwoWayValidator(_.isString, 'Name must be string'),
  TwoWayInput
)

checkName('Dude').error  // null
checkName(2).error          // "Name must be string"
checkName('A').error        // Name must have more than 2 characters.

Now we can do whatever we want to checkName. We have an error message specific to each validator. We can check if error is null to see if the validation passed.
I think the question here is how exactly we want to use this. Would you expect validate to return true or false? Or an object with an error message? Perhaps this is two different functionalities entirely.
The point I wanted to make here though is that if you give someone a function, then the developer can do whatever they want. They can hook in wherever they want and use whatever programming pattern they want. I still recommend using a functional form of validation rather than using an object description.
@wursttheke is basically describing this exact thing, but in a less functional way. Astronomy.defineValidator is basically the same thing as TwoWayValidator. And the in the object description, in: ['software', 'gadgets', 'security']  is basically using partial application of the in function. Lets call it oneOf:
f = oneOf(['software', 'gadgets', 'security'])
f('software') // true
f('asdf')       // false

Now we can do something like TwoWayValidator(f, 'Not a valid category')
I understand the functional programming is a little scary at first, but its really clean, and in the end, it gives the developer more power because they aren't constrained to the framework.

Ok let's make this discussion a little be more clear :). There are few requirements for validators:

We have to have possibility to validate SINGLE field but also TWO or more fields at once. So, we can't assume that ONE VALIDATOR === ONE FIELD. So all the solution where we have field: [validators] etc. will not work.
Validators have to throw errors or save errors in some object. We have to know WHICH field(s) didn't pass WHAT validation. For instance, Field "xxx" has to be at least 5 character long or Fields "pass1" and "pass2" have to be equal.
Developer should be able to create custom validator. He/she could do it using his/her custom validator or just by passing validation function when some checking is done manually. It the second situation, developer has to throw exception himself/herself.

Are you agree with these requirements? If yes then let's just talk only on solutions that provide such features :).
Second thing is that we have two proposals if it goes about how validation rules should be written.

The first solution is concise: field: "rule1|rule2#param|rule3" etc. or something that I've proposed and what comes from Doctrine library.

[{
  type: 'String',
  options: {
    min: 5
    max: 10
  },
  messages: {
    min: '...',
    max: '...'
  }
}]

If I would have to choose I would use second approach because I can pass custom messages what I can't do in the first example. Ok, it's a lot more of writing but I can customise it :).
2. Second approach is using function. We can have atomic validators like gt(), isString() etc. and leave developer the task of creating validation rules. He/she would have to check if something is string and throw proper error message. Or we could implement in those validators some awareness of on what field(s) are they working.
And this second approach seems to be for me more reasonable.
So let's vote on solution and later we will move on :).
To answer @ccorcos question. Yes, it uses insert, update function to save document into database. However, you have take in mind that allow/deny rules are only used on the client. If developer wants to save document directly into collection. When you are using (client/server) methods you can forget about allow/deny rules. In such situation we can assume that we don't care about security on the client. We can add some document to the collection on the client (it's only simulation). The same method is executed on the sever and there we check validation rules too, we add timestamp. And if everything is ok, then we pass added object to the client. And even when client tried to hack the script, the only correct document is the one that was saved on the server.

For me, the first solution would be a killer feature. It is very simple and intuitive.
rules:
rules
    name: 'required',
    password: 'required|min:8',
    email: 'required|email|unique:users'

custom messages? no problem. api
rules
    name: 'required',
    password: 'required|min:8',
    email: 'required|email|unique:users'
messages
    // change all required messages
    'required': 'Ha ha! You missed the :attribute!',
    // change only specified message
    'name.required': 'Ooops, you need to input your name'

custom validators
Astronomy.addValidator('slug', {
    validate: function (field, doc) {
        // slug regex rule here
    },
    message: "Please, input the correct url"
});

@VladShcherbin it's not gonna work. I wrote about it. This approach can only work on single fields. How would you check if two fields are equal or one field is grater than other? I will be trying to implement functional approach today. I just want to check how it could work. However I'm still waiting for some idea on how to implement multiple fields validation.
I will let you know when I will have something to show.

@jagi hmm, no?
field_one: 'required|same:field_two'
field_two: 'required'

same with equal, less, more, required_if, etc

@VladShcherbin ok I could create such validator but it's still not flexible approach. In Doctrine I had also possibility to create more complex validators like for example OR validator where object is valid when one of two validators passed validation test and many other complex solutions. In the solution required|same:field_two etc. validation is linear and it's hard to pass some extra options. Such string needs parsing and it's error prune. Of course it easily readable, but we have to have solution that is in the same time readable and powerful.
Right now I see that there are two camps :) (not including mine :P) functional approach and linear string format. And because of that I will probably create two modules astronomy-functional-validators and astronomy-descriptive-validators to fit all needs :)

@jagi yes, you can't use extra options but you can make more custom validators to fit your needs ;)
That is why we have validators like: alpha, alpha_num, alpha_dash, etc. The default validators should cover like 80-90% of the user needs, 10% of custom validators is okay.
Btw, I think you need to choose one version of validators and stick with it. This way, it is easier to maintain, debug, test and have same validators from project to project.

And one more question I wanted to ask. In what format would you like to have error messages?

Full sentence Field "XXX" should be at least X character long
Just information that would allow developer to create error message by himself/herself

error = {
  field: "title",
  validator: "gt"
  value: 3,
  expected: 5
};

It would inform that title field is to short and should be at least 5 characters long. This way we don't force developer to use library error messages but he/she can create error messages in multiple languages.
Another example:
error = {
  fields: ["pass1", "pass2"],
  validator: "equal"
  values: ["password1", "pass"]
}

Or something similar. We can discuss the format or messages.

@jagi I think, the first variant with the messages is fine. We should probably think, how to handle multilingual websites to show the correct ones

My TwoWayValidator function can handle whatever error message you want:
TwoWayValidator(_.gt(2), 'Name must have more than 2 characters.')
or
TwoWayValidator(_.gt(2), {   field: "age",   validator: "gt"   expected: 2, })
or if you wanted more information, you could set the error message as a function:
TwoWayValidator = function(func, errFunc) {
  return function(twoWayInput) {
    if (!twoWayInput.error && !func(twoWayInput.value) {
      twoWayInput.error = errFunc(twoWayInput.value)
    }
    return twoWayInput
  }
}

TwoWayValidator(_.gt(2), function(x) {
  return {
    field: "age",
    validator: "gt"
    expected: 2,
    value: x.length
  }
)

Thats just overkill if you ask me though. I think a simple message is best like in the first example.
For validating fields against each other, I think we should just bind the function context to the object.
TwoWayValidator = function(func, msg) {
  return function(twoWayInput, context) {
    if (!twoWayInput.error && !func.bind(context)(twoWayInput.value) {
      twoWayInput.error = msg
    }
    return twoWayInput
  }
}

Now we can create a validator like this to compare two different fields.
passwordMatch = function(value) {
  return value === this.verify
}

TwoWayValidator(passwordMatch, "Password don't match.")

I'm already working on something you proposed and it seems to work great and there is much less code.
Example validation rules can look like follows:
validators: {
  title: Astronomy.Validators.And(
    Astronomy.Validators.IsString('Title has to be a string'),
    Astronomy.Validators.MinLength(5, 'Title has to at least 5 characters long'),
    Astronomy.Validators.MaxLength(10, 'Title has to at most 10 characters long')
  ),
  pass1: Astronomy.Validators.And(
    Astronomy.Validators.IsString('Pass has to be a string'),
    Astronomy.Validators.EqualTo('pass2', 'Passwords have to be equal')
  )
}

I like your idea of And validator. We can also create Or and other validators and just nest them to create more complex rules. Making validators functions instead of objects made code much cleaner.
I will also create some aliases so that it wouldn't require a lot of writing. Right now there is alias Astro for Astronomy.
Functional validation will be the main module. I will also create two more modules with different approaches that we've discussed here and both will be using functional validation internally but exposing different APIs for developer. Thanks to that everyone will be happy :).

I have also one more idea for making writing validation rules shorter. Take a look at example before and after examples:
Before:
validators: {
  title: Astro.Validators.and(
    Astro.Validators.isString(),
    Astro.Validators.minLength(5),
    Astro.Validators.maxLength(10)
  ),
  pass1: Astro.Validators.and(
    Astro.Validators.isString(),
    Astro.Validators.equalTo('pass2')
  )
}

After:
validators: {
  title: function(validators) {
    return validators.and(
      validators.isString(),
      validators.minLength(5),
      validators.maxLength(10)
    );
  },
  pass1: function(v) {
    return v.and(
      v.isString(),
      v.equalTo('pass2')
    );
  }
}

In the AFTER example validators are not global. Instead they are passed as first argument of function, so we can name validators list, it can be validators or just short v.
Developers willing to create their own validators will use common for Astronomy syntax:
Astronomy.Validator({
  name: 'isString',
  validate: function(value, fieldName, message) {
    if (!_.isString(value)) {
      throw new Error(message || 'The "' + fieldName + '" field has to be a string');
    }
  }
});

It would create validators.isString validator.
Why such way of creating validators and defining them in the schema?
Thanks to that I have explicit control over the process of creating and executing validators. I can check if all the necessary fields where provided.

@VladShcherbin read carefully what I wrote. This form of validation will be default one but not the only one. There will also be two more validation modules with string and object formats. However internally both approaches will be using functional validators. But you won't have to worry about that. You will just provide simple string in the form of
validators: {
  title: "isString&minLength=5&maxLength=30"
}

or something similar. Do you like such approach?

@jagi yes, sure. it would be awesome to have that api
title: 'string|min:5|max:30'

thank you! you are doing a great job! cant wait to see forms with this validators

@jagi, This looks good:
validators: {
  title: Astronomy.Validators.And(
    Astronomy.Validators.IsString('Title has to be a string'),
    Astronomy.Validators.MinLength(5, 'Title has to at least 5 characters long'),
    Astronomy.Validators.MaxLength(10, 'Title has to at most 10 characters long')
  ),
  pass1: Astronomy.Validators.And(
    Astronomy.Validators.IsString('Pass has to be a string'),
    Astronomy.Validators.EqualTo('pass2', 'Passwords have to be equal')
  )
}

Very functional and uses the railway method nicely.  All that namespacing does look frustrating. What I would do is leave that to the developer. Write in the readme about how TwoWayValidator works (probably call it Astronomy.Validator) and how TwoWayInput works (probably call it Astronomy.ValidatedField or something). Then people can construct their own methods:
mustBeString = Astronomy.Validator(_.isString, 'Title has to be a string')
minLength = function(n) {Astronomy.Validator(function(x) {return x.length >=n}, ''Title has to at least " + n.toString() + " characters long'')}

Then we can do something like:
validators: {
  title: and(mustBeString, minLength(5)),

The point is that we shouldn't be re-inventing the wheel here. I think that this framework should define a ValidatedInput monad and let the developer do the rest however they please. For example, there already exist libraries for all of these functions. Check out Ramdajs

allPass
lt, lte, gt, gte, eq

So why constrain the developer and give yourself so much overhead by creating all of these within the framework?
That said, I think should definitely create a separate package for a bunch of these validators so you can reuse them as you please. This should also please @VladShcherbin because he can write his own parser for the syntax he wants to use.
rules = [
  {
    regex: /string/
    func: _.string
    msg: 'Must be string'
  },
  {
    regex: /min:([0-9]*)/
    func: compose(R.gte(10), Number)
    msg: 'Must be greater than 10'
  }
]

parser = function(str) {
  return function(value) {
    for (token in str.split('|')) {
      for (rule in rules) {
        x = token.match(rule.regex)
        if (x) {
          valid = x.func.apply(null, x.splice(1).concat([value])
          if (!valid) {
            return TwoWayInput(value, rule.msg)
          }
        }
      })
    })
    return TwoWayInput(value, null)
}

The match returns any groups you want to pass as arguments to the function. They're passed as a string so we want to make sure that turns into a number.
Anyways my point is that @VladShcherbin can be very happy with this functional approach as well. He can create his own syntax just like this!
validator = {
  title: parser("string|min:5|max:30")
}

And that is the beauty of functional programming.

@ccorcos I don't think, this is the beauty. I like KISS way of things.
I really don't want to reinvent the wheel and write this parsers for just a simple string/number/min,max/same/etc validation.
These are reusable components and they have to be as simple as possible. The simplicity attracts people, noone wants to white tons of code to validate a string and its max length.
I believe, for crazy complex validation you should create custom validator rule and use it anywhere you want.
compare this
validators: {
  title: Astronomy.Validators.And(
    Astronomy.Validators.IsString(),
    Astronomy.Validators.MinLength(5),
    Astronomy.Validators.MaxLength(10)
  ),
  pass1: Astronomy.Validators.And(
    Astronomy.Validators.IsString(),
    Astronomy.Validators.EqualTo('pass2')
  )
}

and that
validators: {
  title: 'string|min:5|max:10',
  pass1: 'string|same:pass2'
}

For me, this is the true beauty. :v:

@VladShcherbin I agree with you that you have a nice scheme there. The point I am making is that the interface with the framework should be as flexible as possible. Using a functional approach with the TwoWayInput monad provides that flexibility to validate both ways along with ways we've never thought of.
I don't think people should have to re-write all of this code every time. This code should be written once and reused. They could be package that extend this package.
It is really that bad if the only difference is a function call?
validators: {
  title: f('string|min:5|max:10'),
  pass1: f('string|same:pass2')
}

The functional approach with the monad is the least opinionated and the most flexible. I have nothing more to say.

@ccorcos yes, I understand that, but I don't see the point of using it.
We can make a new validation rule, name it, write whatever function we want and use the same way. Yes, we gain more flexibility, we can use more params, but, honestly, do we really need it?
In your example we need to repeat f('...'). It is okay, but for what purpose. If we can get rid of it - why won't we :)
Both ways are fine, but I will definitely pick smaller one every time just because default validators cover 90% of the cases for most developers and I can write 2-5 custom validators when I need. The simplicity is awesome everywhere, in design, in code.
We have such validators in Laravel (PHP) and everyone loves it, I have never heard someone complain, that validators are bad or switch to another ones. So I wish @jagi can bring such simplicity here.

I'm working on validators and it's going well. Everyone will be happy :). Stay tuned :).

It's not fully documented yet but you can start using it.
Functional validators: https://github.com/jagi/meteor-astronomy-validators
Simple validators with string rules: https://github.com/jagi/meteor-astronomy-simple-validators

@jagi this is f. awesome!

Way to go @jagi. This is very nice!
For your examples, I'd use an alias so you can do V.isString and stuff because it is a lot it type. The string stuff looks great too. Very nice. How'd the railway monad work out?
Sent from my iPhone

On Apr 26, 2015, at 13:30, jagi<EMAIL_ADDRESS>wrote:
It's not fully documented yet but you can start using it.
Functional validators: https://github.com/jagi/meteor-astronomy-validators
Simple validators with string rules: https://github.com/jagi/meteor-astronomy-simple-validators
—
Reply to this email directly or view it on GitHub.

@VladShcherbin and @ccorcos thanks. More features to come. I will also do a little work on making documentation better. When the core version is finished I will also create video tutorial.
I haven't tested railway monad.
Right now I'm closing this issue. If you have any suggestions, feature request etc. please open new issues.
Thanks for collaboration :)

@jagi thank you a lot for your work.
Now, when we have awesome validation, maybe you can provide an example with form actions (like insert, update, etc) ?
I think, it is almost the time, when I can replace like 4-6 packages with the Astronomy and give a full test.

Yes of course :). I will improve documentation and provide such examples. I'm also making some refactoring and improving field types module, so there will be a little change. I think that this weekend it will be ready with examples of using validators in forms. Stay tuned :)

@jagi sounds awesome! can't wait.

Ok, I've prepare example project using validators. You can find repo here: https://github.com/jagi/meteor-astronomy-examples and the working example on Meteor server here: http://astronomy.meteor.com/
Tomorrow I will describe how it works. But right now you can investigate the code. It's very simple.

@jagi thanks, it works fine for me. I'll try to setup everything today-tomorrow and run a full test. Thank you!


Bump upper bounds to work with stackage-nightly (ghc 8.2)

WARNING: Ignoring out of range dependency (allow-newer enabled): aeson-<IP_ADDRESS>. yesod-auth-oauth2 requires: >=0.6 && <1.2
WARNING: Ignoring out of range dependency (allow-newer enabled): hoauth2-1.5.0. yesod-auth-oauth2 requires: >=1.3.0 && <1.4
i had to force "allow-newer". No compile-errors though. Looks like the bump for those two packages would be no problem.
(at least for the current stackage-nightly that will become the next lts-10.x for ghc 8.2)

Thanks for the report. I wanted to reproduce this before fixing it, but I'm having some trouble:
% stack build --resolver nightly --pedantic --test
Selected resolver: nightly-2017-12-10
Downloaded nightly-2017-12-10 build plan.
AesonException "Error in $.packages.cassava.constraints.flags['bytestring--lt-0_10_4']: Invalid flag name: \"bytestring--lt-0_10_4\""

Do you know anything about this?
Anyway, I'm going to try and make a branch that checks compilation with nightly on CI; maybe using stack-1.6.1 (which I can't do yet locally) resolves that issue. Then I can see the failure, confirm the fix, and catch these (a little) more pro-actively going forward.

stack 1.5.x breaks with ghc8.2, due to ghc forcing things internally. It worked until dec 6th with 1.5.1 iirc. then ghc broke things (that were already fixed in stack 1.6). But stack 1.6 released 3 days later .. so that should resolve many things.
Some minor things have to be changed in the cabal-file to pass testing with -Wall. PR is on the way.
Log for stack build --resolver nightly --pedantic --test with resolver nightly-2017-12-13:
Progress: 1/2
URI.ByteString.Extension
  IsString Scheme
    works
  IsString Host
    works
  IsString URIRef Relative
    works
  IsString URIRef Absolute
    works
  fromText
    returns Just a URI for valid values, as the quasi-quoter would
    returns Nothing for invalid values
  unsafeFromText
    returns a URI for valid values, as the quasi-quoter would
    raises for invalid values
  toText
    serializes the URI to text
  fromRelative
    makes a URI absolute with a given host
  withQuery
    appends a query to a URI
    handles a URI with an existing query
    handles santization of the query

Finished in 0.0009 seconds
13 examples, 0 failures

yesod-auth-oauth2-0.3.0: Test suite test passed

Fixed with #90.


[bug] Bounded Stream should end directly if the full scan snapshot should be end

Purpose
If the table has no input now, the bounded stream will never end.
Because there is no check for full scan snapshot.
We should fix this: Bounded Stream should end directly if the full scan snapshot should be end.
Tests

StreamDataTableScanTest
BoundedWatermarkCheckerTest

LGTM!


Move message to conversation

I used to have an extension which made this, but I cannot find it any more. Could you add this feature? It is useful when you receive a mail from an old conversation.
Thanks

This is an interesting feature request. If we would see where suggestions come from (cf. my proposal in #27), we could add the conversation folder as a suggestion and mark/highlight it accordingly.
If you know how to query (a) the conversation of a message and (b) the folder of the message using the new MailExtension API, please feel free to share a code snippet in this issue.


Command to allow linking to local version of Elixir

It'd be great if kiex supported linking to a local version of Elixir for testing out new features, etc.
What I ended up doing was kiex install master and then symlinking .kiex/elixirs/elixir-master to my local elixir directory. I don't know if there are any possible side-effects of doing this but it seemed to work really well for what I was doing.
It should perhaps be called elixir-local or similar to distinguish it from other versions?
This would make it easier to hack on elixir and test out the results quickly without changing the elixir commands one would normally use.

Update: this worked fine in my current shell but I was unable to switch to it in a new shell.

@joshprice, can you please clarify what you mean by local?
Maybe you mean local to the project you are working in?

By "local" I'm referring to a git clone of Elixir local to my machine which I am modifying and would use to test new features out and compare the results between Elixir versions.
Hope that clarifies.

Before I found a solution to this, I also searched in kiex directly. Actually its very easy, just
clone & make elixir somewhere locally, and then create a function in you bash_profile:
function use_local_elixir() {
  export ELIXIR_VERSION="local"
  export PATH="$HOME/github/elixir/bin:$PATH"
  export MIX_ARCHIVES="$HOME/github/elixir/archives"
}

But it would be very cool, if we could link the local elixir somehow, and also make it default, because the above will work just after you called use_local_elixir from the shell session.. So a general solution would be really nice


Handle drawing of relationship lines better to take in to account invisible children

While working on the backport of the related TreeItem (cf. #61372) visibility changes I noticed an issue
When the relationship lines are activated, if a node has no visible children the line going to it will be drawn short...
With visible child:

Setting child to be invisble:

The check was just checking that there was a child, however now we need to determine if there are any visible children.
To do this I am just checking at the total number of visible children is > 0. This is just the simplest way of doing it, however it's probably not as performant as say having a new function like get_first_visible_child(). Not sure if we'd want to add something like that (either as a public or private method), or just go with this approach.
After the fix:

Thanks!


Create utils folder inside tools

Added a command to create utils folder inside ~/tools before cloning "SSARA" and "sardem". Without this command, when you copy and paste this block, it throws a folder not found error for cd ~/tools/utils and clones "SSARA" and "sardem" to ~/tools rather than ~/tools/utils.

LGTM, thank you @eshmsh.


Agent setup

Hi, Can you help me build the agent file ? i am able to run the server but post executing the agent it does not reflect on the server UI.
I am using Linux as server and windows as Agent machine. I edited and cross checked config.json and also the connectivity.
Can you please guide me building the agent executable?

Apologies for the delayed reply.
If the issue is still happening, try updating the IP addresses in the config.json file to match your actual server's IP.
Additionally, the path and query pairs within the configuration define the specific log channel and filter criteria you wish to monitor.
For utilizing the Microsoft-Windows-Sysmon/Operational path, Sysmon installation is necessary.
Currently, the server is configured to process Sysmon events (event IDs 1 through 25) and PowerShell events (event ID 4104).
Hope this setup helps.

Hey Thank you,
It worked.
I changed the port to 8001 in the config file which worked. It would
suggest edit the same in example config.
Thanks once again/
Example:
{
"uri": "ws://<IP_ADDRESS>:8000/ws/agent/",
On Sun, Jul 21, 2024 at 10:59 PM sonx @.***> wrote:

Closed #1 https://github.com/scrymastic/edr-agent/issues/1 as completed.
—
Reply to this email directly, view it on GitHub
https://github.com/scrymastic/edr-agent/issues/1#event-13593244143, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AIZNXAGONJYM4EBVKXV5OOTZNPVWPAVCNFSM6AAAAABK5AALRSVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTGU4TGMRUGQYTIMY
.
You are receiving this because you authored the thread.Message ID:
@.***>

Hello,
Hope you are doing well.
Is there a plan to implement a Response feature too ?
Regards,
Jaspreet Singh
On Tue, Jul 23, 2024 at 12:42 AM jaspreet singh @.***>
wrote:

Hey Thank you,
It worked.
I changed the port to 8001 in the config file which worked. It would
suggest edit the same in example config.
Thanks once again/
Example:
{
"uri": "ws://<IP_ADDRESS>:8000/ws/agent/",
On Sun, Jul 21, 2024 at 10:59 PM sonx @.***> wrote:

Closed #1 https://github.com/scrymastic/edr-agent/issues/1 as
completed.
—
Reply to this email directly, view it on GitHub
https://github.com/scrymastic/edr-agent/issues/1#event-13593244143, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AIZNXAGONJYM4EBVKXV5OOTZNPVWPAVCNFSM6AAAAABK5AALRSVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTGU4TGMRUGQYTIMY
.
You are receiving this because you authored the thread.Message ID:
@.***>

Automated response features could enhance the system's value. I found some actions to consider:

Sending alerts to the endpoint

Quarantining files and performing yara scans

Blocking network connections
Terminating malicious processes

However, I don't have concrete plans to implement these additional features right now.

Từ: Jaspreet Singh @.>
Đã gửi: 28 Tháng Bảy 2024 11:51 CH
Đến: scrymastic/edr-agent @.>
Cc: LÊ XUÂN SƠN @.>; State change @.>
Chủ đề: Re: [scrymastic/edr-agent] Agent setup (Issue #1)
Hello,
Hope you are doing well.
Is there a plan to implement a Response feature too ?
Regards,
Jaspreet Singh
On Tue, Jul 23, 2024 at 12:42 AM jaspreet singh @.***>
wrote:

Hey Thank you,
It worked.
I changed the port to 8001 in the config file which worked. It would
suggest edit the same in example config.
Thanks once again/
Example:
{
"uri": "ws://<IP_ADDRESS>:8000/ws/agent/",
On Sun, Jul 21, 2024 at 10:59 PM sonx @.***> wrote:

Closed #1 https://github.com/scrymastic/edr-agent/issues/1 as
completed.
—
Reply to this email directly, view it on GitHub
https://github.com/scrymastic/edr-agent/issues/1#event-13593244143, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AIZNXAGONJYM4EBVKXV5OOTZNPVWPAVCNFSM6AAAAABK5AALRSVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTGU4TGMRUGQYTIMY
.
You are receiving this because you authored the thread.Message ID:
@.***>

—
Reply to this email directly, view it on GitHubhttps://github.com/scrymastic/edr-agent/issues/1#issuecomment-2254578589, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AXTMRLFO5JFIZJUWOPOU6N3ZOUOQHAVCNFSM6AAAAABK5AALRSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUGU3TQNJYHE.
You are receiving this because you modified the open/close state.Message ID: @.***>

Hey thanks for responding.
Could you please send me an idea on how do i include response actions into
this ?
Also can we connect in linkedin ?
Regards,
Jaspreet Singh
On Mon, 29 Jul 2024 at 9:06 AM, sonx @.***> wrote:

Automated response features could enhance the system's value. I found some
actions to consider:

Sending alerts to the endpoint

Quarantining files and performing yara scans

Blocking network connections
Terminating malicious processes

However, I don't have concrete plans to implement these additional
features right now.

Từ: Jaspreet Singh @.>
Đã gửi: 28 Tháng Bảy 2024 11:51 CH
Đến: scrymastic/edr-agent @.>
Cc: LÊ XUÂN SƠN @.>; State change @.>
Chủ đề: Re: [scrymastic/edr-agent] Agent setup (Issue #1)
Hello,
Hope you are doing well.
Is there a plan to implement a Response feature too ?
Regards,
Jaspreet Singh
On Tue, Jul 23, 2024 at 12:42 AM jaspreet singh @.***>
wrote:

Hey Thank you,
It worked.
I changed the port to 8001 in the config file which worked. It would
suggest edit the same in example config.
Thanks once again/
Example:
{
"uri": "ws://<IP_ADDRESS>:8000/ws/agent/",
On Sun, Jul 21, 2024 at 10:59 PM sonx @.***> wrote:

Closed #1 https://github.com/scrymastic/edr-agent/issues/1 as
completed.
—
Reply to this email directly, view it on GitHub
https://github.com/scrymastic/edr-agent/issues/1#event-13593244143,
or
unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AIZNXAGONJYM4EBVKXV5OOTZNPVWPAVCNFSM6AAAAABK5AALRSVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTGU4TGMRUGQYTIMY>

.
You are receiving this because you authored the thread.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub<
https://github.com/scrymastic/edr-agent/issues/1#issuecomment-2254578589>,
or unsubscribe<
https://github.com/notifications/unsubscribe-auth/AXTMRLFO5JFIZJUWOPOU6N3ZOUOQHAVCNFSM6AAAAABK5AALRSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUGU3TQNJYHE>.
You are receiving this because you modified the open/close state.Message
ID: @.***>
—
Reply to this email directly, view it on GitHub
https://github.com/scrymastic/edr-agent/issues/1#issuecomment-2254877579,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIZNXAEUTWOA7QSBRENU5F3ZOW2CJAVCNFSM6AAAAABK5AALRSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUHA3TONJXHE
.
You are receiving this because you authored the thread.Message ID:
@.***>

I am quite surprised  that someone is interested in this project that much.
This is just a basic implementation and there is a lot of room for improving.
But it will need more works, so I cant tell exactly how to implement more features now.
And I dont have plans to dev this project at the moment.
However, if you want to connect, here is my linkedin

Từ: Jaspreet Singh @.>
Đã gửi: 04 Tháng Tám 2024 12:17 SA
Đến: scrymastic/edr-agent @.>
Cc: LÊ XUÂN SƠN @.>; State change @.>
Chủ đề: Re: [scrymastic/edr-agent] Agent setup (Issue #1)
Hey thanks for responding.
Could you please send me an idea on how do i include response actions into
this ?
Also can we connect in linkedin ?
Regards,
Jaspreet Singh
On Mon, 29 Jul 2024 at 9:06 AM, sonx @.***> wrote:

Automated response features could enhance the system's value. I found some
actions to consider:

Sending alerts to the endpoint

Quarantining files and performing yara scans

Blocking network connections
Terminating malicious processes

However, I don't have concrete plans to implement these additional
features right now.

Từ: Jaspreet Singh @.>
Đã gửi: 28 Tháng Bảy 2024 11:51 CH
Đến: scrymastic/edr-agent @.>
Cc: LÊ XUÂN SƠN @.>; State change @.>
Chủ đề: Re: [scrymastic/edr-agent] Agent setup (Issue #1)
Hello,
Hope you are doing well.
Is there a plan to implement a Response feature too ?
Regards,
Jaspreet Singh
On Tue, Jul 23, 2024 at 12:42 AM jaspreet singh @.***>
wrote:

Hey Thank you,
It worked.
I changed the port to 8001 in the config file which worked. It would
suggest edit the same in example config.
Thanks once again/
Example:
{
"uri": "ws://<IP_ADDRESS>:8000/ws/agent/",
On Sun, Jul 21, 2024 at 10:59 PM sonx @.***> wrote:

Closed #1 https://github.com/scrymastic/edr-agent/issues/1 as
completed.
—
Reply to this email directly, view it on GitHub
https://github.com/scrymastic/edr-agent/issues/1#event-13593244143,
or
unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AIZNXAGONJYM4EBVKXV5OOTZNPVWPAVCNFSM6AAAAABK5AALRSVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTGU4TGMRUGQYTIMY>

.
You are receiving this because you authored the thread.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub<
https://github.com/scrymastic/edr-agent/issues/1#issuecomment-2254578589>,
or unsubscribe<
https://github.com/notifications/unsubscribe-auth/AXTMRLFO5JFIZJUWOPOU6N3ZOUOQHAVCNFSM6AAAAABK5AALRSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUGU3TQNJYHE>.
You are receiving this because you modified the open/close state.Message
ID: @.***>
—
Reply to this email directly, view it on GitHub
https://github.com/scrymastic/edr-agent/issues/1#issuecomment-2254877579,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIZNXAEUTWOA7QSBRENU5F3ZOW2CJAVCNFSM6AAAAABK5AALRSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUHA3TONJXHE
.
You are receiving this because you authored the thread.Message ID:
@.***>

—
Reply to this email directly, view it on GitHubhttps://github.com/scrymastic/edr-agent/issues/1#issuecomment-2267075173, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AXTMRLDXDM25LV5VTTFFSS3ZPUGD5AVCNFSM6AAAAABK5AALRSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRXGA3TKMJXGM.
You are receiving this because you modified the open/close state.Message ID: @.***>

Yes my friend. Though this is just a basic implementation, it has a lot of
scope. i am interested to build this into a full-fledged Edr agent. With
all the response features.
Do you have any other reference that you can mention to me?
Which is open source and can be used as a Edr agent ?
Regards,
Jaspreet Singh
On Mon, 5 Aug 2024 at 9:14 AM, sonx @.***> wrote:

I am quite surprised that someone is interested in this project that much.
This is just a basic implementation and there is a lot of room for
improving.
But it will need more works, so I cant tell exactly how to implement more
features now.
And I dont have plans to dev this project at the moment.
However, if you want to connect, here is my linkedin

Từ: Jaspreet Singh @.>
Đã gửi: 04 Tháng Tám 2024 12:17 SA
Đến: scrymastic/edr-agent @.>
Cc: LÊ XUÂN SƠN @.>; State change @.>
Chủ đề: Re: [scrymastic/edr-agent] Agent setup (Issue #1)
Hey thanks for responding.
Could you please send me an idea on how do i include response actions into
this ?
Also can we connect in linkedin ?
Regards,
Jaspreet Singh
On Mon, 29 Jul 2024 at 9:06 AM, sonx @.***> wrote:

Automated response features could enhance the system's value. I found
some
actions to consider:

Sending alerts to the endpoint

Quarantining files and performing yara scans

Blocking network connections
Terminating malicious processes

However, I don't have concrete plans to implement these additional
features right now.

Từ: Jaspreet Singh @.>
Đã gửi: 28 Tháng Bảy 2024 11:51 CH
Đến: scrymastic/edr-agent @.>
Cc: LÊ XUÂN SƠN @.>; State change @.>
Chủ đề: Re: [scrymastic/edr-agent] Agent setup (Issue #1)
Hello,
Hope you are doing well.
Is there a plan to implement a Response feature too ?
Regards,
Jaspreet Singh
On Tue, Jul 23, 2024 at 12:42 AM jaspreet singh @.***>
wrote:

Hey Thank you,
It worked.
I changed the port to 8001 in the config file which worked. It would
suggest edit the same in example config.
Thanks once again/
Example:
{
"uri": "ws://<IP_ADDRESS>:8000/ws/agent/",
On Sun, Jul 21, 2024 at 10:59 PM sonx @.***> wrote:

Closed #1 https://github.com/scrymastic/edr-agent/issues/1 as
completed.
—
Reply to this email directly, view it on GitHub
https://github.com/scrymastic/edr-agent/issues/1#event-13593244143,

or

unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AIZNXAGONJYM4EBVKXV5OOTZNPVWPAVCNFSM6AAAAABK5AALRSVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTGU4TGMRUGQYTIMY>

.
You are receiving this because you authored the thread.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub<
https://github.com/scrymastic/edr-agent/issues/1#issuecomment-2254578589>,

or unsubscribe<

https://github.com/notifications/unsubscribe-auth/AXTMRLFO5JFIZJUWOPOU6N3ZOUOQHAVCNFSM6AAAAABK5AALRSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUGU3TQNJYHE>.

You are receiving this because you modified the open/close state.Message
ID: @.***>
—
Reply to this email directly, view it on GitHub
<
https://github.com/scrymastic/edr-agent/issues/1#issuecomment-2254877579>,

or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AIZNXAEUTWOA7QSBRENU5F3ZOW2CJAVCNFSM6AAAAABK5AALRSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUHA3TONJXHE>

.
You are receiving this because you authored the thread.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub<
https://github.com/scrymastic/edr-agent/issues/1#issuecomment-2267075173>,
or unsubscribe<
https://github.com/notifications/unsubscribe-auth/AXTMRLDXDM25LV5VTTFFSS3ZPUGD5AVCNFSM6AAAAABK5AALRSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRXGA3TKMJXGM>.
You are receiving this because you modified the open/close state.Message
ID: @.***>
—
Reply to this email directly, view it on GitHub
https://github.com/scrymastic/edr-agent/issues/1#issuecomment-2268113723,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIZNXAH2PH5FFXOD5QMCHHDZP3YH7AVCNFSM6AAAAABK5AALRSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRYGEYTGNZSGM
.
You are receiving this because you authored the thread.Message ID:
@.***>

I do not have many references for the project, but you may want to take a look at https://github.com/ION28/BLUESPAWN or
https://github.com/ossec/ossec-hids.
[https://opengraph.githubassets.com/2802e3d785b72be5fc134f9006b3f496b95079562b2573a0539f6239f5386664/ossec/ossec-hids]https://github.com/ossec/ossec-hids
GitHub - ossec/ossec-hids: OSSEC is an Open Source Host-based Intrusion Detection System that performs log analysis, file integrity checking, policy monitoring, rootkit detection, real-time alerting and active response.https://github.com/ossec/ossec-hids
OSSEC is an Open Source Host-based Intrusion Detection System that performs log analysis, file integrity checking, policy monitoring, rootkit detection, real-time alerting and active response. - os...
github.com
[https://repository-images.githubusercontent.com/189113067/ee51a880-d4cb-11ea-861c-deb39427ca98]https://github.com/ION28/BLUESPAWN
GitHub - ION28/BLUESPAWN: An Active Defense and EDR software to empower Blue Teamshttps://github.com/ION28/BLUESPAWN
An Active Defense and EDR software to empower Blue Teams - ION28/BLUESPAWN
github.com

Từ: Jaspreet Singh @.>
Đã gửi: 05 Tháng Tám 2024 3:33 CH
Đến: scrymastic/edr-agent @.>
Cc: LÊ XUÂN SƠN @.>; State change @.>
Chủ đề: Re: [scrymastic/edr-agent] Agent setup (Issue #1)
Yes my friend. Though this is just a basic implementation, it has a lot of
scope. i am interested to build this into a full-fledged Edr agent. With
all the response features.
Do you have any other reference that you can mention to me?
Which is open source and can be used as a Edr agent ?
Regards,
Jaspreet Singh
On Mon, 5 Aug 2024 at 9:14 AM, sonx @.***> wrote:

I am quite surprised that someone is interested in this project that much.
This is just a basic implementation and there is a lot of room for
improving.
But it will need more works, so I cant tell exactly how to implement more
features now.
And I dont have plans to dev this project at the moment.
However, if you want to connect, here is my linkedin

Từ: Jaspreet Singh @.>
Đã gửi: 04 Tháng Tám 2024 12:17 SA
Đến: scrymastic/edr-agent @.>
Cc: LÊ XUÂN SƠN @.>; State change @.>
Chủ đề: Re: [scrymastic/edr-agent] Agent setup (Issue #1)
Hey thanks for responding.
Could you please send me an idea on how do i include response actions into
this ?
Also can we connect in linkedin ?
Regards,
Jaspreet Singh
On Mon, 29 Jul 2024 at 9:06 AM, sonx @.***> wrote:

Automated response features could enhance the system's value. I found
some
actions to consider:

Sending alerts to the endpoint

Quarantining files and performing yara scans

Blocking network connections
Terminating malicious processes

However, I don't have concrete plans to implement these additional
features right now.

Từ: Jaspreet Singh @.>
Đã gửi: 28 Tháng Bảy 2024 11:51 CH
Đến: scrymastic/edr-agent @.>
Cc: LÊ XUÂN SƠN @.>; State change @.>
Chủ đề: Re: [scrymastic/edr-agent] Agent setup (Issue #1)
Hello,
Hope you are doing well.
Is there a plan to implement a Response feature too ?
Regards,
Jaspreet Singh
On Tue, Jul 23, 2024 at 12:42 AM jaspreet singh @.***>
wrote:

Hey Thank you,
It worked.
I changed the port to 8001 in the config file which worked. It would
suggest edit the same in example config.
Thanks once again/
Example:
{
"uri": "ws://<IP_ADDRESS>:8000/ws/agent/",
On Sun, Jul 21, 2024 at 10:59 PM sonx @.***> wrote:

Closed #1 https://github.com/scrymastic/edr-agent/issues/1 as
completed.
—
Reply to this email directly, view it on GitHub
https://github.com/scrymastic/edr-agent/issues/1#event-13593244143,

or

unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AIZNXAGONJYM4EBVKXV5OOTZNPVWPAVCNFSM6AAAAABK5AALRSVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTGU4TGMRUGQYTIMY>

.
You are receiving this because you authored the thread.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub<
https://github.com/scrymastic/edr-agent/issues/1#issuecomment-2254578589>,

or unsubscribe<

https://github.com/notifications/unsubscribe-auth/AXTMRLFO5JFIZJUWOPOU6N3ZOUOQHAVCNFSM6AAAAABK5AALRSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUGU3TQNJYHE>.

You are receiving this because you modified the open/close state.Message
ID: @.***>
—
Reply to this email directly, view it on GitHub
<
https://github.com/scrymastic/edr-agent/issues/1#issuecomment-2254877579>,

or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AIZNXAEUTWOA7QSBRENU5F3ZOW2CJAVCNFSM6AAAAABK5AALRSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUHA3TONJXHE>

.
You are receiving this because you authored the thread.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub<
https://github.com/scrymastic/edr-agent/issues/1#issuecomment-2267075173>,
or unsubscribe<
https://github.com/notifications/unsubscribe-auth/AXTMRLDXDM25LV5VTTFFSS3ZPUGD5AVCNFSM6AAAAABK5AALRSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRXGA3TKMJXGM>.
You are receiving this because you modified the open/close state.Message
ID: @.***>
—
Reply to this email directly, view it on GitHub
https://github.com/scrymastic/edr-agent/issues/1#issuecomment-2268113723,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIZNXAH2PH5FFXOD5QMCHHDZP3YH7AVCNFSM6AAAAABK5AALRSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRYGEYTGNZSGM
.
You are receiving this because you authored the thread.Message ID:
@.***>

—
Reply to this email directly, view it on GitHubhttps://github.com/scrymastic/edr-agent/issues/1#issuecomment-2268484796, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AXTMRLAAUTWCVZM7FY4OJLLZP42GNAVCNFSM6AAAAABK5AALRSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRYGQ4DINZZGY.
You are receiving this because you modified the open/close state.Message ID: @.***>


(HTTP code 404) unexpected

(HTTP code 404) unexpected - manifest for elasticsearch:latest not found

...

Looks like the elasticsearch repository (https://hub.docker.com/_/elasticsearch/) does not have a :latest tag, so you will have to specify a specific tag to use; here's the steps to do so:

Click on the ... button to view the image's details

Click on the Selected tag: latest to open the "tag selection" window

Click the tag / version of the image you want to run

Click the (X) to close the tag selector window

Click on the Create button to pull the image and start the container
Closing this issue because this is not a bug, but feel free to continue the conversation


CLOUD-449 Add upgrade consistency test

Test name
Status

big-data
passed

scaling
passed

recreate
passed

init-deploy
passed

self-healing
passed

storage
passed

scaling-proxysql
passed

demand-backup
passed

limits
passed

monitoring
passed

self-healing-advanced
failed

upgrade
failed

monitoring-2-0
passed

affinity
passed

scheduled-backup
failed

Test name
Status

init-deploy
passed

storage
passed

scaling
passed

limits
passed

scaling-proxysql
passed

monitoring
passed

upgrade
failed

monitoring-2-0
passed

recreate
passed

affinity
passed

demand-backup
passed

self-healing
passed

scheduled-backup
failed

self-healing-advanced
failed

big-data
passed

Test name
Status

init-deploy
passed

scaling
passed

scaling-proxysql
passed

storage
passed

upgrade
failed

limits
passed

recreate
passed

monitoring
passed

demand-backup
passed

monitoring-2-0
passed

scheduled-backup
failed

affinity
passed

self-healing
passed

self-healing-advanced
failed

big-data
passed

Test name
Status

self-healing
passed

big-data
passed

self-healing-advanced
passed

scaling
passed

scaling-proxysql
passed

recreate
passed

upgrade
failed

demand-backup
passed

scheduled-backup
failed

init-deploy
passed

storage
passed

limits
passed

monitoring
passed

monitoring-2-0
passed

affinity
passed

operator-self-healing
passed

one-pod
passed

auto-tuning
failed

Test name
Status

big-data
passed

scaling
passed

init-deploy
passed

self-healing
failed

recreate
passed

scaling-proxysql
failed

storage
passed

limits
passed

demand-backup
passed

monitoring
passed

monitoring-2-0
passed

affinity
passed

scheduled-backup
failed

Test name
Status

recreate
passed

big-data
passed

demand-backup
passed

init-deploy
passed

self-healing
passed

scheduled-backup
failed

storage
passed

limits
passed

scaling
passed

monitoring
passed

scaling-proxysql
passed

monitoring-2-0
passed

affinity
passed

upgrade
passed

self-healing-advanced
failed

upgrade-consistency
failed

Test name
Status

self-healing
passed

recreate
passed

init-deploy
passed

scaling
passed

big-data
passed

scaling-proxysql
passed

self-healing-advanced
passed

storage
passed

demand-backup
passed

limits
passed

upgrade
failed

monitoring
passed

operator-self-healing
passed

monitoring-2-0
passed

one-pod
passed

affinity
passed

auto-tuning
failed

scheduled-backup
failed

Test name
Status

scaling
passed

scaling-proxysql
passed

upgrade
passed

init-deploy
passed

storage
passed

limits
passed

recreate
passed

monitoring
passed

demand-backup
passed

monitoring-2-0
passed

scheduled-backup
failed

affinity
passed

self-healing
passed

self-healing-advanced
passed

operator-self-healing
passed

big-data
passed

one-pod
passed

auto-tuning
failed

upgrade-consistency
passed

Test name
Status

big-data
passed

scaling
passed

init-deploy
passed

recreate
passed

self-healing
passed

scaling-proxysql
passed

storage
passed

demand-backup
passed

self-healing-advanced
passed

upgrade
passed

limits
passed

monitoring
passed

operator-self-healing
passed

upgrade-consistency
passed

monitoring-2-0
passed

one-pod
passed

scheduled-backup
failed

affinity
passed

auto-tuning
passed

Test name
Status

init-deploy
passed

big-data
passed

self-healing
passed

scaling
passed

recreate
passed

storage
failed

scaling-proxysql
passed

demand-backup
passed

upgrade
passed

self-healing-advanced
passed

operator-self-healing
passed

upgrade-consistency
passed

one-pod
passed

scheduled-backup
failed

auto-tuning
passed


PR: Remove line wrap from po files

Closing and reopening to see if Azure pipelines is triggered now.


Inventory Grid Plugin: Add color configuration

A friend wanted to change the color to something else, so allow changing the color of the grid and highlight.
(I think the original PR was going to have an option to change the color, but changing the alpha didn't exist at the time, so it was not put in. And someone will probably make a PR like this eventually.)
Closes #13705

Updated!


Spectral Bands & FWHM

Spectral bands (1.10) requires the central wavelength for all PFS. For AR it additionally requires the FWHM. Can this be aligned?

In order to promote interoperability between different datasets, we need more information than just the central wavelength of spectral bands.
Proposal to LSI-VC-15: Decide whether we adjust the SR, ST, and other PFS as needed to include at a minimum:
– FWHM at Threshold
– Full Spectral Response Function at Goal
Needs discussion and decision.

Sampling characteristics such as spatial, spectral, or temporal response functions are fundamental to describe and analyse any (geo-)spatio-temporal observation. Therefore they must be documented within the metadata of any acquired observation (sample, pixel). However, to include all detail with every observation result is obviously not feasible, and might also not be necessary where:

groups of observations share a characteristic (e.g. because they have been acquired by the same or very similar sensors, like spectral bands)
the function can be reduced through a model (e.g. gaussian)
a simplification is sufficient to deal appropriately with the observation result (e.g. same observation time for a whole scene)
the detailed description of the function is externalised and only a label or identifier is used

Providing the necessary metadata with large quantities of observations (sets or collections) is therefore a matter of grouping them efficiently (e.g. in grids or cubes where response functions can be attached to dimensions) and by creating human and machine readable repositories where they can be retrieved (like e.g. the projection parameters which are summarised and standardised in EPSG codes). A similar authoritative library for codes representing the full parameters for the most commonly used sensors would be something CEOS could work on.


stream running logs during enclave creation even if it fails

What's your CLI version?
0.84.3
Description & steps to reproduce
Tried running https://github.com/galenmarchetti/basic-service-package
The images weren't available for amd64 at the time; the cloud UI just kept spinning and didn't say what happened. Refreshing it led to an empty enclave with no services and just the first files artifact
Desired behavior
logs should be streamed even if enclave creation / run fails at any step
What is the severity of this bug?
Critical; I am blocked and Kurtosis is unusable for me because of this bug.
What area of the product does this pertain to?
Frontend: the Graphical User Interface, including the Enclave Manager

I thiiiink @tedim52 or @adschwartz is going to take this one

@mieubrisse Yes, I'm working this.

@h4ck3rk3y I tried running the package above but wasn't able to reproduce (as expected since you now have those images). Another idea for reproducing was to run Laurent's etcd package and give it a bad image but that also failed as expected without hanging. Do you have another idea for how I can reproduce this issue?

You can replace the images with galenmarchetti/service-a, galenmarchetti/service-a  and galenmarchetti/service-a  and see how that works!

@h4ck3rk3y @adschwartz are we good to close this?

@mieubrisse Yes we did get to the bottom of this. The underlying issue with this was that the downloading of the images took a long time, making the stream connection drop. We've since increased it. Of course that's not going to solve things perfectly but it makes it less likely that they will happen again.


Hide login and asr for recruitment

Thanks Pranav, a couple of suggestions:

In the env variable, instead of RECRUITMENT, can you please call it as LITE ?
In lite version of Chitralekha, we should also disable retrieving subtitles from YouTube. So you can altogether disable the select element itself in the transcription mode.

Sure, will do


Guard expected failures in CertificatePickerViewModelTests

Related #699
The test runner uses Xcode 15.4 / Swift 5.10 now.

Please re-review. I've applied a suggestion from @philium to keep the expected failures in place for those using Xcode 15.0.


Thin blue line around the content

There is a thin blue line around the entire container as seen in this picture

I think the blue dotted border might have something to do with this for some reason
<xml> 	<o:shapedefaults v:ext="edit" spidmax="1026" /> </xml>
I sent the email to myself on our test pc, running outlook 2016, and the border is not visible, however if you hover carefully round the outside of the 600px container, it changes to the same cursor you get when dragging images in word, powerpoint etc, and you can drag and make the div wider
I just don't know what value to change the v:ext to to stop it from letting you edit
The spidmax="1026" is the pixel dimension i managed to make the box when I dragged it

These might help a little with digging into shapedefaults
http://www.datypic.com/sc/ooxml/e-o_shapedefaults.html
and v:ext
http://www.datypic.com/sc/ooxml/a-v_ext-1.html

One solution i have found is to add this code to the top of the email

The blue line only appears to be added to the first mso-element so by adding an additional elements before our main one we can transfer the line to that.  We can then also make the line-height:0 so the element doesn't show at all.
This is not the perfect solution but it is potentially a passable one.  I'd still like to understand the line better.

Do you have a link to a working example of the above solution (specifically in Outlook 2007), as I cannot seem to replicate it?
Ironically, I can get it working by using an empty table at the start of the email.

@jakezneal sure just added it in here https://github.com/M-J-Robbins/get-off-the-table/blob/master/template.html#L28
I tested via EOA and it appears to be working fine in Outlook 2007.


Documentation fix and optimization

Fixed the documentation issue in the 'statFieldThresh' function. I also vectorized the 'imageListTomatrix' function to speed it up. Commit details include microbenchmark test to demonstrate roughly a 30% speed up by vectorizing instead of using for loop.

@Tokazama - travis checks are failing but it is not obvious to me why this is ... i will merge anyway (code looks good) and see if the problem goes away but may ask for your help if it does not.

Yeah, I couldn't figure out the problem either. I've been able to build it from source on my computer. The travis check made it seem like the error was coming from eanatDef


remove random events from toa

title

You're getting the event while you're banking

you dont get random events within TOA or at the bank/lobby as it is inside a pyramid. A lot of people skill at TOA bank for this reason

Bennys logic is supported by the osrs wiki in random events and the limited permitted banks which allow random events don't include toa

Done in next update


Added utf cleaning using ftfy!

Lookin' good, though it looks like some meta data got put into the nb. Make sure to run nbdev_prepare to get that stuff removed and to install the nbdev git hooks. Also, make sure to add ftfy to the list of requirements: https://github.com/taisazero/squeakily/blob/4e6643bce1c2910b51113c5d791d5bcb7a0d9e04/settings.ini#L28

Lgtm!!


Consistent transaction examination whether it is a draft TxInfo or completed Tx

Describe the feature you'd like
TxInfo represents planned transaction, when Tx represents a completed, signed transaction.
They have very similar data, but many access functions with different interface.
For example Tx has lookupDatum, when TxInfo has findDatum with a different interface.
Event mapping of DatumHash to Datum is performed in a different way.
It would be nice to either normalize treatment of these two, or provide a type class that abstracts these differences.
Describe alternatives you've considered
Current alternative is to lookup, examine twice the interface for the same activity on Tx and TxInfo.
Describe the approach you would take to implement this
Easiest way would be to attempt to add functions that correspond to the other function with the same interface,
and mark inconsistent interfaces as deprecated in the long run.

Tx and friends moved to plutus-apps, and indeed have been replaced with cardano-api transaction types. I'm not sure what the status of something like this is now, but it would need to be reassessed there.

Confirming that in plutus-apps, we completely removed Tx and friends, and we use instead the Tx type of cardano-api. Therefore, if you have any issues with the new Tx, you should open an issue in the cardano-node repo (which contains cardano-api).


LLM request logging

It would be nice to be able to log all chat history easily :)

This is good as well. Few thoughts

I will probably add tracing.
There was a related ticket about advanced remote tracing or something.
I will also likely offer a "hook API" or some MPSC mechanism, to allow registering for those events in some way. This way, the library user can subscribe to the events and implement their desired logic.

There might be some methods to add to chat-request to format the entire chat in a convenient way. This could be simple and add significant value.


Fix noodles UI performance issues

The noodles UI is very laggy on some computers eg. when panning. Fix by figuring out hw acceleration for current setup, or by making the noodles WebGL or SVG.

is this still relevant? @kschzt


feat: added integration service

Added intergations api service CRUD operations
Fixes #11

@akhill10 great job, I'll review it shortly, can you update the readme file


Organisation fo ST2

Hi Community,
I think this Idea is maybe very complex. I don't know if it's possible.
It would be nice if you could Create different Orgs in Stackstorm. Do you Know AWX and Ansible Automation Platform? There you can create an Org as a top Level Domain. So you can create Orgs for different Teams in a Company.
The Idea would be that I can log in to ST2 and then Switch Between Orgs with a Button.
So then I am in Org Customer1 I see all Packs, History, and all that was done in this Context and then I swish to Org Customer2 I can only see that Stuff.
This would make it easier to create the right RBAC rules.
What do you think about it?

Can't I currently do something like this with LDAP mapping to RBAC roles?

It's possible to add map roles to a ldap group. But there are some limitation with RBAC. (Please correct me if Iam wrong with it)

Key Value Store: I have set up a role for any System Namespace Scope. I can not create any Team Namespace.
To Use the UI I need setup Global Read for List View on Rules, Executions, Action, Packs to use the UI. Would be better to have a Kind of filter View that users only see the stuff belong to there Teams.

At the moment I'am working on a POC to build a MultiTeam Shared Stackstorm Instance. In The past we had many but that generate a lot of cost in the cloud.

What I would perhaps also like to see, if you're going to implement team segmentation like this, is to be able to segment the workspace of the users. My current setup has ST2 instance running on a server with manually added team-specific folders into st2.conf packs_base_paths. Since ST2 allows for creation of workflows in the UI, but does not allow for creation of python actions, I've also put JupyterHub (that spawns user-specific jupyter notebook server via docker) onto the same host. This way I can have team specific folders mounted into Jupyter and people can create or modify py scripts without having access to the server.


/background_jobs gives 404

If I do rake routes, I get this entry:
/background_jobs          #<Resque::Server app_file=".../gems/resque-1.27.4/lib/resque/server.rb">
It doesn't work locally or on EC2

The way routes are set up by the install generator (see also the routes file in your app), you need to be signed with th admin flag set. Are you?

Yes.

Yeah, appears to be an issue with the order in which the install generator inserts those routes. Pageflow.routes (which comes first in the default setup) registers a catch all route of the form /<entry-slug>. So you will either have to move the Resque::Server block before Pageflow.routes or access the Resque web interface via /background_jobs/overview which is not matched by the catch all route.

Move the route, thanks.


Not working at all

It's not working with the startup project
Windows 10 updated
VS 2017 Entreprise 15.8.9
Xamarin : <IP_ADDRESS>9
Xamarin.Forms :

<IP_ADDRESS>7044 pre2
<IP_ADDRESS>7583
<IP_ADDRESS>2540

I'd try on real device  galaxy S8+ (oreo 8.0) and chuwi (lollipop)
I'd updated OnCreate Method
The compilation is good,
I'm on debug mode
The deployment is good
The launch is ok
Modifying XAML or XAML.CS (saved of course) - Nothing append on the UI
Thanks

Hi @BenoistLUGNIER, we are working on the Visual Studio for Windows extension and will include support soon. At the moment, there is an addin for Visual Studio for macOS.

As documented [here] (https://github.com/ylatuya/XAMLator#windows) we are working on a the Visual Studio add-on for Windows.
I will close this as a duplicated of https://github.com/ylatuya/XAMLator/issues/16


coverage

I'm using timeout_decorator.timeout to decorate my unit tests to ensure bugs in threaded code doesn't block the tests forever but fail the tests gracefully. But it seems to cause coverage testing during unit tests to ignore the decorated tests.

Maybe thats the reason why :
By default, timeout-decorator uses signals to limit the execution time of the given function. This appoach does not work if your function is executed not in a main thread.
There is alternative timeout strategy for this case - by using multiprocessing. You can force not to use signals on Linux by passing the parameter use_signals=False to the timeout decorator function (mostly for testing)
If You use my fork, this is done automatically, so in case the decorator does not run in the main thread, signals are disabled automatically.
see: https://github.com/bitranox/wrapt-timeout-decorator
yours sincerely
Robert


fix data provider for sql integration

expect this /:)

I don't even know any more, what i meant with this issue.

maybe read data from sql

yeah, maybe. than this should be a well written repository interface, where your can plug in different data providers like sqlite, postgres etc.


[MP ]Add CSS based clicking to tertiary screenshot

We made the secondary screenshot primary in States tab. It seems like the custom logic for the secondary screenshot wasn't doing anything, so I did not move it to the new location.
We added a tertiary screenshot. I added a CSS based click logic for it.

Hi @julia326 I don't see the tertiary screenshot at all. Are you seeing any errors in the log?


[SMALLFIX] Fix an integration test with -Phadoop-1

@aaudiber @peisun1115

LGTM

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/12036/
Test FAILed.

Jenkins, test this please

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/12035/
Test PASSed.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/12037/
Test PASSed.


Key wave (rainbow) does not behave like a key wave

Expected Behaviour
Key wave (rainbow) should send out a wave from key presses with a rainbow effect starting one colour and ending on the last, standard key wave (rainbow effect) note: all other key waves work correctly.
Actual Behaviour
A rainbow effect is produced heading in a south-east direction before reversing and sending a bigger wave in the north-west direction

Reproduction steps
fresh install and updates do not fix this issue seems like an isolated case, issue was discovered after a reinstall of windows was preformed after windows failed to load repeatedly after restarted
Frequency
Every time a key is pressed
Aurora Version:
v129
Previously an Issue?
All versions after a windows reinstall

i recently updated to this new version of aurora. i've been using the old one from the other repo for quite some time now and the first thing i noticed is how broken the rainbow key wave effect is compared to the old version. the old effect was fine, why did you replace it? how do i get full functionality back? do i have to downgrade to the old version from the old repo again?

Sorry I've ignored this issue for a while but I will fix this first next time I work on Aurora again
I really don't suggest going back to the old version as it's background CPU usage is really bad

I've made a fix for this on latest pre-release


FEAT(sp/portal gun, coop/fling crushers): Add Portal Passthrough and Button Activation Triggers

The Portal Gun trigger lets runners separate office movement from how fast the shot up the stairs was hit, which I find to be useful. The Fling Crushers trigger is also useful, because it adds the time the button is touched for the first time. This lets runners see if their movement was bad, or if the second button touch was lacking.

Merged, too lazy to fix this working tree to mark as merged.


[List vNext] Adding leading/trailing label accessory views

Platforms Impacted

[x] iOS
[ ] macOS

Description of changes
Adding optional Leading and Trailing View properties to labels in List Cell. There are slight size adjustments to the sizes in comparison to the current FluentUI TableViewCell - the title accessory views are slightly larger in vNext.
Verification
Validated pod spec + performed icon comparisons:

Before
After

Pull request checklist
This PR has considered:

[ ] Light and Dark appearances
[ ] VoiceOver and Keyboard Accessibility
[ ] Internationalization and Right to Left layouts
[ ] Different resolutions (1x, 2x, 3x)
[ ] Size classes and window sizes (iPhone vs iPad, notched devices, multitasking, different window sizes, etc)

Microsoft Reviewers: Open in CodeFlow

Could you add some comments on the description of the changes?
Also, I'm not sure if those are intended to be used at the same time in a cell, but the alignment on the leading ones is looking a bit awkward. (icons to close to each other and the text of the subtitle is not aligned to the title.

This may be because of the line height + icon size change in vNext. The line height has been confirmed before but I'll send this screenshot to Victor make sure things are triple-ok


Complete closure is called 4 times per image

I use the following code in an `init()`` constructor:
    if let url: NSURL = NSURL(string: previewCard.getImageUrls().getWithInt(0) as! String) {
      self.imageView?.setImageWithURL(url, placeholderImage: MGImage.imageWithColor(UIColor.clearColor()), options: SDWebImageOptions.RefreshCached, completed: { (image:UIImage!, error:NSError!, type:SDImageCacheType, loadUrl:NSURL!) -> Void in

        println("-------------- done")
        }, usingActivityIndicatorStyle: UIActivityIndicatorViewStyle.Gray)

    }

The console output is:
 println("-------------- done")
 println("-------------- done")
 println("-------------- done")
 println("-------------- done")

Why is the complete closure called four times? Is this a bug?

I cannot verify this; but I have also found performance issues with this component in the past.

@fatuhoku Do you have any workaround?

No; I solved my performance issue by not using an indicator at all!

Which performance issues are you talking about. How many images did you use when you had issues?

@confile I used NZCircularImageView inside of UICollectionViewCells. It loads this component. It made scrolling really really slow!


Add support for a test name format

Summary
Introduce a new CLI argument allowing to change the way tests are displayed on console.
Background and Motivation
As of today, when doing --list-tests or when using the --output detailed the tests are displayed using their display name which is matching behavior of VSTest.
There are many cases where this is not ideal and it would be great to be able to change that. For example, if you want to discover the tests in a given assembly or through a given filer, you will see only display names when it would be useful to see the fully qualified name. When having multiple tests with a same display name, having the fully qualified name would also be useful.
Related issues or discussions: #4111 #3221
Proposed Feature
Add a new CLI option named --test-format (I am open to different naming suggestions) allowing the users to specify a format in which they want the test to be displayed. This argument would be in an open format with some predefined variable replacements (similar to git log pretty format).
To get started, I think it would be enough to support display name, fully qualified name and test ID as they are common to most test frameworks. I would like to suggest using long form names instead of few char symbols (unlike git log pretty) to have something self explanatory.
We will have to define the good pattern for variable replacement, possibilities from existing tools are:

$<variable-name> like unix
%<variable-name> like git log
%<variable-name>% like cmd
$<variable-name>$ like some templating systems
${<variable-name>} like unix/PS (although that's not the only syntax)

Example:
For the example below, I'll use the git log like syntax
// default
--test-format %displayname

--test-format "test: %displayname (%fullyqualifiedname)"

Alternative Designs
We could remove the flexible part and only allow some enum based presets: DisplayName (default), FQN, ID. This is probably simpler but could remove a big chunk of flexibility to user (is this so bad?).
One note is that my ideal solution would allow me to have something like <display name> (<fqn>) but we could do some preset for that.

It would be nice to have more use cases for this.
To me it seems much easier and more flexible to change the default to  (). The new dotnet test experience does this, with counts per assembly+tfm, and then on the end shows the total count.
And for more flexibility add option  to render the the info in JSON with all the info we have about the test, and let the consumer process it.
It also seems more future proof, as long as we get the basic json format correctly.
This could also then be similar for run, where acceptance tests often parse out console output, and break every time we change that.
(we took similar path in Pester where we return an object that describes the test run, for the reason that we have no idea how people will want to process the result)


Add builds for linux-aarch64 and linux-ppc64le and fix wrong use of march=native

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)
[x] 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

@conda-forge-admin, please rerender


implicit_this_reference_in_initializer false positive ?

I have the following case:
class Whatever  {
  final _analytics = KiWiAnalytics();
  final _observer = Lazy<FirebaseAnalyticsObserver>(() {
    return _analytics.observer;
  });
}

And I'm getting this error: error: Only static members can be accessed in initializers. (implicit_this_reference_in_initializer)
For me it should be an error as I'm not in an initializer anymore, but under a callback.
Env:
Dart VM version: 2.1.1-dev.0.1.flutter-ec86471ccc (Thu Jan 3 22:43:43 2019 +0000) on "macos_x64"

This is working as intended.  The right hand side of an initializer cannot refer implicitly to this.  E.g., in your example, there is no guarantee that the callback is not executed before _analytics is initialized.
Something like this (moving the initialization to a constructor with order explicit) should work:
class Whatever  {
  final _analytics;
  final _observer;

  Whatever() : this._(KiWiAnalytics());
  Whatever._(this._analytics) : _observer = _analytics.observer;
}


not falling back when native implementation is available.

zero clipboard does not fall back when the native implementation is available for it to do so. chrome canary's new version has deprecated flash completely and shows a sad puzzle piece.

unable to replicate currently

Related to #171


1106-staff-deactivation-refactor

🔗 Issue

https://github.com/rubyforgood/homeward-tails/issues/1106
✍ Description

Refactor staff deactivation
📷 Screenshots/Demos

@wandergithub Awesome job!
The only thing I noticed on my end is that the flash is no longer working. Are you seeing the same thing?
This is on the main branch:

Now that you point that out 🤔
I will take a look.

Something is happening with the template, I think related to turbo stream and how the flash message is being handled but I don't fully understand how it works jet...

Something is happening with the template, I think related to turbo stream and how the flash message is being handled but I don't fully understand how it works jet...

The update action in ActivationsController is implicitly looking for update.turbo_stream.erb in views/organizations/activations. You can explicitly render a file that is in a differently path but we probably should stick with convention unless there is a specific reason you can think of not to.

Yeah what @jmilljr24 said. Check out app/views/organizations/staff/staff/update_activation.turbo_stream.erb. You need this for your new controller and action, so just move that turbo stream view file to the correct view directory for that new controller and rename it to update.turbo_stream.erb. You will note that this file does two things. It replaces the toggle because it should change after changing the activation, and it renders the flash.

Yeah what @jmilljr24 said. Check out app/views/organizations/staff/staff/update_activation.turbo_stream.erb. You need this for your new controller and action, so just move that turbo stream view file to the correct view directory for that new controller and rename it to update.turbo_stream.erb. You will note that this file does two things. It replaces the toggle because it should change after changing the activation, and it renders the flash.

@kasugaijin I don't believe we need the turbo replace of the toggle any longer. I think that was used when the page was rendering two layouts that were user selected(table vs cards). If the user clicked the toggle in the table, the card wouldn't reflect the change until a page fresh.

@jmilljr24 Ah yes we got rid of those cards...good point. We can remove the toggle bit in the turbostream response, then @wandergithub !

It works now!

Thanks guys. Now I understand better how turbo_streams and the real-time update work.

@wandergithub just pining to see if you can finish those last few tests? If you're too busy, let me know and I can take care of it.


Updates behat.yml parameters in selenium.md for javascript scenarios.

I needed to add these parameters to behat.yml to use the chromedriver for behat scenarios tagged with @javascript.

@bt-eric - Thanks for the PR! I am wondering, does this make the tests work out of the box with Headless Chrome? Also cc/ @grasmash in case he's interested.

The switches: ['no-sandbox'] option still needs xvfb and, AFAIK, is not using Chrome's headless feature. Without the no-sandbox argument my @javasript tests would hang and eventually time out. I got the idea to try the no-sandbox option from here. I know that the option prevents Chrome from sandboxing processes that are normally sandboxed, but I'm not sure why it is actually needed here for the tests to work.
I find that if I use switches: ['headless', 'disable-gpu', 'window-size=1920,1080'] I don't need xvfb (or no-sandbox). However, Selenium2Driver's implementation of resizeWindow doesn't seem to work with headless Chrome.

I'm closing PRs which have conflicts or are failing builds and are older than 6 months old, to tidy up the Drupal VM PR queue; please create a new PR against the latest master branch if you feel this is still an important fix or feature for Drupal VM. Thank you!


Valid config options are flagged as "unrecognized"

Examples:
validation.lenientMode
mail.smtp.host
mail.smtp.port
weblog.enabled
weblog.url
There could be broader categories of config options which are documented for the base language or provided by a plugin, but these are the ones I use in my projects that are being flagged.

Thanks for flagging. The mail config options I simply forgot to include, the other options are coming from plugins which aren't recognized by the language server yet. All plugins will need to be updated to explicitly define the config options that they expose, and there are a few moving parts involved in that