fmt: add Append, Appendf, Appendln

What version of Go are you using (go version)?
1.16
Does this issue reproduce with the latest release?
Sure.
What operating system and processor architecture are you using (go env)?
N/A
What did you do?
Profiled something that was using Sprintf in a minor way.
What did you expect to see?
Less Sprintf in the profile.
What did you see instead?
So much Sprintf.
The issue here is that most of what's happening is WAY cheaper than allocations. strconv has AppendInt, but that can't do formatting.
It makes sense, for most uses, that fmt.Sprintf is an allocator that produces a string, but there are times when you want formatted-output, but want to write into a []byte. And you can do that with bytes.Buffer and fmt.Fprintf, but creating a bytes.Buffer around a []byte is... an allocation. And fmt.Fprintf does an allocation. (Curiously, if I do fmt.Fprintf into a bytes.Buffer I just made for that purpose, I only get the one allocation.)
What I want: Something like Sprintf, but that can write into a []byte, and can fail gracefully if there's not enough space to write things.
Proposed name: fmt.Snprintf, because snprintf is what you call when you already have a buffer you want written to and you have a length limit in mind.
So, fmt.Snprintf(dest []byte, fmt string, args ...interface{}) (int, error), perhaps. The C standard's answer to "what if n isn't big enough" is "you report the n you would have used if n had been big enough", which exists to allow a single-pass process to figure out how much space you actually need. Alternatively, it could return number of bytes actually written, and if it didn't fit, an error with a concrete type that indicates space needed.
I note, browsing source, that fmt already has fmtBytes, although this doesn't do quite the thing this would need.

You could do this instead of adding new API;
package x_test

import (
	"bytes"
	"fmt"
	"testing"
)

type sliceStealer struct {
	b []byte
}

func (ss *sliceStealer) Write(s []byte) (int, error) {
	if len(ss.b) > 0 {
		panic("multiple calls to Write")
	}
	ss.b = s
	return len(s), nil
}

func FprintfToBytes(format string, a ...interface{}) []byte {
	var ss sliceStealer
	fmt.Fprintf(&ss, format, a...)
	return ss.b
}

func TestFprintf(t *testing.T) {
	s := FprintfToBytes("%d", 10)
	if !bytes.Equal(s, []byte("10")) {
		t.Errorf(`FprintfToBytes("%%d", 10) = %q, want %q`, s, "10")
	}
}

func BenchmarkFprintf(b *testing.B) {
	b.ReportAllocs()
	for i := 0; i < b.N; i++ {
		FprintfToBytes("%d", 10)
	}
}

It looks like an allocation can be eliminated by creating a simpler type locally instead of using bytes.Buffer. Does the allocation with bytes.Buffer happen because of the return of a pointer from inside of bytes.NewBuffer()?

Is there any guarantee that Fprintf does only one write? Also, while that allows me to steal the buffer fprintf used, it doesn't let me write into an existing buffer that I have, which is the really interesting case. For instance, to put a 0-padded value in filename[5:9] or something. The distinction being, with that, BenchmarkFprintf could report 0 allocs/op, theoretically.
So right now, I don't think it's possible to loop on Fprintf without at least one allocation per call...

Also, while that allows me to steal the buffer fprintf used, it doesn't let me write into an existing buffer that I have, which is the really interesting case.

The Write method of your io.Writer could copy the buffer's contents into your existing buffer.
It doesn't mean an extra copy of the data, which is cheap but not free. In any case that should let you avoid the allocation.
Also, I'm not sure the slice stealer is safe. IIRC package fmt pools its buffers, so the buffer passed to Write will be used again by subsequent fmt work.

Also, I'm not sure the slice stealer is safe. IIRC package fmt pools its buffers, so the buffer passed to Write will be used again by subsequent fmt work.

Good point.

fmt.Snprintf(dest []byte, fmt string, args ...interface{}) (int, error)

I think we can simplify the issues about exceeding the size of the buffer by making this
fmt.Snprintf(dest []byte, fmt string, args ...interface{}) ([]byte, error)
That is, just return the byte slice, which will be a new slice if the original cap is not large enough.  People who need to limit the size of the output, which I suspect is less common, can use Fprintf with a custom Writer.  (But with this modification Snprintf is not the right name.)
As it happens, I think this might be fairly simple to implement: replace the pp.buf field with the passed in buffer, and then remove it and restore the original pp.buf field before releasing the pp.

If Sprintf if string-printf, then it seems to me that bytes-printf should be Bprintf.

Bprintf would also make sense to me. Hmm. "if cap isn't large enough, then allocate" seems like a reasonable choice, but I don't see a pretty/clean way to express "if this didn't fit in the space I provided". I guess something like if &provided[0] != &returned[0] maybe? (This isn't quite safe in all theoretical cases, because the returned len could be 0, but if the returned len is 0, I don't have to worry about the allocation, do I?)
I'd thought about creating a thing which just copies into an existing buffer, but then fmt's still allocating -- but if it's pooling those, I guess I care less about that than I thought I did.

I don’t think the function would return an error; fmt functions only return errors when writes fail. So the signature would be
func Bprintf(dest []byte, format string, args ...interface{}) []byte

I don't see a pretty/clean way to express "if this didn't fit in the space I provided".

How about cap(provided) != cap(returned)? Can’t grow without modifying cap.

Yeah. I just dislike the lack of a way to express "is this a different thing" separately from "does this thing have different characteristics". And I suppose I could imagine a case where the desired outcome would be "if for some reason it doesn't fit, fail rather than allocating", but that feels like a different thing.

@DeedleFake I think your benchmark is not correct
        var buf [128]byte
	allocs := testing.AllocsPerRun(128, func() {
		fmt.Fprintf(bytes.NewBuffer(buf[:0]), "This is a test.") // buf[:] -> buf[:0]
	})
	fmt.Println(allocs)

makes only one allocation (bytes.Buffer leaks to heap).
fmt.Fprintf(bytes.NewBuffer(buf[:]), "This is a test.")

does not re-use buf .
It creates a new 128-byte buffer and appends This is a test..

@tdakkota
You're right, I don't know how I missed that. Whoops.

fmt.Snprintf(dest []byte, fmt string, args ...interface{}) ([]byte, error)

I'm confused by this signature. Does the proposed function append to dest (as the strconv.Append* functions do), or does it write to the slice starting at index 0, truncating output if the length is too small (as copy does)?
If the latter, how is that different from using a bytes.Buffer today, perhaps with a LimitedWriter as discussed in https://github.com/golang/go/issues/17688#issuecomment-258501524?
If it is identical except for allocation behavior, would it be better to improve the compiler's inlining and escape analysis instead? Then the only new API surface we would need is io.LimitedWriter, which seems much more generally useful than just a new fmt function.
(https://play.golang.org/p/N8K1fcI6tyc)

@josharian

If Sprintf is string-printf, then it seems to me that bytes-printf should be Bprintf.

Sprintf is “print to a string”, which must return the string because Go strings are immutable.
Since slices are mutable, I would expect a function named Bprintf to print to the passed-in slice and return the number of bytes “printed”, in the same way that Printf and Fprintf do:
// Bprintf prints up to len(dst) bytes to dst, returning the number of bytes printed.
// If the output does not fit within len(dst), Bprintf returns len(dst), io.ErrShortBuffer.
func Bprintf(dst []byte, format string, args ...interface{}) (int, error)

For a function with the meaning “append the formatted bytes to the passed-in slice”, I would expect the name Appendf, because “appending” is not “printing”.
// Appendf appends the formatted args to dst and returns the extended buffer.
func Appendf(dst []byte, format string, args ...interface{}) []byte

fmt.Fprintf guarantees to do a single write to the writer.
Why is it not good enough to pass a bytes.Buffer (or your own custom writer) to Fprintf?

/cc @robpike

I agree with @rsc's comment that Fprintf already provides enough flexibility.

It seems like we are still waiting on an answer to why fmt.Fprintf into an appropriate appending writer is not good enough.

Passing a byte slice using bytes.Buffer as io.Writer causes allocation due to type-to-interface conversion, but fmt.Appendf([]byte, ...) []byte will not.
Also Appendf does not need fmt pools buffers at all.

Independently of the escape analysis issue, I like the idea of a Bprintf function for convenience.

It'd also help with buffer re-use. Right now there's no way to get the slice back out of a bytes.Buffer when you're done with it, which makes it hard to re-use.

I have often wanted Appendf.  The cases where I want this are precisely times where I am looking to spend a few CPU cycles more to avoid an allocation, when I either know the maximum size or know the p99 and am comfortable with that.  Pooling buffers that I write to is certainly an option (though harder to figure out how to keep to zero allocs at p99), but when I am doing careful optimizations I like to keep them as self-contained as possible so they can be easily documented clearly and can have their properties validated in a unit test. Adding more state (the pooled buffers), allowing the escape (of a new buffer), and honestly just the mechanical overhead of having to make a buffer, write to it, and then extract the slice are all in opposition to my goals of concise, clear, obvious code. I want it to be clear what has been done in the name of optimization and why, and "Appendf" feels like it would be the sweet spot here, if it can avoid the buffer pooling.

@josharian

@DeedleFake it almost returns the underlying slice—there’s no way I am aware of to get the full slice (starting at 0, not b.off). It is true that in the most common case, and the case that is most relevant to this issue, that’s not a problem.

As @bcmills noted, I think b.Reset() + b.Bytes() does what you want?

I’d wager that if this proposal were adopted some 80–90% of my uses of bytes.Buffer would disappear in favor of plain byte slices. To my mind, that’s an indicator that bytes.Buffer is a band-aid, not a solution.

That sounds like we'd be duplicating existing functionality by adding Appendf?
A bytes.Buffer is a Write-able []byte.
It's an interesting point though. Will keep thinking.
We probably also need a name that includes 'print', so Appendf is not quite right.

I'd vote for AppendPrintf (potentially with AppendPrint, AppendPrintln variants). I don't think brevity is a particular benefit here.

I still think we don't need this, but if we do it will probably be used a lot. That argues for a less cumbersome name, but I don't have any good ideas at the moment.

Maybe Bprintf? I mean we have Fprintf for files (kinda), so the pattern is there. B for bytes.

I'm not sure about the precedent that Aprintf/Bprintf sets. If the problem with bytes.Buffer is that it is too hard to flip back and forth with []byte, then maybe the answer isn't to add a []byte-specific form of fmt.Fprintf but instead to make it easier to do that conversion.
One possibility would be to have:
package bytes

type Writer []byte

func (w *Writer) Write(b []byte) (int, error) {
    *w = append(*w, b...)
    return len(b), nil
}

func (w *Writer) WriteByte(b byte) error {
    *w = append(*w, b)
    return nil
}

Then it's much easier to flip between Writer world and []byte world and not worry about every Writer API also taking on a []byte-appending API.
It still seems like a lot of overlap with bytes.Buffer, though. And we do have bytes.NewBuffer and b.Bytes() already. If you are using a bytes.Buffer only as a Writer, you don't need to worry about non-zero offsets.

I like the idea of bytes.Writer.  It provides a way to treat a []byte as an io.Writer.  It's true that it's somewhat redundant with bytes.Buffer, but it seems easy to understand and to use without getting confused about offsets and the like.  After all, we have bytes.Reader rather than bytes.NewBufferBytes.

For what it's worth, we have bytes.Reader primarily to provide the concept of a file offset (allowing ReadAt and Seek).
bytes.Buffer doesn't have that because reads consume written data, never to be seen again (it's more like a pipe).
If you don't need seekability, then bytes.NewBuffer(data) is just as good as bytes.NewReader(data).
I think the argument for bytes.Writer would be that it is literally a slice, making the conversion back and forth very easy, like:
var dst []byte
dst = append(dst, "string1...")
fmt.Fprintf(bytes.Writer(&dst), "%f", math.Pi)
dst = append(dst, '\n')

