[Chef] Implement Z2 flashing through flash.sh script

Previously AmebaZ2 platform does not support automatic image flashing for chef app
This platform implements the flashing of image for AmebaZ2 platform through a script for chef app

@pankore is this a cherrypick? If so could you reference the original PR in the description (to make the Require issues for PRs happy)?
If not a cherrypick, please fix this in master first and then do a cherrypick.


A simple CONTRIBUTING.md would be helpful

A CONTRIBUTING.md to make people contribute in a standard way. You know running cargo +nightly fmt --all --check and cargo +nightly clippy --workspace --all-targets --all-features for example, plus any other thing that @mario-eth finds he is normally telling people in the PRs

This is a great idea, i've had this in the back of my mind for some time

Fixed in #220


[WFCORE-6644] Upgrade log4j2 from 2.19.0 to 2.22.0

Jira issue: https://issues.redhat.com/browse/WFCORE-6644
@yersan Feel free to use this PR or change #5799 if you'd rather have it all in one commit.

Thanks @jamezp


babel runtime output when building

'default' is imported from external module '@babel/runtime/helpers/initializerWarningHelper' but never used

Try moving commonjs rollup plugin after the Babel plugin

issue with a dependency used in a specific project consuming ts-engine I think, I can't track down the cause


a progress bar for currently running formulas

Formulas can take a little while to run. I have no idea how easy this would be, but it would be nice to provide the user some feedback on how the progress is going.

Looked a bit more into this and the html5 tag "progress" should be perfect. The trick will be figuring out how to get the webpage to update periodically to update the bar.
More info

I think in order to get this to work properly, I need to spawn a separate process that will actually run the playlist creation, and then have it communicate with the main process regarding its status. I think this can be achieved by having the webpage periodically refresh itself.

Ended up doing it in a separate thread to make debugging easier. The threads communicate via a queue. Right now the progress is pretty simple, and the refreshing on the webpage is kinda janky, but it works for a first iteration.


long data type not supported by swagger

