Reuse frontmatter parser in classifier

While looking at #4691 , I noticed that the code in classifier.go does some ad-hoc parsing for HTML vs other content.
Given that a page without frontmatter can't be usefully parsed, it seemed more straightforward to reuse the frontmatter parser to determine whether the HTML file was content or a plain file.
Unfortunately, it turns out that TestSectionNaming has some HTML documents that are just strings without frontmatter, so I ended up needing to adjust those tests.
I'm wondering whether it makes sense to apply this "has frontmatter" test universally in ClassifyContentFile; it appears that doing so would need updates in the following tests from hugolib:
TestCascade
TestContentMap
TestRenderStringOnListPage
TestSiteBuildErrors
TestShortCodesInSite
TestSectionNaming
TestRefLinking
TestCrossrefs
TestDataFromShortcode

Thanks for this, and while I  agree that this in general looks like a good thing, one quick note: The reason I implemented this buffered "quick detector" for pure HTML files was to avoid having to read the entire file into memory.
We have some benchmarks that usually shows these issues named "BenchmarkSiteNew/*" (or something).
One tip would to have a look at this tool: https://github.com/bep/gobench
Not much documentation, but look at the hugobench -h output.

Note that I don't think we use HTML files in the above mentioned benchmarks, though.

Or, as it is for HTML only, maybe it doesn't matter too much the memory overhead...

I changed BenchmarkSiteNew to use HTML files for most of the content instead of markdown.
The result is around a 8% increase in allocations and somewhere between 1% and 17% on CPU time (17% for "edit" case, 1% for "regular" case).
I can work on splitting ParseFrontMatterAndContent into a ParseFrontMatter which reads from the file more carefully until Iterator.Input() is called.
I'm also in the process of rerunning the benchmark to see if I can get more stable results; I suspect I'm thermal throttling on my laptop so I may have to switch to another machine.
 go version go1.13.5 darwin/amd64

goos: darwin
goarch: amd64
pkg: github.com/gohugoio/hugo/hugolib
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      30	  42251521 ns/op	26922799 B/op	  255512 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      33	  34802199 ns/op	26947088 B/op	  255513 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      34	  34643581 ns/op	26916856 B/op	  255498 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      32	  33918035 ns/op	26933820 B/op	  255511 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      22	  48963396 ns/op	32867477 B/op	  320103 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      22	  50271350 ns/op	32937488 B/op	  320113 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      22	  51166796 ns/op	32900642 B/op	  320124 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      22	  61399388 ns/op	32884646 B/op	  320115 allocs/op
PASS
ok  	github.com/gohugoio/hugo/hugolib	21.834s
Switched to branch 'classier'
Your branch and 'upstream/master' have diverged,
and have 3 and 1 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)

 go version go1.13.5 darwin/amd64

goos: darwin
goarch: amd64
pkg: github.com/gohugoio/hugo/hugolib
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      22	  48980276 ns/op	28580883 B/op	  275674 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      28	  38236375 ns/op	28590353 B/op	  275676 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      30	  40761404 ns/op	28575465 B/op	  275661 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      31	  39999467 ns/op	28566667 B/op	  275663 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      20	  54808500 ns/op	34561612 B/op	  340271 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      20	  54804296 ns/op	34575206 B/op	  340281 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      19	  55202866 ns/op	34568818 B/op	  340272 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      20	  54575961 ns/op	34559677 B/op	  340273 allocs/op
PASS
ok  	github.com/gohugoio/hugo/hugolib	17.227s

name                                 old time/op    new time/op    delta
SiteNew/Edit_Deep_content_tree-8       36.4ms ±16%    42.0ms ±17%    ~     (p=0.200 n=4+4)
SiteNew/Regular_Deep_content_tree-8    53.0ms ±16%    54.8ms ± 1%    ~     (p=0.343 n=4+4)

name                                 old alloc/op   new alloc/op   delta
SiteNew/Edit_Deep_content_tree-8       26.9MB ± 0%    28.6MB ± 0%  +6.12%  (p=0.029 n=4+4)
SiteNew/Regular_Deep_content_tree-8    32.9MB ± 0%    34.6MB ± 0%  +5.07%  (p=0.029 n=4+4)

name                                 old allocs/op  new allocs/op  delta
SiteNew/Edit_Deep_content_tree-8         256k ± 0%      276k ± 0%  +7.89%  (p=0.029 n=4+4)
SiteNew/Regular_Deep_content_tree-8      320k ± 0%      340k ± 0%  +6.30%  (p=0.029 n=4+4)

Here are --count=10 results, which show around a 6% increase in CPU time for the "edit" case and 0% for the "regular" case, along with the same memory allocation deltas as before.
Benchmark and compare branch "clean" and "classier".
Switched to branch 'clean'
Your branch and 'upstream/master' have diverged,
and have 1 and 1 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)

 go version go1.13.5 darwin/amd64

goos: darwin
goarch: amd64
pkg: github.com/gohugoio/hugo/hugolib
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      31	  38821229 ns/op	26933989 B/op	  255510 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      31	  34190873 ns/op	26924626 B/op	  255505 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      27	  37272635 ns/op	26933585 B/op	  255508 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      32	  36690488 ns/op	26936151 B/op	  255506 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      32	  36147433 ns/op	26927754 B/op	  255517 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      30	  37170453 ns/op	26934790 B/op	  255517 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      32	  36515062 ns/op	26930886 B/op	  255515 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      32	  39681874 ns/op	26935943 B/op	  255515 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      31	  40256163 ns/op	26929189 B/op	  255510 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      31	  42475208 ns/op	26937511 B/op	  255514 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      22	  51928399 ns/op	32880291 B/op	  320115 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      22	  59874902 ns/op	32886961 B/op	  320116 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      22	  53097418 ns/op	32931261 B/op	  320117 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      20	  58198183 ns/op	32929927 B/op	  320119 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      19	  60903281 ns/op	32950847 B/op	  320113 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      21	  52178128 ns/op	32950346 B/op	  320115 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      21	  54204179 ns/op	32889567 B/op	  320099 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      22	  54095487 ns/op	32922389 B/op	  320122 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      21	  54844351 ns/op	32923675 B/op	  320120 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      22	  52709922 ns/op	32961530 B/op	  320119 allocs/op
PASS
ok  	github.com/gohugoio/hugo/hugolib	53.162s
Switched to branch 'classier'
Your branch and 'upstream/master' have diverged,
and have 3 and 1 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)

 go version go1.13.5 darwin/amd64

goos: darwin
goarch: amd64
pkg: github.com/gohugoio/hugo/hugolib
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      26	  40784890 ns/op	28583137 B/op	  275675 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      33	  40689480 ns/op	28577316 B/op	  275674 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      31	  42765048 ns/op	28566673 B/op	  275664 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      28	  40516672 ns/op	28575105 B/op	  275666 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      28	  39034358 ns/op	28574294 B/op	  275664 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      25	  40743277 ns/op	28570709 B/op	  275675 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      26	  40784004 ns/op	28589587 B/op	  275674 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      27	  38129513 ns/op	28566417 B/op	  275663 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      30	  42182210 ns/op	28573935 B/op	  275665 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      28	  38228966 ns/op	28592859 B/op	  275670 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      21	  54590331 ns/op	34566702 B/op	  340271 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      20	  54788696 ns/op	34591464 B/op	  340278 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      19	  55449936 ns/op	34562114 B/op	  340279 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      20	  58160737 ns/op	34541733 B/op	  340265 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      19	  57530338 ns/op	34624665 B/op	  340277 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      20	  54563267 ns/op	34647628 B/op	  340284 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      20	  52997614 ns/op	34585548 B/op	  340276 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      19	  54799260 ns/op	34552685 B/op	  340272 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      19	  57230261 ns/op	34590016 B/op	  340271 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      19	  57058014 ns/op	34571560 B/op	  340278 allocs/op
PASS
ok  	github.com/gohugoio/hugo/hugolib	43.979s

name                                 old time/op    new time/op    delta
SiteNew/Edit_Deep_content_tree-8       37.9ms ±12%    40.4ms ± 6%  +6.50%  (p=0.011 n=10+10)
SiteNew/Regular_Deep_content_tree-8    55.2ms ±10%    55.7ms ± 5%    ~     (p=0.393 n=10+10)

name                                 old alloc/op   new alloc/op   delta
SiteNew/Edit_Deep_content_tree-8       26.9MB ± 0%    28.6MB ± 0%  +6.11%  (p=0.000 n=10+10)
SiteNew/Regular_Deep_content_tree-8    32.9MB ± 0%    34.6MB ± 0%  +5.02%  (p=0.000 n=10+9)

name                                 old allocs/op  new allocs/op  delta
SiteNew/Edit_Deep_content_tree-8         256k ± 0%      276k ± 0%  +7.89%  (p=0.000 n=10+10)
SiteNew/Regular_Deep_content_tree-8      320k ± 0%      340k ± 0%  +6.30%  (p=0.000 n=9+10)

FWIW, applying the frontmatter check to all files leads to similar build times and +8%-9% allocations.

I suspect I'm thermal throttling on my laptop so I may have to switch to another machine.

Not sure what OS you are on, but my golden tip on MacOS is to install Turbo Boost Switcher -- and turn that off when running benchmarks.
My instinct tells me that:

For sites that use mostly HTML content files (with front matter), the penalty here will be significant. I think you need to increase the HTML file size in the benchmarks to make it more real.
A fix would be to somehow make the parser buffered, but that would mean a rewrite, which I'm not sure is the topic of this particular issue.

