BIP-146 using lower S at start

Hello!
Problem
As you know, due to BIP-146 https://github.com/bitcoin/bips/blob/master/bip-0146.mediawiki#user-content-LOW_S, we should use only a lower S
And there is a check in the code (if lengthS == 33 {...}) that converts higher S to lower S, but there are a few problems with it

first one, this check is indirect, because, if I understand correctly, 31, 32 and 33 bytes are correct lengths for S part of signature
second one and the most important, sometimes it leads to the incorrect signature

About second problem: sometimes, with some circumstances, after this check and calculating lower S, encoded lower S has length 31 bytes (that is valid for S too), but encodeBigInt function in this case unconditionally adds a leading zero byte, to make length equal 32 bytes, and if before adding zero byte, the s signature had leading byte less than 0x7F byte (that means that we have zero leading bit and is being considered as a positive), it leads to -26: mandatory-script-verify-flag-failed (Non-canonical DER signature) in bitcoin
This check fails https://github.com/bitcoin/bitcoin/blob/80ad135a5e54e8a065fee5ef36e57034679111ab/src/script/interpreter.cpp#L159
    // Null bytes at the start of S are not allowed, unless S would otherwise be
    // interpreted as a negative number.
    if (lenS > 1 && (sig[lenR + 6] == 0x00) && !(sig[lenR + 7] & 0x80)) return false;

Solution
So the solution in this MR is to explicitly check if we have a high S at the start, and if so, we calculating the low S at this point, and after that we don't need to have check of if lengthS == 33 {...}

Hello!
Problem
As you know, due to BIP-146 https://github.com/bitcoin/bips/blob/master/bip-0146.mediawiki#user-content-LOW_S, we should use only a lower S
And there is a check in the code (if lengthS == 33 {...}) that converts higher S to lower S, but there are a few problems with it

first one, this check is indirect, because, if I understand correctly, 31, 32 and 33 bytes are correct lengths for S part of signature
second one and the most important, sometimes it leads to the incorrect signature

About second problem: sometimes, with some circumstances, after this check and calculating lower S, encoded lower S has length 31 bytes (that is valid for S too), but encodeBigInt function in this case unconditionally adds a leading zero byte, to make length equal 32 bytes, and if before adding zero byte, the s signature had leading byte less than 0x7F byte (that means that we have zero leading bit and is being considered as a positive), it leads to -26: mandatory-script-verify-flag-failed (Non-canonical DER signature) in bitcoin
This check fails https://github.com/bitcoin/bitcoin/blob/80ad135a5e54e8a065fee5ef36e57034679111ab/src/script/interpreter.cpp#L159
    // Null bytes at the start of S are not allowed, unless S would otherwise be
    // interpreted as a negative number.
    if (lenS > 1 && (sig[lenR + 6] == 0x00) && !(sig[lenR + 7] & 0x80)) return false;

Solution
So the solution in this MR is to explicitly check if we have a high S at the start, and if so, we calculating the low S at this point, and after that we don't need to have check of if lengthS == 33 {...}

Thank you for the detailed explanation! I'll take a closer look in the next few days.

Hello!
Problem
As you know, due to BIP-146 https://github.com/bitcoin/bips/blob/master/bip-0146.mediawiki#user-content-LOW_S, we should use only a lower S
And there is a check in the code (if lengthS == 33 {...}) that converts higher S to lower S, but there are a few problems with it

first one, this check is indirect, because, if I understand correctly, 31, 32 and 33 bytes are correct lengths for S part of signature
second one and the most important, sometimes it leads to the incorrect signature

About second problem: sometimes, with some circumstances, after this check and calculating lower S, encoded lower S has length 31 bytes (that is valid for S too), but encodeBigInt function in this case unconditionally adds a leading zero byte, to make length equal 32 bytes, and if before adding zero byte, the s signature had leading byte less than 0x7F byte (that means that we have zero leading bit and is being considered as a positive), it leads to -26: mandatory-script-verify-flag-failed (Non-canonical DER signature) in bitcoin
This check fails https://github.com/bitcoin/bitcoin/blob/80ad135a5e54e8a065fee5ef36e57034679111ab/src/script/interpreter.cpp#L159
    // Null bytes at the start of S are not allowed, unless S would otherwise be
    // interpreted as a negative number.
    if (lenS > 1 && (sig[lenR + 6] == 0x00) && !(sig[lenR + 7] & 0x80)) return false;

Solution
So the solution in this MR is to explicitly check if we have a high S at the start, and if so, we calculating the low S at this point, and after that we don't need to have check of if lengthS == 33 {...}

Thanks for that, I've reviewed everything, and it all looks correct.


Where are the docs located?

I noticed a typo or two I was hoping to PR for.
Also, I can't for the life of me figure out how to get the floating labels working with the text field. Passing label='something' does nothing on my <Textinput ... />.
Was hoping to look at the unbuilt source for the examples to see how it was done.

Hi!
can you please try and tell if this does not work
import {h, Component} from 'preact';
import Textfield from 'preact-material-components/Textfield';
import 'preact-material-components/Textfield/style.css';

export default class TextfieldPage extends Component {
  render(){
    return (
      <div>
        <Textfield label="somelabel"/>
      </div>
    );
  }
}

Also the docs are here: prateekbh.github.io/preact-material-components/

You can find the docs on the gh-pagesbranch.
Take a look over there :
https://github.com/prateekbh/preact-material-components/tree/gh-pages

@staydecent were you able to find the docs/ resolve your error?

Yup found the source of the docs. Thanks! I'm deep in a client project
right now and will need a week before I can test out getting the floating
labels to work.
Appreciate the work on this! Look forward to replacing my usage of MDL with
it soon.
On May 26, 2017 01:51, "Prateek Bhatnagar"<EMAIL_ADDRESS>wrote:

@staydecent https://github.com/staydecent were you able to find the
docs/ resolve your error?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/prateekbh/preact-material-components/issues/131#issuecomment-304228374,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJV0auUYE2qzEnwUkkGuVwweuIiafGiks5r9pKAgaJpZM4NkTox
.

closing this, please re-open if you have any further questions


GH-40 Fixed badge component height

Fix  component height
Close #40

Shot Type
Count
Status

Added
0
🟡

Deleted
0
❌

Regression
16
❗

❗ storybook/components-badge--all-states__[w1440px] (click to expand)

Before
After

❗ storybook/components-badge--all-states__[w1920px] (click to expand)

Before
After

❗ storybook/components-badge--all-states__[w390px] (click to expand)

Before
After

❗ storybook/components-badge--all-states__[w900px] (click to expand)

Before
After

❗ storybook/components-badge--default__[w1440px] (click to expand)

Before
After

❗ storybook/components-badge--default__[w1920px] (click to expand)

Before
After

❗ storybook/components-badge--default__[w390px] (click to expand)

Before
After

❗ storybook/components-badge--default__[w900px] (click to expand)

Before
After

❗ storybook/components-table--table__[w1440px] (click to expand)

Before
After

❗ storybook/components-table--table__[w1920px] (click to expand)

Before
After

❗ storybook/components-table--table__[w390px] (click to expand)

Before
After

❗ storybook/components-table--table__[w900px] (click to expand)

Before
After

❗ storybook/components-tag--default__[w1440px] (click to expand)

Before
After

❗ storybook/components-tag--default__[w1920px] (click to expand)

Before
After

❗ storybook/components-tag--default__[w390px] (click to expand)

Before
After

❗ storybook/components-tag--default__[w900px] (click to expand)

Before
After

Shot Type
Count
Status

Added
0
🟡

Deleted
0
❌

Regression
8
❗

❗ custom/widgets-heart-rate--hint-opened__[w1440px] (click to expand)

Before
After

❗ custom/widgets-heart-rate--hint-opened__[w1920px] (click to expand)

Before
After

❗ custom/widgets-heart-rate--hint-opened__[w390px] (click to expand)

Before
After

❗ custom/widgets-heart-rate--hint-opened__[w900px] (click to expand)

Before
After

❗ storybook/widgets-progress-info--default__[w1440px] (click to expand)

Before
After

❗ storybook/widgets-progress-info--default__[w1920px] (click to expand)

Before
After

❗ storybook/widgets-progress-info--default__[w390px] (click to expand)

Before
After

❗ storybook/widgets-progress-info--default__[w900px] (click to expand)

Before
After

Shot Type
Count
Status

Added
0
🟡

Deleted
0
❌

Regression
0
❗

Shot Type
Count
Status

Added
0
🟡

Deleted
0
❌

Regression
7
❗

❗ custom/widgets-heart-rate--hint-opened__[w1920px] (click to expand)

Before
After

❗ custom/widgets-heart-rate--hint-opened__[w390px] (click to expand)

Before
After

❗ custom/widgets-heart-rate--hint-opened__[w900px] (click to expand)

Before
After

❗ storybook/widgets-progress-info--default__[w1440px] (click to expand)

Before
After

❗ storybook/widgets-progress-info--default__[w1920px] (click to expand)

Before
After

❗ storybook/widgets-progress-info--default__[w390px] (click to expand)

Before
After

❗ storybook/widgets-progress-info--default__[w900px] (click to expand)

Before
After

Shot Type
Count
Status

Added
0
🟡

Deleted
0
❌

Regression
0
❗


Non-DP runs default to float32 precision

The training script relies on FSDP's MixedPrecisionPolicy to take care of dtypes.
But when data-parallelism is not used (for example when running in a single node with TP 8) then this does not happen and training runs in float32.
This is a bit unintuitive especially when comparing against runs with DP enabled.
If I'm not mistaken, the default training script does not even call torch.set_float32_matmul_precision() so it's currently missing out on speedups.
Do you agree that this should be changed? Thanks!

You are right that currently mixed precision is only supported in FSDP.
For general support by AMP, I think it's being worked on in https://github.com/pytorch/torchtitan/pull/591


[CARBONDATA-1490] Fixed memory allocation for carbon row

Analysis: While creating carbon row the space for measures is assigned based on outputLength and not on measureCount which will tend to allocate more space than is actually needed.
outputLength = measureCount + ((noDictCount + complexCount) > 0 ? 1 : 0) + 1
When the table has 1 complex column then measureCount=0, noDictCount=0, complexCount=1
therefore, outputLength = 2
Even if there are no measure columns the measure object is created with 2 null values.
Solution: Create measure object based on the measureCount.

Build Failed  with Spark 2.1.0, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder1/239/

Build Success with Spark 1.6, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder/115/

SDV Build Success , Please check CI http://<IP_ADDRESS>:8080/job/ApacheSDVTests/870/

LGTM


Enhancement: Add a PropertyHandlerOptions and ClassHandlerOptions class

Describe the enhancement
Currently, when you handle the result via PropertyHandler and ClassHandler, the values are returned as argument to the callback method. See below for the property handlers.
TResult Get(TInput input,
            ClassProperty property);

TInput Set(TResult input,
            ClassProperty property);

And below is for the class handlers.
TEntity Get(TEntity entity,
            DbDataReader reader);

TEntity Set(TEntity entity);

This is good, but it is also limiting the user on the given options.

