Shortcode output wrapped in  tags under certain conditions

Previous related issue 'Shortcode output wrapped in
 tags'  #1148 which was closed with 004fcdd.
Consistent incorrect wrapping of shortcode output under certain conditions
Reported in discuss forum here.
Salient points:

If there is just one shortcode, it doesn't get wrapped in
 tags

If there are multiple shortcodes, the first doesn't get wrapped in
 tags (probably related to above)

In order to ensure no shortcodes are wrapped in
 tags, the final shortcode must be followed by a number of distinct
 tag wrapped lines proportionate to the number of shortcodes in the document.

By that I mean if you have say 6 shortcodes one after the other, you need 16 lines following them in order for none to be wrapped in
 tags. If you have 5 shortcodes one after the other you need 12 lines.

'Lines following shortcode' don't have to come at the end of the document, if you have a series of shortcodes it seems the number of interceeding
 tag wrapped lines are cumulatively ranked towards each consecutive shortcode so if you had 30 lines interspaced between shortcodes throughout the document, as long as each shortcode has at least 5 proceeding lines each, they'll all be spared wrapping.

Related to point 4, the
 tags that get wrapped around shortcodes incorrectly also count towards the number of
 tag wrapped lines needed to follow preceeding shortcodes - so enough shortcodes in a row and you seem to be about to start unwrapping some of the 'first' few in the list.

Length of shortcode title attribute also affects whether output wrapped in
 tags though this has not been investigated in detail

NOTE - I may have miss counted the exact number of lines in between shortcodes, my eyes were actually bleeding...

As another participant in this discussion on discuss.gohugo.io, I can second that I see the above behaviour. I'm also willing to help continue debugging this.

Am a new user... really appreciate the project, is incredibly elegant. Would really like to see bug fixed :)

See 1ce184b7f1df10ad8815dfe891e053eb04f099ea
These test cases are deliberately made green, even if they (probably) should not.
Test case 1-3:

The group of a, b, c shortcodes gets wrapped in a P-tag. This kind of makes sense. Is this correct?
b,c i wrapped, d is not. Inconsistent, but what is correct?
A weird one. This is @PuffinBlue s variant with 5 shortcoes and 12 lines ...

We ran into this as well. We also had the problem, that a markdown list of shortcodes inserted a wrong closing p-tag after an image from within the shortcode.
Would it eventually make sense introduce a param or something like that, that prevents hugo from wrapping shortcode in p-tags?

@AnBauer Hugo doesn't add any shortcodes, we actually try to remove them ... This is coming from Blackfriday (the Markdown engine) ... so a flag wouldn't help ...

You meant p-tags, didn't you? OK, I understood "shortcode output gets wrapped in a P-tag" is a thing, hugo does. Thanks for clarification!

You meant p-tags, didn't you?

Yes.

I also have this issue, although its behaviour is better on Hugo 0.15 but does happen when multiple shortcodes are used on the same page (as already mentioned above). Would love to see Hugo fix the Blackfriday output that adds those 's is that's possible.

First, a workaround:
Create a shortcode wrap.html:
{{ .Inner }}

Then wrap your shortcode sections in that:
{{< wrap >}}
{{< s >}}
{{< s >}}

{{< s >}}
{{< /wrap >}}

I think Hugo should do two things:

Provide an internal wrapper shortcode (name?)
Provide a way to signal that this is a "block level" shortcode and not needed in the Mardkdown evaluation (this is currently links; the ref and relref internal shortcodes)
The "block level" will be the default.

Currently, i have the same problem and i for me the workaround does not work properly. Is there any progress from the hugo-team?

@ahausamm what is the problem with my workaround?

@bep For me, it works only with the  before the shortcodes, the {{ wrap }} does not change anything. But i don't want to have some HTML in the markdown, do you have an example of your working workaround?
{{< go_table >}}
	{{< go_table_row >}}
		{{% go_table_cell %}}
## Cell 1|1
		{{% /go_table_cell %}}
		{{% go_table_cell %}}
## Cell 2|1
		{{% /go_table_cell %}}
		{{% go_table_cell %}}
## Cell 3|1
		{{% /go_table_cell %}}
	{{< /go_table_row >}}
	{{< go_table_row >}}
		{{% go_table_cell %}}
## Cell 1|2
		{{% /go_table_cell %}}
		{{% go_table_cell %}}
## Cell 2|2
		{{% /go_table_cell %}}
		{{% go_table_cell %}}
## Cell 3|2
		{{% /go_table_cell %}}
	{{< /go_table_row >}}
{{< /go_table >}}

{{< go_table >}}
	{{< go_table_row >}}
		{{% go_table_cell %}}
## Cell 1|1
		{{% /go_table_cell %}}
		{{% go_table_cell %}}
## Cell 2|1
		{{% /go_table_cell %}}
		{{% go_table_cell %}}
## Cell 3|1
		{{% /go_table_cell %}}
	{{< /go_table_row >}}
	{{< go_table_row >}}
		{{% go_table_cell %}}
## Cell 1|2
		{{% /go_table_cell %}}
		{{% go_table_cell %}}
## Cell 2|2
		{{% /go_table_cell %}}
		{{% go_table_cell %}}
## Cell 3|2
		{{% /go_table_cell %}}
	{{< /go_table_row >}}
{{< /go_table >}}