Trying again with larger HTML does reveal a 10-15% difference in CPU time with much larger HTML files (which is probably more realistic -- see https://github.com/gohugoio/hugo/pull/7088/commits/95b9ef9b510ecb3668362ade97cd00e4313e84a4 and https://github.com/gohugoio/hugo/pull/7088/commits/9c034df72f83eccda3979b8f94527fd258424737 for the changes.
Would you like me to commit at least https://github.com/gohugoio/hugo/pull/7088/commits/95b9ef9b510ecb3668362ade97cd00e4313e84a4 (separately) to have HTML files in the benchmark?
$ gobench -package=./hugolib -bench="BenchmarkSiteNew/Deep_content_tree" -base clean -count 10
Benchmark and compare branch "clean" and "classier".
Switched to branch 'clean'
Your branch and 'upstream/master' have diverged,
and have 2 and 1 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)

 go version go1.13.5 darwin/amd64

goos: darwin
goarch: amd64
pkg: github.com/gohugoio/hugo/hugolib
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      14	  98541868 ns/op	50233599 B/op	  349514 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      15	  74769839 ns/op	50239447 B/op	  349495 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      14	  78039988 ns/op	50231674 B/op	  349492 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      14	  79725531 ns/op	50256285 B/op	  349498 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      15	  70621619 ns/op	50208484 B/op	  349505 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      16	  78064357 ns/op	50231592 B/op	  349487 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      18	  82328296 ns/op	50194910 B/op	  349490 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      14	  80069058 ns/op	50248842 B/op	  349496 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      14	  73815900 ns/op	50216518 B/op	  349504 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      14	  81175073 ns/op	50241414 B/op	  349500 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      12	  98702417 ns/op	64321724 B/op	  415436 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      12	  93257931 ns/op	64351320 B/op	  415418 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      12	  96247710 ns/op	64340197 B/op	  415418 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      12	  91141394 ns/op	64289131 B/op	  415409 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      12	  92614521 ns/op	64348725 B/op	  415436 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      12	  93837764 ns/op	64306518 B/op	  415414 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      12	  95883651 ns/op	64349421 B/op	  415415 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      12	  96928766 ns/op	64345728 B/op	  415432 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      12	  92704936 ns/op	64307549 B/op	  415431 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      12	  90979902 ns/op	64307488 B/op	  415427 allocs/op
PASS
ok  	github.com/gohugoio/hugo/hugolib	57.664s
Switched to branch 'classier'
Your branch and 'upstream/master' have diverged,
and have 4 and 1 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)

 go version go1.13.5 darwin/amd64

goos: darwin
goarch: amd64
pkg: github.com/gohugoio/hugo/hugolib
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      12	 100225984 ns/op	62714252 B/op	  384514 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      14	  83270607 ns/op	62709312 B/op	  384496 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      13	  80275202 ns/op	62742745 B/op	  384495 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      13	  90625646 ns/op	62719070 B/op	  384504 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      13	  83803064 ns/op	62704004 B/op	  384490 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      13	  79374122 ns/op	62756000 B/op	  384498 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      13	  77768385 ns/op	62738168 B/op	  384486 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      13	  83671371 ns/op	62784828 B/op	  384504 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      13	  90531701 ns/op	62752741 B/op	  384479 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      12	  84060268 ns/op	62723508 B/op	  384494 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      10	 110616452 ns/op	76831396 B/op	  450431 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      10	 109269633 ns/op	76868226 B/op	  450432 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      10	 105963661 ns/op	76884440 B/op	  450451 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      10	 104363979 ns/op	76863216 B/op	  450428 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      10	 105875770 ns/op	76948133 B/op	  450449 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      10	 110638124 ns/op	76927885 B/op	  450446 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      10	 110512414 ns/op	76875922 B/op	  450448 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      10	 108193378 ns/op	76869274 B/op	  450440 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      10	 105768744 ns/op	76926130 B/op	  450438 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	       9	 113038536 ns/op	76943137 B/op	  450433 allocs/op
PASS
ok  	github.com/gohugoio/hugo/hugolib	49.239s

name                                 old time/op    new time/op    delta
SiteNew/Edit_Deep_content_tree-8       77.6ms ± 9%    85.4ms ±17%   +9.97%  (p=0.006 n=9+10)
SiteNew/Regular_Deep_content_tree-8    94.2ms ± 5%   108.4ms ± 4%  +15.06%  (p=0.000 n=10+10)

name                                 old alloc/op   new alloc/op   delta
SiteNew/Edit_Deep_content_tree-8       50.2MB ± 0%    62.7MB ± 0%  +24.89%  (p=0.000 n=10+10)
SiteNew/Regular_Deep_content_tree-8    64.3MB ± 0%    76.9MB ± 0%  +19.54%  (p=0.000 n=10+10)

name                                 old allocs/op  new allocs/op  delta
SiteNew/Edit_Deep_content_tree-8         349k ± 0%      384k ± 0%  +10.01%  (p=0.000 n=10+10)
SiteNew/Regular_Deep_content_tree-8      415k ± 0%      450k ± 0%   +8.43%  (p=0.000 n=10+10)

It isn't so much the runtime that is the problem in this case, but the memory allocation:

The numbers above aren't surprising, but we need a pretty good reason to go with this -- even if it is only for a small sub set of Hugo sites out there.

I've been able to reduce the allocated memory substantially by pre-allocating the buffer in parseSection rather than using ioutil.ReadAll, which uses bytes.Buffer with no pre-allocation. (Note that bytes.Buffer will always .grow() at least once, even if it's big enough to read the entire content.)
I see wild variations in CPU time such that I don't actually believe the p values from benchstat. Here's one run, however:
Benchmark and compare branch "clean" and "classier".
Switched to branch 'clean'
Your branch and 'upstream/master' have diverged,
and have 2 and 2 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)

 go version go1.13.5 darwin/amd64

goos: darwin
goarch: amd64
pkg: github.com/gohugoio/hugo/hugolib
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      13	 100847547 ns/op	50265277 B/op	  349512 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      14	  92521729 ns/op	50222924 B/op	  349510 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      15	  78965677 ns/op	50234167 B/op	  349495 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      13	  83444301 ns/op	50283592 B/op	  349504 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      13	  90895748 ns/op	50245435 B/op	  349507 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      14	  84128448 ns/op	50231322 B/op	  349500 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      12	 102142978 ns/op	64275498 B/op	  415423 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      12	  95517969 ns/op	64341695 B/op	  415428 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      12	  95692548 ns/op	64315472 B/op	  415414 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      12	  95604914 ns/op	64327500 B/op	  415433 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      12	  99251895 ns/op	64296370 B/op	  415431 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      12	  95493381 ns/op	64326314 B/op	  415423 allocs/op
PASS
ok  	github.com/gohugoio/hugo/hugolib	27.832s
Switched to branch 'classier'
Your branch and 'upstream/master' have diverged,
and have 6 and 2 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)

 go version go1.13.5 darwin/amd64

goos: darwin
goarch: amd64
pkg: github.com/gohugoio/hugo/hugolib
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      12	  94980863 ns/op	48415918 B/op	  380248 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      13	  95400138 ns/op	48399095 B/op	  380235 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      14	  85350863 ns/op	48437783 B/op	  380223 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      13	  81347619 ns/op	48405072 B/op	  380207 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      13	  94719896 ns/op	48387639 B/op	  380232 allocs/op
BenchmarkSiteNew/Edit_Deep_content_tree-8         	      14	  81889018 ns/op	48379697 B/op	  380222 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      10	 106359458 ns/op	62547449 B/op	  446151 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      10	 104374082 ns/op	62510941 B/op	  446160 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      10	 102857217 ns/op	62530656 B/op	  446160 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      10	 107853963 ns/op	62538294 B/op	  446142 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      10	 104632485 ns/op	62526080 B/op	  446152 allocs/op
BenchmarkSiteNew/Regular_Deep_content_tree-8      	      10	 109770034 ns/op	62582497 B/op	  446153 allocs/op
PASS
ok  	github.com/gohugoio/hugo/hugolib	29.433s

name                                 old time/op    new time/op    delta
SiteNew/Edit_Deep_content_tree-8       88.5ms ±14%    88.9ms ± 9%    ~     (p=0.818 n=6+6)
SiteNew/Regular_Deep_content_tree-8    97.3ms ± 5%   106.0ms ± 4%  +8.93%  (p=0.002 n=6+6)

name                                 old alloc/op   new alloc/op   delta
SiteNew/Edit_Deep_content_tree-8       50.2MB ± 0%    48.4MB ± 0%  -3.67%  (p=0.002 n=6+6)
SiteNew/Regular_Deep_content_tree-8    64.3MB ± 0%    62.5MB ± 0%  -2.76%  (p=0.002 n=6+6)

name                                 old allocs/op  new allocs/op  delta
SiteNew/Edit_Deep_content_tree-8         350k ± 0%      380k ± 0%  +8.79%  (p=0.002 n=6+6)
SiteNew/Regular_Deep_content_tree-8      415k ± 0%      446k ± 0%  +7.40%  (p=0.002 n=6+6)

I also played around a bit with converting the lexer to perform partial parsing by replacing run with a step method and calling it appropriately in pageparser, along with a method to simply read the FrontMatter. Unfortunately, that didn't seem to have any effect on outcomes.

Playing around a bit more with single-step and 10-step lexing vs running everything in a batch, it appears that (at least on my Mac with turbo boost disabled), there's too much noise in the CPU time to make much of a statement about impact, surprisingly:
Results for go test -run=NONE -bench BenchmarkSiteNew/Deep_content_tree -test.benchmem=true ./hugolib -count 6 -benchtime=10s across 4 branches:

Head with 95b9ef9 and 4adb172 ("clean")
This PR
This PR plus adding pageparser.ParseFrontMatter with an incremental pageLexer.step method
The ParseFrontMatter PR with a batch size of 10 on pageLexer.step

name \ time/op                       clean        PR           FrontMatter  FrontMatter-batch10
SiteNew/Edit_Deep_content_tree-8      126ms ±11%   111ms ±22%   118ms ±15%           120ms ±26%
SiteNew/Regular_Deep_content_tree-8   121ms ±25%   114ms ± 8%   128ms ±23%           118ms ±15%

name \ alloc/op                      clean        PR           FrontMatter  FrontMatter-batch10
SiteNew/Edit_Deep_content_tree-8     50.2MB ± 0%  48.3MB ± 0%  48.3MB ± 0%          48.3MB ± 0%
SiteNew/Regular_Deep_content_tree-8  64.1MB ± 0%  62.3MB ± 0%  62.3MB ± 0%          62.3MB ± 0%

name \ allocs/op                     clean        PR           FrontMatter  FrontMatter-batch10
SiteNew/Edit_Deep_content_tree-8       349k ± 0%    380k ± 0%    380k ± 0%            380k ± 0%
SiteNew/Regular_Deep_content_tree-8    415k ± 0%    446k ± 0%    446k ± 0%            446k ± 0%

I'm a bit surprised at the variance in execution time, but it's been consistent on all my testing.

Note that according to the above benchmarks, this is now -3% memory allocated, though +8% allocation calls, and the time delta is within the (broad) error bounds.

@bep
Should I abandon this, including the -3% memory usage? Should I do just the memory usage change?
In working on #4691, I discovered that I need to check non-HTML files for frontmatter as well. My current (working) tree re-uses the frontmatter parser here, which would be my preference, but I can implement a simplified frontmatter checker for other formats as well if that would be your preference.


PDK path error

I have installed pdk in a specific directory and I export it as $PDK_ROOT. However, when I run make verify-.. test scenario, I get /opt/pdk/sky130A not found, please install pdk before running make. error. I changed the PDK_ROOT path, where in wb-port's Makefile, to absolute path and run make verify-wb_port. Yet, there was another error occured like below lines.
Include file libs.ref/sky130_fd_sc_hd/verilog/primitives.v not found
No top level modules, and no -s option.

 As i am not sure as this command will run inside docker it can understand ~  location
Here is My Run log file for your reference
docker run -v /home/dinesha/workarea/opencore/git/riscduino_sram:/home/dinesha/workarea/opencore/git/riscduino_sram -v /opt/pdk/sky130A:/opt/pdk/sky130A \
                -v /home/dinesha/workarea/efabless/MPW-4/caravel:/home/dinesha/workarea/efabless/MPW-4/caravel \
                -e TARGET_PATH=/home/dinesha/workarea/opencore/git/riscduino_sram -e PDK_PATH=/opt/pdk/sky130A \
                -e CARAVEL_ROOT=/home/dinesha/workarea/efabless/MPW-4/caravel \
                -u : dineshannayya/dv_setup:mpw5 \
                sh -c "cd /home/dinesha/workarea/opencore/git/riscduino_sram/verilog/dv/wb_port && export SIM=RTL DUMP=OFF && make"
riscv64-unknown-elf-gcc -I /home/dinesha/workarea/efabless/MPW-4/caravel -march=rv32imc -mabi=ilp32 -Wl,-Bstatic,-T,/home/dinesha/workarea/efabless/MPW-4/caravel/verilog/dv/caravel/sections.lds,--strip-debug -ffreestanding -nostdlib -o wb_port.elf /home/dinesha/workarea/efabless/MPW-4/caravel/verilog/dv/caravel/start.s wb_port.c
riscv64-unknown-elf-objcopy -O verilog wb_port.elf wb_port.hex
# to fix flash base address
sed -i 's/@10000000/@00000000/g' wb_port.hex
iverilog -g2005-sv -DFUNCTIONAL -DSIM -I /opt/pdk/sky130A \
-I /home/dinesha/workarea/efabless/MPW-4/caravel/verilog/dv/caravel -I /home/dinesha/workarea/efabless/MPW-4/caravel/verilog/rtl \
-I ../    -I ../../../verilog/rtl -I ../../../verilog \
-I ../../../verilog/rtl/yifive/ycr1c/src/includes    -I ../../../verilog/rtl/sdram_ctrl/src/defs -I ../../../verilog/rtl/i2cm/src/includes \
-I ../../../verilog/rtl/usb1_host/src/includes -I ../../../verilog/rtl/mbist/include \
wb_port_tb.v -o wb_port.vvp

Look like in your run PDK_PATH is not propagated to iverilog command
In You run :  iverilog -g2005-sv -DFUNCTIONAL -DSIM -I
Where as my run: iverilog -g2005-sv -DFUNCTIONAL -DSIM -I /opt/pdk/sky130A

Where does that /opt/pdk/sky130A path come from? My PDK_ROOT path something different. By the way, I run make commands with absolute path, I just changed them before paste here.

As there are continuous changes in PDK and caravel repo, I have copied the working PDK and caravel repo in /opt folder inside docker dineshannayya:mpw5
I have update the docker with pdk/caravel repo at /opt folder.  You can re-pull the docker using

docker pull dineshannayyya:mpw5

Also I have made  change in Repo makefile to pick PDK and caravel from docker, You can re-pull the git repo also
In Make file, I have removed PDK_PATH and CARAVEL_ROOT
New Changed in run command:
$(DV_PATTERNS): verify-% : ./verilog/dv/% check-coremark_repo check-riscv_comp_repo check-riscv_test_repo
docker run -v ${TARGET_PATH}:${TARGET_PATH}
-e TARGET_PATH=${TARGET_PATH}
-u $(id -u $$USER):$(id -g $$USER) dineshannayya/dv_setup:mpw5
sh -c $(VERIFY_COMMAND)
If you want to over-ride the PDK/CARAVEL root, then you can update the makefile as below
$(DV_PATTERNS): verify-% : ./verilog/dv/% check-coremark_repo check-riscv_comp_repo check-riscv_test_repo
docker run -v ${TARGET_PATH}:${TARGET_PATH} -v ${PDK_PATH}:${PDK_PATH}
-v ${CARAVEL_ROOT}:${CARAVEL_ROOT}
-e TARGET_PATH=${TARGET_PATH} -e PDK_PATH=${PDK_PATH}
-e CARAVEL_ROOT=${CARAVEL_ROOT}
-u $(id -u $$USER):$(id -g $$USER) dineshannayya/dv_setup:mpw5
sh -c $(VERIFY_COMMAND)
Below test-case run faster as it uses only user_project_wrapper and wishbone to control the test case
make verify-user_basic
make verify-user_uart
make verify-user_risc_boot
make verify-user_spi
make verify-user_i2cm
make verify-user_uart_master
Below Test run take more time as it's full chip run with caravel + user_project_wrapper
make verify-wb_port
make verify-risc_boot
make verify-uart_master
If you want to dump, then you can add DUMP=ON swicth

thanks


What is the @search.score cutoff under which no results appear ? I am getting lesser number of rows than specified in the top parameter of .search

I have created an azure search index with the below dataframe

.
Scenario 1: search_client.search('stand-up',top=3) gives me all 3 rows from the index in the results,
but
Scenario 2: search_client.search('What do comics do?',top=3) only gives me 1 result.  (Images at the end of the question)
My question : Why is the search method not returning all the 3 rows in my Scenario 2 in spite of me specifying top=3. Is there a threshold of @search.score that needs to be met for a row in order to be returned ? If yes, Can this threshold be controlled as a parameter in .search method?
I have already been through the method's source code and don't see any such parameter
.
Return for Scenario 1

.
Return for Scenario 2

.
.
Below is the full code to reproduce this issue
AZURE_SEARCH_SERVICE = 'to be filled as str'
AZURE_SEARCH_KEY = 'to be filled as str'

from azure.search.documents.indexes import SearchIndexClient
from azure.core.credentials import AzureKeyCredential
from azure.search.documents.indexes.models import *
from azure.search.documents import SearchClient
import pandas as pd
from uuid import uuid4
from azure.search.documents.models import QueryType, Vector

def create_search_index(index_name:str)->None:

    index_client = SearchIndexClient(endpoint=f"https://{AZURE_SEARCH_SERVICE}.search.windows.net/",
                                     credential=AzureKeyCredential(AZURE_SEARCH_KEY))

    index = SearchIndex(
        name=index_name,
        fields=[
            SimpleField(name="uuid", type="Edm.String", key=True),
            SimpleField(name="Numb_Str", type="Edm.String", filterable=True, facetable=True),
            SearchableField(name="Sent", type="Edm.String", analyzer_name="en.microsoft"),
            SimpleField(name="Topic", type="Edm.String", filterable=True, facetable=True),
        ],
        semantic_settings=SemanticSettings(
            configurations=[SemanticConfiguration(
                name='default',
                prioritized_fields=PrioritizedFields(
                    title_field=None, prioritized_content_fields=[SemanticField(field_name='Sent')]))])
    )
    print(f"Creating {index} search index")
    index_client.create_index(index)