With this User Story, we will enable an option class as the return values to the handler, in which we could in the future extend it to any values required when handling how the models/properties are being hydrated or forwarded to the database.
For property handlers, it is good to introduce the PropertyHandlerOptions class.
public class PropertyHandlerOptions
{
     public ClassProperty Property { get; }
     public DbCommand Command { get; }
     public DbParameter Parameter { get; }
     ...
}

```csharp
TResult Get(TInput input,
            PropertyHandlerOptions options);

TInput Set(TResult input,
            PropertyHandlerOptions options);

For class handlers, it is good to introduce the ClassHandlerOptions class.
public class ClassHandlerOptions
{
     public DbDataReader DataReader { get; }
     ...
}

TEntity Get(TEntity entity,
            ClassHandlerOptions options);

TEntity Set(TEntity entity,
            ClassHandlerOptions options);

The support to this will be available on the releases > RepoDB v1.12.10.


Create ability to restart crucial forest core methods upon crash

Create a separate file (which should be a future place for  self repair/health-check service.) that intakes coroutines representing crucial services and adding an error handling callback onto them
Error handler ensures a log message is sent
Error handler also allows an error handler function to be passed
For handle_messages this restarts the service if it crashes

need to increment the key at '${{ runner.os }}-pipenv-v8-${{ hashFiles(''**/Pipfile.lock'') }}' in .github/workflows/checks.yml and rerun ci

this is a little more complex than I want, but also not bad

Got this passing. Should probably check that it recovers auxin-cli from network failures.

So this doesn't actually recover from the set of failures we've encountered, which I think is an Auxin bug?

Blocked by https://github.com/mobilecoinofficial/auxin/pull/47

Ready for final review/approval


feat: introduce Jenkins construct

Signed-off-by: Vinayak Kukreja<EMAIL_ADDRESS>

@vinayak-kukreja DCO is failing - did you configure it locally?


Fix switch return type not resolving correctly

Currently, the following erroneous code does not produce a type error:
local source = switch(function() return 1 end) {
    function() return 1 end,
    function() return 1 end,
}

local value = source()

if value then
    value:shouldError()
end

This is caused by differences in behavior between Map<T, ((() -> U)?)> and Map<T, () -> U>. This issue was resolved by replacing the former with the latter.

There's another problem with this, though! While it still allows omitting cases, it still displays an error if the component is nullable:
local function show<T>(source: () -> boolean, component: () -> T, fallback: (() -> T)?)
    return switch(source) {
        [true] = component,
        [false] = fallback,
        --        ^^^^^^^^
        -- 🔴 Type '(() -> T)?' could not be converted into '() -> T'
    }
end

I'm not sure how to cover this case as well.

The current behavior is likely the best option


Investigate stuck historical sync on large network test

Investigate stuck historical sync issue reported here: https://casper-labs-team.slack.com/archives/C01ULKL8G8J/p1687350784393109

There is an infinite sync leap loop due to missing info about validators for era 0:
Chain of events:

Node is syncing back through Era 0 (going towards genesis of the pre 1.5 chain)
Validator matrix is correctly saturated
Node hits activation point and restarts for upgrade
Upgraded node starts and resumes historical sync
It attempts a leap with trusted_ancestor_only = true
Sync leap comes back with trusted_ancestor_headers being empty (as there is no switch blocks before the trusted block header)
Node can't get validators for era 0
Goto 5

The proposed solution:
If the trusted_ancestor_only = true, but we ask for a block in Era 0, fill the signed_block_headers with a single block (switch block of Era 0).
When such sync leap response arrives, it is expected that node will register validators for era 1 (and, by inference) for era 0, and will be able to continue the sync process.

@Boiethios please work on the test that reproduces the issue, unless some more priority tickets regarding 2.0 rewards appear.

A summary of the work done so far for this issue:

Modify sync leap to include the switch block of era 1 if the sync leap request is coming for a block in era 0: https://github.com/casper-network/casper-node/pull/4081
Read the validators for era 1 from global state as they are automatically inferred for era 0 if the validators for era 0 are missing for the matrix: https://github.com/casper-network/casper-node/pull/4116
Request a sync leap for the switch block in era 1 if the highest orphaned block is in era 0 and the validator matrix does not contain the weights for that era: https://github.com/casper-network/casper-node/pull/4129

All above PRs address the issue but there have been a couple of corner cases discussed in the PRs:

what happens if the highest orphaned block is the first block of era 1 and we don't have the parent header (the header for the switch block in era 0)?
what happens if the highest orphaned block is the first block of era 1 but this block is also a switch block (e.g. if the era length is 1 block)?

Next steps:

Attempt to write an automated test for validating the fixes for this issue and try to cover the corner cases in the test


feat: Expose Parquet Schema Adapter

Allow users of the Datafusion Parquet physical executor to define how to map parquet schema to the table schema.
This can be useful as there can be layers on top of parquet like Delta or Iceberg which may also define the schema and how the schema should evolve.
Which issue does this PR close?
Closes #10398
Rationale for this change
By exposing SchemaAdapter downstream consumers can reuse ParquetExec but allow for different interpretations of the data from the parquet.
For example, delta-rs keeps the schema separate from the parquet so that schema evolution can be well controlled.  The external schema can enrich the data inside the parquet files with missing nested columns or timezone information.
What changes are included in this PR?
Changes SchemaAdapter to a public trait and adds SchemaAdapterFactory to be passed into the constructor of ParquetExec.
Are there any user-facing changes?
This change does expose a new field for ParquetExec that can be specified.  I was able to reuse the existing documentation for the now public trait.

This change adds the optional schema_adaptor_factory to the ParquetExec struct.  If a client was creating this struct directly they would have to change their code to now specify None for the schema_adaptor_factory.  If a consumer was using the builder they would be unaffected.

Thank you @HawaiianSpork  -- I triggered the CI checks on this PR and plan to review it carefully in the next day or two

are we waiting feedbacks from @HawaiianSpork or we good to merge the PR?

are we waiting feedbacks from @HawaiianSpork or we good to merge the PR?

I was waiting to see if they wanted to make any of the suggestions. If not, let's merge it in

@HawaiianSpork please address the suggestions, you dont need to change the code, just make a response

Sorry, to keep you hanging and thank you for the quick review.  I agree with the suggestions but haven't circled back around to completing.  If you want to wait, I will get to the suggestions early next week.  Otherwise, I am also ok with this being merged and I can open a follow on PR to address the suggestions.


Request : Make "Order" translatable

New request:
Could you please make "Order" translatable?
My dutch clients are receiving 'Order ' . $this->number in the Mollie bank-description.
Should be even more awesome if this could be changed in the config, with for example a default text.
vendor/mollie/laravel-cashier-mollie/src/Order/Order.php:243
$payment = (new MandatedPaymentBuilder(
        $owner,
        'Order ' . $this->number,
        $totalDue,
        url(config('cashier.webhook_url')),
        [
             'metadata' => [
                 'temporary_mollie_payment_id' => $this->mollie_payment_id,
             ],
        ]
))->create();

Hi @codebolt-mike,
sorry for getting back to you so late.
In fact we already have a locale setting in cashier.locale which can be overridden per customer. We could utilize this setting to create a translated string for the payment description.
What do you think of:
// Create Mollie payment
$payment = (new MandatedPaymentBuilder(
    $owner,
    trans('cashier::payment.description', ['number' => $this->number], config('cashier.locale')),
    $totalDue,
    url(config('cashier.webhook_url')),
    [
        'metadata' => [
            'temporary_mollie_payment_id' => $this->mollie_payment_id,
        ],
    ]
))->create();

Hi @Naoray,
This looks amazing!

@codebolt-mike sorry for taking so long!
I’ve submitted the suggestion in #192

Good one. Before merging though, it may make sense to look at this one in one go.
This is what the default invoice receipt looks like:

@Naoray , @codebolt-mike , I'd say every static string here should ideally be translatable with keys included in that same language file. What do you think?

I think that should be perfect. Although in my use-cases I've created a custom invoice layout for e-mail and PDF.
My request was mainly focussed at the non-transferable string for the Mollie receipt that customers get.
All these strings inside a publishable lang-file would even be more perfect in my opinion. That gives future users of this package all the flexibility that a dev could ever want :)

@sandervanhooft as suggested the invoice receipt is now translatable in #192


Add support for inlineStyleLanguage in library projects

🚀 Feature request
Command (mark with an x)

[ ] new
[x] build
[ ] serve
[ ] test
[ ] e2e
[ ] generate
[ ] add
[ ] update
[ ] lint
[ ] extract-i18n
[ ] run
[ ] config
[ ] help
[ ] version
[ ] doc

Description
Add support for inlineStyleLanguage in library projects.
Describe the solution you'd like
Library projects should be able to set inlineStyleLanguage as any application project, Nearly all of my UI components are developed in libraries since the application (a few of them) are only used to wire them together, so inlineStyleLanguage being application project exclusive doesn't help us much.
Describe alternatives you've considered
Continue using external files, but the advantage of having inline scss is desired, specially when the styles are not that long to require an external file

Thanks @alan-agius4


Enable verbose mode when some options are specified

This PR updates list entities command. It enables verbose mode when the following options are specified.
--keyValues, --attrs, --metadata, --orderBy

Coverage remained the same at 100.0% when pulling 7d0f2517b4020d009faf05eea9a694b7f2f83a72 on fisuda:feature/list_entities into e082fe48b6ccf02263aea6d79f1e7123ea1afbbf on lets-fiware:main.


would you like to add to community bundle?

we can help you add this library to the bundle so it shows up in our collection of available libraries :)
https://github.com/adafruit/CircuitPython_Community_Bundle

omg please do... I was starting to think I was the only person to ever compile this and put it to use... this library is brilliant. I compiled it back with circuitpython2 and the same .mpy is still working as good as ever through the version upgrades.


[BUG] SKBitmap.Decode always returns null for a specific image

Description
Cannot create Bitmap or Codec of a specific jpg image (attached).
The image is not corrupted, it can be opened in Windows Photos and other image viewers, it can be displayed by browser.
Looks similar to https://github.com/mono/SkiaSharp/issues/1621 and https://github.com/mono/SkiaSharp/issues/1551. However, this workaround does not work:
Stream? stream = /*......*/;
using var inputStream = new SKManagedStream(stream);
using var inputData = SKData.Create(inputStream);
var bitmap = SKBitmap.Decode(inputData);
var image = SKImage.FromBitmap(bitmap);
var outputData = image.Encode(SKEncodedImageFormat.Png, 100);

Code
using var bitmap = SKBitmap.Decode(imageContentStream); // Returns null
using var codec = SKCodec.Create(imageContentStream); // Returns null

Expected Behavior
Bitmap and codec are created from a stream.
Actual Behavior
Bitmap and codec creation returns null.
Basic Information

Version with issue: 2.80.4 (also tested on 2.88.3)
Last known good version:  N/A
IDE:  Rider
Platform Target Frameworks:

Linux: Debian 11 (bullseye-slim docker image)
Windows Classic:  Windows 10 (10.0.19045)

Target Devices: x64

Screenshots
Reproduction Link
image.zip

It does not work for Java bindings too. Looks like the problem may be in the Skia code.

I think i ran into the same problem.
I am using InputFile to offer the user the option to pick a file from his local client-site filesystem.
After has been picked, the OnChange-Event is fired and after all conditions are met, stream is read by the event handler PickFileAsync.
Stream lengths have been checked to make sure the streams contain all bytes of the file.
SKBitmap.Decode returns null, when passing the memorystream.
I have been using simple .png files with QR-Codes as content, like this one:

@using SkiaSharp.Views.Blazor
@using SkiaSharp;
@using ZXing;

  @*InputFile is of type Microsoft.AspNetCore.Components.Forms.IBrowserFile.InputFile*@
  <InputFile OnChange="PickFileAsync"></InputFile>

  <SKCanvasView @ref="_canvasView" OnPaintSurface="PaintSurface" width="@(_bitmap?.Width ?? 0)" height="@(_bitmap?.Height ?? 0)"></SKCanvasView>

@code {
    private SKCanvasView? _canvasView;
    private SKBitmap? _bitmap;

    private async Task PickFileAsync(InputFileChangeEventArgs e)
    {
        if (e.FileCount > 1)
        {
            Console.WriteLine("To many files selected!");
            return;
        }

        var allowedContentType = "image/png";
        if (e.File.ContentType != allowedContentType)
        {
            Console.WriteLine($"File ContentType '{e.File.ContentType}' not supported! Pick an image of ContentType {allowedContentType}");
            return;
        }

        if (_bitmap != null)
        {
            _bitmap.Dispose();
            _bitmap = null;
        }

        //File is of type Microsoft.AspNetCore.Components.Forms.IBrowserFile
        using var stream = e.File.OpenReadStream();
        Console.WriteLine(stream.Length); //returns correct byte size of the file.
        using var memoryStream = new MemoryStream();
        await stream.CopyToAsync(memoryStream);
        Console.WriteLine(memoryStream.Length); //returns correct byte size of the file.

        //_bitmap is null after SKBitmap.Decode returns.
        this._bitmap = SKBitmap.Decode(memoryStream);
        this._canvasView?.Invalidate();
    }

    public void PaintSurface(SKPaintSurfaceEventArgs e)
    {
        if (this._bitmap == null)
        {
            return;
        }

        var canvas = e.Surface.Canvas;
        canvas.Clear();
        canvas.DrawBitmap(this._bitmap, new SKPoint(0, 0));
    }
}

The position of the pointer of the stream has already been at 0.
I tried setting the position to 0 anyway, just to make sure that this is not the same problem as in Issue https://github.com/mono/SkiaSharp/issues/640#issuecomment-711481285.
//Did not help.
memoryStream.Seek(0, SeekOrigin.Begin);
memoryStream.Position = 0;

I checked, if SKData.Create may be the point of failure, but it returned an object.
//skData is not null, but I am absolutley not sure, what the content should look like.
var skData = SKData.Create(memoryStream);

Workaround
In my case, I am able to workaround this problem using byte-arrays as shown in the following example.
using var stream = e.File.OpenReadStream();
using var memoryStream = new MemoryStream();
await stream.CopyToAsync(memoryStream);
var byteArray = memoryStream.ToArray();

this._bitmap = SKBitmap.Decode(byteArray);
this._canvasView?.Invalidate();

It is somehow weird that SKBitmap.Decode behaves differently for byte-arrays and streams.

Error Handling
It is kind of weird to return null to indicate errors, as the API-Description hints The decoded bitmap, or null on error..
This makes it very hard to find the true problem.

Some kind of logging would be nice.
Throwing an exception, with a message could be helpful, of course that could be a breaking change if anyone relies on null results.
Or a wrapping object could be returned, like SkiaSharpResult<SKBitmap> or SKBitmapDecodeResult<SKBitmap>. The result could contain a boolean like IsSuccess or IsError and nullable properties for error messages and error codes and a property of the result type, which can be null on error or not null on success.

Basic Information

Version with issue:  2.88.3
Last known good version:  N/A
IDE:  Microsoft Visual Studio Community 2022 (64-Bit) - Version 17.5.3
Platform Target Frameworks:

Blazor WebAssembly: net7
Browser: Microsoft Edge

Target Devices:

PC: Windows 11 Pro 21H2

@JanKotschenreuther SKBitmap.Decode(memoryStream); overload for streams simply wraps it if it's seekable. So you create the SKBitmap this._bitmap but before using it you dispose the stream (it's wrapped in using statement). This explains why "the workaround" with byte arrays works

As far as I know, the using statement I am using there, is scoped to the scope of the method.
Using statements without braces and termination by ; are disposed at the end of the scope in which they are declared.

https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/statements/using

I know how 'using' is scoped. Are you sure though that this._canvasView?.Invalidate(); is causing synchronous access to the this._bitmap field before the nethod ends? Because I'm pretty sure it does not.

I do not know, if the method SKCanvasView.Invalidate is doing anything asynchronous.
The name, parameters or return-types are not telling me it is using any of the well known asynchronous patterns.
I also were not able to find any docs telling me that it could be an asynchronous operation.

https://learn.microsoft.com/en-us/dotnet/api/skiasharp.views.blazor.skcanvasview.invalidate?view=skiasharp-views-2.88
https://learn.microsoft.com/en-us/dotnet/api/skiasharp.views.blazor.skcanvasview?view=skiasharp-views-2.88

This is strange, either something wrong with Bitmap Data creation, OnPaint event scope or something that isn't properly documented. I was getting the same issue in a slightly different scenario.
Platform: WebAssembly
Problem statement: SKBitmap.Decode on simple byte[] within an OnPaint of the blazor view, bitmap is returned non-null. Image info looks right too (Height, Width, DPI etc). It just doesn't render rightaway in the same OnPaint call.
What didn't work.

Switching from SKGLView to SKCanvasView. The only difference was the error shown in console. SKGLView showed a warning of failed image drawing, no info about memory access. SKCanvasView displayed a error with memory access exception.
try/catch didn't work either and the OnPaint event returned rightaway.
What partially worked:
Cacheing the bitmap in global scope and rendering in any coming OnPaint was always successful.
Calling the Bitmap Cache routine in mouse events instead of OnPaint
Wrong Suspect My initial suspect was some thread sync issue in WebGL, but there something must be wrong with OnPaint
Root Cause: Unknown
Resolve: Double Buffering. Keep a buffer of SKBitmap, the same size as the the canvas. Render on the buffer outside OnPaint. Draw on OnPaint request only if the buffer has been prepared. Works like a charm. I only have to keep in mind one extra refresh/invalidate request due to an added layer of buffer.

Can I ask any update?


Restangular.all().post() Sending a OPTIONS request

Hello, after implementing the restangular.all().post() and checking the Network tab from web developer tools there is only one OPTIONS call.
I am doing something wrong?
Response Headers from my API:
Access-Control-Allow-Credentials:true
Access-Control-Allow-Headers:Accept, X-Requested-With
Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
Access-Control-Allow-Origin:*
Allow:POST,GET,OPTIONS,PUT

Maybe CORS ?

Yeah, i just included the cors npm module and everything worked:)

@kauegimenes  How did u mentioned it ??


Artifact name cannot be a variable

Doing something like this will not work. It gives an error ##[error]Value cannot be null. Parameter name: hashAndAlgorithm
- download: current
  artifact: $(someVariable)

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

ID: 861ce7a5-4fa4-55f1-2c97-46a9cc6a2f66
Version Independent ID: bdf954b9-9bbe-8b34-b674-71ad8153519d
Content: Publish and consume artifacts in pipelines - Azure Pipelines and TFS
Content Source: docs/pipelines/artifacts/pipeline-artifacts.md
Product: devops
Technology: devops-cicd
GitHub Login: @alexmullans
Microsoft Alias: amullans

Hi Izzmo, have you tried using ${{ variables['someVariable'] }} ?

@Izzmo  Thank you for the question.
My apologies on the delay, this issue has been assigned to the author.

This should work, but there may be a product bug. @willsmythe

@Izzmo Thank you for the question.
My apologies on the delay, this issue has been assigned to the author.

That did not work. It's throwing this error:

117639: "/build.yml (Line: 158, Col: 17): Unexpected value ''"

however parameters work if you're using a template: ${{parameters.somParam }}

@johnterickson is there anyone from your team who can look into this?

@Izzmo It works in my case, but the variable needs to be declared in the YAML global scope, not in the job.

@Izzmo Can you share the whole log from the task failure?

I will get you this soon.. sorry I need to recreate this as it's pretty old and we went a different direction.

I have the same problem.
I define my variable as global:

and my code:

and the error:

There was someone who recreated this the other day @johnterickson but it looks like they deleted their comment?

- download: current
  artifact: '$(artifactName)'

Works for me, declaration up top is:
variables:

group: 'variables-lab-core'
and the variable group contains:
Name: artifactName
Value: arm_templates_labcore_infra
If you have spaces or the likes in your variable you might need to escape the $(Variable) with encasing quotes/double quotes
https://docs.octoprint.org/en/master/configuration/yaml.html

@johnterickson
I'm trying to convert a pipeline from build completion triggers to pipeline triggers. I have this task in my YAML (it's actually inside a yaml template that's called from the main YAML file):
- download: images
  artifact: '$(az.pipeline.images.artifacts)'
  patterns: '$(az.pipeline.images.artifacts)/artifactInfo.txt'

az.pipeline.images.artifacts is a variable declared in the UI (and NOT marked as settable at queue time).
Full output from task:
##[debug]Evaluating condition for step: 'Download'
##[debug]Evaluating: SucceededNode()
##[debug]Evaluating SucceededNode:
##[debug]=> True
##[debug]Result: True
Starting: Download
==============================================================================
Task         : Download pipeline artifact
Description  : Download a named artifact from a pipeline to a local path
Version      : 1.2.4
Author       : Microsoft Corporation
Help         : Download a named artifact from a pipeline to a local path
==============================================================================
Download from the specified build: #29781926
Download artifact to: /home/vsts/work/1/images/core-linux
##[debug]Dedup parallelism: 192
Information, ApplicationInsightsTelemetrySender will correlate events with X-TFS-Session cdc7a0fe-c14b-4025-96ca-845e046141c4
Information, ApplicationInsightsTelemetrySender did not correlate any events with X-TFS-Session cdc7a0fe-c14b-4025-96ca-845e046141c4
##[error]Value cannot be null. (Parameter 'hashAndAlgorithm')
##[debug]Processed: ##vso[task.logissue type=error;]Value cannot be null. (Parameter 'hashAndAlgorithm')
##[debug]Processed: ##vso[task.complete result=Failed;]
##[debug]   at Microsoft.VisualStudio.Services.BlobStore.Common.DedupIdentifier.Create(HashAndAlgorithm hashAndAlgorithm)
   at Microsoft.VisualStudio.Services.BlobStore.Common.DedupIdentifier.Create(String valueIncludingAlgorithm)
   at Agent.Plugins.PipelineArtifact.PipelineArtifactServer.DownloadAsync(AgentTaskPluginExecutionContext context, PipelineArtifactDownloadParameters downloadParameters, DownloadOptions downloadOptions, CancellationToken cancellationToken)
   at Agent.Plugins.PipelineArtifact.DownloadPipelineArtifactTaskV1.ProcessCommandInternalAsync(AgentTaskPluginExecutionContext context, CancellationToken token)
   at Agent.PluginHost.Program.Main(String[] args)
Finishing: Download

@damonbarry What's this REST endpoint dump for build 29781926? (fill in the curly brackets)
https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/artifacts?api-version=5.1

{
  "count": 2,
  "value": [
    {
      "id": 56368784,
      "name": "core-linux",
      "source": "94d73d66-1c7a-5d82-2913-9d2cb8aa138c",
      "resource": {
        "type": "Container",
        "data": "#/43189012/core-linux",
        "properties": {
          "localpath": "/home/vsts/work/1/b/publish",
          "artifactsize": "535715705"
        },
        "url": "https://dev.azure.com/msazure/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/29781926/artifacts?artifactName=core-linux&api-version=5.1",
        "downloadUrl": "https://dev.azure.com/msazure/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/29781926/artifacts?artifactName=core-linux&api-version=5.1&%24format=zip"
      }
    },
    {
      "id": 56370914,
      "name": "core-windows",
      "source": "2d2b3007-3c5c-5840-9bb0-2b1ea49925f3",
      "resource": {
        "type": "Container",
        "data": "#/43189012/core-windows",
        "properties": {
          "localpath": "C:\\agent\\_work\\5\\b\\publish",
          "artifactsize": "742296354"
        },
        "url": "https://dev.azure.com/msazure/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/29781926/artifacts?artifactName=core-windows&api-version=5.1",
        "downloadUrl": "https://dev.azure.com/msazure/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/29781926/artifacts?artifactName=core-windows&api-version=5.1&%24format=zip"
      }
    }
  ]
}

@willsmythe -- please look into this issue.

@Izzmo Thank you for your feedback. The new version of the article will go live shortly. Also if you are using a variable name for artifact then you should use a single quotation mark:
exp: artifact: '$(someVariable)'

I've spent hours dealing with a variable passed into a template parameter and used as an the value in the artifact field. The only thing that works is to pass the artifact name to the template as a string, not in a variable (single and double quotes don't change that).
This seems to align with the last comment in the thread above, but history of this documentation article does not show an associated update of the article.
What is the status of this item?
Thank you.

I worked out my issue. Here's how I was able to call a YAML template, passing in a variable value for a template parameter:
- template: ./mytemplate.yml
  parameters:
    stageDependsOn: Build
    param2: ${{ variables.myVariableName }}

@GaTechThomas -- Thomas, thank you for your followup.  I'm glad it's working for you.

Wow, I thought that I was a quick learner. I just made the same mistake again that I did back in Feb and found my own response above.

I still can't get this to work with all variants of "'s and Parameters vs. Variables. .. Can we have some clear guidance on the documentation page?

@ShadowXVII Have you download the logs for the pipeline run and looked at the expanded pipeline? I've found that looking at the expanded pipeline often makes the problem much clearer. The vscode extension names Azure Pipelines is essential for pipeline work - just be sure the the language selected for the expanded yaml file is Azure Pipelines.


Show organization code in the course glimpse card

Shows the organization menu title in the course glimpse card, if defined.
It retains original functionality, only displaying this field if the organization wants to.
Solves #1570

@sampaccoud please merge it when possible. thanks.


Font Case

We need to be able to change the font case based on the theme.
We need to have three styles:
Normal: Use the current text casing
Uppercase: Force convert all letters to UPPERCASE
Lowercase: Force convert all letters to lowercase

This is a duplicate of #10


can not execute error_calculator.py

Hello,
I am getting error when I try to run error_calculator.py script :
Traceback (most recent call last):   File "error_calculator.py", line 147, in <module>     compute_error([target_path], [predicted_path])   File "error_calculator.py", line 38, in compute_error     target_stream = target.read().split()   File "/usr/lib/python2.7/codecs.py", line 686, in read     return self.reader.read(size)   File "/usr/lib/python2.7/codecs.py", line 492, in read     newchars, decodedbytes = self.decode(data, self.errors) UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 0: invalid start byte
I tried to change the code from:
with codecs.open(target_path, 'r', encoding='utf-8') as target, codecs.open(predicted_path, 'r', encoding='utf-8') as predicted:

to
with codecs.open(target_path, 'r', encoding='utf-8') as target, codecs.open(predicted_path, 'r', encoding='utf-8', errors='ignore') as predicted:

but this time I get :
    " ".join(predicted_stream[p_i-2:p_i+2])) AssertionError: <exception str() failed>
Any suggestions ?

Hello, I am getting this error:
---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
<ipython-input-19-047b7b92f34b> in <module>
      1 target_path = 'data/gt.txt'
      2 predicted_path = 'result/pred.txt'
----> 3 compute_error([target_path], [predicted_path])

<ipython-input-18-be6259310758> in compute_error(target_paths, predicted_paths)
     81                         target_stream[t_i], t_i, predicted_stream[p_i], p_i,
     82                         " ".join(target_stream[t_i-2:t_i+2]),
---> 83                         " ".join(predicted_stream[p_i-2:p_i+2]))
     84
     85                 t_i += 1

AssertionError: File: data/gt.txt
Error: tape (5) != tape. (5)
Target context: start of tape labeled
Predicted context: start of tape. labeled

I am providing two text file one with ground truth and other with a prediction from punctuate.
How to resolve this error?

I got the same error, why was this closed without any suggestion? Did you have a solution? @kadir-gunel , thanks

I got the same error, why was this closed without any suggestion? Did you have a solution? @kadir-gunel , thanks

Hello @hs79hs , I opened the issue more than 2 years ago, unfortunately I  don't recall anything.

Hello @hs79hs , I opened the issue more than 2 years ago, unfortunately I  don't recall anything.


Update Consul support to 0.7.3, some bug fixes

Added 0.7.3 binary sums
Changed default to 0.7.3
Removed  freebsd binary sums
Fixed some source install  - go version 1.7 requirement, build path, zip dependency

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@3cbc7ab). Click here to learn what that means.

@@            Coverage Diff            @@
##             master     #408   +/-   ##
=========================================
  Coverage          ?   55.13%
=========================================
  Files             ?        7
  Lines             ?      341
  Branches          ?        0
=========================================
  Hits              ?      188
  Misses            ?      153
  Partials          ?        0

Impacted Files
Coverage Δ

libraries/helpers.rb
48.64% <ø> (ø)

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 3cbc7ab...4d18793. Read the comment docs.

K - I THINK that I've got all the changes we've talked about worked out.  This includes the move of the default attribute for go to the kitchen test, an update to the README to warning about the go dependency version issue for the git installation versions, as well as the metadata.rb reverted to the prior version.

Thanks! I've just rebased the branch, so let's wait for a TravisCI build


Reduce code size of the SVG parser

Possibly don't use the pegjs-generated parser, or just share more states in the grammar.

It looks like after minification the parser is ~18 kB.

Can you elaborate on what the SVG parser is, and when it is used?

It basically parses SVG path strings and applies it to a Shape. Used for testing, loading serialized paths, for font awesome, etc.
Handwriting a parser can probably result in a much smaller size.


Dart 2.10.3 rollout failed on Chocolatey

Dart SDK 2.10.3 is unavailable to be downloaded from chocolatey because of an error:
https://chocolatey.org/packages/dart-sdk/2.10.3

Log:
https://gist.github.com/choco-bot/31962ded3c14bab330576190c3880d19

/cc @athomas @whesse

Looks like another flake in chocolatey. I re-triggered the verification.

This is fixed now, thanks for the report!


feat(ibm-required-enum-properties-in-response): introduce new validation rule

PR summary
This commit introduces the new "ibm-required-enum-properties-in-response" validation rule which will make sure that any enumerations defined within responses are defined as required, per API Handbook guidance.
PR Checklist
General checklist
Please make sure that your PR fulfills the following requirements:

[x] The commit message follows the Angular Commit Message Guidelines.
[x] Tests for the changes have been added (for bug fixes / features)
[x] Docs have been added / updated (for bug fixes / features)
[x] Dependencies have been updated as needed
[x] .secrets.baseline updated as needed?

Checklist for adding a new validation rule:

[x] Added new validation rule definition (packages/ruleset/src/rules/*.js, index.js)
[x] If necessary, added new validation rule implementation (packages/ruleset/src/functions/*.js, updated index.js)
[x] Added new rule to default configuration (packages/ruleset/src/ibm-oas.js)
[x] Added tests for new rule (packages/ruleset/test/*.test.js)
[x] Added docs for new rule (docs/ibm-cloud-rules.md)

:tada: This PR is included in version 1.26.0 :tada:
The release is available on npm package (@latest dist-tag)
Your semantic-release bot :package::rocket:

:tada: This PR is included in version 1.5.0 :tada:
The release is available on npm package (@latest dist-tag)
Your semantic-release bot :package::rocket:


Installation issue. docker-compose up command hangs

Hi,
I am new to OSF and I am trying to install it locally on a Mac using the instructions at https://github.com/CenterForOpenScience/osf.io/blob/develop/README-docker-compose.md
The command "docker-compose up --force-recreate --no-deps preprints" just hangs after the following lines.
.
.
.
preprints_1         | This backend must define a value for: accessToken
preprints_1         | This backend must define a value for: accessToken
preprints_1         | This backend must define a value for: accessToken
preprints_1         | This backend must define a value for: accessToken
preprints_1         | This backend must define a value for: accessToken
preprints_1         |
preprints_1         | Just getting started with Ember? Please visit http://localhost:4201/ember-getting-started to get going
preprints_1         |
preprints_1         | Livereload server on http://<IP_ADDRESS>:41954
preprints_1         | Serving on http://<IP_ADDRESS>:4201/
preprints_1         | This backend must define a value for: accessToken
preprints_1         | This backend must define a value for: accessToken
preprints_1         |
preprints_1         | Build successful - 12214ms.
preprints_1         |
preprints_1         |
preprints_1         |
preprints_1         | Slowest Nodes (totalTime => 5% )              | Total (avg)
preprints_1         | ----------------------------------------------+---------------------
preprints_1         | Concat (8)                                    | 3199ms (399 ms)
preprints_1         | ember-browserify (2)                          | 1537ms (768 ms)
preprints_1         | Babel (76)                                    | 1476ms (19 ms)
preprints_1         |
I tried installing on ubuntu and I had the same issue (though on ubuntu I had to run the command with sudo) . Please help me on how to proceed
Thank you.

Hi schandrika,
This actually means that things are working properly! The preprints container, though, only contains the front-end for OSF Preprints. You will also need to start the web and api containers to get the OSF back-end running. Once you have the web, api, and preprints containers all running, you should be able to access your local instance of OSF preprints at http://localhost:5000/preprints
To get a fully-working local preprints instance you will also need to start the wb container for file storage, the mfr container for file rendering, and fakecas for auth.
You can start all of these containers together with: docker-compose up -d web api wb mfr fakecas preprints
The -d option will run the containers in daemon mode, so you won't see any output on the console. You may view console output for any container by running docker-compose logs -f <container_name>
See Quickstart: Running all OSF services in the background for more info.
Thank you,
James C. Davis

Thank you for the prompt response James. Running the command you gave for starting all the containers is now downloading more dependencies.  It would help people like me who are new to docker and OSF, if the documentation adds a few lines about what each commands does. From my end I will go through docker documentation to familiarize myself. Once again, thank you for the prompt response.  My setup is progressing now.

#8544


Measurement of scrollbar width made async

Hi there, great repo! I found however one glitch: although the scrollbar seemed to work perfectly fine on the examples web page, it didn't work in my projects at all. I spent half a day finding out what I was doing wrong. Eventually I discovered, that maybe it's not my fault after all and it seemed to be bit of luck that for most people it works. Namely, the measurement of scrollbar was being done by injecting a temporary div into body, applying a specific class and measuring the widths of the aftermath. And it was all done synchronously. In my case however, the browser didn't catch up* with all the actions and the measurements were done before the styles application took effect. Thus I was ending up with the apparently default for Chrome 405px offsetWidth and clientWidth.
Putting the measurement action in setTimeout to invoke at the end of the event loop solved the problem. This aroused some synchronicity problems. One part was simply solved with callback, but then there was the need of handling potential call by user of methods like create() before the measurement was finished. I saw that the module was written in es5, therefore I didn't want to introduce any async functions or add dependencies etc. I decided to make a simple queue of actions to be done after measurement.
Cheers,
Peter.

I deduced it didn't catch up by simply logging the measurements in the getScrollbarWidth() function and then after wrapping it in setTimeout(). Of course first reading was wrong and second correct. NOTE: this only happened on initial render. I'm not sure why, but maybe due to a bloat of work to be done by browser engine and slowing down with rendering styles.

Thank you @jalooc!, any chance you can provide a test case reproducing the issue? (http://jsfiddle.net, http://jsbin.com/, http://codepen.io/, etc). I am curious about how this can happen.

As I wrote, I deduced that it must be caused by the bloat of work for browser at initial page load. I'm not sure how this could be simulated on any repl. Anyway, if you give the situation a little more consideration, the diagnosis is totally reasonable - the measured div's size was the default 405px, even though when I checked in dev tools, it was correctly set to 100px. It's clearly the matter of styles not being rendered fast enough. Now I'm not sure if a simple setTimeout(f()) is enough. It helped in my case, but I don't know if styles rendering for any browser takes exactly one event loop cycle or more.

Hi @jalooc, I think I was able to replicate it. Your diagnosis led me to the follow hypothesis.
If styles are not being applied when running the getScrollbar fn, then applying the styles when calling the fn will ensure the test element is updated when asking for its dimensions.
So by modifying the getScrollbarWidth function as follow solved the problem for me:
function getScrollbarWidth() {
    var el = document.createElement('div');
    el.style.position = 'absolute';
    el.style.top = '-9999px';
    el.style.width = '100px';
    el.style.height = '100px';
    el.style.overflow = 'scroll';
    el.style.msOverflowStyle = 'scrollbar';
    document.body.appendChild(el);
    return (el.offsetWidth - el.clientWidth);
}

Can you try it and see if that works for you too? Months ago I made the silly decision of moving these declarations to the stylesheet, which at that point seemed a bad idea but I did it anyway :/ I think this is one of its consequences.
Thank you.

Bingo ;) A lot better solution then mine.
As to styles managing - when I'm composing a component whose correct behavior depend on styles, I tend to keep the must-have styles inline, whilst allowing the user to style anything else by class names for easy customization. So far this methodology has been very efficient for me.
Cheers.

Cool, do you want to update this PR or should I close it?
The changes are basically:

index.js - update the getScrollbarWidth function as above
index.js - remove the scrollbarWidthTest key from the CLASSNAMES dictionary
gemini-scrollbar.css - remove the .gm-test css rule

Thanks again for your help, I really appreciate it. :+1:

Done @v1.3.1.


add epub for nixpkgs manual ( #15575 )

Motivation for this change
Things done

Build with nix-build
Tested with Calibre

See issue #15575

This looks great! I tested it in Calibre and it loads just fine.
I have no idea what it takes to fix this, but these notes:

the title of the book is "manual" which would probably be better called "Nixpkgs Contributor's Guide"
the author is blank

I love it!
Do you know what it'll take to improve the title?

Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable

I updated the PR so that Calibre now shows the title "Nixpkgs Contributors Guide" and author "NixOS community".
The Travis build seem to run into a timeout
*** Downloading ‘https://cache.nixos.org/nar/0n8pa5ksvg8q1r5r5jgkpda7l62v5nz05zkn8247c874q8213vam.nar.xz’ to ‘/nix/store/h4cwhrw4ryfjal0wycyp17disszn6xjx-stdenv-darwin’...
=== Reviewing PR 17053 : add epub for nixpkgs manual ( #15575 )
==> Creating nixpkgs repo in /Users/travis/.nox/nixpkgs
==> We're in a git repo, trying to fetch it
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
The build has been terminated

 It builds and loads nicely here. I love it. I'd love to get this merged in ASAP, but I'm not sure I'm the one to do it.
I think there is some corresponding work to be done for the frontend site. I'm hoping another person tagged here will know more :)

Reviewed 1 of 1 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks broke.

Comments from Reviewable


Stackification

@bitemyapp Thanks for the pull request, Chris, but I don't include Stack or Nix files in my source projects since they can be generated from the Cabal file.

:stuck_out_tongue: fair enough

@bitemyapp On a barely related note, you can see my attempt to formalize the connection between a simple initial and final encoding here: https://github.com/jwiegley/coq-haskell/blob/master/src/Control/Iso.v#L1161.  I'm stuck on one proof; plus, there are parametricity axioms to be verified.  But the hope would be to generalize this to be able to show that any ADT's final encoding is always isomorphic.

@jwiegley I'm the only person that has that repo forked, lol.


Fix gosec issues: hardcoded credentials & unhandled errors in delete.go & create.go

What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
Removing error from ControllerExpectationsInterface as it is only related to the internal implementation of interface which should be properly used.
Panics are used to propagate errors in internal implementation. Unit test or reviews should catch this.
Release note:
NONE

/lgtm

/approve

/retest

/retest

/test pull-kubevirt-apidocs

/test all

Also, this seems to be repeated in gosec changes, but annotating in source code is not safe and has no better outcome than just not enforcing the specific issue (while keeping just audit).

Indeed it's a general gosec related question.  Gosec as a static automatic tool sometimes produces (you can't avoid it) false positive warnings.  We still want to audit this places and make sure they are indeed false-positive. In places where we can change the code (even on the false positive cases) to fix the warning we obviously should do that. However on many other cases it's pure false positive - so we only have two options 1) disable the rule completely 2) Disable the rule locally on the false-positive place and put a comment explaining why it's false positive.
Personally I think that the bugs and potential issues we find due to gosec is worth the "source annotation" we put for the false positive.

Indeed it's a general gosec related question. Gosec as a static automatic tool sometimes produces (you can't avoid it) false positive warnings. We still want to audit these places and make sure they are indeed false-positive. In places where we can change the code (even on the false positive cases) to fix the warning we obviously should do that. However on many other cases it's pure false positive - so we only have two options 1) disable the rule completely 2) Disable the rule locally on the false-positive place and put a comment explaining why it's false positive.
Personally I think that the bugs and potential issues we find due to gosec is worth the "source annotation" we put for the false positive. So as you said - for the false-positive cases it's simply an audit comment (that also allow the test to be skipped)

By audit I meant log warnings.
Annotating the source code is not safe, as any changes to those sections for the wrong run are unchecked.
This is especially true when blocks are annotated, but even with individual lines the assumption that these will not be in-place changed or just copy pasted is wrong.
I have seen this repeated in multiple projects which choose to do it and it caused more harm than good.
IMO, it is much better to either leave the warning as is and revisit the report every period of time to check it, silence it completely or locate these "safe" usages to dedicated files which are ignored by the linter.
I can add one more point which question this attempt to keep it "clean" for the future: With Go specifically, there is much more vendored code than the project code, and we obviously do not scan it or control it. So even if one makes our project super clean, the final binary may be full of security problems.
This should not be a reason not to do our best to make kubevirt project clean of problems, but it should bring proportion to the amount of noise we introduce here.
I would really love to see a formal proposal to this whole effort. Was there such a community discussion/plan/proposal raised anywhere?

Hi @EdDev ,

Could you please summarize why the change is done and why panic fits?

I updated the PR description.

Also, this seems to be repeated in gosec changes, but annotating in source code is not safe and has no better outcome than just not enforcing the specific issue (while keeping just audit).

Well I would disagree.  // #nosec CWE: 798 - Potential hardcoded credentials seems (to me) pretty save and I feel confident that every kubevirt contributor will take necesery care to not introduce some potentional error here. I think the cost of auditing will be too much for us and we would drop it. Keep in mind that we don't have few issues here.

I can add one more point which question this attempt to keep it "clean" for the future: With Go specifically, there is much more vendored code than the project code, and we obviously do not scan it or control it. So even if one makes our project super clean, the final binary may be full of security problems.
This should not be a reason not to do our best to make kubevirt project clean of problems, but it should bring proportion to the amount of noise we introduce here.

This point negates itself(IMHO). Lets ensure we reduce the 'noise' as much as it is possible. I will have a look why this is flagged and will reconfigure the gosec or rename the variables.

I would really love to see a formal proposal to this whole effort. Was there such a community discussion/plan/proposal raised anywhere?

I was not aware that proposal is required for this. There was short 'introduction' of gosec in community meeting on 23.9. (it seems that you were present) There should be issue or docs for this if I understand correctly yesterday`s notes. Could you please link me to the discussion so we can continue there?