It still seems a bit awkward though, and it bothers me that this Writer does not really seem like a proper analogue of bytes.Reader. It doesn't allow seeking, for example.
Maybe Bprintf is fine.

Seeking in a bytes.Writer should intuitively just move around the slice length, keeping the capacity unchanged (or expanded if seeking beyond the end of the file).  But not sure if that is such a useful model.

Seeking in a bytes.Writer should intuitively just move around the slice length, keeping the capacity unchanged (or expanded if seeking beyond the end of the file). But not sure if that is such a useful model.

Capacity cannot mean "last byte written", or else you lose append's asymptotic efficiency.

I didn't mean it that way (rather, the capacity would be expanded by some quantity when seeking behind the end of the slice).  But yeah, it doesn't seem to be so useful when there is no notion of file length when slice length is abused to be the file pointer.

it bothers me that this Writer does not really seem like a proper analogue of bytes.Reader. It doesn't allow seeking, for example.

I want to re-raise a point from earlier in the discussion that I think may have been lost.
There are two different “intuitive” behaviors for “print to a []byte”. One is “grow the slice as needed” (like append and bytes.Buffer), and the other is “write only to the existing slice” (like copy and C's snprintf and strncpy).
From the above conversation, it isn't obvious to mewhich of those behaviors a bytes.Writer would implement. I would probably assume the “write only to the existing slice” behavior, precisely because it would have Seek behavior analogous to a bytes.Writer.

Re-reading the original proposal text from @seebs, he is explicitly asking for the "write only to the existing slice" behavior instead. I still think that adding an io.LimitedWriter gives the most bang for the buck there:
package io

type LimitedWriter struct {
	W Writer
	N int64 // max bytes remaining
}

func LimitWriter(w Writer, n int64) *LimitedWriter

Then the call site for the original non-appending use-case (Bprintf), given sufficient compiler optimization to avoid unnecessary allocations, becomes:
	buf := bytes.NewBuffer(dst)
	buf.Reset()
	if _, err := fmt.Fprintf(io.LimitWriter(buf, len(dst)), format, args...); err != nil {
		… // dst was too small.
	}
	dst = buf.Bytes()

And the call site for the “append as needed” (Appendf) use case becomes:
	buf := bytes.NewBuffer(dst)
	fmt.Fprintf(buf, format, args...) // does not fail
	dst = buf.Bytes()

Those call sites are nicely explicit about the allocation behavior, and don't require expanding the fmt package at all — they just require an io.LimitedWriter (which already seems glaringly absent today, given io.LimitedReader), and might require a bit of optimization work in the compiler.
Then we can look for those patterns in the wild to decide whether the ergonomic improvements would be significant enough to warrant adding the Bprintf and/or Appendf shorthand functions to the fmt package.

@seebs may be asking for limited writing but I don't think others are, hence the discussion of Appendf.
Also, we have no APIs today that append to []byte that don't expand them as needed to fit the result. (We do have very low-level things like utf8.EncodeRune and binary.LittleEndian.PutVarint, but then the caller has to resize to account for the number of written bytes, which is incredibly awkward. It would be very strange to do that in a high-level package like fmt that prioritizes usability. C having snprintf doesn't mean we need to.)
I agree with you that when you want to limit writes, some kind of LimitedWriter is better, although printf internally is probably going to format the entire thing into its own buffer first anyway.

Given the other Append functions in strconv, it seems like if we're going to add to fmt it should just spell things out, even though fmt hasn't in the past. That would mean:
func AppendPrint(dst []byte, a ...interface{}) []byte
func AppendPrintf(dst []byte, format string, a ...interface{}) []byte
func AppendPrintln(dst []byte, a ...interface{}) []byte

It's a bit longer but quite obvious. Especially if it's only going to get used for optimization, the extra clarity seems worthwhile.
Any objections to this?

Based on the discussion above, this proposal seems like a likely accept.
— rsc for the proposal review group

I don't object to the spelled-out names. That said, I do like the option of a limited write, even though I only sometimes want it.
Perhaps something like
func AppendPrintfN(dst []byte, int n, format string, a ...interface{}) ([]byte, int)
to allow a specified overall maximum number of bytes written, even if that means truncating.

AppendPrintfN

So, thinking about it more, these feel like two slightly different use cases. One is that I know where I want something, and I'm handing out a slice that may be in the middle of a larger slice, and it's absolutely useless to me to allocate-and-write-elsewhere. The other is just the standard append behavior.
The case I was originally thinking of was closer to a LimitWriter or something, where there was a definite specific limit and if the data can't fit, I'd rather get an error of some sort than get the data put somewhere else. Like, the concern isn't just "I want to avoid allocation", it's "I want the data written to be in exactly this location which is probably next to other data that it's going to be used with".
I think Append implies "first byte written happens at dst[len(dst)], and if cap(dst) isn't larger, that means an allocation", and Fill implies "bytes can be written only into dst[0:len(dst)]. So, Fill is more like what an io.Reader does with a slice, rather than like an Append operation. It's true that other APIs that append always expand, but I think on reflection that AppendF` may not be the right name for what I'm suggesting.
Possibly fmt.WritePrintf(dst []byte, ...) and fmt.AppendPrintf(dst []byte...), where WritePrintf writes to dst[0:len(dst)] only, and does not allocate or go further, and starts at 0 rather than appending. Or possibly a LimitedWriter, or a bytes.FixedBuffer.

I think I've got a better illustration of part of my concern about an append-semantics thing for the use case I had in mind. If I'm trying to overwrite part of an existing slice, and the appender decides it's going to grow the slice, it has now created a new slice.
So what happens to the original storage that I handed it? Does anything? Does it write some of the bytes into the buffer I had available? Does it always write bytes into that buffer until it runs out of room, and only then allocate? Does it reallocate and stop writing into that buffer as soon as it can tell that it will need more room?
Using a quick and dirty faked AppendPrintf implementation of one sort:
https://play.golang.org/p/PSwABNdOcUP
In this case, the answer is that if the new data won't fit, it doesn't modify the existing buffer at all. But also, there's no way for me to express the "but stop at this point" part of the write; I have to use [4:4] because otherwise append will start after the existing material. I guess I could use [4:4:N] where N is the point I want it to stop at. So I could do something like [4:4:12] to express that I want to write at most 8 characters -- but then it can actually end up not copying anything in, which turns out not to be what I want either.
For instance, I could have imagined that the last case would actually write the year and month into the field, and then leave the rest of the data untouched because it could, at that point, tell that it had run out of room and needed to grow.

For a limited write to an existing []byte, you can use a LimitedWriter as @bcmills suggests in https://github.com/golang/go/issues/47579#issuecomment-915340628.  Do we need fmt support for that?  It seems like a less common case.

I think LimitedWriter is a better conceptual fix, although I guess it'd need to actually get made. I sort of want a bytes.Writer parallel to bytes.Reader, for the same reason, but I think that either of those, plus Fprintf, is probably as good a fit as a hypothetical CopyPrintf would be, and may be easier to generalize from.
I do think, though, that I would probably prefer that AppendPrintf make an explicit statement about what if anything will have been done to the previous buffer if it does in fact allocate. Even if the statement is "it is unspecified". But otherwise I think that some people will assume that it will have written right up to the end, and some will assume it will have changed nothing if it ended up allocating, and then they'll be sad. And they'll blame me because it was my proposal. cries

What is the problem with just calling this:
func Append(dst []byte, a ...interface{}) []byte
func Appendf(dst []byte, format string, a ...interface{}) []byte
func Appendln(dst []byte, a ...interface{}) []byte

Or
func Bprint(dst []byte, a ...interface{}) []byte
func Bprintf(dst []byte, format string, a ...interface{}) []byte
func Bprintln(dst []byte, a ...interface{}) []byte

Are the words Print and Append really adding that much clarity that they must be used together in the name?

Personally, fmt.Append and fmt.Appendf do indeed look lovingly sweet to me: the fmt. prefix seems to be clarifying enough already, and the name seems to also fit with the other "modern" addition already in the package, fmt.Errorf. And on the other hand  it's as clearly as possible alluding to the builtin append — basically, what it means to me is: "like builtin append, but with fmt magic on top"... which seems to perfectly encapsulate exactly what it is.

I am a fan of Append, Appendf, and Appendln.

Spoke to @robpike about this and I agree that Append, Appendf, Appendln fit better with fmt's overall API.
Rob is going to look into this for Go 1.19.


Can't select debug target for eval in console

I would assume that if I pick a different debug target in the call stack, then type something in the console, it would send an evaluateRequest to the selected debug target. But when I press enter, the selection changes to the first target in the call stack, and the request is sent to the first target.

Can not repro.
Every expression I enter in the debug console is sent to the selected stack frame in the call stack.
Can you please provide repro steps or let me know what you are doing different thane me

I guess the trick is, this happens when the focused target is not paused:

Yes the issue is that currently we do not focus a thread or a process when those are clicked. We only focus when a stack frame gets clicked.
I agree this is not nice, especailly in your use case. Though does not feel critical -> debt week

Assigning to December
fyi @weinand


FIX allow extensions to be applied via injector service definitions

Throughout the code there is the implication of being able to apply
extensions through an Injector service name - such as the stripping
of %$ before looking up an extensions name.
However this is not possible as class_exists is exclusively used to
ensure that the Extension is a valid subclass of Extension (or
DataExtension).
This commit seeks to rectify that by falling back to using Injector
to see if there is a service registered with the given name, and if
so using it via instantion before performing the sanity check of
the concrete class' inheritance heirarchy.
Thanks for contributing, you're awesome! :star:
Please describe expected and observed behaviour, and what you're fixing.
For visual fixes, please include tested browsers and screenshots.
Search for related existing issues and link to them if possible.
Please read https://docs.silverstripe.org/en/contributing/code/

To clarify the problem, you're suggesting that you want to be able to do something like this?
YourClass:
  extensions:
    - '%$YourExtension'

If that's the case, I'm not sure we need to support it. The %$ syntax tells injector to instantiate the class name after it - extensions are still created with injector, and are handled as singletons by default (similar idea to a service I guess).
Can you clarify a little please?