def upload_to_created_index(index_name:str,df:pd.DataFrame)->None:

    search_client = SearchClient(endpoint=f"https://{AZURE_SEARCH_SERVICE}.search.windows.net/",
                                 index_name=index_name,
                                 credential=AzureKeyCredential(AZURE_SEARCH_KEY))
    sections = df.to_dict("records")
    search_client.upload_documents(documents=sections)

#create df for uploading to search index
data = [{'uuid':str(uuid4()),'Numb_Str':'10','Sent':'Stand-up comedy is a comedic performance to a live audience in which the performer addresses the audience directly from the stage','Topic':'Standup'},
        {'uuid':str(uuid4()),'Numb_Str':'20','Sent':'A stand-up defines their craft through the development of the routine or set','Topic':'Standup'},
        {'uuid':str(uuid4()),'Numb_Str':'30', 'Sent':'Experienced stand-up comics with a popular following may produce a special.','Topic':'Standup'}]

df = pd.DataFrame(data)
pd.set_option('display.max_colwidth', None)

#create empty search index
create_search_index("test-simple2")

#upload df to created search index
upload_to_created_index('test-simple2',df)

#query the search index
search_client = SearchClient(

            endpoint=f"https://{AZURE_SEARCH_SERVICE}.search.windows.net",
            index_name='test-simple2',
            credential=AzureKeyCredential(AZURE_SEARCH_KEY))

query_results = search_client.search('What do comics do?',top=3)
query_results = list(query_results)

#get query results in a df
df_results = pd.DataFrame(query_results)

df_results

.
If I try changing the .search method's args to make it do a semantic search , I still get 1 result. I do it with the below
query_results = search_client.search('What do comics do?',
                                     top=3,
                                     query_type=QueryType.SEMANTIC,
                                     query_language='en-us',
                                     semantic_configuration_name="default")

Thank you for your feedback @gitprojects619 . We will investigate and get back to you asap.

Are you looking for https://learn.microsoft.com/en-us/azure/search/index-similarity-and-scoring?

@xiangyan99 While the article you sent is helpful, it unfortunately doesn't answer my question .
My problem is that .search() is not giving the same number of results as mentioned in the TOP parameter

Seems like this is the service behavior.
Please open an issue in https://github.com/Azure/azure-rest-api-specs repo or open a service ticket.


Authclient

Significant PR adding a few features.

Framework client that wraps sub clients. Not required, but useful to avoid redundancy and integrate authentication tokens into the various individual services.
LookupClient. This replaces the more unwieldy ersatz-materialization branch, and simplifies basic supervoxel and root id lookup of spatial points.
Documentation. All classes and functions have been given reasonable docstrings and a basic introductory documentation with various small examples has been added and is ready for ReadTheDocs. An example notebook has also been included as well.

Note that this PR plus a version update will be needed for the statebuilder to work.

I think the only major issue to address here is how to handle configuration, given that with flywire and moving to global + minniev1 it seems clear we are going to have multiple different servers and different users are going to want to configure their clients differently, and we should make that easy for them.

I started the process of refactoring for API versions and to start knowing the difference between services with global servers and ones without, but I think it's not quite possible to finish the task until we have a real deployment like that.
Ideally, global dns (which we can make default) and a dataset name should be able to get you the project-level dns. The framework client will know which things to send where, which is another reason it'll be good to have a master client (in addition to auth).


The meetup service is implemented as one file

There is an opportunity to make a library here. This would also make this both more testable and potentially easier to integration test.

bonus points may be issued for traits or generics for the backing store. This is by no means a requirement.

Addressed by #31


Silent Installation didn´t work without SME_SERVER_HOST

I struggled for quite some time with SME_URL beeing set to HTTPS://:443 this was caused by setting SME_PORT=443 but missing SME_SERVER_HOST=FQDN
$sysinfo = Get-WmiObject -Class Win32_ComputerSystem
$server = “{0}.{1}” -f $sysinfo.Name, $sysinfo.Domain
$cert = gci Cert:\LocalMachine\My\ | ? Issuer -like "Issuing CA "|? NotAfter -gt $(get-date)| ? Subject -like "$server"
$cert.thumbprint
msiexec /i C:\temp\WindowsAdminCenter1910.msi /qn /L*v C:\temp\log.txt SME_SERVER_HOST=$server SME_PORT=443 SME_THUMBPRINT=$($cert.Thumbprint) SSL_CERTIFICATE_OPTION=installed

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

ID: fe84fb4b-3420-bc1e-6a1d-b64ecc56fc5e
Version Independent ID: f089767e-4613-d595-a0ee-0dab012724a1
Content: Install Windows Admin Center
Content Source: WindowsServerDocs/manage/windows-admin-center/deploy/install.md
Product: windows-server
Technology: manage
GitHub Login: @jwwool
Microsoft Alias: jeffrew

SME_URL getting set to HTTPS://:443 will happen when using a wildcard certificate, will you please confirm?

Sorry, since i got it fixed it was out of my scope.
No we have Certificates based on the hostname.
I just wanted to get the Documentation right, if no FQDN is specified it didn´t work.

Thanks for your dedication to our documentation. If we have been unable to review your issue in a timely manner, we sincerely apologize for the delayed response. We have captured the informtion you have provided for review. We are closing this issue for now, but if you feel that it's still a concern, please respond and let us know. If you determine another possible update to our documentation, please don't hesitate to reach out again. #please-close


Add Documentation for network/system requirements for east-west gateway.

Describe the feature request
Add documentation for system/network requirements for east-west gateway
Describe alternatives you've considered
Trouble shooting what it is actually doing /requiring for network traffic between the gateways.
Affected product area (please put an X in all that apply)
[ ] Ambient
[ X] Docs
[ ] Dual Stack
[X ] Installation
[X ] Networking
[X ] Performance and Scalability
[ ] Extensions and Telemetry
[X ] Security
[ ] Test and Release
[X ] User Experience
[ ] Developer Infrastructure
Affected features (please put an X in all that apply)
[X ] Multi Cluster
[X ] Virtual Machine
[ X] Multi Control Plane
Additional context

What documentation do you think is missing? https://istio.io/latest/docs/setup/install/multicluster/before-you-begin/#requirements already documents this, so it would be good to understand why that is not sufficient

I need ports/system requirements.  In all of the examples it shows public cloud solutions which provide capability to use load balancer, the example for a dev environment show how to use metalLB, which we wouldn't use for production.  So for a prod environment with an internal load balancer.  I need to know how the communication/networking works.  As that's not too clear.

Then for load balancing between services, what is required for cluster 1 and cluster 2?  Is this 15021,15017, 15012 inbound and outbound between the clusters?

Additionally the Virtual service requires FQDN for EXTERNAL_ISTIOD_ADDR.

Also, i believe ipv6 is required for helloworld v2

Also, I believe there is an ipv6 requirement for hellow world v2.
which i think is looking for ipv6?


[BUG] Github footer icon colour seems inappropriate

Description
How to replicate issue

scroll to footer when you right click on icons of linkedIn or Discord they turn orange like this

whereas if you do so on github it doesn't

Screenshots
No response
Additional information
No response

Hi, I'll like to work on this if it is still available.

can i work on this issue??

can i working the issue

can i working the issue
i fixed this issue and raised a pull request
https://github.com/EddieHubCommunity/good-first-issue-finder/pull/412#issue-2348409268

@Gokilp  i fixed this issue and raised a pull request
https://github.com/EddieHubCommunity/good-first-issue-finder/pull/412#issue-2348409268


Allow updating change branches via rebase or merge

Allow for pulling in changes from the source branch either via rabasing or merging, instead of only allowing rebasing. Rebasing is still recommended however.
This should address #8.
/cc @phodge @mbitsnbites @anowlcalledjosh

I’d rather keep the process prescriptive. It’s exactly to avoid this sort of discussions that this document exists. While merging is a viable alternative, most projects "out in the wild" use rebasing, which leads to a cleaner git tree. On the interest of making "common sense" more common, I'd keep this section as is.

@alexmreis I agree, the spec is meant to avoid these kinds of arguments. And typically most projects I know of in the wild uses rebasing.
The change as is now says rebasing is the RECOMMENDED way to update change branches from source, but maybe that's not forceful enough. How about making it more strict so that rebasing MUST be used unless there's a very specific technical reason for why rebasing cannot be used. For example not understanding how rebase works is not a valid reason to use merging.

Looking way better!


loss.backward() inside SimpleLossCompute

In the __call__ function of class SimpleLossCompute, loss.backward() is called even if opt is None, i.e. during validation. Wouldn't this cause gradients to be computed on the validation set and thus you are training on the validation data?

Yes, it appears that you are correct.
The original code calculates gradients during validation.
I verified that this trains the model towards the validation data, which should not happen.
With the code below, the model improves quite faster on the training data set.
One major advantage is that with the changes below, the code goes through the validation set twice as fast as before because it does not do loss.backward().
The recommended way to run validation is:
model.eval()
torch.no_grad()

https://discuss.pytorch.org/t/model-eval-vs-with-torch-no-grad/19615
https://discuss.pytorch.org/t/two-small-questions-about-with-torch-no-grad/27571
And indeed, the code that runs without error is the following:
        model.eval()
        with torch.no_grad():
            test_loss = run_epoch(val_dataloader, model,
                  SimpleLossCompute(model.generator, criterion, None))
            print("test_loss", test_loss)