gives me this output (first table seems to be okay, second has the  around:

Cell 1|1

Cell 2|1

Cell 3|1

Cell 1|2

Cell 2|2

Cell 3|2

Cell 1|1

Cell 2|1

Cell 3|1

Cell 1|2

Cell 2|2

Cell 3|2

Any ideas?

@ahausamm use plain HTML tables and the {{< -- your use case was not my intented target for my "workaround" ... and It looks like a hack.

@bep okay, thanks for your answer. For me, plain HTML isn't the right solution (for the moment) because i want to have some custom section with custom templates. So i will try another way or simply wait on the next update of hugo.

the workaround from @bep came unfortunately too late for my project, because we already have tons of mds with tons shortcodes in it. what I did was creating a grunt-task, which simply removes all wrong p-tags with a regex :-)

In my case a temporary workaround is to wrap each shortcode in a block-element for example a div

{{< shortcode >}}

FYI

I think, the workaround of @maxxscho would be the best workaround for this problem. I had another nice discussion about this problem in the gohugo-forum: https://discuss.gohugo.io/t/single-page-with-nested-content/2645

@maxxscho: nice idea. Unfortunately I have multiple shortcodes already consisting of block elements. And I didn't want html-code in the md files or needless nesting.
These are the patterns for the replace-job  btw. (after htmlmin ran):
patterns: [
    {
        match: /
<(div|section|md-content|h3|ul)(.*?)>/g,
        replacement: '<$1$2>'
    },
    {
        match: /<.(div|section|md-content|h3|ul)><.p>/g,
        replacement: '</$1>'
    }
]

As I think I said before, these "workarounds" should be included in the Hugo core. If we have to add a div to trick Blackfriday, we will remove it afterwords.

@AnBauer: nice one. Can you show me your gulp task, with handles the replacement? :)
Thx!

@maxxscho i think he uses gulp-replace-task (https://www.npmjs.com/package/gulp-replace-task). @AnBauer please correct me if i'm wrong.

@AnBauer actually im wondering how i can use gulp with hugo server -w to create valid html code and replace the "shortcoddmistakes"

I'm using grunt for that. But it should be nearly the same with gulp. Important is to htmlmin before replacing, so all line breaks are deleted. The config for grunt-replace looks like:
replace: {
    dist: {
        options: {
            patterns: [
                {
                    match: /
<(div|section|md-content|h3|ul)(.*?)>/g,
                    replacement: '<$1$2>'
                },
                {
                    match: /<.(div|section|md-content|h3|ul)><.p>/g,
                    replacement: '</$1>'
                }
            ]
        }
    ,
        files: [
            {
                cwd: '<%= dist %>/',
                expand: true,
                flatten: false,
                filter: 'isFile',
                src: ['**/*.html'],
                dest: '<%= dist %>/'
            }
        ]
    }
}

The elements in the regex depend on the project, of course. E.g. I also use angular material, so I needed md-content.
@ahausamm: I have a custom "hugo" - task. When this one ran follows htmlmin and then replacing.

This issue has been automatically marked as stale because it has not been commented on for at least four months.
The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still valuable, please open a proposal at https://discuss.gohugo.io/.
This issue will automatically be closed in four months if no further activity occurs. Thank you for all your contributions.

Note/Update: This issue is marked as stale, and I may have said something earlier about "opening a thread on the discussion forum". Please don't.
If this is a bug and you can still reproduce this error on the latest release or the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.

Thanks for Hugo,
I'm still a Hugo n00b, but I can confirm that I have this problem, about the p-wrapping.
Hugo version: Hugo Static Site Generator v0.20-DEV linux/amd64 BuildDate: 2017-03-13T09:34:48+01:00
Installed using: go get -v github.com/spf13/hugo
shortcodes/aaa.html:

    This is the aaa shortcode

shortcodes/aab.html:

    This is the aab shortcode.
    {{ .Inner }}

page.md variant 1:
+++
+++

{{% aaa %}}
{{% aab %}}
My Markdown content goes here
{{% /aab %}}

Output 1:

    This is the aaa shortcode

    This is the aab shortcode.

My Markdown content goes here

page.md variant 2:
+++
+++

{{% aaa %}}

{{% aab %}}
My Markdown content goes here
{{% /aab %}}

Output 2:

    This is the aaa shortcode

    This is the aab shortcode.

My Markdown content goes here

As you can see by inserting newlines I can move the P wrapping around, but I can't get rid of it in a sane manner.
Again, thanks for working on Hugo, it's awesome.

I can also confirm that this issue still happens on Hugo 0.19. Like Thomas mentioned above, the issue in my case also happens when 'irregular' text is used inside a shortcode. With that, I mean that this text without line endings gives no problem:
{{% note %}}Example text.{{% /note %}}
Renders as:

Example text.

Going beyond regular text in the shortcode introduces the additional
 tags.
{{% note %}}Example text.
And another line.{{% /note %}}

Renders the invalid HTML (according to the w3.org validator) of:

Example text.
And another line.

Likewise, the shortcode use also generates the invalid
 tags:
{{% note %}}Example text.
![Example image](/assets/example.png){{% /note %}}

Example text.

From my understanding, the
 tag issue seems to happen whenever there's a new line (Enter) used in the shortcode, because I have no trouble with
 tags when I include a long paragraph of text inside the shortcode.

Hugo Static Site Generator v0.19 windows/amd64 BuildDate: 2017-02-27T12:36:30+01:00
GOOS="windows"
GOARCH="amd64"
GOVERSION="go1.8"

I can also confirm that I am getting this issue. The content from my _index.md file is as follows:
---
title: 			"Freelance software engineer"
description: 	"Hello. I am a freelance Full-stack software engineer originally from Ireland and based in Berlin, Germany. This is my online portfolio which details my skills, experience and some of the projects I have worked on."
identifier:		"home"
---

## Skills
- Development of mobile applications, both cross platform and native.
- Effective communication skills; training, presentations, documentation and delegation.
- Practice and advocate the highest development standards.
- In–depth understanding of technologies across multiple domains.
- Strong analytical thinking and problem solving skills.
- Life–long learner with strong interest in continuous professional development.

## Languages
{{% taxonomies items="languages" %}}

## Frameworks
{{% taxonomies items="frameworks" %}}

## Infrastructure
{{% taxonomies items="infrastructure" %}}

## Tools
{{% taxonomies items="tools" %}}

I have created a shortcode for taxonomies as follows:
{ $which 	:= .Get "items" }}
{{ $items	:= where .Site.Pages "Section" $which }}

	{{ range sort $items ".Params.proficiency" "desc" }}
		{{ if .Params.proficiency }}

				{{ .Render "card" }}

		{{ end }}
	{{ end }}

I am getting the stray p tags in the generated content as follows:

Frameworks

			Mongoose

I have checked the content itself and the shortcode to see if there are any stray carriage returns. tabs or spaces that shouldn't be there.
I am using Hugo 0.20.0 and the source for my project can be seen at https://github.com/matfin/mattfinucane.com.
The live site where you can see the generated p tags is at https://mattfinucane.com

Found by coincidence: on my project it worked to add
[empty line]

right before the {{< shortcode >}} Hugo stopped generating p-tags in the shortcode after inserting that.
This is a bug and not feature request.
[Hugo Static Site Generator v0.24.1 linux/arm BuildDate: 2017-06-24T10:27:49+02:00]

Any idea when this will be fixed?
is there a functional workaround? All workarounds mentioned above does not work here.
Hugo Static Site Generator v0.24.1 darwin/amd64 BuildDate: 2017-06-29T11:20:08+02:00

Workaround:
{{% grid class="row" %}}
{{% grid class="col-sm-4" %}}
foo
{{% /grid %}}
{{% /grid %}}

{{% grid class="row" %}}
{{% grid class="col-sm-4" %}}
baz
{{% /grid %}}
{{% /grid %}}

was p-wrapped.
With:

{{% grid class="row" %}}
{{% grid class="col-sm-4" %}}
foo
{{% /grid %}}
{{% /grid %}}

{{% grid class="row" %}}
{{% grid class="col-sm-4" %}}
baz
{{% /grid %}}
{{% /grid %}}

the second block of grid was p-wrapped.

{{% grid class="row" %}}
{{% grid class="col-sm-4" %}}
foo
{{% /grid %}}
{{% /grid %}}

{{% grid class="row" %}}
{{% grid class="col-sm-4" %}}
baz
{{% /grid %}}
{{% /grid %}}

solved the pb. Note that there is no more empty lines between the shortcodes (important).

Hello there,
Any news about this bug ?
It's a big issue for us right know, which will prevent us to migrate to Hugo on our production server. Workarounds are too complex for users unfortunately :(
Thank you !

A similar situation:
columns.html:

 {{ .Inner }}

column.html:

Then, when using this:
{{% columns %}}
On the *left*
{{< column >}}
On the *right*
{{% /columns %}}

There is an extra, completely empty

 that gets added only on the second column, making the final result really ugly.

I put @henryiii's comment in a test. This currently is green, but I think you'll spot the issue:
func TestFail(t *testing.T) {
	siteConfig := ""

	th, h := newTestSitesFromConfig(
		t,
		afero.NewMemMapFs(),
		siteConfig,
		"layouts/shortcodes/columns.html",
		`

 {{ .Inner }}

`,
		"layouts/shortcodes/column.html",
		`</div><div class="right">`,
		"layouts/_default/single.html",
		"{{ .Content }}",
	)

	fs := th.Fs

	writeSource(t, fs, "content/shortcode_test.md", `+++
title="test"
+++
{{% columns %}}
On the *left*
{{< column >}}
On the *right*
{{% /columns %}}`)

	err := h.Build(BuildCfg{})

	require.NoError(t, err)

	outputfile := "public/shortcode_test/index.html"
	file, err := th.Fs.Destination.Open(outputfile)

	buf := new(bytes.Buffer)
	buf.ReadFrom(file)
	contents := buf.String()

	fmt.Println(contents)

	th.assertFileContent(outputfile,
		`

On the left

On the right

`,
	)
}

While I tried to make it work, I realized, Hugo or Blackfriday insert a
 tag before it runs the shortcodes. Just remove the virtual shortcode files and you see:

{{%% columns %%}}
On the left
{{< column >}}
On the right
{{%% /columns %%}}

I hope this error get fixed sometime. Hugo can do all kinds of cool stuff, but it still adds unnecessary HTML code.
In my case that means I have to rewrite my content to not trip into this bug, and that shouldn't be the case with a flexible website generator as Hugo.

@Jos512 I found that running HTML Tidy on the Hugo output can fix (and strip) most of the superfluous
 tags.

I use HTML Tidy to validate the output of any markup before publishing.  So in case of any error or warning I'm able to cancel publishing to avoid buggy markup goes outside. So when I used Hugo's shortcodes the first time I got the following HTML Tidy warnings:
Warning: inserting implicit

Warning: trimming empty

After checking my files again and again I updated to Hugo's current master. As nothing helped I checked the issues and found this one. So it's kind of ironic to hear that HTML Tidy could be used as a workaround correcting/modifying the markup.

I believe I'm encountering this issue too.
I have a simple shortcode called "test.html":
{{ .Inner }}
I try to use it inside a paragraph in my Markdown files:
# Heading

{{% test %}}Some text.{{% /test %}}{{% test %}}Some more text.{{% /test %}}{{% test %}}And yet more text.{{% /test %}}

This outputs as:

Heading

Some text.

Some more text.

And yet more text.

This is not only inconsistent (the first span doesn't have an extra
 tag, whereas the others do), but is also invalid, illegal HTML.
This makes shortcodes very frustrating to use, or even entirely unusable.
I tried the {{% wrap %}} solution but it makes no difference in my case.

Another example (related to the one above), and I don't think this is one that HTML Tidy would be able to fix.
Another shortcode template called "test2.html":

{{ .Inner }}</div
Markdown file:
# Heading

{{% test2 %}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.{{% test %}}Some text.{{% /test %}} Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
{{% /test2 %}}

This outputs as:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Some text. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

What I intended and expected was one paragraph containing a bit of text in a span tag. Instead what I got was two separate paragraphs. This breaks the page.

I think I see what's going on here (in my case at least).

{{ .Inner }}

Hugo seems to see the line breaks as a trigger to create new paragraphs. If I uglify my shortcode and compress it down to the following...
{{ .Inner }}

...then suddenly it works fine and doesn't break my paragraphs. However, this makes my files very ugly and hard to maintain, especially when they're more complex than this simple example.
I think this is a bug in Hugo, and that Hugo needs to ignore whitespace when deciding if there are multiple paragraphs or not.

@ChrisTucker2000 thank you for the head up! And you're correct in your hypothesis, by removing the extra white lines the HTML generation become correct. I can reproduce it with my set-up, and I suspect it's partially related to #1778 too (usually, ToCs are plagued by random
 tags).
I think it is possible to fix the issue by disabling specific blackfriday's features during {{% wrap %}} expansion for shortcodes, but it will require the re-write of several Hugo's components. Let's see what @bep has to say.

Hugo seems to see the line breaks as a trigger to create new paragraphs. If I uglify my shortcode and compress it down to the following...

That’s Markdown, not Hugo, no? If you want to use inline shortcodes, I would recommend using the <> rather than the {{}}, but this is starting to get forum-ish in nature...

Maybe it's the Markdown engine. When I say "Hugo", I really just mean "Hugo and all of its internals and dependencies".
I'm a newcomer to this issue and haven't been following it until now, but I did search around before and I came across old issues where a blocks/inline option was being discussed for the Markdown processor, and apparently in the end it was set up so that Hugo removes generated paragraphs from the Markdown output if the Markdown is one line. Perhaps I'm mistaken, but that's what I was referring to when I said "Hugo seems to see the line breaks as a trigger..."  and "Hugo needs to ignore whitespace-only blocks when deciding...". I might be misunderstanding things though.
If by <> you mean {{< tags instead of {{%, that resolves the issue but then introduces a new issue in that Markdown no longer functions in the shortcode. Even inline shortcodes can need Markdown support.

I see @ChrisTucker2000 @Jos512 . It was only a question since I haven't been involved in Hugo much for the past half year :smile:

If by <> you mean {{< tags instead of {{%, that resolves the issue but then introduces a new issue in that Markdown no longer functions in the shortcode. Even inline shortcodes can need Markdown support.

Maybe something like this for a param in the {{<>}} shortcode: .Get 1 | markdownify (positional) or .Get "mynamedparam" | markdownify (named). Sorry I can't be of more help.

Here's another simple way to reproduce this issue:
layouts/shortcodes/bug.html:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

content/posts/bug.md:
{{< bug >}}

{{< bug >}}

Resulting html:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

In this case, any of the following prevents the
 tag from being inserted:

Removing a single character from the shortcode, reducing it from 81 characters to 80 characters
Using the shortcode in the post any number of times other than twice
Wrapping each shortcode in the post with a

This bug is still present in 0.46 and none of the above workarounds seem to work for me. I am using sections in my shortcodes and placing them in p makes the markup invalid - which definitely is a showstopper. Does anyone have a pointer to the regex that is supposed to insert these p's?

Complex designs are always messed up because of this.
I have to leave HUGO in favour of another static site builder.

What a shame... but still, ancient template toolkit (TT2) never had problems like this. Might as well migrate back again.

FYI: mmark shows the same behaviour. If it really is a bug in blackfriday and not hugo itself, it has been in there for a long time, als mmark started off as a fork of blackfriday and has not seen much development in the last couple of years.

And, for the record: Same problem with using pandoc instead of blackfriday. At this point I am pretty sure the problem has its roots in hugo itself.

I was happy to see this bug fixed in 0.47. This corrected several cases of
 elements being incorrectly generated in our web site. Sadly, after switching to 0.47, this problem is still occurring in one specific case.
To repro, grab https://github.com/istio.github.io at commit be7c374f297a712fb6e5cd1be98b656a3b52732f and build the site with Hugo 0.47. This is where the error occurs:

./public/docs/examples/multicluster/iks-icp/index.html

7563:6: ERROR: Unexpected end tag : p (line 7563)

The problem with our content is that there was an extra period after a closing shortcode:
{{< text >}}
some preformatted text
{{< /text >}}.
where text is a shortcode that produces a pre/code block. The presence of this period caused a p block to be wrapped around the pre/code sequence:

some preformatted text
</code

which is invalid HTML. Removing the period in the markdown fixed the problem.

In some cases reported above and in my own case, Hugo wraps the second shortcode with p. For example, if there is a markdown like the following,
{{< first-shortcode />}}

{{< second-shortcode />}}

{{< third-shortcode />}}

the markdown will be converted to the following:
The output from first-shortcode

The output from second-shortcode

The output from third-shortcode

A simple workaround for this case is (1) define an empty shortcode like this:
{{ with .Inner }}{{ end -}}

and (2) put the shortcode as the second shortcode.
{{< first-shortcode />}}

{{< empty "Workaround for a Hugo's bug. Don't remove this." />}}

{{< second-shortcode />}}

{{< third-shortcode />}}

@clutterstack. With closed issues, you're likely to get very little (if any) feedback. I would recommend taking your issue to the forums at https://discourse.gohugo.io and get feedback directly from other Hugo users.

@clutterstack pls. see this discussion: https://discourse.gohugo.io/t/solved-empty-p-before-and-after-plain-html-in-markdown-files/5559
You must handle your shortcodes like block elements.

@rdwatters @christophlieck Thanks for your comments -- in fact, I hadn't expected any feedback! I'm sure I've done something simple wrong in my own theme templates.
I commented because my comment would been helpful to me, had I seen one like it in my prior searches. It took me some time to discover that my problem was not with my shortcode or the way I was using it in markdown files.

I just came across this when looking for a solution to remove  elements from around the  {{ .Content }} when it is generated. it seem hugo or blackfriday assumes you need these. I am using hugo to generate a site.
I have  wrapped in my markdown file at the start and finish. not really using hugo for mark down but for keeping html code in every file so it will generate a site with header and footers in every file.
To remove them for a generated site i find a sed command on linux in my hugo project. This will remove the paragraph elements. I have to do this every time i generate the site. Here are the commands I use.
find public -name "*.html" -exec sed -i 's/
//' {} \;
find public -name "*.html" -exec sed -i 's/<\/body><\/p>/<\/body>/' {} \;


Jesse: Watch scholarstudysolution.com

Jesse requests the watch of the watch_keyword scholarstudysolution\.com. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

scholarstudysolution\.com has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by Spevacus in Charcoal HQ


Lock pip

No trust to pip anymore! Every release breaks things, and it's better to fix compatibility when I have time, not when PyPA ready to release a new version.

Is there any reason other than that one pip issue to avoid pip 20? Because that seems like a general reason to not use pip 20, not dephell-specific... and it seems to only affect PyPy, not CPython users.


How to provide DIR/File permissions while extracting the package

Hi,
Could anyone please explain the way to use the dir/ file permissions while extracting the zip package just like in the following library:
https://github.com/maxogden/extract-zip
Thank you very much.

What kind of mode are you talking about? extract-zip uses mode passed by options. Why do you need this?

Hi,
I experienced some libraries that did not extract the files and directories in the macOS file system because of the file permission error. It could not create the required folders.
So I selected the extract-zip and using the option with 775 I could extract the package without any errors.
The problem is, that it has no extract progress and I see this library has the progress that can use to create a progress bar.
So I wanted to try this library and before using it I just wanted to know that this library will work with macOS file systems with file permission.
Thank you very much.

It works on Mac OS

Thank you very much,
I will try and come with the feedback.
If every thing goes normal I will close the issue.


problem can upgrade

@jow- or other
/usr/lib/lua/luci/dispatcher.lua:578: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
	[C]: in function 'pairs'
	/usr/lib/lua/luci/dispatcher.lua:578: in function 'createtree'
	/usr/lib/lua/luci/dispatcher.lua:247: in function 'dispatch'
	/usr/lib/lua/luci/dispatcher.lua:121: in function </usr/lib/lua/luci/dispatcher.lua:120>

dom@machina:~/Pulpit/Projekty/WNDR4700-LEDE-REBOOT$ scripts/getver.sh
r4696-df3295f
LuCI is actual date time and update from old LuCI Master (git-17.225.68218-09e0519) - saved configuration.
EDIT: 2 restart (disable some daemons/program: transmission, netserver, hd-idle, pptpd, openvpn, relayd from init) and...work properly - I don't understand.

You have likely bad or missing config for some LuCI app, e.g. luci statistics.
A faulty app config can prevent LuCI from loading, if the app creates the menu items on the fly depending on the installed/enabled submodules (like luci statistics)


Python 3.6 cannot import WinUsbPy module

in File winusbpy.py line 12 the letter 'L' in the GUID throws exception.
in the same file the indentation rules are violated from line 176.

these two issues make it not importable in the source code. Please fix it. I uploaded my corrected version as attachment.
winusbpy.txt
However the API seems not to work for me, because it does not find any of my USB devices which I can have access in C++ using the WinUsbApi.

I ran into the same issue, needing to fix indentation and the GUID size.
Furthermore, the api is not finding my USB devices either - I get an invalid handle when trying to invoke SetupDiGetClassDevs and SetupDiEnumDeviceInterfaces.

This fork
https://github.com/Vlastbia/WinUsbPy
are working in python 3, but

not in python x64 (?)
perhaps some code should be improved:

in winusbutils.py
def is_device(vid, pid, path):
#example: vid, pid = "VID_13AB","PID_0050" #strings to find in path.upper()
    path = path.upper()
    return path.find(vid) != -1 and path.find(pid) != -1

in winusbpy.py
    def read(self, pipe_id, length_buffer):
        read_buffer = create_string_buffer(length_buffer)
        bytes_read = c_ulong(0)
        result = self.api.exec_function_winusb(WinUsb_ReadPipe, self.handle_winusb,
            c_ubyte(pipe_id), read_buffer, c_ulong(length_buffer), byref(bytes_read), None)
        if result != 0:
            return read_buffer[:bytes_read.value]
        else:
            return None


Multi domain hosting, relative links

Enable multi domain hosting
check for options to use relative links, wherever possible

Relative links can't be workingi in the feed, as it there have to be absolute links.
For multi domain hosting use a redirect from one domain to the other.


refactor(http): return poll more

[x] The commit messages match the guidelines

Disclaimer: Modifies unsafe (very slightly) in read_from_io
Summary: Its a pretty big CR, but I just change the types around.
More stuff:
Ideally, io and decoder would not be coupled, but that is above my pay grade.
conn -> io, decoder
Currently, this is what the dependencies look like:
conn -> decoder -> io
conn: Uses Poll
decoder:  Does not use Poll
io: Should use Poll
So I need to push Poll through decoder which, on the one hand, kinda sucks because there are more characters around, and it makes the tests harder to write. On the other hand, its the only good way to refactor Buffered to use things like AsyncRead and AsyncWrite.
Thoughts?

Thanks @yazaddaruvala!

Lol I was just typing up a comment asking if you wanted me to make smaller CRs.
But actually, do you prefer more bite sized CRs so you can do them at a glance or larger ones like this?

Either is fine. I do prefer that a PR be focused, if possible, but size isn't an issue.


CDAT migration: Fix African easterly wave density plots in TC analysis and convert H20LNZ units to ppm/volume

Description

Related to #851 -- looks like I already addressed this on cdat-migration-fy24 but I refactored it a bit more
Related to #874
Relatedt to #871

Checklist

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] My changes generate no new warnings
[x] Any dependent changes have been merged and published in downstream modules

If applicable:

[ ] New and existing unit tests pass with my changes (locally and CI/CD build)
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] I have noted that this is a breaking change for a major release (fix or feature that would cause existing functionality to not work as expected)

@tomvothecoder I think the changes in .cfg files for H2OLNZ units change are not brought in this PR: #874 (files)

For that specific PR, the changes are already here. Example: https://github.com/E3SM-Project/e3sm_diags/blob/3df16d2266c98f526fe03ebeecb68c6170d61618/e3sm_diags/driver/default_diags/zonal_mean_2d_stratosphere_model_vs_obs.cfg#L65-L75
I rebased the dev branch on the latest main, which pulls in changes to .cfg files. I don't need to update any .cfg files in this PR.

@tomvothecoder Just a heads-up that this PR is also just merged: https://github.com/E3SM-Project/e3sm_diags/pull/879  and we need to bring to migration branch..

@tomvothecoder Just a heads-up that this PR is also just merged: #879 and we need to bring to migration branch..

Done


styled-components error when used in a yarn workspace

There is something really strange going on when using patternplate, styled-components and yarn workspaces together. I created a repro to debug it with no luck yet.
What happens:
When using patternplate with styled-components in a workspaces project sc emits the following error on the server as soon as a pattern is rendered.
Warning: Failed context type: Invalid context `__styled-components-stylesheet_
_` supplied to `Component`.
    in styled.div
    in Unknown
    in StyleSheetManager

Also notice that the injectGlobal style (pink bg) isn't SSRd.
What I found out:
If the repo is just patternplate without a workspaces setup everything works fine.
When rendering a demo in a node script in the workspaces setup without patternplate involved everything works fine.

My bet currently is on patternplate‘s compiler resolving styled-components from its nested node_modules for the mono-repository scenario. Haven‘t verified this yet though.

Thought the same after talking to you today but I think there is only one version of styled-components present in the mono repo scenario.
➜  mono git:(master) yarn why styled-componentsyarn why v1.6.0
[1/4] 🤔  Why do we have the module "styled-components"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found<EMAIL_ADDRESS>info Reasons this module exists
   - "_project_#components" depends on it
   - Hoisted from "_project_#components#styled-components"
info Disk size without dependencies: "1.11GB"
info Disk size with unique dependencies: "2.46GB"
info Disk size with transitive dependencies: "6.9GB"
info Number of shared dependencies: 23
✨  Done in 0.87s.

I don't actually think this is what is happening. Only @patternplate/components has a dependency on styled-components and it is actually not installed because @patternplate/client ships its own build.
It would be very strange if it somehow would still resolve to this version of styled-components wouldn't it?

It would be very strange if it somehow would still resolve to this version of styled-components wouldn't it?

True - I am debugging into this and my initial suspicions don't hold true.


Deprecate mikesplain/openvas-docker

Hi,
first of all thanks a lot for providing this container image to the community for so many years!
Unfortunately it didn't get any updates for our newer releases and it is still on OpenVAS 9. This release is completely unsupported and outdated since some years already.
We provide containers directly build from the source code repos at GitHub (see https://hub.docker.com/u/greenbone) and a comprehensive guide for using them (and even to build our software from source) at https://greenbone.github.io/docs/latest/ now. Therefore I kindly ask to deprecate this GitHub repo and redirect the users to our new container images. Your image is still widely used but horribly outdated.
Thanks in advance,
Björn

Too bad the official container doesn't work out of the box (just tried it on a clean vm - same prob as installing by hand, "can't find config" problems, etc.  @bjoernricks - Like many I've tried installing Openvas from the official methods... hit numerous problems, pounded my head for 20+ hours only to no avail.  Turning to the forums reveals others, like me, with the same issues without answers.
Then I found this container, and Immaus' container - they work! I mean no "Failed to find config '...'." or blank pdf reports.

@mikesplain could you please mark this container and repo as outdated? There are still new people using them and coming to our forums with issues. Thanks.


there is no ./prometheus-nginxlog-exporter executable

not clear what to do ...
I cloned the current master and in the Readme there is the usage section:

Use the command-line:

./prometheus-nginxlog-exporter \
  -format="<FORMAT>" \
  -listen-port=4040 \
  -namespace=nginx \
  [PATHS-TO-LOGFILES...]

But i can't find no executable prometheus-nginxlog-exporter. Do i have to build it from go files? (I am not familiar with go)

Dont clone go to release page https://github.com/martin-helmich/prometheus-nginxlog-exporter/releases

I can only reiterate on the previous comment; if you simply want to use the exporter, you're best off with the pre-built binary (only Linux/amd64, currently). If you want to build it yourself (for development, or for other platforms), run either go get github.com/martin-helmich/prometheus-nginxlog-exporter or clone this repository and run go build in the project root.


Add ChipSelect component

Migrate the chip select component we currently have in one of our apps over to this library and update apps to use it.

Syntax should be identical to the existing Select component in this library.

I think it would be best to also update the current component to have checkboxes in the selector, especially for multi-select as it's not immediately obvious what is currently selected.

I think it would be best to also update the current component to have checkboxes in the selector, especially for multi-select as it's not immediately obvious what is currently selected.


Improve user tracking and learn how they use the product

coming from here

We don't measure the success of features. Automated newsletters are being used? What about the Tags? Did they stopped to use the 'Notes' field? Etc... we never know if our deploys have good, bad or any impact on our users. Segment, Analytics, FullStory? Surveys? I don't know..
@fabiennepimenta

We should find some service that helps us with this and implement it. Segment?

Full Story is great to see how people actually use our product, and there is so many companies using it that I don't know how this legal privacy thing works.
If you don't believe me check this list of articles about fullstory: https://medium.com/search?q=fullstory

I believe you, but we are not the ones going to jail if that is not legal. @mmarder can you ask some one about this (full story)? I agree with Fabi it would be incredibly useful. I think we also need some analytics on top of that to see how many people uses each feature. I guess we need to do some research about solutions.

I fully agree with with this point and am very happy that we are doing steps in this direction. We should also not forget to have personal relationships or feedback talks with customers to really understand them and always ask ourselves how we can create value for our customers.

@mmarder I need your help to close this one


Deactivating the NLGenomeSweeper Env

Hi there,
Every time I try to activate the NLGenomeSweeper Env I get this error:
NLGenomeSweeper: command not found
The first time I installed the pipeline seemed good, but I never got where to put the input fasta file (DNA seq data or peptide sequence?)
In a second session, I get the above error: NLGenomeSweeper: command not found. Do I need to install/clone NLGenomeSweeper every time I run it?
Hope you can help me.
Best

Hi,
No, if you go through the whole install process then the next time you only need to activate the environment to use it.


Started to port a few things from Spectre to SpectreKit

Decided to do a few things this Sunday morning, I am trying to stick to your design and style.

@migueldeicaza FYI, I've merged proper cell calculation to main, so you might want to rebase.

Thank you for your review and guidance Patrik!

Merged! Thank you for your contribution. Much appreciated! 👍


FIlter API should provide a mechanism to allow external resources to be cleaned up

Is your feature request related to a problem? Please describe.
As an author of a filter, I might need to allocate  an expensive resources (such as a thread pool executor or maybe a connection to a database).  As the resource's creation is expensive I want it to be scoped to filter's lifetime, rather than the lifetime of an individual request or response.
I need a mechanism for these resources to be closed when the connection is finished.
Describe the solution you'd like
We should consider allowing Filters to implement Closeable.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

FilterFactories now have the ability to free resources. We think this answers the use-case.


Display Allows Even Rune Types on Global Page

I didn't realize these could be customized on the 2/4/6 pages.  My optimizations (unsurprisingly) run SOOOOOO much faster after fixing these configurations they need to be more obvious.

Closing in favor of #49


fire dismiss handler when safariViewControllerDidFinish(control…

I always use it conveniently. Thank you very much.
The dismiss completion did not work when the [DONE] button in Safari was tapped.
Since I had activated of UIActivityIndicatorView before transitioning to Safari, I needed dismissHandler to stop it.
I modified to work the dismissHandler when safariViewControllerDidFinish(:controller) fires.
Thank you for the review.

As you see in the code https://github.com/OAuthSwift/OAuthSwift/pull/558/files#diff-7e098e0e7e63844cfe77523492b6e00eR118 there is a delegate
If you have a special case because of your activity indicator why do not doing in this delegate
because I cannot merge PR if this is not a general behaviour for everyone (that's why I has added the delegate)
You can set it here
https://github.com/OAuthSwift/OAuthSwift/blob/63a4fdac45f7c016814729b49a5b129c1118f059/Sources/Handler/SafariURLHandler.swift#L34


Moving repo to bbc org

Email from David lists a few things that will need to happen for this to be done:

Hi,
Finally had a chance to finish working through this. There are a few niggles to resolve before we move this over:

Change license copyright notice over to BBC

Remove the colorize gem dependency — (we’ve got a license clash MIT/GPL)

Remove usage of circle-ci (I’m waiting for feedback from infosec & legal on whether we can use circle)

Once done, we can this move it to the bbc org, and I’ll add Josh etc in as external collaborators. Plus I’ll need adding as a gem owner.
Thanks,
David

OK @davidbuckhurst I think we're ready to roll. I've added you as a gem owner under your @bbc.co.uk email - which seems to be this user - OK?
Can you check everything else is in order, then let me know and I can move it over.

This is done, we are here!


Polymorphic relations problem: undefined method for nil:NilClass

This issue is a (choose one):

[x] Problem/bug report.
[ ] Feature request.
[ ] Request for support. Note: Please try to avoid submitting issues for support requests. Use Gitter instead.

Checklist before submitting:

[x] I've searched for an existing issue.
[x] I've asked my question on Gitter and have not received a satisfactory answer.
[x] I've included a complete bug report template. This step helps us and allows us to see the bug without trying to reproduce the problem from your description. It helps you because you will frequently detect if it's a problem specific to your project.
[x] The feature I'm asking for is compliant with the JSON:API spec.

Description
I seem to have bumped into a problem with polymorphic relations I'm unable to solve. Here's a description and a standalone bug report describing it. I'm on JR 0.10.2, Rails <IP_ADDRESS> and Ruby 2.6.5.
The model in question is composed of three ActiveRecord models: ContactMedium, Individuals and Organizations and the corresponding JR resources. The latter may have many contact media as party and one contact medium can belong to either kind of party.
The problem comes up when trying to get the individual or organisation as party via the contact media like this: GET /contact-media/1/party
The logic works on ActiveRecord level but not in the JR level.
Using the relationship results in the following error in the included example case:
Internal Server Error: undefined method `downcase' for nil:NilClass
.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/bundler/gems/jsonapi-resources-978f590f85fe/lib/jsonapi/relationship.rb:66:in
`block (3 levels) in polymorphic_types'

The error is similar in the actual app but with a mild difference (that also included in the included pastebin link):
Internal Server Error: undefined method `left' for nil:NilClass
.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/jsonapi-resources-0.10.2/lib/jsonapi/active_relation/join_manager.rb:93:in
`alias_from_arel_node'`

I'm suspecting this behaviour to be a bug. If I'm doing something wrong instead, please let me know. Workaround suggestions also welcome!
Bug reports:
Partial report in pastebin
https://pastebin.com/V0CfEs3F
Standalone bug report using the template
begin
  require 'bundler/inline'
  require 'bundler'
rescue LoadError => e
  STDERR.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
  raise e
end

gemfile(true, ui: ENV['SILENT'] ? Bundler::UI::Silent.new : Bundler::UI::Shell.new) do
  source 'https://rubygems.org'

  gem 'rails', require: false
  gem 'sqlite3'
  gem 'i18n', '= 1.7.0'

  if ENV['JSONAPI_RESOURCES_PATH']
    gem 'jsonapi-resources', path: ENV['JSONAPI_RESOURCES_PATH'], require: false
  else
    gem 'jsonapi-resources', git: 'https://github.com/cerebris/jsonapi-resources', require: false
  end

end

# prepare active_record database
require 'active_record'

class NullLogger < Logger
  def initialize(*_args)
  end

  def add(*_args, &_block)
  end
end

ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')
ActiveRecord::Base.logger = ENV['SILENT'] ? NullLogger.new : Logger.new(STDOUT)
ActiveRecord::Migration.verbose = !ENV['SILENT']

ActiveRecord::Schema.define do
  # Add your schema here
  create_table :contact_media do |t|
    t.string :name
    t.references :party, polymorphic: true, index: true
  end

  create_table :individuals do |t|
    t.string :name
  end

  create_table :organizations do |t|
    t.string :name
  end
end

# create models
 class ApplicationRecord < ActiveRecord::Base
  self.abstract_class = true
end

class ContactMedium < ApplicationRecord
  belongs_to :party, polymorphic: true, inverse_of: :contact_media
end

class Individual < ApplicationRecord
  has_many :contact_media, as: :party
end

class Organization < ApplicationRecord
  has_many :contact_media, as: :party
end

# prepare rails app
require 'action_controller/railtie'
# require 'action_view/railtie'
require 'jsonapi-resources'

class ApplicationController < ActionController::Base
  protect_from_forgery with: :null_session
end

# prepare jsonapi resources and controllers
#

class IndividualsController < ApplicationController
  include JSONAPI::ActsAsResourceController
end

class OrganizationsController < ApplicationController
  include JSONAPI::ActsAsResourceController
end

class ContactMediaController < ApplicationController
  include JSONAPI::ActsAsResourceController
end

class PartiesController < ApplicationController
  include JSONAPI::ActsAsResourceController
end

class ContactMediumResource < JSONAPI::Resource
  attribute :name
  has_one :party, polymorphic: true
end

class IndividualResource < JSONAPI::Resource
  attribute :name
  has_many :contact_media
end

class OrganizationResource < JSONAPI::Resource
  attribute :name
  has_many :contact_media
end

class PartyResource < JSONAPI::Resource
end

class TestApp < Rails::Application
  config.root = File.dirname(__FILE__)
  config.logger = ENV['SILENT'] ? NullLogger.new : Logger.new(STDOUT)
  Rails.logger = config.logger

  secrets.secret_token = 'secret_token'
  secrets.secret_key_base = 'secret_key_base'

  config.eager_load = false
  config.hosts << "example.org"
end

# initialize app
Rails.application.initialize!

JSONAPI.configure do |config|
  config.json_key_format = :underscored_key
  config.route_format = :underscored_key
end

# draw routes
Rails.application.routes.draw do
  jsonapi_resources :contact_media do
    jsonapi_relationships
  end
  jsonapi_resources :individuals do
    jsonapi_relationships
  end
  jsonapi_resources :organizations do
    jsonapi_relationships
  end
end

# prepare tests
require 'minitest/autorun'
require 'rack/test'

# Replace this with the code necessary to make your test fail.
class BugTest < Minitest::Test
  include Rack::Test::Methods

  def json_api_headers
    {'Accept' => JSONAPI::MEDIA_TYPE, 'CONTENT_TYPE' => JSONAPI::MEDIA_TYPE}
  end

  def teardown
    Individual.delete_all
    ContactMedium.delete_all
  end

  def test_find_party_via_contact_medium
    individual = Individual.create(name: 'test')
    contact_medium = ContactMedium.create(party: individual, name: 'test contact medium')
    fetched_party = contact_medium.party
    assert_same individual, fetched_party, "Expect an individual to have been found via contact medium model's relationship 'party'"
  end

  def test_get_individual
    individual = Individual.create(name: 'test')
    ContactMedium.create(party: individual, name: 'test contact medium')
    get "/individuals/#{individual.id}"
    assert last_response.ok?
  end

  def test_get_party_via_contact_medium
    individual = Individual.create(name: 'test')
    contact_medium = ContactMedium.create(party: individual, name: 'test contact medium')
    get "/contact_media/#{contact_medium.id}/party"
    assert last_response.ok?, "Expect an individual to have been found via contact medium resource's relationship 'party'"
  end

  private

  def app
    Rails.application
  end
end

Oh wow, this is great. I just commented on where this behavior was imho introduced, in https://github.com/cerebris/jsonapi-resources/pull/1045#discussion_r542982208 but you actually wrote  a test case!
I think is similar to

https://github.com/cerebris/jsonapi-resources/issues/1105 (same commit, though different error)
https://github.com/cerebris/jsonapi-resources/issues/1160 (same commit)

historically related

https://github.com/cerebris/jsonapi-resources/issues/382

@rafahuaman For now I've taken @bf4's #1349 pr and made a few changes in a test branch, https://github.com/cerebris/jsonapi-resources/tree/bf4_fix_polymorphic_relations_lookup, including a work around that requires additional relationships on the model to help resolve each supported polymorphic type. Like

Oh, that's good news. I never got to te heart of it
On Wed, Mar 10, 2021, 5:09 PM Larry Gebhardt @.***>
wrote:

@rafahuaman https://github.com/rafahuaman For now I've taken @bf4
https://github.com/bf4's #1349
https://github.com/cerebris/jsonapi-resources/pull/1349 pr and made a
few changes in a test branch,
https://github.com/cerebris/jsonapi-resources/tree/bf4_fix_polymorphic_relations_lookup,
including a work around that requires additional relationships on the model
to help resolve each supported polymorphic type. Like
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/cerebris/jsonapi-resources/issues/1305#issuecomment-796270954,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABC4QQXR2HD2D3CWJM362DTC7UYVANCNFSM4KMBNQKQ
.

@lgebhardt Thank you for the reply
I am going to try out the workaround and report back.

Internal Server Error: undefined method `downcase' for nil:NilClass
.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/bundler/gems/jsonapi-resources-978f590f85fe/lib/jsonapi/relationship.rb:66:in
`block (3 levels) in polymorphic_types'

I get this because there could be singleton classes in the ObjectSpace that lack a name. Just need to filter them out:
ObjectSpace.each_object
    .select { Class === _1 }
    .select { _1 < ActiveRecord::Base }
    .select(&:name)

Looks like jsonapi-authorization's support for polymorphic association will be blocked on this issue, as I'm hitting this same case when I try to update the gem to support JR 0.10.x:

https://github.com/venuu/jsonapi-authorization/pull/143#discussion_r938767501


Halva [Bootstrapping and Scaffolding]

Grant Application Checklist

[x] The application-template.md has been copied, renamed ( "project_name.md") and updated.
[x] A BTC address for the payment of the milestones is provided inside the application.
[x] The software of the project will be released under the Apache license version 2.0 as specified in the terms and conditions.
[x] The total funding amount of the project is below 30k at the time of submission.

Hi @ByKeks. Thanks for the new application. Could you add updating your example https://github.com/halva-suite/halva-test-example to the milestone? Also some unit tests might be useful and in general it would be nice if you could integrate a step by step tutorial (maybe as a medium post) to the deliveries. To be honest, it seems to me currently also rather expensive considering the required amount of work.

Hi @Noc2. Yes, I think it's my mistake to leave it behind the scenes in our proposal. I will give an update soon. Thanks for your feedback!

Hi @Noc2, I updated the proposal. Please check it, thank you

@Noc2 Yes, it makes sense and we're following this way, thanks for your advice, it's very helpful. But it will take us time to make it.

Congratulations. As part of the Open Grants Program, we want to help winning teams acknowledge their grants publicly while observing the foundation’s guidelines. To that end, we’ve created a badge for grant-winning teams. Here is a link to the download and guidelines.
If you are interested in making an announcement about your grant and you would like us to broadcast it on our  media channels then please get in touch with us at<EMAIL_ADDRESS>prior to making the announcement (at least two weeks notice is preferred) so that we can coordinate on timing and content.

@Noc2 @RouvenP @mmagician Thanks very much!
We will be back soon, with a ready-made solution and all the necessary documentation

@ByKeks and @stepancher What’s the status of this project? Would you be interested in continuing to work on it?


RECORD file is not encoded correctly if the path contains commas

Example package: pyqtgraph==0.12.4
The RECORD generated by installer looks like:
...
pyqtgraph/colors/maps/CC-BY license - applies to CET color map data.txt,sha256=c97deeeca4ae375a0334bc7f7af5f707aabfcec959c53c783b9f8771d28fd5b3,14990
pyqtgraph/colors/maps/CC0 legal code - applies to virids, magma, plasma, inferno and cividis.txt,sha256=a2010f343487d3f7618affe54f789f5487602331c0a8d03f49e9a7c547cf0499,7048
...

This results in an error when the uninstaller tries to parse this file.
Proposed Solution
Change the API RecordEntry.to_line() to RecordEntry.to_row() -> tuple[str, str, str]. And construct RECORD using csv.writer

Thanks for the fix @pradyunsg. I see this hasn't yet been released yet and we're seeing more of these issues (https://github.com/pdm-project/pdm/issues/1010) due to another project which includes files with commas (https://pypi.org/project/pyqtgraph/#files)
Would you be able to make a release with this bug fix?


Librelec Nightly (21.0 alpha) Netflix resolution 540p max

Netflix add-on version
1.22.1
Operative systems used
LibreELEC
Kodi version used
Other (specify in description)
Description of the bug
Hi.
Since last Friday I have been limited to a resolution of 540p on Netflix.
I'm running the Latest Librelec Test Build. Kodi 21.0 alpha.
InputStream Adaptive: <IP_ADDRESS>
Steps to reproduce the behavior
Open Netflix Addon.
Select any title and try to play it.
Max resolution available is only up to 540p
Debug log - mandatory
https://paste.kodi.tv/arosifolen.kodi
Possible fix
No response
Additional context
No response
Screenshots

I have another piece of information.
I do own a Vero 4K (OSMC) running Kodi 20.1 and I went to test with it since it has been a while since I haven't used it for Netflix playback.
I updated to the latest Widevine mandatory and it still running Kodi Netflix Addon version 1.22.0.
The resolution being offered goes up to 1080p.
I noticed that an update to Netflix Addon is being offered to the same version I'm already running on LibreElec v 1.22.1
I will update this bug report with new informations after upgrading the addon to the latest version.

I have updated Netflix Addon to the latest version 1.22.1 on my Vero 4K (OSMC) running Kodi 20.1
It didn't affect the resolution. I'm still getting max res up to 1080p.

It seems to be only affecting LibreElec running the latest 21.0 alpha.
As of now, that is all I can report.
Hope this helps.

Same max 960x540 behaviour observer on CoreElec 21 NE nightly too

reset ESN should works
anyway no other solutions


BaseModel has default properties

Bug report
Describe the bug
Hello, To bind a Table to a Model we should inherit from BaseModel, I think we should remove the default properties like InsertedAt, UpdatedAt and Status
To Reproduce

Create a new table without the date timestamps (inserted_at, updated_at) and status
Create a model inherit from BaseModel

Expected behavior

Model without the extra properties (InsertedAt, UpdatedAt, Status)

Thank you very much

Agreed! Good call. Fixed in 75d67a5


Update to Blue icon

For better identification between upstream and downstream operators we use blue icons upstream and red icons for downstream.

There are two failing e2e tests probably due to quorum guard with OCP 4.11 (or the PDB API upgrade) which is irreverent to this PR change of the icon.

/lgtm
/override ci/prow/openshift-e2e

/cherry-pick release-0.12


Lines added to yml show up as modifications of surrounding lines.

(1) A description of the issue. A screenshot is often helpful too.

I expected to see 2 lines added only and no changes around foo-assets.
(2) A copy of what you're diffing. If you're diffing files, include
the before and after files. If you're using difftastic with a VCS
repository (e.g. git), include the URL and commit hash.
first file (yml):
stacks:
  us-east-1:
    foo-assets:
      template: foo_assets.rb
    # foo-database-v2: # Commented out due to drift. See template for details.
    #   template: foo_database_v2.rb
    foo-database-security-group:
      template: security_group_single_port_access.rb

second file (yml)
stacks:
  us-east-1:
    foo-assets:
      template: foo_assets.rb
    foo-database-parameter-group:
      template: foo_database_parameter_group.rb
    # foo-database-v2: # Commented out due to drift. See template for details.
    #   template: foo_database_v2.rb
    foo-database-security-group:
      template: security_group_single_port_access.rb

It seems that removing the comment already messes it up.
(3) The version of difftastic you're using (see difft --version) and
your operating system.
0.27.0, running on darwin.
(also there after updating to 0.37.0)
Running through git external diff

Are you sure you're seeing the same behaviour for 0.37? I'm seeing this on 0.37:

It's not perfect (the colon being shown as changed is odd), but it's better than the screenshot you showed.


Improve performance when resolving the workspace root

Checklist

[x] I have filed an issue about this change and discussed potential changes with the maintainers.
[ ] I have received the approval from the maintainers to make this change.
[x] This is not a stylistic, refactoring, or cleanup change.

Please note that the maintainers will not be reviewing this change until all checkboxes are ticked. See
the Contributions section in the README for more
details.
Discussion thread for this change
Issue number: 5719
Description of this change
We have pretty big bazel project, and we are using the rule_jvm_external pinned feature, which download all the external dependencies to the {baze-base}/external dir.  The external folder could grow very big. One example the smallest cache folder for us:
% echo "Total directories:" $(find {root}/.cache/bazel/arm64/96fb5a4ccfb8aa9cafd25443b98fa7e6/external -type d | wc -l) && du -sh {root}.cache/bazel/arm64/96fb5a4ccfb8aa9cafd25443b98fa7e6/external

Total directories: 54733
5.8G	{root}/.cache/bazel/arm64/96fb5a4ccfb8aa9cafd25443b98fa7e6/external

The original logic when resolving the dependency label,  it loops through the entire {baze-base}/external dir, and check if the file is dir, then create a map for with the workspaceName as key and its dir path as value. Which when the external is really big the IO operation could hang there for a long time cause the IDE freeze.
This change use the {baze-base}/external/{workspaceName} to construct the workspace root dir. And if it existed then construct the WorkspaceRoot and return.

Fixing the test

The ExternalWorkspaceReferenceTest test failed, bc i checkfile.exist()here and here  before i return the workspaceRoot. However in the test TestFileSystem creates the PsiFile does not seem to create file in the test dir? Any suggestion?

The ExternalWorkspaceReferenceTest test failed, bc i checkfile.exist()here and here before i return the workspaceRoot. However in the test TestFileSystem creates the PsiFile does not seem to create file in the test dir? Any suggestion? Once I removed the file exist check the tests all passes.

@sgowroji do you have any suggestion on this? in the test it create a VirtualFile by TempFileSystem. Which the file does not exist. But in my code I need to check the file exist before return. I checked the code base didn't see an example in the test to handle this case. Any suggestion would be appreciated

@mai93 i have fixed the tests. All of them care due to the mock set up. Please take a look. Thanks!

LGTM from me, @tpasternak if you have time can you review this?

yep, I'll try it later today

Also I found this bug:

Import https://github.com/bazelbuild/bazel
Open the top-level BUILD file

Ok, this probably happens, because when you run sync, the blazeProjectData entry might be null so the null is written to the cache
https://github.com/bazelbuild/intellij/blob/eda0807688780d89bf934ec8f0368791b584e7a7/base/src/com/google/idea/blaze/base/sync/workspace/WorkspaceHelper.java#L200-L203

The local map cache should help on this maybe. although before the blazeProjectData finish init the workspace root is not working. But when it query again once it is initialized it should work. Wonder how is the old implementation do with this case? seems there would be NPEs. And once the map is cached to the SyncCache it will not be modified, so it might be recover.


Test suite requires CAP_NET_RAW

The test suite needs to check to see if can open raw sockets. If it cannot, don't do any of the tests for datagrams with a spoofed address.

Resolved with 29c695a4f0d129378464872b96ae720a94e3e3c6


updated README.md and colors.ipynb, added images

resolves #46

Section on how to customize colors was added to README.md
All broken SVG images were fixed in colors.ipynb
Minor: Unneeed comment removed in colors.py

Thanks!


Passing Between Stages Is Not correct

The example for passing a variable from a deployment task across stages is incorrect as is. However, even with the proper syntax it still does not work. Please update the example with a working way to pass vars between a deployment job and a stage

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

ID: 5aeeaace-1c5b-a51b-e41f-f25b806155b8
Version Independent ID: fd7ff690-b2e4-41c7-a342-e528b911c6e1
Content: Deployment jobs - Azure Pipelines
Content Source: docs/pipelines/process/deployment-jobs.md
Product: devops
Technology: devops-cicd-process
GitHub Login: @juliakm
Microsoft Alias: jukullam

@dirtygooback Thanks for your question - Is there a specific error in the example? What error do you get attempt it? Any additional information could be helpful.

I believe that this was solved in this commit: https://github.com/MicrosoftDocs/azure-devops-docs/commit/b2a87addbb2095c9af2d24e99d449fe396dbb90d


How "development-output" file being available if Azure resource setup manually?

It seems not clear if such file would be available if Azure resource setup in portal.  "In addition to the resources mentioned above, following items are also created in the 'deployment-output' file share in your storage account, for use in quickstarts and tutorials:"  So if Azure resource manually, this section is ignored but creating individual files under each folder. Please comment.

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

ID: 19b515e2-02f2-5ee2-36e4-1974eb15c046
Version Independent ID: e7d17bcd-246a-c81f-2aa3-ebb6207a5757
Content: Azure Video Analyzer Visual Studio Code extension - Azure Video Analyzer
Content Source: articles/azure-video-analyzer/video-analyzer-docs/create-pipeline-vs-code-extension.md
Service: azure-video-analyzer
Sub-service: video-analyzer-subservice
GitHub Login: @Juliako
Microsoft Alias: juliako

@michaelcwang2  - Thanks for bringing this to our attention.
I'm going to assign this to the document author so they can update the document accordingly.

#please-close see https://docs.microsoft.com/en-us/azure/azure-video-analyzer/video-analyzer-docs/transition-from-video-analyzer


Support nsis installers for windows

Looks like only msi is recognized as output
https://github.com/JonasKruckenberg/tauri-build/blob/v1.3.0/src/build-project.ts#LL73C1-L73C56

What are the output files extensions for nsis installers? I attempted a fix her #289 but I don't have a windows machine to test this

Exe is the only one I have in the bundle dir but I don't have signing setup so probably your list is fuller.

Well then, go ahead an try using this action from the main branch (aka uses: JonasKruckenberg/tauri-build@main and see if it works)

I've been using my fork with similar commit for 3 months, it works for me https://github.com/JonasKruckenberg/tauri-build/commit/5c69c9fdbb4231a738b4a668a2caddf6af45eab8

I've been using my fork with similar commit for 3 months, it works for me 5c69c9f

Cool it's now supported in the mainline version too :)


Be abel to connect daprd kubernetes services to a daprd hosted only instance

/area runtime

/area operator

/area placement

/area docs

/area test-and-release

If you already have a dapr instance working in kubernetes with several services, is there any way to instanciate a service outside kubernetes (edge/stand alone) that is able to communicate with the services inside kubernetes? (using for instance daprd). How this could be achieved?

Hi @ricardf, you should probably think of your dapr instances as distinct apps with the appropriate security boundaries between them. In general, this means using some kind of ingress service, which can also be daprized. There are some good links on that in https://github.com/dapr/dapr/issues/1976, and also various examples discussed in the Dapr community discord such as Dapr API on cluster ingress controller.

Hi @CodeMonkeyLeet ! thanks for the answer.
The scenario looks like this:

Will check all the options, thanks


Fix CI crashing with test_spacegroup

I've updated the names of the spacegroups in gflownet/envs/crystals/space_groups.yaml such that they correspond to the new conventions in pymatgen=2024.8.9.  All tests pass, but I'm not 100% sure this change doesn't affect some other things in the crystal-gfn. @alexhernandezgarcia or @carriepl if you have a moment to double check that it's all good, that would be very nice 🙏

yes, seems like this crashing is very stochastic, I've tried to fix it with stronger atol, it was still failing, then I removed it and it passed the tests. Meanwhile locally everything worked fine all the time.


deploy failed when project and logstore is specified in yml

If the above is included in the logConfig property, ie:
logConfig:
project: my-logproject
logstore: my-logstore
deploy would failed:
[2021-11-08T15:40:32.191] [INFO ] [FC-DEPLOY] - Checking Trigger httpTrigger exists
[2021-11-08T15:40:32.279] [INFO ] [FC-DEPLOY] - Trigger: httpTrigger already exists online.
[2021-11-08T15:40:32.285] [INFO ] [FC-DEPLOY] - Checking Trigger httpTrigger exists
✖ Make service my-dev...
[2021-11-08T15:40:32.460] [INFO ] [FC-DEPLOY] - Retrying fc: create , retry 1 time
✖ Make service my-dev...
[2021-11-08T15:40:33.527] [INFO ] [FC-DEPLOY] - Retrying fc: create , retry 2 time
✖ Make service my-dev...
[2021-11-08T15:40:36.030] [INFO ] [FC-DEPLOY] - Retrying fc: create , retry 3 time
✖ Project fc-my-dev-my-dev-app failed to execute:
TraceId:     88e9fe74fe3e1636357236033
Environment: @serverless-devs/s: 2.0.92, @serverless-devs/core: 0.1.10, darwin-x64, node-v14.16.1
Documents:   https://www.serverless-devs.com
Discussions: https://github.com/Serverless-Devs/Serverless-Devs/discussions
Issues:      https://github.com/Serverless-Devs/Serverless-Devs/issues
ERROR:
FCInvalidArgumentError: POST /services failed with 400. requestid: 1f2ccc5b-bcbc-40a9-ad35-344167c83a83, message: project 'my-logproject' does not exist.
Please copy traceId: 88e9fe74fe3e1636357236033 and join Dingding group: 33947367 for consultation.
You can run 's clean --cache' to prune Serverless devs.
And run again with the '--debug' option or 's -h' to get more logs.
End of method: deploy
The logstore creation would succeed if I specify: logConfig: auto

应该是您的 https://sls.console.aliyun.com/lognext/profile 的project my-logproject不存在。麻烦到sls的控制台确认下哈

I see. but shouldn't it be automatically created by the tool like in the case of the previous tool: fun ?

https://github.com/devsapp/fc/blob/main/docs/Others/yaml.md#logConfig
you can add setting
logConfig: auto

ya, currently I'm already using this. I can live with this for now.
but submitting this issue here for your tracking and improvements. Because I felt this is a much better tool than funcraft to use.
Keep up the Good work guys. Thanks.

好的好的，感谢您的建议。我记下您的优化建议哈

这个问题在 https://github.com/devsapp/fc/issues/423 这里跟踪哈

Sure, Thanks.
I wonder if can also help to create 'project' if it is also specified but not currently exist.

however, these are Good-to-have features, not urgent as we could use 'auto' for now.
you can focus on more urgent and important features first. Thanks.


added my name to guestbook.md

Added my name to the guestbook.
Loved to be a part of your Coursera course! Love your Star Wars puns though! ;)
Amazing work on this Sean!
With love,
Swarnava Ghosh
India

Thank you!


 The method name is passed as an argument, and the method body is passed into a block.
Why we need something like this? There are situations where end devs want to define a method that are not used anywhere else except to have it serialized into JSON.
Usage:
class UserBlueprint < Blueprinter::Base
  identifier :id
  fields :name
  local_method :age { 30 + 1 }
end

~So currently this works. But I also just now realized that it's use cases are currently narrow without first tackling #33. #33 would allow end developers to pass in custom options from render and utilize that in their blueprint class.~
Update: 10/20
Now object is passed into the block so you can use it like so:
class UserBlueprint < Blueprinter::Base
  identifier :id
  fields :first_name
  local_method(:full_name) do |obj|
    "#{obj.first_name} #{obj.last_name}"
  end
end

Just pushed a commit that would pass the object into the block. So can do this:
      local_method(:full_name) do |obj|
        "#{obj.first_name} #{obj.last_name}"
      end

We also should discuss more about this. Whether there is an alternative to calling it local_method, or if there is a better way all together.

All we're attempting to do is define a field in a different way, so instead of the implied mapping between the field and the object, we're just intercepting and defining a field explicitly.
fields :first_name, :last_name
field(:full_name) do |obj|
  "#{obj.first_name} #{obj.last_name}"
end
field(:age) { 30 + 1 }

Really like that idea @AllPurposeName, I'll go ahead and update this pr with it.

@philipqnguyen is there any way to call a local method without defining a block? something similar to
field :age

def age
  18
end

the reason I ask is because sometimes the block can be large, so it's nice to break it into its own method. but a method that is only used in the serializer and not in the model (as mentioned in your PR summary).

@trivedi
You can do
field :age do
  age
end

def self.age
  18
end


Add exec command and refactor list

Next step is to support generic actions

This PR also depends on you having a service account named apb which comes from running the following commands:
$ oc create serviceaccount apb
$ oc create rolebinding apb --clusterrole=admin --serviceaccount=<target_namespace>:apb


feat(apps/staging/prow): update jenkins-operator with built from PR code

PR: https://github.com/kubernetes/test-infra/pull/27856
Building:

make build-single-image PROW_IMAGE=prow/cmd/jenkins-operator REGISTRY=hub.pingcap.net/ee
make push-single-image PROW_IMAGE=prow/cmd/jenkins-operator REGISTRY=hub.pingcap.net/ee

/lgtm


Switch to warnings instead of errors

By default, now produce warnings when failing "SHOULD"s instead of errors
Remove "--lax" option, add "--strict" option for the old behavior (errors instead of warnings)
Update documentation

Resolves #5 and resolves #7.
Addresses part of #8.

Looks great! Thanks


Proposal: Add mnemonics to context menu items

On Windows systems it looks like context menu items don't have accelleration characters assigned to them. Getting used to accessing context menu items by using the keyboard it would be an improvement to see the acceleration character displayed along with the context menu immediately.
So I suggest to display a context menu item's acceleration character along with the context menu.

@jrieken Something to consider for the menu items story?

Yeah, but I don't really know we would dedupe them?

this is now possible with the new custom menus, though not yet enabled. we just need the context menu service to properly set the options on the menu to enable mnemonics


chore: release main

:robot: I have created a release beep boop
db-service: 1.6.4
1.6.4 (2024-02-28)
Fixed

cqn2sql: smart quoting also for update statements (#475) (1688f77)
INSERT with first undefined value (#484) (c21e3c4)
Allow SELECT.join queries again with full infer call (#469) (5329ec0)
optimize foreign key access in a join relevant path (#481) (5e30de4), closes #479

hana: 0.0.6
0.0.6 (2024-02-28)
Added

cds.Vector support for the HANAService (#442) (1057a13)

Fixed

TypeError for cds bind in MTX scenario (#482) (38722fe)
Allow SELECT.join queries again with full infer call (#469) (5329ec0)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/cap-js/cds-dbs/releases/tag/db-service-v1.6.4 :sunflower:

:robot: Release is at https://github.com/cap-js/cds-dbs/releases/tag/hana-v0.0.6 :sunflower:


Update type compat tests for 7.2

Following https://eng.ms/docs/experiences-devices/opg/office-shared/fluid-framework/fluid-framework-internal/fluid-framework/docs/on-call/release/release-minor instructtions to update type compatibility tests

@agarwal-navin says the backcompat failure in container-runtime is a false positive.


Links to further details, e.g. A3

User story
As a user I want to add links to relevant information, e.g. A3 so that I can know about connected information
Dependency
#175
Relevant links

HowTo
A3
problem grouping
ARIS

Additional context
MVP idea: Links in ideas

Duplicate of #175


Create mutation for toggle tag selected or unselected for tag recommendation

For selected tag recommendation, we will need:

create mutation for toggle tag
add a field selected for Tag type

Close it since PR is merged.


every endpoint function asks for an api_token

All of the endpoint functions exported by libmalan require a MalanConfig object for the first argument. This means every endpoint asks for an api_token key, even when the intent of the endpoint is to generate an API token. When combined with the README.md's examples, it's easy for devs to fall back on a global config object with the potential to leak tokens. I've seen it happen twice so far.
A naive fix might be to make MalanConfig.api_token optional. This would make the typing less useful on endpoints that do require an API token. It would be nice if each endpoint was precise about what it needed.
My instinct would be to solve this by storing the host value ahead of time, whether by class or closure or global. This would leave the api_token to be requested by the endpoint functions that need it.

@cainlevy  Yeah I agree this is definitely something that can be improved.  When I originally wrote this lib it was just being used from a React SPA, which had a single user logged in, so sticking the MalanConfig in redux and pulling it out to call the API was nice and convenient.  It (along with other redux state) could also be serialized/deserialized trivially into session storage.  It also kept the library functional and stateless where functions operated only on their arguments and don't rely on side effects or previously established state.
However I agree, that pattern is definitely sub-optimal (and encouraging of bad behaviors) for calling from a backend service that supports multiple users.  So, something should be done!  Ideally it would be great if we could accommodate both approaches without a bunch of code duplication and/or higher complexity from too many ways of doing things.   :thinking:
The closure approach appeals to me, but I'm too much of a typescript n00b to envision how that would work with typing.  Having a class that basically wraps the api token and a couple other convenience things, which passes the malan config in seems like it would be a fairly simple approach.  The biggest downside is that for each function there'd be one in the class and one in the module.  I hacked out a quick pseudo-codish version to get a feel, and idk :shrug:
class Malan {
  hostname: string;
  api_token: string;

  constructor(hostname: string, api_token?: string) {
    this.hostname = hostname;
    this.api_token = api_token;
  }

  getConfig() {
    return {
      hostname: this.hostname,
      api_token: this.api_token
    }
  }

  /* login function updates the api token for this instance */
  login(username: string, password: string, expires_at: datetime): void {
    const resp = libmalan.login(username, password, expires_at)
    if (resp.success) {
      this.api_token = resp.data.api_token;
    } else {
      throw MalanError("failed login or something like that");
    }
  }

  /* The rest of these methods are just wrappers around the module functions */

  getUser(id: string): User {
    return libmalan.getUser(this.getConfig(), id);
  }

  listUsers(): [User] {
    return libmalan.listUsers(this.getConfig());
  }

  // something similar to the above for each function in users/sessions
}

Do you have any ideas?

Had a thought, maybe I'm way over thinking the problem.  If already have an api_token for the user it would be stored somewhere like in a db column right?  There's a common pattern I've used before in other apps, what about a functions like this somewhere:
function malanConfig(api_token: string = '') {
  return {
    hostname: process.env.MALAN_HOSTNAME,
    api_token: api_token
  }
}

// To call malan
malan.createUser(malanConfig(), user_params) // no api token needed
malan.login(malanConfig(), "username", "password") // no api token needed
malan.whoami(malanConfig(user.api_token))
malan.whoamiFull(malanConfig(user.api_token))  // basically same as getUser() but uses the user ID of the token owner
malan.getUser(malanConfig(user.api_token), "someusername_or_id")

It would be nice if each endpoint was precise about what it needed.

Yeah I think that's a great idea.  After reading what you wrote again, do you think that would fix the original problem of devs saving API tokens into a global thing that can leak and have race conditions?

When I originally wrote this lib it was just being used from a React SPA, which had a single user logged in, so sticking the MalanConfig in redux and pulling it out to call the API was nice and convenient.

Ooo, this is helpful context.

If already have an api_token for the user it would be stored somewhere like in a db column right?

The client stores a token in local memory, then sends it to the API on every request via the Authorization header. The API parses the token out and exchanges it for a malan ID, which we use to find the current user. At that point we don't have any further use for the token and leave it for GC.
In our setup, it's just a session token. We don't currently make any other requests to Malan on the user's behalf.

do you think that would fix the original problem of devs saving API tokens into a global thing that can leak and have race conditions

I think there are two contributing factors. I'm revising these a bit based on what you've clarified:

the pattern in README.md, which is probably from the single-user browser client days, suggests a mutable global
the functions promote passing an api token all the time, which is most easily satisfied with a global

The config factory pattern you wrote would mitigate both of those factors somewhat, I think, but I'm wondering if there's a way to build the best practices into the syntax. Ideally it would be hard to get wrong.
I think the first step might be moving the api_token out of configuration. Configuration is usually a static thing, especially in a server client where developers are used to extracting configuration into ENV vars. Every other client we use has provisioned credentials, so it's easy to bring the wrong expectations when supplying MalanConfig.
The second step could just as easily be a naming thing. Consider:

malan.getUser(config, id)
malan.getUserByToken(config, token)

Having a class that basically wraps the api token and a couple other convenience things, which passes the malan config in seems like it would be a fairly simple approach. The biggest downside is that for each function there'd be one in the class and one in the module.

Not the worst outcome! It's a bit of tedium for the library maintainer.
How do you feel about partial application? It could result in slightly less boilerplate:
function createUser(config) {
  return (id) => {...}
}

function MalanClient(config) {
  return {
    createUser: createUser(config),
  }
}


[ERROR] java.io.EOFException: Expected to read bytes from the stream (in PE Analyzer)

dep-check version - latest
log:
[INFO]
Dependency-Check is an open source tool performing a best effort analysis of 3rd party dependencies; false positives and false negatives may exist in the analysis performed by the tool. Use of the tool and the reporting provided constitutes acceptance for use in an AS IS condition, and there are NO warranties, implied or otherwise, with regard to the analysis or its use. Any use of the tool and the reporting provided is at the user’s risk. In no event shall the copyright holder or OWASP be held liable for any damages whatsoever arising out of or in connection with the use of this tool, the analysis performed, or the resulting report.
   About ODC: https://jeremylong.github.io/DependencyCheck/general/internals.html
   False Positives: https://jeremylong.github.io/DependencyCheck/general/suppression.html
💖 Sponsor: https://github.com/sponsors/jeremylong
[INFO] Analysis Started
[INFO] Finished Archive Analyzer (2 seconds)
[INFO] Finished File Name Analyzer (0 seconds)
[ERROR] ----------------------------------------------------
[ERROR] .NET Assembly Analyzer could not be initialized and at least one 'exe' or 'dll' was scanned. The 'dotnet' executable could not be found on the path; either disable the Assembly Analyzer or add the path to dotnet core in the configuration.
[ERROR] ----------------------------------------------------
[INFO] Finished Python Distribution Analyzer (0 seconds)
[WARN] An error occurred while analyzing '/packages/TsiBaseCoreArchitectureLayer/branches/7.8.0/Assemblies/Dapper/Dapper.dll' (PE Analyzer).
[WARN] An error occurred while analyzing '/tmp/dctemp169cae1d-b452-4ffe-bf4e-0bd8f5a6761b/check2297777766337451746tmp/1/packages/TsiBaseCoreArchitectureLayer/branches/7.8.0/Assemblies/Dapper/Dapper.dll' (PE Analyzer).
[INFO] Finished PE Analyzer (0 seconds)
[INFO] Finished Dependency Merging Analyzer (0 seconds)
[INFO] Finished Version Filter Analyzer (0 seconds)
[INFO] Finished Hint Analyzer (0 seconds)
[INFO] Created CPE Index (2 seconds)
[INFO] Finished NPM CPE Analyzer (2 seconds)
[INFO] Created CPE Index (2 seconds)
[INFO] Finished CPE Analyzer (3 seconds)
[INFO] Finished False Positive Analyzer (0 seconds)
[INFO] Finished NVD CVE Analyzer (0 seconds)
[INFO] Finished RetireJS Analyzer (7 seconds)
[INFO] Finished Vulnerability Suppression Analyzer (0 seconds)
[INFO] Finished Dependency Bundling Analyzer (11 seconds)
[INFO] Analysis Complete (29 seconds)
[INFO] Writing report to: /builds/devops/svd/sonar/owasp/dependency-check-report/dependency-check-report.xml
[INFO] Writing report to: /builds/devops/svd/sonar/owasp/dependency-check-report/dependency-check-report.html
[INFO] Writing report to: /builds/devops/svd/sonar/owasp/dependency-check-report/dependency-check-report.json
[INFO] Writing report to: /builds/devops/svd/sonar/owasp/dependency-check-report/dependency-check-report.csv
[INFO] Writing report to: /builds/devops/svd/sonar/owasp/dependency-check-report/dependency-check-report.sarif
[INFO] Writing report to: /builds/devops/svd/sonar/owasp/dependency-check-report/dependency-check-junit.xml
[ERROR] java.io.EOFException: Expected to read bytes from the stream
[ERROR] java.io.EOFException: Expected to read bytes from the stream

any ideas? :-(

Hi @itsecforu :wave:
How are you using dependency-check? Ant Task? Command Line Tool? Gradle Plugin? Jenkins Plugin? Maven Plugin? SBT Plugin?
Could you please provide a sample reproducing the issue and/or debug logs of the failure?

latest docker version via gitalb ci:
/usr/share/dependency-check/bin/dependency-check.sh \
        --data /data \
        --out $OWASP_REPORT_DIR \
        --log depcheck.log \
        --project \"$PROJECT_NAME\"  \
        --format \"ALL\" \
        --nodeAuditSkipDevDependencies true \
        --disableYarnAudit \
        --disableOssIndex \
        --noupdate \

We would need a sample DLL that causes the exception and/or the log file (i.e. depcheck.log from your example above).

I am also seeing this behaviour but havn't been able to find a minimum repro yet. I am seeing Error:  Failed to request component-reports in the log after all of the java.IO.EOFException's.


[video_player] SeekTo callback when player seek completion

Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.
List which issues are fixed by this PR. You must list at least one issue.
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist

[ ] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
[ ] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[ ] I read the Tree Hygiene wiki page, which explains my responsibilities.
[ ] I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
[ ] I listed at least one issue that this PR fixes in the description above.
[ ] I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test exempt.
[ ] I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
[ ] I updated CHANGELOG.md to add a description of the change.
[ ] I updated/added relevant documentation (doc comments with ///).
[ ] I signed the CLA.
[ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@googlebot I signed it!

@googlebot I fixed it.

@googlebot I fixed it.

Thanks for the contribution! You’ve checked boxes in the PR checklist above that are not reflected in this PR, so I’m assuming this is a work in progress and am marking it as a Draft. Please review the template and checklist, updating it and the PR as appropriate, and when the checklist reflects the state of the PR as posted please feel free to mark it as ready for review.


python310Packages.pebble: 5.0.4 -> 5.0.6

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python310Packages.pebble is: API to manage threads and processes within an application
meta.homepage for python310Packages.pebble is: https://github.com/noxdafox/pebble
meta.changelog for python310Packages.pebble is: https://github.com/noxdafox/pebble/releases/tag/5.0.5
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 5.0.5 with grep in /nix/store/a6qxrla3vp5fki7iyx3zrd7lrp3h0b31-python3.10-pebble-5.0.5
found 5.0.5 in filename of file in /nix/store/a6qxrla3vp5fki7iyx3zrd7lrp3h0b31-python3.10-pebble-5.0.5

Rebuild report (if merged into master) (click to expand)

6 total rebuild path(s)

6 package rebuild(s)

First fifty rebuilds by attrpath
aocd
cvise
python310Packages.aocd
python310Packages.pebble
python311Packages.aocd
python311Packages.pebble

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/a6qxrla3vp5fki7iyx3zrd7lrp3h0b31-python3.10-pebble-5.0.5 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python310Packages.pebble https://github.com/r-ryantm/nixpkgs/archive/e5617920b161ead2a1e6847b45dedd6b297673a7.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/e5617920b161ead2a1e6847b45dedd6b297673a7#python310Packages.pebble

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/a6qxrla3vp5fki7iyx3zrd7lrp3h0b31-python3.10-pebble-5.0.5
ls -la /nix/store/a6qxrla3vp5fki7iyx3zrd7lrp3h0b31-python3.10-pebble-5.0.5/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

5 packages built:

aocd (python311Packages.aocd)
cvise
python310Packages.aocd
python310Packages.pebble
python311Packages.pebble

Maintainer pings
cc @orivej for testing.

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python310Packages.pebble is: API to manage threads and processes within an application
meta.homepage for python310Packages.pebble is: https://github.com/noxdafox/pebble
meta.changelog for python310Packages.pebble is: https://github.com/noxdafox/pebble/releases/tag/5.0.6
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 5.0.6 with grep in /nix/store/hpngyalkaz4a7rq6vv97srdyzcmb021r-python3.10-pebble-5.0.6
found 5.0.6 in filename of file in /nix/store/hpngyalkaz4a7rq6vv97srdyzcmb021r-python3.10-pebble-5.0.6

Rebuild report (if merged into master) (click to expand)

6 total rebuild path(s)

6 package rebuild(s)

First fifty rebuilds by attrpath
aocd
cvise
python310Packages.aocd
python310Packages.pebble
python311Packages.aocd
python311Packages.pebble

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/hpngyalkaz4a7rq6vv97srdyzcmb021r-python3.10-pebble-5.0.6 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python310Packages.pebble https://github.com/r-ryantm/nixpkgs/archive/af9476b64c24baa6153f34c6230404686c3682c5.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/af9476b64c24baa6153f34c6230404686c3682c5#python310Packages.pebble

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/hpngyalkaz4a7rq6vv97srdyzcmb021r-python3.10-pebble-5.0.6
ls -la /nix/store/hpngyalkaz4a7rq6vv97srdyzcmb021r-python3.10-pebble-5.0.6/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

5 packages built:

aocd (python311Packages.aocd)
cvise
python310Packages.aocd
python310Packages.pebble
python311Packages.pebble

Maintainer pings
cc @orivej for testing.


Uncaught TypeError when creating a new note

I'm using OZ to manage a directory of files with the property date (formatted YYYY-MM-DD). I set the date format in the plugin, and everything looks good. It populates the calendar correctly. However, I have to press the + button twice to get the Create Note dialog. The first time I press it, I get this error:
Uncaught TypeError: Cannot read properties of null (reading 'getHours')
    at createNote (plugin:oz-calendar:30322:43)
    at HTMLUnknownElement.callCallback2 (plugin:oz-calendar:6810:22)
    at Object.invokeGuardedCallbackDev (plugin:oz-calendar:6835:24)
    at invokeGuardedCallback (plugin:oz-calendar:6869:39)
    at invokeGuardedCallbackAndCatchFirstError (plugin:oz-calendar:6872:33)
    at executeDispatch (plugin:oz-calendar:10152:11)
    at processDispatchQueueItemsInOrder (plugin:oz-calendar:10172:15)
    at processDispatchQueue (plugin:oz-calendar:10181:13)
    at dispatchEventsForPlugins (plugin:oz-calendar:10189:11)
    at eval (plugin:oz-calendar:10313:20)
createNote @ plugin:oz-calendar:30322
callCallback2 @ plugin:oz-calendar:6810
invokeGuardedCallbackDev @ plugin:oz-calendar:6835
invokeGuardedCallback @ plugin:oz-calendar:6869
invokeGuardedCallbackAndCatchFirstError @ plugin:oz-calendar:6872
executeDispatch @ plugin:oz-calendar:10152
processDispatchQueueItemsInOrder @ plugin:oz-calendar:10172
processDispatchQueue @ plugin:oz-calendar:10181
dispatchEventsForPlugins @ plugin:oz-calendar:10189
eval @ plugin:oz-calendar:10313
batchedUpdates$1 @ plugin:oz-calendar:22045
batchedUpdates @ plugin:oz-calendar:6715
dispatchEventForPluginEventSystem @ plugin:oz-calendar:10312
dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ plugin:oz-calendar:8614
dispatchEvent @ plugin:oz-calendar:8608
dispatchDiscreteEvent @ plugin:oz-calendar:8585

This issue does not happen when using the "create a note for this date" menu option that comes up when right-clicking a date.
I've reproduced this issue on MacOS. I can't look at the developer console on iOS to confirm the error is present, but I also have to push the + button twice on my iPad.

Do you still have the same issue? If so, can you please let me now what kind of steps you take after you launch the plugin or vault to get the error? Thanks

I updated the plugin this morning, and I no longer see the issue! Thanks!


Expose /status client API for blockchain node monitoring

Summary:

Expose /status client API
Tweak status structure and names
Fix some broken tests

#216

All tests passed. Now merging..

I was a bit late because of other meetings! LGTM!


Enable autoescaping on html templates

This was identified as a risk by a recent IT health check. The change ensures that user input is escaped, preventing any nasties from applying XSS attacks.
Ticket

Could you also add some info to the commit message as to why we're enabling StrictUndefined?

Could you also add some info to the commit message as to why we're enabling StrictUndefined?

Not really? It was there before...

Could you also add some info to the commit message as to why we're enabling StrictUndefined?

Not really? It was there before...

🤦♂ that's what I get for reviewing at 5pm