According to the swagger spec (http://swagger.io/specification/), if you have a "long" data type, the format should be specified as "int64" in the swagger definition. (currently NSwag outputs "long" as the format)
Example:
"BatchNumber": {
"type": "integer",
"format": "long"
}
Should be:
"BatchNumber": {
"type": "integer",
"format": "int64"
}
Not sure that it matters, but as a side note: I'm not using the full NSwag toolchain. I am using NSwag to read my existing WebApi and output the Swagger json definition file.

If this is in the spec, then we should change it...

Fixed in https://github.com/NJsonSchema/NJsonSchema/commit/611af0968c3bee9fe8418ff68f830f0b5bdcbef0


Source file opens in both group panes and Explorer UI is not the active tab

Open the attached log
Select the first result (and do the rebase if necessary)
Click a codeflow step
Select the second result

The source file for the second result opens in both group panes and the Explorer UI is not the active tab in the right pane.
FortifyDemo.fpr.v2 .sarif.txt
ContentFileHandlingController.cs.txt

The source file opens on both sides after a number of other usage sequences, but usually the Explorer UI ends up as the active tab. There is an ugly transition though, where I see the source file for a split second before it switches to the tool window.

unfortunately I don't think this is something I can control, as the problems panel controls opening the source file when you click on a result in it. And so it's deciding to open the file on the right panel (because it last had focus) even though the file is already open on the left panel.


Is there a component that adds row navigation to datatable

Is there a component that adds row navigation to datatable
i.e. using up/down arrow keys I want to be able to change the selection of a row

You can use actionicon?

Can you elaborate - show an example

@nat2k5us
I'm going to close this issue for now because it's stale and I'm not sure I understand the  question you are asking.  Feel free to re-open with more details an a minimal reproducible example.

yes - please close it


asset-manager-76

Fixes #76. Provides WARNING semantics in test results. See AdminToolOperation.md for details.

Main branching


Regression | Hidden input not created when dispatching "verified" event

I have implemented a "auto-submit" feature on my site using the "verified" event of the widget but the server is not receiving any input.
On the past I opened a issue (#10) because the hidden input was not created when triggering the "verified" event. This issue has again been introduced.
If I submit the form on the next tick, inside a setTimeout with delay 0, the input is received on the server.

How to reproduce the issue, create a form and add the following altcha widget.
<altcha-widget
    challengeurl="<challengeUrl>"
    name="altcha"
    data-submit-verified
></altcha-widget>

Create a script (I'm using typescript) to initialize altcha.
import "altcha";

document.addEventListener("DOMContentLoaded", (): void => {
	const widgets = document.querySelectorAll<HTMLElement>("altcha-widget");

	for (let i = 0; i < widgets.length; i++) {
		const widget = widgets[i] as any;

		if (widget.hasAttribute("data-submit-verified")) {
			widget.addEventListener("verified", onWidgetVerified.bind(widget));
		}
	}
});

function onWidgetVerified(this: HTMLElement): void {
	const form = this.closest("form");

	if (!form) {
		return;
	}

    // submit at this point does not work
    form.submit();

    // submit inside setTimeout works
	/*setTimeout((): void => {
		form.submit();
	}, 0);*/
}

Open the html and complete the challenge, the page will reload but no "altcha" input will be sent on the request

Hi, thanks for reporting, this has been there for a while. Fixed in version 1.0.6 and E2E test added to cover this.


Avalanche warp navigator

Dependencies

https://github.com/ava-labs/avalanche-rs/pull/34

Changes
Avalanche Warp Navigator:

Add autogenerated WarpMessenger contract bindings (from ABI)
Add structs to decode Avalanche Warp messages. A WarpMessage is composed of:

A WarpUnsignedMessage: see UnsignedMessage
A VerifiedWarpMessage: pre-verified Warp message as it will be parsed on the destination chain
A status: Sent or Signed(u16) with the number of signatures
A list of WarpMessageNodeSignature

The payload of a WarpUnsignedMessage put further be decoded to an AddressedPayload (see AddressedPayload), which is specific to sending Warp messages between Subnet-EVM chains
Add avalanche warp navigate command in the CLI

Additional comments

Only Subnet-EVM chains are supported atm since each VM type will have its mechanism to retrieve messages (event logs of the WarpMessenger precompile in this case)
Warp message decoding rarely fails and is done in a "best effort" way, further decoding parts of the message if possible
I did not implement all tests for this feature since it's pretty complicated to spin up a Warp-enabled chain with ANR at the moment
The mechanism for retrieving node signatures of messages is not optimal but I couldn't do better for the moment. See https://github.com/ava-labs/subnet-evm/issues/806
We could probably move some structs to avalanche-types-rs after a discussion with Ava Labs

Rebased on main


Facing Privilege Issues Even Though When Set The Parameter To True

My deployments are failing with permissions denied issues even though when set Privilege to TRUE via Marathon API /v2/apps. I am trying to access the file which is inside the container.
When I tried this through CLI on one of the worker nodes without any privileges set, I was able to access. But I am seeing issues only while doing it from the Marathon API
Marathon Version : Version 0.13.0
Mesos Version : 0.25.0.

Hi @varkolli
could you please paste the JSON application definition for the the app that's causing the issue? Thanks.

Hello There,
Very Good Morning,
Thanks for your reply. Please see the payload below ..
{
"id": "/registration151",
"cmd": "/Jars/common-service.jar",
"instances": 1,
"cpus": 0.5,
"mem": 4096,
"disk": 0,
"executor": "",
"constraints": [],
"uris": [],
"storeUrls": [],
"ports": [
5000
],
"requirePorts": false,
"backoffSeconds": 1,
"backoffFactor": 1.15,
"maxLaunchDelaySeconds": 3600,
"container": {
"type": "DOCKER",
"volumes": [
{
"containerPath": "/docker_storage",
"hostPath": "/hdd/tools/docker/registry",
"mode": "RW"
}
],
"docker": {
"image": "xyz.com/xyz/common-service:latest",
"network": "BRIDGE",
"portMappings": [
{
"containerPort": 1111,
"hostPort": 0,
"servicePort": 0,
"protocol": "tcp"
}
],
"privileged": true,
"parameters": [],
"forcePullImage": false
}
},
"healthChecks": [],
"dependencies": [],
"upgradeStrategy": {
"minimumHealthCapacity": 1,
"maximumOverCapacity": 1
},
"version": "2015-08-19T21:26:47.616Z"
}
Thanks
Varun
408 525 5943
" You can't just ask the customers what they want and then try to give that to them. By the time you get it built, they'll want something new" - Steve Jobs.
From: Pierluigi Cau <notifications<EMAIL_ADDRESS>Reply-To: mesosphere/marathon <reply<EMAIL_ADDRESS>Date: Monday, April 18, 2016 at 3:16 AM
To: mesosphere/marathon <marathon<EMAIL_ADDRESS>Cc: Varun <varkolli<EMAIL_ADDRESS>Subject: Re: [mesosphere/marathon] Facing Privilege Issues Even Though When Set The Parameter To True (#3766)
Hi @varkollihttps://github.com/varkolli
could you please paste the JSON application definition for the the app that's causing the issue? Thanks.

You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHubhttps://github.com/mesosphere/marathon/issues/3766#issuecomment-211313169

Note: This issue has been migrated to https://jira.mesosphere.com/browse/MARATHON-2582. For more information see https://groups.google.com/forum/#!topic/marathon-framework/khtvf-ifnp8.


Fix logging override in dataflags

Pull Request Checklist:

[ ] This PR addresses an already opened issue (for bug fixes / features)

This PR fixes #xyz

[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Documentation has been added / updated (for bug fixes / features)
[x] HISTORY.rst has been updated (with summary of main changes)

[x] Link to issue (:issue:number) and pull request (:pull:number) has been added.

[x] bumpversion patch has been called on this branch
[x] The relevant author information has been added to .zenodo.json

What kind of change does this PR introduce?

Removes a logging.basicConfig call in xclim that was polluting script logging. Changes it to a call of raise_warn_or_log and use logger = logging.getLogger('xclim') there.

With this change I am able to use basicConfig in a normal script that imports xclim.
Does this PR introduce a breaking change?
No.
Other information:
Tant qu'à y être, I changed all logging calls of xclim to use the "xclim" logger".

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

11 of 12 (91.67%)  changed or added relevant lines in 5 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.004%) to 90.347%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

xclim/ensembles/_reduce.py
2
3
66.67%

Totals

Change from base Build<PHONE_NUMBER>:
0.004%

Covered Lines:
12598

Relevant Lines:
13944

💛  - Coveralls


Warning: componentWillMount is deprecated

I've just upgraded my app to react-native 0.60 and added the eslint from @react-native-community and now I'm getting this warning.
I think we just have to change componentWillMount to componentDidMount in SwipeRow.js What do you think?

Btw, thanks for this great component :)

@pa-bouly thanks for reporting! I moved it to the constructor instead. It'll be fixed in the next release


align git source secret type with k8s/buildv1 types

@sbose78 - at first blush I would suggest changing https://github.com/redhat-developer/build/blob/master/pkg/apis/build/v1alpha1/gitsource.go#L33-L36
// SecretRef holds information about the secret that contains credentials to access the git repo
type SecretRef struct {
	// Name is the name of the secret that contains credentials to access the git repo
	Name string `json:"name"`
}

to be more in line with https://github.com/openshift/api/blob/master/build/v1/types.go#L1253
	// secretSource is a reference to the secret
	SecretSource corev1.LocalObjectReference `json:"secretSource" protobuf:"bytes,1,opt,name=secretSource"`

Was that considered and ruled out for some reason?
@bparees @adambkaplan fyi

Not sure what aspect you're suggesting changing, @gabemontero
if you mean the type, yeah, an ObjectRef would make sense.
if you mean the name....  "SecretSource" was a poor name choice that we've regretted ever since.  (trying to explain "secrets you are using as source input content" vs "secrets you are using to access the source from git" is always painful), so i'd hate for us to carry that name forward.

On Mon, Feb 17, 2020 at 5:29 PM Ben Parees<EMAIL_ADDRESS>wrote:

Not sure what aspect you're suggesting changing, @gabemontero
https://github.com/gabemontero
if you mean the type, yeah, an ObjectRef would make sense.

Sorry yes I meant the type @bparees
if you mean the name.... "SecretSource" was a poor name choice that we've

regretted ever since. (trying to explain "secrets you are using as source
input content" vs "secrets you are using to access the source from git" is
always painful), so i'd hate for us to carry that name forward.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/redhat-developer/build/issues/22?email_source=notifications&email_token=AA3NU5ECOS74WRV2BERO2ZLRDMFUFA5CNFSM4KWZMP2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL72DYA#issuecomment-587178464,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AA3NU5DMLFOIZPCFJVDJQJLRDMFUFANCNFSM4KWZMP2A
.

+1 on making it LocalObjectRef, Gabe.
Thanks for pointing out.
The API does need a lot of love, and I'm going to be investing in having it aligned with basic best practices.
Feel free to point out any absurdities.

Please feel free to provide more API feedback, this repo is like a google doc proposal, with working code. Happy to make rapid changes to get to an initial good-looking state of the API.
Updated the API to look like this:
---
apiVersion: build.dev/v1alpha1
kind: Build
metadata:
  name: example-build-buildpack
spec:
  # Git Source definition
  source:
    url: https://github.com/sclorg/nodejs-ex
    credentials:
      name: github-auth-sbose78

  # Strategy defined in the buildpacks-v3 CR
  # in the 'openshift' namespace. Namespace is optional.
  strategy:
    name: "buildpacks-v3"
    namespace: "openshift"

  # Build to be run in this image.
  builderImage: "cloudfoundry/cnb:bionic"

  # Generated image.
  output:
    image: "image-registry.openshift-image-registry.svc:5000/sbose/nodejs-ex"
    credentials:
      name: github-auth-sbose78

I would not assume "source" will always mean "git source", so tying those fields together(along with the embedded url+ credentials fields) in that way seems to limit future evolution.
I would expect something more like:
source
  sourceType1
    fieldsForSourceType1
  sourceType2
    fieldsForSourceType2

etc.

which

allows you to add new source types (input types?) in the future
allows each to have its own unique urls/credentials/etc
allows you to have multiple sources/inputs

👍  Agreed, that's how I was thinking of bringing in API support for things like "I want to build an image out of this jar"

This issue original concern have been already addressed. I´m closing this for now. Feel free to re-open if needed.

This issue original concern have been already addressed. I´m closing this for now. Feel free to re-open if needed.


update types : EnumDepositStatus

I added some new entries to EnumDepositStatus in /types/spot.d.ts as the doc says at this link
The following entries were missing :

WrongDeposit = 7
WaitingUserConfirm = 8
Rejected = 2

Done! Thank you for your work 😃


Ctrlp

Sorry, I don't know how to split these commits from those in my other PR.
ctrlp is the new hotness. Basically Command-T in pure vimscript so there is no annoying compilation step.
ctrlp repo: https://github.com/kien/ctrlp.vim
ctrlp on the changelog: http://thechangelog.com/post/15573551543/ctrlp-fuzzy-file-buffer-mru-and-tag-finder-for-vim
I've been using for the past few days. works very well.

hey kyle. I've tried CtrlP about a month back and found that it's matching algorithm was annoyingly wrong more often than CommandT was wrong. I'm going to give it another shot but until I see it accurately matching on Rails projects, I am not going to make that change here probably.

I think the best way to separate pull requests is to do the work in separate branches. So if the automated install branch doesn't have ctrl-p it should be ok

re: 1 - I think it's better now, I haven't had any issues over the past couple days.
re: 2 - I think I know where I went wrong. I created two branches, but I created the ctrlp branch off the automate one.

I know what was sucking about CtrlP - type in 'appctrl' or 'applctrl' , stuff that would normally get you ApplicationController in command t or practically any other file finder. ctrl p is not even close. maybe there's a config option to change the way it matches. i'm gonna look into it

ah it's 'file' vs 'path' mode. it should probably be in file by default

I'll add CtrlP to the repo, but I won't rebind the ,t for now. you can still use Ctrl-p to access it. let's do that until we sweeten the config, then we can fully switch over

Nice find, that certainly works better. If we can get this merged in it will make the automated install easier since we won't have to build Command-T. Sorry you have to cherry pick the commits.
Also, we need to expand the wildignore. From ctrlp docs:
set wildignore+=*/.git/*,*/.hg/*,*/.svn/*   " for Linux/MacOSX
set wildignore+=.git\*,.hg\*,.svn\*         " for Windows

Goes here: https://github.com/skwp/dotfiles/blob/master/vimrc#L82

awesome!


Http Codec not handling 7BIT/8BIT but only BINARY TransferEncodingMechanism?

@normanmaurer @trustin @Scottmitch
While working on issue related to knowing the current decoded size of the current FileUpload and trying to figure out how to mitigate the issue in 7BIT/8BIT/BINARY announced size in Content-Length, I may be wrong, but while looking at the decoder/encoder, it looks like only Binary TransferEncodingMechanism is taken into account since no codec is in place to translate from/to BIT7 or BIT8... Am I right ?
Currently not an issue, since the encoder create Binary form. But for external client (not using Netty), that could be an issue, right ?
I do not have yet look around in Netty if there is alrady something for that...

I correct my analysis:

7bit, 8bit and Binary means no encoding has been performed but a clue on the type of data transfered (meaning almost exact size):

RFC2046 chapter 5 (in reference by RFC 2045 chapter 4.3)
As stated in the definition of the Content-Transfer-Encoding field [RFC 2045], no encoding other than "7bit", "8bit", or "binary" is permitted for entities of type "multipart".

And in RFC2045 (chapter 6.2)
The Content-Transfer-Encoding values "7bit", "8bit", and "binary" all mean that the identity (i.e. NO) encoding transformation has been performed.  As such, they serve simply as indicators of the domain of the body data, and provide useful information about the sort of encoding that might be needed for transmission in a given transport system.

BASE64 is therefore forbidden (surprinsgly for me).

Therefore no encoding/decoding is needed and the given size in Content-Length is the actual final size so no issue.
So I'm closing this issue. Of course, if you think I'm wrong, feel free to reopen it.
;-)


Use paramref in tokens related classes

The paramref is oficially recommented XML tag for documentation comments https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/xmldoc/recommended-tags#paramref

@lechu445 thanks for this.
We are going to be making some larger changes in JsonWebToken, JwtSecurityToken, JsonWebTokenHandler and JsonWebTokenHandler.
You may want to wait until those are in before working on these wonderful changes.
I will be about a week or so.


Object curlies: File/project–wide or standard?

So, we got #21 and that's great.
It got us instance–wide consistency.
Now, what about file–wide consistency, as was mentioned here?
And, now that I'm thinking about it, why not project–wide consistency?
And thinking further, why not choose a style as standard?
Either no spaces ({a, b}) or a single space ({ a, b }).

Personally, I've been struggling with the choice between {foo, bar} and { foo, bar } for a while. I think the former makes more sense because I also write [foo, bar], but it feels like I'm seeing the latter more often. Ultimately, I'm fine with either, but I'm basically expecting Standard to decide for me. Just my two cents.

Agreed. I've seen a lot of inconsistency in a multi-person Standard project with different bikeshed preferences  ensuring both styles {a} and { a } are being utilised in different files. When team {a} players land on { a } files (and vice versa), I'm seeing commits that do nothing other than change the spacing. 😜
We've rolled a custom rule to prevent this. But like, so non-Standard.
Also don't care which style prevails, but picking one seems squarely in Standard's decision space.

I thought I was alone on struggling to pick a side on this, but it seems the lack of clear choice is quite common.
Is the hard part what @timdp pointed out?
The fact that choosing a rule for object culries might force a rule for arrays? or can both live in harmony being different from one another?
const array = [one, two];
const object = { one, two };

const array = [one, two];
const object = {one, two};

const array = [ one, two ];
const object = { one, two };

@feross,  its time to pick something for the next version IMHO.

Apparently the --fix option works: http://eslint.org/docs/rules/object-curly-spacing
Surely the fact that compliance can be automated like this makes this a less controversial change? Why would you bring 1 or 2 files into compliance rather than the whole project, when doing the whole project is this simple?

@dcousens I'm fine with going with your latter example, since that's more consistent. I usually add spaces around my objects, but consistency is more important. If --fix can handle it, then it's probably fine to just ship this.

Looks like I'm going to be fixing a lot of scripts soon, but all the better! :+1:

@feross my only aversion to the latter is
let map = {a:1}

instead of
let map = { a: 1 }

I think the spacing in my mind maps to a kind of "spatial mapping",  whereas the closely ordered array [1, 2, 3, 4, 5] is because the index is implied,  and not specified.
The latter option would also mean:
let x = {y}

This "consistency" might actually lead to mistakes since it looks closer to an array.
Maybe.
I leave it to you @feross :+1:

You raise a good point. This is definitely very subjective. 😅
Btw, it would be:
let map = {a: 1}

Not:
let map = {a:1}

I wonder if either is "easier" to search for?
I have fallen in love with function myfunc () for that reason alone.

{ a: 1 } is more readable, {a: 1} is more consistent (with other single line enclosure syntax e.g.: [x, ..], (x, ..)). This is pure convention, so either choice is "valid". But if consistency is the yardstick, the tight wrap has an edge.

Agreed with @cayuu.
But I'd add a point from my post above.
If safety from errors/mistake is the yardstick.  I think { a: 1 } has the edge.

This line:
import {belongsTo/*, hasMany*/} from 'ember-data/relationships'

triggers this error:

Expected consistent spacing (standard/object-curly-even-spacing)

I believe it should be considered valid: it contains no stray whitespace; a comment is not whitespace.

Should I file a separate issue? Into which repo?

@lolmaus I would file it against this repo.

@mightyiam The offending rule is standard/object-curly-even-spacing. I believe object-curly-spacing does not have that effect.

Woops

@lolmaus Yes, this is a separate issue. Please file it here: https://github.com/xjamundx/eslint-plugin-standard

@feross Yessir! xjamundx/eslint-plugin-standard/issues/13

@dcousens in your example up there was that about destructuring?
let { x } = y
I'd be pretty happy doing file-wide enforcement. I was the one that wrote that original instance-wide enforcement before and probably should have done file-wide instead.
My personal pref is { x: 1 } and [1, 2] as well.

@xjamundx no, it was about object definitions in general

No spaces (e.g. {x: 1}, let {x} = y, and [1, 2]) is more consistent.
But there's an argument to be made that { x: 1 }, let { x } = y, and [1, 2] make more sense since there's another rule that requires spaces around { } in blocks, e.g. a => { return a + 1 }.
And like @dcousens says, it makes objects visually distinctive from arrays.
This is a toss-up. I don't currently feel strongly one way or the other.

I think that standard should aim for consistency whenever possible, so I'm leaning towards {x: 1}, let {x} = y, and [1, 2].

My preferred style is { x: 1 }, let { x } = y, and [1, 2] as well. Since we have spaces for blocks and spaces everywhere else other than [1, 2]... maybe it makes sense to [ 1, 2 ]? Gah, but then that seems weird with someFunc(a, b) and not someFunc( a, b ). There's no easy answer here.

@jprichardson Good points. Seems that no spaces (except for blocks, which are pretty different) is the most consistent, no?

I knew I shouldn't have started changing all my code from {foo} to { foo }. But fundamentally, I agree: {foo} should be treated like [foo]. That was also my original rationale.
What made me change my mind aside from this discussion was that objects often add identifiers:
import {foo as f, bar as b} from 'baz'

const [f, b] = baz
const {foo: f, bar: b} = baz

quux(({foo: f, bar: b}) => {
})

Even if you ignore the bracket infestation in the last example, they're pretty hard to read without an additional space. Conversely, if you do add the space, you'd have to do it everywhere, like @jprichardson pointed out. That would be especially apparent when destructuring more complex values containing both arrays and objects (which I'm not saying is a good idea).
Bottom line: I'm torn as well but I wanted to weigh in with some additional examples that would be affected.

@timdp Thanks for the additional examples. I think all but your last example have good readability. I think it will just take some getting used to. (It's not my current style either.)
You're right that the last example isn't ideal. But it's not too much better even with the space IMO because there's just a lot going on:
quux(({ foo: f, bar: b }) => {
})

Thanks for weighing in! 👍

@feross No problem!
The last example is actually a pretty common one in disguise: the AWS SDK, which is pretty popular for obvious reasons, returns objects with PascalCased keys. I typically end up destructuring it and renaming the keys to camelCase. (Typically, there'd be a promise somewhere in the mix rather than a callback but the destructuring remains.) Hence, it's important to get this scenario right.
Not advocating either style here. Just wanted to emphasize the use case's relevance.
At any rate, this time, I won't update my code until Standard 9 is actually out. :stuck_out_tongue:

Just a lone man's opinion, but I kind of think that this syntax:
const obj = { a: 'b' }

should be enforced instead of
const obj = {a: 'b'}

This may not really be a good argument for it, but I always associated standard with being very "spacey". It seems like the motto is "when in doubt, use a space". Some examples:
After keywords and before opening brace:
if (condition) {

}

Before and after operators
const sum = a + b + c

Before function parameters:
function foo (bar, baz) {

}

Before and after generator function asterisk:
function * foo (bar, baz) {

}

although im not sure how people would feel about enforcing spaces in array declarations like:
const arr = [ 1, 2, 3 ]

But yeah at the end of the day, I guess the main thing people care about is just picking something.

var f = {x: 1, y: 3}
var b = [1, 3, 4]
var u = {
  x: 1,
  y: 3
}

quux(({foo: f, bar: b}) => {

or
var f = { x: 1, y: 3 }
var b = [1, 3, 4]
var u = {
  x: 1,
  y: 3
}
quux(({ foo: f, bar: b }) => {

The second case seems less cluttered, and I can readily distinguish the syntax.
The first case just seems unnecessarily "compact".
The declarations of f and u in the first case also seem inconsistent... somehow.

I think it's also because every instance of { usually has white/empty space after it.
This would be the first exception to that rule.
Ignoring empty definitions.
See below:
var a = {}
var b = {a: 1}
var bb = {a}
var c = {
  a: 1
}
var d = function () {}
var e = function () {

}
var f = function ({a}) {

}
var g = function ({a, b, c: 1}) {

}

vs
var a = {}
var b = { a: 1 }
var bb = { a }
var c = {
  a: 1
}
var d = function () {}
var e = function () {

}
var f = function ({ a }) {

}
var g = function ({ a, b, c: 1 }) {

}

Within my own code, I'm very much in the curly-space camp, for sure. I agree with @zaynv 's argument about this already fitting Standard's conventions.
I'm also theoretically in favour of spacey-arrays, too, for consistency with curly-spaces. But, in practice, my own code shows a 50-50 split of spacey-arrays and spaceless-arrays. /shrug

Exactly, using spaces around the curly braces would make sense, as this makes complex items more readable and the current style of standard feels spacey.
Besides, we should let the build process minify and uglify the arrays and objects, and keep our focus on making things readable for ourselves. That is the entire thing we should be focused on - keeping things readable, even for people who are new to the source code of our projects. Why else would we implement a standard?
My vote goes to both spacey-arrays and spacey-objects.

@wuhkuh Readable and consistent. The point here is that some expressions have spaces and some don't, and whichever choice gets made here in the end is going to violate some of those.

@timdp I think spacey-arrays and spacey-objects would be a perfect solution to this question. As for the function arguments:
function write (callback) would still be valid. We could say that abstractions do not need spaces.
When you call the function write({ "hey": 1 }) the input would not be an abstraction anymore as the input is atomic.
So what if we input write(object)? Well that follows the rule of an abstraction, and therefore does not need a space.
Please provide me with feedback on this idea.

That would imply spaces inside square braces too, among other things.

@timdp That's exactly what I'm suggesting.
let arr = [ 1, 2, 3 ]
let obj = { 1, arr, 3, 2 }
function write (item)
write(obj)
The difference is the abstraction 'item'. I can't find the official term for this, but I'm sure you understand my intentions.

If we went with spacey-arrays, my brain is going to haemorrhage for a while when I see [ x ] in the wild.
Since ES6, I've indoctrinated myself to see { x } as equivalent to { x: x }.

Do we think there is sufficient consensus to move forward with spacey-objects?
If so, should we PR this baby and move the array discussion over to a new Issue?

I want to hold off on any changes for a while. We just released a major version and I'm concerned about users getting change fatigue.
My take: Let's all go spend our time building things. We can revisit all this in early 2017 and figure what new rules we want to add in standard v9.

You could already decide and commit to whatever choice you make for v9 though. Knowing about this issue puts me in doubt whenever I type a curly brace, which isn't great either. :-)

Yeah, we could use GitHub Issue Milestones to track things that are probably going to be in 9.0

@feross indeed, even if the change isn't finalised until v9,  that ambiguity is a bit lame.

The thing is that I want to look at what percentage of current standard users use each style, just so we don't pick the option that only 20% of users are using, or something like that. That's going to take a bit of time to look into.
Sorry for the current ambiguity. If it's any consolation, this rule is automatically fixable with --fix, so it'll be easy to switch!

just so we don't pick the option that only 20% of users are using

Yes, this. While we'd make the internal switch to an unusual pattern (spaced arrays), and I sympathise with the desire to factor "readability" into decisions, using "readability" (phrased well as being "spacey") as the primary yardstick becomes a valid argument for pushing other uncommon-in-JS patterns on this basis (eg. open blocks on new lines like in C). The "uncommon-in-JS" is my pause.
Consistency with common practice matters, regardless if it is subjectively/conditionally "worse" (hello bikeshed) - don't surprise people. That said, if 20%+ of JS projects use padded arrays, and there are some reference "big projects" that use this style (ie. momentum towards this), then it's less of an issue (as this reduces the expected-cost of the inevitable delays/screwups/confusion/wat due to unfamiliarity).
FWIW the internal style we ended up on was the "tight" wrap {x, y, z} for consistency with other enclosure syntax, and a caveat that if it got too crazy, then instead of padding the enclosure, the elements got newlined (which matches how we've handled array formatting since the stone age).

I wonder if there's a query we can run that will tell us what the common style choice is?
https://cloud.google.com/bigquery/public-data/github

@cayuu Great point about the newlines. That's basically what I've been doing.

My two cents:

{ a: 'foo' }
[1, 2, 3]

But I would be ok with

{ a: 'foo' }
[ 1, 2, 3 ]

for consistency.
{a: 'foo'} makes it harder for me to scan things and it gets messier if it's just {a} :(

I see this issue hasn't had any discussion in almost 4 months. Regarding @feross's comment, "We can revisit all this in early 2017", maybe now is the time.
After reading all the discussion, my preference has converted from spaceless-objects to spacey-objects, but now I also want spacey-arrays for a few reasons already mentioned:

Consistency with spacey-objects.
Fits the tradition and convention of standard. @zaynv said "I always associated standard with being very 'spacey'."
Consistency with arrays split over multiple lines. @dcousens said:

var u = {
  x: 1,
  y: 3
}
var f = {x: 1, y: 3}

The declarations of f and u in the first case also seem inconsistent... somehow.

Well, we can do similar with arrays:
var a = [
  x,
  y
]
var b = [a, b]

Are these similarly inconsistent? Probably. This argument isn't that convincing to me, but it goes with the other two.

It'd be handy for some accord to be reached between https://github.com/jlongster/prettier and JavaScript Standard

@jokeyrhyme I would discuss that in another issue.
I'm :+1: on spacey. And on determining this.

I'm also on the spacey side. Arrays and object literals are two different things, so I think the "inconsistency" between [x, y] and { x, y } makes sense.

What I was thinking about last few months. I'm pretty used to spacey objects, but not spacey arrays (maybe sometimes, hm).
var a = { x: 2 }
var a = {
  x: 1
}
var a = {
  x: 1,
  y: 2
}
var a = [
  x,
  y
]
var b = [x]
var b = [123]
var b = [ x, y ]
var b = [ { a: 'b' }, 2, { c: 3 }, 4 ]
var b = [{ a: 'b' }]
var b = [ { a: 'b' } ] // too much spaces? above is better
var b = {
  a: 1,
  b: {
    c: [ { cc: 22 }, 333 ]
  },
  d: [ 'e', 444, [ 1, 2, 3 ] ]
}

If we apply consistency, it may seem too spacey in some times, but in most cases it would be separated in separate lines, so won't maybe won't look too spacey. As about the array-bracket-spacing i think we should use singleValue: false option

It's worth noting that this change (no matter which way we go - but especially spaced-arrays), is likely to affect a significant portion of standard users.
We have three options for concluding this:

Defer to @feross for a decision
Use the most voted/weighted preference of the 16 current participants
Defer to conventions used in popular of ES6+ projects (perhaps looking at the OSS projects from the big companies listed in the README)

My preference would be for 1 or 3. I'm wary of a "happened to be in the room" policy approach (2).

What is the ecosystem impact of either?

Started at the top of the README list of companies, left to right:

npm: spaced objects, tight arrays
opbeat: spaced objects, tight arrays

..then I got tired looking ;)

For some perspective, it looks like the prettier folks couldn't decide and just made this a "bracketSpacing" option:
https://github.com/prettier/prettier#api

@jokeyrhyme
Doesn't that defeat the purpose of a standard?
The decisions should be up to this package.

@wuhkuh I just mention prettier, because it's another example of an opinionated style guide, and it's been a difficult enough decision to make that they've made it an option
In principle, I agree that eliminating pointless bike-shedding and decision-making is the noble goal of an opinionated project

Despite the fact that npm and opbeat use tight arrays, I still prefer spacey for the reasons @thejohnfreeman put down.
It would feel unnatural if you keep the arrays tight while you space out objects and functions with their arguments. When in doubt, space out.
There are also tools available that update existing code to suit the standard. This debunks 'patching is a lot of work!'
I would like to add that if we decide which way to go, we could start by sending warnings instead of erroring when this patch is just introduced.
This would decrease the shock of this big decision at the packages that use this standard.

paypal uses tight arrays FWIW

Just realized that having spacey arrays is a way to distinguish array literals and property access 🤔
const array = [ 1 ]
const number = array[0]

@LinusU good point. :)
@wuhkuh console.log(obj[ 'is' ]) is another rule that i think it should enforce non-spacey style - currently is either set by eslint-plugin-standard.

I see more often about spacey objects than spacey arrays, space arrays feel a bit awkward to me
const obj = { a: 1, b: 2 }
const arr = [1, 2]

I personally find this more readable
import React, { Component } from 'react'
import { connect } from 'react-redux'

import { getItems } from '../actions'

const objItems = [{ one: 1 }, { two: 2 }]

const App = () => (
  <div
    style={{ height: '100vh' }}
    objItems={objItems}
    arrItems={[1, 2]}
  />
)

const mapStateToProps = ({ aReducer, bReducer }) => ({ aReducer, bReducer })

export default connect(mapStateToProps, { getItems })(App)

Than this
import React, {Component} from 'react'
import {connect} from 'react-redux'

import {getItems} from '../actions'

const objItems = [{one: 1}, {two: 2}]

const App = () => (
  <div
    style={{height: '100vh'}}
    objItems={objItems}
    arrItems={[1, 2]}
  />
)

const mapStateToProps = ({aReducer, bReducer}) => ({aReducer, bReducer})

export default connect(mapStateToProps, {getItems})(App)

PD: Sorry for using long noisy examples

For those of you looking for a quick fix in the meantime:

npm install --global eslint eslint-config-standard eslint-config-standard-jsx eslint-plugin-promise eslint-plugin-react eslint-plugin-standard
echo '{"extends": ["standard", "standard-jsx"], "rules": {"object-curly-spacing": [1, "always"]}}' > ~/.eslintrc

Careful, this will replace an exisiting ~/.eslintrc .
Replace "always" with "never" if preferred or read up on the ESLint rule object-curly-spacing and  array-bracket-spacing.
Then use with:

eslint --fix FILE
ESLint Formatter for Sublime

This workaround got rid of the majority of my non-fixable standard.js errors. Apparently, at least for me, inconsistent spacing happens a lot less often with array-bracket-spacing. So my suggestion is to just define object-curly-spacing for the time being and leave array spacing as is (consistent).
Count me in on spacey objects.
❤ Standard.js

I might have changed my mind on this. An array looks clean already without spaced-style, and spaced arrays make statements and declarations harder to read in some cases.
const Obj = {
  properties: [ { type: Object } ] // this sucks.  Lets add an exception

Before you know it, we forgot what we tried to achieve: consistency. If we want to patch those situations we would need exceptions to keep it readable (and convenient), therefore making it less consistent.
For anyone in doubt: enforce spaced arrays for a while. You won't quite enjoy them as much as you'd think. I've done this and it changed my mind completely.
My vote is for spaced objects and tight arrays. Arrays are readable and consistent as they are.
I think the most of us agree on spaced objects as far as this thread goes.
@feross Could you update us on the status?

console.log(Obj[ 'properties' ]) // this sucks. Lets add an exception

That's totally different rule - computed-property-spacing. And is is set to either by eslint-plugin-standard which means it is allowed, but yea it really sucks that's why I force it to ["error", "never"]

I was just mentoring a person. On a project where we use standard. And I chose to just not tell him to space out the objects. It came out like this: {foo: { bar: 'bar' }}. So the outer object is tight and the inner is spaced. But I didn't tell him to change it. Because we have a linter. And I am not it. Can we go the route of spaced objects and get on with it?

I like this a lot. I'm sure it will impact a lot, so maybe for the next major version.

Hey guys it's been almost a year since this issue was opened. I'm going to add a quote from the FAQ

At the end of the day you have to 'just pick something', and that's the whole philosophy of standard

I think in all this time people have been given the opportunity to express their opinion, but it's time to decided.
I really don't have a preference, I just want to see this issue close, I have colleges using both approach and I can't enforce a style on them, because as @mightyiam just said, we have a linter for that (That we really like) and the CI passes.
You are always going to find people who prefer one way or the other, but I don't think they will just remove standard from their projects just because they disagree with a rule.
Cheers.

Rest assured that this will be decided in a future version. There's no need for folks to continue weighing in.
The past few releases have had some pretty large breaking changes, and there's a limit to how many breaking changes we can include in a given release.
I'll lock this issue to save everyone some time.

Thank you to everyone for sharing your thoughts on this issue. Thanks to @LinusU for the analysis in this comment and for sending a PR: https://github.com/standard/standard/issues/609#issuecomment-400826566
This rule will be included in the standard 12 release which will happen later tonight. Happy to merge this and put this one behind us! 🙌


Fix this!!! NOW!!!!

FIX!!

Ok welp this is actually useful

Please reopen this issue with the updated Repository.

this may require tkinter bindings in the code?

boss! what are you doing here! its my job to leave the comments!

False! Wrong! Brainwashing! Ignored!

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

Bruh, just reopen this PR with the updated repo

this may require tkinter bindings in the code?

boss you were saying to me about inst const dupe lupe? this will be beneficient for them? can you explain it in further detail so they can benefit longer

I. CAN'T. RE-OP-EN THIS!!!!! PLEASE EMAIL GITHUB!!! THIS IS CRITICAL!!

welp

JUST COPY PASTE!!!! INCLUDE IN!!!! COMMIT!!! NOW!!!!

NO

GIVE CREDIT!

BOSS WE NEED THIS COMMIT ON OUR HANDS

DONT DO IT PHRL

PLEASE LEAVE "/* Contributed to by BrandleiotAlgorithmsCompany */" in your PYTHON CODE!


Ability to sort field order when creating new users at /useradmin/new

Is your feature request related to a problem? Please describe.
I have quite a few fields in my 'users' table that aren't required. I would like to be able to put the 3 required fields, when creating a new user, at the top of the 'create user' view.
Describe the solution you'd like
I would like to be able to move the required fields to the top of the 'create user' view or even remove the unneeded fields in the form.
Describe alternatives you've considered
I tried creating a 'sign up form', with only the required user fields, but when I have admins create new users using the 'sign up form' it auto logins the admin in as the new user. Then they have to logout and back in as themselves. Its cumbersome.
Additional context
It would be great to be able to create a view for creating 'new users' that isn't available to the public page via the Sign Up view.

For anyone running into the same issues here was my solution:
I setup Fief in Kubernetes.
I installed Oauth2 module in saltcorn.
I created a new tenent and client in fief for saltcorn and configured saltcorn as such.
I created a new table and Edit view in saltcorn for user email and role.
I created an Outbound webhook trigger in saltcorn to create new accounts in fief via saltcorn.
When fief receives the new user info, it will then auto assign a role and the new user can login to saltcorn.


New LearningResourcePrice model

What are the relevant tickets?
PR 1 of 5 to address https://github.com/mitodl/hq/issues/5134 and https://github.com/mitodl/hq/issues/4685
Description (What does it do?)

Adds a LearningResourcePrice model with two fields (amount, currency)
Adds a many-to-many relation between LearningResource and LearningResourcePrice, also between LearningResourceRun and LearningResourcePrice (named resource_prices)
Updates QuerySet classes to avoid n+1 queries
Updates the search index schema with addition of the new resource_prices field
Adds a new python package pycountry to validate currency codes during ETL pipeline runs

How can this be tested?

If you don't already have some courses with prices, run these commands on the main branch:./manage.py backpopulate_mitxonline_data
./manage.py backpopulate_xpro_data

Log in as an admin user to avoid caching and go to http://open.odl.local:8062/search?platform=mitxonline&platform=xpro, you will see a mix of courses that should all either be paid with certificate (xpro) or free with a paid certificate option (mitxonline).  If you click on a course card you will see the same price in the drawer.
Switch to this branch, run docker compose build web celery (new python package) and restart containers.  Make sure the new migrations complete successfully.
Go to http://open.odl.local:8062/search?platform=mitxonline&platform=xpro again.  Everything should still look the same.
Click on a result and check the API response for that resource.  There should be a resource_prices attribute for the resource and each of it's runs, with amount and currency attributes.
Run ./manage.py update_index --courses --programs, then wait a minute or 2.
Go to http://open.odl.local:8062/search?platform=mitxonline&platform=xpro again.  It should still look the same, and if you inspect search API results, the resource_prices field should be there too.
Run ./manage.py recreate_index --all, it should complete without errors.
Check and uncheck the "Free" checkbox on the search page.  The results should change as expected.
Running the following pipelines should still complete successfully (you'll need the appropriate env values from RC for SEE_* and EDX_API_*):./manage.py backpopulate_sloan_data
./manage.py backpopulate_mit_edx_data [--api_course_file=edx.json --api_program_datafile=edx_programs.json]

Use the django debug toolbar to measure the # and speed of SQL queries for the URL http://api.open.odl.local:8063/api/v1/learning_resources/?platform=mitxonline.  It should not be significantly slower than the same url on the main branch, but there will be 2 additional queries.

vs

Finally if you want to revert your price data before you go back to the main branch, run this and the prices field should be restored with values:./manage.py migrate learning_resources 0070_learningresource_location

Additional Context

Most data sources always have prices in USD.  Exceptions are Sloan and MIT edX, so their ETL pipelines have been adjusted to extract the currency from their API's.
There will be 4 subsequent PR's before these https://github.com/mitodl/hq/issues/5134 is closed:

2: Change frontend to use the resource_prices field instead of prices
3: Modify the LearningResource.prices and LearningResourceRun.prices fields to be the same as resource_prices, and update schema. (Note: this will cause index updates to fail until a reindex completes)
4: Change frontend to use prices field again
5: Remove resource_prices from models and schemas.

@ChristopherChudzicki Good catch, I just updated the model definition/migration for those fields


Woocommerce REST API, nested data

I am fairly inexperienced in the wonderful world of programming/developing and am working with Huginn for the first time. I have a question with regards to working with a web hook,  I am currently trying to setup up working with woocommerce.
I have the webhook coming to an agent ok, but there is a section of the JSON  which looks like this
  "meta": [
          {
            "key": "versionID",
            "label": "versionID",
            "value": "1"
          },
          {
            "key": "productCodeID",
            "label": "productCodeID",
            "value": "25"
          }

How can i send both the Values out with the key as the Key in the following format
KEY: VALUE
Sorry to ask what is probably a trivial question, but any help would be greatly appreciated
Kind Regards
Dave

Hi @DaveClissold,
actually I don't think the problem is trivial because we do not have an Agent which can transform an array to a object/hash. The only solution I came up with is to use a EventFormattingAgent and liquid to manually construct a JSON object:
{
  "instructions": {
    "json": "{ {%for m in meta%}\"{{m.key}}\": \"{{m.value}}\"{% unless forloop.last %},{% endunless %}{%endfor%} }"
  },
  "mode": "clean"
}

You can then send that event to a JsonParseAgent which will parse the JSON and return a hash/object which can be used in different Agents.

Hi Dominik,
That works a charm, but it is not escaping the '  " '

I've just noticed an error in my original post.  the meta is nested within line_items so the json from woo reads
{"line_items": [
   {"name": "stochas",
     "meta": [
          {
            "key": "versionID",
            "label": "versionID",
            "value": "1"
          },
          {
            "key": "productCodeID",
            "label": "productCodeID",
            "value": "25"
          }

So the for loop you kindly suggested does not work if I call the full api.  Also how do i call the item name,
{{ line_items.name }}
returns blank because I'm guessing of the [, how do I ignore it?

    "json": "{ {%for meta in line_items %}{%for m in meta%}\"{{m.key}}\": \"{{m.value | replace: '\"', '\\\"'}}\"{% unless forloop.last %},{% endunless %}{%endfor%}{%endfor%} }"

Does that work? You might need to tweak the amount of \ to properly escape the quotes and backslashes. In the resulting event every quote should be prefixed with a backslash to escape it.

Sadly not that just thoughts out a load of backslashes
 "json": "{ \"\": \"\",\"\": \"\",\"\": \"\",\"\": \"\",\"\": \"\",\"\": \"\",\"\": \"\",\"\": \"\",\"\": \"\",\"\": \"\",\"\": \"\",\"\": \"\" }"

It's probably easier to use a JavascriptAgent, the liquid string is hard to debug. Try this with the language set to CoffeScript:
Agent.receive = ->
  events = @incomingEvents()
  for event in events
    data = {}
    for item in event.payload.line_items
      for meta in item.meta
        data[meta.key] = meta.value
    @createEvent data: data

@dsander thats it!!! thank you so much.  I do have one more question.  I have a digest working to merge the data back with the original API to now be able to send out certain bits of the data, but the liquid template is not working at all.
Below is the output of the DIGEST AGENT
{
  "events": [
    {
      "data": {
        "versionID": "123",
        "productCodeID": "456"
      }
    },
    {
      "order": {
        "id": 58,
        "order_number": 58,
        "order_key": "wc_order_5886516d1d6f0",
        "created_at": "2017-01-23T18:54:37Z",
        "updated_at": "2017-01-23T18:54:37Z",
        "completed_at": "2017-01-23T18:54:37Z",
        "status": "processing",
        "currency": "GBP",
        "total": "0.00",
        "subtotal": "0.00",
        "total_line_items_quantity": 1,
        "total_tax": "0.00",
        "total_shipping": "0.00",
        "cart_tax": "0.00",
        "shipping_tax": "0.00",
        "total_discount": "0.00",
        "shipping_methods": "",
        "payment_details": {
          "method_id": "",
          "method_title": "",
          "paid": true

When i try and use the following in a POST agent
payload": {
    "VER": "{{ events.data.versionID }}",
    "EMAIL": "{{ events.order.billing_address.email }}"
  },

both return empty. Am I completely wrong here?

Ok was able to fix that with the following if anyone else comes across this
"payload": {     "VER": "{{events[0].data.versionID}}",     "EMAIL": "{{events[1].order.billing_address.email}}"   },

Awesome! We have some documentation about liquid in the wiki, the official homepage is also nice: https://shopify.github.io/liquid/
Can we close the issue?

@dsander Thanks for all your help. Sure you can close it.

Glad I could help.


Fresh Install Crash

Mod Version: 1.12.2-<IP_ADDRESS>
Forge Version: 1.12.2
Link to crash log (if applicable):
fml-client-latest.log
Description:

I updated to the 64 version of java and allocated more memory and still the same issues. If I delete the mod game is fine. It's the first one I'm trying to install.

Your attached file isn't a crash log, it's a forge log. Please instead of going to your log folder, go to your crash-reports folder and send that file instead via attaching or pastebin

You are trying to run the 1.7.10 version of Dynamic Surroundings in a 1.12.2 Minecraft install.  The line "Examining for coremod candidacy DynamicSurroundings-1.7.10-<IP_ADDRESS>.jar" gives it away. :)  Make sure you  have the correct version.  The JAR name should be "DynamicSurroundings-1.12.2-<IP_ADDRESS>.jar".  My official upload of that version can be found here.

Thank you for the quick responses. I was downloading the green button download instead of the latest. Thanks for the help.


Does not work with Kotlin 1.9.0

Trying kscript for the first time and installed kotlin and kscript with sdkman on Mac and simple execution fails:
% kscript 'println("hello world")'
Exception in thread "main" java.lang.ClassNotFoundException: kscript.scriplet.Scriplet
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
        at Main_Scriplet$Companion.main(Main_Scriplet.kt:5)
        at Main_Scriplet.main(Main_Scriplet.kt)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.jetbrains.kotlin.runner.AbstractRunner.run(runners.kt:70)
        at org.jetbrains.kotlin.runner.Main.run(Main.kt:188)
        at org.jetbrains.kotlin.runner.Main.main(Main.kt:198)
[kscript] [ERROR] Execution of scriplet failed:
[kscript] [ERROR] Command     : 'bash -c /Users/dalewking/.sdkman/candidates/kotlin/1.8.20/bin/kotlin  -classpath '/Users/dalewking/Library/Caches/kscript/jar_7a6cdcc8b547b2bb2a0ad2ab4f24c291/scriplet.jar:/Users/dalewking/.sdkman/candidates/kotlin/1.8.20/lib/kotlin-script-runtime.jar' Main_Scriplet '
[kscript] [ERROR] Exit Code   : 1
[kscript] [ERROR]

Tried with Kotlin 1.9.0 and 1.8.20 since I thought new kotlin version may have been the issue

I tried to re-invoke with -d argument to get more info and now it works

Actually it may have been that I also tried a kscript -c to get it working

OK the issue is that it isn't working with Kotlin 1.9. Switching to Kotlin 1.8.20 allows it to work, but it is necessary to clear the cache after switching versions.

Same thing here. We just upgraded our cli tools to 1.9 and kscript dies on the same error.

Same here.
Updated kotlin version on developer machines and all the scripts got broken, as result all local script calls crashing.
Fortunately on CI it still works as Docker container has pinned versions.
If you need any help - don't hesitate to ask, as we are heavily relying in kscript in our project we consider this issue as critical.

I am working on this. The root cause seems to be that Kotlin 1.9 disallows .kts files in the source roots.
Anyway, I recommend pinning the Kotlin version on CI/CD - fixing bugs quickly won't always be possible.

Thank you.
Very much appreciated your effort there.

I have just released kscript 4.2.3-RC.1
Please check if everything works as expected in your code - there are changes in the core engine of kscript, so I would like to ensure that nothing is broken after fixing the problem.
sdk install kscript 4.2.3-RC.1

@cgruber , @dalewking , @iamironz  - can you confirm that the issue is fixed?

Works fine for me, thank you so much!

The final resolution is even simpler, without changing much in the kscript core.
I have just released kscript 4.2.3 with Kotlin 1.9.0 compatibility.


fix: cache related performance tweaks

since we know the front-end annotation-poller will be requesting content every few seconds, we now return immediately and populate the cache in the background.
we no longer expire the content in our cache (since this data will change rarely) instead we update it in the background if it has changed upstream.

Coverage increased (+0.6%) to 86.0% when pulling 18005d6ff7d16bbf220e843ef8e6f48cc20f8d80 on performance-tweaks into c5211c63402ee05617c43ac00d152f4d9d422b36 on master.


Update to pandas 1.X

This is needed for google collab --> https://github.com/SubstraFoundation/distributed-learning-contributivity/pull/164#issuecomment-646052648
cc @natct10

Okay, thank you Romain! Have you already tested 1.x versions of pandas?

Okay, thank you Romain! Have you already tested 1.x versions of pandas?

no


Adds plugin hook for decorating the electron browser options

Creates a new plugin hook decorateBrowserOptions as discussed in #232. It works just like decorateConfig but for the browser options that Electron expects in the BrowserWindow constructor.
Designed to be used like this.
Default options are specified inline, but I guess they could be moved out like config-default.js if necessary.

Usually the decorators get the existing options, and further enhance them (hence "decoration").
You should pass the object to getDecoratedBrowserOptions
Thank you!

Makes sense. Changed it so that getDecoratedBrowserOptions receives the defaults as an argument.

Beautiful!


Change u32 to usize for indexes and lengths

What
Change u32 to usize for indexes and lengths of collections.
Why
It is inconvenient that the lengths and indexes of these types are not usize. For example, if I create conversion from a fixed size array to a Vec, or a Binary, I can't do so relying on the contract to guarantee that the size of both, for fixed size structures, are identical. I have to rely on a runtime check. In general it seems a bit odd we'd not use usize at the seams, assuming there's not some cost to doing so.
Affect on Contract Size
For some reason the create_contract test went down in size, unclear why.
As expected the linear_memory test went up in size, likely due to the additional u32::MAX checks, not substantially though.
Before
-rw-r--r--  1 leighmcculloch  staff  541 Jul 25 17:31 example_add_i64.wasm
-rw-r--r--  1 leighmcculloch  staff  617 Jul 25 17:31 example_contract_data.wasm
-rw-r--r--  1 leighmcculloch  staff  566 Jul 25 17:31 example_create_contract.wasm
-rw-r--r--  1 leighmcculloch  staff  1163 Jul 25 17:31 example_linear_memory.wasm
-rw-r--r--  1 leighmcculloch  staff  2121 Jul 25 17:31 example_udt.wasm
-rw-r--r--  1 leighmcculloch  staff  103 Jul 25 17:31 stellar_contract_sdk.wasm

After
-rw-r--r--  1 leighmcculloch  staff  541 Jul 25 17:30 example_add_i64.wasm
-rw-r--r--  1 leighmcculloch  staff  617 Jul 25 17:30 example_contract_data.wasm
-rw-r--r--  1 leighmcculloch  staff  548 Jul 25 17:30 example_create_contract.wasm
-rw-r--r--  1 leighmcculloch  staff  1197 Jul 25 17:30 example_linear_memory.wasm
-rw-r--r--  1 leighmcculloch  staff  2121 Jul 25 17:30 example_udt.wasm
-rw-r--r--  1 leighmcculloch  staff  103 Jul 25 17:30 stellar_contract_sdk.wasm

I'll add another example that exercises Binary and see if I can whittle the size difference away.

Ok, so this is very doable. But has some downsides I didn't expect. Specifically, if someone wants to pass an index through a contract fns arguments it'll need to be a u32, which means developers need to cast to usize. We can't surface usize as a RawVal as it would present too many gotchas on the host side I think. So I'm just going to close this and keep it as u32 which presents mostly internal annoyances.

I realized there's a simpler solution to my problem: https://github.com/stellar/rs-stellar-contract-sdk/pull/322.


pcmanfm-qt "Computer" and "Network" locations broken in LXQt desktop

Issue description
On latest NixOS master branch (c2b4a0d2668fda88430e7067245fc63d977ea28c) with the LXQt desktop, clicking on "Computer" or "Network" in the file manager (pcmanfm-qt) gives an error and no output:

There is no output in the system journal. The error appears only once after starting the file manager process. Clicking a 2nd time gives no error, but no "output" either. Killing the file manager and starting it again results in the error message.
pcmanfm-qt --help does not advertise any debug / verbosity options.
As a data point, pcmanfm-qt works fine when run in my GNOME desktop (NixOS 16.09 + pcmanfm-qt from c2b4a0d). Some missing D-Bus service perhaps?
Technical details

System: NixOS 17.03.git.c2b4a0d (Gorilla)
Nix version: 1.11.4
Nixpkgs version: c2b4a0d

Fixed by 2e7105467b22292eca1fc37c2c8019e6aacc7051. (Thanks @romildo!)


Duplo 26628

Overview
Add availablity set related field to vm azure resource
Summary of changes
Added availablity_set_id field to duplocloud_azure_virtual_machine resource
This PR does the following:

field added availablity_set_id for create context
Documentation updated

Testing performed

[ ] Using unit tests
[ ] Manually, on my local system
[✔ ] Manually, on a remote test system

Describe any breaking changes

...

Task linked: DUPLO-26628 TF: Add availability set field to duplocloud_azure_virtual_machine resource


inverts discount amount (should be positive); adds promo_total inside…

… of the cache key; attempting to remove stale data bug (WIP); removing usless debugging statments, adds other debugging statements; adds flag for extra_debugging set as object macro on SpreeTaxjar

several issues addressed:

the discount was passed as negative, should be a positive

the promo_total wasn't in the Taxjar cache key, making the cached (wrong) version picked up

significant refactoring for debugging tools. Removed much duplicative debugging and added global switches (see README) to turn on extra debugging and turn off swallowing of errors.

this still is buggy. it is currently passing $0.00 as the discount for me because of a stale-object problem (see TODO)

here is documentation of hopefully the 4th and hopefully final fix.
You'll note specifically here in this line of code in taxjar_calculator.rb order.line_items.first.object_id != item.object_id which is the root of the stale data problem.
@eric1234 @dhonig @mtomov
[73, 82] in /Users/jason/Work/*****/****/solidus_taxjar/app/models/spree/calculator/taxjar_calculator.rb
   73:         # and unfortunately gets cached this way and then re-used
   74:
   75:         # TODO: FIX ME
   76:
   77:         byebug
=> 78:         taxjar_response = Spree::Taxjar.new(preferred_api_key, order).calculate_tax_for_order
   79:         return 0 unless taxjar_response
   80:
   81:         tax_for_current_item = cache_response(taxjar_response, order, tax_address, item)
   82:         tax_for_current_item
(byebug) order.line_items.first.promo_total
#<BigDecimal:7fbe816f0cd8,'0.0',9(18)>

(byebug) order.line_items.first.promo_total
#<BigDecimal:7fbe816f0cd8,'0.0',9(18)>
(byebug) order.line_items.first.object_id
70228118881900

(byebug) item
#<Spree::LineItem id: 2524, variant_id: 15817, order_id: 1874, quantity: 1, price: #<BigDecimal:7fbe84288760,'0.25E3',9(18)>, created_at: "2017-12-29 17:16:16", updated_at: "2017-12-29 17:17:25", currency: "USD", cost_price: nil, tax_category_id: 3, adjustment_total: #<BigDecimal:7fbe845f17f8,'0.2219E2',18(27)>, additional_tax_total: #<BigDecimal:7fbe845f1690,'0.2219E2',18(27)>, promo_total: #<BigDecimal:7fbe8229ae30,'-0.5E2',9(18)>, included_tax_total: #<BigDecimal:7fbe8229a868,'0.0',9(18)>>
(byebug) item.promo_total
#<BigDecimal:7fbe8229ae30,'-0.5E2',9(18)>
(byebug) item.object_id
70228101298720
(byebug)  order.line_items.first.object_id != item.object_id
true


Update docfx.json

Adding ms.suite so we can pull it into data reporting for the M365 dev program

@KumarVivek please approve and merge, if you have questions LMK. This is a request by the M365 developer platform DevX team. Thanks!

@KumarVivek Hi, what do I need to do to get this PR reviewed and merged? We need the metadata tag I added to pull the data into our telemetry.

@KumarVivek thanks!


Allow data and error to be accessed on SafeParseReturnType even when they may not be present

When using zod in react applications, the error property is often unused. Instead, the primary focus is on either getting back parsed data or undefined (which can then be overwritten with some default value). Currently this involves a pointless intermediate variable.
import {MyThingParser} from '../parsers'

const useMyThing = () => {
	const myThingResult = MyThingParser.safeParse(localStorage.get('myThingKey'))
	const myThing = myThingResult.success ? myThingResult.data : defaultMyThing
	// ... further transformations, defaulting, etc.
}

These sorts of patterns also come up frequently in tests, where it is usually solved with very broad casting.
test('myThing is parsed correctly', () => {
  const myThingResult = MyThingParser.safeParse(testData)
  expect((myThingResult as any).data).toEqual(testData)
})

Both of these would be unneccessary if we made a slight change to the safe parse output type, while keeping the discriminated union structure.
type SafeParseSuccessOutput<Output> = {
    success: true;
    data: output;
    error? : never
}

type SafeParseError<Input> = {
    success: false;
    error: ZodError<Input>;
    data? : never
}

This was initially discussed in #3266 , but that was closed because the original suggestion in that thread involved removing the discriminated union structure. There is a PR for this work already (#3295 ).

@scarletquasar would this make it easier for you to use zod?


Ensure only strings are passed to subprocess

Added one line on 87.
This should go through the command array that is being passed and ensure all items are ascii encoded before calling check_call.
Should completely stop any unicode or byte code strings from leaking through.
I don't believe there is a bug request, but a user on the forum was attempting to build:
https://forums.swift.org/t/a-compiler-that-builds-a-very-unorthodox-idea/23453/4
The error looks like a unicode string was being passed to subprocess, best practice would be to ensure that everything getting sent to subprocess is in the correct encoding.

Need to change another place where it would fail... Should probably hook anytime subprocess that is called and force check the commands being passed.


Cannot install module from local dir

Since update I'm not able to install from local dir (newest deb rakudo newest panda)
kamil@:~/lacuna-cookbuk$ panda install .
Must specify something as a path: did you mean '.' for the current directory?
  in submethod BUILD at /home/kamil/.rakudobrew/moar-nom/install/share/perl6/site/lib/Panda  Ecosystem.pm:25
  in sub make-default-ecosystem at /home/kamil/.rakudobrew/moar-nom/install/share/perl6/site/lib/Panda/App.pm:39
  in block <unit> at /home/kamil/.rakudobrew/bin/../moar-nom/install/share/perl6/site/bin/panda:11

kamil@:~/lacuna-cookbuk$ panda install ./
Must specify something as a path: did you mean '.' for the current directory?
  in submethod BUILD at /home/kamil/.rakudobrew/moar-nom/install/share/perl6/site/lib/Panda/Ecosystem.pm:25
  in sub make-default-ecosystem at /home/kamil/.rakudobrew/moar-nom/install/share/perl6/site/lib/Panda/App.pm:39
  in block <unit> at /home/kamil/.rakudobrew/bin/../moar-nom/install/share/perl6/site/bin/panda:11

paths has changed -- not panada fault


MemoryCache generic TryGetValue return false when incompatible type used

Pull request for #361

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: tstanitz sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

Those test failures are suspicious. It's null reffing on cache.Get<int>(i);. It can't cast null to an int. Before it would have returned default/0. Get<TItem> needs to change to something like return (TItem)(cache.Get(key) ?? default);

I have realized in the meantime. I will update the pr. Thanks for your help


Bug in advanced border field

Problem Description

The border css is not working in the React component.

If you set a default for the border, the React components render() function is called infinitely which can cause the browser to stop reacting on slower computers.

Steps To Reproduce
$advanced_fields['borders']['default'] = [];
$advanced_fields['borders']['inner'] = array(
    'label_prefix' => esc_html__('Title', 'dicm-divi-custom-modules'),
    // 'tab_slug' => 'advanced',
    // 'toggle_slug' => 'text',
    'css' => array(
        'main' => array(
            'border_radii' => "%%order_class%% .inner",
            'border_styles' => "%%order_class%% .outer",
        ),
    ),
    'defaults' => array(
        'border_radii' => 'on|3px|3px|3px|3px',
        'border_styles' => [
            'width' => '10px',
            'color' => 'red',
            'style' => 'dashed',
        ],
    ),
);

Screenshot and/or gif
https://youtu.be/Qsw01euRnXI

QA Checklist
Reporter

[ ] Helpful title used

Helpful title format: Scope(s) :: One Sentence To Describe The Issue
Example: VB :: Floating Toolbar :: Jumps To Top Of Page

[x] Detailed description
[ ] Steps to reproduce included
[ ] Support Ticket URL included
[x] Image and/or gif

Developer

[ ] Steps to reproduce proven solved
[ ] Test included and coverage acceptable and all Tests passing?
[ ] PR description has layman's description of problem and solution and "Areas Affected" listed/explained?
[ ] PR branch includes latest commits from master branch (at the time of checking)?
[ ] Estimated points on issue
[ ] Proper code documentation and conventions?
[ ] Proper RTL appearance
[ ] i18n used if applicable
[ ] Ajax/Form used? Nonce used? Perms checked? All user input sanitized and validated? Intentional unsanitized/unescaped functions used?
[ ] Database saved/updated? Data sanitized and validated?
[ ] Variable output properly escaped and validated?

Peer Review

[ ] PR branch includes latest commits from master branch (at the time of checking)?
[ ] Steps to reproduce proven solved
[ ] Affected areas are tested and ok
[ ] Proper code documentation and conventions
[ ] Proper RTL appearance
[ ] i18n used if applicable
[ ] Test(s) included and coverage acceptable
[ ] Ajax/Form used? Nonce used? Perms checked? All user input sanitized and validated? Intentional unsanitized/unescaped functions used?
[ ] Database saved/updated? Data sanitized and validated?
[ ] Variable output properly escaped and validated?

Quality Assurance

[ ] All tests passed on CircleCI.
[ ] Steps to reproduce passed, the fix works.
[ ] No errors in console or output
[ ] Affected areas are tested and ok
[ ] The fix does not change a customer's website in any surprising or unintended way

[ ] If Divi's design is adjusted, settings are migrated gracefully and invisibly

Design Review

[ ] UI is to spec
[ ] UX is to spec
[ ] Design is to spec
[ ] No surprising visual changes to a customer's website will be experienced after updating

[ ] Any/all visual changes are migrated gracefully

Dev Review

[ ] Test(s) included and coverage acceptable
[ ] Ajax/Form used? Nonce used? Perms checked? All user input sanitized and validated? Intentional unsanitized/unescaped functions used?
[ ] Database saved/updated? Data sanitized and validated?
[ ] Variable output properly escaped and validated?
[ ] i18n used if applicable
[ ] Implementation acceptable, DRY, Scaleable, future safe
[ ] Best practices used, cleverness and grokage, ES6 use, etc.

I can also confirm this bug, if we name the border fields 'default' or 'image' it works/ renders in the visual builder no other name works.

@xxtesaxx @munirkamal i've tried to replicate this on latest master and latest dev branch but i couldn't replicate it. Can you guys zip the build file and attach it here so i can inspect it more? Thanks.

@xxtesaxx @munirkamal we finally figured out what causing the first issue:
The border css is not working in the React component.
``

This happened when custom border slug in `$this->advanced_fields['borders']` isn't `default`, `image`, `fullwidth`, `portrait`, `fields`, or `fields_focus`. A patch has been submitted and will be reviewed shortly.

***

Regarding the second issue:

If you set a default for the border, the React components render() function is called infinitely which can cause the browser to stop reacting on slower computers.

This doesn't seem to be `inifite loop` of error. Seems like there's an error with one of the extension npm package. I've opened new issue for that at https://github.com/elegantthemes/create-divi-extension/issues/182, let's track the issue there. cc: @lots0logs


[AIRFLOW-1939] add astronomer contributors

Make sure you have checked all steps below.
JIRA

[x] My PR addresses the following Airflow JIRA issues and references them in the PR title. For example, "[AIRFLOW-XXX] My Airflow PR"

https://issues.apache.org/jira/browse/AIRFLOW-1939

Description

[x] Here are some details about my PR, including screenshots of any UI changes:
Simple update to the readme

Tests

[x] My PR adds the following unit tests OR does not need testing for this extremely good reason:
Readme updates do not require tests

Commits

[x] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":

Subject is separated from body by a blank line
Subject is limited to 50 characters
Subject does not end with a period
Subject uses the imperative mood ("add", not "adding")
Body wraps at 72 characters
Body explains "what" and "why", not "how"

[x] Passes git diff upstream/master -u -- "*.py" | flake8 --diff

Codecov Report

Merging #2890 into master will increase coverage by 1.21%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2890      +/-   ##
==========================================
+ Coverage   73.36%   74.57%   +1.21%
==========================================
  Files         160      160
  Lines       12179    13198    +1019
==========================================
+ Hits         8935     9843     +908
- Misses       3244     3355     +111

Impacted Files
Coverage Δ

airflow/bin/cli.py
54.1% <0%> (-0.83%)
:arrow_down:

airflow/utils/log/gcs_task_handler.py
0% <0%> (ø)
:arrow_up:

airflow/configuration.py
84.97% <0%> (+0.85%)
:arrow_up:

airflow/www/app.py
96.55% <0%> (+2.29%)
:arrow_up:

airflow/models.py
90.34% <0%> (+3.36%)
:arrow_up:

airflow/utils/log/s3_task_handler.py
92.07% <0%> (+11.77%)
:arrow_up:

Continue to review full report at Codecov.

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


chore(main): release 1.1.3

:robot: I have created a release beep boop
1.1.3 (2024-07-07)
Bug Fixes

add copy merge (69c7db7)
add use mock repo (2e2af62)
update template (5929a40)
update template (0cb2a34)

This PR was generated with Release Please. See documentation.

:robot: Created releases:

v1.1.3
:sunflower:


0.84.3 breaks deployments on Cloudflare Pages

Since 0.84.3 deployments on Cloudflare Pages are broken, as far as I can tell the problem boils down to this commit:
https://github.com/gohugoio/hugo/commit/6c8c0c8b6a0b39b91de44d72a7bd1cd49534a0f1
Cloudflare Pages sets these environment variables:
cloudflare-pages-env.d451584b-3b9e-49a6-9f43-006a4ae62185.log
(generated by deploying https://github.com/HorayNarea/cloudflare-pages-env and setting the build command to ./run.sh)
As you can see, in line 74 they also set NETLIFY=true but DEPLOY_PRIME_URL is not set, so that means the cache-directory is now also set to /opt/build/cache/hugo when deploying on Cloudflare Pages which leads to a failed build as you can see in this screenshot & build log:

gecko-space.b4bd25b5-4e7e-40fd-833a-6128ca0b0e5b.log

As you can see, in line 74 they also set NETLIFY=true

Are you kidding me?


QA: "normalize" the code style rules used by this code base a little

The coding standard of this code base was historically/organically grown and is likely influenced by some internal rules which were being used in Squiz projects at one time or another.
Changing the code style to PSR12 with some extra rules (i.e. PHPCSDevCS) would cause lots and lots of code churn, so is not on the table at this time.
However, I do think there are some rules which can (and should) be changed in the near future.
On the one hand, these rules cause code churn on lines unrelated to the actual code change being made.
On the other hand, these rules catch contributors out a lot as they are contrary to what most code bases nowadays expect, making contributing to this code base more painful for new contributors than necessary.
My personal top 5 of "annoying" rules which are being enforced is:

End comments at the end of "long" control structures/functions/classes.
else if instead of elseif
No spaces around a concatenation operator.
The case/default statements in switch statements not being indented by four spaces - changing this would cause lots of code churn in the test files though.
Unnecessary blank lines at the end of each function/class.

I'm opening this issue to allow for people to voice their opinion on this.

Do the above five rules bother you or not ?
Are there other rules, not mentioned above, which catch you out often when contributing ?
Do you think the code churn caused by changing these rules and updating the code base to comply is worth it ?

I'm going to leave this ticket open for a few weeks and will decide on a course of action and timeline after that.
/cc @fredden

Do the above five rules bother you or not?

Yes, they bother me a bit. Especially items number 1, 4, and 5. I'm ok with changing items number 2 and 3 as well.

Are there other rules, not mentioned above, which catch you out often when contributing?

I'm not a fan of Squiz.Arrays.ArrayDeclaration.DoubleArrowNotAligned as it causes changes on unrelated lines and causes larger diffs. Example: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/179/files#diff-b9f974c9e5e2ca608e335ac55aa95730811bcaef7590ad41b4d59d5444f296c9R47 (only the highlighted line actually changed).

Do you think the code churn caused by changing these rules and updating the code base to comply is worth it?

I think so. Especially for rules that can be changed automatically using phpcbf. Using .git-blame-ignore-revs should help reduce the impact of the code churn.

I'm not a fan of Squiz.Arrays.ArrayDeclaration.DoubleArrowNotAligned as it causes changes on unrelated lines and causes larger diffs. Example: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/179/files#diff-b9f974c9e5e2ca608e335ac55aa95730811bcaef7590ad41b4d59d5444f296c9R47 (only the highlighted line actually changed).

The protip for reviewing code like this is to turn on the hide whitespace option (props to Juliette for mentioning this to me 😄 )

Another one to add to the "catches me out/contrary to industry standard" list:

No spaces around the = sign for parameters with default values.

One for a later point in time once there is a sniff available which can enforce this:

Only require the arrows in the innermost array to be aligned for nested arrays.

I've just opened PR #225 for yet another annoyance, but one which is serious enough that it decreases productivity. See the PR description for the reasoning.

Suggested by @fredden :

consider adding Squiz.Commenting.FunctionComment.ParamCommentNotCapital to phpcs.xml.dist


Updating the Openscapes hub

Updating our Python and R images, we already tested them on staging. The full Conda environment is attached for future reference.
Export Full Conda Environment.txt

@betolink do you want to keep the automatic updater in place, or would you prefer the manual setup so you have better control?


Changing how sbt is installed since bintray is no longer available.

Pull request for #93 to address sbt not being available via bintray.

This is now fixed in commit 08ac90f140930752bc5fbd393446ad2878f75e77


API for consume/dispatch actions from third-party applications

Is your feature request related to a problem? Please describe.
Not a problem. is possible to dispose of a simple API to consume in order to dispatch actions from third-party applications, actions like:

get current song title that's playing
get the current playlist that's playing
play a specific song of current the playlist
go to next/previous song of the current playlist

Describe the solution you'd like
This would work sending commands to any existent instance of spotify-player running.
I would like to write a neovim plugin to control spotify-player while coding, as a widget of spotify-player for neovim, but it needs an API exposed.
E.g.
spotify_player --cmd="get-playlist"
spotify_player --cmd="play-song id"

I'm not sure if I can do this by using the service that spotify_player is using in background.
I don't know if that will get sync with spotify_player either (without hit an API for auth, etc)
I would like to get this idea working hand to hand with spotify_player, that I think is an app with a great future ahead.
Sounds crazy?

Hi @diegoulloao, thanks for creating this issue. Actually, I have a plan to create a similar one as I've got some related requests regarding external APIs to communicate with the app.
Related issues:

https://github.com/aome510/spotify-player/issues/103

Sounds crazy?

I thought about implementing the same thing before. I don't think it's impossible. I'll try and see xD.

Yes, excellent. LMK if you try something, you can start with simple actions to test. In parallel I can start building the bases for the neovim/plugin widget if something comes out.


resize: Move handler to new resize_handler module

(60, 26) → (59, 25). Discussion.

Looks great!


[protopuf] Update to v3.0.0

[x] Changes comply with the maintainer guide.
[x] SHA512s are updated for each updated download.
[ ] ~The "supports" clause reflects platforms that may be fixed by this new version.~
[ ] ~Any fixed CI baseline entries are removed from that file.~
[ ] ~Any patches that are no longer applied are deleted from the port's directory.~
[x] The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
[x] Only one version is added to each modified port's versions file.

Fixed. Thank you! @Cheney-W

Thanks!


Can work on issue_comment events as "trigger phrase"

Support a feature like "trigger phrase" of GitHubPullRequestBuilder on GitHub Actions.
name: Meta Check
on:
  pull_request:
  issue_comment:
    types: [created, edited]

jobs:
  meta-check:
    # NOTE: Check every push to pull requests and re-check if "meta-check" commented to pull requests.
    if: github.event.pull_request || (github.event.comment && contains(github.event.comment.body, 'meta-check'))
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses<EMAIL_ADDRESS>        with:
          enable_pr_comment: true
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

This cannot work on issue_comment event because checkout for issue_comment cannot work...


Search for results with max and min value

For example, if I enter 500 and a entry has a max value of 600 and a minimum value of 100, the entry shows. Whereas if I enter a value of 50 or 650, the entry does not show.
How can I implement this with list.js?

Check out this example: http://codepen.io/javve/pen/wKGKWL

Thanks :)
Sent from my iPhone

On 16 Sep 2015, at 21:38, Jonny Strömberg<EMAIL_ADDRESS>wrote:
Check out this example: http://codepen.io/javve/pen/wKGKWL
—
Reply to this email directly or view it on GitHub.


metadata: Use helper to determine iface state

Use a function helper to determine if the interface state destine its
removal.
Depends on #764

Coverage increased (+0.1%) to 66.019% when pulling 7aee0c21ba502b96bd6d54e204c1a97d8d1e9b14 on EdDev:metadata-state-helper into 7b0f97dc461407e1565323e66e8d55f6e359ed2d on nmstate:master.

Coverage increased (+0.1%) to 66.019% when pulling 7aee0c21ba502b96bd6d54e204c1a97d8d1e9b14 on EdDev:metadata-state-helper into 7b0f97dc461407e1565323e66e8d55f6e359ed2d on nmstate:master.


Nest.js example: exported html issue

After exporting the next.js example to static HTML, I'm unable to open the dialog when clicking on "Super Secret Password" button.
Expected Behavior
Clicking on "Super Secret Password" button the dialog should open
Current Behavior
Nothing happens
Steps to Reproduce (for bugs)

Create next.config.js file in the root folder with the following content:

// next.config.js
module.exports = {
  exportPathMap: function() {
    return {
      '/': { page: '/' },
    }
  }
}

add the following line in package.json:

...
"export": "next export"
...

run
npm run build && npm run export

open the generated index.html and click the "Super Secret Password" button

Context
I'd like to generate a static html to be deployed on github. I'm new to React.js, Next.js and Material-UI so maybe i'm doing something wrong
My Environment

Tech
Version

Material-UI
v1-beta

React
16.2.0

Next.js
5.0.0

browser
Chrome

@redirect11 The solution: you need to make sure the JS assets are loaded correctly. You need the client side reconciliation to get the dialog to open. Open your console and check the warnings.


Time zone for 'received'

I am wondering if local time or UTC is used when we supply a query like:
received>=2021-01-01 AND received<=2021-12-31
Would it be my PowerShell's local time, the Exchange server's local time, or UTC?
Thanks in advance.

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

ID: e83b77e5-e3ec-6a5f-1f09-e232e2dda483
Version Independent ID: 0b263c72-95a2-d111-20a7-68857f288369
Content: Keyword queries and search conditions for eDiscovery - Microsoft 365 Compliance
Content Source: microsoft-365/compliance/keyword-queries-and-search-conditions.md
Service: o365-seccomp
GitHub Login: @markjjo
Microsoft Alias: markjjo

Sorry, but found the answer that quick (should have searched first):
https://docs.microsoft.com/en-us/sharepoint/dev/general-development/keyword-query-language-kql-syntax-reference#date-or-time-values-for-properties


fix handle overflow of memory stat if load failed (#39621)

Proposed changes
Issue Number: close #xxx

run buildall


play button not displayed with preload="none"

hi
i am trying to use your player with <audio preload="none">
preload="none" causes that play button never shows because of loading spinner
it seems that calling
this.hideLoadingIndicator();
in GreenAudioPlayer object constructor resolves this issue
also i have question if could be possible to play mp3 file which is splited into chunks

@tyctor fixed in version 1.1.1, thanks to a contribution from @tnbnicer !


How to enable effects?

Question
I tried to get the effects bar at the bottom of the widget to work but somehow it never shows up?! What am I doing wrong?
Here is my widget:
<Widget
  publicKey={process.env.NEXT_PUBLIC_UPLOADCARE_PUBLIC_KEY}
  id="file"
  tabs="file url gdrive gphotos dropbox instagram"
  multipleMax="1"
  previewStep={true}
  clearable={false}
  imagesOnly={true}
  multiple={false}
  effects={[ "crop", "enhance",   "sharp", "blur", "flip","rotate", "mirror" ]}
</Widget>

I also tried it with effects="crop,enhance,sharp" but it also did not work.
This is what I see:

Thank you!

The type of the effects attribute must be a string. For example,
effects="crop,enhance,sharp"
Also, you need to import uploadcare-widget-tab-effects.
import React from "react";
import ReactDOM from "react-dom";
import { Widget } from "@uploadcare/react-widget";
import Effects from "uploadcare-widget-tab-effects";

import "./styles.css";

function App() {
  return (
    <div className="App">
      <Widget
        publicKey="demopublickey"
        effects="crop,blur,sharp,grayscale,enhance,flip,rotate"
        customTabs={{ preview: Effects }}
      />
    </div>
  );
}

const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);

Awesome, it works! Thank you for the fast reply.


Generate link to verify email during registration

As a system
I want to send a verification link
So that the user's email address can be verified during registration
Scenario: Generate email verification link
Given the user is on the registration page
When the user enters an email address
And clicks on the "Register" button
Then the user should receive an email with a verification link
Scenario: Verify email using the verification link
Given the user received an email with a verification link
When the user clicks on the link in the email
Then the user should be redirected to the verification page
And the verification page should display a success message
And the user's email should be marked as verified in the system

And the email should be sent from<EMAIL_ADDRESS>And the email subject should contain "Email Verification"
And the email body should contain a link starting with "https://example.com/verify?token="
should we specify such details?

Task #376


ufw ipv6 support

I tried to install ufw on the image created with version V01.03.01
when you enable the firewall with
sudo ufw enable
ERROR: problem running ufw-init
ip6tables-restore v1.8.7 (nf_tables): Couldn't load match `rt ': No such file or directory

Error occurred at line: 24
Try `ip6tables-restore -h 'or' ip6tables-restore --help 'for more information.

Problem running '/etc/ufw/before6.rules'

I then ran
sudo check-requirements
under ./usr/share/ufw/
and all tests report problems on the ipv6 part
anyone have any suggestions?
Note:
same isssue wuth release v01.02.02
if i disabled the ipv6, all is OK

You likely need to configure some extra kernel features for IPv6. Does the report tell more about what is missing?

Please answer my question and re-open if still relevant.


Difference between npm installed project and cloned github project?

When pulling down the project from npmjs.org it includes one gulp file 'demo-gulpfile.js' but the git clone includes 3 gulp files one being 'gulpfile.js' (which I would expect to see normally).
Which one should I be using when starting a new project? and is there a way to pull down a project that only contains the files necessary for a project using gulp without the demo site?

You should install project with npm install sc5-styleguide. The NPM contain only files that are necessary to make the style guide work. The demo site is actually generated from the style guide styles that are needed for the UI so there isn't separate demo site inside the package. It's true that demo-gulpfile.js is not needed in the production use but all other files are.

Thanks.


Puppet 6 issue : undefined method `to_i' for :absent:symbol

Describe the bug
With non-local users, on Puppet 6 the custom fact for filtering non-local users crashes.
Expected behavior
It should be working fine, and filter out non-local users
Actual behavior
Error: Facter: error while resolving custom facts in /tmp-packer/puppet/module-0/os_hardening/lib/facter/retrieve_system_users.rb: undefined method `to_i' for :absent:symbol

OS / Environment
Ubuntu 18.04
Puppet Version
6.2.0

@mvisonneau My Puppet Server is now also on v6, and still I cannot reproduce this. Could you please paste in your /etc/passwd file?

@mvisonneau Any news here?


Error parsing documentation for rubocop-0.69.0

Installing rubocop fails due to error while parsing the documentation. This began to fail for me yesterday, which lines up with the 0.69.0 release.
The error is as follows:
Parsing documentation for rubocop-0.69.0

RDoc::Parser::Ruby failure around line 16 of
lib/rubocop/cop/generator.rb

Before reporting this, could you check that the file you're documenting
has proper syntax:

  /usr/bin/ruby2.3 -c lib/rubocop/cop/generator.rb

RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.

The internal error was:

	(NoMethodError) undefined method `name' for {TkSTRING 481, 16:19 "%Q<department>"}:RDoc::RubyToken::TkSTRING

ERROR:  While executing gem ... (NoMethodError)
    undefined method `name' for {TkSTRING 481, 16:19 "%Q<department>"}:RDoc::RubyToken::TkSTRING

Expected behavior
Installing rubocop succeeds.
Actual behavior
Installing rubocop fails.
Steps to reproduce the problem
Here's an easy way to reproduce this:
docker run --rm -ti ubuntu:16.04 bash -c 'apt-get update && apt-get install -y gcc make ruby-dev && gem install rubocop'

RuboCop version
0.69.0 (using Parser <IP_ADDRESS>, running on ruby 2.3.1 x86_64-linux-gnu)

NOTE: as a workaround, I'm currently using gem install --no-rdoc --no-ri rubocop

Also note that this is only an issue on Ubuntu 16.04 (ruby version ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]) but not on Ubuntu 18.04 (ruby version: ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu])
In other words, this works:
docker run --rm -ti ubuntu:18.04 bash -c 'apt-get update && apt-get install -y gcc make ruby-dev && gem install rubocop'```

Possibly related to this commit - https://github.com/rubocop-hq/rubocop/pull/7026/commits/05f25f30935b032650924e89ae336572df6998d6

I confirmed that and I opened a PR #7047.


Does not support text

@bhagyas Can you elaborate? Are you referring to text being scalable...in which case, are you using Sketch 48 that introduces scalable symbols?

Yes. The text don't get scaled when included in the icon images.
On 47, not 48.

Yep, I'd recommend updating to 48. In previous versions of Sketch, you'll need to outline the text (Cmd + Shift + O) and flatten any artwork contained in the symbol.

Yes,  I guess that should work, thank you.


Merge latest from lyft-release-sp8

feat: Scheduling queries from SQL Lab
feat: view presto row objects in data grid (apache#7436)

👍

Codecov Report

Merging #27 into lyft-master will decrease coverage by 0.02%.
The diff coverage is 52%.

@@               Coverage Diff               @@
##           lyft-master      #27      +/-   ##
===============================================
- Coverage        64.02%   63.99%   -0.03%
===============================================
  Files              438      439       +1
  Lines            21602    21671      +69
  Branches          2394     2399       +5
===============================================
+ Hits             13830    13868      +38
- Misses            7634     7665      +31
  Partials           138      138

Impacted Files
Coverage Δ

...src/components/FilterableTable/FilterableTable.jsx
91.01% <ø> (ø)
:arrow_up:

.../assets/src/SqlLab/components/QueryAutoRefresh.jsx
11.9% <0%> (-0.92%)
:arrow_down:

superset/views/sql_lab.py
94.64% <100%> (ø)
:arrow_up:

superset/assets/src/featureFlags.ts
88.88% <100%> (+13.88%)
:arrow_up:

...sets/src/SqlLab/components/ScheduleQueryButton.jsx
13.33% <13.33%> (ø)

...uperset/assets/src/SqlLab/components/SqlEditor.jsx
59.8% <50%> (-0.2%)
:arrow_down:

superset/db_engine_specs.py
61.45% <86.11%> (+1.22%)
:arrow_up:

Continue to review full report at Codecov.

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


More minification (API Info and JavaScript)

Includes the following changes:

Remove the redundant JRES from the cached API info; this shrinks target.js in minecraft back to its pre-api-cache size
Minify ALL production JavaScript instead of just main.js (speeds up load by about ~5 seconds in Chrome with fast 3g network throttling)
Stop pretty printing built target files for no reason in production builds

pxt staticpkg has a minify option. Should process.env["PXT_ENV"] be set to production when minify is enabled in pxt staticpkg?


Docs for newEventWithTrigger. Addresses #3

Just some docs I applied from stuff you've said in irc, @ryantrinkle .

In case @ryantrinkle misses this otherwise, the typo got fixed. (I'll never understand why github doesn't send notifications for new commits on pull requests)

Ah, yes - I assumed it would. Thanks :)

Merged to develop; thanks!


Add Juniper vQFX!?

Seems like this is pre-release so got to ask someone for the image!

Closing in preference of #102 where we've already discussed a bit more.


Ret 2078. ET3 response received alert in citizen hub.

https://tools.hmcts.net/jira/browse/RET-2078
Add banner to citizen hub once et3 response has been received.
Does this PR introduce a breaking change? (check one with "x")
[ ] Yes
[x] No

Closed as 2078 will be merged as part of  2070.


Releases

Latest release is 1 year old.
Latest commit is 1 month old.
Examples don't event work with latest release.

Updated, examples should work now (please see https://github.com/justinmanley/leaflet-draw-toolbar).