and:
class SimpleLossCompute:
    "A simple loss compute and train function."
    def __init__(self, generator, criterion, opt=None):
        self.generator = generator
        self.criterion = criterion
        self.opt = opt

    def __call__(self, x, y, norm):
        x = self.generator(x)
        loss = self.criterion(x.contiguous().view(-1, x.size(-1)),
                              y.contiguous().view(-1)) / norm
        #loss.backward()
        if self.opt is not None:
            loss.backward()
            self.opt.step()
            self.opt.optimizer.zero_grad()
        return loss.data * norm

@gussmith hey gus, did you ever get this code to work? interested in comparing answers?


TiS - Crash upon Bulwark's Ambry entry

Describe the bug
Crash relates to Together in Spire (TiS) Multiplayer mod.
Generally it works fine with TiS but crashes whoever enter Bulwark's Ambry second or late
Reconnecting to run does not fixes it cause player still triggers Room's event
For first player entered crash doesnt appear
To Reproduce
Steps to reproduce the behavior:

On act 4 let one player pass Ambry
Go to it itself
Crash

Crash log
Game crashed.
Version Info:
 - Java version (1.8.0_144)
 - Slay the Spire (12-18-2022)
 - ModTheSpire (3.30.3)
Mod list:
 - basemod (5.54.1)
 - stslib (2.11.0)
 - downfall (5.1.2)
 - spireTogether (6.4.11)
 - ReplayTheSpireMod (1.6.7)
 - GooglyMod (1.9.0)
 - TungstenRodVoiceMod (1.1.0)
 - RiskOfRelics (2.3.8)
 - thecursed (1.1.10)

Mods in stacktrace:
 - RiskOfRelics (2.3.8)
Cause:
java.lang.NullPointerException
    at com.megacrit.cardcrawl.rooms.AbstractRoom.update(AbstractRoom.java:275)
    at com.megacrit.cardcrawl.rooms.EventRoom.update(EventRoom.java:28)
    at riskOfRelics.rooms.AmbrySelectRoom.update(AmbrySelectRoom.java:43)
    at com.megacrit.cardcrawl.dungeons.AbstractDungeon.update(AbstractDungeon.java:2532)
    at com.megacrit.cardcrawl.core.CardCrawlGame.update(CardCrawlGame.java:876)
    at com.megacrit.cardcrawl.core.CardCrawlGame.render(CardCrawlGame.java:423)
    at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:225)
    at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:126)

After looking into this, it looks like the type of issue that would take major changes on either side to fix. I might look into it again, but compatibility jank is extremely time-consuming. I'll leave this open for now just in case I find a fix.


Breadcrumb link is broken

If you click on the Entity Framework link in the breadcrumb at the very top of the page, you’ll get directed to 404 page. It points to https://docs.microsoft.com/en-us/ef/index.yml instead of the landing page https://docs.microsoft.com/en-us/ef/.
I suspect the fix is a just a tweak in the files used to generate the breadcrumb or the index.
PS: Good job EF folks on the new landing page. Much improved signal to noise ratio!

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

ID: 7ac57b24-45aa-e679-6ff9-5a25c369c1ff
Version Independent ID: cc576199-b14c-a135-2291-cc48bf301b4e
Content: Getting Started - EF Core
Content Source: entity-framework/core/get-started/index.md
Product: entity-framework
Technology: entity-framework-core
GitHub Login: @Rick-Anderson
Microsoft Alias: avickers

Submitted a fix in #2292

Thanks @smitpatel, I was on it but you got it in before I did.  :)

Thanks @divega. Good to hear from you. :-)


Livestream

Maybe I missed something, as I'm currently not able to play a radio stream.
Is planned to support this kind of audio-files?

Sorry. Can be closed.
Just found: https://github.com/arielfaur/ionic-audio/issues/6


Fail to load assets when having an alias named /src/

Describe the bug
The problem is very simple, Vite cannot find assets when having an alias named /src/
Like so
alias: {
      '/src/': path.resolve(__dirname, 'src'),
    },

Reproduction
https://github.com/gawlk/vite-src-alias-img-issue
System Info

vite version: latest
Operating System: Mac OS latest
Node version: latest
Package manager (npm/yarn/pnpm) and version: pnpm latest

remove the end slash : https://vitejs.dev/guide/migration.html#alias-behavior-change

Yup that did it, thank you !


error: incompatible types for redefinition of 'GetVersion' ...

OS:
Windows 11
V version
V 0.3.2 bf0c8a0
What did you do?
Compile in code:
module cat

import jni

#flag windows -I $env('JAVA_HOME')\include
#flag windows -I $env('JAVA_HOME')\include\win32
#flag windows -I $env('JAVA_HOME')\include\win32\bridge

// jni_on_load is called by the JavaVM upon setup
[export: 'JNI_OnLoad']
fn jni_on_load(vm &jni.JavaVM, reserved voidptr) int {
	println(@FN + ' called')
	jni.set_java_vm(vm)
	return int(jni.Version.v1_6)
}

// get_string_from_v returns a string obtained from Java via a static method call
[export: 'JNICALL Java_io_v_V_getStringFromV']
fn get_string_from_v(env &jni.Env, thiz jni.JavaObject) jni.JavaString {
	// Obtain the string "Hello from Java!" from the Java class...
	call_result := jni.call_static_method(env, 'io.v.V.getStringFromJava() string')
	// Cast the value of the call result to a v 'string'...
	string_from_java := call_result.result as string
	println(@MOD + '.' + @FN + ' string from Java "${string_from_java}"')
	// Return a Java 'String' to the caller - replacing 'Java' with 'V'...
	return jni.jstring(env, string_from_java.replace('Java', 'V'))
}

What did you expect to see?
C:/Users/anivi/AppData/Local/Temp/v_0/main.dll.16824221152644964963.tmp.so.c:494: warning: WINVER redefined
In file included from C:/Users/anivi/AppData/Local/Temp/v_0/main.dll.16824221152644964963.tmp.so.c:783:
D:/V_Repository/jni/c/jni_wrapper.h:8: error: incompatible types for redefinition of 'GetVersion'

Might be similar to the issues we had with windows.h
https://github.com/irishgreencitrus/raylib.v/issues/1
https://github.com/irishgreencitrus/raylib.v/commit/1b84649
https://github.com/vlang/v/pull/15456

I'm not 100% sure, since I'm no expert in fixing colliding symbol names and Windows is know to cause such headaches. There's no easy fix to it since Windows has chosen to use very common names for their functions in their win32 API headers.
My initial thought is that the function GetVersion is the one colliding with JNI's GetVersion. If you don't need the Java version simply comment it out of the source here and here. If you do need it you'll need to find a way to exclude the function in <windows.h> (not sure how possible it is) it's possible to some extend like it's done here before including <windows.h>. If you go down that road make sure you do it in a pre.h file you include in your V code via #preinclude.


Dark Mode - Colour recommendation

It would be better if the colour used would be White instead of Grey, So it would be much more visible.
Nexus 6
Android 7.1.1
Zulip Beta -> From App Store

This is also fixed now. Can be closed now.


Corruption in generated policy if it previously contained exceptions

When updating an xml policy with wdac wizard, if some of its rules contained file path exceptions, it's fairly common that it becomes corrupt when adding new rules. The IDs of the exceptions are messed, so the file becomes corrupt, it can be checked with a command like this one:
PS C:\Users\xxx\source_code\WDAC\policies>  Merge-CIPolicy -OutputFilePath .\kkk.xml -PolicyPaths .\WDAC-BlackList-AllowAll_v<IP_ADDRESS>.xml
Merge-CIPolicy : "Documento con formato incorrecto: debe haber un nodo con el ID = ID_ALLOW_A_0015_2_1_1_0_0_0"
En línea: 1 Carácter: 2
+  Merge-CIPolicy -OutputFilePath .\kkk.xml -PolicyPaths .\WDAC-BlackLi ...
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Merge-CIPolicy], CIPolicyException
    + FullyQualifiedErrorId : Microsoft.SecureBoot.UserConfig.CIPolicyException,Microsoft.SecureBoot.UserConfig.MergeCIPolicy

PS C:\Users\xxx\source_code\WDAC\policies>

if I inspect the original policy the original rule was like this:
          <DeniedSigner SignerId="ID_SIGNER_S_0020_31_30_30_0_0">
            <ExceptAllowRule AllowRuleID="ID_ALLOW_A_0015_2_1_1_0_0" />
            <ExceptAllowRule AllowRuleID="ID_ALLOW_A_0014_3_2_2_0_0" />
          </DeniedSigner>
...
    <Allow ID="ID_ALLOW_A_0015_2_1_1_0_0" FriendlyName="" FilePath="%OSDRIVE%\Program Files\WinRAR\Uninstall.exe" />
    <Allow ID="ID_ALLOW_A_0014_3_2_2_0_0" FriendlyName="" FilePath="%OSDRIVE%\Program Files\WinRAR\RarExtInstaller.exe" />

in the corrupt policy it has become this:
          <DeniedSigner SignerId="ID_SIGNER_S_0020_31_30_30_30">
            <ExceptAllowRule AllowRuleID="ID_ALLOW_A_0015_2_1_1_0_0_0" />
            <ExceptAllowRule AllowRuleID="ID_ALLOW_A_0014_3_2_2_0_0_0" />
          </DeniedSigner>
...
    <Allow ID="ID_ALLOW_A_0015_2_1_1_0" FriendlyName="" FilePath="%OSDRIVE%\Program Files\WinRAR\Uninstall.exe" />
    <Allow ID="ID_ALLOW_A_0014_3_2_2_1" FriendlyName="" FilePath="%OSDRIVE%\Program Files\WinRAR\RarExtInstaller.exe" />

So the AllowRuleIDs don't match and generates the corruption