Correct that extensions are still instantiated with injector, however they are not tested in such a manner. This leads to a valid service name (such as %$YourExtension) resulting in either a Fatal Error or equally fatal uncaught Invalid Argument Exception. As testing whether or not an Extension is valid happens before instantiation, this is less than ideal.
https://github.com/silverstripe/silverstripe-framework/blob/c7e341c67d62343574bc8b9ae0c82dd73714816d/src/Core/Extensible.php#L560-L564

Right i see, so you’re aliasing extensions and this is adding support for it

Is there anything outstanding on this?
I've just realised it's missed the 4.3 bus :(

ping @silverstripe/core-team for feedback on this

Hi @maxime-rainville, thanks for picking up. I'll update with some documentation adjustments.
I've targeted 4.0 in order to address this as a bug due to this code implying this should be a feature already, but it does not work (thus bug). I can re-target if you feel strongly about it not being so.
https://github.com/silverstripe/silverstripe-framework/blob/c7e341c67d62343574bc8b9ae0c82dd73714816d/src/Core/Extensible.php#L560-L564

Even if it's a bug, I don't think it's a high impact one. It would probably be better to release it has part of the new minor release rather than in a patch release.

Hey @NightJar. Feel free to reopen this targeting a new branch!

@NightJar This was automatically closed because it was targeted against an EOL branch. Can you please rebase against 4.2 and retarget? (4.2 is EOL in 11 days, FYI)

I've revived this PR and recreated it at https://github.com/silverstripe/silverstripe-framework/pull/9457


Naming of batchnorm1d

In PyTorch, batchnorm1d layers can either handle 2D or 3D data (where 2D input shape is (B, C) and 3D input shape is (B, C, L)).
B = batch size
C = number of channels
L = number of input features within the channel).
In our current implementation, ATHENA currently only handles 2D datatype.
I cannot currently see a way to make it handle both shapes (other than through the previously considered method of all data simply being 1D). As such, should there just be batchnorm0d and batchnorm1d?
https://pytorch.org/docs/stable/generated/torch.nn.BatchNorm1d.html

This could likely just be handled by setting it to 1D if input shape is 1D, and 2D if input shape is 2D.
If only num_features (aka num_inputs) or num_channels is defined, then 1D data size is assumed. If both are defined, then it becomes 2D. If input shape is given as rank 1, then assume 1D input, if rank 2, then assume 2D input.
So, just use a 2D data shape all times. But just make one dimension have length of 1.

Addressed in branch batchnorm0d_1d.


dom-repeat data binding: not working as expected

What am I missing?
http://jsbin.com/xukibu/1/
Output (excerpt):
http://jsbin.com/videze/2/

As per https://www.polymer-project.org/1.0/docs/migration.html#data-binding

A binding must replace the entire text content of a node, or the entire value of an attribute. So string concatenation is not supported. For attribute values, you can use computed bindings instead of string concatenation. For text content, you can also add additional nodes (for example, wrap the binding in a  tag).

Try:
    <template is="dom-repeat" items="{{items}}">

{{item.code}} - {{item.name}}

    </template>

Or something like...
{{_concat(item.code, item.name)}}
_concat: function(v1, v2) {
  return v1 + " - " + v2;
}

Thanks both, I read and still missed it when trying in code, but still I tried both approaches, jshint is not complaining but still keep getting similar results:
Code:
http://jsbin.com/xukibu/4/
Output:
http://jsbin.com/videze/3/

Try changing your items property to:
        items: {
          type: Array,
          value: function() { return []; },
          notify: true
        }

As per https://www.polymer-project.org/1.0/docs/devguide/properties.html#configure-values (emphasis mine):

The value may either be a primitive value, or a function that returns a value (which should be used for initializing Objects and Arrays to avoid shared objects on instances).

Maybe you need to use the new set or notify api..
https://www.polymer-project.org/1.0/docs/devguide/properties.html#observing-path-changes
Try a notify on items

@robrez is correct. this.items.push(...) should be:
      this.push('items', {
        code: i + 1,
        name: 'Item #' + (i + 1)
      });

Alternately, if you're refreshing the entire list, you could do:
    var tmp = [];

    for (var i = 0; i < 10; i++) {
      tmp.push({
        code: i + 1,
        name: 'Item #' + (i + 1)
      });
    }

    this.items = tmp;

This takes advantage of the fact that changing a direct property like items invokes its setter and automatically updates anything that's registered interest in that path (like the dom-repeat).

It would also be helpful if you share the markup that generates your output (the one that uses your element)

Thanks all, finally works!
@punzki I was lazy and just took the Polymer Starter Kit, modified the index.html that comes with the it, replaced the contact section content like this:

  <paper-material elevation="1">

    <el-test></el-test>

  </paper-material>

The final solution was the sum of all fixes suggested, both approaches suggested by @arthurevans and @robrez worked just fine, the binding was wrong as @punzki pointed, to sum it all, here is the final and working code:
<dom-module id="el-test">

  <template>

      List of Items
      <paper-icon-button
        icon="refresh"
        on-tap="refreshItems">
      </paper-icon-button>

      <paper-icon-button
        icon="refresh"
        on-tap="refreshItemsB">
      </paper-icon-button>

This is the complete list of items

-- START --

    <template is="dom-repeat" items="{{items}}">

        {{item.code}} - {{item.name}}
         =
        {{_concat(item.code, item.name)}}

    </template>

-- END --

  </template>
</dom-module>

Thanks a lot!

I am trying to assign value to attribute inside  but its not working while values are displayed correctly in text context.
whats wrong with attribute context ?
example:
routes = [{"name":"foo", "path": "bar"}, {"name":"foo1", "path": "bar1"}];

in above case data-route for anchor is not set but name is appearing.
I have tried switching variables then path comes in text context but data-route attribute is still missing.
any help ..
Thanks in advance .. :)

Try data-route$="{{route.path}}"
The docs talk about property vs attribute binding here:
https://www.polymer-project.org/1.0/docs/devguide/data-binding.html#attribute-binding
And binding to native elements here:
https://www.polymer-project.org/1.0/docs/devguide/data-binding.html#native-binding
The spec recommends using $= for certain types of attributes / native elements.


mix production - doesn't kill the process when it's done

Laravel Mix Version: 6.0.11 (npm list --depth=0)
Node Version (node -v): 12.20
NPM Version (npm -v): 6.14
OS: MacOS

Description:
When I run "mix -p" - it compiles the code just fine, everything works, but the process is not kill at the end, I need to kill it manually. Before upgrading to 6, I had no problems.

I found something that may be related here. I was seeing the same issue, but clicking on the notification finishes the process and it exits correctly. I'm going to dig in and see if I can tell what's up.

@furcic I read through the docs and gave these steps a try and it seems to be exiting correctly now. I did remove some packages right before so it could have been cache related.
rm -rf node_modules
rm package-lock.json yarn.lock
npm cache clear --force
npm install


Lock errdefs minor versions for dependabot

errdefs recent minor updates are breaking compatibility, and since we depend on containerd, which depends on 0.1.0, we are not going to update that anytime soon.
Meanwhile, dependabot keeps trying: #3521
Hopefully, that should now limit that?

Should not do anything on the CI, so, assuming green.
@AkihiroSuda opinion on this?

In #3521 I ran ignore this minor version command


Update SDL2 port to 2.0.5 (its latest release; up from 2.0.4)

SDL2 2.0.5 was recently released, and includes a number of bug fixes over its previous release, 2.0.4.
This pull request simply updates vcpkg's "sdl2" port to use SDL 2.0.5, as downloaded from http://libsdl.org (same as before).
Additional details on its 2.0.5 release can be found at https://forums.libsdl.org/viewtopic.php?t=12160
If anyone could use more info on this pull request, or would like modifications, please let me know.
Cheers!
-- David L.

Hi @DavidLudwig, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by Microsoft and real humans are currently evaluating your PR.
TTYL, MSBOT;

Looks good, thanks!


bump collectd version

G'day,
Collectd 5.5 introduced some nice features for CPU aggregation.  I've tested it locally with local blob store and it works fine.  How can i assist with updating the boshrelease to include the newer version of collectd?
can i simply be given put access to the collectd-boshrelease bucket and then raise a PR for upgrade to this repo?
Cheers,
Michael

Thanks @m-richo for pairing on this the other day.
I've pushed out a v2.1.0 release; and the release notes include the url/sha1 etc.


Ansible: Reduce the duplicates of chassis in SB database

Only set the system-id if it wasn't set.
Signed-off-by: Alin Gabriel Serdean<EMAIL_ADDRESS>

CC: @alinbalutoiu


windows support

can you make a windows version for this? i have made xml2-config.bat
https://gist.github.com/4341933
i can't get the gyp to work

What happened to the vendor-src branch?

I don't know how relevant this is anymore, but running Windows 8.1 and Node 0.12.0, I am able to install this package via npm without any errors.

Running Windows 10 and Node 0.12.0 I have to supply --msvs_version=2013

@BHare1985 where do you make that change? I have a windows setup with compilation issues, I would like to confirm

Execute npm install --msvs_version=2013  .. 2013 works for me because i have visual studio 2013


Enhance the "--profile-dir-path" options to make it easier

Hi there,
With the new 0.3.1 version, comes the possibility to provide a custom profile dir path for the browser data collection. That is very useful.
The bad effect of it is that we have to provide a very detailed path for each browser. It is not possible to select all browsers.
Could it be possible to set a custom "Users" path and let the tool work like it would if it was the regular path?
For exemple:
.\hack-browser-data.exe --vv --cc -b all -p G:\Users
As of now, this command returns the following error:
cmd.go:52: error can't select all browser, pick one from chrome|chrome-beta|edge|qq|firefox|360|brave|opera|opera-gx|vivaldi with -b flag
Many thanks

Thank you for your advice. I have considered not using -b  flag to specify a browser, The reason for this is that some browsers require -k to specify the path to the secret key file, while others do not. The current method is to use -b to select a browser

I will find out if there is a better way to solve this problem.


Replacement JSValidation

So, because of #247 and the fact that Proengsoft is not responding to their broken package, I want to see if we can find a way to replace Laravel JSValidation with an alternative validator, preferably one that is an active project. That way we can get our dependencies up to date and keep progressing with the core of Laravel.
If any JavaScript gurus out there or anyone else wants to take a stab at it, I look forward to seeing a PR or two!

Guess we could use Vue.js for something similiar. E.g.: Setting up ajax validation with laravel vuejs in no time

Hi,
I'm the maintainer of the project. For professional during reasons I couldn't maintain this package.....
I'm back, now I'm working on fixing some bugs and incompatibilities with recent versions.
Also I'm planning to replace jQueryValidation with http://parsleyjs.org/ or validate.js

@torrentalle Thank you for getting back! I'll add your package back to the project as soon as you've got it sorted, really like working with it and am really grateful that you're back and it'll be maintained! Cheers! 🍻


Not able to load pretrained models