I was not aware that proposal is required for this. There was short 'introduction' of gosec in community meeting on 23.9. (it seems that you were present) There should be issue or docs for this if I understand correctly yesterday`s notes. Could you please link me to the discussion so we can continue there?

I'm going to open a generl issue for gosec and a google doc describing some re-occurring comments so people can discuss and comment. I'm currently working on it - will send the link shortly

@EdDev
Gosec was triggered by variables VirtHandlerCertSecretName, PassthroughEnvPrefix which contains secret / pass. I would say that this rule is a good candidate for audit only. WDYT?

@EdDev
Gosec was triggered by variables VirtHandlerCertSecretName, PassthroughEnvPrefix which contains secret / pass. I would say that this rule is a good candidate for audit only. WDYT?

I think gosec is telling us that we should not put certs and passwords in code, which is probably correct.
So if this is not a real secret/password, then maybe we can call it differently? Maybe token?

I think gosec is telling us that we should not put certs and passwords in code, which is probably correct.
So if this is not a real secret/password, then maybe we can call it differently? Maybe token?

Yes, but in VirtHandlerCertSecretName the secret is referring to k8s secret and I don't know a better way to describe this variable (this is the case for other variables too). I will leave it for others. Also PassthroughEnvPrefix is containing Passthrough which IMO also describes the variable best...

Yes, but in VirtHandlerCertSecretName the secret is referring to k8s secret and I don't know a better way to describe this variable (this is the case for other variables too). I will leave it for others.

If we drop the Secret word it will not be good enough.

Also PassthroughEnvPrefix is containing Passthrough which IMO also describes the variable best...

Sounds like a bug in the gosec parsing then. There are several names that start with pass*.
If we do not have any alternatives, we end up with the labeling/commenting ugliness. We just need to do our best to limit these, that way they will no pollute the code too much.


[GHSA-vxf5-wxwp-m7g9] Open Redirect in Next.js

Updates

Affected products
Description

Hi there @timneutkens! A community member has suggested an improvement to your security advisory. If approved, this change will affect the global advisory listed at github.com/advisories. It will not affect the version listed in your project repository.
This change will be reviewed by our highly-trained Security Curation Team. If you have thoughts or feedback, please share them in a comment here! If this PR has already been closed, you can start a new community contribution for this advisory

See also discussion at https://github.com/github/advisory-database/pull/179


fix: flaky H2ScalaAllPersistenceIdsTest

Resolves: #184
Link to the investigation: https://github.com/apache/pekko-persistence-jdbc/issues/184#issuecomment-2134801290

let us merge this and then move on the release.


--set spoof_source_address does not work with -s switch

The mitmproxy version is 3.0.3
The python version is 3.6
The iptable rule :
sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --match multiport --dport 80,443 -j REDIRECT --to-port 8080
The command to run :
mitmdump -p 8080 -s /etc/myscript/myscript.py -m transparent -q -k --certs *.mysite.com=/etc/mycert/mysite.pem --set spoof_source_address=true
The result :
502 Bad Gateway
ProtocolException('Server connection to ('<IP_ADDRESS>', 443) failed: Error connecting to "<IP_ADDRESS>": [Errno 99] Cannot assign requested address',)
Any idea?

When "spoof_source_address" is used alone, it will crash with the captioned error.
When "spoof_source_address" used with "upstream_bind_address" and "upstream_bind_address" not blank, it will running smoothly.
If "upstream_bind_address" is blanked with "spoof_source_address", it will also crash with the captioned error.
Can "spoof_source_address" work alone?  In my understanding, "spoof_source_address" will show the original source client IP address.  Am I right?


[BUG] commissiong failed with src/controller/python/ChipDeviceController-ScriptPairingDeviceDiscoveryDelegate.h:59: CHIP Error 0x00000032: Timeout

Reproduction steps
I have used python controller to done a stress test on my RPI sample dut (all-clusters-app) on Pair-Unpair operation for 10000 iteration. The iteration 6126 is passed without any error but the 6127 is Failed to establish secure session to device during commission the dut with the below error and the next iteration 6128 is also passed without any issues.

2024-04-27 09:39:17,885 - root - WARNING - ChipDeviceCtrl.py:HandlePASEEstablishmentComplete:307 - Failed to establish secure session to device: src/controller/python/ChipDeviceController-ScriptPairingDeviceDiscoveryDelegate.h:59: CHIP Error 0x00000032: Timeout
2024-04-27 09:39:17,885 - root - WARNING - ChipDeviceCtrl.py:HandleCommissioningComplete:271 - Failed to commission: src/controller/python/ChipDeviceController-ScriptPairingDeviceDiscoveryDelegate.h:59: CHIP Error 0x00000032: Timeout

Bug prevalence
Whenever i do this
GitHub hash of the SDK that was being used
3718e996b56f36a553c1b4571f77728396590776
Platform
python, raspi
Platform Version(s)
RPI-4, 8GB RAM
Anything else?
Example of Failed iteartion details:
The iteartion number 6126 is passed below file for the same
TH log: log_2024-04-27_09-31-00.log
DUT log:Dut_log_6126_2024-04-27T09_31_10_889913.log
The iteration number 6127 is failed with this error below the logfile
TH log : log_2024-04-27_09-31-26.log
DUT log: Dut_log_6127_2024-04-27T09_39_18_048163.log
The iteartion number 6128 is passed below file for the same
TH log: log_2024-04-27_09-39-31.log
Dut log: Dut_log_6128_2024-04-27T09_39_40_860987.log
For the detailed summary please reference this json: summary.json
Script reference: https://github.com/CHIP-Specifications/matter-qa/blob/main/src/matter_qa/scripts/reliability_scripts/TC_Pair.py

closing the ticket for now, following-up with a new ticket..


ember-simple-auth integration

I noticed my app wasn't sending the authorization header when creating a resource, and after some digging I got it going by overriding ApplicationAdapter#fetchOptions in the resource adapter, making it lookup the access token in ember-simple-auth's session:
fetchOptions(options) {
    let isUpdate;
    options.headers = options.headers || { 'Content-Type': 'application/vnd.api+json' };
    // const authHeader = window.localStorage.getItem('AuthorizationHeader');
    const simpleAuthSession = JSON.parse(window.localStorage.getItem('ember_simple_auth:session'));
    const accessToken       = simpleAuthSession.secure.access_token;
    const authHeader        = 'Bearer ' + accessToken;

    if (authHeader) {
      options.headers['Authorization'] = authHeader;
    }
    if (typeof options.update === 'boolean') {
      isUpdate = options.update;
      delete options.update;
    }
    return isUpdate;
  }

I'm sure there must be a better way :) Beginning to get familiar with ember-jsonapi-resources, and I'm really a rubyist still grokking ember. I'll run this by ember-simple-auth's author tomorrow (I work with him), to see if he has any suggestions.
Thought it worth bringing up, as people using EJR might be using ember-simple-auth as well, and this could get the ball rolling for a proper solution.

@oliverbarnes I'll take a look at creating a method to getAuthorizationToken and call that from the fetchOptions method. Also I'll add this example to the wiki. Thanks for sharing your solution!

You’re welcome, I’d submit a patch if I could. In the future when I’m better versed I’ll do that.
the getAuthorizationToken approach sounds good, specially if configurable through environment.js
Oliver
On July 16, 2015 at 6:49:20 AM, Bill Heaton<EMAIL_ADDRESS>wrote:
@oliverbarnes I'll take a look at creating a method to getAuthorizationToken and call that from the fetchOptions method. Also I'll add this example to the wiki. Thanks for sharing your solution!
—
Reply to this email directly or view it on GitHub.

@oliverbarnes I'm thinking a mixin for the authorization like so:
import Ember from 'ember';

export default Ember.Mixin.create({

  /**
    The name of the Authorization request-header field

    @property authorizationHeaderField
    @type String
    @required
  */
  authorizationHeaderField: 'Authorization',

  /**
    The name key, stored locally, that references the Authorization request-header credential/token

    @property authorizationHeaderStorageKey
    @type String
    @required
  */
  authorizationHeaderStorageKey: 'AuthorizationHeader',

  /**
    Authentication credentials/token used with HTTP authentication

    @property authorizationCredential
    @type String
    @required
  */
  authorizationCredential: Ember.computed({
    get(key) {
      key = this.get('authorizationHeaderStorageKey');
      return window[this._storage].getItem(key);
    },
    set(key, value) {
      key = this.get('authorizationHeaderStorageKey');
      window[this._storage].setItem(key, value);
    }
  }),

  /**
    Storage type localStorage or sessionStorage

    @property _storage
    @type String
    @private
  */
  _storage: ['localStorage', 'sessionStorage'][0]

});

Then the mixin can be reopened and the authorizationHeaderStorageKey set to 'ember_simple_auth:session' and/or authorizationCredential get method set to extract the access_token from storage and concatenate whatever is necessary to form the token that will be assigned to the "Authorization" request-header as the credentials.

@oliverbarnes see this solution doc and let me know if the new mixin works out for you, https://github.com/pixelhandler/ember-jsonapi-resources/wiki/Customizing-your-Authorization-Header

awesome, thanks @pixelhandler. I'll try it out this weekend, saw the pull request but didn't have time to look at it so far

Hey, finally got around to testing it, and it works for me. Just took me a couple of hoops to getting working based on docs, I'll try updating them to clarify for the next noob ;)

Looks like I can't edit the wiki, you might have to add me as a collaborator? I would just increment authorization mixin example to include the path where it needs to be saved, add an ember import, and close the computed property argument block:
//app/mixins/authorization.js

import Ember from 'ember';
import AuthorizationMixin from 'ember-jsonapi-resources/mixins/authorization';

export default AuthorizationMixin.reopen({
  authorizationHeaderStorageKey: 'ember_simple_auth:session',
  authorizationCredential: Ember.computed({
    get(key) {
      key = this.get('authorizationHeaderStorageKey');
      const simpleAuthSession = JSON.parse(window.localStorage.getItem(key));
      return 'Bearer ' + simpleAuthSession.secure.access_token;
    }
  })
});

I'd then add an example of where it's being used by an adapter:
import ApplicationAdapter from 'ember-jsonapi-resources/adapters/application';
import AuthorizationMixin from '../mixins/authorization';
import config from '../config/environment';

export default ApplicationAdapter.extend(AuthorizationMixin, {
  type: 'proposal',
  url: config.APP.API_HOST +  'proposals'
});

BTW, is it possible for me to re-open ApplicationAdapter to include the mixin internally, so all adapters have it by default?

@oliverbarnes I added you as a collaborator, feel free to update the wiki pages, and thank you for testing out the change for auth support :)
Regarding all adapters using the mixin, all I had to do what change the path for the import, I had to also change the generator blueprint too, see this example https://github.com/pixelhandler/jr-test/commit/8694c5a9dfbe179de92388f890050774988d91ed
Loading the application adapter from the relative path at ./application uses the application adapter with the mixin applied to it. Previously I imported the application adapter from the addon directory not the app directory. So for all adapters that extend the application adapter the auth mixin is already applied.


Unused field variable in MultiFlatten

While investigating an unrelated issue I noticed that the following variable is not actually being used.
https://github.com/smallrye/smallrye-mutiny/blob/675c4126348ff70342e0097393f1c33e3c11db36/implementation/src/main/java/io/smallrye/mutiny/groups/MultiFlatten.java#L26
It seems like it's a left over artifact from previous commits
https://github.com/smallrye/smallrye-mutiny/commit/b5c3a670efa251385a919bb2c6bc74de45c81d92
https://github.com/smallrye/smallrye-mutiny/commit/aa2361dbedf09cd757a45908e1e05f4458fdb802
I wonder through, shouldn't requests be used in the place of the 256 constants in the following lines?
https://github.com/smallrye/smallrye-mutiny/blob/675c4126348ff70342e0097393f1c33e3c11db36/implementation/src/main/java/io/smallrye/mutiny/groups/MultiFlatten.java#L102
https://github.com/smallrye/smallrye-mutiny/blob/675c4126348ff70342e0097393f1c33e3c11db36/implementation/src/main/java/io/smallrye/mutiny/groups/MultiFlatten.java#L103
https://github.com/smallrye/smallrye-mutiny/blob/675c4126348ff70342e0097393f1c33e3c11db36/implementation/src/main/java/io/smallrye/mutiny/groups/MultiFlatten.java#L123
https://github.com/smallrye/smallrye-mutiny/blob/675c4126348ff70342e0097393f1c33e3c11db36/implementation/src/main/java/io/smallrye/mutiny/groups/MultiFlatten.java#L124

Thanks, yes, it's a leftover. But it's not related to the size of the queue.

Actually it should be used... Working on it.


remove ODB header

ODB is about to switch to headers defined in docs-book-pcfservices/config.yml
related to https://github.com/pivotal-cf/docs-book-pcfservices/pull/25
Cheers,
Craig
cc @avade

Thanks, @craigfurman!


Variables containing "_[0-9]" are not displayed

path_2d = ...
shape_3d = ...
_33 = ...
this_is_1_sphere = Sphere(1)

show_all()

Nothing will be displayed.

I wanted to ensure that the _i1, _i2, ... of IPython/Jupyter are ignored. But chose the wrong regex.
I fixed it so that this happens:
path_2d = Sphere(0.6)
shape_3d = Box(1,2,2)
_33 = Cylinder(0.3,4)
_i33 = Box(3,1,1)
this_is_1_sphere = Sphere(1)

show_all()

Everything is shown, except _i33 which is the ipython /Jupyter pattern _i\d+

Awesome, thanks!

Fixed in 2.6.1


3.0.9 Error: draw State graph

Petrify tool chain execution failed :-(
Failure caused by:
Errors running draw_astg:
sh: 1: dot: not found
*** FATAL ERROR: dot could not be executed successfully

Did you try installing dot?
Perhaps the error on our end should be more descriptive, telling users to go install it.

Resolved.

For Windows version we include a cut-down version of Graphviz. The problem is that one of Petrify tools (draw_astg) calls dot too.. .
Could you try this internal release please (without installing dot) - we tried to fix it there:
https://drive.google.com/file/d/0B2s4C-vvCyaidzV4ZUJCZWpnZG8/view?usp=sharing


chore(chromatic): change deploy label and remove label after deploy

General summary

Deploy chromatic on "need: deploy-chromatic" instead of "need: review-design".
Remove the label when the build is done.
Add help in the PR template

Test CI OK


Set up Evals directory

I think it'll be good to launch an evals test harness when i release a blog post on how to unit test w/ pytest.mark.parameterize.
import pytest
from itertools import product
from pydantic import BaseModel
from openai import OpenAI
import instructor

class UserDetails(BaseModel):
    name: str
    age: int

# Lists for models, test data, and modes
models = ["gpt3.5-turbo", "gpt4", "gpt4-1106-preview"]
test_data = [
    ("Jason is 10", "Jason", 10),
    ("Alice is 25", "Alice", 25),
    ("Bob is 35", "Bob", 35)
]
modes = ["TOOLS", "FUNCTIONS", "JSON_MODE"]

@pytest.mark.parametrize("model, data, mode",  product(models, test_data, modes))
def test_extract(model, data, mode):
    sample_data, expected_name, expected_age = data

    # Setting up the client with the instructor patch
    client = instructor.patch(OpenAI(), mode=mode)

    # Calling the extract function with the provided model, sample data, and mode
    response = client.chat.completions.create(
        model=model,
        response_model=UserDetails,
        messages=[
            {"role": "user", "content": sample_data},
        ]
    )

    # Assertions
    assert response.name == expected_name, f"Expected name {expected_name}, got {response.name}"
    assert response.age == expected_age, f"Expected age {expected_age}, got {response.age}"

I think a first step is actually changing all the examples to be documented via tests, and at least checking that there are no validation errors per model.

I’v3 been using this with versioned artifacts via W&B, as well as running distributed tests and grouping them in the UI and logging predictions. Would be great to combine efforts


Online Roster

Online roster updated (under Selection round online roster folder on SCC teams channel), please check to see when you expected to handle online participation matters.

Thanks Zama, it's the ladies turn to monitor the roster, the gents are presenting...


refactor recommendations api using flask restplus

Codecov Report

Merging #110 (d876400) into master (894318d) will increase coverage by 0.07%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #110      +/-   ##
==========================================
+ Coverage   95.70%   95.77%   +0.07%
==========================================
  Files           7        7
  Lines         349      355       +6
==========================================
+ Hits          334      340       +6
  Misses         15       15

Impacted Files
Coverage Δ

service/__init__.py
86.95% <100.00%> (+2.74%)
:arrow_up:

service/routes.py
99.02% <100.00%> (+0.01%)
:arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Hello Meghana,
in line 39 authorizations=authorizations at file init.py, I remember the professor told us not to add in.


Installing all SoS modules from github repo

This is separated from #810 . After code refactoring, it seems every time I git pull the core repo and install the latest code, my other modules are lost. I'll have to run pip to get them back. Is this the case? Any shortcuts to propose?

Can you confirm this? On my machine

python -c 'from sos.runtime import bash
git pull
python setup.py install
python -c 'from sos.runtime import bash

works fine.

It is fine too on my end. I had not installed sos-r separately. Is it included in sos-essentials (the one that I'm sure I've installed)!

Should be, https://github.com/vatlab/sos-essentials/blob/master/setup.py#L88

So next time on a new machine you can try to install sos-essentials and check pip list | grep sos and see if these packages are installed correctly.

Ok will do that. It's likely my installation has failed on my home computer that I did not notice. In fact you've probably noticed pip will generate a few seemingly scary yet benign errors so I stopped worrying (i even put  a note on the documentation -- Note for Conda users on  https://vatlab.github.io/sos-docs/#runningsos). But this seems to be a case it in fact failed.
Close the issue for now because it is likely an accidental pip fail.

There is a separate issue though.
The R action is used by sos, and R language is used by sos-notebook. Although the latter can be difficult to setup, the former does not need any dependency and in fact be installed and used without sos-notebook. Actually, on a server setup, people might want to install all actions but not the language modules.
So it seems natural to move all actions and targets from language modules to sos and leave sos-r etc as pure language modules for sos-notebook, but on the other hand I tend to like the separation of components by language.

Now again I get:
ERROR: [ms_1]: Failed to process step depends: Py_Module('sklearn'), Py_Module('plinkio') (name 'Py_Module' is not defined)

which was fixed by pip install sos-python. So something is indeed going on with my computational environment.

Ok my bash also failed. Here is what I did:
$ python -c 'from sos.runtime import bash'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: cannot import name 'bash'

$ cd ~/GIT/software/SoS; git pull
Already up-to-date.

$ python setup.py install
$ python -c 'from sos.runtime import bash'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: cannot import name 'bash'

$ pip install sos-bash
$ python -c 'from sos.runtime import bash; print("done!")'
done!

The packages are "related" by install_requires and entry_points, and I have not heard of anything that causes the removal of sos-bash with the installation/update of sos. I will try to reproduce it (e.g. running from sos.runtime import bash before and after updating sos).

I can now reliably reproduce this on my machine. Not sure how this was set up but

No sh

[bpeng1@bcbm-bpeng:~/sos-bash (master)]$ python -c 'from sos.runtime import sh'
Traceback (most recent call last):
 File "<string>", line 1, in <module>
ImportError: cannot import name 'sh'

Install sh,

[bpeng1@bcbm-bpeng:~/sos-bash (master)]$ python setup.py install
running install
running bdist_egg
running egg_info
writing src/sos_bash.egg-info/PKG-INFO

works

[bpeng1@bcbm-bpeng:~/sos-bash (master)]$ python -c 'from sos.runtime import sh'
[bpeng1@bcbm-bpeng:~/sos-bash (master)]$

re-install sos

[bpeng1@bcbm-bpeng:~/sos (master *)]$ python setup.py install

sh is gone

[bpeng1@bcbm-bpeng:~/sos-bash (master)]$ python -c 'from sos.runtime import sh'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: cannot import name 'sh'
[bpeng1@bcbm-bpeng:~/sos-bash (master)]$

Need to figure out where sh is stored and how to retrieved, and how the installation of sos removes the sh entry point.

This is interesting:
Failed to load target bash: (sos <IP_ADDRESS> (/Users/bpeng1/anaconda/lib/python3.6/site-packages/sos-<IP_ADDRESS>-py3.6.egg), Requirement.parse('sos>=<IP_ADDRESS>'), {'sos-notebook'})

In sos-bash, we have
    install_requires=[
          'sos',
          'sos-notebook',
          'bash-kernel',
      ],

which does not say anything about version of sos but it is somehow linked to the pip version <IP_ADDRESS>. When local sos is installed, which lags behind pip version <IP_ADDRESS>:
[bpeng1@bcbm-bpeng:~/sos (master *)]$ sos --version
sos <IP_ADDRESS> for Python 3.6.1

so it stops bash from being loaded.
So the solution seems to always keep git version ahead of pip version...

I will close this ticket unless the problem arises again.


fix(DatePicker): Date clears after invalid character is added.

Issue: #1524
What I did

Fix the bug when the date clears after an invalid character is added.
Screenshots:

Checklist

[x] changeset has been added
[x] Pull request description is descriptive
[x] I have made corresponding changes to the documentation
[x] New and existing unit tests pass locally with my changes
[ ] I have added tests that prove my fix is effective or that my feature works

How to test

Open DatePicker in the docs -> Select Minimum and Maximum dates -> Enter a character OR select a date and then add an invalid character -> See that error appears.

I need to think about this ticket a little more. I accidentally added it to the iteration before refining it, sorry! I will get back to you on this next week.


Adding requestIdleCallback polyfill

to: @ljharb @lencioni

@lencioni updated to ric-shim

@ljharb you are right!  yesterday I was a bit tired from launch.  Updated now.  Are you okay with assigning it to global like this?

Released as v1.4.0


test: Increase the tolerance between A3/A5

As the type of A(n) is integer, and A3 and A5 are close to
each other. Sometimes A3 is equal to A5. So change the ">" to
">="
Signed-off-by: Hu Zhenyu<EMAIL_ADDRESS>

This PR is for issue https://github.com/zephyrproject-rtos/zephyr/issues/45914


On-cell color encoding

Color encoding of an attribute

I think this can start out as simply displaying a colormapped attribute from the edge data or one (or both) of the connected nodes.
In the future we can add a new issue to handle things like aggregated nodes, or a more general function of node/edge data (i.e. path length, etc.).


Long column names cut in column chooser dropdown

Expected behavior and actual behavior
Column chooser dropdown is cut for longer columns names when some column is selected/deselected (check screenshot below). It should always show full name of the column.
Additionally dropdown label is changed from "Show/Hide Column" to "Select". Label should stay unchanged
Steps to reproduce the problem
Use long column names ("First name", "Last name" or "Email address" is long enough) in table data.
Open column chooser and deselect any column
Environment
Chrome Version 58.0.3029.81
Windows 7
DELL Laptop
Screenshots

Code examples
https://codepen.io/anon/pen/EmWgJW

Actually a defect in px-dropdown, not px-data-table. Fixed by my component redesign which will be released in June with the rest of the redesigned components. Partially captured here.


Dockerfile #11

Hi, this is a Dockerfile you can use to publish docker image to dockerhub. It is much easier to run it from Docker.

@javajefe Thanks for the PR. Ill be Merging this. Do you have a docker compose setup to test this with Envoy?

@javajefe  Will however be squashing the commit.


CodeceptJS Exits with Status 0 when Tests Fails on Jenkins how to avoid it?

What are you trying to achieve?
What do you get instead?

Provide console output if related. Use --verbose mode for more details.

# paste output here

Provide test source code if related

// paste test

Details

CodeceptJS version:
NodeJS Version:
Operating System:
Protractor || WebDriverIO || Nightmare version (if related)
Configuration file:

# paste suite config here

@ninpop25 Can you please provide more information? How you run test, test output in verbose mode?

close due inactivity


improve add more profiles in tablets channel

Proposed changes
Add more profiles in tablets channel:

AddBatchTime: time for TabletsChannel::add_batch
WriteBlockTime: time for write block into delta writer

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

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 52.56 seconds
stream load tsv:          514 seconds loaded<PHONE_NUMBER>9 Bytes, about 138 MB/s
stream load json:         20 seconds loaded<PHONE_NUMBER> Bytes, about 112 MB/s
stream load orc:          65 seconds loaded<PHONE_NUMBER> Bytes, about 16 MB/s
stream load parquet:          32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select:          29.9 seconds inserted 10000000 Rows, about 334K ops/s
storage size:<PHONE_NUMBER>9 Bytes


graphql-java-spring archived in favor of spring-graphql project

Any plans to move to using spring-graphql project?

Yes,
It's what I'd like to do.
It will be for 2.x versions.
Étienne


Update nl base and crud language files

Add some new entries to the Dutch language files

A new inspection was created.

The inspection completed: No new issues

Thanks a lot @jnoordsij !


Implement scope / ancestry tracking representatives

It is a common need when doing refactors to do simple name resolution, as well as gathering data about the parental nodes. It would be really useful to have built-in representatives to do so.

This still needs a lot of work to fully implement python's scoping rules (see this [https://github.com/isidentical/aztec/blob/master/aztec/symtable.py] for example), but the basics are implement the in latest commits.

https://github.com/isidentical/refactor/commit/792cd742135ac4265ef0eb02f176fe8f8c2ffc15#diff-da07cd56ef1ad11b6e608983b8843a69b0119a168bc791aa313b3a79f2211eca kind of resolved this. There is a lot to go in terms of representatives, but as the initial step I'd call this done.


Why use as const in useHash.

I define a custom hook function named useScannerInput. Typescript throw a error when call the function. I   change my code form  return [scannerValue, setScannerValue]; to  return [scannerValue, setScannerValue] as const; refer to how this use in useHash. And solved this error, but I don't konw why.
//Function define
const useScannerInput = ({
  selector,
  onEnter
}: any) => {
  const [scannerValue, setScannerValue] = React.useState<string>('');

  React.useEffect(() => {
    const dom = document.querySelector(selector);
    const cleanUpScannerEvent = dom ? scannerEventListener(dom as HTMLElement, onEnter, setScannerValue) : null;

    return () => {
      if (cleanUpScannerEvent) {
        cleanUpScannerEvent();
      }
    };
  }, [onEnter, selector]);

  return [scannerValue, setScannerValue];
};

//Function call
const [scannerValue, setScannerValue] = useScannerInput({
    selector: '#scannerInput',
    onEnter: addSku
  });
setScannerValue('');

TS2349: This expression is not callable.
Not all constituents of type 'string | Dispatch<SetStateAction<string>>' are callable.
Type 'string' has no call signatures.
``

without as const, typescript will treat element of return array as  union type of every element type of return array. with as const, typescript will treat return array as a tuple, in other word every element in return array will keep it's type.
e.g.
const arr1 = [100, '100']
type T1 = typeof arr1 // (number | string)[]

const arr2 = [100, '100'] as const
type T2 = typeof arr2 // readonly [100, '100']

without as const, typescript will treat element of return array as union type of every element type of return array. with as const, typescript will treat return array as a tuple, in other word every element in return array will keep it's type.
e.g.
const arr1 = [100, '100']
type T1 = typeof arr1 // (number | string)[]

const arr2 = [100, '100'] as const
type T2 = typeof arr2 // readonly [100, '100']

thanks.


Http an ws callbacks. Why pointers?

Hi Alex
Why you use pointers
(auto* req, auto* resp)
Instead of references
(const auto& req, auto& resp)
?
And in methods of responce you use
auto* foo() { return this; }
Instead of
auto& foo() { return *this; }
Is there some significant reason to use pointers?
Sorry that it a bit violate your rule about questions

That's just how it is, both V8 and C deal with pointers. Malloc returns a pointer.


Inaccurate ACA DNS Doc

Please provide us with the following information:

This issue is a: (mark with an x)

[ ] bug report -> please search issues before submitting
[X] documentation issue or request
[ ] regression (a behavior that used to work and stopped in a new release)

Issue description
The following commands to retrieve the CA Environnement static IP and domain shown at https://docs.microsoft.com/en-us/azure/container-apps/vnet-custom?tabs=bash&pivots=azure-cli are inaccurate :
ENVIRONMENT_STATIC_IP=`az containerapp env show --name ${CONTAINERAPPS_ENVIRONMENT} --resource-group ${RESOURCE_GROUP} --query staticIp --out json | tr -d '"'`
and
ENVIRONMENT_DEFAULT_D ![issueDnsCLI](https://user-images.githubusercontent.com/72125625/177377440-39aa9658-79a0-4155-8d8d-835c731ded77.png) OMAIN=`az containerapp env show --name ${CONTAINERAPPS_ENVIRONMENT} --resource-group ${RESOURCE_GROUP} --query defaultDomain --out json | tr -d '"'`
The information is contained in the properties object of the response, hence the command line should be written as :
ENVIRONMENT_STATIC_IP=`az containerapp env show --name ${CONTAINERAPPS_ENVIRONMENT} --resource-group ${RESOURCE_GROUP} --query properties.staticIp --out json | tr -d '"'`
and
ENVIRONMENT_DEFAULT_DOMAIN=`az containerapp env show --name ${CONTAINERAPPS_ENVIRONMENT} --resource-group ${RESOURCE_GROUP} --query properties.defaultDomain --out json | tr -d '"'`
I would also suggest to move to the $() form and avoid the backquotes as it makes the copy/paste in scripts easier.
Steps to reproduct

execute the following command :
ENVIRONMENT_DEFAULT_DOMAIN=az containerapp env show --name ${CONTAINERAPPS_ENVIRONMENT} --resource-group ${RESOURCE_GROUP} --query defaultDomain --out json | tr -d '"'
echo $ENVIRONMENT_DEFAULT_DOMAIN
``

Expected behavior [What you expected to happen.]
The environnement default domain is displayed
Actual behavior [What actually happened.]
It will display an empty string as there is no defaultDomain entry within the top level response object.
Screenshots
Attached screenshot of erroneous and correct CLI commands.
Additional context
CLI

Thanks for reporting. A fix for this is rolling out in a few hours.

Hi, I noticed that the doc still has the same issues. Any plans on updating the page ?

@anthonychu can we please check this was closed or not?

Fixed


lookups to multiple sources per field

PropertyType = lookup can be configured to have more than one "Value" (selection from the dropdown list of QA configs). If Profile specifies that lookup should search more than one QA config, then Editor needs to search both of those sources and present results from both. - [ ] Search more than one QA source at a time if specified in Profile.
See LC BFE Monograph/Work/Subject/SearchSubjects/Search LCSH/LCNAF
The "Search LCSH/LCNAF" field searches LCNAF and LCSH, and presents results in two sets.

screenshot showing LC Profile Editor with two lookup sources for the field:

screenshot showing how this looks when profile is used in BFE and user does a search

The way to handle this (I think) will be to federate the query and combine the responses.

Closing with merge to master


conn: Add Resource, superseds devices.Device

In practice I want to be able for gpioreg.Register() to eventually enforce that
Halt() is implemented on gpio.Pin, so that three's a consistent way to stop
gpiostream operations or PWM() output. This requires the interface to live in
conn, not in devices.
Do not use go1.9 type alias to not break compatibility with older Go version
yet.

Codecov Report

Merging #162 into master will not change coverage.
The diff coverage is 100%.

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


Window Scoped JavaScript Objects

Can you add some more doc/examples regarding subj., please?

How to add window.connectionsExtension into JSP? I struggle to add this into /opt/data/shared/customization/common/nav/templates/header.jsp
It would be great to publish a full example of window.connectionsExtension JSON instead of forcing people to gather breadcrubs all over this place. It is much easier to modify what I need and delete what I do not need instead of doing a synthesis of information from several pages.

Hi Bill, yes, thank you.
S pozdravem,
Jan Valdman
Business Development Manager
GSM: +420603590152  |  Tel.: +420371650300
Whitesoft Plzeň  |  Křimická 110  |  318 00   Plzeň  |  Česká republika  |
www.whitesoft.eu
From:   "Bill Wimer" @.>
To:     "HCL-TECH-SOFTWARE/connections-ui-docs"
@.>
Cc:     "Jan Valdman" @.>, "Author"
@.>
Date:   17/07/2023 19:59
Subject:        Re: [HCL-TECH-SOFTWARE/connections-ui-docs] Window Scoped
JavaScript Objects (Issue #9)
For #1, we added this
https://github.com/HCL-TECH-SOFTWARE/connections-ui-docs/tree/master/custom-config-extensions#example-using-jsp-customization
. Let us know if this is what you are looking for.
?
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID:
@.***>


IVCT web UI: use empty path to access UI

To access the IVCT web UI I need to use a URL like http://<host>:8180/nato.ivct.gui.nato.ivct.gui.ui.html. An empty path should be sufficient: http://<host>:8180.

I'm currently testing to configure the server.xml with

that requires to modifiy the docker image. It seems to work and I will release it as soon as possible

Hi Reinhard,
you can find the Tomcat config that is pushed to the GUI docker image in the docker directory of the GUI component. Let me know if you need an help with that.

As far as I can see this works now in the latest build. There is no need for a long URL pathname anymore. I'll close the issue.


Dir problem/518

Addresses issue #518
I think this fixes the issue, but I'm not sure if it's the right approach. After I dived in to the issue I realized why it sat open for a year.
I'm very open for alternate approaches.

Can someone take a look at this?

@philips I know you're busy, but can you take a look at this when you get a chance?

@iankronquist The checking logic should happen in the store not in etcd server. So can you try to make the change?

So the interesting thing about this bug, as I understand it, is that the store doesn't know some key information in order to make that check, and the etcd server doesn't know whether the key is a directory. Both have really clean interfaces which prevent you from knowing both that a key is a directory and that prevExist=true at the same point in the code. I suspect this is why the bug hasn't been fixed for a year.
I chose to leak whether a given key is a directory to the etcd server, as opposed to leaking part of the content of the request to the store. I understand that the other option may be preferable, and I will prepare an implementation of what you suggest.
Unfortunately I have a midterm next week and am leading a bug bounty hunt tomorrow, so I may not get to it until later next week.