Good report and find, @pasqualm. I can repro this issue


zilliz/attu:v2.3.10 start with SyntaxError: Invalid or unexpected token

/usr/bin/bash:1
ELF
^
SyntaxError: Invalid or unexpected token
at internalCompileFunction (node:internal/vm:76:18)
at wrapSafe (node:internal/modules/cjs/loader:1283:20)
at Module._compile (node:internal/modules/cjs/loader:1328:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Module._load (node:internal/modules/cjs/loader:1019:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
at node:internal/main/run_main_module:28:49
Node.js v18.20.1

Linux localhost.localdomain 4.18.0-193.28.1.el7.aarch64 #1 SMP Wed Oct 21 16:25:35 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux

did you have this issue on previous version?

Has it been resolved?

Has it been resolved?

I can't reproduce it, can you ?


Host, Service and Cluster to Annotations

Moved host, service and cluster from Record attributes into Record annotations. User annotations by the same names will be suppressed.

Thanks!


Update Frontiers metadata

Edited in Notepad++ now. Hope this works regarding the tab delimiters.
This relates to: https://github.com/citation-style-language/styles/issues/1642
I went to the Frontiers website and manually went through the missing journals. The .xls file that was provided by Frontiers was missing loads of journals. It was from Jan-16.
_template.csl edited as necessary: https://github.com/citation-style-language/journals/pull/26

Thanks! Two minor nitpicks:

I try to standardize the column names to the ones mentioned at https://github.com/citation-style-language/journals#preparing-journal-metadata (so here, I changed "CATEGORY" to "FIELD")
Try to put all changes in a single pull request. (you might want to try out a Git client such as GitHub Desktop, https://desktop.github.com/; you could e.g. edit the first file via the GitHub website to get yourself a branch in your fork, and then you can select that branch in GitHub Desktop and make changes to other files)

Ah ok. Thanks for explaining. I will check that out :)

Edited in Notepad++ now. Hope this works regarding the tab delimiters.

(also, this time there weren't any formatting issues with the _journals.tab file)

Ah ok. Thanks for explaining. I will check that out :)

Feel free to ask for any more directions if you need them. For simple PRs, it's also possible to do everything via the GitHub website (which is what I did here).


feat: Add an ESM entry point to allow better bundle optimizations

tree-shaking & module concatenation

Sorry, how does this differ from the es target?

It only preserve the import / export syntax without rest of the "modern" syntax like it is in es version

Then it should target IE11, as that is NextJs' target.

Cool. My main concern here is if the addition of the module entry in package.json will cause some build systems to start grabbing that entrypoint instead of the cjs target.
I imagine we will need to release this on a major?

This is the main idea, webpack (or other bundlers) should use the module entry, because it is more bundle friendly

Well, I think we'll need to release it on the next major. Can you change the target and merge into the beta branch?

It is based on the beta version ;)


feat(css-selector): use the same css selector approche used in radix-ui and headless-ui

Can i make  a PR(@kobalte/tailwindcss)  to use the same API used in headless-ui and radix-ui ?
change attribute selector from:

...

.item[data-checked] { ... }

to:

...

.item[data='checked'] { ... }

Isn't this totally different in that data-checked is a native html attribute whereas data="checked" is a custom attribute? I assume this is an intentional choice to do it this way.

data= is not a valid HTML data-attribute. radix use data-state= which is valid, but hold only a single value. Headless UI put all the values in the same data-headlessui-state attribute but it will require to rewrite how the attributes are set in all components.

It's lot of refactoring :100:
data-state='hover checked'

I will close this issue :+1:


conscious lang: Setup main branch in pipelines

Related PRs:

https://github.com/kiegroup/kogito-pipelines/pull/188
https://github.com/kiegroup/kogito-runtimes/pull/1365
https://github.com/kiegroup/optaplanner/pull/1372
https://github.com/kiegroup/kogito-apps/pull/882
https://github.com/kiegroup/kogito-examples/pull/729
https://github.com/kiegroup/kogito-images/pull/516
https://github.com/kiegroup/kogito-operator/pull/905
https://github.com/kiegroup/rhpam-kogito-operator/pull/44

Many thanks for submitting your Pull Request :heart:!
Please make sure that your PR meets the following requirements:

[ ] You have read the contributors guide
[ ] Your code is properly formatted according to this configuration
[ ] Pull Request title is properly formatted: KOGITO-XYZ Subject
[ ] Pull Request title contains the target branch if not targeting master: [0.9.x] KOGITO-XYZ Subject
[ ] Pull Request contains link to the JIRA issue
[ ] Pull Request contains link to any dependent or related Pull Request
[ ] Pull Request contains description of the issue
[ ] Pull Request does not include fixes for issues other than the main ticket

How to retest this PR or trigger a specific build:

Run all builds
Please add comment: Jenkins retest this

Run (or rerun) specific test(s)
Please add comment: Jenkins (re)run [runtimes|optaplanner|apps|examples] tests

Quarkus LTS checks
Please add comment: Jenkins run LTS

Run (or rerun) LTS specific test(s)
Please add comment: Jenkins (re)run [runtimes|optaplanner|apps|examples] LTS

Native checks
Please add comment: Jenkins run native

Run (or rerun) native specific test(s)
Please add comment: Jenkins (re)run [runtimes|optaplanner|apps|examples] native

Full Kogito testing (with cloud images and operator BDD testing)
Please add comment: Jenkins run BDD
This check should be used only if a big change is done as it takes time to run, need resources and one full BDD tests check can be done at a time ...

The (build) Optaplanner check is successful.

Jenkins tests failing due to https://github.com/kiegroup/kogito-pipelines/pull/188 and main branch not yet existing on kogito-pipelines

The (build) Apps check is successful.

The (build) Examples check is successful.

The (build) Runtimes check is successful.

The (build) Apps check has failed. Please check the logs.

jenkinsfile-tests failing due to change of branch name

jenkins rerun apps tests


Prepare for 0.40.0 release, derive 0.2.0 release

Part of https://github.com/sqlparser-rs/sqlparser-rs/issues/1030

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
14 unchanged lines in 1 file lost coverage.
Overall coverage remained the same at 87.71%

Files with Coverage Reduction
New Missed Lines
%

derive/src/lib.rs
14
0.0%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
17992

Relevant Lines:
20513

💛  - Coveralls


Fatal error TOOMANYREQUESTS during download of vuln db

When trying to scan container image in the pipeline, the trivy task fails with that error:

It is quite similar to https://github.com/aquasecurity/trivy-azure-pipelines-task/issues/80, but the proposed fix doesn't help. After 2-3 retries, it can download the vuln db.

Hello!
I have the same problem.
I found this recent PR 440 which pushes db updates to the Amazon container registry in addition to GitHub but I'm not sure this will fix the issue since the Amazon's policy limits unauthenticated pull to 1 per second:

Would it be possible to catch this error within the task and expose a new variable allowing to specify the number of retries to attempt in case of a "rate limit" error ?
I cannot use the retryCountOnTaskFailure task parameter since it will also retry when a vulnerability is found.

Hello,
Same issue for me:

As a workaround, I've created a pipeline which fetches the trivy databases
trivy --cache-dir . config .
trivy image --cache-dir . --download-java-db-only
trivy image --cache-dir . --download-db-only

and publishes it as pipeline build artifact. This can then be consumed via
`
resources:
pipelines:

pipeline: 'trivyCachePipeline'
branch: 'master'
source: 'name of the pipeline'
`

I just stumbled upon the fact that trivy supports from v0.56 a csv list of repositories for download which works perfectly. Those mirrors are also published by trivy:
https://github.com/aquasecurity/trivy-db/blob/32c63a9af03ffd449a6ffb4471745b6ec9714875/.github/workflows/cron.yml#L85
https://github.com/aquasecurity/trivy-java-db/blob/cfb7fef466315d85e48965f9b2d85a3f270aa8cc/.github/workflows/cron.yml#L56
--java-db-repository ghcr.io/aquasecurity/trivy-java-db:1,public.ecr.aws/aquasecurity/trivy-java-db
--db-repository ghcr.io/aquasecurity/trivy-db:2,public.ecr.aws/aquasecurity/trivy-db

This will do an auto fallback to the ecr repository if ghcr fails


Roadmap Issue

Could you (or someone) create some sort of a road-map issue, which would provide like an overview of where this project is headed?
Something like twbs/bootstrap#17021 (except as an issue).

Bump.

I think this would be great as well. Doesn't need to be super details but a rough idea is always interesting.

tentative roadmap issue: #252


Ignores some users

Are there any updates in discord API, bot only sees and send messages to users it has had interacted previously, other members are ignored.
Also after choosing bot option and submitting text, it takes around 10 minutes to proceed, no errors in terminal.
Windows 10
Python 3.6.4

@Boffice Also after choosing bot option and submitting text, it takes around 10 minutes to proceed, no errors in terminal.
Same for me... Any news ?

I guess @client.event async def on_ready() is never or incorrectly triggered...

Maybe related to Discord.py#2567

@Zaliro what about first issue ? can you dm all users ?

@Zaliro issue in your screenshot is due to invalid version of discord.py, install version from requirements.txt
pip install -r requirements.txt

@Zaliro issue in your screenshot is due to invalid version of discord.py, install version from requirements.txt
pip install -r requirements.txt

I'll try and get back to you

Same error AttributeError: 'Client' object has no attribute 'servers' with discord.py 1.3.3

yes because you have v1.3.3 need discord.py==0.16.12 try to run
pip uninstall discord.py
and install requirements after

I'm tired today nevermind my requirements.txt was rewritten by pip when trying to upgrade some libs before

@Boffice Now I getting Something went wrong (;3;) relaunching...  with correct versions of requirements

also your python needs to be 3.6.4

I am

Can confirm that discord has blocked checking if the selfbot is ready to use.
Looking into options, as of right now this boy is isn't working.

Discord has blocked self bots, this bot used Discord.py which has also blocked selfbots.
This has been ported to a new API made by arandomnewaccount and I.
Please update the script.


more connection with KeyAtome integration

hello since today the integration no longer works apparently no more access to the server
I tested with the total energy application and everything works correctly
"Atome_Diagnostic changé en TooManyServerError"

.'
Home Assistant 2023.9.3
Supervisor 2023.09.2
Operating System 10.5
Interface utilisateur : 20230911.0 - latest
in any case thank you again for this superb integration

apparently there must have been a problem during the day because everything is back to normal, thanks anyway

Hi, new install and same issue :

i'm sure about my credential,

Resolved by remove/add integration.
It may be happened after adding second linky to my electricity provider.

If you have two or more houses and only one atome device you should select 1 st or 2nd atome key

Hello,
I'm also facing the "TooManyServerError" issue.
I removed the integration, restarted HA, added the integration, restarted HA again... Same issue.

Based on the message it seems that the integration should try to limit the rate of API calls to avoid being throttled.

Hello again,
My bad: I resolved the issue by:

Opening Settings > Integrations > Key Atome.
Removing the existing integration entry.
Adding again an integration entry, configured with same username / password, BUT WITH atome key number 2 instead of the default 1. (as suggested here)

After this change I'm no longer getting the TooManyServerError message and all sensors populate with expected values (previously the sensors would all report "unknown state").
Hoping this message could help anyone facing similar issue.
Cheers!

Thanks for the support

Thanks , just would like to add a ticks :
If for any reason you select, in your mobile apps TOTAL Account, another contract you should  reactivate your integration in HA
best regards

Add server section in general description https://github.com/jugla/keyatome


Caused by: java.security.SignatureException: Signature does not match.

Hi There,
I am not sure if this is an issue or a gap in my understanding:

Switched to 3.10.7, in-order to call: HttpsURLConnection.setDefaultSSLSocketFactory(SSLFactory.getInstance().sslContext().getSocketFactory());

Downloaded and added the Certificate via keytool.

Also disabled Certificate Validation as per this link

Works perfectly in SoapUI. Application getting above error.

Can you please provide some more information about what your application is doing.

Is it hitting the MockServer or the proxy.
What type of application is it,
What language,
What HTTP client,
Example code,
etc

Is this still causing an issue, if so please provide the requested additional information


Debug query to see why response is empty

Hey!
Thanks for this package!
I wonder if it’d be possible to make a debug feature to return the actual query that is being sent to ElasticSearch?
I’ve successfully imported all my model data, but when I search I get an empty response.
To be able to determine why that is I would need to see the request being sent into ES.
When I query ES from kibana I can see that the DB is populated though.
Thanks a big bunch!
Jonas

This library uses elasticsearch/elasticsearch under the hood, so if it's just for debugging purposes I would suggest to simply edit in an output close before the request is sent, like here: https://github.com/elastic/elasticsearch-php/blob/c0ed43cff390820a0621004df9e5785ff9c12e65/src/Elasticsearch/Client.php#L1571 - in your vendor/elasticsearch/elasticsearch directory, and revert afterwards.


Use postcss-plugins

Addresses #1 - the need for a more centralized place for the plugins to live.
postcss-plugins is an npm module that can easily be integrated here as we are already using browserify. Basically all we do is require it in and it's good to go.
You'll notice I removed the "categories" structure altogether. It didn't seem like it was providing any advantages aside from being familiar to the structure of the PostCSS list. Fear not, I have a more robust idea anyway that I believe may improve the search too. The idea is to use tags. Tags are similar to categories, only they are an array so we can have many of them instead of just one! And if we find that we need categories, we can just add category as a new property of each plugin instead of them being all children of a category.
Let me know what you think! :smile:

Cheers man, thanks a lot! Should be live in 3-5 minutes.


Can't uninstall with or without recovery

Have you tried these steps?
Is there already an open topic for this issue?
Please include the following information.

OS Version: 10.13
Mac model: MacBook Pro (15-inch, Mid 2010)
Dongle or replaced card?: Dongle
Used dongle/card: IOGEAR GBU521

Your Issue: Can't uninstall
Steps done to try to fix the issue:
Try either option "3) Uninstall" or option "4) Uninstall with Recovery".  After reboot, Continuity still reports as active.  Here is the readout from the uninstall with Recovery:
--- Initiating uninstallation ---

/Users/USER/Downloads/Continuity-Activation-Tool-beta-4/Continuity Activation Tool.app/Contents/Resources/contitool.sh: line 2000: [: missing `]'
Restoring kexts...                      OK. Using Recovery Disk backups.
Mounting Recovery HD...                 OK
Reinstalling original Apple drivers...  NOT OK
Applying correct permissions...         OK
Updating kext caches...                 OK
Updating system caches...               OK
Disabling any HCI switch behavior...    OK
Verifying system kexts signatures...    OK. 1 or more unsigned drivers were found. OS kext security protection won't be changed to prevent issues.
Patching ContinuitySupport...           OK.
36:71: execution error: System Events got an error: Can’t get login item "continuityCheck". (-1728)
OK. Automatic continuity check disabled.

DONE. Please reboot now to complete the uninstallation.
/Users/USER/Downloads/Continuity-Activation-Tool-beta-4/Continuity Activation Tool.app/Contents/Resources/contitool.sh: line 2024: [: missing `]'

Press any key to reboot or CTRL-C to cancel...

The recovery disk of macOS 10.13.1 does not include the IO80211Family.kext and therefore can't be used to restore.
The newest beta (2.6b5) will allow you to download a clean version of some kexts and install those, choose one that's closest to yout current version and it should work fine.

@sysfloat I'm getting a syntax error when trying to open 2.6b5.

@namster2k Ooops, my bad pushed an update just now.

@sysfloat I finally got everything working now! I wasn't able to get Continuity to report as inactive, but somehow it started working after I ran Activate Continuity again anyway.
One thing I did notice was for Step 3 on the screenshot, you have:
3. enter 'csrutil enable --without-kext'
It should read as:
3. enter 'csrutil enable --without kext'

Aside from that it appears as though everything is working fine.
Thank you again for your hard work!

I downloaded the latest beta, selected the option "6) download legacy kext", and it failed, ending with:
Moving Legacy Kext...                   NOT OK. An error occured while moving

Press any key to go back to the main menu...

i am getting the same error

I too am struggling with this error on 10.13, can’t uninstall and legacy kext (of all varieties) is erroring on the copy step. Handoff is not working but equally I can’t to go back to the stock settings.

Same issue as @rstankey et al. I think I made the mistake of trying to install with the non-beta, not realizing the download link on the main readme was not the most recent. I think that installer failed to create kext backups, and now I'm in limbo unable to uninstall or install properly.

I had problems uninstalling with the backup-files too because the Read-only FS so a simple "mount -uw /" before running the script did the trick. Macbook Pro 13 (early 2011) Catalina 10.15.7


Design Mongo Schema

We must define a document schema to use in mongodb. Might want to consider looking at what pieces of data are relevant for e-commerce from other sites

closed, d42894a


[main] allow empty string as first parameter to fetch

Allow calling fetch with an empty string as the first parameter.
Fixes #2419.

@jorupp can you please review and sign the CLA (if acceptable). I've already backported and committed your changes to master

@jorupp can you please review and sign the CLA (if acceptable). I've already backported and committed your changes to master

The guy from our legal team hasn't gotten back to me yet - I'm planning to bug him again in the morning (US CT).

@microsoft-github-policy-service agree company="Rightpoint"

@jorupp can you please review and sign the CLA (if acceptable). I've already backported and committed your changes to master

@MSNev  the original comment from the CLA bot seems to have disappeared for me, but hopefully my previous comment will work for it.


Update major with master

Merge master into major.

Coverage remained the same at 96.396% when pulling bf379befc8959bc04d9b47e9bcbd354874f79880 on merge-master into bc6abdc1e05ea4b15be562ab534d57b31c43bbfa on major.

Coverage remained the same at 96.396% when pulling 6fd8489ed7f4972664c6df4e314f4af42e2fb29d on merge-master into bc6abdc1e05ea4b15be562ab534d57b31c43bbfa on major.


Only consider as slow consumers clients that did CONNECT

Under some scenarios a client may hit the slow consumer write deadline during the connecting stage, meaning that it is possible to consider unhealthy clients that could not finish the TLS handshake as slow consumers.
For example, if the write_deadline is way shorter than the TLS timeout deadline it is possible for a client to become a slow consumer even though it has not finished connecting properly:
[92961] 2018/12/18 22:04:03.308501 [DBG] <IP_ADDRESS>:51506 - cid:1 - Client connection created
[92961] 2018/12/18 22:04:03.308837 [INF] <IP_ADDRESS>:51506 - cid:1 - Slow Consumer Detected: WriteDeadline of 1µs Exceeded
[92961] 2018/12/18 22:04:03.308854 [DBG] <IP_ADDRESS>:51506 - cid:1 - Starting TLS client connection handshake
[92961] 2018/12/18 22:04:03.308931 [ERR] <IP_ADDRESS>:51506 - cid:1 - TLS handshake error: read tcp <IP_ADDRESS>:4222-><IP_ADDRESS>:51506: use of closed network connection
[92961] 2018/12/18 22:04:03.308952 [DBG] <IP_ADDRESS>:51506 - cid:1 - Client connection closed

And there could also be races, for example even if a TLS handshake already failed the write deadline can still be hit too, becoming accounted as a slow consumer:
[84968] 2018/12/18 16:49:56.346511 [DBG] <IP_ADDRESS>:49639 - cid:1 - Starting TLS client connection handshake
[84968] 2018/12/18 16:49:59.350464 [ERR] <IP_ADDRESS>:49639 - cid:1 - TLS handshake error: read tcp <IP_ADDRESS>:4222-><IP_ADDRESS>:49639: i/o timeout
[84968] 2018/12/18 16:49:59.350484 [ERR] <IP_ADDRESS>:49639 - cid:1 - TLS handshake timeout
[84968] 2018/12/18 16:49:59.350536 [DBG] <IP_ADDRESS>:49639 - cid:1 - Client connection closed
[84968] 2018/12/18 16:49:59.350789 [INF] <IP_ADDRESS>:49639 - cid:1 - Slow Consumer Detected: WriteDeadline of 1ms Exceeded

With this change, we only consider as slow consumers clients that did connect to the cluster without issues.
Signed-off-by: Waldemar Quevedo<EMAIL_ADDRESS>
[x] Link to issue, e.g. Resolves #NNN
[x] Documentation added (if applicable)
[x] Tests added
[X] Branch rebased on top of current master (git pull --rebase origin master)
[X] Changes squashed to a single commit (described here)
[x] Build is green in Travis CI
[X] You have certified that the contribution is your original work and that you license the work to the project under the Apache 2 license

Changes proposed in this pull request:

Do not increase slow consumer counter due to write deadline errors unless a client has finished connecting

/cc @nats-io/core

Coverage increased (+0.06%) to 91.761% when pulling 142d3539b6d4657f861c005e32c7a1e907b01db7 on slow-consumer-tls-timeout-race into 0953016abe7f48302e5f281c948dab052fda0f2b on master.

LGTM

@wallyqs Should we bump the version? (we can do that after the fact if you needed).

@kozlovic sounds good, bumped the version in the branch already


Save Created Video

Thanks for creating this library.  Using it, I get the message that the video has been created, but I'm not able to save it to my library.
This is what I currently have:
 [self.movieMaker createMovieFromImages:[_spinImages copy] withCompletion:^(NSURL *fileURL){
                NSLog(@"movie at fileURL: %@", fileURL); // this gives me the log movie at fileURL: file:///var/mobile/Containers/Data/Application/7AF6F798-346B-4CE8-B5FA-88C7FB8D5BA0/Documents/export.mov

                UISaveVideoAtPathToSavedPhotosAlbum ([fileURL absoluteString],self,nil, nil);
            }];

Going into my photo album, I don't see the saved video.

I just needed to use relativeString instead of absoluteString!

:+1:


Show IP in login prompt (?)

Issue description
I have a NixOS installation without graphical user interface and use DHCP to get an IP.
I have power, ethernet and a display connected to the device.
To connect via ssh, i have to connect a keyboard and type the password to login and get the IP.
It would be helpful to see the primary IP in login prompt!
It's probably not that easy to get the primary IP. On traditional systems the NIC is called eth0, but with systemd, it's called differently on every system. In my case, i use a bridge called br0.
For my nixos-containers, i use ip -4 addr show eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}' to get the IP.
The login help text seem to be defined here: https://github.com/NixOS/nixpkgs/blob/release-19.03/nixos/modules/services/ttys/agetty.nix
Technical details