I am trying to use llmware's pretrained model 'industry-bert-contracts' in the code and facing the following error: "AttributeError: 'HFEmbeddingModel' object has no attribute 'max_input_len'"
I tried loading all other HFEmbeddingModel model family in model_config.py and still facing the same issue.
My code is working with other GGUFGenerativeModel's "bling-phi-3-gguf"
"llmware/bling-sheared-llama-1.3b-0.1" models

@Arwin567 - thanks for sharing this and sorry that you ran into an issue.   I suspect the problem is that "industry-bert-contracts" is an embedding model, not a generative model.   So, if you are looking to run a prompt/LLM inference, then "bling-phi-3-gguf" and "llmware/bling-sheared-llama-1.3.-0.1" are great choices as they are both "generative" models ....
On the other hand, if you are interested to build a semantic embedding space for knowledge retrieval with a vector database, then "industry-bert-contracts" is a great choice, and it will output a 768 dimensional embedding vector (not a text generation).    You may want to check out some of the Embedding examples, which use that model.
Hope this resolves this issue... please confirm back.   (Really glad that you caught this - we will note this to add to the documentation to better clarify for others too.)
Within the ModelCatalog, you can use the discovery methods - ModelCatalog().list_all_models(), or ModelCatalog().list_generative_models() or ModelCatalog().list_embedding_models() ...

Understood, Thank you for clarification and instant response.
I am trying to retrieve data from contracts to csv with 15 questions
and using your contract_analysis_on_laptop code. Can I use industry-bert-contracts model in this case?


Update jsDelivr links

jsDelivr switched to a fully automated system, that can serve files from npm and GitHub. This means all future releases will be available automatically, but will use a new link structure.
I updated the links now so you don't forget to do it when you release a new version.
You can find links for all files at https://www.jsdelivr.com/package/npm/datetimepicker.
Feel free to ping me if you have any questions regarding this change.

Thank you @LukasDrgon 👍


Fix portal root

Fixes #743
-cc @tisto

@nileshgulia1 nice. Thanks for the fix!

I am wondering if the redirect is working, e.g.:

A user goes to a private URL
User is redirected to /login
User logs in
After the login the user is automatically redirected to the original (private) URL


Fix prioritization algorithm to ensure that top 5 social media URLs are always prioritized for testing

This issue is about further improving our prioritization. It is a follow-up to https://github.com/ooni/backend/issues/507, which previously requested that certain popular social media URLs (which are frequently blocked around the world) are prioritized for global OONI Probe testing. We can close this issue once we've rolled out some prioritization improvements that address the original problem (described below).
Original problem
We wish certain social media websites to be tested much more frequently than they are now. To this end we discussed various solutions, but we reckoned that we should try to do that with improved prioritization first.
Analysis
After @hellais reviewed this in the backend, he mentioned that:

The algorithm is configured to determine the domains, rather than the URLs included in https://github.com/ooni/backend/issues/507

These domains are not prioritized if they have recently been tested

As a result, these social media URLs are not tested as frequently as we would like, resulting in limited measurement coverage when it's needed (during a social media blockage).
Proposed solution
To ensure that popular social media URLs (which are frequently blocked) are tested more regularly, we discussed in the OONI frontend meeting that we should perhaps work on improving the backend algorithm for prioritization to ensure that a subset of the following 5 URLs (not domains) is tested with every website run (regardless of whether they have been tested recently or not):
https://www.facebook.com/
https://twitter.com/
https://www.instagram.com/
https://www.youtube.com/
https://www.tiktok.com/

Possible follow ups
Once this is implemented, we can evaluate whether we get the desired measurement coverage for the above URLs, and whether we should keep ensuring that they are tested in every website run globally.

Added


fix: check for fusermount3 or fusermount in PATH before running

Added a check using exec.LookPath to ensure fusermount3 or fusermount is available in the system's PATH.
If neither binary is found, return an error indicating their absence.
Executes the first available binary found for unmounting FUSE target.

@mahmut-Abi What was the original problem you had? Sadly the returned error is ignored by https://github.com/containerd/containerd/blob/b291eb802b2d913dcdc57cb612d2381d823dd779/core/mount/mount_unix.go#L76.
@AkihiroSuda fusermount is for rootless containerd. Right? FUSE mounts can be unmounted by umount(2).

@AkihiroSuda fusermount is for rootless containerd. Right? FUSE mounts can be unmounted by umount(2).

Not specific to rootless, and rootless doesn't use FUSE on modern kernel


RUMM-2423 SnapshotProcessor - process wireframe mutations

What does this PR do?
A brief description of the change being made with this pull request.
Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)

[ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
[ ] Make sure you discussed the feature or bugfix with the maintaining team in an Issue
[ ] Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

Codecov Report

Merging #1033 (beaf333) into feature/session-replay-vo (922fd29) will increase coverage by 0.28%.
The diff coverage is 88.96%.

@@                      Coverage Diff                      @@
##           feature/session-replay-vo    #1033      +/-   ##
=============================================================
+ Coverage                      82.99%   83.26%   +0.28%
=============================================================
  Files                            307      323      +16
  Lines                           9980    10426     +446
  Branches                        1628     1734     +106
=============================================================
+ Hits                            8282     8681     +399
- Misses                          1193     1209      +16
- Partials                         505      536      +31

Impacted Files
Coverage Δ

...nal/tracking/AndroidXFragmentLifecycleCallbacks.kt
93.48% <ø> (ø)

...m/datadog/android/sessionreplay/recorder/IntExt.kt
100.00% <ø> (ø)

.../android/sessionreplay/processor/EnrichedRecord.kt
35.29% <35.29%> (ø)

...oid/sessionreplay/utils/SessionReplayRumContext.kt
58.33% <58.33%> (ø)

...com/datadog/android/sessionreplay/recorder/Node.kt
66.67% <66.67%> (+66.67%)
:arrow_up:

...ionreplay/recorder/mapper/ButtonWireframeMapper.kt
66.67% <66.67%> (ø)

...android/sessionreplay/recorder/SnapshotProducer.kt
77.14% <77.14%> (+27.14%)
:arrow_up:

...y/recorder/mapper/ViewScreenshotWireframeMapper.kt
80.00% <80.00%> (ø)

...onreplay/recorder/mapper/GenericWireframeMapper.kt
85.71% <85.71%> (ø)

...ssionreplay/recorder/mapper/ViewWireframeMapper.kt
88.46% <88.46%> (ø)

... and 21 more


Update v4.user-provisioning.md

Updates for Travel Names and Gender in the Travel Extension

Hi @irina-sap. Do we know if the gender field is required? Or if it shouldn't have an additional option such as N/A or Other?

@jonikamelcher - Gender is not required - as in, it can be left out entirely. But the only possible values today are male and female.


feat: add getgauge/gauge

#6218 getgauge/gauge: Light weight cross-platform test automation
$ aqua g -i getgauge/gauge

Thank you for your contribution!

Published the prerelease v3.53.0-0.
We'll release v3.53.0 this night.

Released. https://github.com/aquaproj/aqua-registry/releases/tag/v3.53.0


Configure staleTimes in next.config.js for next15

📚 Description
This codemod refactors the next.config.js file to introduce the staleTimes configuration option, allowing you to control cache durations for different types of page segments. By specifying cache durations for dynamic and static pages, this codemod enhances caching behavior and improves application performance.
1.Find Configuration Object: Identifies the nextConfig object within the next.config.js file.
2.Add staleTimes Property: Adds the staleTimes property to the experimental object to define cache durations.
3. Specify Cache Durations: Sets cache durations for dynamic and static pages in seconds.
4. Clean Up: Removes the experimental object if it becomes empty after adding the staleTimes property.
To run this codemod, run the following command in the project directory:
codemod Next/15/Add-Experimental-Stale-Times

🧪 Test Plan
Test the codemod by applying it to a specified repository to ensure that the next.config.js file is correctly updated with the staleTimes configuration. Verify that the cache durations for dynamic and static pages are properly set and that the application behaves as expected with the new caching settings.

Apply the codemod to the repository available at (https://github.com/OlegJytnik/JSSNextJSDemo).

Confirm that the staleTimes property is correctly added to the experimental object in next.config.js

Test the application to ensure it functions correctly with the updated cache duration settings.
All other test cases are run in the codemod studio and are present in /codemod/packages/codemods/next/15/configure-staletimes/textfix

📄 Documentation to Update

If applicable, update any relevant documentation to reflect the new staleTimes configuration in next.config.js. This may include README files or other developer guides that reference caching strategies for dynamic and static pages

closing, see:  https://github.com/codemod-com/codemod/pull/1348


Bendn

Bendn
Originally posted by @rbhatt-pm in https://github.com/rbhatt-pm/fluffy-journey/issues/1#issuecomment-604256282

Bendn
Originally posted by @rbhatt-pm in https://github.com/rbhatt-pm/fluffy-journey/issues/1#issuecomment-604256282

@ Closed


Add union all clause

Codecov Report

Merging #408 (fdea749) into main (8812a7a) will increase coverage by 0.20%.
The diff coverage is 48.27%.

@@            Coverage Diff             @@
##             main     #408      +/-   ##
==========================================
+ Coverage   68.15%   68.36%   +0.20%
==========================================
  Files          82       83       +1
  Lines        7760     7789      +29
==========================================
+ Hits         5289     5325      +36
+ Misses       1809     1792      -17
- Partials      662      672      +10

Impacted Files
Coverage Δ

internal/query/statement/select.go
87.34% <0.00%> (-2.27%)
:arrow_down:

internal/sql/scanner/token.go
10.71% <ø> (ø)

internal/sql/parser/select.go
57.83% <50.00%> (-1.33%)
:arrow_down:

internal/stream/concat.go
50.00% <50.00%> (ø)

internal/planner/optimizer.go
75.82% <55.55%> (+0.61%)
:arrow_up:

internal/query/query.go
52.87% <0.00%> (+20.68%)
:arrow_up:

Continue to review full report at Codecov.

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


message Invalid HTTP Version (2.0)

Hi
It seems like that the simple_tensorflow_serving does not support requests via http version 2.
Here's the logs:

2018-08-08 08:08:50 ERROR    <IP_ADDRESS> - - [08/Aug/2018 08:08:50] code 505, message Invalid HTTP Version (2.0)
2018-08-08 08:08:50 INFO     <IP_ADDRESS> - - [08/Aug/2018 08:08:50] "PRI * HTTP/2.0" HTTPStatus.HTTP_VERSION_NOT_SUPPORTED -

Will this be supported in future? or how can I solve this problem?
Thx

It may be the problem of flask which we use as the HTTP server.
It is possible to change the HTTP server which supports HTTP2 in the future.

@tobegit3hub
Fine... I knew where the problem comes from.
I used the method in the example code of tensorflow/serving:
https://github.com/tensorflow/serving/blob/master/tensorflow_serving/example/inception_client.py
At line 39 and 40:
 channel = grpc.insecure_channel(FLAGS.server) stub = prediction_service_pb2_grpc.PredictionServiceStub(channel)
In client code, we use grpc to form a rpc request, which is based on HTTP/2.
I'll try to find another way to do this.
thx a lot.

Great and now we don't support request from gRPC clients.


Windows Defender detected virus in Win64 version

Trojan:Win32/Wacatac.H!ml

Thanks, this is a false positive reported by Windows Defender.. I will try to recompile the Windows binaries on another system

@freshe
Malwarebytes quarantines the software and virtustotal flags the exe as malicious.

Thanks, I really don't know what to do about malware/virus false positives on Windows. Suggestions are welcome.

Good to see that with you updates yesterday that VirusTotal is not flagging it any longer.
The ARM version does have a couple flags in VT, just so you know.
I'm updating my sandbox system to see how it looks in Malwarebytes now...

and BTW - very nice little handy tool!

Great! Thanks for checking

Thanks! The arm64 binary is updated. (I have a feeling the issue could re-appear if curl 8.6.0 gets flagged)


how to run the code?

I got error after 'python main.py':
File "main.py", line 16, in
model = unet()
File "/Users/yudong/Downloads/unet-master/model.py", line 34, in unet
merge6 = merge([drop4,up6], mode = 'concat', concat_axis = 3)
TypeError: 'module' object is not callable

I met the same problem, and your solution works, thanks a lot!

I met the same problem, and your solution works, thanks a lot! @teamo429


[AIRFLOW-2418] Bump Flask-WTF

Flask-appbuilder needs at least 0.14.2
root@e6849f25fd65:/airflow# airflow initdb
Traceback (most recent call last):
  File "/usr/local/bin/airflow", line 4, in <module>
    __import__('pkg_resources').run_script('apache-airflow==2.0.0.dev0+incubating', 'airflow')
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3088, in <module>
    @_call_aside
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3072, in _call_aside
    f(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3101, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 576, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 589, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 783, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (Flask-WTF 0.14 (/usr/local/lib/python2.7/site-packages), Requirement.parse('Flask-WTF==0.14.2'), set(['flask-appbuilder']))

Make sure you have checked all steps below.
JIRA

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

https://issues.apache.org/jira/browse/AIRFLOW-XXX
In case you are fixing a typo in the documentation you can prepend your commit with [AIRFLOW-XXX], code changes always need a JIRA issue.

Description

[ ] Here are some details about my PR, including screenshots of any UI changes:

Tests

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

Commits

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

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

Documentation

[ ] In case of new functionality, my PR adds documentation that describes how to use it.

When adding new operators/hooks/sensors, the autoclass documentation generation needs to be added.

Code Quality

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

Codecov Report

Merging #3313 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #3313   +/-   ##
=======================================
  Coverage   75.88%   75.88%
=======================================
  Files         197      197
  Lines       14728    14728
=======================================
  Hits        11177    11177
  Misses       3551     3551

Continue to review full report at Codecov.

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

+1


TDI-35874: Create unit tests for tDataSetInput/tDataSetOutput component

I'll merge this once the build passes, we have issues on our ci.


BlobServiceClientTest.UndeleteBlobContainer live test failing because "400 The value of deleted-container-name header must match the destination container name."

See https://github.com/Azure/azure-sdk-for-cpp/pull/2246
Linux
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=887515&view=logs&j=b28a1a35-334b-5681-3876-e5562b5e8062&t=8093ec4b-94b5-5b1c-251c-634eb19c00d0&l=408
2021-05-11T00:00:16.9351667Z 294: [ RUN      ] BlobServiceClientTest.UndeleteBlobContainer
2021-05-11T00:00:16.9693168Z 294: unknown file: Failure
2021-05-11T00:00:16.9695340Z 294: C++ exception with description "400 The value of deleted-container-name header must match the destination container name.
2021-05-11T00:00:16.9696803Z 294: The value of deleted-container-name header must match the destination container name.
2021-05-11T00:00:16.9698383Z 294: RequestId:78f0dd6f-201e-0069-6cf8-459a55000000
2021-05-11T00:00:16.9699893Z 294: Time:2021-05-11T00:00:16.9702517Z
2021-05-11T00:00:16.9701374Z 294: Request ID: 78f0dd6f-201e-0069-6cf8-459a55000000" thrown in the test body.
2021-05-11T00:00:16.9702588Z 294: [  FAILED  ] BlobServiceClientTest.UndeleteBlobContainer (34 ms)

Mac
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=887515&view=logs&j=267db408-59fc-59d9-cfd0-fd1515cbe21c&t=da0f4332-ab51-5c8d-61ac-094f82163104&l=408
2021-05-11T00:01:28.8280850Z 294: [ RUN      ] BlobServiceClientTest.UndeleteBlobContainer
2021-05-11T00:01:29.2030290Z 294: unknown file: Failure
2021-05-11T00:01:29.2033480Z 294: C++ exception with description "400 The value of deleted-container-name header must match the destination container name.
2021-05-11T00:01:29.2036660Z 294: The value of deleted-container-name header must match the destination container name.
2021-05-11T00:01:29.2038280Z 294: RequestId:805e6c25-901e-001d-26f8-45eb6c000000
2021-05-11T00:01:29.2040070Z 294: Time:2021-05-11T00:01:29.1884265Z
2021-05-11T00:01:29.2042070Z 294: Request ID: 805e6c25-901e-001d-26f8-45eb6c000000" thrown in the test body.

I also ran into it today. It's not flaky. I'm gonna need to fix it.


Some folders don't delete already read articles

Articles from Pitchfork, IndieWire, Vox, Mubi, etc. since November 2020 are still in my folder and even in I mark them as read/unread all over again they don't somehow "disappear" or deleted.
I am using Feedly to subscribe to RSS by the way.
Thank you!

For sync systems like Feedly we retain the articles for 90 days, so this is expected behavior.  After an article is read and older than 90 days, we will delete it unless it is starred.

For sync systems like Feedly we retain the articles for 90 days, so this is expected behavior.  After an article is read and older than 90 days, we will delete it unless it is starred.


Swift 5 support

Description

Adds a build against a Swift 5 development snapshot to Travis, and resolves Swift 5 compilation warnings.
The compiler now emits a warning if a redundant access control modifier is applied to a member of an extension.  This comes about if you declare an explicit access control modifier on the extension itself (ie. public extension Foo) and also on members (public var Bar).
There are two choices:  keep the default access modifier on the extension (and remove public from all members of the extension), or remove the default access modifier and ensure all members that should be public are marked as such.
I've chosen the latter, as I think it makes it more clear as to what forms part of our public API: things that are public are still marked as such.
(note: my understanding is that removing the public from the extension only affects the default visibility of its members. Public members of the extension remain public.  See: https://docs.swift.org/swift-book/LanguageGuide/AccessControl.html#ID25)
Motivation and Context

How Has This Been Tested?

Checklist:

[ ] I have submitted a CLA form
[ ] If applicable, I have updated the documentation accordingly.
[ ] If applicable, I have added tests to cover my changes.

Will merge tomorrow.  Thanks.


⚠ Bofrost.at has degraded performance

In 0aaf781, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1284 ms

Resolved: Bofrost.at performance has improved in de2bac8.


Transcoding

https://issues.jboss.org/browse/ISPN-7418
https://issues.jboss.org/browse/ISPN-7422
https://issues.jboss.org/browse/ISPN-8416
This PR contains most of https://github.com/infinispan/infinispan-designs/pull/9:

Caches can be configured with a media-type for keys and values
Transcoders convert between different media-type on demand
(extra) Remote query refactor to allow querying via Rest (the query endpoint will follow in another PR)

New features:

It's possible to send a JSON document via Rest and get it stored as protobuf and indexed
Hot Rod and Rest can interop using JSON and Protobuf, e.g., a protobuf encoded object can be written via Hot Rod, read as JSON via Rest or vice-versa: written as JSON via Rest and read using protobuf (and POJO) via Hot rod
JSON and POJO interop: same as above, but storing annotated POJO in the cache (compat mode)

The 3 test failures don't seem related, and the full suite is always green in my env

Ok, now CI is also green

Nice, just some very minor things

ops, couple of failures added by last commit, fixing...

Updated (and rebased)


Lift properties from the derived types in addition to the current type when setting base type.

Properly discover base types when they are added to the model after the derived types.
Improve the exception message for conflicting properties in the new base type.
Don't duplicate unused inherited properties that are being removed when setting a new base type. They will be discovered by conventions if they should be on the entity type.
Fixes #6814

:shipit:


Prepare for release of 2.1.0 to production

Might be an idea to meet and go through this (with EMR) as I've so little experience with RabbitMQ I'm not sure I can code review this at all well. Very good comments throughout, cleanly written code and lots of testing though!

Good idea. I think some knowledge sharing on this one would be useful.


MQTTClient fails to raise appropriate exception if URI is broken

A broken URI leads to the following exception when trying to connect to an MQTT broker:
Unhandled exception: 'NoneType' object has no attribute 'write'
paxexpress-api | Connection failed: AttributeError("'NoneType' object has no attribute 'write'")
paxexpress-api | Unhandled exception: 'NoneType' object has no attribute 'write'
paxexpress-api | Reconnection attempt failed: AttributeError("'NoneType' object has no attribute 'write'")
paxexpress-api | Unhandled exception: 'NoneType' object has no attribute 'write'
paxexpress-api | Reconnection attempt failed: AttributeError("'NoneType' object has no attribute 'write'")
paxexpress-api | Unhandled exception: 'NoneType' object has no attribute 'write'
paxexpress-api | Reconnection attempt failed: AttributeError("'NoneType' object has no attribute 'write'")
paxexpress-api | Maximum number of connection attempts reached. Reconnection aborted
paxexpress-api | ERROR:    Traceback (most recent call last):
paxexpress-api |   File "/opt/pysetup/.venv/lib/python3.8/site-packages/amqtt/client.py", line 165, in connect
paxexpress-api |     return await self._do_connect()
paxexpress-api |   File "/opt/pysetup/.venv/lib/python3.8/site-packages/amqtt/client.py", line 254, in _do_connect
paxexpress-api |     return_code = await self._connect_coro()
paxexpress-api |   File "/opt/pysetup/.venv/lib/python3.8/site-packages/amqtt/client.py", line 468, in _connect_coro
paxexpress-api |     return_code = await self._handler.mqtt_connect()
paxexpress-api |   File "/opt/pysetup/.venv/lib/python3.8/site-packages/amqtt/mqtt/protocol/client_handler.py", line 79, in mqtt_connect
paxexpress-api |     await self._send_packet(connect_packet)
paxexpress-api |   File "/opt/pysetup/.venv/lib/python3.8/site-packages/amqtt/mqtt/protocol/handler.py", line 543, in _send_packet
paxexpress-api |     await packet.to_stream(self.writer)
paxexpress-api |   File "/opt/pysetup/.venv/lib/python3.8/site-packages/amqtt/mqtt/packet.py", line 218, in to_stream
paxexpress-api |     writer.write(self.to_bytes())
paxexpress-api | AttributeError: 'NoneType' object has no attribute 'write'

Broken URI<EMAIL_ADDRESS>Expectation: A descriptive exception should already be raised when creating the session and mention that no writer could be instantiated due to failing to properly parse the URI.

Hey, thanks for reporting. Unfortunately, I was not able to reproduce that. I added a test in test_client.py:
@pytest.mark.asyncio
async def test_connect_broken_uri():
    config = {"auto_reconnect": False}
    client = MQTTClient(config=config)
    await<EMAIL_ADDRESS>
Which raises:
        except (ProtocolHandlerException, ConnectionError, OSError) as e:
            self.logger.warning("MQTT connection failed: %r" % e)
            self.session.transitions.disconnect()
>           raise ConnectException(e)
E           amqtt.client.ConnectException: [Errno 8] nodename nor servname provided, or not known

../amqtt/client.py:502: ConnectException

I also tried with   await client.connect("mqtt://\"xxx\":xxxx@eu1.thethings.network"). Same effect. Can you provide a minimalistic example that reproduces the issue?

I played around with quotes and ended up reproducing the exception with:
@pytest.mark.asyncio
async def test_connect_broken_uri():
    config = {"auto_reconnect": False}
    client = MQTTClient(config=config)
    await client.connect('"mqtt://someplace')


Implemented FT cases 111, 112

Implemented FT cases 111, 112

Tracked with branch NMS.FT.KILKARICONTROLLERIT.
So closing this request.


[UPDATE] Node.js installation instructions

On the pages "Bitcoin/Blockchain explorer" and "Lightning/Web app", the installation instructions for Node.js claim that 16 is the latest stable version, which is not up to date.
Instead of changing to the actual latest stable version (which is 19 at the time of this writing), you might also use the the value current (or lts, for long term support):
curl -fsSL https://deb.nodesource.com/setup_current.x | bash -

https://github.com/nodesource/distributions/blob/master/README.md#debinstall

Hello, thanks for your contribution, following the official webpage, the latest nodejs version is 18.12.1 LTS
https://nodejs.org/en/

Blindly upgrading everything to the latest version might not be what you always want. Not so familiar with Node.js, but aren't there possible incompatibilities between major releases that can break some older software?

Hello, thanks for your contribution, following the official webpage, the latest nodejs version is 18.12.1 LTS
https://nodejs.org/en/

Look closer. The latest version is 19.3.0, version 18.12.1 is maintained as LTS.
Nodesource provides installation scripts for both versions.

Blindly upgrading everything to the latest version might not be what you always want. Not so familiar with Node.js, but aren't there possible incompatibilities between major releases that can break some older software?

I'm running Thunderhub, RTL, BoS with Node.JS LTS without problems. The only thing I've seen so far was Thunderhub not starting on Node.JS v19. So I would consider using LTS as safe.

Samourai requires version 14 or 16. I was doing all my installation with version 19 and during the installation of Samourai I got an error message that the node version was not compatible


ORC-1657: Acknowledge clang-cl when disabling compiler warnings

clang-cl defines both _clang_ and _MSC_VER yet it uses MSVC-specific way to handle #pragma warning ignore

Thanks for the fix! Do you have access to the JIRA to create an issue for this?

Thanks for the fix! Do you have access to the JIRA to create an issue for this?

I have flagged ORC-1657 with the description.

Thanks! +1

It seems that I have trouble in merging this:
➜  orc git:(main) ✗ ./dev/merge_orc_pr.py
git rev-parse --abbrev-ref HEAD
Which pull request would you like to merge? (e.g. 34): 1850
Restoring head pointer to main
git checkout main
Already on 'main'
git branch
Traceback (most recent call last):
  File "/Users/gangwu/Projects/orc/./dev/merge_orc_pr.py", line 555, in <module>
    main()
  File "/Users/gangwu/Projects/orc/./dev/merge_orc_pr.py", line 465, in main
    modified_body = re.sub(re.compile(r"<!--[^>]*-->\n?", re.DOTALL), "", pr["body"]).lstrip()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File<EMAIL_ADDRESS>line 185, in sub
    return _compile(pattern, flags).sub(repl, string, count)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected string or bytes-like object, got 'NoneType'

I have added PR description, it should merge now.


Flink Doris Connector

Refer to Spark Doris Connector test method Flink Connector

Support reading doris data through Flink to construct DataStream
Support to create Flink table mapping doris table through Flink SQL to read doris data, example:
CREATE TABLE myUserTable (
user_id STRING,
user_name STRING
uv BIGINT,
pv BIGINT,
PRIMARY KEY (user_id) NOT ENFORCED
) WITH (
'connector' ='doris',
'fe.host' ='ip:port',
'username' ='users',
'password' ='password',
'tableName' ='table1'
);

Supports reading doris data through Flink to build DataStream, development is completed, testing, the code is recently submitted to the community


Add DataCenterLookupValues setting

See: https://github.com/github/orchestrator/issues/856
This PR provides a patch to add a new configuration setting: DataCenterLookupValues which would be applied after applying DataCenterPattern on the instance hostname.

[x] contributed code is using same conventions as original code
[x] code is formatted via gofmt (please avoid goimports)
[ ] code is built via ./build.sh       # this currently fails as you only support up to go 1.10. I'm using go 1.12.
[x] code is tested via go test ./go/...

Please let me know if this looks reasonable.

I'll make a PR to support a higher version of Go.

Perhaps I should provide some context:
The term "datacentre" used in orchestrator is good but in some cases you may want to group more than one datacentre (located close by) into a single availability zone. Orchestrator doesn't have a way to reference availability zones as such so an easy way to resolve this is to map parts of a hostname which include a datacentre into a AZ definition, after which orchestrator colouring in the GUI will treat the servers as being in the same "area". This looks better than seeing them mixed when logically they should be considered together.
This change handles the mangling based on the server's hostname which is simpler than doing a more complex if(...) type SQL query against each instance being monitored. Doing this against each instance being monitored is an extra query and that increases latency of the time to poll a server so is not ideal if the number of servers being monitored is large.


Handle new account properly

The Chore
Handle new account in libs/accounts/src/lib/accounts-data-provider.ts
When new account appears we are notified via subscription but there is missing data which we need
market {
    id
    tradableInstrument {
      instrument {
        name
      }
    }
  }
  asset {
    id
    symbol
    decimals
  }

We got two options here

change this provider be derived data provider and fetch assets, markets and accounts separately
or
re fetch accounts data when new account will appear

Closing as dupe of https://github.com/vegaprotocol/frontend-monorepo/issues/1491


docs: Update snapshots-creator readme

What ❔

Updates snapshots_creator crate readme with more info.
A typo in the command https://github.com/matter-labs/zksync-era/tree/main/core/bin/snapshots_creator
zk run snapshots_creator  --> zk run snapshots-creator
.yarnrc dir appears on linux after calling zk commands. --> moved to gitignore

Why ❔
Wrong command.

extra file

Checklist

[x] PR title corresponds to the body of PR (we generate changelog entries from PRs).
[x] Documentation comments have been added / updated.
[x] Spellcheck has been run via zk spellcheck.
[x] Linkcheck has been run via zk linkcheck.

Sorry for hijacking the PR; it seemed like an appropriate place to brush up snapshot creator docs.


Update authentication.md

couple spelling/grammar items, feel free to review yourself if you feel differently

@nenonix @JohanFreelancer9 - kindly do the copy editor review for this PR. Thanks.

@mertenar - Can you possibly merge the commit on the copy/edit review made by JohanFreelancer9 or make the necessary changes on the PR following the suggestions he made. Thank you.


Update connect packages to v1.0.0-rc1

Update connect packages to v1.0.0-rc1

Is that applicable here? I manually updated these. I tried npx @connectrpc/connect-migrate@latest now but it says everything is up to date. My understanding is that it only migrates from @bufbuild/* packages

Ah, you're right - it upgrades to the RC, but only from @bufbuild 👍


Cmd+B on CREATE_TABLE takes me to generated code, not .sq file.

Doing cmd+B on any other constant takes me to .sq so this should do the same.

we dont generate a constant for create table anymore


embedded videos aren't being downloaded (anymore?)

I'm running the command like this:
dotnet run --url https://www.patreon.com/m/xxxxxx/posts --descriptions --embeds --json --campaign-images --use-sub-directories --download-directory /Users/xxx/Downloads/_PATREON_DOWNLOADER

It gets everything but not the embedded videos. Instead it generates 3kb files called post_video
I also tried with this fork https://github.com/1zizi1/PatreonDownloader which has added benefit of downloading all the youtube videos, but it doesn't work on the embedded videos.. @1zizi1 maybe you have an idea of how to make that work? Awesome fork in any case!
Anyone know if it's because Patreon has changed the way they embed videos and this used to work.. ?
Many thanks!

PatreonDownloader never downloaded any videos unless they were a direct links to the file, not sure which videos you are talking about.


Support Game Data in NTV format with Spark SQL Column Expression

Notice: During feature indices conversion, we need to convert the feature value into a float first.

Added this support in 2019 Memorial Day Release.
Release version: 0.1


Encoder pins are reversed

Using with ATS-20 (USB-C) the encoder pins are reversed, even changing the pins in the settings does not have an effect.

That's manufacturer's issue. On my (and everyone else's) receiver tune right moves frequency forward and tune left moves it backwards. Also my firmware doesn't have any settings for encoder pins.


Add function for making a GlobalDescriptorTable in a const environmen…

…t on stable rust.

Unfortunately it is not clear when the const_mut_refs feature will be stable, so maybe we need to wait for quite some time. So I would be fine with merging this PR to unlock GDT creation on stable Rust right now. Perhaps we should put it behind a new stable_workaround cargo feature and clearly state in the docs that the function is just a temporary workaround. (It's true that const GDT creation on stable is already possible today using from_raw_slice, but this function is unsafe and very low-level.)

Get rid of the existing &mut self method

This would be a breaking change, so it's not something that we can do immediately either.

I think there's a way to unblock safer compile-time GDT creation without adding method we will have to remove down the road. I think we could have a method like:
impl GlobalDescriptorTable {
    pub const fn from_descriptors<const N: usize>(
        descriptors: [Descriptor; N],
    ) -> (Self, [SegmentSelector; N]) {
        ...
    }
}

which takes an array of descriptors and returns:

The GDT
The corresponding segments

See example implementation here.

Nice, this looks very promising!

Closing as this is partially addressed by #413


Remove incorrect reference to async timeout

NetflixOSS » Hystrix » Hystrix-pull-requests #26 SUCCESS
This pull request looks good


Some problems on the run

Dear author, I am very interested in the JQF that you have built, but I have been suffering from a lack of working right now. I've used JQF as a dependency for my Maven framer in your tutorial, but running the Zest test still shows that I have no JQF dependencies. How can I fix this? It would be nice if you had a specific picture or video of you running the ZEST test, and I hope to get an answer from you. Thank you very much.
[ERROR] No plugin found for prefix 'jqf' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/zhengyan/.m2/repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]

Hello. I don't have a video but there are several tutorials that walk you through the required steps. In particular, the compiler fuzzing tutorial has a full example that shows dependencies to run the Maven plugin. Also check out the documentation of the Maven plugin for the list of available options once you want to run the command.
You can also check out the jqf-zest-example GitHub repo which is a fully working standalone test project that has all the necessary dependencies, etc. You can use that as a starting point.
Hope this helps.

Dear author, I am very interested in the JQF that you have built, but I have been suffering from a lack of working right now. I've used JQF as a dependency for my Maven framer in your tutorial, but running the Zest test still shows that I have no JQF dependencies. How can I fix this? It would be nice if you had a specific picture or video of you running the ZEST test, and I hope to get an answer from you. Thank you very much.
[ERROR] No plugin found for prefix 'jqf' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/zhengyan/.m2/repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]

@ddy-ddy Did you have a solution to this problem? I also encountered this issue. Could you share how you solved this problem?Thank you very much.


Fix PR link for DNS Support in Release History

Description
Fix PR link for DNS Support in Release History
Checklist

[ ] I have updated tests where applicable.
[ ] I have added an entry to the CHANGELOG.

Good catch, thanks! 🍰


Website docs don't show any examples anymore

not sure what happened. but i've loaded the site on multiple browsers with and without extensions and the examples aren't rendered on the page
Checked out the site on the way back machine and the examples are there

Yeah, I'm in the middle of a migration to Vuepress next. Unfortunately, vuepress-plugin-live does not currently support it, so I'm deciding if I make a PR to that project, fork it, or use Codesandbox. For maintenance reasons, I want to keep this upgrade. Please be patient as I work out a solution, but I fully intend to have live examples in the docs. I just want to make sure that they work when deployed as well as within readme files.

Just wanted to post a quick update here. I got on a live stream with the creator of vuepress-plugin-live and the good news is that we figured out how to support vuepress@next and the vuetensils docs. The bad news is it breaks during build time. So seems like just a bit more to figure out what that issue is, then I can make a PR to that project, and pull it in over here.

Excited to see those working demos! Absolutely love using vuetensils, thanks for all the hard work!
Do you happen to have a link to the VOD / livestream archive for that vuepress-plugin-live stream? Would be fun to put that on the ol' second monitor.

Thanks so much @aaronransley. It's been a lot of work, but I use it a lot and enjoy dogfooding it. I just wish I had more time (and more skills).
Here's the video: https://www.youtube.com/watch?v=_yh7KH92zL4

Finally got this working again thanks to the wonderful @elevatebart.
I still need to adjust the layouts, but the examples are working again :D


Stray </ul> tag in FAQ #mutation (DE)

Where to find the issue

https://www.coronawarn.app/de/faq/results/#mutation "Virus-Varianten („Mutationen“):"

Note that the equivalent English-language FAQ article is not affected.
Describe the issue
The unordered list in the FAQ https://www.coronawarn.app/de/faq/results/#mutation "Virus-Varianten („Mutationen“):" is incorrectly terminated with 2 x </ul>.
Steps to reproduce
Run https://validator.w3.org/ on https://www.coronawarn.app/de/faq/results/
Suggestion
Remove one </ul> from the FAQ article

PR #3252 submitted to resolve this issue


Failed to compile

Hello,
While compiling there is a error message :
Failed to compile.
<EMAIL_ADDRESS>Module not found: Can't resolve 'rollbar' in 'blablabla/node_modules/@rollbar/react/dist'

Getting this issue as well.

You need to install rollbar first.

That worked for me. Thanks @vhrustic

Thank you !


server: KVM guru should pass max memory as per VM transfer object

This makes the KVM guru pass the max memory to KVM agent by picking the max. memory from the VM transfer object. This lets the cluster/agent decide if VM should start with the min or max memory depending on whether vm.memballoon.disable is false (default) or true.
When vm.memballoon.disable is true, VMs start with max. memory. Right now the max memory isn't sent to the KVM agent causing the regression. This feature is defined at https://github.com/apache/cloudstack/blob/main/agent/conf/agent.properties#L220
Also fixes #7430
Types of changes

[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] New feature (non-breaking change which adds functionality)
[x] Bug fix (non-breaking change which fixes an issue)
[ ] Enhancement (improves an existing feature and functionality)
[ ] Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale

[ ] Major
[ ] Minor

Bug Severity

[ ] BLOCKER
[ ] Critical
[ ] Major
[ ] Minor
[ ] Trivial

Screenshots (if appropriate):
How Has This Been Tested?

@blueorangutan package

@rohityadavcloud a [SF] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

Closing this PR as the main line change is already addressed by https://github.com/apache/cloudstack/pull/7663


Extension issue

Issue Type: Bug
Extension Name: vscode-aks-tools
Extension Version: 0.0.8
OS Version: Windows_NT x64 10.0.19042
VSCode version: 1.50.1

:warning: We have written the needed data into your clipboard. Please paste! :warning:

{
	"messages": [],
	"activationTimes": {
		"codeLoadingTime": 179,
		"activateCallTime": 0,
		"activateResolvedTime": 22459,
		"activationReason": {
			"startup": true,
			"extensionId": {
				"value": "mindaro.mindaro",
				"_lower": "mindaro.mindaro"
			},
			"activationEvent": "*"
		}
	},
	"runtimeErrors": [
		{
			"name": "Error",
			"message": "Failed to get the current context from the kubeconfig: No kubeconfig file found at path C:\\Users\\davec\\.kube\\config"
		}
	]
}

@daniv-msft because it looks like Mindaro/Bridge to Kubernetes is involved here

Thanks @itowlson. I confirm this error is coming from https://github.com/Microsoft/mindaro.
@FusionArc Could you please clarify what is wrong from your perspective?
The error in itself seems legitimate to me, if no kubeconfig file is present in the target location.
If your kubeconfig file is stored in another location, feel free to update the current target location through the Kubernetes: Set Kubeconfig command in VS Code.
If you don't have a local kubeconfig file and don't plan to have one, feel free to also hide the status bar item (right click > Hide) or disable the Bridge to Kubernetes extension, which is owning this status bar item.
Please let me know if you have any questions or if I misunderstood your scenario.

Thank you @daniv-msft ! Hello @FusionArc ,seems like best place to share detail will be against this repository with more details, https://github.com/Microsoft/mindaro. new version of Bridge to Kubernetes earlier this week. Thanks heaps,
cc: @itowlson


remove unused SchemaComparePublishChanges

This PR fixes #18128. schemaComparePublishChanges is no longer used after the update project from db changes replaced it with schemaComparePublishProjectChanges and schemaComparePublishDatabaseChanges.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.01%) to 42.519%

Totals

Change from base Build<PHONE_NUMBER>:
0.01%

Covered Lines:
27565

Relevant Lines:
60577

💛  - Coveralls

Is this removed from STS already as well?

not yet - that was gonna be my next PR after it was removed here


posix: implement fgetc()

Requires macros for getc() and getchar()
Added documentation for fgetc, getc and getchar
Created stub fgetc() in stdio.c

Closes #66936, #66943, #66944

Please bear with me as this is my first contribution. I am unsure how the minimal libc correlates with us having to create our own stdio headers and source files, should I create only tests for already existing libc implementations, or reimplement them? The lib/libc/minimal/include/stdio.h doesn't contain prototypes for fgetc, getc and getchar.

@whythefyouflying - it might be worth it to put this PR into draft mode

With the latest 6b104a2 commit I am getting a build error:
[86/171] Building C object zephyr/arch/arch/x86/core/CMakeFiles/arch__x86__core.dir/early_serial.c.obj
FAILED: zephyr/arch/arch/x86/core/CMakeFiles/arch__x86__core.dir/early_serial.c.obj
ccache /home/dave/bin/zephyr-sdk-0.16.5/x86_64-zephyr-elf/bin/x86_64-zephyr-elf-gcc -DKERNEL -DK_HEAP_MEM_POOL_SIZE=4096 -DPICOLIBC_LONG_LONG_PRINTF_SCANF -DTC_RUNID=cf8000df908bb5463ca9ac8ba808f239 -D__LINUX_ERRNO_EXTENSIONS__ -D__ZEPHYR_SUPERVISOR__ -D__ZEPHYR__=1 -I/home/dave/zephyrproject/zephyr/kernel/include -I/home/dave/zephyrproject/zephyr/arch/x86/include -I/home/dave/zephyrproject/zephyr/include -I/home/dave/zephyrproject/zephyr/twister-out/qemu_x86/tests/posix/common/portability.posix.common.fs/zephyr/include/generated -I/home/dave/zephyrproject/zephyr/soc/x86/ia32 -I/home/dave/zephyrproject/zephyr/include/zephyr/posix -I/home/dave/zephyrproject/zephyr/lib/posix/options/getopt/. -I/home/dave/zephyrproject/zephyr/subsys/testsuite/include -I/home/dave/zephyrproject/zephyr/subsys/testsuite/ztest/include -I/home/dave/zephyrproject/zephyr/lib/posix -isystem /home/dave/zephyrproject/zephyr/lib/libc/common/include -m32  -Wshadow -fno-strict-aliasing -Werror -Os -imacros /home/dave/zephyrproject/zephyr/twister-out/qemu_x86/tests/posix/common/portability.posix.common.fs/zephyr/include/generated/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -m32 -msoft-float -Wa,--divide --sysroot=/home/dave/bin/zephyr-sdk-0.16.5/x86_64-zephyr-elf/x86_64-zephyr-elf -imacros /home/dave/zephyrproject/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=/home/dave/zephyrproject/zephyr/tests/posix/common=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/dave/zephyrproject/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/home/dave/zephyrproject=WEST_TOPDIR -ffunction-sections -fdata-sections -mpreferred-stack-boundary=2 -mno-mmx -mno-sse --specs=picolibc.specs -D_POSIX_THREADS -std=c99 -MD -MT zephyr/arch/arch/x86/core/CMakeFiles/arch__x86__core.dir/early_serial.c.obj -MF zephyr/arch/arch/x86/core/CMakeFiles/arch__x86__core.dir/early_serial.c.obj.d -o zephyr/arch/arch/x86/core/CMakeFiles/arch__x86__core.dir/early_serial.c.obj -c /home/dave/zephyrproject/zephyr/arch/x86/core/early_serial.c
/home/dave/zephyrproject/zephyr/arch/x86/core/early_serial.c:43:2: error: #error "Unsupported configuration"
   43 | #error "Unsupported configuration"
      |  ^~~~~
/home/dave/zephyrproject/zephyr/arch/x86/core/early_serial.c: In function 'serout':
/home/dave/zephyrproject/zephyr/arch/x86/core/early_serial.c:72:17: error: implicit declaration of function 'IN'; did you mean 'MIN'? [-Werror=implicit-function-declaration]
   72 |         while ((IN(REG_LSR) & LSR_THRE) == 0) {
      |                 ^~
      |                 MIN
/home/dave/zephyrproject/zephyr/arch/x86/core/early_serial.c:74:9: error: implicit declaration of function 'OUT' [-Werror=implicit-function-declaration]
   74 |         OUT(REG_THR, c);
      |         ^~~
/home/dave/zephyrproject/zephyr/arch/x86/core/early_serial.c: In function 'z_x86_early_serial_init':
/home/dave/zephyrproject/zephyr/arch/x86/core/early_serial.c:100:21: error: 'mmio' undeclared (first use in this function)
  100 |         device_map(&mmio, X86_SOC_EARLY_SERIAL_MMIO8_ADDR, 0x1000, K_MEM_CACHE_NONE);
      |                     ^~~~
/home/dave/zephyrproject/zephyr/arch/x86/core/early_serial.c:100:21: note: each undeclared identifier is reported only once for each function it appears in
/home/dave/zephyrproject/zephyr/arch/x86/core/early_serial.c:100:27: error: 'X86_SOC_EARLY_SERIAL_MMIO8_ADDR' undeclared (first use in this function)
  100 |         device_map(&mmio, X86_SOC_EARLY_SERIAL_MMIO8_ADDR, 0x1000, K_MEM_CACHE_NONE);
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

@whythefyouflying - it might be necessary to do some console switching as well the way it is done in tests/drivers/console_switching. For example, you could probably use just about everything in that testsuite aside from ZTEST(console_switching, test_write).
Note: the console is switched to the emulated uart before reading from the console (this is similar to fgetc()) and switched back to the normal uart before using zassert_*(). This is because the test subsystem needs to write to the console as well.
Switching to the emulated uart and back to the normal uart should almost be like a kind of critical section.

@whythefyouflying - it might be necessary to do some console switching as well the way it is done in tests/drivers/console_switching. For example, you could probably use just about everything in that testsuite aside from ZTEST(console_switching, test_write).
Note: the console is switched to the emulated uart before reading from the console (this is similar to fgetc()) and switched back to the normal uart before using zassert_*(). This is because the test subsystem needs to write to the console as well.
Switching to the emulated uart and back to the normal uart should almost be like a kind of critical section.

@cfriedt Unfortunately, for some reason the stdin is not connected with the emulated uart, not sure how to connect the two. I've uploaded my latest code, it's building but failing and the fgetc() call always gets a value of -1 instead of the passed character.

@cfriedt Unfortunately, for some reason the stdin is not connected with the emulated uart, not sure how to connect the two. I've uploaded my latest code, it's building but failing on the zassert for fgetc() call always gets a value of -1 instead of the passed character.

I'll take a look when I can. Unfortunately, I'm a bit swamped right now.


1.20.6? 1.21?

There is no 1.6.0-1.21 on maven.kyrptonaught.dev

Pushed. Thanks @fantahund for doing most of the work


improvement Support GC segment cache, when memory insufficient

Proposed changes
Issue Number: close #xxx
Problem summary

fix segment cache memory tracker statistics
support GC

Checklist(Required)

[ ] Does it affect the original behavior
[ ] Has unit tests been added
[ ] Has document been added or modified
[ ] Does it need to update dependencies
[ ] Is this PR support rollback (If NO, please explain WHY)

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run buildall

run buildall

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 33.98 seconds
stream load tsv:          461 seconds loaded<PHONE_NUMBER>9 Bytes, about 154 MB/s
stream load json:         38 seconds loaded<PHONE_NUMBER> Bytes, about 59 MB/s
stream load orc:          67 seconds loaded<PHONE_NUMBER> Bytes, about 15 MB/s
stream load parquet:          27 seconds loaded 861443392 Bytes, about 30 MB/s
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230221111840_clickbench_pr_101045.html

run buildall

run buildall

run arm

run buildall


feat: --skip-plugins

What kind of change does this PR introduce? (check at least one)

[ ] Bugfix
[x] Feature
[ ] Code style update
[ ] Refactor
[ ] Docs
[ ] Underlying tools
[ ] Other, please describe:

Does this PR introduce a breaking change? (check one)

[ ] Yes
[x] No

Other information:
Adds a new cli flag named --skip-plugins that works with all commands and allows to skip a plugin, which means it will not be applied for that run.
close #4262
close #3830

Looks good to me. But there's now a conflict to resolve…

conflict resolved :)


Support landscape and tablet layouts on all screens

In particular, the auth_method_picker_layout.xml looks bad when in landscape or when on a large tablet screen.
Other screens are functional but could look nicer.

Tried to fix landscape in #515 but introduced bug #521.

Non-tablet layout in landscape with logo looks pretty ugly too.
Would it be possible to use custom layouts there? (with a requirement to contain button holder layout maybe)

@aviadmini yes agreed the non-tablet layout in landscape looks horrible.  We will fix this in 1.2.0.

NestedScrollView with fillViewport I presume.

Assigning this to myself, so if anyone else is working on this or was planning on starting it please contact me

In #562 a fix was put in for the picker Activity.  I believe that's the only one that was totally broken in landscape.

@samtstern Looks like https://github.com/firebase/FirebaseUI-Android/issues/375 is a duplicate of this issue.

The fix for this issue has been released in version 1.2.0.


https://github.com/BSCPGROUPHOLDINGSLLC/WILSONELSER-ZUCKER/pull/2

https://github.com/153974-HSI-OXLEY-BANKS-40ACT/HOTEL-ROOM-MIGRATION-PATTERN/issues/8


MDFileManager (Pillow) Error!

when i tried to use the mdfilemanager it works well in pc but when i build that and test, it tells : import error 'from PIL import Image'
so pls remove the pillow library and add the alternative of that

@Kulothungan16 python3 -m pip install --force-reinstall git+https://github.com/HeaTTheatR/KivyMD.git

@Kulothungan16 requirements = kivy==1.11.1, git+https://github.com/HeaTTheatR/KivyMD.git


use main instead of master for hammer-cli-katello

cc @ianballou
should we also rename the jobs to say main? (will require some changes in packaging too then)

:woman_shrugging:
I only update to match https://github.com/Katello/hammer-cli-katello/branches and thus make things work again.

@ekohl I think main was chosen because it is what Github changed its default to. Your comment around develop is fair as an ecosystem decision but it's something we've never fully articulated as a thing we should standardize around. I think this could be worth a discourse post and update to developer docs.

Ian did ask on Matrix some time ago, and we recommended develop for consistency ;)


Continuous Learning Strategy

Recommend which CATS codes to use for which actions outlined in the guidance
Ex: Grassroots has it`s own CATS code. Use that one. It will be mapped behind the scenes.
Taking online courses, that could be mapped to training
Automating repetitive tasks, that would go under Continuous Improvement, for example

#853

PR needs to be resolved (currently breaking build), then we can merge and close
#853


Model

hi @zengyh1900 @rockbot
user must enter some its body shape parameters in order to get the 3D its body model?
if I have the mash values of specific person how can I extract its body measurement ?

you can use this line to calculate it https://github.com/zengyh1900/3D-Human-Body-Shape/blob/master/src/utils.py#L72


Build warnings with make option --enable-ipv6

Causes the below build warnings:
../include/ofpi_util.h:129:36: warning: cast increases required alignment of target type [-Wcast-align]
  return (((*(uint64_t *)addr1 ==  *(uint64_t *)addr2) &&
                                    ^
../include/ofpi_util.h:130:5: warning: cast increases required alignment of target type [-Wcast-align]
   (*(uint64_t *)(addr1 + 8) ==  *(uint64_t *)(addr2 + 8)))
     ^
../include/ofpi_util.h:130:34: warning: cast increases required alignment of target type [-Wcast-align]
   (*(uint64_t *)(addr1 + 8) ==  *(uint64_t *)(addr2 + 8)))
                                  ^
  CC       cli/ofp_cli_debug.lo
In file included from cli/ofp_cli_debug.c:14:0:
../include/ofpi_util.h: In function 'ofp_ip6_is_set':
../include/ofpi_util.h:125:12: warning: cast increases required alignment of target type [-Wcast-align]
  return ((*(uint64_t *)addr | *(uint64_t *)(addr + 8)) == 0 ? 0 : 1);
            ^
../include/ofpi_util.h:125:32: warning: cast increases required alignment of target type [-Wcast-align]
  return ((*(uint64_t *)addr | *(uint64_t *)(addr + 8)) == 0 ? 0 : 1);
                                ^
../include/ofpi_util.h: In function 'ofp_ip6_equal':
../include/ofpi_util.h:129:13: warning: cast increases required alignment of target type [-Wcast-align]
  return (((*(uint64_t *)addr1 ==  *(uint64_t *)addr2) &&
             ^
../include/ofpi_util.h:129:36: warning: cast increases required alignment of target type [-Wcast-align]
  return (((*(uint64_t *)addr1 ==  *(uint64_t *)addr2) &&
                                    ^
../include/ofpi_util.h:130:5: warning: cast increases required alignment of target type [-Wcast-align]
   (*(uint64_t *)(addr1 + 8) ==  *(uint64_t *)(addr2 + 8)))
     ^
../include/ofpi_util.h:130:34: warning: cast increases required alignment of target type [-Wcast-align]
   (*(uint64_t *)(addr1 + 8) ==  *(uint64_t *)(addr2 + 8)))

Note: the comment was created automatically with bugzilla2github tool

Bugzilla bug ID:  9
Renumbered to issue: #132

Hi!
Do you still get those warnings? What hardware / Linux distribution do you use?
I tried compiling the latest OFP with --enable-ipv6 option in both x86_64 and aarch64 environments but didn't get any warnings:
...
CC       cli/ofp_cli_route.lo
CC       cli/ofp_cli_debug.lo
CC       cli/ofp_cli_log.lo
CC       cli/ofp_cli_arp.lo
...

Hi Viktor,
The code was not changed from then to now.
I think the problem is still there because converting a uint8_t* to uint64_t* indeed can cause problems due to alligment.
Most likely this problem is hidden by gcc compiler (version/platform specific, or not necessary).
I think a compiler like clang might still show this issue. It would be a good idea to compile code through clang as it has a great static code analyser, comparing to gcc.
Kind Regards,
Sorin

Hi Sorin!
You are right. I tried to "export CC=clang" and got totally 136 "cast... increases required alignment" warnings.
-Viktor

Casting with void* or uintptr_t would solve the problem.


raftstore: fix wrong peer meta

So that learners won't send messages with is_learner == false to leader before receiving snapshots.

@BusyJay @overvenus @breeswish PTAL thanks.

Rest LGTM

@BusyJay PTAL.

ping @BusyJay .

ping @BusyJay .

ping @overvenus @BusyJay .

/run-unit-tests

/run-integration-tests

/run-integration-tests


fix: ignore delay on first join

Resolves #220

I had to make additional changes to make this project want to build and run again. Please feel free to cherry-pick my changes as needed.


Do not load lanterns for items that are not found

Log: https://paste.gg/p/anonymous/c4846deedd6b4bc4a20fe5e1f34c9e93
This mod spits out 350+ console lines on every startup attempting to load lanterns for blocks that dont exist, namely Axolotls like in #1, but also Lil Taters.
Check if Lil Tater is loaded before attempting to create whatever requires Lil Tater, same for Axolotls.

Should be fixed in the latest commit