system: "x86_64-linux"
host os: Linux 4.19.46, NixOS, 19.03.172758.36516712916 (Koi)
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.2.2
channels(root): "nixos-19.03.172883.1601f559e89"
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

my typical solution to this is to services.avahi.enable = true; and then run avahi-browse -at on another machine to list all avahi machines on the LAN

This is already supported by agetty(8):
ISSUE FILES

       The default issue file is /etc/issue. If the file exists then agetty
       also checks for /etc/issue.d directory. The directory is optional
       extension to the default issue file and content of the directory is
       printed after /etc/issue content. If the /etc/issue does not exist
       than the directory is ignored. All files with .issue extension from
       the directory are printed in version-sort order. The directory allow
       to maintain 3rd-party messages independently on the primary system
       /etc/issue file.

       The default path maybe overridden by --issue-file option. In this
       case specified path has to be file or directory and the default
       /etc/issue as well as /etc/issue.d are ignored.

       The issue files may contain certain escape codes to display the
       system name, date, time etcetera.  All escape codes consist of a
       backslash (\) immediately followed by one of the characters listed
       below.

       4 or 4{interface}
              Insert the IPv4 address of the specified network interface
              (for example: \4{eth0}).  If the interface argument is not
              specified, then select the first fully configured (UP, non-
              LOCALBACK, RUNNING) interface.  If not any configured
              interface is found, fall back to the IP address of the
              machine's hostname.

But there's no guarantee that DHCP has assigned an address when it runs, and a banner message won't help you much if the IP changes later, so you'll want to do
  environment.etc."issue.d/ip.issue".text = "\\4\n";
  networking.dhcpcd.runHook = "${pkgs.utillinux}/bin/agetty --reload";

But this seems like a silly thing to do. Why don't you just configure a static IP?

Are any other linux distributions that are doing this? I know some of the *BSD did, but not sure about linux.

https://github.com/NixOS/nixpkgs/issues/63322#issuecomment-506960445 works. The login took longer to appear.
Should we make this a NixOS option (enableIP...) or just document it (where? wiki?)?

Still interested in this.

@573 what solution would you like to have?

I guess I would prefer to have it as a NixOS option.

If you are on a wifi connection, there is good chances that the prompt will be displayed before having the IP. In such cases it will display <IP_ADDRESS>.
I get around it by introducing a delay with
services.getty.extraArgs = [ "--delay=5" ];

This is pretty dirty and will display a black screen during the delay, but can be good enough on some cases like mine, for the iso install usb key.


Add network stats

Docker would be a great solution for me if all of the metrics worked correctly. It was mentioned in the docs that network, process list, and cpu metrics might be incorrect. Can these limitations be fixed?

Hi, any news here? I'm running CoreOS and want to see at least the network traffic. I added an additional partition to the host and it is not showing up. I didn't find a hint in the code, as it looks like the agent always uses df -i / df -k which does not show everything as the /proc files are mounted under /host/proc (perhaps I missed something?!)

Do you have any plans to support network metrics in near future? an approximate date when we can expect it? a month? a year?

@korya we hope to get them within a month or 2.

:+1:

We have a version being tested that adds network metrics. We will make it available via the registry with a different tag.

any plans on getting this into master or latest soon?

@hkaj can you check with @LotharSee what the status of this is?

@alq666, @all we are currently working on a revamp of the docker check that will add new metrics (block IO, network) and new features, using docker-py. Of course the dockerized agent will keep up with these changes.
These modifications are set to be released with 5.5, and we'll offer beta testing when ready.

@hkaj awesome, thanks!

The new docker check docker_daemon.py answers to most of this. It went out with 5.5 and adds a lot of  new metrics and features. For more specific questions, please open new issues.

@hkaj I have deployed the latest https://github.com/DataDog/docker-dd-agent but I'm still not getting the network metrics. The README of docker-dd-agent seems to indicate it's still missing / not working

Known missing/incorrect metrics:

Network
Process list

Could you please confirm if it is supposed to be possible to get network metrics now? And if yes what needs to be done?
Thank you

Since this is the #1 result on google for docker dd-agent host network metrics, here is how I solved it after searching through the source code:

/proc from the host is mounted in at /host/proc as per the example in readme.md so this needs to be added to /etc/dd-agent/datadog.conf:
procfs_path = /host/proc
the network checks are disabled by default in the docker dd-agent container so add it to /etc/dd-agent/conf.d/network.yaml:

init_config:
instances:
  - collect_connection_state: false
    excluded_interfaces:
      - lo
      - lo0


Server address gets violently overridden to https from plain http

I confirm (by marking "x" in the [ ] below: [x]):

[x] This is not a troubleshooting question. Troubleshooting questions go here: https://docs.mattermost.com/install/troubleshooting.html.
[x] This doesn't reproduce on web browsers (such as in Chrome). If it does, issue reports go to the Mattermost Server repository.
[x] I have read contributing guidelines.

Summary
The Server URL value is automatically and violently modified to https at all times.
Environment

Operating System: Windows 10 Enterprise 21H2
Mattermost Desktop App version: 5.2.1
Mattermost Server version: 6.7.0

Steps to reproduce

Open Desktop client
Add your server which must be served over plain http://. Something like http://mattermost.company.com
Click Connect/Add (depending on the view you're on)

Expected behavior
Connect to the server and ask for my login credentials
Observed behavior
Client cannot connect to Mattermost

Error: ERR_CONNECTION_REFUSED (-102) loading 'https://mattermost.company.com/'

Possible fixes
Couldn't find any.

I guess it is this:
Fixed an issue where servers were not forced to update their configuration using the configured SiteURL value if available.
changelog 5.2.0
@amyblais @cwarnermm you may update the changelog to clarify this behavior change as it is not the first github issue.

Opened a PR: https://github.com/mattermost/docs/pull/6061


Revert specs2 upgrade

I'll merge this as soon as I see it green, but since this is needed elsewhere, if someone else sees it green first, feel free to merge! :)